|
@@ -1,23 +1,10 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
<!-- 数据表格 -->
|
|
<!-- 数据表格 -->
|
|
|
- <ele-pro-table
|
|
|
|
|
- ref="table"
|
|
|
|
|
- :columns="newColumns"
|
|
|
|
|
- :datasource="datasource"
|
|
|
|
|
- :need-page="true"
|
|
|
|
|
- :selection.sync="selection"
|
|
|
|
|
- :current.sync="rowCurrent"
|
|
|
|
|
- @sort-change="onSortChange"
|
|
|
|
|
- highlight-current-row
|
|
|
|
|
- height="calc(100vh - 412px)"
|
|
|
|
|
- full-height="calc(100vh - 116px)"
|
|
|
|
|
- tool-class="ele-toolbar-form"
|
|
|
|
|
- :page-size="pageSize"
|
|
|
|
|
- @columns-change="handleColumnChange"
|
|
|
|
|
- :cache-key="cacheKeyUrl"
|
|
|
|
|
- v-if="pageShow"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <ele-pro-table ref="table" :columns="newColumns" :datasource="datasource" :need-page="true"
|
|
|
|
|
+ :selection.sync="selection" :current.sync="rowCurrent" @sort-change="onSortChange" highlight-current-row
|
|
|
|
|
+ height="calc(100vh - 412px)" full-height="calc(100vh - 116px)" tool-class="ele-toolbar-form" :page-size="pageSize"
|
|
|
|
|
+ @columns-change="handleColumnChange" :cache-key="cacheKeyUrl" v-if="pageShow">
|
|
|
<!-- 表头工具栏 -->
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:toolbar>
|
|
<template v-slot:toolbar>
|
|
|
<el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon" @click="openEdit({}, 2)">
|
|
<el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon" @click="openEdit({}, 2)">
|
|
@@ -245,6 +232,17 @@ const measureTypeList = [
|
|
|
value: 5
|
|
value: 5
|
|
|
}
|
|
}
|
|
|
];
|
|
];
|
|
|
|
|
+const produceTypeList= [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '加工',
|
|
|
|
|
+ value: 1
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '装配',
|
|
|
|
|
+ value: 3
|
|
|
|
|
+ },
|
|
|
|
|
+];
|
|
|
export default {
|
|
export default {
|
|
|
mixins: [dictMixins, tabMixins],
|
|
mixins: [dictMixins, tabMixins],
|
|
|
|
|
|
|
@@ -279,8 +277,8 @@ export default {
|
|
|
|
|
|
|
|
errorData: [],
|
|
errorData: [],
|
|
|
exportErrorDioalogVisible: false,
|
|
exportErrorDioalogVisible: false,
|
|
|
- pagination:{
|
|
|
|
|
- total: 0
|
|
|
|
|
|
|
+ pagination: {
|
|
|
|
|
+ total: 0
|
|
|
},
|
|
},
|
|
|
bomShow: false,
|
|
bomShow: false,
|
|
|
|
|
|
|
@@ -408,6 +406,17 @@ export default {
|
|
|
)?.label;
|
|
)?.label;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'produceType',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ label: '生产类型',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ formatter: (row, column) => {
|
|
|
|
|
+ return produceTypeList.find(
|
|
|
|
|
+ (item) => item.value == row.produceType
|
|
|
|
|
+ )?.label;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
prop: 'measureType',
|
|
prop: 'measureType',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
@@ -446,6 +455,7 @@ export default {
|
|
|
value: 4
|
|
value: 4
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
|
|
+
|
|
|
newColumns: [],
|
|
newColumns: [],
|
|
|
// 表格选中数据
|
|
// 表格选中数据
|
|
|
selection: [],
|
|
selection: [],
|
|
@@ -472,7 +482,7 @@ export default {
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
|
|
|
onSortChange(e) {
|
|
onSortChange(e) {
|
|
|
- console.log(e,'99999999');
|
|
|
|
|
|
|
+ console.log(e, '99999999');
|
|
|
|
|
|
|
|
let sort = {
|
|
let sort = {
|
|
|
orderBy: e.order,
|
|
orderBy: e.order,
|
|
@@ -483,14 +493,14 @@ export default {
|
|
|
},
|
|
},
|
|
|
getDictValueFn(e) {
|
|
getDictValueFn(e) {
|
|
|
// console.log(e,'3333333333333');
|
|
// console.log(e,'3333333333333');
|
|
|
- if(e.length){
|
|
|
|
|
|
|
+ if (e.length) {
|
|
|
let arr = [];
|
|
let arr = [];
|
|
|
- e.map(v=>{
|
|
|
|
|
|
|
+ e.map(v => {
|
|
|
arr.push(this.findFn(v)?.label);
|
|
arr.push(this.findFn(v)?.label);
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
return arr.join(',');
|
|
return arr.join(',');
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
return '';
|
|
return '';
|
|
|
}
|
|
}
|
|
|
// let a =
|
|
// let a =
|
|
@@ -498,8 +508,8 @@ export default {
|
|
|
// return a?.label||''
|
|
// return a?.label||''
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- findFn(e){
|
|
|
|
|
- return this.sxtList.find((item) => item.value == Number(e))
|
|
|
|
|
|
|
+ findFn(e) {
|
|
|
|
|
+ return this.sxtList.find((item) => item.value == Number(e))
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
toBomManager(row) {
|
|
toBomManager(row) {
|
|
@@ -549,14 +559,14 @@ export default {
|
|
|
},
|
|
},
|
|
|
/* 表格数据源 */
|
|
/* 表格数据源 */
|
|
|
async datasource({ page, limit, where, order }) {
|
|
async datasource({ page, limit, where, order }) {
|
|
|
- let labs= getMaterialList({
|
|
|
|
|
|
|
+ let labs = getMaterialList({
|
|
|
pageNum: page,
|
|
pageNum: page,
|
|
|
size: limit,
|
|
size: limit,
|
|
|
...this.sort,
|
|
...this.sort,
|
|
|
...where,
|
|
...where,
|
|
|
categoryLevelId: this.currentId
|
|
categoryLevelId: this.currentId
|
|
|
});
|
|
});
|
|
|
- let a= await labs;
|
|
|
|
|
|
|
+ let a = await labs;
|
|
|
|
|
|
|
|
return labs;
|
|
return labs;
|
|
|
},
|
|
},
|
|
@@ -658,8 +668,8 @@ export default {
|
|
|
this.rootTreeId == 9
|
|
this.rootTreeId == 9
|
|
|
? '请选择产品!'
|
|
? '请选择产品!'
|
|
|
: this.rootTreeId == 4
|
|
: this.rootTreeId == 4
|
|
|
- ? '请选择设备!'
|
|
|
|
|
- : ''
|
|
|
|
|
|
|
+ ? '请选择设备!'
|
|
|
|
|
+ : ''
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|