From 83830b509d3cce2dba0be3fdbc6f4db054b78d74 Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期三, 18 十月 2023 18:43:30 +0800
Subject: [PATCH] 鉴定

---
 src/views/eam/modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList.vue |  162 ++++++++++++++++++++++++++----------------------------
 1 files changed, 78 insertions(+), 84 deletions(-)

diff --git a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList.vue b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList.vue
index a7de5e0..3747e9a 100644
--- a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList.vue
+++ b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList.vue
@@ -1,16 +1,18 @@
 <template>
-  <a-card :bordered="false">
+  <a-card :bordered="false" :class="'cust-erp-sub-tab'">
     <div>
       <a-table
         ref="table"
-        size="middle"
         bordered
+        size="middle"
         rowKey="id"
         :columns="columns"
         :dataSource="dataSource"
-        :pagination=false
+        :pagination="ipagination"
         :loading="loading"
         @change="handleTableChange"
+        class="j-table-force-nowrap"
+        :scroll="{x:true}"
       >
         <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
 
@@ -34,106 +36,98 @@
     Tooltip,
     JEllipsis,
   },
+  props:{
+    calibrationOrderId:{
+        type:String,
+        default:'',
+        required:false
+    }
+  },
+    watch:{
+      calibrationOrderId:{
+        immediate: true,
+        handler(val) {
+          if(!this.calibrationOrderId){
+            this.clearList()
+          }else{
+            this.queryParam['calibrationOrderId'] = val;
+            this.queryParam['delFlag'] = 0;
+            this.loadData(1);
+          }
+        }
+      }
+    },
   data() {
     return {
       description: '绮惧害鍙傛暟',
+      disableMixinCreated:true,
+      ipagination:{
+          current: 1,
+          pageSize: 5,
+          pageSizeOptions: ['5', '10', '50'],
+          showTotal: (total, range) => {
+            return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
+          },
+          showQuickJumper: true,
+          showSizeChanger: true,
+          total: 0
+      },
       // 琛ㄥご
       columns: [
-        {
-          title: '#',
-          dataIndex: '',
-          key: 'rowIndex',
-          width: 60,
-          align: "center",
-          customRender: function (t, r, index) {
-            return parseInt(index) + 1;
-          }
-        },
-        {
-          title: '绮惧害鍙傛暟缂栫爜',
-          dataIndex: 'num',
-          align: "center",
-        },
-        {
-          title: '绮惧害鍙傛暟鍚嶇О',
-          dataIndex: 'name',
-          align: "center",
-        },
-        {
-          title: '璁¢噺鍗曚綅',
-          dataIndex: 'unitName',
-          align: "center",
-        },
-        {
-          title: '涓婇檺鍊�',
-          dataIndex: 'upperLimit',
-          align: "center",
-        },
-        {
-          title: '涓嬮檺鍊�',
-          dataIndex: 'lowerLimit',
-          align: "center",
-        },
-        {
-          title: '妫�瀹氱粨鏋�',
-          dataIndex: 'calibrationItemResult',
-          align: "center",
-        },
-        {
-          title: '鍒ゅ畾缁撴灉',
-          dataIndex: 'judgmentResult',
-          align: "center",
-        },
+          {
+            title: '#',
+            dataIndex:'sort',
+            width:100,
+            align:"center",
+          },
+          {
+            title:'妫�楠岄」鐩悕绉�',
+            align:"center",
+            dataIndex: 'name',
+            width:200
+          },
+          {
+            title:'浣嶇疆',
+            align:"center",
+            dataIndex: 'precisionParametersUda1',
+            width:200
+          },
+          {
+            title:'鍏佸樊锛坢m锛�',
+            align:"center",
+            dataIndex: 'tolerance',
+            width:200
+          },
+          {
+            title:'瀹炴祴鍊�',
+            align:"center",
+            dataIndex: 'actualValue',
+            width:200
+          },
       ],
       url: {
-        list: "/eam/calibrationOrderDetail/getCalibrationOrderDetailList",
+        list: "/eam/calibrationOrder/listByMainId",
       },
-      calibrationOrderId: '',
     }
   },
-  watch: {
-    calibrationOrderId() {
-      this.queryParam = {};
-      this.queryParam.calibrationOrderId = this.calibrationOrderId;
-      this.loadData(1);
+  methods: {
+    clearList(){
+        this.dataSource=[]
+        this.selectedRowKeys=[]
+        this.ipagination.current = 1
     },
   },
-  methods: {
-    loadData(arg) {
-      if (!this.url.list) {
-        this.$message.error("璇疯缃畊rl.list灞炴��!")
-        return
+  computed: {
+      importExcelUrl(){
+        return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
       }
-      if (arg === 1) {
-        this.ipagination.current = 1;
-      }
-      var params = this.getQueryParams();//鏌ヨ鏉′欢
-      if (this.calibrationOrderId == '') {
-        params.calibrationOrderId = '-1';
-      }
-      this.loading = true;
-      getAction(this.url.list, params).then((res) => {
-        if (res.success) {
-          this.dataSource = res.result.records || res.result;
-          if (res.result.total) {
-            this.ipagination.total = res.result.total;
-          } else {
-            this.ipagination.total = 0;
-          }
-        } else {
-          this.$message.warning(res.message)
-        }
-      }).finally(() => {
-        this.loading = false
-      })
-    },
   },
 }
 </script>
 
 <style scoped>
 @import '~@assets/less/common.less';
-/deep/ .frozenRowClass {
+ .frozenRowClass {
   color: #c9c9c9;
 }
 .success {

--
Gitblit v1.9.3