Merge pull request '自测bug' (#421) from projects/mes-zjl into projects/mes-test

Reviewed-on: #421
This commit is contained in:
朱菊兰 2025-02-18 08:50:15 +08:00
commit d49a698136
18 changed files with 51 additions and 57 deletions

View File

@ -18,7 +18,7 @@ VUE_APP_BASE_API = 'http://mes2.kszny.picaiba.com'
# 积木报表指向地址 # 积木报表指向地址
VUE_APP_JIMU_API = 'http://192.168.0.33:48082' VUE_APP_JIMU_API = 'http://mes2.kszny.picaiba.com'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -89,6 +89,7 @@ export const DICT_TYPE = {
// ============== ENERGY - 能源模块 ============= // ============== ENERGY - 能源模块 =============
ENERGY_UNIT: 'energy_unit', ENERGY_UNIT: 'energy_unit',
ENERGY_TYPE: 'energy_type',
EQU_ALARM_LEVEL: 'equ_alarm_level', EQU_ALARM_LEVEL: 'equ_alarm_level',
MONITOR_INDEX_TYPE: 'monitor_index_type', MONITOR_INDEX_TYPE: 'monitor_index_type',
OBJECT_TYPE: 'object_type', OBJECT_TYPE: 'object_type',

View File

@ -92,7 +92,8 @@ export default {
type: 'select', type: 'select',
label: '能源类型', label: '能源类型',
selectOptions: [], selectOptions: [],
param: 'energyTypeId' param: 'energyTypeId',
clearable: false
}, },
{ {
type: 'select', type: 'select',
@ -162,7 +163,6 @@ export default {
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260) this.tableH = this.tableHeight(260)
}) })
this.getList();
this.getTypeList() this.getTypeList()
// //
this.getObjTree() this.getObjTree()
@ -171,7 +171,10 @@ export default {
getTypeList() { getTypeList() {
getEnergyTypeListAll().then((res) => { getEnergyTypeListAll().then((res) => {
this.formConfig[0].selectOptions = res.data || [] this.formConfig[0].selectOptions = res.data || []
this.formConfig[0].defaultSelect = res.data[0].id
this.queryParams.energyTypeId = res.data[0].id
this.energyTypeList = res.data || [] this.energyTypeList = res.data || []
this.getList();
}) })
}, },
buttonClick(val) { buttonClick(val) {

View File

@ -82,6 +82,7 @@ export default {
init(param) { init(param) {
this.form.connectId = param.connectId this.form.connectId = param.connectId
getEnergyTypeListAll().then((res) => { getEnergyTypeListAll().then((res) => {
console.log(res)
this.energyListType = res.data || [] this.energyListType = res.data || []
}) })
if (param.id) { if (param.id) {

View File

@ -37,7 +37,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width='30%' width='50%'
> >
<energy-plc-connect-add ref="energyPlcConnect" :objList="objList" @successSubmit="successSubmit" /> <energy-plc-connect-add ref="energyPlcConnect" :objList="objList" @successSubmit="successSubmit" />
</base-dialog> </base-dialog>
@ -60,7 +60,8 @@ const tableProps = [
}, },
{ {
prop: 'objCode', prop: 'objCode',
label: '对象编码' label: '对象编码',
minWidth: 160,
}, },
{ {
prop: 'plcTableName', prop: 'plcTableName',
@ -69,7 +70,8 @@ const tableProps = [
{ {
prop: 'plcTableCode', prop: 'plcTableCode',
label: '关联表编码', label: '关联表编码',
showOverflowtooltip: true showOverflowtooltip: true,
minWidth: 160,
}, },
{ {
prop: 'cnName', prop: 'cnName',

View File

@ -60,7 +60,8 @@ export default {
name: '', name: '',
code: '', code: '',
type: '', type: '',
energyTypeId: '' energyTypeId: '',
remark: ''
}, },
plcList: [], plcList: [],
objList: [], objList: [],

View File

@ -16,7 +16,7 @@
type="text" type="text"
class="tableInnerButton" class="tableInnerButton"
@click="showInnerTable(injectData)" @click="showInnerTable(injectData)"
>详情</el-button >价格详情</el-button
> >
</el-popover> </el-popover>
</template> </template>

View File

@ -3,7 +3,14 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="能源类型" prop="name"> <el-form-item label="能源类型" prop="name">
<el-input v-model="form.name"></el-input> <el-select v-model="form.name" placeholder="请选择" style="width: 100%;">
<el-option
v-for="item in getDictDatas(DICT_TYPE.ENERGY_TYPE)"
:key="item.value"
:label="item.label"
:value="item.label">
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">

View File

@ -80,10 +80,14 @@ export default {
return { return {
formConfig: [ formConfig: [
{ {
type: 'input', type: 'select',
label: '能源类型', label: '能源类型',
selectOptions: this.getDictDatas(this.DICT_TYPE.ENERGY_TYPE),
placeholder: '能源类型', placeholder: '能源类型',
param: 'name' labelField: 'label',
valueField: 'label',
param: 'name',
flilterable: true
}, },
{ {
type: 'button', type: 'button',

View File

@ -219,6 +219,7 @@ export default {
getTypeList() { getTypeList() {
getEnergyTypeListAll().then((res) => { getEnergyTypeListAll().then((res) => {
this.energyTypeList = res.data || [] this.energyTypeList = res.data || []
this.queryParams.energyTypeId = res.data[0].id
}) })
}, },
// //

View File

@ -205,6 +205,7 @@ export default {
getTypeList() { getTypeList() {
getEnergyTypeListAll().then((res) => { getEnergyTypeListAll().then((res) => {
this.energyTypeList = res.data || []; this.energyTypeList = res.data || [];
this.queryParams.energyTypeId = res.data[0].id
}); });
}, },
getObjTree() { getObjTree() {

View File

@ -83,13 +83,7 @@
</el-table> </el-table>
<!-- 添加或修改菜单对话框 --> <!-- 添加或修改菜单对话框 -->
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog"> <base-dialog :dialogVisible="open" :dialogTitle="title" width="800px" class="dialog" :before-close='cancel'>
<template #title>
<slot name="title">
<div class="titleStyle">{{ title }}</div>
</slot>
</template>
<slot />
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@ -163,7 +157,7 @@
<el-button class="btnTextStyle" @click="cancel"> </el-button> <el-button class="btnTextStyle" @click="cancel"> </el-button>
<el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button> <el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button>
</div> </div>
</el-dialog> </base-dialog>
</div> </div>
</template> </template>

View File

@ -57,13 +57,7 @@
@pagination="getList"/> @pagination="getList"/>
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog"> <base-dialog :dialogTitle="title" :dialogVisible="open" :before-close="cancel" width="800px" class="dialog">
<template #title>
<slot name="title">
<div class="titleStyle">{{ title }}</div>
</slot>
</template>
<slot />
<el-form ref="form" :model="form" :rules="rules" label-width="90px"> <el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-form-item label="字典类型"> <el-form-item label="字典类型">
<el-input v-model="form.dictType" :disabled="true" /> <el-input v-model="form.dictType" :disabled="true" />
@ -98,7 +92,7 @@
<el-button class="btnTextStyle" @click="cancel"> </el-button> <el-button class="btnTextStyle" @click="cancel"> </el-button>
<el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button> <el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button>
</div> </div>
</el-dialog> </base-dialog>
</div> </div>
</template> </template>
@ -132,7 +126,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 20,
dictName: undefined, dictName: undefined,
dictType: undefined, dictType: undefined,
status: undefined status: undefined

View File

@ -60,13 +60,7 @@
@pagination="getList"/> @pagination="getList"/>
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog"> <base-dialog :dialogTitle="title" :dialogVisible="open" :before-close="cancel" width="800px" class="dialog">
<template #title>
<slot name="title">
<div class="titleStyle">{{ title }}</div>
</slot>
</template>
<slot />
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典名称" prop="name"> <el-form-item label="字典名称" prop="name">
<el-input v-model="form.name" placeholder="请输入字典名称" /> <el-input v-model="form.name" placeholder="请输入字典名称" />
@ -87,7 +81,7 @@
<el-button class="btnTextStyle" @click="cancel"> </el-button> <el-button class="btnTextStyle" @click="cancel"> </el-button>
<el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button> <el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button>
</div> </div>
</el-dialog> </base-dialog>
</div> </div>
</template> </template>
@ -118,7 +112,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 20,
name: undefined, name: undefined,
type: undefined, type: undefined,
status: undefined, status: undefined,

View File

@ -88,13 +88,7 @@
</el-table> </el-table>
<!-- 添加或修改菜单对话框 --> <!-- 添加或修改菜单对话框 -->
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog"> <base-dialog :dialogTitle="title" :dialogVisible="open" width="800px" class="dialog" :before-close="cancel">
<template #title>
<slot name="title">
<div class="titleStyle">{{ title }}</div>
</slot>
</template>
<slot />
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@ -276,7 +270,7 @@
<el-button class="btnTextStyle" @click="cancel"> </el-button> <el-button class="btnTextStyle" @click="cancel"> </el-button>
<el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button> <el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button>
</div> </div>
</el-dialog> </base-dialog>
</div> </div>
</template> </template>

View File

@ -54,13 +54,7 @@
@pagination="getList"/> @pagination="getList"/>
<!-- 添加或修改岗位对话框 --> <!-- 添加或修改岗位对话框 -->
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog"> <base-dialog :dialogTitle="title" :dialogVisible="open" width="800px" class="dialog" :before-close="cancel">
<template #title>
<slot name="title">
<div class="titleStyle">{{ title }}</div>
</slot>
</template>
<slot />
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="岗位名称" prop="name"> <el-form-item label="岗位名称" prop="name">
<el-input v-model="form.name" placeholder="请输入岗位名称" /> <el-input v-model="form.name" placeholder="请输入岗位名称" />
@ -85,7 +79,7 @@
<el-button class="btnTextStyle" @click="cancel"> </el-button> <el-button class="btnTextStyle" @click="cancel"> </el-button>
<el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button> <el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button>
</div> </div>
</el-dialog> </base-dialog>
</div> </div>
</template> </template>
@ -116,7 +110,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 20,
code: undefined, code: undefined,
name: undefined, name: undefined,
status: undefined status: undefined

View File

@ -151,7 +151,6 @@ export default {
? { ? {
type: 'dataAuth', type: 'dataAuth',
btnName: '数据权限', btnName: '数据权限',
// showTip: "",
} }
: undefined, : undefined,
this.$auth.hasPermi('system:role:update') this.$auth.hasPermi('system:role:update')

View File

@ -68,7 +68,7 @@
</el-row> </el-row>
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%"> <base-dialog :dialogTitle="title" :dialogVisible="open" width="50%" :before-close="cancel">
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
@ -180,6 +180,7 @@
<base-dialog <base-dialog
:dialogTitle="upload.title" :dialogTitle="upload.title"
:dialogVisible="upload.open" :dialogVisible="upload.open"
:before-close="cancelImport"
width="400px"> width="400px">
<el-upload <el-upload
ref="upload" ref="upload"
@ -219,7 +220,7 @@
</base-dialog> </base-dialog>
<!-- 分配角色 --> <!-- 分配角色 -->
<base-dialog dialogTitle="分配角色" :dialogVisible="openRole" width="500px"> <base-dialog dialogTitle="分配角色" :dialogVisible="openRole" width="500px" :before-close='cancelRole'>
<el-form :model="form" label-width="80px"> <el-form :model="form" label-width="80px">
<el-form-item label="用户名称"> <el-form-item label="用户名称">
<el-input v-model="form.username" :disabled="true" /> <el-input v-model="form.username" :disabled="true" />
@ -628,6 +629,9 @@ export default {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
cancelImport() {
this.upload.open = false;
},
// //
cancelRole() { cancelRole() {
this.openRole = false; this.openRole = false;