|
@@ -46,7 +46,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
-
|
|
|
+
|
|
|
<el-form-item label-width="auto" label="配件" prop="accessory">
|
|
|
<el-select v-model="computedQuery.accessory">
|
|
|
<el-option key="1" value="mutePrice" label="静音机壳"></el-option>
|
|
@@ -120,34 +120,43 @@
|
|
|
<el-table-column width="100px" label="柴油机型号" align="center" prop="dieselEngineModel" />
|
|
|
<el-table-column label="品牌" align="center" prop="brand" />
|
|
|
<el-table-column label="转速" align="center" prop="speed" />
|
|
|
- <el-table-column v-hasPermi="['price:info:list:powerPrice']" label="动力价格" align="center" prop="powerPrice" />
|
|
|
+ <el-table-column v-hasPermi="['price:info:list:powerPrice']" v-if="checkPermissions(['price:info:list:powerPrice'])" label="动力价格" align="center" prop="powerPrice" />
|
|
|
|
|
|
<el-table-column label="发电机型号(仿斯坦福)" align="center" prop="generatorModelFstf" />
|
|
|
- <el-table-column label="发电机价格(仿斯坦福)" v-hasPermi="['price:info:list:generatorPrice']" align="center" prop="generatorPriceFstf" />
|
|
|
+ <el-table-column label="发电机价格(仿斯坦福)" v-hasPermi="['price:info:list:generatorPrice']" align="center"
|
|
|
+ prop="generatorPriceFstf" />
|
|
|
<el-table-column label="发电机型号(利来森马)" align="center" prop="generatorModelLlsm" />
|
|
|
- <el-table-column label="发电机价格(利来森马)" v-hasPermi="['price:info:list:generatorPrice']" align="center" prop="generatorPriceLlsm" />
|
|
|
+ <el-table-column label="发电机价格(利来森马)" v-hasPermi="['price:info:list:generatorPrice']" align="center"
|
|
|
+ prop="generatorPriceLlsm" />
|
|
|
<el-table-column label="发电机型号(美迪奥)" align="center" prop="generatorModelMda" />
|
|
|
- <el-table-column label="发电机价格(美迪奥)" v-hasPermi="['price:info:list:generatorPrice']" align="center" prop="generatorPriceMda" />
|
|
|
+ <el-table-column label="发电机价格(美迪奥)" v-hasPermi="['price:info:list:generatorPrice']" align="center"
|
|
|
+ prop="generatorPriceMda" />
|
|
|
<el-table-column label="发电机型号(马拉松)" align="center" prop="generatorModelMls" />
|
|
|
- <el-table-column label="发电机价格(马拉松)" v-hasPermi="['price:info:list:generatorPrice']" align="center" prop="generatorPriceMls" />
|
|
|
+ <el-table-column label="发电机价格(马拉松)" v-hasPermi="['price:info:list:generatorPrice']" align="center"
|
|
|
+ prop="generatorPriceMls" />
|
|
|
<el-table-column label="发电机型号(斯坦福)" align="center" prop="generatorModelStf" />
|
|
|
- <el-table-column label="发电机价格(斯坦福)" v-hasPermi="['price:info:list:generatorPrice']" align="center" prop="generatorPriceStf" />
|
|
|
+ <el-table-column label="发电机价格(斯坦福)" v-hasPermi="['price:info:list:generatorPrice']" align="center"
|
|
|
+ prop="generatorPriceStf" />
|
|
|
+
|
|
|
+ <el-table-column v-if="computedQuery.accessory == 'mutePrice'" label="静音机壳价格" align="center"
|
|
|
+ v-hasPermi="['price:info:list:mutePrice']" prop="mutePrice" />
|
|
|
+
|
|
|
+ <el-table-column v-if="computedQuery.accessory == 'openPrice'" label="开架价格" align="center"
|
|
|
+ v-hasPermi="['price:info:list:openPrice']" prop="openPrice" />
|
|
|
|
|
|
- <el-table-column v-if="computedQuery.accessory=='mutePrice'" label="静音机壳价格" align="center" v-hasPermi="['price:info:list:mutePrice']" prop="mutePrice" />
|
|
|
-
|
|
|
- <el-table-column v-if="computedQuery.accessory=='openPrice'" label="开架价格" align="center" v-hasPermi="['price:info:list:openPrice']" prop="openPrice" />
|
|
|
-
|
|
|
<el-table-column v-if="computedQuery.isHaveAst" label="ATS型号" align="center" prop="atsModel" />
|
|
|
- <el-table-column v-if="computedQuery.isHaveAst" v-hasPermi="['price:info:list:astPrice']" label="ATS价格" align="center" prop="atsPrice" />
|
|
|
- <el-table-column label="电瓶型号" align="center" prop="batteryModel" />
|
|
|
- <el-table-column label="电瓶价格" v-hasPermi="['price:info:list:batteryPrice']" align="center" prop="batteryPrice" />
|
|
|
+ <el-table-column v-if="computedQuery.isHaveAst" v-hasPermi="['price:info:list:astPrice']" label="ATS价格"
|
|
|
+ align="center" prop="atsPrice" />
|
|
|
+ <el-table-column label="电瓶型号" align="center" prop="batteryModel" />
|
|
|
+ <el-table-column label="电瓶价格" v-hasPermi="['price:info:list:batteryPrice']" align="center" prop="batteryPrice" />
|
|
|
<el-table-column label="控制器型号" align="center" prop="controllerModel">
|
|
|
<template>
|
|
|
{{ computedQuery.controllerModel }}
|
|
|
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-hasPermi="['price:info:list:controllerPrice']" label="控制器价格" align="center" prop="controllerPrice">
|
|
|
+ <el-table-column v-hasPermi="['price:info:list:controllerPrice']" label="控制器价格" align="center"
|
|
|
+ prop="controllerPrice">
|
|
|
<template>
|
|
|
{{ computedQuery.controllerPrice }}
|
|
|
|
|
@@ -180,9 +189,11 @@
|
|
|
{{ computedTotalPrice(scope.row, scope.row.generatorPriceStf) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-if="computedQuery.accessory=='openPrice'" label="开架尺寸(长/宽/高/重量)" align="center" prop="openParms" />
|
|
|
- <el-table-column v-if="computedQuery.accessory=='mutePrice'" label="静音尺寸(长/宽/高/重量)" align="center" prop="muteParms" />
|
|
|
-
|
|
|
+ <el-table-column v-if="computedQuery.accessory == 'openPrice'" label="开架尺寸(长/宽/高/重量)" align="center"
|
|
|
+ prop="openParms" />
|
|
|
+ <el-table-column v-if="computedQuery.accessory == 'mutePrice'" label="静音尺寸(长/宽/高/重量)" align="center"
|
|
|
+ prop="muteParms" />
|
|
|
+
|
|
|
|
|
|
|
|
|
<!-- <el-table-column label="静音尺寸" align="center" prop="muteLong" />
|
|
@@ -347,7 +358,7 @@
|
|
|
import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, getFieldName } from "@/api/price/manage";
|
|
|
import { listInfo as controllerListInfo } from "@/api/price/controller";
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
-import {mapGetters} from 'vuex'
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
let computedQuery = {
|
|
|
accessory: "mutePrice",
|
|
|
isHaveAst: true,
|
|
@@ -369,7 +380,7 @@ export default {
|
|
|
name: "Info",
|
|
|
data() {
|
|
|
return {
|
|
|
-
|
|
|
+
|
|
|
controllerModel: "",
|
|
|
controllerPrice: 0,
|
|
|
token: getToken(),
|
|
@@ -464,7 +475,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['permissions','roles'])
|
|
|
+ ...mapGetters(['permissions', 'roles'])
|
|
|
},
|
|
|
created() {
|
|
|
this.getControllerList()
|
|
@@ -472,15 +483,33 @@ export default {
|
|
|
this.getSearchOption()
|
|
|
},
|
|
|
methods: {
|
|
|
- checkPermissions(){
|
|
|
+ //检查用户是否可以看
|
|
|
+ checkPermissions(permissions) {
|
|
|
+ let res = false
|
|
|
//管理员权限完整
|
|
|
- if(this.roles.includes('admin')){
|
|
|
+ if (this.roles.includes('admin')) {
|
|
|
+
|
|
|
return true
|
|
|
}
|
|
|
- else{
|
|
|
+ else {
|
|
|
+ if (Array.isArray(permissions)) {
|
|
|
+ res = permissions.every(item => {
|
|
|
+ return this.permissions.includes(item)
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ res = this.permissions.includes(permissions)
|
|
|
+
|
|
|
+ }
|
|
|
+ return res
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
},
|
|
|
|