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 @@