Administrator
2021-08-23 2b6b6132ebc576384a109072b611ab7aa49c6e0a
派遣单位新增批量导入
1 files modified
103 ■■■■■ changed files
src/views/dispatch/dispatch.vue 103 ●●●●● patch | view | raw | blame | history
src/views/dispatch/dispatch.vue
@@ -28,8 +28,43 @@
            @click="handleDelete"
            >删 除
          </el-button>
          <el-button
                type="success"
                size="small"
                plain
                icon="el-icon-upload2"
                @click="handleImport"
                >批量导入
              </el-button>
        </template>
        <template slot-scope="{ row }" slot="jurisdiction">
          {{row.jurisdiction==-1?"":row.jurisdiction}}
        </template>
      </avue-crud>
      <el-dialog
        title="派遣单位导入"
        append-to-body
        :visible.sync="excelBox"
        width="555px"
      >
        <avue-form
          :option="excelOption"
          v-model="excelForm"
          :upload-after="uploadAfter"
        >
          <template slot="excelTemplate">
            <el-button type="primary" @click="handleTemplate">
              点击下载<i class="el-icon-download el-icon--right"></i>
            </el-button>
          </template>
        </avue-form>
      </el-dialog>
      <!-- </span>
    <span v-else-if="typeTABS.prop === 'tab2'">
      <avue-crud
@@ -111,6 +146,59 @@
      },
      query: {},
      data: [],
      excelBox: false,
      excelForm: {},
      excelOption: {
        submitBtn: false,
        emptyBtn: false,
        column: [
          {
            label: "模板上传",
            prop: "excelFile",
            type: "upload",
            drag: true,
            loadText: "模板上传中,请稍等",
            span: 24,
            propsHttp: {
              res: "data",
            },
            tip: "请上传 .xls,.xlsx 标准格式文件",
            action: "/api/dispatcherUnit/import-dispatcherUnit",
          },
          // {
          //     label: "数据覆盖",
          //     prop: "isCovered",
          //     type: "switch",
          //     align: "center",
          //     width: 80,
          //     dicData: [
          //     {
          //         label: "否",
          //         value: 0,
          //     },
          //     {
          //         label: "是",
          //         value: 1,
          //     },
          //     ],
          //     value: 0,
          //     slot: true,
          //     rules: [
          //     {
          //         required: true,
          //         message: "请选择是否覆盖",
          //         trigger: "blur",
          //     },
          //     ],
          // },
          {
            label: "模板下载",
            prop: "excelTemplate",
            formslot: true,
            span: 24,
          },
        ],
      },
      option: {
        tip: false,
        // card: true,
@@ -472,6 +560,21 @@
        this.loading = false;
      });
    },
    handleTemplate() {
      window.open(`/api/dispatcherUnit/export-template`);
    },
    handleImport() {
      this.excelBox = true;
    },
    uploadAfter(res, done, loading, column) {
      window.console.log(column);
      this.excelBox = false;
      this.refreshChange();
      done();
    },
    //派遣服务公司登记
    //派遣记录