This commit is contained in:
2025-12-07 19:34:45 +08:00
parent e388613fc8
commit c6106ccef5
3 changed files with 10 additions and 6 deletions

View File

@@ -78,7 +78,7 @@
field: 'alertLevel', field: 'alertLevel',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
dictType: '', dictType: 'alert_level',
allowClear: true, allowClear: true,
}, },
}, },
@@ -97,7 +97,7 @@
field: 'alertStatus', field: 'alertStatus',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
dictType: '', dictType: 'alert_status',
allowClear: true, allowClear: true,
}, },
}, },
@@ -112,6 +112,7 @@
sorter: true, sorter: true,
width: 180, width: 180,
align: 'left', align: 'left',
fixed: 'left'
}, },
{ {
title: t('预警编码'), title: t('预警编码'),

View File

@@ -52,8 +52,7 @@
</div> </div>
</div> </div>
</Card> </Card>
<Modal @register="register" @modalClose="fetchAppList(currentStatus)" />
<Modal @register="register" @modalClose="fetchAppList('0')" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View File

@@ -118,6 +118,7 @@ export default defineComponent({
const handleOpinion = ref(''); const handleOpinion = ref('');
const currentStatus = ref(''); const currentStatus = ref('');
const alertContent = ref(''); const alertContent = ref('');
const paramId = ref()
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const [register, { closeModal }] = useModalInner(async (data: any) => { const [register, { closeModal }] = useModalInner(async (data: any) => {
@@ -125,6 +126,7 @@ export default defineComponent({
currentStatus.value = data.alertStatus currentStatus.value = data.alertStatus
alertContent.value = data.alertContent alertContent.value = data.alertContent
handleOpinion.value = data.handleNote handleOpinion.value = data.handleNote
paramId.value = data.id
}); });
watch(currentStatus, (val) => { watch(currentStatus, (val) => {
@@ -151,7 +153,9 @@ export default defineComponent({
}; };
async function handleSubmit() { async function handleSubmit() {
if (!handleOpinion.value.trim()) { const opinionDesc = handleOpinion.value ?? '';
if (!opinionDesc.trim()) {
createMessage.warning('请输入处理意见'); createMessage.warning('请输入处理意见');
return; return;
} }
@@ -162,7 +166,7 @@ export default defineComponent({
} }
const params = { const params = {
id: warningData.value.id id: paramId.value
}; };
const res = await bizWarningAlertSave(params, data); const res = await bizWarningAlertSave(params, data);