projects/mes-test #133

Merged
gtz217 merged 281 commits from projects/mes-test into projects/mes 2023-11-30 09:11:34 +08:00
2 changed files with 50 additions and 30 deletions
Showing only changes of commit 2fdee9cafd - Show all commits

View File

@ -124,9 +124,9 @@ export default {
this.Quill = new Quill(editor, this.options); this.Quill = new Quill(editor, this.options);
// start // start
this.$nextTick(() => { this.$nextTick(() => {
this.Quill.blur(); this.Quill?.blur();
if (!this.readOnly) { if (!this.readOnly) {
this.Quill.enable(); this.Quill?.enable();
} }
}); });
// //

View File

@ -7,27 +7,30 @@
--> -->
<template> <template>
<div class="alarm-handle"> <div class="alarm-handle">
<DialogForm <el-skeleton v-if="loading" />
ref="orderForm" <div v-else>
key="orderForm" <DialogForm
v-model="orderForm" ref="orderForm"
:disabled="readOnly" key="orderForm"
:has-files="false" v-model="orderForm"
label-position="top" :disabled="readOnly"
:rows="orderFormRows" /> :has-files="false"
label-position="top"
:rows="orderFormRows" />
<small-title style="margin: 16px 0" :no-padding="true" size="sm"> <small-title style="margin: 16px 0" :no-padding="true" size="sm">
处理方式 处理方式
</small-title> </small-title>
<DialogForm <DialogForm
key="handleMethodForm" key="handleMethodForm"
ref="handleMethodForm" ref="handleMethodForm"
v-model="handleMethodForm" v-model="handleMethodForm"
:disabled="readOnly" :disabled="readOnly"
:has-files="true" :has-files="true"
label-position="top" label-position="top"
:rows="handleMethodFormRows" /> :rows="handleMethodFormRows" />
</div>
</div> </div>
</template> </template>
@ -43,6 +46,7 @@ export default {
components: { SmallTitle, DialogForm, Editor }, components: { SmallTitle, DialogForm, Editor },
data() { data() {
return { return {
loading: false,
orderForm: { orderForm: {
id: null, id: null,
equipment: null, equipment: null,
@ -82,6 +86,9 @@ export default {
label: '处理人', label: '处理人',
prop: 'hander', prop: 'hander',
url: '/base/core-worker/listAll', url: '/base/core-worker/listAll',
bind: {
multiple: true,
},
rules: [ rules: [
{ required: true, message: '类型名称不能为空', trigger: 'blur' }, { required: true, message: '类型名称不能为空', trigger: 'blur' },
], ],
@ -122,9 +129,14 @@ export default {
}; };
}, },
mounted() { mounted() {
this.getDict().then(() => { this.loading = true;
this.init(); this.getDict()
}); .then(() => {
this.init();
})
.catch((err) => {
this.loading = false;
});
}, },
methods: { methods: {
/** /**
@ -139,8 +151,9 @@ export default {
* 初始化 * 初始化
*/ */
async init() { async init() {
this.initTop(); await this.initTop();
this.initDown(); await this.initDown();
this.loading = false;
}, },
/** /**
@ -172,16 +185,19 @@ export default {
this.$msgError('缺少报警日志id'); this.$msgError('缺少报警日志id');
this.$emit('close'); this.$emit('close');
} }
const url = '/base/equipment-alarm-hand/get'; const url = '/base/equipment-alarm-hand/page'; // page
const { data, code } = await this.$axios({ const { data, code } = await this.$axios({
url: url, url: url,
method: 'get', method: 'get',
params: { params: {
id: this.logId, logId: this.logId,
}, },
}); });
if (code == 0) { if (code == 0) {
this.handleMethodForm = data; this.handleMethodForm = {
...data.list[0],
hander: data.list[0]?.hander?.split(',') || '',
};
} }
}, },
@ -213,7 +229,11 @@ export default {
const { code, data } = await this.$axios({ const { code, data } = await this.$axios({
url: url + (this.handleMethodForm.id ? '/update' : '/create'), url: url + (this.handleMethodForm.id ? '/update' : '/create'),
method: this.handleMethodForm.id ? 'put' : 'post', method: this.handleMethodForm.id ? 'put' : 'post',
data: { ...this.handleMethodForm, logId: this.logId }, data: {
...this.handleMethodForm,
hander: this.handleMethodForm.hander?.join(',') || '',
logId: this.logId,
},
}); });
if (code == 0) { if (code == 0) {
return true; return true;