forked from mt-fe-group/mt-yd-ui
bug fix
This commit is contained in:
parent
1caf68592a
commit
747247aed6
@ -38,7 +38,7 @@
|
|||||||
:disabled="isDetail"
|
:disabled="isDetail"
|
||||||
@change="emitSelectChange(configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name, $event)"
|
@change="emitSelectChange(configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name, $event)"
|
||||||
>
|
>
|
||||||
<el-option v-for="opt in configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].options" :key="opt.label" :label="opt.label" :value="opt.value" />
|
<el-option v-for="opt in configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].options" :key="opt.label+Math.random()" :label="opt.label" :value="opt.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-switch v-if="getType(n, c) === 'switch'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
|
<el-switch v-if="getType(n, c) === 'switch'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
|
||||||
<el-cascader
|
<el-cascader
|
||||||
|
@ -185,14 +185,15 @@ t.prod.code = 'Product Code'
|
|||||||
t.prod.type = 'Product Type'
|
t.prod.type = 'Product Type'
|
||||||
t.prod.area = 'Area'
|
t.prod.area = 'Area'
|
||||||
t.prod.spec = 'Product Specification'
|
t.prod.spec = 'Product Specification'
|
||||||
t.prod.attr = 'Dynamic Attributes'
|
t.prod.attr = 'Attributes'
|
||||||
t.prod.attrcode = 'Attribute Code'
|
t.prod.attrcode = 'Attribute Code'
|
||||||
t.prod.attrcodeHints = 'Please input attribute code'
|
t.prod.attrcodeHints = 'Please input attribute code'
|
||||||
t.prod.attrname = 'Attribute Node'
|
t.prod.attrname = 'Attribute Node'
|
||||||
t.prod.attrnameHints = 'Please input attribute name'
|
t.prod.attrnameHints = 'Please input attribute name'
|
||||||
t.prod.attrvalueHints = 'Please input attribute value'
|
t.prod.attrvalueHints = 'Please input attribute value'
|
||||||
t.prod.descHints = 'Please input description'
|
t.prod.descHints = 'Please input description'
|
||||||
t.prod.processTime = 'Processing Time (Hours)'
|
// t.prod.processTime = 'Processing Time (Hours)'
|
||||||
|
t.prod.processTime = 'Processing Time (s)'
|
||||||
t.prod.processTimeHints = 'Please input processing time'
|
t.prod.processTimeHints = 'Please input processing time'
|
||||||
t.prod.relatedPid = 'Related Product'
|
t.prod.relatedPid = 'Related Product'
|
||||||
|
|
||||||
@ -265,7 +266,8 @@ t.ws.id = 'Work Section ID'
|
|||||||
t.ws.name = 'Work Section Name'
|
t.ws.name = 'Work Section Name'
|
||||||
t.ws.code = 'Work Section Code'
|
t.ws.code = 'Work Section Code'
|
||||||
t.ws.binded = 'Binded Equipments'
|
t.ws.binded = 'Binded Equipments'
|
||||||
t.ws.unbind = 'Please select an equipment to bind.'
|
t.ws.unbind = 'Equipment Name'
|
||||||
|
t.ws.eqbindplaceholder = 'Select an equipment'
|
||||||
t.ws.sort = 'sort'
|
t.ws.sort = 'sort'
|
||||||
t.ws.setorder = 'Please input order of equipments in the work section.'
|
t.ws.setorder = 'Please input order of equipments in the work section.'
|
||||||
t.ws.bind = 'bind'
|
t.ws.bind = 'bind'
|
||||||
|
@ -190,15 +190,17 @@ t.prod.code = '产品编码'
|
|||||||
t.prod.type = '产品类型'
|
t.prod.type = '产品类型'
|
||||||
t.prod.area = '单位平方数'
|
t.prod.area = '单位平方数'
|
||||||
t.prod.spec = '规格'
|
t.prod.spec = '规格'
|
||||||
t.prod.attr = '动态属性'
|
t.prod.attr = '属性'
|
||||||
t.prod.attrcode = '属性编码'
|
t.prod.attrcode = '属性编码'
|
||||||
t.prod.attrcodeHints = '请输入属性编码'
|
t.prod.attrcodeHints = '请输入属性编码'
|
||||||
t.prod.attrname = '属性名称'
|
t.prod.attrname = '属性名称'
|
||||||
t.prod.attrnameHints = '请输入属性名称'
|
t.prod.attrnameHints = '请输入属性名称'
|
||||||
t.prod.attrvalueHints = '请输入属性值'
|
t.prod.attrvalueHints = '请输入属性值'
|
||||||
t.prod.descHints = '请输入描述'
|
t.prod.descHints = '请输入描述'
|
||||||
t.prod.processTime = '加工时间 (h)'
|
// t.prod.processTime = '加工时间 (h)'
|
||||||
t.prod.processTimeHints = '请输入加工时间'
|
t.prod.processTime = '产线完成单位产品用时 (s)'
|
||||||
|
t.prod.processTimeHints = '请输入完成单位产品用时'
|
||||||
|
// t.prod.processTimeHints = '请输入加工时间'
|
||||||
t.prod.relatedPid = '关联产品'
|
t.prod.relatedPid = '关联产品'
|
||||||
|
|
||||||
t.alarm = {}
|
t.alarm = {}
|
||||||
@ -270,7 +272,8 @@ t.ws.id = '工段ID'
|
|||||||
t.ws.name = '工段名称'
|
t.ws.name = '工段名称'
|
||||||
t.ws.code = '工段编码'
|
t.ws.code = '工段编码'
|
||||||
t.ws.binded = '已绑定的设备'
|
t.ws.binded = '已绑定的设备'
|
||||||
t.ws.unbind = '选择一个设备进行绑定'
|
t.ws.unbind = '设备名称'
|
||||||
|
t.ws.eqbindplaceholder = '选择一个设备进行绑定'
|
||||||
t.ws.sort = '排序'
|
t.ws.sort = '排序'
|
||||||
t.ws.setorder = '请输入工段中设备的顺序'
|
t.ws.setorder = '请输入工段中设备的顺序'
|
||||||
t.ws.bind = '绑定'
|
t.ws.bind = '绑定'
|
||||||
|
@ -168,7 +168,7 @@ function fnAddDynamicMenuRoutes(menuList = [], routes = []) {
|
|||||||
// 菜单的国际化
|
// 菜单的国际化
|
||||||
menuList[i].name = i18n.t(`routes["${menuList[i].name}"]`)
|
menuList[i].name = i18n.t(`routes["${menuList[i].name}"]`)
|
||||||
|
|
||||||
console.log('route ===', route.meta.title)
|
// console.log('route ===', route.meta.title)
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
let URL = (menuList[i].url || '').replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)) // URL支持{{ window.xxx }}占位符变量
|
let URL = (menuList[i].url || '').replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)) // URL支持{{ window.xxx }}占位符变量
|
||||||
if (isURL(URL)) {
|
if (isURL(URL)) {
|
||||||
|
@ -114,7 +114,8 @@ export default {
|
|||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.dataList = data.data.list
|
this.dataList = data.data.list
|
||||||
this.totalPage = data.data.totalCount
|
this.totalPage = data.data.total
|
||||||
|
console.log('total page: ', this.totalPage)
|
||||||
} else {
|
} else {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.totalPage = 0
|
this.totalPage = 0
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
></el-pagination>
|
></el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> -->
|
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> -->
|
||||||
|
|
||||||
<base-dialog v-if="showbasedialog" ref="basedialog" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" />
|
<base-dialog v-if="showbasedialog" ref="basedialog" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -52,16 +51,22 @@ const tableConfigs = [
|
|||||||
{ prop: 'code', name: i18n.t('prod.code') },
|
{ prop: 'code', name: i18n.t('prod.code') },
|
||||||
{ prop: 'specifications', name: i18n.t('prod.spec') },
|
{ prop: 'specifications', name: i18n.t('prod.spec') },
|
||||||
{ prop: 'unitDictValue', name: i18n.t('unit'), filter: dictFilter(UnitDictTypeId) },
|
{ 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 = {
|
const addOrUpdateConfigs = {
|
||||||
type: 'dialog', // dialog | drawer | page
|
type: 'dialog', // dialog | drawer | page
|
||||||
infoUrl: '/monitoring/product',
|
infoUrl: '/monitoring/product',
|
||||||
fields: [
|
fields: [
|
||||||
'name',
|
// 'name',
|
||||||
|
{
|
||||||
|
name: 'name'
|
||||||
|
// label: i18n.t('pl.name')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'code',
|
name: 'code',
|
||||||
|
// label: i18n.t('pl.code'),
|
||||||
api: '/monitoring/product/getCode'
|
api: '/monitoring/product/getCode'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -222,6 +227,8 @@ export default {
|
|||||||
// 表格操作事件管理
|
// 表格操作事件管理
|
||||||
handleOperations({ type, data }) {
|
handleOperations({ type, data }) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case 'edit': // <== 对照 tableConfig
|
||||||
|
return this.addOrEdit(data)
|
||||||
case 'viewAttr': // <== 对照 tableConfig
|
case 'viewAttr': // <== 对照 tableConfig
|
||||||
return this.addOrEdit(data)
|
return this.addOrEdit(data)
|
||||||
case 'delete':
|
case 'delete':
|
||||||
|
@ -54,10 +54,12 @@ const addOrUpdateConfigs = {
|
|||||||
type: 'dialog',
|
type: 'dialog',
|
||||||
infoUrl: '/monitoring/productionLine',
|
infoUrl: '/monitoring/productionLine',
|
||||||
fields: [
|
fields: [
|
||||||
'name',
|
// 'name',
|
||||||
{ name: 'code', api: '/monitoring/productionLine/getCode' },
|
{ name: 'name', label: i18n.t('pl.name') },
|
||||||
|
{ name: 'code', label: i18n.t('pl.code'), api: '/monitoring/productionLine/getCode' },
|
||||||
{
|
{
|
||||||
name: 'factoryId',
|
name: 'factoryId',
|
||||||
|
required: true,
|
||||||
label: i18n.t('factory.title'),
|
label: i18n.t('factory.title'),
|
||||||
type: 'select',
|
type: 'select',
|
||||||
placeholder: i18n.t('pl.factoryHints'),
|
placeholder: i18n.t('pl.factoryHints'),
|
||||||
|
@ -45,6 +45,7 @@ const tableConfigs = [
|
|||||||
{ prop: 'name', name: i18n.t('ws.name') },
|
{ prop: 'name', name: i18n.t('ws.name') },
|
||||||
{ prop: 'code', name: i18n.t('ws.code') },
|
{ prop: 'code', name: i18n.t('ws.code') },
|
||||||
{ prop: 'productionLineName', name: i18n.t('pl.title') },
|
{ prop: 'productionLineName', name: i18n.t('pl.title') },
|
||||||
|
{ prop: 'description', name: i18n.t('desc') },
|
||||||
{ prop: 'remark', name: i18n.t('remark') },
|
{ prop: 'remark', name: i18n.t('remark') },
|
||||||
{ 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', 'delete'] }
|
||||||
]
|
]
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="edit ? $t('ws.binded') : $t('ws.unbind')" prop="equipmentId">
|
<el-form-item :label="edit ? $t('ws.binded') : $t('ws.unbind')" prop="equipmentId">
|
||||||
<el-select v-if="!edit" clearable v-model="dataForm.equipmentId">
|
<el-select v-if="!edit" clearable v-model="dataForm.equipmentId" :placeholder="$t('ws.eqbindplaceholder')">
|
||||||
<el-option v-for="eq in eqList" :key="eq.id" :label="eq.name" :value="eq.id" />
|
<el-option v-for="eq in eqList" :key="eq.id" :label="eq.name" :value="eq.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input v-else disabled v-model="bindedEquipmentName" /> </el-form-item
|
<el-input v-else disabled v-model="bindedEquipmentName" /> </el-form-item
|
||||||
|
Loading…
Reference in New Issue
Block a user