12
0

Merge pull request 'update bugs' (#98) from projects/mes-lb into projects/mes-test

Reviewed-on: #98
Dieser Commit ist enthalten in:
g7hoo 2023-11-21 17:03:52 +08:00
Commit 67d639c413
6 geänderte Dateien mit 164 neuen und 78 gelöschten Zeilen

Datei anzeigen

@ -13,11 +13,11 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.4.173:48080'
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
# VUE_APP_BASE_API = 'http://192.168.1.49:48080'
VUE_APP_BASE_API = 'http://192.168.1.8:48082'
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# VUE_APP_BASE_API = 'http://192.168.1.56:48080'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'

Datei anzeigen

@ -31,25 +31,56 @@
<div class="form-part" v-if="section.key == 'base'">
<el-skeleton v-if="!showForm" animated />
<BaseInfoForm
<!-- <BaseInfoForm
key="drawer-dialog-form"
v-if="showForm"
ref="form"
:disabled="mode.includes('detail')"
:dataForm="form"
:rows="formRows" />
:rows="formRows" /> -->
<el-row style="margin-bottom: 24px">
<el-col :span="8">
<div
class="title"
style="font-weight: 700; font-size: 16px; margin: 8px 0">
设备分组名称
</div>
<div class="value" style="font-size: 14px">{{ form.name }}</div>
</el-col>
<el-col :span="8">
<div
class="title"
style="font-weight: 700; font-size: 16px; margin: 8px 0">
设备分组编码
</div>
<div class="value" style="font-size: 14px">
{{ form.code }}
</div>
</el-col>
</el-row>
</div>
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
<div
v-if="section.key == 'attrs'"
style="position: relative; margin-top: 12px">
<div
v-if="!mode.includes('detail')"
style="position: absolute; top: -40px; right: 0">
<el-button @click="handleAddAttr" type="text">
<i class="el-icon-plus"></i>
添加报警
</el-button>
</div>
<base-table
v-loading="attrListLoading"
:table-props="section.props"
:page="attrQuery?.params.pageNo || 1"
:limit="attrQuery?.params.pageSize || 10"
:table-data="list"
:add-button-show="mode.includes('detail') ? null : '添加属性'"
@emitButtonClick="handleAddAttr"
@emitFun="handleEmitFun">
<!-- :add-button-show="mode.includes('detail') ? null : '添加属性'"
@emitButtonClick="handleAddAttr" -->
<method-btn
v-if="section.tableBtn"
slot="handleBtn"
@ -74,14 +105,7 @@
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
编辑
</el-button>
<el-button v-else type="primary" @click="handleCancel">确定</el-button>
<!-- sections的第二项必须是 属性列表 -->
<!-- <el-button
v-if="sections[1].allowAdd"
type="primary"
@click="handleAddAttr">
添加属性
</el-button> -->
<!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> -->
</div>
</div>
@ -226,7 +250,7 @@ export default {
bind: {
//
// disabled: this.mode == 'detail',
disabled: true
disabled: true,
},
};
});

Datei anzeigen

@ -31,25 +31,56 @@
<div class="form-part" v-if="section.key == 'base'">
<el-skeleton v-if="!showForm" animated />
<BaseInfoForm
<!-- <BaseInfoForm
key="drawer-dialog-form"
v-if="showForm"
ref="form"
:disabled="true"
:dataForm="form"
:rows="formRows" />
:rows="formRows" /> -->
<el-row style="margin-bottom: 24px">
<el-col :span="8">
<div
class="title"
style="font-weight: 700; font-size: 16px; margin: 8px 0">
设备分组名称
</div>
<div class="value" style="font-size: 14px">{{ form.name }}</div>
</el-col>
<el-col :span="8">
<div
class="title"
style="font-weight: 700; font-size: 16px; margin: 8px 0">
设备分组编码
</div>
<div class="value" style="font-size: 14px">
{{ form.code }}
</div>
</el-col>
</el-row>
</div>
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
<div
v-if="section.key == 'attrs'"
style="position: relative; margin-top: 12px">
<div
v-if="!mode.includes('detail')"
style="position: absolute; top: -40px; right: 0">
<el-button @click="handleAddAttr" type="text">
<i class="el-icon-plus"></i>
添加属性
</el-button>
</div>
<base-table
v-loading="attrListLoading"
:table-props="section.props"
:page="attrQuery?.params.pageNo || 1"
:limit="attrQuery?.params.pageSize || 10"
:table-data="list"
:add-button-show="mode.includes('detail') ? null : '添加属性'"
@emitButtonClick="handleAddAttr"
@emitFun="handleEmitFun">
<!-- :add-button-show="mode.includes('detail') ? null : '添加属性'"
@emitButtonClick="handleAddAttr" -->
<method-btn
v-if="section.tableBtn"
slot="handleBtn"
@ -74,14 +105,7 @@
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
编辑
</el-button>
<el-button v-else type="primary" @click="handleCancel">确定</el-button>
<!-- sections的第二项必须是 属性列表 -->
<!-- <el-button
v-if="sections[1].allowAdd"
type="primary"
@click="handleAddAttr">
添加属性
</el-button> -->
<!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> -->
</div>
</div>

Datei anzeigen

@ -31,25 +31,58 @@
<div class="form-part" v-if="section.key == 'base'">
<el-skeleton v-if="!showForm" animated />
<BaseInfoForm
<!-- <BaseInfoForm
key="drawer-dialog-form"
v-if="showForm"
ref="form"
:disabled="mode.includes('detail')"
v-model="form"
:rows="formRows" />
:rows="formRows" /> -->
<el-row style="margin-bottom: 24px">
<el-col :span="8">
<div
class="title"
style="font-weight: 700; font-size: 16px; margin: 8px 0">
设备名
</div>
<div class="value" style="font-size: 14px">
{{ form.equipmentName }}
</div>
</el-col>
<el-col :span="8">
<div
class="title"
style="font-weight: 700; font-size: 16px; margin: 8px 0">
关联表名
</div>
<div class="value" style="font-size: 14px">
{{ form.plcTableName }}
</div>
</el-col>
</el-row>
</div>
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
<div
v-if="section.key == 'attrs'"
style="position: relative; margin-top: 12px">
<div
v-if="!mode.includes('detail')"
style="position: absolute; top: -40px; right: 0">
<el-button @click="handleAddAttr" type="text">
<i class="el-icon-plus"></i>
添加属性
</el-button>
</div>
<base-table
v-loading="attrListLoading"
:table-props="section.props"
:page="attrQuery?.params.pageNo || 1"
:limit="attrQuery?.params.pageSize || 10"
:table-data="list"
:add-button-show="mode.includes('detail') ? null : '添加属性'"
@emitButtonClick="handleAddAttr"
@emitFun="handleEmitFun">
<!-- :add-button-show="mode.includes('detail') ? null : '添加属性'"
@emitButtonClick="handleAddAttr" -->
<method-btn
v-if="section.tableBtn"
slot="handleBtn"
@ -74,14 +107,7 @@
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
编辑
</el-button>
<el-button v-else type="primary" @click="handleCancel">确定</el-button>
<!-- sections的第二项必须是 属性列表 -->
<!-- <el-button
v-if="sections[1].allowAdd"
type="primary"
@click="handleAddAttr">
添加属性
</el-button> -->
<!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> -->
</div>
</div>
@ -199,23 +225,22 @@ export default {
label: '设备参数类型',
prop: 'equipment_param_type',
options: [
{ label: '一般参数', value: 1 },
{ label: '工艺参数', value: 2 },
{ label: '报警参数', value: 3 },
],
{ label: '一般参数', value: 1 },
{ label: '工艺参数', value: 2 },
{ label: '报警参数', value: 3 },
],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
{
select: true,
select: true,
label: '生产参数类型',
prop: 'production_param_type',
prop: 'production_param_type',
options: [
{ label: '进片数量', value: 1 },
{ label: '出片数量', value: 2 },
{ label: '破损数量', value: 3 },
{ label: '无类型', value: 4 },
],
{ label: '进片数量', value: 1 },
{ label: '出片数量', value: 2 },
{ label: '破损数量', value: 3 },
{ label: '无类型', value: 4 },
],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],

Datei anzeigen

@ -42,7 +42,7 @@
v-if="open"
ref="form"
v-model="form"
:disabled="mode == 'detail'"
:disabled="mode == 'detail'"
:has-files="true"
:rows="rows" />
</base-dialog>
@ -53,7 +53,7 @@
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import Editor from '@/components/Editor';
import { deleteEqMaintainLog } from '@/api/equipment/base/maintain/record'
import { deleteEqMaintainLog } from '@/api/equipment/base/maintain/record';
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
@ -64,7 +64,6 @@ export default {
data() {
return {
searchBarKeys: [
'maintainPlanId',
'maintainPlanId',
'startTime',
'relatePlan',
@ -190,7 +189,6 @@ export default {
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
{
// TODO:
select: true,
label: '保养人员',
prop: 'maintainWorker',
@ -222,11 +220,10 @@ export default {
},
{},
{
// TODO:
select: true,
label: '所属计划',
prop: 'maintainPlanId',
url: '',
url: '/base/equipment-maintain-plan/page',
bind: {
filterable: true,
clearable: true,
@ -273,9 +270,16 @@ export default {
},
],
// TODO:
[{ label: '保养描述', prop: 'maintenanceDes', subcomponent: Editor, bind: {
'min-height': 192
} }],
[
{
label: '保养描述',
prop: 'maintenanceDes',
subcomponent: Editor,
bind: {
'min-height': 192,
},
},
],
[{ input: true, label: '备注', prop: 'remark' }],
],
//
@ -293,20 +297,26 @@ export default {
//
form: {},
basePath: '/base/equipment-maintain-log',
mode: null
mode: null,
};
},
created() {
this.initSearchBar();
if (this.$route.query) {
this.queryParams.equipmentId = this.$route.query?.equipmentId ?? undefined
this.queryParams.maintainPlanId = this.$route.query?.maintainPlanId ?? undefined
this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined
this.queryParams.startTime = this.$route.query?.createTime ?? undefined
this.searchBarFormConfig[0].defaultSelect = this.$route.query.equipmentId ?? undefined
this.searchBarFormConfig[1].defaultSelect = Number(this.$route.query.maintainPlanId) ?? undefined
this.searchBarFormConfig[2].defaultSelect = this.$route.query?.createTime ?? undefined
this.searchBarFormConfig[3].defaultSelect = Number(this.$route.query.relatePlan) ?? undefined
this.queryParams.equipmentId =
this.$route.query?.equipmentId ?? undefined;
this.queryParams.maintainPlanId =
this.$route.query?.maintainPlanId ?? undefined;
this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined;
this.queryParams.startTime = this.$route.query?.createTime ?? undefined;
this.searchBarFormConfig[0].defaultSelect =
this.$route.query.equipmentId ?? undefined;
this.searchBarFormConfig[1].defaultSelect =
Number(this.$route.query.maintainPlanId) ?? undefined;
this.searchBarFormConfig[2].defaultSelect =
this.$route.query?.createTime ?? undefined;
this.searchBarFormConfig[3].defaultSelect =
Number(this.$route.query.relatePlan) ?? undefined;
}
this.getList();
},
@ -349,7 +359,7 @@ export default {
/** 取消按钮 */
cancel() {
this.open = false;
this.mode = null;
this.mode = null;
this.reset();
},
/** 表单重置 */
@ -399,7 +409,7 @@ export default {
this.info({ id }).then((response) => {
this.form = response.data;
this.open = true;
this.form.maintainWorker = this.form.maintainWorker.split(',')
this.form.maintainWorker = this.form.maintainWorker.split(',');
this.title = '修改保养记录';
});
},
@ -409,7 +419,7 @@ export default {
if (!valid) {
return;
}
this.form.maintainWorker = this.form.maintainWorker.join(',')
this.form.maintainWorker = this.form.maintainWorker.join(',');
//
if (this.form.id != null) {
this.put(this.form).then((response) => {
@ -431,7 +441,9 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否删除设备保养单号为"' + row.maintainOrderNumber + '"的数据项?')
.confirm(
'是否删除设备保养单号为"' + row.maintainOrderNumber + '"的数据项?'
)
.then(function () {
return deleteEqMaintainLog(id);
})
@ -443,7 +455,7 @@ export default {
},
handleDetail({ id }) {
this.reset();
this.mode = 'detail'
this.mode = 'detail';
this.info({ id }).then((response) => {
this.form = response.data;
this.open = true;

Datei anzeigen

@ -19,6 +19,7 @@
ref="form"
:model="dataForm"
label-width="100px"
label-position="top"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="8">
@ -213,7 +214,7 @@ export default {
this.visible = false;
},
goEdit() {
this.isdetail = false;
this.disabled = false;
},
/** 模拟透传 ref */
validate(cb) {