bug fix
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
></el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> -->
|
||||
|
||||
<base-dialog v-if="showbasedialog" ref="basedialog" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -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':
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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'] }
|
||||
]
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<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-select>
|
||||
<el-input v-else disabled v-model="bindedEquipmentName" /> </el-form-item
|
||||
|
||||
Reference in New Issue
Block a user