From 3347dd0be59d8701f1525fb4b536113dba17ad7c Mon Sep 17 00:00:00 2001 From: "lj7788@126.com" Date: Thu, 17 Jul 2025 15:52:12 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=94=B9=E9=80=A0=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4AntD=E7=BB=84=E4=BB=B6=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yanzhu-ui-vue3/package.json | 1 - yanzhu-ui-vue3/src/main.js | 18 +- yanzhu-ui-vue3/src/utils/bim/requestModel.js | 15 +- .../views/bim/bimModel/LocalCoordinates.vue | 2 +- .../views/bim/bimModel/uploadModelDialog.vue | 376 +++++++++--------- .../src/views/bim/bimSetting/index.vue | 24 +- .../src/views/bim/sandTableSetting/index.vue | 27 +- .../views/manage/greenCarbonData/index.vue | 2 +- 8 files changed, 237 insertions(+), 228 deletions(-) diff --git a/yanzhu-ui-vue3/package.json b/yanzhu-ui-vue3/package.json index 1f40d7f1..a26fe81c 100644 --- a/yanzhu-ui-vue3/package.json +++ b/yanzhu-ui-vue3/package.json @@ -22,7 +22,6 @@ "@rollup/plugin-commonjs": "^28.0.0", "@vueup/vue-quill": "1.2.0", "@vueuse/core": "10.11.0", - "ant-design-vue": "^4.2.6", "axios": "0.28.1", "bpmn-js": "^11.4.1", "diagram-js": "^11.9.1", diff --git a/yanzhu-ui-vue3/src/main.js b/yanzhu-ui-vue3/src/main.js index 649ecee3..6a2985ee 100644 --- a/yanzhu-ui-vue3/src/main.js +++ b/yanzhu-ui-vue3/src/main.js @@ -56,24 +56,12 @@ import DictTag from "@/components/DictTag"; import VForm3 from "@/lib/vform/designer.umd.js"; import "@/lib/vform/designer.style.css"; import dayjs from "dayjs"; -import { notification, message, Modal } from "ant-design-vue"; +import { ElMessageBox } from 'element-plus' const app = createApp(App); -notification.config({ - placement: "topLeft", - bottom: "50px", - top: "50px", - duration: 3, -}); + // 全局方法挂载 -app.config.globalProperties.$confirm = Modal.confirm; -app.config.globalProperties.$message = message; -app.config.globalProperties.$notification = notification; -app.config.globalProperties.$info = Modal.info; -app.config.globalProperties.$success = Modal.success; -app.config.globalProperties.$error = Modal.error; -app.config.globalProperties.$warning = Modal.warning; - +app.config.globalProperties.$confirm =ElMessageBox.confirm; app.config.globalProperties.useDict = useDict; app.config.globalProperties.download = download; app.config.globalProperties.parseTime = parseTime; diff --git a/yanzhu-ui-vue3/src/utils/bim/requestModel.js b/yanzhu-ui-vue3/src/utils/bim/requestModel.js index 8e69eb13..4f15eaa2 100644 --- a/yanzhu-ui-vue3/src/utils/bim/requestModel.js +++ b/yanzhu-ui-vue3/src/utils/bim/requestModel.js @@ -1,6 +1,6 @@ import axios from "axios"; import useBimStore from "@/store/modules/bim"; -import notification from "ant-design-vue/es/notification"; +import { ElNotification } from 'element-plus' // 创建 axios 实例 const request = axios.create({ @@ -15,15 +15,18 @@ const errorHandler = (error) => { if (error.response) { if ([500, 400, 403].some((x) => x === error.response.status)) { const data = error.response.data; - notification.error({ - message: "错误", - description: - data.message || + + ElNotification({ + title: "错误", + position: 'bottom-right', + message: data.message || (data.error.validationErrors && data.error.validationErrors[0].message) || data.error.message || data.error_description, - }); + type: 'error', + }) + } if (error.response.status === 401) { } diff --git a/yanzhu-ui-vue3/src/views/bim/bimModel/LocalCoordinates.vue b/yanzhu-ui-vue3/src/views/bim/bimModel/LocalCoordinates.vue index 53213769..12599e03 100644 --- a/yanzhu-ui-vue3/src/views/bim/bimModel/LocalCoordinates.vue +++ b/yanzhu-ui-vue3/src/views/bim/bimModel/LocalCoordinates.vue @@ -5,7 +5,7 @@ - + diff --git a/yanzhu-ui-vue3/src/views/bim/bimModel/uploadModelDialog.vue b/yanzhu-ui-vue3/src/views/bim/bimModel/uploadModelDialog.vue index 1030b689..d8b68458 100644 --- a/yanzhu-ui-vue3/src/views/bim/bimModel/uploadModelDialog.vue +++ b/yanzhu-ui-vue3/src/views/bim/bimModel/uploadModelDialog.vue @@ -1,222 +1,225 @@