yusheng 10 месяцев назад
Родитель
Сommit
dcf44af6ab

+ 11 - 4
src/views/system/organization/components/org-user-edit.vue

@@ -90,7 +90,7 @@
             </el-select>
           </el-form-item>
 
-          <el-form-item label="岗位:" prop="postName">
+          <el-form-item label="岗位:" prop="postId">
             <!-- <el-input
               clearable
               :maxlength="100"
@@ -101,7 +101,7 @@
               dictName="岗位"
               clearable
               filterable
-              v-model="form.postName"
+              v-model="form.postId"
             >
             </DictSelection>
           </el-form-item>
@@ -1089,10 +1089,13 @@
   import { getFactoryarea, getProfessionPageList } from '@/api/factoryModel';
   import WithView from '@/components/upload/WithView.vue';
   import FileUpload from '@/components/upload/fileUpload.vue';
+  import dictMixins from '@/mixins/dictMixins';
 
   // D:\中赢\kd-aiot-frontend\src\views\system\user
 
   export default {
+    mixins: [dictMixins],
+
     components: { OrgSelect, RoleSelect, RegionsSelect, WithView, FileUpload },
     props: {
       // 弹窗是否打开
@@ -1130,7 +1133,8 @@
         idCard: '',
         workTypeId: '',
         birthday: '',
-        signature: {}
+        signature: {},
+        postName:''
       };
       return {
         defaultForm,
@@ -1768,7 +1772,7 @@
       addIdentityPhotos() {
         this.form.identityPhotos.push({
           holder: this.form.name,
-          holderType:'1'
+          holderType: '1'
         });
       },
       handleIdentityPhotosDel(row, index) {
@@ -1840,6 +1844,9 @@
           //   this.form['deptTree'] = JSON.stringify(this.deptTree)
           // }
 
+          if (this.form.postId) {
+            this.form.postName = this.getDictValue('岗位', this.form.postId);
+          }
           const data = {
             ...this.form
           };

+ 1 - 4
src/views/system/organization/components/org-user-list.vue

@@ -251,12 +251,9 @@
           {
             prop: 'postName',
             label: '岗位',
-            sortable: 'custom',
             showOverflowTooltip: true,
             minWidth: 110,
-            formatter: (_row, _column, cellValue) => {
-              return this.getDictValue('岗位', cellValue);
-            }
+       
           },
           {
             prop: 'factoryId',

+ 3 - 5
src/views/system/user/components/user-edit.vue

@@ -51,13 +51,11 @@
         </el-col>
         <el-col :span="12">
           <el-form-item label="岗位:" prop="postName">
-            <DictSelection
-              dictName="岗位"
+            <el-input
               placeholder=" "
               v-model="userInfo.postName"
-              :isProhibit="true"
-            >
-            </DictSelection>
+              :disabled="true"
+            />
           </el-form-item>
         </el-col>
         <el-col :span="12">