修改bug

This commit is contained in:
yangjun 2025-08-19 13:37:00 +08:00
parent 86575e6b29
commit 68de775664
3 changed files with 80 additions and 28 deletions

View File

@ -73,16 +73,22 @@
.ant-modal-header { .ant-modal-header {
padding: 16px; padding: 16px;
background: #f2f8ff !important;
border-bottom: 0px;
border-radius: 10px;
} }
.ant-modal-content { .ant-modal-content {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
background: #f2f8ff !important;
border-radius: 10px;
} }
.ant-modal-footer { .ant-modal-footer {
button + button { button + button {
margin-left: 10px; margin-left: 10px;
} }
border-top: 0px;
} }
.ant-modal-close { .ant-modal-close {

View File

@ -48,6 +48,18 @@
<HldyUtilsModal ref="hldyUtilsModal" @success="handleHldyParams" ></HldyUtilsModal> <HldyUtilsModal ref="hldyUtilsModal" @success="handleHldyParams" ></HldyUtilsModal>
<ApiLogModal ref="apiLogModal"></ApiLogModal> <ApiLogModal ref="apiLogModal"></ApiLogModal>
<!-- <ElectricitySyncLogListModal ref="syncLogModal"></ElectricitySyncLogListModal>--> <!-- <ElectricitySyncLogListModal ref="syncLogModal"></ElectricitySyncLogListModal>-->
<a-modal v-model:visible="tipVisible" width="300px">
<template #title>
<Icon icon="ant-design:info-circle-outlined" :size="20" style="margin-right:10px;color:white;background:#1ea0fa;border-radius:10px;"/>{{tipTitle}}
</template>
<div style="text-align: center;margin: 40px 0;">
{{tipContent}}
</div>
<template #footer style="text-align: center;">
<a-button type="primary" style="margin-right: 35%" @click="handleCancel">知道了</a-button>
</template>
</a-modal>
</div> </div>
</template> </template>
@ -70,6 +82,9 @@ import { defHttp } from '/@/utils/http/axios';
const apiLogModal = ref(); const apiLogModal = ref();
// const syncLogModal = ref(); // const syncLogModal = ref();
const hldyUtilsModal = ref(); const hldyUtilsModal = ref();
const tipVisible = ref(false);
const tipTitle = ref('提示');
const tipContent = ref('');
//model //model
const [registerModal, {openModal}] = useModal(); const [registerModal, {openModal}] = useModal();
//table //table
@ -102,6 +117,9 @@ import { defHttp } from '/@/utils/http/axios';
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
function handleCancel() {
tipVisible.value = false;
}
/** /**
* 成功回调 * 成功回调
*/ */
@ -174,13 +192,9 @@ import { defHttp } from '/@/utils/http/axios';
// //
async function handleControlLz(record: Recordable) { async function handleControlLz(record: Recordable) {
if(record.relayState == '0'){ if(record.relayState == '0'){
Modal.info({ tipVisible.value=true;
title: '拉闸', tipTitle.value = "拉闸";
content: h('div', {}, [ tipContent.value = "此电表已拉闸!";
h('p', '此电表已拉闸!'),
]),
onOk() {},
});
return; return;
} }
const params = { const params = {
@ -195,13 +209,21 @@ import { defHttp } from '/@/utils/http/axios';
// //
async function handleControlHz(record: Recordable) { async function handleControlHz(record: Recordable) {
if(record.relayState == '1'){ if(record.relayState == '1'){
Modal.info({
title: '合闸', // Modal.info({
content: h('div', {}, [ // title: '',
h('p', '此电表已合闸!'), // content: h('div', {}, [
]), // h('p', ''),
onOk() {}, // ]),
}); // onOk() {},
// style: {
// borderRadius: '5px',
// },
// });
tipVisible.value=true;
tipTitle.value = "合闸";
tipContent.value = "此电表已合闸!";
return; return;
} }
const params = { const params = {

View File

@ -59,6 +59,18 @@
<HldyUtilsModal ref="hldyUtilsModal" @success="handleHldyParams" ></HldyUtilsModal> <HldyUtilsModal ref="hldyUtilsModal" @success="handleHldyParams" ></HldyUtilsModal>
<ApiLogModal ref="apiLogModal"></ApiLogModal> <ApiLogModal ref="apiLogModal"></ApiLogModal>
<SyncLogListModal ref="syncLogModal"></SyncLogListModal> <SyncLogListModal ref="syncLogModal"></SyncLogListModal>
<a-modal v-model:visible="tipVisible" width="300px">
<template #title>
<Icon icon="ant-design:info-circle-outlined" :size="20" style="margin-right:10px;color:white;background:#1ea0fa;border-radius:10px;"/>{{tipTitle}}
</template>
<div style="text-align: center;margin: 40px 0;">
{{tipContent}}
</div>
<template #footer style="text-align: center;">
<a-button type="primary" style="margin-right: 35%" @click="handleCancel">知道了</a-button>
</template>
</a-modal>
</div> </div>
</template> </template>
@ -80,6 +92,9 @@
const apiLogModal = ref(); const apiLogModal = ref();
const syncLogModal = ref(); const syncLogModal = ref();
const hldyUtilsModal = ref(); const hldyUtilsModal = ref();
const tipVisible = ref(false);
const tipTitle = ref('提示');
const tipContent = ref('');
//model //model
const [registerModal, {openModal}] = useModal(); const [registerModal, {openModal}] = useModal();
//table //table
@ -112,6 +127,9 @@
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
function handleCancel() {
tipVisible.value = false;
}
/** /**
* 成功回调 * 成功回调
*/ */
@ -168,13 +186,16 @@
// //
async function handleWaterControlGf(record: Recordable) { async function handleWaterControlGf(record: Recordable) {
if(record.relayState == '0'){ if(record.relayState == '0'){
Modal.info({ tipVisible.value=true;
title: '关阀', tipTitle.value = "关阀";
content: h('div', {}, [ tipContent.value = "此水表已关阀!";
h('p', '此水表已关阀!'), // Modal.info({
]), // title: '',
onOk() {}, // content: h('div', {}, [
}); // h('p', ''),
// ]),
// onOk() {},
// });
return; return;
} }
const params = { const params = {
@ -189,13 +210,16 @@
// //
async function handleWaterControlKf(record: Recordable) { async function handleWaterControlKf(record: Recordable) {
if(record.relayState == '1'){ if(record.relayState == '1'){
Modal.info({ tipVisible.value=true;
title: '开阀', tipTitle.value = "开阀";
content: h('div', {}, [ tipContent.value = "此水表已开阀!";
h('p', '此水表已开阀!'), // Modal.info({
]), // title: '',
onOk() {}, // content: h('div', {}, [
}); // h('p', ''),
// ]),
// onOk() {},
// });
return; return;
} }
const params = { const params = {