Pārlūkot izejas kodu

修改ant表格有固定列时会出现空白间隙的问题

yuhan 1 gadu atpakaļ
vecāks
revīzija
ff36a39ccf

+ 8 - 8
src/views/module_kzks/costModelList/modulesDetail/CostModelXmxqClList.vue

@@ -322,20 +322,20 @@
       },
       setColumn(){
         if (this.type == 'max') {
-          this.columns.push({ title:'单价(最大值)', align:"center", dataIndex: 'maxDanjia', fixed: 'right' })
-          this.columns.push({ title:'价格(最大值)', align:"center", dataIndex: 'maxPrice', fixed: 'right' })
+          this.columns.push({ title:'单价(最大值)', align:"center", dataIndex: 'maxDanjia', fixed: 'right', width: 120 })
+          this.columns.push({ title:'价格(最大值)', align:"center", dataIndex: 'maxPrice', fixed: 'right', width: 120 })
         }
         if (this.type == 'min') {
-          this.columns.push({ title:'单价(最小值)', align:"center", dataIndex: 'minDanjia', fixed: 'right' })
-          this.columns.push({ title:'价格(最小值)', align:"center", dataIndex: 'minPrice', fixed: 'right' })
+          this.columns.push({ title:'单价(最小值)', align:"center", dataIndex: 'minDanjia', fixed: 'right', width: 120 })
+          this.columns.push({ title:'价格(最小值)', align:"center", dataIndex: 'minPrice', fixed: 'right', width: 120 })
         }
         if (this.type == 'ave') {
-          this.columns.push({ title:'单价(平均值)', align:"center", dataIndex: 'aveDanjia', fixed: 'right' })
-          this.columns.push({ title:'价格(平均值)', align:"center", dataIndex: 'avePrice', fixed: 'right' })
+          this.columns.push({ title:'单价(平均值)', align:"center", dataIndex: 'aveDanjia', fixed: 'right', width: 120 })
+          this.columns.push({ title:'价格(平均值)', align:"center", dataIndex: 'avePrice', fixed: 'right', width: 120 })
         }
         if (this.type == 'recent') {
-          this.columns.push({ title:'单价(近期值)', align:"center", dataIndex: 'recentDanjia', fixed: 'right' })
-          this.columns.push({ title:'价格(近期值)', align:"center", dataIndex: 'recentPrice', fixed: 'right' })
+          this.columns.push({ title:'单价(近期值)', align:"center", dataIndex: 'recentDanjia', fixed: 'right', width: 120 })
+          this.columns.push({ title:'价格(近期值)', align:"center", dataIndex: 'recentPrice', fixed: 'right', width: 120 })
         }
       },
       initDictConfig(){

+ 6 - 6
src/views/module_kzks/costModelList/modulesDetail/CostModelXmxqWxList.vue

@@ -294,16 +294,16 @@
       },
       setColumn(){
         if (this.type == 'max') {
-          this.columns.push({ title:'单价(最大值)', align:"center", dataIndex: 'maxDanjia', fixed: 'right' },
-          { title:'价格(最大值)', align:"center", dataIndex: 'maxPrice', fixed: 'right' })
+          this.columns.push({ title:'单价(最大值)', align:"center", dataIndex: 'maxDanjia', fixed: 'right', width: 120 },
+          { title:'价格(最大值)', align:"center", dataIndex: 'maxPrice', fixed: 'right', width: 120 })
         }
         if (this.type == 'min') {
-          this.columns.splice(7,0,{ title:'单价(最小值)', align:"center", dataIndex: 'minDanjia', fixed: 'right' },
-          { title:'价格(最小值)', align:"center", dataIndex: 'minPrice', fixed: 'right' })
+          this.columns.splice(7,0,{ title:'单价(最小值)', align:"center", dataIndex: 'minDanjia', fixed: 'right', width: 120 },
+          { title:'价格(最小值)', align:"center", dataIndex: 'minPrice', fixed: 'right', width: 120 })
         }
         if (this.type == 'ave') {
-          this.columns.splice(7,0,{ title:'单价(平均值)', align:"center", dataIndex: 'aveDanjia', fixed: 'right' },
-          { title:'价格(平均值)', align:"center", dataIndex: 'avePrice', fixed: 'right' })
+          this.columns.splice(7,0,{ title:'单价(平均值)', align:"center", dataIndex: 'aveDanjia', fixed: 'right', width: 120 },
+          { title:'价格(平均值)', align:"center", dataIndex: 'avePrice', fixed: 'right', width: 120 })
         }
       },
       initDictConfig(){

+ 3 - 1
src/views/module_kzks/projectCostList/ProjectCostList.vue

@@ -404,6 +404,7 @@ import { number } from 'echarts';
             title:'任务号',
             fixed:"left",
             dataIndex: 'taskno',
+            width: 140,
             customHeaderCell:() => ({
               style: {
                 textAlign: 'center', // 表头居中
@@ -414,6 +415,7 @@ import { number } from 'echarts';
             title:'任务名称',
             align:"center",
             fixed:"left",
+            width: 120,
             dataIndex: 'taskname'
           },
           {
@@ -727,7 +729,7 @@ import { number } from 'echarts';
             dataIndex: 'action',
             align:"center",
             fixed:"right",
-            width:147,
+            width: 100,
             scopedSlots: {
               // filterDropdown: 'filterDropdown',
               // filterIcon: 'filterIcon',

+ 4 - 0
src/views/module_kzks/projectCostList/modulesDetail/CollectDetailList.vue

@@ -128,12 +128,14 @@
             title:'任务号',
             align:"center",
             dataIndex: 'rwbh',
+            width: 120,
             fixed: 'left',
           },
           {
             title:'任务名称',
             align:"center",
             dataIndex: 'rwmc',
+            width: 120,
             fixed: 'left',
           },
           // 所属型号
@@ -253,12 +255,14 @@
             title:'收款总金额(元)', // 金额(元)、  、开票金额
             align:"center",
             dataIndex: 'jeskzkp',
+            width: 120,
             fixed: 'right',
           },
           {
             title:'任务收款金额(元)',
             align:"center",
             dataIndex: 'rwskje',
+            width: 120,
             fixed: 'right',
           },
 

+ 3 - 0
src/views/module_kzks/projectCostList/modulesDetail/ContractDetailList.vue

@@ -134,12 +134,14 @@
             title:'任务编号',
             align:"center",
             dataIndex: 'rwbh',
+            width: 120,
             fixed: 'left',
           },
           {
             title:'任务名称',
             align:"center",
             dataIndex: 'rwmc',
+            width: 120,
             fixed: 'left',
           },
           {
@@ -333,6 +335,7 @@
             title:'合同分配额(元)',
             align:"center",
             dataIndex: 'htfpe',
+            width: 120,
             fixed: 'right',
           },
 

+ 3 - 0
src/views/module_kzks/projectCostList/modulesDetail/KyBgDetailList.vue

@@ -133,12 +133,14 @@
             title:'报工任务号',
             align:"center",
             dataIndex: 'taskno',
+            width: 120,
             fixed: 'left'
           },
           {
             title:'任务名称',
             align:"center",
             dataIndex: 'taskname',
+            width: 120,
             fixed: 'left'
           },
           {
@@ -237,6 +239,7 @@
             title:'当日用时(h)',
             align:"center",
             dataIndex: 'workhour',
+            width: 120,
             fixed: 'right'
           },
         ],

+ 4 - 0
src/views/module_kzks/projectCostList/modulesDetail/MesDetailList.vue

@@ -133,6 +133,7 @@
             title:'任务号',
             align:"center",
             dataIndex: 'taskno',
+            width: 120,
             fixed: 'left',
           },
           {
@@ -328,18 +329,21 @@
             title:'采购单价',
             align:"center",
             dataIndex: 'purchaseprice',
+            width: 120,
             fixed: 'right',
           },
           {
             title:'内部单价',
             align:"center",
             dataIndex: 'internalprice',
+            width: 120,
             fixed: 'right',
           },
           {
             title:'数量',
             align:"center",
             dataIndex: 'qty',
+            width: 80,
             fixed: 'right',
           },
         ],

+ 2 - 0
src/views/module_kzks/projectCostList/modulesDetail/PichanTaskList.vue

@@ -135,6 +135,7 @@
             title:'任务号',
             fixed:"left",
             dataIndex: 'taskno',
+            width: 120,
             customHeaderCell:() => ({
               style: {
                 textAlign: 'center', // 表头居中
@@ -146,6 +147,7 @@
             title:'任务名称',
             align:"center",
             dataIndex: 'taskname',
+            width: 120,
             fixed:"left",
           },
           {

+ 2 - 0
src/views/module_kzks/projectCostList/modulesDetail/ProjectChbSwfList.vue

@@ -128,6 +128,7 @@
             title:'任务号',
             align:"center",
             dataIndex: 'taskno',
+            width: 120,
             fixed: 'left',
           },
           {
@@ -214,6 +215,7 @@
             title:'辅助金额',
             align:"center",
             dataIndex: 'fzje',
+            width: 100,
             fixed: 'right',
           },
           // {

+ 2 - 0
src/views/module_kzks/projectCostList/modulesDetail/ProjectChbWxfList.vue

@@ -128,6 +128,7 @@
             title:'任务号',
             align:"center",
             dataIndex: 'taskno',
+            width: 120,
             fixed: 'left',
           },
           {
@@ -214,6 +215,7 @@
             title:'辅助金额',
             align:"center",
             dataIndex: 'fzje',
+            width: 100,
             fixed: 'right',
           },
         ],

+ 2 - 0
src/views/module_kzks/projectCostList/modulesDetail/ProjectChbZyfList.vue

@@ -104,6 +104,7 @@
             title:'任务号',
             align:"center",
             dataIndex: 'taskno',
+            width: 120,
             fixed: 'left',
           },
           {
@@ -190,6 +191,7 @@
             title:'辅助金额',
             align:"center",
             dataIndex: 'fzje',
+            width: 100,
             fixed: 'right',
           },
         ],