src/views/CNAS/personnel/personnelInfo/components/mandateAdd.vue
@@ -17,10 +17,10 @@
          </el-input>
        </el-form-item >
        <el-form-item label="被任职人员" prop="userId">
          <el-select v-model="form.userId" placeholder="请选择">
          <el-select v-model="form.userId" filterable placeholder="请选择">
            <el-option
              v-for="(item, index) in userList"
              :key="index"
              v-for="item in userList"
              :key="item.id"
              :label="item.name"
              :value="item.id"
            ></el-option>
@@ -141,9 +141,14 @@
     * @desc 获取用户信息
     */
    async getUserList() {
      selectUserCondition({type: 2}).then((res) => {
        this.userList = res.data;
      })
      try {
        const res = await selectUserCondition()
        if (res.code !== 200) throw new Error('人员列表接口返回失败')
        this.userList = Array.isArray(res.data) ? res.data : []
      } catch (error) {
        this.userList = []
        this.$message.error('人员列表加载失败,请稍后重试')
      }
    },
    /**
     * @desc 提交表单