Browse Source

项目参研人员汇总表接口联调;人员人工预算技术人员下拉列表接口替换

ljb 10 months ago
parent
commit
20fc920054

+ 1 - 29
src/api/techPerson/cyPersonSumList.js

@@ -2,7 +2,7 @@ import request from '@/router/axios';
 
 export const getList = (current, size, params) => {
   return request({
-    url: '/api/kd-scientific/technician/page',
+    url: '/api/kd-scientific/technician/xmcyryhzb',
     method: 'get',
     params: {
       ...params,
@@ -11,31 +11,3 @@ export const getList = (current, size, params) => {
     }
   })
 }
-
-export const add = (row) => {
-  return request({
-    url: '/api/kd-scientific/technician/save',
-    method: 'post',
-    data: row
-  })
-}
-
-
-export const update = (row) => {
-  return request({
-    url: '/api/kd-scientific/technician/update',
-    method: 'post',
-    data: row
-  })
-}
-
-
-export const remove = (ids) => {
-  return request({
-    url: '/api/kd-scientific/technician/remove',
-    method: 'post',
-    params: {
-      ids,
-    }
-  })
-}

+ 0 - 1
src/option/projectManage/personCost.js

@@ -31,7 +31,6 @@ export default {
       dicQuery: {
         current: 1,
         size: 99999,
-        yearAndMonth: ''
       },
       props: {
         label: 'name',

+ 8 - 8
src/option/techPerson/cyPersonSumList.js

@@ -135,13 +135,13 @@ export default {
       },
       showOverflowTooltip: true,
     },
-    {
-      label: '参与月份',
-      prop: 'month',
-      span: 12,
-      width: 100,
-      align: 'center',
-      showOverflowTooltip: true,
-    }
+    // {
+    //   label: '参与月份',
+    //   prop: 'yearAndMonth',
+    //   span: 12,
+    //   width: 100,
+    //   align: 'center',
+    //   showOverflowTooltip: true,
+    // }
   ],
 };

+ 5 - 3
src/views/project-manage/components/person-cost.vue

@@ -118,9 +118,11 @@ export default window.$crudCommon({
       }
       this.option.column.forEach(item => {
         if (item.prop == "technicianId") {
-          let yearAndMonth = this.selProject.xmkssj || new Date();
-          item.dicUrl = '/api/kd-scientific/technician/page';
-          item.dicQuery.yearAndMonth = moment(yearAndMonth).format("yyyyMM");
+          let startDate = this.selProject.xmkssj || new Date();
+          let endDate = this.selProject.xmjssj || new Date();
+          item.dicUrl = '/api/kd-scientific/technician/page/date-interval';
+          item.dicQuery.startDate = moment(startDate).format("yyyyMM");
+          item.dicQuery.endDate = moment(endDate).format("yyyyMM");
         }
       });
 

+ 16 - 18
src/views/tech-person/cy-person-sum-list.vue

@@ -57,9 +57,7 @@ export default window.$crudCommon({
         yearAndMonth: moment(new Date()).format('YYYYMM'),
         
       },
-      spanArr: [
-        { prop: 'projectName', span: [] },
-      ],
+
       wideTableColumns: [],
       printTitle: "",
     };
@@ -71,19 +69,6 @@ export default window.$crudCommon({
     }
   },
   methods: {
-    getList() {
-      this.data = [{
-        projectName: '项目1'
-      }, {
-        projectName: '项目1'
-      }, {
-        projectName: '项目1'
-      }, {
-        projectName: '项目2'
-      }, {
-        projectName: '项目3'
-      }];
-    },
     spanMethod({ row, column, rowIndex, columnIndex }) {
       let fields = ["projectName"];
       let cellValue = row[column.property];
@@ -111,7 +96,7 @@ export default window.$crudCommon({
         type: "warning"
       }).then(() => {
         NProgress.start();
-        exportBloByPost(`/api/kd-scientific/technician/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
+        exportBloByPost(`/api/kd-scientific/technician/xmcyryhzb/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
           downloadXls(res.data, `${this.params.yearAndMonth}项目参研人员汇总表.xlsx`);
           NProgress.done();
         })
@@ -128,6 +113,19 @@ export default window.$crudCommon({
   },
 }, {
   // 模块路径
-  name: 'techPerson/cyPersonSumList'
+  name: 'techPerson/cyPersonSumList',
+  res: ({ data }) => {
+    let newList = [];
+    data.records.forEach(item => {
+      item.technicianList.forEach(techItem => {
+        newList.push({
+          projectName: item.xmmc,
+          ...techItem
+        });
+      });
+    });
+    data.records = newList;
+    return data;
+  }
 });
 </script>