yz
2021-03-05 eb897b781bfc18df4f87a8c78babd3834b2d269f
src/views/user/Informationinput.vue
@@ -549,9 +549,11 @@
              <el-upload
                ref="upload"
                class="upload-demo"
                action="http://127.0.0.1:8301/hr/empBaseInfo/importEmp"
                action="http://120.24.23.155:8301/hr/empBaseInfo/importEmp"
                accept=".xls, .xlsx, .excel"
                :headers="headers()"
                :on-success="importHandleAvatarSuccess"
                :on-error="importHandleAvatarError"
                :file-list="fileList"
                :auto-upload="false"
              >
@@ -2857,6 +2859,25 @@
    this.isShow(false, 0)
  },
  methods: {
    importHandleAvatarError() {
      this.$notify.error({
        title: '错误',
        message: '导入失败'
      })
    },
    importHandleAvatarSuccess(res, file) {
      if (res.data === null) {
        this.$notify({
          title: '成功',
          message: '导入成功!',
          type: 'success'
        })
      } else {
        this.$alert(JSON.stringify(res.data), '导入失败原因', {
          confirmButtonText: '确定'
        })
      }
    },
    headers() {
      const token = getToken()
      if (token) {