test #47

Merged
gtz217 merged 273 commits from test into master 2023-10-17 08:53:54 +08:00
16 changed files with 28 additions and 13 deletions
Showing only changes of commit a6d8a7a9da - Show all commits

View File

@ -17,6 +17,7 @@
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:width="120"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />
</base-table> </base-table>

View File

@ -17,6 +17,7 @@
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:width="120"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />
</base-table> </base-table>

View File

@ -17,6 +17,7 @@
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:width="120"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />
</base-table> </base-table>

View File

@ -17,6 +17,7 @@
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:width="120"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />
</base-table> </base-table>

View File

@ -59,13 +59,15 @@ const switchBtn = {
name: 'SwitchBtn', name: 'SwitchBtn',
props: ['injectData'], props: ['injectData'],
data() { data() {
return { return {};
active: +this.injectData[this.injectData.prop] == 1 ? true : false, },
}; computed: {
active() {
return +this.injectData[this.injectData.prop] == 1 ? true : false;
},
}, },
methods: {}, methods: {},
render: function (h) { render: function (h) {
console.log('render....');
return h( return h(
'el-switch', 'el-switch',
{ {
@ -74,8 +76,6 @@ const switchBtn = {
}, },
on: { on: {
change: (newVal) => { change: (newVal) => {
this.active = !this.active;
console.log('changed emit', newVal);
this.$emit('emitData', { this.$emit('emitData', {
action: 'update-collect', action: 'update-collect',
payload: { payload: {

View File

@ -17,6 +17,7 @@
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:width="120"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />
</base-table> </base-table>

View File

@ -17,6 +17,7 @@
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:width="120"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />
</base-table> </base-table>

View File

@ -16,6 +16,7 @@
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
:width="120"
label="操作" label="操作"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />
@ -148,7 +149,7 @@ export default {
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{ prop: 'name', label: '设备名称' }, { prop: 'name', label: '设备名称' },
{ prop: 'code', label: '检测编码' }, { width: 256, prop: 'code', label: '检测编码' },
{ prop: 'equipmentType', label: '设备类型' }, { prop: 'equipmentType', label: '设备类型' },
{ prop: 'enName', label: '英文名称' }, { prop: 'enName', label: '英文名称' },
{ prop: 'abbr', label: '缩写' }, { prop: 'abbr', label: '缩写' },

View File

@ -17,6 +17,7 @@
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:width="120"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />
</base-table> </base-table>

View File

@ -16,6 +16,7 @@
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
:width="120"
label="操作" label="操作"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />

View File

@ -230,20 +230,20 @@ export default {
this.$set(factory, 'label', factory.name); this.$set(factory, 'label', factory.name);
this.$set(factory, 'type', '工厂'); this.$set(factory, 'type', '工厂');
delete factory.name; delete factory.name;
factory.children = factory.lines; // factory.children = factory.lines;
delete factory.lines; // delete factory.lines;
factory.children?.forEach((line) => { factory.children?.forEach((line) => {
this.$set(line, 'label', line.name); this.$set(line, 'label', line.name);
this.$set(line, 'type', '产线'); this.$set(line, 'type', '产线');
delete line.name; delete line.name;
line.children = line.sections; // line.children = line.sections;
delete line.sections; // delete line.sections;
line.children?.forEach((ws) => { line.children?.forEach((ws) => {
this.$set(ws, 'label', ws.name); this.$set(ws, 'label', ws.name);
this.$set(ws, 'type', '工段'); this.$set(ws, 'type', '工段');
delete ws.name; delete ws.name;
ws.children = ws.equipments; // ws.children = ws.equipments;
delete ws.equipments; // delete ws.equipments;
ws.children?.forEach((eq) => { ws.children?.forEach((eq) => {
this.$set(eq, 'label', eq.name); this.$set(eq, 'label', eq.name);
this.$set(eq, 'type', '设备'); this.$set(eq, 'type', '设备');
@ -258,6 +258,7 @@ export default {
const { data } = await this.$axios('/base/factory/getTree'); const { data } = await this.$axios('/base/factory/getTree');
this.sidebarContent = data; this.sidebarContent = data;
this.buildTree(data); this.buildTree(data);
console.log('tree', this.sidebarContent)
}, },
handleSidebarItemClick({ label, id, type }) { handleSidebarItemClick({ label, id, type }) {

View File

@ -18,6 +18,7 @@
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:width="120"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />
</base-table> </base-table>

View File

@ -17,6 +17,7 @@
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:width="120"
fixed="right" fixed="right"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />

View File

@ -17,6 +17,7 @@
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:width="120"
fixed="right" fixed="right"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />

View File

@ -17,6 +17,7 @@
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:width="120"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />
</base-table> </base-table>

View File

@ -17,6 +17,7 @@
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:width="120"
fixed="right" fixed="right"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />