diff --git a/dist.zip b/dist.zip deleted file mode 100644 index 2cfd1fa..0000000 Binary files a/dist.zip and /dev/null differ diff --git a/src/utils/request.js b/src/utils/request.js index ab56c12..02a9252 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -2,7 +2,7 @@ import axios from "axios"; import { ElMessage } from "element-plus"; import tools from "@/utils/tools"; import router from "../router"; -// axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/' +axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/' axios.defaults.timeout = 120000; // HTTP request 拦截器 diff --git a/src/view/dialog/dialogPush.vue b/src/view/dialog/dialogPush.vue index bac156f..06658a6 100644 --- a/src/view/dialog/dialogPush.vue +++ b/src/view/dialog/dialogPush.vue @@ -160,7 +160,7 @@ watch( // } // return item; // }); - console.log(555, props.tableData); + // console.log(555, props.tableData); } ); diff --git a/src/view/sy_details.vue b/src/view/sy_details.vue index 23cdb73..f7710b0 100644 --- a/src/view/sy_details.vue +++ b/src/view/sy_details.vue @@ -1,5 +1,10 @@ @@ -297,6 +306,7 @@ const lampImages = { const router = useRouter(); const routers = useRoute(); + const data = reactive({ name: "", identNo: "", //人物ID @@ -313,6 +323,7 @@ const data = reactive({ { label: "地址", property: "dz", + tooltip: true, }, { label: "年龄", @@ -363,10 +374,11 @@ const data = reactive({ align: "center", type: "slot", }, - { - label: "地址", - property: "dz", - }, + // { + // label: "地址", + // property: "dz", + // tooltip: true, + // }, { label: "年龄", property: "nl", @@ -449,7 +461,7 @@ const lampScreen = (val) => { if (selectedLamp.value === val) { return; //防止重复点击 } - console.log(val); + if (val == 1 || val == 2) { data.column_2 = [ { @@ -465,10 +477,11 @@ const lampScreen = (val) => { align: "center", type: "slot", }, - { - label: "地址", - property: "dz", - }, + // { + // label: "地址", + // property: "dz", + // tooltip: true, + // }, { label: "年龄", property: "nl", @@ -500,10 +513,11 @@ const lampScreen = (val) => { align: "center", type: "slot", }, - { - label: "地址", - property: "dz", - }, + // { + // label: "地址", + // property: "dz", + // tooltip: true, + // }, { label: "年龄", property: "nl", @@ -519,7 +533,6 @@ const lampScreen = (val) => { property: "operatesDeng", type: "slot", }, - ]; } selectedLamp.value = val; @@ -528,9 +541,10 @@ const lampScreen = (val) => { }; //---------------- /** - * 表格弹框 - * @param {*} dialogShow -弹框状态,false表示关闭,true表示开启 - * @param {*} dialogShowSf -算法弹框状态,false表示关闭,true表示开启 + * 控制表格弹框和算法弹框的显示状态 + * + * @param {boolean} dialogShow - 表格弹框的状态,`false` 表示关闭,`true` 表示打开。 + * @param {boolean} dialogShowSf - 算法弹框的状态,`false` 表示关闭,`true` 表示打开。 */ const dialogShow = ref(false); const dialogShowSf = ref(false); @@ -748,7 +762,28 @@ const openSf = () => { } }); }; + +const isLoading = ref(true); +let loadingCount = 0; // 计数器,用于跟踪未完成请求的数量 +// 开始加载状态 +function startLoading() { + loadingCount++; + isLoading.value = true; // 有请求时,设置为 true + // const isLoading = ElLoading.service({ + // lock: true, + // text: 'Loading', + // background: 'rgba(0, 0, 0, 0.7)', + // }) +} +// 结束加载状态 +function stopLoading() { + loadingCount--; + if (loadingCount === 0) { + isLoading.value = false; // 所有请求完成后,设置为 false + } +} const getTable = (pagination) => { + startLoading(); // 开始加载状态 http .get( `${pagination.url}?page=${pagination.currentPage}&size=${pagination.pageSize}&xh=${routers.query.xh}&deng=${selectedLamp.value}` @@ -780,10 +815,19 @@ const getTable = (pagination) => { // }; // }); // pagination2.total = res.count - 6; + } else { + ElMessage.warning({ message: res.message }); } + }) + .catch((error) => { + console.error("请求失败", error); + }) + .finally(() => { + stopLoading(); // 请求完成后调用 stopLoading }); }; const getTable1 = (pagination) => { + startLoading(); // 开始加载状态 http .get(`${pagination.url}?sfzhm=${data.identNo}&xh=${routers.query.xh}`) .then((res) => { @@ -797,9 +841,16 @@ const getTable1 = (pagination) => { message: res.message, }); } + }) + .catch((error) => { + console.error("请求失败", error); + }) + .finally(() => { + stopLoading(); // 请求完成后调用 stopLoading }); }; const getTable2 = (pagination) => { + startLoading(); // 开始加载状态 http .get(`${pagination.url1}?dxbm=${data.dxbm}&xh=${routers.query.xh}`) .then((res) => { @@ -813,6 +864,12 @@ const getTable2 = (pagination) => { message: res.message, }); } + }) + .catch((error) => { + console.error("请求失败", error); + }) + .finally(() => { + stopLoading(); // 请求完成后调用 stopLoading }); }; @@ -938,6 +995,7 @@ onMounted(() => { { label: "地址", property: "dz", + tooltip: true, }, ]; data.column_2 = [ @@ -956,10 +1014,11 @@ onMounted(() => { label: "统一社会信用代码", property: "dxbm", }, - { - label: "地址", - property: "dz", - }, + // { + // label: "地址", + // property: "dz", + // tooltip: true, + // }, ]; } if (data.name == "药品安全监管") { @@ -977,6 +1036,7 @@ onMounted(() => { { label: "地址", property: "dz", + tooltip: true, }, ]; data.column_2 = [ @@ -995,10 +1055,11 @@ onMounted(() => { label: "许可证编号", property: "dxbm", }, - { - label: "地址", - property: "dz", - }, + // { + // label: "地址", + // property: "dz", + // tooltip: true, + // }, ]; } listAssignment();