|
|
@@ -62,6 +62,14 @@
|
|
|
>关联备品备件</el-button
|
|
|
>-->
|
|
|
</template>
|
|
|
+
|
|
|
+ <template v-slot:componentAttribute="{ row }">
|
|
|
+ <div>
|
|
|
+ <!-- {{ }} -->
|
|
|
+ {{ getDictValueFn(row.componentAttribute) }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template v-slot:action="{ row }">
|
|
|
<el-link type="primary" :underline="false" @click="openEdit(row, 1)">
|
|
|
复制
|
|
|
@@ -353,17 +361,19 @@ export default {
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: 'produceType',
|
|
|
+ prop: 'componentAttribute',
|
|
|
+ slot: 'componentAttribute',
|
|
|
align: 'center',
|
|
|
label: '属性类型',
|
|
|
showOverflowTooltip: true,
|
|
|
- formatter: (row, column) => {
|
|
|
- return row?.produceType
|
|
|
- ?.map((item) => {
|
|
|
- return this.getDictValueFn(item);
|
|
|
- })
|
|
|
- ?.toString();
|
|
|
- }
|
|
|
+ // formatter: (row, column) => {
|
|
|
+ // return row?.produceType
|
|
|
+ // ?.map((item) => {
|
|
|
+ // {{row}}
|
|
|
+ // return this.getDictValueFn(item);
|
|
|
+ // })
|
|
|
+ // ?.toString();
|
|
|
+ // }
|
|
|
},
|
|
|
{
|
|
|
prop: 'attributeType',
|
|
|
@@ -438,8 +448,24 @@ export default {
|
|
|
|
|
|
methods: {
|
|
|
getDictValueFn(e) {
|
|
|
- console.log(e);
|
|
|
- return this.sxtList[e].label
|
|
|
+ // console.log(e,'3333333333333');
|
|
|
+ if(e.length){
|
|
|
+ let arr = [];
|
|
|
+ e.map(v=>{
|
|
|
+ arr.push(this.findFn(v)?.label);
|
|
|
+ })
|
|
|
+
|
|
|
+ return arr.join(',');
|
|
|
+ }else{
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ // let a =
|
|
|
+
|
|
|
+ // return a?.label||''
|
|
|
+ },
|
|
|
+
|
|
|
+ findFn(e){
|
|
|
+ return this.sxtList.find((item) => item.value == Number(e))
|
|
|
},
|
|
|
|
|
|
toBomManager(row) {
|
|
|
@@ -491,13 +517,17 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
/* 表格数据源 */
|
|
|
- datasource({ page, limit, where, order }) {
|
|
|
- return getMaterialList({
|
|
|
+ async datasource({ page, limit, where, order }) {
|
|
|
+ let labs= getMaterialList({
|
|
|
pageNum: page,
|
|
|
size: limit,
|
|
|
...where,
|
|
|
categoryLevelId: this.currentId
|
|
|
});
|
|
|
+ let a= await labs;
|
|
|
+ console.log(a,'ssssssssssssssssss');
|
|
|
+
|
|
|
+ return labs;
|
|
|
},
|
|
|
/* 刷新表格 */
|
|
|
reload(where) {
|