test #47
@ -17,6 +17,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="120"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
</base-table>
|
||||
|
@ -17,6 +17,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="120"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
</base-table>
|
||||
|
@ -17,6 +17,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="120"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
</base-table>
|
||||
|
@ -17,6 +17,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="120"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
</base-table>
|
||||
|
@ -59,13 +59,15 @@ const switchBtn = {
|
||||
name: 'SwitchBtn',
|
||||
props: ['injectData'],
|
||||
data() {
|
||||
return {
|
||||
active: +this.injectData[this.injectData.prop] == 1 ? true : false,
|
||||
};
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
active() {
|
||||
return +this.injectData[this.injectData.prop] == 1 ? true : false;
|
||||
},
|
||||
},
|
||||
methods: {},
|
||||
render: function (h) {
|
||||
console.log('render....');
|
||||
return h(
|
||||
'el-switch',
|
||||
{
|
||||
@ -74,8 +76,6 @@ const switchBtn = {
|
||||
},
|
||||
on: {
|
||||
change: (newVal) => {
|
||||
this.active = !this.active;
|
||||
console.log('changed emit', newVal);
|
||||
this.$emit('emitData', {
|
||||
action: 'update-collect',
|
||||
payload: {
|
||||
|
@ -17,6 +17,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="120"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
</base-table>
|
||||
|
@ -17,6 +17,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="120"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
</base-table>
|
||||
|
@ -16,6 +16,7 @@
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
@ -148,7 +149,7 @@ export default {
|
||||
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||
},
|
||||
{ prop: 'name', label: '设备名称' },
|
||||
{ prop: 'code', label: '检测编码' },
|
||||
{ width: 256, prop: 'code', label: '检测编码' },
|
||||
{ prop: 'equipmentType', label: '设备类型' },
|
||||
{ prop: 'enName', label: '英文名称' },
|
||||
{ prop: 'abbr', label: '缩写' },
|
||||
|
@ -17,6 +17,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="120"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
</base-table>
|
||||
|
@ -16,6 +16,7 @@
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
|
@ -230,20 +230,20 @@ export default {
|
||||
this.$set(factory, 'label', factory.name);
|
||||
this.$set(factory, 'type', '工厂');
|
||||
delete factory.name;
|
||||
factory.children = factory.lines;
|
||||
delete factory.lines;
|
||||
// factory.children = factory.lines;
|
||||
// delete factory.lines;
|
||||
factory.children?.forEach((line) => {
|
||||
this.$set(line, 'label', line.name);
|
||||
this.$set(line, 'type', '产线');
|
||||
delete line.name;
|
||||
line.children = line.sections;
|
||||
delete line.sections;
|
||||
// line.children = line.sections;
|
||||
// delete line.sections;
|
||||
line.children?.forEach((ws) => {
|
||||
this.$set(ws, 'label', ws.name);
|
||||
this.$set(ws, 'type', '工段');
|
||||
delete ws.name;
|
||||
ws.children = ws.equipments;
|
||||
delete ws.equipments;
|
||||
// ws.children = ws.equipments;
|
||||
// delete ws.equipments;
|
||||
ws.children?.forEach((eq) => {
|
||||
this.$set(eq, 'label', eq.name);
|
||||
this.$set(eq, 'type', '设备');
|
||||
@ -258,6 +258,7 @@ export default {
|
||||
const { data } = await this.$axios('/base/factory/getTree');
|
||||
this.sidebarContent = data;
|
||||
this.buildTree(data);
|
||||
console.log('tree', this.sidebarContent)
|
||||
},
|
||||
|
||||
handleSidebarItemClick({ label, id, type }) {
|
||||
|
@ -18,6 +18,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="120"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
</base-table>
|
||||
|
@ -17,6 +17,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="120"
|
||||
fixed="right"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
|
@ -17,6 +17,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="120"
|
||||
fixed="right"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
|
@ -17,6 +17,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="120"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
</base-table>
|
||||
|
@ -17,6 +17,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="120"
|
||||
fixed="right"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
|
Loading…
Reference in New Issue
Block a user