Este commit está contenido en:
lb 2023-11-27 15:25:41 +08:00
padre 4348d66e53
commit 2fdee9cafd
Se han modificado 2 ficheros con 50 adiciones y 30 borrados

Ver fichero

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

Ver fichero

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