Просмотр исходного кода

前端-多画面查询优化:检验委托reset补清查询字段、任务管理/任务分配entrTime默认近一周、计划重分配表格高度自适应、报表增加筛选标记

zhangwc 3 недель назад
Родитель
Сommit
e007e3cbf4

+ 4 - 0
src/views/entrustedManagement/components/inspectionMaterials/inspectionMaterials.vue

@@ -1256,6 +1256,10 @@ export default {
       this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())]
       this.search.planCompanyNo = '';
       this.search.matName = ''
+      this.search.suppName = ''
+      this.search.carNo = ''
+      this.search.contractNo = ''
+      this.search.planNo = ''
       this.searchData();
     },
     pageSizeChange(size) {

+ 3 - 0
src/views/entrustedManagement/components/inspectionProudects/inspectionProudects.vue

@@ -1465,6 +1465,9 @@ export default {
       this.search.times = [this.getYNM(new Date()), this.getYNM(new Date())];
       this.search.planCompanyNo = "";
       this.search.matName = "";
+      this.search.batchNo = "";
+      this.search.carNo = "";
+      this.search.sampleNo = "";
       this.searchData();
     },
     handleSelectionChange(val) {

+ 4 - 0
src/views/entrustedManagement/components/temporaryEntrust/temporaryEntrust.vue

@@ -1123,6 +1123,10 @@ export default {
       this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())]
       this.search.planCompanyNo = '';
       this.search.matName = ''
+      this.search.suppName = ''
+      this.search.carNo = ''
+      this.search.contractNo = ''
+      this.search.planNo = ''
       this.searchData();
     },
     pageSizeChange(size) {

+ 3 - 3
src/views/programManagement/components/fixedScheduleManagement/fixedScheduleManagement.vue

@@ -1050,7 +1050,7 @@ export default {
     this.height_bot =
       window.innerHeight / 2 - 140 < 249 ? 249 : window.innerHeight / 2 - 110;
     this.activeMenu = window.top.localStorage.getItem("activeMenu");
-    this.search.planYear = new Date();
+    this.search.planYear = "";
   },
   mounted() {
     this.axios
@@ -1654,7 +1654,7 @@ export default {
       this.saveRow = {};
       this.table.list2 = [];
       this.dataLoading = true;
-      let planYear = formatDate(this.search.planYear, "yyyy");
+      let planYear = this.search.planYear ? formatDate(this.search.planYear, "yyyy") : "";
       let obj = {
         object: {
           planCompanyNo: this.search.planCompanyNo,
@@ -1797,7 +1797,7 @@ export default {
         });
     },
     reset() {
-      this.search.planYear = new Date();
+      this.search.planYear = "";
       this.search.planCompanyNo = "";
       this.search.planDeptNo = "";
       this.search.matName = "";

+ 2 - 1
src/views/reportForm/components/chemicalAnalysisReport.vue

@@ -68,7 +68,8 @@
         </div>
         <div class="common-table-div" id="topTable">
           <el-table ref="el_table_1" border :height="tableHeight"  width="100%" highlight-current-row
-            @selection-change="searchFollow" :data="table.list1">
+            @selection-change="searchFollow" :data="table.list1" :icorePanelShown="100"
+            :icore-filter-flag="icoreFilterFlag">
             <el-table-column type="selection" width="55" align="center"></el-table-column>
             <el-table-column sortable show-overflow-tooltip align="center" width="160" prop="CAR_NO"
               label="委托编号"></el-table-column>

+ 2 - 2
src/views/taskManagement/components/inspectionTaskControl/inspectionTaskControl.vue

@@ -675,7 +675,7 @@ export default {
   created () {
     this.tableTop = window.innerHeight / 2 - 140 < 249 ? 249 : window.innerHeight / 2 - 150;
     this.tableBot = window.innerHeight / 2 - 150 < 249 ? 249 : window.innerHeight / 2 - 150;
-    this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())]
+    this.search.entrTime = [this.getYNM(new Date(Date.now() - 6 * 24 * 60 * 60 * 1000)), this.getYNM(new Date())]
     this.activeMenu = window.top.localStorage.getItem('activeMenu')
   },
   mounted () {
@@ -885,7 +885,7 @@ export default {
     // 重置
     reset () {
       this.search.matName = '';
-      this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())]
+      this.search.entrTime = [this.getYNM(new Date(Date.now() - 6 * 24 * 60 * 60 * 1000)), this.getYNM(new Date())]
       this.searchData();
     },
     // 删除

+ 2 - 2
src/views/taskManagement/components/inspectionTaskFinished/inspectionTaskFinished.vue

@@ -285,7 +285,7 @@ export default {
   created() {
     this.tableTop = window.innerHeight / 2 - 140 < 249 ? 249 : window.innerHeight / 2 - 150;
     this.tableBot = window.innerHeight / 2 - 150 < 249 ? 249 : window.innerHeight / 2 - 150;
-    this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())]
+    this.search.entrTime = [this.getYNM(new Date(Date.now() - 6 * 24 * 60 * 60 * 1000)), this.getYNM(new Date())]
     this.activeMenu = window.top.localStorage.getItem('activeMenu')
   },
   mounted() {
@@ -496,7 +496,7 @@ export default {
     // 重置
     reset() {
       this.search.matName = '';
-      this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())]
+      this.search.entrTime = [this.getYNM(new Date(Date.now() - 6 * 24 * 60 * 60 * 1000)), this.getYNM(new Date())]
       this.searchData();
     },
     // 删除

+ 2 - 2
src/views/taskManagement/components/inspectionTaskRaw/inspectionTaskRaw.vue

@@ -277,7 +277,7 @@ export default {
       window.innerHeight / 2 - 140 < 249 ? 249 : window.innerHeight / 2 - 150;
     this.tableBot =
       window.innerHeight / 2 - 150 < 249 ? 249 : window.innerHeight / 2 - 150;
-    this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())];
+    this.search.entrTime = [this.getYNM(new Date(Date.now() - 6 * 24 * 60 * 60 * 1000)), this.getYNM(new Date())];
     this.activeMenu = window.top.localStorage.getItem("activeMenu");
   },
   mounted() {
@@ -539,7 +539,7 @@ export default {
     // 重置
     reset() {
       this.search.matName = "";
-      this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())];
+      this.search.entrTime = [this.getYNM(new Date(Date.now() - 6 * 24 * 60 * 60 * 1000)), this.getYNM(new Date())];
       this.searchData();
     },
     // 删除

+ 20 - 4
src/views/taskManagement/components/planReassignment/planReassignment.vue

@@ -338,9 +338,10 @@ export default {
     }
   },
   created() {
-    this.tableTop = window.innerHeight - 230;
-    this.tableBot = window.innerHeight - 230;
-    this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())]
+    this.tableTop = this.calcTableHeight();
+    this.tableBot = this.calcTableHeight();
+    window.addEventListener('resize', this.resizeTable);
+    this.search.entrTime = [this.getYNM(new Date(Date.now() - 6 * 24 * 60 * 60 * 1000)), this.getYNM(new Date())]
     this.activeMenu = window.top.localStorage.getItem('activeMenu')
     this.axios.post('pass/baseManagement/v1/limsbaseposts/queryLimsBasePostList', {}, { individualType: 'json' }).then(res => {
       this.jobType = res.data
@@ -359,7 +360,22 @@ export default {
     this.addScreen();
     this.addScreen2();
   },
+  beforeDestroy() {
+    window.removeEventListener('resize', this.resizeTable);
+  },
   methods: {
+    calcTableHeight() {
+      // 视口高度减去页面查询区/tabs头/标题栏/合计行等实际占位(原固定 230 偏小,本页查询区两行会超,改为 300 并留余量)
+      return window.innerHeight - 300;
+    },
+    resizeTable() {
+      this.tableTop = this.calcTableHeight();
+      this.tableBot = this.calcTableHeight();
+      this.$nextTick(() => {
+        if (this.$refs.dataTable && this.$refs.dataTable.doLayout) this.$refs.dataTable.doLayout();
+        if (this.$refs.dataTable2 && this.$refs.dataTable2.doLayout) this.$refs.dataTable2.doLayout();
+      });
+    },
     getYNM(date) {
       let year = date.getFullYear().toString();
       let month = date.getMonth() + 1;
@@ -724,7 +740,7 @@ export default {
       this.search.jobs = ''
       this.search.deptNo = ''
       this.search.sectionNo = ''
-      this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())]
+      this.search.entrTime = [this.getYNM(new Date(Date.now() - 6 * 24 * 60 * 60 * 1000)), this.getYNM(new Date())]
       this.searchData();
     },
     // 取消分配

+ 4 - 6
src/views/taskManagement/components/taskAllocationControl/taskAllocationControl.vue

@@ -1121,9 +1121,8 @@ export default {
     this.tableTop = window.innerHeight - 230;
     this.tableBot = window.innerHeight - 230;
     let now = new Date();
-    let start = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 7, 0, 0);
-    let end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 8, 0, 0);
-    this.search.entrTime = [start, end]
+    let wkStart = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 6, 0, 0, 0);
+    this.search.entrTime = [this.getYNM(wkStart) + ' 00:00:00', this.getYNM(now) + ' 23:59:59']
     this.activeMenu = window.top.localStorage.getItem('activeMenu')
     this.axios.post('pass/baseManagement/v1/limsbaseposts/queryLimsBasePostList', {}, { individualType: 'json' }).then(res => {
       this.jobType = res.data
@@ -1566,9 +1565,8 @@ export default {
       this.search.deptNo = ''
       this.search.sectionNo = ''
       let now = new Date();
-      let start = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 7, 0, 0);
-      let end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 8, 0, 0);
-      this.search.entrTime = [start, end]
+      let wkStart = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 6, 0, 0, 0);
+      this.search.entrTime = [this.getYNM(wkStart) + ' 00:00:00', this.getYNM(now) + ' 23:59:59']
       this.searchData();
     },
     transfer () {//转移

+ 2 - 2
src/views/taskManagement/components/taskAllocationMaterial/taskAllocationMaterial.vue

@@ -339,7 +339,7 @@ export default {
     this.theight1 = window.innerHeight - 165;
     this.tableTop = window.innerHeight - 230;
     this.tableBot = window.innerHeight - 230;
-    this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())];
+    this.search.entrTime = [this.getYNM(new Date(Date.now() - 6 * 24 * 60 * 60 * 1000)), this.getYNM(new Date())];
     this.activeMenu = window.top.localStorage.getItem("activeMenu");
     this.axios
       .post(
@@ -849,7 +849,7 @@ export default {
       this.search.jobs = "";
       this.search.deptNo = "";
       this.search.sectionNo = "";
-      this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())];
+      this.search.entrTime = [this.getYNM(new Date(Date.now() - 6 * 24 * 60 * 60 * 1000)), this.getYNM(new Date())];
       this.searchData();
     },
     // 取消分配

+ 2 - 2
src/views/taskManagement/components/taskAllocationProduct/taskAllocationProduct.vue

@@ -321,7 +321,7 @@ export default {
   created() {
     this.tableTop = window.innerHeight - 230;
     this.tableBot = window.innerHeight - 230;
-    this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())]
+    this.search.entrTime = [this.getYNM(new Date(Date.now() - 6 * 24 * 60 * 60 * 1000)), this.getYNM(new Date())]
     this.activeMenu = window.top.localStorage.getItem('activeMenu')
     this.axios.post('pass/baseManagement/v1/limsbaseposts/queryLimsBasePostList', {}, { individualType: 'json' }).then(res => {
       this.jobType = res.data
@@ -705,7 +705,7 @@ export default {
       this.search.jobs = ''
       this.search.deptNo = ''
       this.search.sectionNo = ''
-      this.search.entrTime = [this.getYNM(new Date()), this.getYNM(new Date())]
+      this.search.entrTime = [this.getYNM(new Date(Date.now() - 6 * 24 * 60 * 60 * 1000)), this.getYNM(new Date())]
       this.searchData();
     },
     // 取消分配