JXDS18FUJT 2 年之前
父節點
當前提交
b54c7bef53
共有 4 個文件被更改,包括 61 次插入51 次删除
  1. 4 1
      src/store/getters.js
  2. 3 1
      src/store/modules/settings.js
  3. 8 3
      src/views/price/engine/index.vue
  4. 46 46
      src/views/price/manage/index.vue

+ 4 - 1
src/store/getters.js

@@ -11,6 +11,9 @@ const getters = {
   roles: state => state.user.roles,
   permissions: state => state.user.permissions,
   permission_routes: state => state.permission.routes,
-  tableColumnWidth:state => state.settings.tableColumnWidth
+  tableColumnWidthMini:state => state.settings.tableColumnWidthMini,
+  tableColumnWidth:state=>45,
+  tableColumnWidthMedium:state=>state.settings.tableColumnWidthMedium,
+  tableColumnWidthSamll:state=>state.settings.tableColumnWidthSamll
 }
 export default getters

+ 3 - 1
src/store/modules/settings.js

@@ -6,7 +6,9 @@ const { showSettings, tagsView, fixedHeader, sidebarLogo } = defaultSettings
 const state = {
 
   theme: variables.theme,
-  tableColumnWidth:45,
+  tableColumnWidthMini:45,
+  tableColumnWidthSmall:75,
+  tableColumnWidthMedium:100,
   showSettings: showSettings,
   tagsView: tagsView,
   fixedHeader: fixedHeader,

+ 8 - 3
src/views/price/engine/index.vue

@@ -236,9 +236,11 @@ emissionStandard">
     <el-table :fit="false" size="mini" v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
 
-      <el-table-column fixed label="动力品牌"  align="center" prop="brand" />
+      <el-table-column  label="动力品牌" :width="'100px'"  align="center" prop="brand" >
+      
+      </el-table-column>
       <el-table-column fixed label="型号" align="center" prop="model" />
-      <el-table-column label="发动机主要功率(1500RPM  50HZ)" align="center" prop="enginePowerMajor1500rpm" />
+      <el-table-column fixed label="发动机主要功率(1500RPM  50HZ)" align="center" prop="enginePowerMajor1500rpm" />
       <el-table-column label="发动机备用功率(1500RPM  50HZ)" align="center" prop="enginePowerMinor1500rpm" />
       <el-table-column label="推荐机组主要功率(1500RPM  50HZ)" align="center" prop="unitPowerMajor1500rpm" />
       <el-table-column label="推荐机组备用功率(1500RPM  50HZ)" align="center" prop="unitPowerMinor1500rpm" />
@@ -373,7 +375,7 @@ emissionStandard">
 
 <script>
 import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, getFieldName } from "@/api/price/engine";
-
+import { mapGetters } from 'vuex'
 export default {
   name: "Info",
   data() {
@@ -437,6 +439,9 @@ export default {
     this.getSearchOption()
     this.getList();
   },
+  computed: {
+    ...mapGetters(['permissions', 'roles', 'tableColumnWidth','tableColumnWidthMedium','tableColumnWidthSamll','tableColumnWidthMini'])
+  },
   methods: {
     getSearchOption() {
       getFieldName('brand').then(response => {

+ 46 - 46
src/views/price/manage/index.vue

@@ -111,62 +111,62 @@
       @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="40" align="center" />
 
-      <el-table-column :width="tableColumnWidth" label="机组型号" align="center" prop="unitModel" />
-      <el-table-column :width="tableColumnWidth" label="机组功率(kw)" align="center" prop="unitPowerKw" />
-      <el-table-column :width="tableColumnWidth" label="机组功率备用(kw)" align="center" prop="unitPowerKwSpare" />
-      <el-table-column :width="tableColumnWidth" label="机组功率(kva)" align="center" prop="unitPowerKva" />
-      <el-table-column :width="tableColumnWidth" label="机组功率备用(kva)" align="center" prop="unitPowerKvaSpare" />
-      <el-table-column :width="tableColumnWidth" label="频率(Hz)" align="center" prop="rate" />
-      <el-table-column :width="tableColumnWidth" label="柴油机型号" align="center" prop="dieselEngineModel" />
-      <el-table-column :width="tableColumnWidth" label="品牌" align="center" prop="brand" />
-      <el-table-column :width="tableColumnWidth" label="转速" align="center" prop="speed" />
-      <el-table-column :width="tableColumnWidth" v-hasPermi="['price:info:list:powerPrice']"
+      <el-table-column fixed :width="tableColumnWidthSmall" label="机组型号" align="center" prop="unitModel" />
+      <el-table-column fixed :width="tableColumnWidthMini" label="机组功率(kw)" align="center" prop="unitPowerKw" />
+      <el-table-column fixed :width="tableColumnWidthMini" label="机组功率备用(kw)" align="center" prop="unitPowerKwSpare" />
+      <el-table-column fixed :width="tableColumnWidthMini" label="机组功率(kva)" align="center" prop="unitPowerKva" />
+      <el-table-column fixed :width="tableColumnWidthMini" label="机组功率备用(kva)" align="center" prop="unitPowerKvaSpare" />
+      <el-table-column :width="tableColumnWidthMini" label="频率(Hz)" align="center" prop="rate" />
+      <el-table-column :width="tableColumnWidthSmall" label="柴油机型号" align="center" prop="dieselEngineModel" />
+      <el-table-column :width="'100px'" label="品牌" align="center" prop="brand" />
+      <el-table-column :width="tableColumnWidthMini" label="转速" align="center" prop="speed" />
+      <el-table-column :width="tableColumnWidthMini" v-hasPermi="['price:info:list:powerPrice']"
         v-if="checkPermissions(['price:info:list:powerPrice'])" label="动力价格" align="center" prop="powerPrice" />
 
-      <el-table-column :width="tableColumnWidth" label="发电机型号(仿斯坦福)" align="center" prop="generatorModelFstf" />
-      <el-table-column :width="tableColumnWidth" label="发电机价格(仿斯坦福)"
+      <el-table-column :width="tableColumnWidthSmall" label="发电机型号(仿斯坦福)" align="center" prop="generatorModelFstf" />
+      <el-table-column :width="tableColumnWidthMini" label="发电机价格(仿斯坦福)"
         v-if="checkPermissions(['price:info:list:generatorPrice'])" v-hasPermi="['price:info:list:generatorPrice']"
         align="center" prop="generatorPriceFstf" />
-      <el-table-column :width="tableColumnWidth" label="发电机型号(利来森马)" align="center" prop="generatorModelLlsm" />
-      <el-table-column :width="tableColumnWidth" label="发电机价格(利来森马)"
+      <el-table-column :width="tableColumnWidthSmall" label="发电机型号(利来森马)" align="center" prop="generatorModelLlsm" />
+      <el-table-column :width="tableColumnWidthMini" label="发电机价格(利来森马)"
         v-if="checkPermissions(['price:info:list:generatorPrice'])" v-hasPermi="['price:info:list:generatorPrice']"
         align="center" prop="generatorPriceLlsm" />
-      <el-table-column :width="tableColumnWidth" label="发电机型号(美迪奥)" align="center" prop="generatorModelMda" />
-      <el-table-column :width="tableColumnWidth" label="发电机价格(美迪奥)"
+      <el-table-column :width="tableColumnWidthSmall" label="发电机型号(美迪奥)" align="center" prop="generatorModelMda" />
+      <el-table-column :width="tableColumnWidthMini" label="发电机价格(美迪奥)"
         v-if="checkPermissions(['price:info:list:generatorPrice'])" v-hasPermi="['price:info:list:generatorPrice']"
         align="center" prop="generatorPriceMda" />
-      <el-table-column :width="tableColumnWidth" label="发电机型号(马拉松)" align="center" prop="generatorModelMls" />
-      <el-table-column :width="tableColumnWidth" label="发电机价格(马拉松)"
+      <el-table-column :width="tableColumnWidthSmall" label="发电机型号(马拉松)" align="center" prop="generatorModelMls" />
+      <el-table-column :width="tableColumnWidthMini" label="发电机价格(马拉松)"
         v-if="checkPermissions(['price:info:list:generatorPrice'])" v-hasPermi="['price:info:list:generatorPrice']"
         align="center" prop="generatorPriceMls" />
-      <el-table-column :width="tableColumnWidth" label="发电机型号(斯坦福)" align="center" prop="generatorModelStf" />
-      <el-table-column :width="tableColumnWidth" label="发电机价格(斯坦福)"
+      <el-table-column :width="tableColumnWidthSmall" label="发电机型号(斯坦福)" align="center" prop="generatorModelStf" />
+      <el-table-column :width="tableColumnWidthMini" label="发电机价格(斯坦福)"
         v-if="checkPermissions(['price:info:list:generatorPrice'])" v-hasPermi="['price:info:list:generatorPrice']"
         align="center" prop="generatorPriceStf" />
 
-      <el-table-column :width="tableColumnWidth"
+      <el-table-column :width="tableColumnWidthMini"
         v-if="computedQuery.accessory == 'mutePrice' && checkPermissions(['price:info:list:mutePrice'])" label="静音机壳价格"
         align="center" v-hasPermi="['price:info:list:mutePrice']" prop="mutePrice" />
 
-      <el-table-column :width="tableColumnWidth"
+      <el-table-column :width="tableColumnWidthMini"
         v-if="computedQuery.accessory == 'openPrice' && checkPermissions(['price:info:list:openPrice'])" label="开架价格"
         align="center" v-hasPermi="['price:info:list:openPrice']" prop="openPrice" />
 
-      <el-table-column :width="tableColumnWidth" v-if="computedQuery.isHaveAst" label="ATS型号" align="center"
+      <el-table-column :width="tableColumnWidthMini" v-if="computedQuery.isHaveAst" label="ATS型号" align="center"
         prop="atsModel" />
-      <el-table-column :width="tableColumnWidth"
+      <el-table-column :width="tableColumnWidthMini"
         v-if="computedQuery.isHaveAst && checkPermissions(['price:info:list:astPrice'])"
         v-hasPermi="['price:info:list:astPrice']" label="ATS价格" align="center" prop="atsPrice" />
-      <el-table-column :width="tableColumnWidth" label="电瓶型号" align="center" prop="batteryModel" />
-      <el-table-column :width="tableColumnWidth" label="电瓶价格" v-hasPermi="['price:info:list:batteryPrice']"
+      <el-table-column :width="tableColumnWidthMini" label="电瓶型号" align="center" prop="batteryModel" />
+      <el-table-column :width="tableColumnWidthMini" label="电瓶价格" v-hasPermi="['price:info:list:batteryPrice']"
         v-if="checkPermissions(['price:info:list:batteryPrice'])" align="center" prop="batteryPrice" />
-      <el-table-column :width="tableColumnWidth" label="控制器型号" align="center" prop="controllerModel">
+      <el-table-column :width="tableColumnWidthMini" label="控制器型号" align="center" prop="controllerModel">
         <template>
           {{ computedQuery.controllerModel }}
 
         </template>
       </el-table-column>
-      <el-table-column :width="tableColumnWidth" v-hasPermi="['price:info:list:controllerPrice']"
+      <el-table-column :width="tableColumnWidthMini" v-hasPermi="['price:info:list:controllerPrice']"
         v-if="checkPermissions(['price:info:list:controllerPrice'])" label="控制器价格" align="center"
         prop="controllerPrice">
         <template>
@@ -176,48 +176,48 @@
       </el-table-column>
 
 
-      <el-table-column :width="tableColumnWidth" label="合计含税成本(仿斯坦福)" align="center" prop="totalCostMuteFstf">
+      <el-table-column :width="tableColumnWidthMini" label="合计含税成本(仿斯坦福)" align="center" prop="totalCostMuteFstf">
         <template slot-scope="scope">
           {{ computedTotalPrice(scope.row, scope.row.generatorPriceFstf) }}
         </template>
       </el-table-column>
-      <el-table-column :width="tableColumnWidth" label="合计含税成本(利来森马)" align="center" prop="totalCostMuteLlsm">
+      <el-table-column :width="tableColumnWidthMini" label="合计含税成本(利来森马)" align="center" prop="totalCostMuteLlsm">
         <template slot-scope="scope">
           {{ computedTotalPrice(scope.row, scope.row.generatorPriceLlsm) }}
         </template>
       </el-table-column>
-      <el-table-column :width="tableColumnWidth" label="合计含税成本(美迪奥)" align="center" prop="totalCostMuteMda">
+      <el-table-column :width="tableColumnWidthMini" label="合计含税成本(美迪奥)" align="center" prop="totalCostMuteMda">
         <template slot-scope="scope">
           {{ computedTotalPrice(scope.row, scope.row.generatorPriceMda) }}
         </template>
       </el-table-column>
-      <el-table-column :width="tableColumnWidth" label="合计含税成本(马拉松)" align="center" prop="totalCostMuteMls">
+      <el-table-column :width="tableColumnWidthMini" label="合计含税成本(马拉松)" align="center" prop="totalCostMuteMls">
         <template slot-scope="scope">
           {{ computedTotalPrice(scope.row, scope.row.generatorPriceMls) }}
         </template>
       </el-table-column>
-      <el-table-column :width="tableColumnWidth" label="合计含税成本(斯坦福)" align="center" prop="totalCostMuteStf">
+      <el-table-column :width="tableColumnWidthMini" label="合计含税成本(斯坦福)" align="center" prop="totalCostMuteStf">
         <template slot-scope="scope">
           {{ computedTotalPrice(scope.row, scope.row.generatorPriceStf) }}
         </template>
       </el-table-column>
-      <el-table-column :width="tableColumnWidth" v-if="computedQuery.accessory == 'openPrice'" label="开架尺寸(长/宽/高/重量)"
+      <el-table-column :width="tableColumnWidthMini" v-if="computedQuery.accessory == 'openPrice'" label="开架尺寸(长/宽/高/重量)"
         align="center" prop="openParms" />
-      <el-table-column :width="tableColumnWidth" v-if="computedQuery.accessory == 'mutePrice'" label="静音尺寸(长/宽/高/重量)"
+      <el-table-column :width="'100px'" v-if="computedQuery.accessory == 'mutePrice'" label="静音尺寸(长/宽/高/重量)"
         align="center" prop="muteParms" />
 
 
 
-      <!-- <el-table-column :width="tableColumnWidth" label="静音尺寸" align="center" prop="muteLong" />
-      <el-table-column :width="tableColumnWidth" label="静音尺寸" align="center" prop="muteWidth" />
-      <el-table-column :width="tableColumnWidth" label="静音尺寸" align="center" prop="muteHigh" />
-      <el-table-column :width="tableColumnWidth" label="开架尺寸" align="center" prop="openLong" />
-      <el-table-column :width="tableColumnWidth" label="开架尺寸" align="center" prop="openWidth" />
-      <el-table-column :width="tableColumnWidth" label="开架尺寸" align="center" prop="openHigh" />
-      <el-table-column :width="tableColumnWidth" label="CKD尺寸" align="center" prop="ckdLong" />
-      <el-table-column :width="tableColumnWidth" label="CKD尺寸" align="center" prop="ckdWidth" />
-      <el-table-column :width="tableColumnWidth" label="CKD尺寸" align="center" prop="ckdHigh" /> -->
-      <el-table-column :width="tableColumnWidth" width="180px" label="操作" align="center"
+      <!-- <el-table-column :width="tableColumnWidthMini" label="静音尺寸" align="center" prop="muteLong" />
+      <el-table-column :width="tableColumnWidthMini" label="静音尺寸" align="center" prop="muteWidth" />
+      <el-table-column :width="tableColumnWidthMini" label="静音尺寸" align="center" prop="muteHigh" />
+      <el-table-column :width="tableColumnWidthMini" label="开架尺寸" align="center" prop="openLong" />
+      <el-table-column :width="tableColumnWidthMini" label="开架尺寸" align="center" prop="openWidth" />
+      <el-table-column :width="tableColumnWidthMini" label="开架尺寸" align="center" prop="openHigh" />
+      <el-table-column :width="tableColumnWidthMini" label="CKD尺寸" align="center" prop="ckdLong" />
+      <el-table-column :width="tableColumnWidthMini" label="CKD尺寸" align="center" prop="ckdWidth" />
+      <el-table-column :width="tableColumnWidthMini" label="CKD尺寸" align="center" prop="ckdHigh" /> -->
+      <el-table-column :width="tableColumnWidthMini" width="180px" label="操作" align="center"
         class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <div style="display:inline-flex">
@@ -488,7 +488,7 @@ export default {
     };
   },
   computed: {
-    ...mapGetters(['permissions', 'roles', 'tableColumnWidth'])
+    ...mapGetters(['permissions', 'roles', 'tableColumnWidth','tableColumnWidthSamll','tableColumnWidthMini'])
   },
   created() {
     this.getControllerList()