diff --git a/src/components/base-dialog/addOrUpdate/index.vue b/src/components/base-dialog/addOrUpdate/index.vue index 0f08321..8f7cd52 100644 --- a/src/components/base-dialog/addOrUpdate/index.vue +++ b/src/components/base-dialog/addOrUpdate/index.vue @@ -38,7 +38,7 @@ :disabled="isDetail" @change="emitSelectChange(configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name, $event)" > - + eval(s2)) // URL支持{{ window.xxx }}占位符变量 if (isURL(URL)) { diff --git a/src/views/modules/monitoring/factory.vue b/src/views/modules/monitoring/factory.vue index 56cecc4..c710561 100644 --- a/src/views/modules/monitoring/factory.vue +++ b/src/views/modules/monitoring/factory.vue @@ -114,7 +114,8 @@ export default { }).then(({ data }) => { if (data && data.code === 0) { this.dataList = data.data.list - this.totalPage = data.data.totalCount + this.totalPage = data.data.total + console.log('total page: ', this.totalPage) } else { this.dataList = [] this.totalPage = 0 diff --git a/src/views/modules/monitoring/product.vue b/src/views/modules/monitoring/product.vue index af66230..6ad338e 100644 --- a/src/views/modules/monitoring/product.vue +++ b/src/views/modules/monitoring/product.vue @@ -25,7 +25,6 @@ > - @@ -52,16 +51,22 @@ const tableConfigs = [ { prop: 'code', name: i18n.t('prod.code') }, { prop: 'specifications', name: i18n.t('prod.spec') }, { prop: 'unitDictValue', name: i18n.t('unit'), filter: dictFilter(UnitDictTypeId) }, - { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['viewAttr', 'delete'] } + { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } + // { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'viewAttr', 'delete'] } ] const addOrUpdateConfigs = { type: 'dialog', // dialog | drawer | page infoUrl: '/monitoring/product', fields: [ - 'name', + // 'name', + { + name: 'name' + // label: i18n.t('pl.name') + }, { name: 'code', + // label: i18n.t('pl.code'), api: '/monitoring/product/getCode' }, { @@ -222,6 +227,8 @@ export default { // 表格操作事件管理 handleOperations({ type, data }) { switch (type) { + case 'edit': // <== 对照 tableConfig + return this.addOrEdit(data) case 'viewAttr': // <== 对照 tableConfig return this.addOrEdit(data) case 'delete': diff --git a/src/views/modules/monitoring/productionLine.vue b/src/views/modules/monitoring/productionLine.vue index c91a572..38916c0 100644 --- a/src/views/modules/monitoring/productionLine.vue +++ b/src/views/modules/monitoring/productionLine.vue @@ -54,10 +54,12 @@ const addOrUpdateConfigs = { type: 'dialog', infoUrl: '/monitoring/productionLine', fields: [ - 'name', - { name: 'code', api: '/monitoring/productionLine/getCode' }, + // 'name', + { name: 'name', label: i18n.t('pl.name') }, + { name: 'code', label: i18n.t('pl.code'), api: '/monitoring/productionLine/getCode' }, { name: 'factoryId', + required: true, label: i18n.t('factory.title'), type: 'select', placeholder: i18n.t('pl.factoryHints'), diff --git a/src/views/modules/monitoring/workShopSection.vue b/src/views/modules/monitoring/workShopSection.vue index a76dc8f..c70dd81 100644 --- a/src/views/modules/monitoring/workShopSection.vue +++ b/src/views/modules/monitoring/workShopSection.vue @@ -45,6 +45,7 @@ const tableConfigs = [ { prop: 'name', name: i18n.t('ws.name') }, { prop: 'code', name: i18n.t('ws.code') }, { prop: 'productionLineName', name: i18n.t('pl.title') }, + { prop: 'description', name: i18n.t('desc') }, { prop: 'remark', name: i18n.t('remark') }, { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } ] diff --git a/src/views/modules/monitoring/workshopSectionDialogAttrForm.vue b/src/views/modules/monitoring/workshopSectionDialogAttrForm.vue index a8b0e67..ac66350 100644 --- a/src/views/modules/monitoring/workshopSectionDialogAttrForm.vue +++ b/src/views/modules/monitoring/workshopSectionDialogAttrForm.vue @@ -5,7 +5,7 @@ - +