408249787@qq.com 1 日 前
コミット
6d62964173

+ 13 - 12
src/views/repair/application-form/RepairForm.vue

@@ -137,7 +137,7 @@ import DetailOut from './modules/DetailRepairOut'
 import { getRepairApplicationFormPage, deleteRepairApplicationForms, fetchRepairApplicationForm, exportRepairApplicationForm } from '@/api/repair/application-form'
 import DispatchBaseForm from '@/views/repair/application-form/modules/DispatchBaseForm'
 import { queryDept } from '@/api/upms/dept'
-import { selectUserDept } from '@/api/upms/user-dept'
+// import { selectUserDept } from '@/api/upms/user-dept'
 
 export default {
   name: 'RepairForm',
@@ -166,7 +166,8 @@ export default {
       // 查询参数
       queryParam: {
         filter: this.filter,
-        searchType: this.searchType
+        searchType: this.searchType,
+        deptId: this.$store.getters.userInfo.deptId
       },
       visible: true,
       // 表头
@@ -342,16 +343,16 @@ export default {
       this.deptList = res.data || []
     })
     // 我的工单:默认查询当前登录人部门的所有相关工单
-    if (this.searchType === 2) {
-      selectUserDept().then(res => {
-        if (res.data && res.data.deptId) {
-          this.queryParam.deptId = res.data.deptId
-          if (this.$refs.table) {
-            this.$refs.table.refresh()
-          }
-        }
-      })
-    }
+    // if (this.searchType === 2) {
+    // selectUserDept().then(res => {
+    //   if (res.data && res.data.deptId) {
+    //     this.queryParam.deptId = res.data.deptId
+    //     if (this.$refs.table) {
+    //       this.$refs.table.refresh()
+    //     }
+    //   }
+    // })
+    // }
     this.tableOption()
   },
   methods: {

+ 3 - 1
src/views/repair/application-form/modules/BaseForm.vue

@@ -6,6 +6,7 @@
       <a-form-item v-show="false">
         <a-input v-decorator="['id']" type="hidden" />
         <a-input v-decorator="['sbId']" type="hidden" />
+        <a-input v-decorator="['deptId', { initialValue: userInfo.deptId }]" type="hidden" />
       </a-form-item>
 
       <row-list :col="2">
@@ -101,7 +102,7 @@
             <a-select style="width: 100%" v-decorator="['repairErrorTypeId']" placeholder="请选择" allowClear>
               <a-select-option v-for="(label, value) in faultTypeMap" :key="value" :label="label" :value="value">{{
                 label
-                }}
+              }}
               </a-select-option>
             </a-select>
           </a-form-item>
@@ -294,6 +295,7 @@ export default {
               'partName',
               'remark',
               'repairErrorTypeId',
+              'deptId'
             ])
           )
         )