diff --git a/src/components/DialogWithMenu.vue b/src/components/DialogWithMenu.vue index 79b4daa..937cb9b 100644 --- a/src/components/DialogWithMenu.vue +++ b/src/components/DialogWithMenu.vue @@ -24,11 +24,33 @@ @click="handleAddParam()" >+ 添加 + + 上传 - -
+ + + {{ tab.name }} + + +
@@ -60,10 +82,11 @@
-
+
+
附件
@@ -273,6 +296,10 @@ export default { }, /** handlers */ + triggerUpload() { + // 出发 upload 界面 + }, + handleSelectChange(col, eventValue) { console.log("[dialog] select change: ", col, eventValue); }, @@ -326,11 +353,11 @@ export default { } }, handleTabClick(payload) { - // console.log("tab click payload: ", this.activeMenu); - // if (this.activeMenu === this.configs.menu[1].name) { - // // 获取数据 - // this.getSubList(); - // } + // console.log("tab click payload: ", this.activeMenu); + // if (this.activeMenu === this.configs.menu[1].name) { + // // 获取数据 + // this.getSubList(); + // } }, getSubList(page = 1, size = 20) { diff --git a/src/views/modules/pms/equipment/config.js b/src/views/modules/pms/equipment/config.js index 4b8e3d4..b7b0384 100644 --- a/src/views/modules/pms/equipment/config.js +++ b/src/views/modules/pms/equipment/config.js @@ -50,7 +50,7 @@ export default function () { const dialogConfigs = { clickModalToClose: true, - menu: [{ name: '设备信息' }, { name: '设备属性信息', onlyEditMode: true }], + menu: [{ name: '设备信息', key: 'info' }, { name: '设备属性信息', key: 'attr', onlyEditMode: true }], form: { rows: [ [ diff --git a/src/views/modules/pms/material/config.js b/src/views/modules/pms/material/config.js index 4f0ee52..7a38b49 100644 --- a/src/views/modules/pms/material/config.js +++ b/src/views/modules/pms/material/config.js @@ -59,7 +59,7 @@ export default function () { * 此为后者的配置: */ const dialogConfigs = { - menu: [{ name: '混料程序' }, { name: '参数明细', onlyEditMode: true }], + menu: [{ name: '混料程序', key: 'info' }, { name: '参数明细', key: 'attr', onlyEditMode: true }], form: { url: '/pms/blenderStep', rows: [ diff --git a/src/views/modules/pms/product/config.js b/src/views/modules/pms/product/config.js index 9dc3970..cd913b3 100644 --- a/src/views/modules/pms/product/config.js +++ b/src/views/modules/pms/product/config.js @@ -12,7 +12,8 @@ export default function () { { prop: 'typeDictValue', label: '产品类型', filter: dictFilter('product_type') }, { prop: 'specifications', label: '规格' }, { prop: 'unitDictValue', label: '单位', filter: dictFilter('unit') }, - { prop: 'weight', label: '重量(kg)' }, + { prop: 'weight', label: '重量', filter: val => val ? val + ' kg' : '-' }, + { prop: 'processTime', label: '产线完成单位产品用时', width: 200, filter: val => val + ' s' }, { prop: 'remark', label: '备注' }, { prop: 'description', label: '附件信息', subcomponent: TableTextComponent, buttonContent: '查看附件' }, { @@ -52,12 +53,12 @@ export default function () { const dictList = JSON.parse(localStorage.getItem('dictList') || {}) const dialogConfigs = { - menu: [{ name: '产品信息' }, { name: '产品属性信息', onlyEditMode: false }], + menu: [{ name: '产品信息', key: 'info' }, { name: '产品属性信息', key: 'attr', onlyEditMode: true }, { name: '附件', key: 'attachment', onlyEditMode: true}], form: { rows: [ [ { input: true, label: '产品名称/砖型名称', prop: 'name', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称' } }, - { input: true, label: '产品编码/砖型编码', prop: 'code', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } }, + { input: true, label: '产品编码/砖型编码', prop: 'code', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备编码' } }, // { input: true, label: '版本号', prop: 'version', elparams: { placeholder: '请输入版本号' } }, { select: true, @@ -68,15 +69,16 @@ export default function () { }, ], [ - { input: true, label: '规格', prop: 'specifications', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } }, - { input: true, label: '单位平方数', prop: 'code', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } }, + // { input: true, label: '单位平方数', prop: 'code', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } }, { select: true, label: '单位', prop: 'unitDictValue', options: 'unit' in dictList ? dictList['unit'].map(item => ({ value: item.dictValue, label: item.dictLabel })) : [], - elparams: { placeholder: '选择一个产品类型' } + elparams: { placeholder: '选择单位' } }, + { input: true, label: '规格', prop: 'specifications', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入规格' } }, + { input: true, label: '产线完成单位产品用时(s)', prop: 'processTime', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入规格' } }, ], [{ textarea: true, label: '备注', prop: 'remark', elparams: { placeholder: '备注' } }], ], @@ -91,10 +93,11 @@ export default function () { // extraParams: ['stepId'], extraParams: 'productId', props: [ - { prop: 'createTime', label: '创建时间' }, - { prop: 'productId', label: '产品ID' }, - { prop: 'attrName', label: '属性名称', isEditField: true }, - { prop: 'attrValue', label: '属性值', isEditField: true }, + { prop: 'createTime', label: '创建时间', filter: timeFilter }, + // { prop: 'productId', label: '产品ID' }, + { prop: 'name', label: '属性名称', isEditField: true }, + { prop: 'value', label: '属性值', isEditField: true }, + { prop: 'remark', label: '备注', isEditField: true }, { prop: 'operations', name: '操作', @@ -102,8 +105,8 @@ export default function () { width: 120, subcomponent: TableOperaionComponent, options: [ - { name: 'edit', permission: 'pms:product:update' }, - { name: 'delete', permission: 'pms:product:delete' }, + { name: 'edit', permission: 'pms:productArrt:update' }, + { name: 'delete', permission: 'pms:productArrt:delete' }, ] } ], @@ -116,16 +119,16 @@ export default function () { extraParam: 'productId', rows: [ [ - { input: true, label: '属性名称', prop: 'attrName', elparams: { placeholder: '请输入属性名称' } }, - { input: true, label: '属性值', prop: 'attrValue', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入属性值' } }, + { input: true, label: '属性名称', prop: 'name', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入属性名称' } }, + { input: true, label: '属性值', prop: 'value', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入属性值' } }, ], [ { textarea: true, label: '备注', prop: 'remark', elparams: { placeholder: '添加备注' } }, ] ], operations: [ - { name: 'add', label: '保存', type: 'primary', permission: 'pms:product:save', showOnEdit: false }, - { name: 'update', label: '更新', type: 'primary', permission: 'pms:product:update', showOnEdit: true }, + { name: 'add', label: '保存', type: 'primary', permission: 'pms:productArrt:save', showOnEdit: false }, + { name: 'update', label: '更新', type: 'primary', permission: 'pms:productArrt:update', showOnEdit: true }, ], }, }; @@ -143,7 +146,9 @@ export default function () { }, urls: { base: '/pms/product', - page: '/pms/product/page' + page: '/pms/product/page', + subase: '/pms/productArrt', + subpage: '/pms/productArrt/page', } } } \ No newline at end of file