diff --git a/.env.development b/.env.development index 0af2550..33c9156 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ # 页面标题 -VITE_APP_TITLE = AEO系统(开发环境) +VITE_APP_TITLE = 农业情报平台(开发环境) # 开发环境配置 VITE_APP_ENV = 'development' diff --git a/.env.production b/.env.production index 61dde96..17d6a75 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,5 @@ # 页面标题 -VITE_APP_TITLE = AEO系统 +VITE_APP_TITLE = 农业情报平台 # 生产环境配置 VITE_APP_ENV = 'production' diff --git a/package.json b/package.json index aa580fa..97f37c5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "AEO", + "name": "pest_admin", "version": "0.0.1", - "description": "AEO系统", + "description": "农业情报平台", "author": "gdguanghui", "license": "MIT", "type": "module", @@ -17,6 +17,7 @@ }, "dependencies": { "@element-plus/icons-vue": "2.3.1", + "@pureadmin/utils": "^2.5.0", "@vueup/vue-quill": "1.2.0", "@vueuse/core": "10.11.0", "axios": "0.28.1", @@ -35,6 +36,9 @@ "vue-router": "4.4.0" }, "devDependencies": { + "@iconify-icons/ri": "^1.2.10", + "@iconify-json/carbon": "^1.2.5", + "@iconify/vue": "^4.2.0", "@vitejs/plugin-vue": "5.0.5", "sass": "1.77.5", "unplugin-auto-import": "0.17.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 380f68d..ab7ec20 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: '@element-plus/icons-vue': specifier: 2.3.1 version: 2.3.1(vue@3.4.31) + '@pureadmin/utils': + specifier: ^2.5.0 + version: 2.5.0(echarts@5.5.1)(vue@3.4.31) '@vueup/vue-quill': specifier: 1.2.0 version: 1.2.0(vue@3.4.31) @@ -60,6 +63,15 @@ importers: specifier: 4.4.0 version: 4.4.0(vue@3.4.31) devDependencies: + '@iconify-icons/ri': + specifier: ^1.2.10 + version: 1.2.10 + '@iconify-json/carbon': + specifier: ^1.2.5 + version: 1.2.5 + '@iconify/vue': + specifier: ^4.2.0 + version: 4.2.0(vue@3.4.31) '@vitejs/plugin-vue': specifier: 5.0.5 version: 5.0.5(vite@5.3.2(@types/node@22.10.1)(sass@1.77.5))(vue@3.4.31) @@ -411,12 +423,23 @@ packages: '@floating-ui/utils@0.2.8': resolution: {integrity: sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==} + '@iconify-icons/ri@1.2.10': + resolution: {integrity: sha512-wNaXsQYK55WDUWCbcjvnwnODV4Jtsp+VC0duPanibEVu876TUYf6kdgTGtH7/GErBCNdJuJJbncG7vbOaeQi7w==} + + '@iconify-json/carbon@1.2.5': + resolution: {integrity: sha512-aI3TEzOrUDGhs74zIT3ym/ZQBUEziyu8JifntX2Hb4siVzsP5sQ/QEfVdmcCUj37kQUYT3TYBSeAw2vTfCJx9w==} + '@iconify/types@2.0.0': resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} '@iconify/utils@2.1.33': resolution: {integrity: sha512-jP9h6v/g0BIZx0p7XGJJVtkVnydtbgTgt9mVNcGDYwaa7UhdHdI9dvoq+gKj9sijMSJKxUPEG2JyjsgXjxL7Kw==} + '@iconify/vue@4.2.0': + resolution: {integrity: sha512-CMynoz9BDWugDO2B7LU/s8L99dHCiqDGCjCki6bhVx5etZhw9x0BTV7wWRdj82jtl1yQTc+QQRcHQmSvUY6R+g==} + peerDependencies: + vue: '>=3' + '@jridgewell/gen-mapping@0.3.5': resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} @@ -450,6 +473,17 @@ packages: '@polka/url@1.0.0-next.28': resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} + '@pureadmin/utils@2.5.0': + resolution: {integrity: sha512-DJyHBqxQo9Uo4GDEMbLD9xDNIn+VrOMBOyS6bgArY1a1iv4ffpDf0tA1tQ2HRFMiIcERC5abLWAASpgITM5LOQ==} + peerDependencies: + echarts: '*' + vue: '*' + peerDependenciesMeta: + echarts: + optional: true + vue: + optional: true + '@rollup/pluginutils@5.1.3': resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==} engines: {node: '>=14.0.0'} @@ -2397,6 +2431,14 @@ snapshots: '@floating-ui/utils@0.2.8': {} + '@iconify-icons/ri@1.2.10': + dependencies: + '@iconify/types': 2.0.0 + + '@iconify-json/carbon@1.2.5': + dependencies: + '@iconify/types': 2.0.0 + '@iconify/types@2.0.0': {} '@iconify/utils@2.1.33': @@ -2411,6 +2453,11 @@ snapshots: transitivePeerDependencies: - supports-color + '@iconify/vue@4.2.0(vue@3.4.31)': + dependencies: + '@iconify/types': 2.0.0 + vue: 3.4.31 + '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 @@ -2442,6 +2489,11 @@ snapshots: '@polka/url@1.0.0-next.28': {} + '@pureadmin/utils@2.5.0(echarts@5.5.1)(vue@3.4.31)': + optionalDependencies: + echarts: 5.5.1 + vue: 3.4.31 + '@rollup/pluginutils@5.1.3(rollup@4.28.0)': dependencies: '@types/estree': 1.0.6 diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 2b8dca5..a9489bf 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -182,3 +182,7 @@ aside { margin-bottom: 10px; } } + +p { + margin: 0; +} diff --git a/src/components/CustomDialog/index.js b/src/components/CustomDialog/index.js new file mode 100644 index 0000000..5c60c43 --- /dev/null +++ b/src/components/CustomDialog/index.js @@ -0,0 +1,61 @@ +import { ref } from "vue"; +import reDialog from "./index.vue"; +import { useTimeoutFn } from "@vueuse/core"; +import { withInstall } from "@pureadmin/utils"; + +const dialogStore = ref([]); + +/** 打开弹框 */ +const addDialog = (options) => { + const open = () => + dialogStore.value.push(Object.assign(options, { visible: true })); + if (options?.openDelay) { + useTimeoutFn(() => { + open(); + }, options.openDelay); + } else { + open(); + } +}; + +/** 关闭弹框 */ +const closeDialog = (options, index, args) => { + dialogStore.value[index].visible = false; + options.closeCallBack && options.closeCallBack({ options, index, args }); + + const closeDelay = options?.closeDelay ?? 200; + useTimeoutFn(() => { + dialogStore.value.splice(index, 1); + }, closeDelay); +}; + +/** + * @description 更改弹框自身属性值 + * @param value 属性值 + * @param key 属性,默认`title` + * @param index 弹框索引(默认`0`,代表只有一个弹框,对于嵌套弹框要改哪个弹框的属性值就把该弹框索引赋给`index`) + */ +const updateDialog = (value, key = "title", index = 0) => { + dialogStore.value[index][key] = value; +}; + +/** 关闭所有弹框 */ +const closeAllDialog = () => { + dialogStore.value = []; +}; + +/** 千万别忘了在下面这三处引入并注册下,放心注册,不使用`addDialog`调用就不会被挂载 + * https://github.com/pure-admin/vue-pure-admin/blob/main/src/App.vue#L4 + * https://github.com/pure-admin/vue-pure-admin/blob/main/src/App.vue#L12 + * https://github.com/pure-admin/vue-pure-admin/blob/main/src/App.vue#L22 + */ +const ReDialog = withInstall(reDialog); + +export { + ReDialog, + dialogStore, + addDialog, + closeDialog, + updateDialog, + closeAllDialog, +}; diff --git a/src/components/CustomDialog/index.vue b/src/components/CustomDialog/index.vue new file mode 100644 index 0000000..a18bee6 --- /dev/null +++ b/src/components/CustomDialog/index.vue @@ -0,0 +1,187 @@ + + + diff --git a/src/main.js b/src/main.js index 67cc414..9528f4c 100644 --- a/src/main.js +++ b/src/main.js @@ -23,6 +23,7 @@ import { download } from "@/utils/request"; import "virtual:svg-icons-register"; import SvgIcon from "@/components/SvgIcon"; import elementIcons from "@/components/SvgIcon/svgicon"; +import { Icon } from "@iconify/vue"; import "./permission"; // permission control @@ -79,6 +80,7 @@ app.use(store); app.use(plugins); app.use(elementIcons); app.component("svg-icon", SvgIcon); +app.component("Icon", Icon); directive(app); diff --git a/src/views/customer/info/index.vue b/src/views/customer/info/index.vue deleted file mode 100644 index aded0ff..0000000 --- a/src/views/customer/info/index.vue +++ /dev/null @@ -1,313 +0,0 @@ - - - - - diff --git a/src/views/customer/member/index.vue b/src/views/customer/member/index.vue deleted file mode 100644 index 6be6cb3..0000000 --- a/src/views/customer/member/index.vue +++ /dev/null @@ -1,320 +0,0 @@ - - - diff --git a/src/views/index.vue b/src/views/index.vue index 1457a55..c1b5e1f 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,78 +1,192 @@ diff --git a/src/views/indexComponents/deviceInfo.vue b/src/views/indexComponents/deviceInfo.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/indexComponents/deviceList.vue b/src/views/indexComponents/deviceList.vue new file mode 100644 index 0000000..99fef1c --- /dev/null +++ b/src/views/indexComponents/deviceList.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/src/views/indexComponents/deviceMap.vue b/src/views/indexComponents/deviceMap.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/indexComponents/liveData.vue b/src/views/indexComponents/liveData.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/product/category/index.vue b/src/views/product/category/index.vue deleted file mode 100644 index 7c9503e..0000000 --- a/src/views/product/category/index.vue +++ /dev/null @@ -1,353 +0,0 @@ - - - - - diff --git a/src/views/product/productCategory/index.vue b/src/views/product/productCategory/index.vue deleted file mode 100644 index d66003d..0000000 --- a/src/views/product/productCategory/index.vue +++ /dev/null @@ -1,262 +0,0 @@ - - - diff --git a/src/views/product/productRecord/index.vue b/src/views/product/productRecord/index.vue deleted file mode 100644 index 65727db..0000000 --- a/src/views/product/productRecord/index.vue +++ /dev/null @@ -1,440 +0,0 @@ - - - diff --git a/src/views/product/productType/index.vue b/src/views/product/productType/index.vue deleted file mode 100644 index b7e2a4b..0000000 --- a/src/views/product/productType/index.vue +++ /dev/null @@ -1,256 +0,0 @@ - - - diff --git a/src/views/supplier/record/index.vue b/src/views/supplier/record/index.vue deleted file mode 100644 index 0231d4b..0000000 --- a/src/views/supplier/record/index.vue +++ /dev/null @@ -1,486 +0,0 @@ - - - diff --git a/src/views/warehouse/house/index.vue b/src/views/warehouse/house/index.vue deleted file mode 100644 index 72c00f0..0000000 --- a/src/views/warehouse/house/index.vue +++ /dev/null @@ -1,11 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/warehouse/member/index.vue b/src/views/warehouse/member/index.vue deleted file mode 100644 index 72c00f0..0000000 --- a/src/views/warehouse/member/index.vue +++ /dev/null @@ -1,11 +0,0 @@ - - - - - \ No newline at end of file