diff --git a/src/views/productionSchedulingPlan/basic/nonSameFurnace.vue b/src/views/productionSchedulingPlan/basic/nonSameFurnace.vue index 4859df10..7f0527c0 100644 --- a/src/views/productionSchedulingPlan/basic/nonSameFurnace.vue +++ b/src/views/productionSchedulingPlan/basic/nonSameFurnace.vue @@ -211,7 +211,7 @@ export default { }, { label: '生产厂家', - prop: 'factory', + prop: 'producter', search: false, sortable: 'custom', span: 12, @@ -286,7 +286,7 @@ export default { }, { label: '生产标识', - prop: 'productionIdent', + prop: 'productIdent', search: false, sortable: 'custom', span: 12, @@ -299,7 +299,7 @@ export default { }, { label: '结构/单件面积', - prop: 'singleArea', + prop: 'structure', search: false, sortable: 'custom', span: 12, diff --git a/src/views/productionSchedulingPlan/basic/oemProcess.vue b/src/views/productionSchedulingPlan/basic/oemProcess.vue index 8fa35bb4..4a2f5f62 100644 --- a/src/views/productionSchedulingPlan/basic/oemProcess.vue +++ b/src/views/productionSchedulingPlan/basic/oemProcess.vue @@ -18,7 +18,7 @@ @refresh-change="refreshChange" @on-load="onLoad" :before-open="beforeOpen" - + @sort-change="sortChange" > @@ -37,6 +37,7 @@ import { updateOutsourceProcess, getDetailOutsourceProcess } from '@/api/productionSchedulingPlan/basic'; +import { mapGetters } from 'vuex'; export default { components: {}, data() { @@ -64,10 +65,10 @@ export default { border: true, index: true, selection: false, - addBtn: true, - editBtn: true, + addBtn: false, + editBtn: false, viewBtn: false, - delBtn: true, + delBtn: false, editBtnText: '修改', labelWidth: 120, menuWidth: 120, @@ -96,7 +97,7 @@ export default { label: '工序', prop: 'processIds', search: false, - sortable: true, + sortable: 'custom', span: 12, type: 'select', filterable: true, @@ -122,7 +123,7 @@ export default { label: '工序', prop: 'processName', search: false, - sortable: true, + sortable: 'custom', span: 12, display: false, }, @@ -130,7 +131,7 @@ export default { label: '天数', prop: 'days', search: false, - sortable: true, + sortable: 'custom', span: 12, type: 'number', precision: 0, @@ -146,7 +147,7 @@ export default { label: '备注', prop: 'remarks', search: false, - sortable: true, + sortable: 'custom', span: 12, }, ], @@ -155,7 +156,28 @@ export default { data: [], }; }, + computed:{ + ...mapGetters(['permission']), + }, + created(){ + console.log('this.permission',this.permission) + this.option.addBtn = this.permission.oemProcess_add ? true : false; + this.option.editBtn = this.permission.oemProcess_edit ? true : false; + this.option.delBtn = this.permission.oemProcess_delete ? true : false; + }, methods: { + // 表格排序 + sortChange({ prop, order }) { + console.log('prop----------',prop) + console.log('order----------',order) + this.query.ascs = undefined; + this.query.descs = undefined; + const orderByFieldKey = order === 'ascending' ? 'ascs' : 'descs'; + const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); + this.query[orderByFieldKey] = orderByField; + // // 重新加载数据 + this.onLoad(this.page, this.query); + }, beforeOpen(done, type) { if (['edit'].includes(type)) { getDetailOutsourceProcess({id:this.form.id}).then(res => { diff --git a/src/views/productionSchedulingPlan/basic/sintTempCurve.vue b/src/views/productionSchedulingPlan/basic/sintTempCurve.vue index 8874e91b..cb3d9cf2 100644 --- a/src/views/productionSchedulingPlan/basic/sintTempCurve.vue +++ b/src/views/productionSchedulingPlan/basic/sintTempCurve.vue @@ -18,6 +18,7 @@ @refresh-change="refreshChange" @on-load="onLoad" :before-open="beforeOpen" + @sort-change="sortChange" > @@ -35,6 +36,7 @@ import { addSintTempCurve, updateSintTempCurve, } from '@/api/productionSchedulingPlan/basic'; +import { mapGetters } from 'vuex'; export default { components: {}, data() { @@ -55,17 +57,17 @@ export default { calcHeight: 32, simplePage: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 18, searchIcon: true, searchIndex: 3, tree: false, border: true, index: true, selection: false, - addBtn: true, - editBtn: true, + addBtn: false, + editBtn: false, viewBtn: false, - delBtn: true, + delBtn: false, editBtnText: '修改', labelWidth: 120, menuWidth: 120, @@ -83,6 +85,7 @@ export default { editBtnIcon: ' ', gridBtn: false, searchLabelPosition: 'left', + searchLabelWidth: 'auto', searchGutter: 24, searchSpan: 6, menuAlign: 'left', @@ -94,7 +97,7 @@ export default { label: '工序', prop: 'processId', search: true, - sortable: true, + sortable: 'custom', span: 12, type: 'select', filterable: true, @@ -118,7 +121,7 @@ export default { label: '工序', prop: 'processName', search: false, - sortable: true, + sortable: 'custom', span: 12, hide: true, display: false, @@ -127,7 +130,7 @@ export default { label: '设备名称', prop: 'equipName', search: false, - sortable: true, + sortable: 'custom', span: 12, rules: [ { @@ -142,7 +145,7 @@ export default { label: '设备分类', prop: 'equipType', search: false, - sortable: true, + sortable: 'custom', span: 12, type: 'select', rules: [ @@ -167,7 +170,7 @@ export default { label: '玻璃粉牌号', prop: 'glassCode', search: false, - sortable: true, + sortable: 'custom', span: 12, rules: [ { @@ -182,7 +185,7 @@ export default { label: '设定温度', prop: 'temperature', search: false, - sortable: true, + sortable: 'custom', span: 12, rules: [ { @@ -197,7 +200,7 @@ export default { label: '备注', prop: 'remarks', search: false, - sortable: true, + sortable: 'custom', span: 12, }, @@ -207,7 +210,28 @@ export default { data: [], }; }, + computed:{ + ...mapGetters(['permission']), + }, + created(){ + console.log('this.permission',this.permission) + this.option.addBtn = this.permission.sintTempCurve_add ? true : false; + this.option.editBtn = this.permission.sintTempCurve_edit ? true : false; + this.option.delBtn = this.permission.sintTempCurve_delete ? true : false; + }, methods: { + // 表格排序 + sortChange({ prop, order }) { + console.log('prop----------',prop) + console.log('order----------',order) + this.query.ascs = undefined; + this.query.descs = undefined; + const orderByFieldKey = order === 'ascending' ? 'ascs' : 'descs'; + const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); + this.query[orderByFieldKey] = orderByField; + // // 重新加载数据 + this.onLoad(this.page, this.query); + }, beforeOpen(done, type) { if (['edit', 'view'].includes(type)) { this.form.processId = this.form.processId+''