Sfoglia il codice sorgente

修改值班子表人员

dbcgit 5 anni fa
parent
commit
1c51922498
1 ha cambiato i file con 8 aggiunte e 7 eliminazioni
  1. 8 7
      frontend_web/src/views/duty/detail/index.vue

+ 8 - 7
frontend_web/src/views/duty/detail/index.vue

@@ -27,10 +27,10 @@
             <el-form-item label="值班人员"
                           size="mini"
                           label-width="120px">
-              <el-tag @click="personClick(item.ItemValue)"
+              <el-tag @click="personClick(item.Id)"
                       v-for="item in PeopleList"
-                      :key="item.ItemValue"
-                      :label="item.ItemValue">{{item.ItemName}}</el-tag>
+                      :key="item.Id"
+                      :label="item.Id">{{item.PersonnelName}}</el-tag>
             </el-form-item>
 
           </el-col>
@@ -158,6 +158,7 @@
 import { mapState, mapActions } from 'vuex'
 import DutyApi from '@/api/duty'
 import itemDetailApi from '@/api/sysadmin/itemdetail'
+import PersonnelApi from '@/api/personnel'
 const columnNum = 9
 // 固定列数
 const fixRowHeadNum = 2
@@ -318,9 +319,9 @@ export default {
     // 获取字典表值班人员
     getPeople () {
       let _this = this
-      itemDetailApi.getItemDetailByItemCode({ ItemCode: 'People' })
+      PersonnelApi.getAllPersonnel({ current: 1, size: 999 })
         .then(res => {
-          _this.PeopleList = res
+          _this.PeopleList = res.records
         })
         .catch(err => {
           console.error(err)
@@ -432,8 +433,8 @@ export default {
     formatPerson (row, column, cellValue, index) {
       let label = '休息'
       for (var i = 0; i < this.PeopleList.length; i++) {
-        if (this.PeopleList[i].ItemValue == cellValue) {
-          return this.PeopleList[i].ItemName
+        if (this.PeopleList[i].Id == cellValue) {
+          return this.PeopleList[i].PersonnelName
         }
       }
       return label