From f1721d8b7187061244fd86ed85f32e8ea5f702b4 Mon Sep 17 00:00:00 2001 From: wangzenghua <1048523306@qq.com> Date: Thu, 27 Feb 2025 01:17:19 +0000 Subject: [PATCH 1/3] fix:main --- main/package.json | 1 + .../components/custom-import-excel/index.vue | 1 - main/src/main.js | 4 +- main/src/router/index.js | 6 -- main/src/store/modules/setting.js | 52 ++++++++++++++ main/src/store/modules/user.js | 8 +-- main/src/styles/style.scss | 2 +- main/src/views/index.vue | 2 +- main/vite.config.js | 72 +++++++------------ main/yarn.lock | 19 ++++- 10 files changed, 104 insertions(+), 63 deletions(-) diff --git a/main/package.json b/main/package.json index f45644c..ba77e38 100644 --- a/main/package.json +++ b/main/package.json @@ -18,6 +18,7 @@ }, "dependencies": { "@element-plus/icons-vue": "^2.3.1", + "@smallwei/avue": "^3.6.2", "@vueuse/core": "^12.4.0", "axios": "^1.6.5", "dayjs": "^1.11.11", diff --git a/main/src/components/custom-import-excel/index.vue b/main/src/components/custom-import-excel/index.vue index 7abd779..7529540 100644 --- a/main/src/components/custom-import-excel/index.vue +++ b/main/src/components/custom-import-excel/index.vue @@ -4,7 +4,6 @@ draggable title="文件导入" width="50%" - top="10px" :close-on-click-modal="false" :close-on-press-escape="false" @close="onClose" diff --git a/main/src/main.js b/main/src/main.js index 9105699..08bbed6 100644 --- a/main/src/main.js +++ b/main/src/main.js @@ -5,11 +5,13 @@ import router from './router'; import pinia from './store'; import ElementPlus from 'element-plus'; import 'element-plus/dist/index.css'; +import Avue from '@smallwei/avue'; +import '@smallwei/avue/lib/index.css'; import { registerGlobalMicroApps } from './micro'; import { registerElIcons } from './plugins/icon'; import './utils/permission'; const app = createApp(App); -app.use(pinia).use(router).use(ElementPlus).mount('#root'); +app.use(pinia).use(router).use(ElementPlus).use(Avue).mount('#root'); registerElIcons(app); registerGlobalMicroApps(); diff --git a/main/src/router/index.js b/main/src/router/index.js index 00bc19a..0ec93ba 100644 --- a/main/src/router/index.js +++ b/main/src/router/index.js @@ -27,12 +27,6 @@ export const constantRoutes = [ }, ], }, - // { - // path: '/sub-government-affairs-service/:pathMatch(.*)', - // name: 'sub-government-affairs-service', - // component: Layout, - // redirect: '/sub-government-affairs-service/home', - // }, ]; const router = createRouter({ diff --git a/main/src/store/modules/setting.js b/main/src/store/modules/setting.js index 35aef83..b12e32d 100644 --- a/main/src/store/modules/setting.js +++ b/main/src/store/modules/setting.js @@ -1,12 +1,64 @@ import { defineStore } from 'pinia'; +import { CONSTANTS } from '@/config'; export const useSettingStore = defineStore({ id: 'settingStore', state: () => ({ + // menu 是否收缩 + isCollapse: true, + // + withoutAnimation: false, + device: 'desktop', + // 刷新当前页 isReload: true, + // 主题设置 + themeConfig: { + // 显示设置 + showSetting: false, + // 菜单展示模式 默认 vertical horizontal / vertical /columns + mode: 'vertical', + // tagsView 是否展示 默认展示 + showTag: true, + // 页脚 + footer: true, + // 深色模式 切换暗黑模式 + isDark: false, + // 显示侧边栏Logo + showLogo: true, + // 主题颜色 + primary: CONSTANTS.PRIMARY, + // element组件大小 + globalComSize: 'default', + // 是否只保持一个子菜单的展开 + uniqueOpened: true, + // 固定header + fixedHeader: true, + // 灰色模式 + gray: false, + // 色弱模式 + weak: false, + }, }), getters: {}, actions: { + // 设置主题 + setThemeConfig({ key, val }) { + this.themeConfig[key] = val; + }, + // 切换 Collapse + setCollapse(value) { + this.isCollapse = value; + this.withoutAnimation = false; + }, + // 关闭侧边栏 + closeSideBar({ withoutAnimation }) { + this.isCollapse = false; + this.withoutAnimation = withoutAnimation; + }, + toggleDevice(device) { + this.device = device; + }, + // 刷新 setReload() { this.isReload = false; setTimeout(() => { diff --git a/main/src/store/modules/user.js b/main/src/store/modules/user.js index 0f1d48e..fd325d8 100644 --- a/main/src/store/modules/user.js +++ b/main/src/store/modules/user.js @@ -3,7 +3,7 @@ import { GenKey } from '@/config'; import { isEmpty, encode, decode } from '@/utils'; export const useUserStore = defineStore({ - id: GenKey('user_store'), + id: GenKey('userStore'), state: () => ({ token: null, userInfo: {}, @@ -52,14 +52,14 @@ export const useUserStore = defineStore({ this.currentOrg = null; this.orgList = []; this.menus = []; - localStorage.removeItem(GenKey('user_store')); + localStorage.removeItem(GenKey('userStore')); }, clear() { - localStorage.removeItem(GenKey('user_store')); + localStorage.removeItem(GenKey('userStore')); }, }, persist: { - key: GenKey('user_store'), + key: GenKey('userStore'), storage: window.localStorage, }, }); diff --git a/main/src/styles/style.scss b/main/src/styles/style.scss index 517b558..0898ec0 100644 --- a/main/src/styles/style.scss +++ b/main/src/styles/style.scss @@ -1,6 +1,6 @@ @import 'common/base.scss'; @import 'common/define.scss'; -// @import "@/assets/fonts/iconfont.css"; +@import "@/assets/fonts/iconfont.css"; #root, #app { diff --git a/main/src/views/index.vue b/main/src/views/index.vue index b0399ab..84e4b52 100644 --- a/main/src/views/index.vue +++ b/main/src/views/index.vue @@ -41,7 +41,7 @@ const gotoPage = (row) => { // curentApp, // }); // console.log('===', actions.getGlobalState('user')); - if (row.name !== 'sub-government-affairs-service') return; + // if (row.name !== 'sub-government-affairs-service') return; window.history.pushState({}, row.name, row.activeRule); }; diff --git a/main/vite.config.js b/main/vite.config.js index febc33b..749cd3a 100644 --- a/main/vite.config.js +++ b/main/vite.config.js @@ -14,46 +14,37 @@ import { resolve } from 'path'; export default defineConfig(({ command, mode }) => { console.log('vite.config.js', command, mode, loadEnv(mode, process.cwd())); - const { - VITE_PORT, - VITE_APP_NAME, - VITE_APP_BASE_API, - VITE_APP_BASE_URL, - VITE_APP_UPLOAD_API, - VITE_APP_UPLOAD_URL, - VITE_APP_SYSTEM_API, - VITE_APP_SYSTEM_URL, - } = loadEnv(mode, process.cwd()); + const { VITE_PORT, VITE_APP_NAME, VITE_APP_BASE_API, VITE_APP_BASE_URL, VITE_APP_UPLOAD_API, VITE_APP_UPLOAD_URL } = loadEnv(mode, process.cwd()); const config = { base: './', build: { target: 'ESNext', outDir: 'dist', minify: 'terser', - // terserOptions: { - // compress: { - // drop_console: true, - // drop_debugger: true, - // pure_funcs: ['console.log'], - // }, - // output: { - // comments: true, - // }, - // }, - // reportCompressedSize: false, - // chunkSizeWarningLimit: 2000, - // rollupOptions: { - // output: { - // manualChunks(id) { - // if (id.includes('node_modules')) { - // return id.toString().split('node_modules/')[1].split('/')[1].toString(); - // } - // }, - // chunkFileNames: 'assets/js/[name]-[hash].js', - // entryFileNames: 'assets/js/[name]-[hash].js', - // assetFileNames: 'assets/[ext]/[name]-[hash].[ext]', - // }, - // }, + terserOptions: { + compress: { + drop_console: true, + drop_debugger: true, + pure_funcs: ['console.log'], + }, + output: { + comments: true, + }, + }, + reportCompressedSize: false, + chunkSizeWarningLimit: 2000, + rollupOptions: { + output: { + manualChunks(id) { + if (id.includes('node_modules')) { + return id.toString().split('node_modules/')[1].split('/')[1].toString(); + } + }, + chunkFileNames: 'assets/js/[name]-[hash].js', + entryFileNames: 'assets/js/[name]-[hash].js', + assetFileNames: 'assets/[ext]/[name]-[hash].[ext]', + }, + }, }, server: { host: '0.0.0.0', @@ -74,11 +65,6 @@ export default defineConfig(({ command, mode }) => { changeOrigin: true, rewrite: (path) => path.replace(/^\/uploadApis/, ''), }, - [VITE_APP_SYSTEM_API]: { - target: VITE_APP_SYSTEM_URL, - changeOrigin: true, - rewrite: (path) => path.replace(/^\/systemApis/, ''), - }, }, }, resolve: { @@ -133,13 +119,5 @@ export default defineConfig(({ command, mode }) => { }), ], }; - if (mode === 'production') { - config.build.terserOptions = { - compress: { - drop_console: true, - drop_debugger: true, - }, - }; - } return config; }); diff --git a/main/yarn.lock b/main/yarn.lock index 7cefbf8..c6e9f15 100644 --- a/main/yarn.lock +++ b/main/yarn.lock @@ -195,7 +195,7 @@ resolved "https://registry.npmmirror.com/@dual-bundle/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz#519c1549b0e147759e7825701ecffd25e5819f7b" integrity sha512-+nxncfwHM5SgAtrVzgpzJOI1ol0PkumhVo469KCf9lUi21IGcY90G98VuHm9VRrUypmAzawAHO9bs6hqeADaVg== -"@element-plus/icons-vue@^2.3.1": +"@element-plus/icons-vue@^2.0.6", "@element-plus/icons-vue@^2.3.1": version "2.3.1" resolved "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz#1f635ad5fdd5c85ed936481525570e82b5a8307a" integrity sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg== @@ -678,6 +678,16 @@ resolved "https://registry.npmmirror.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.29.2.tgz#dc89d92418ae2efa1d70e071c686cffbcf788147" integrity sha512-p6fTArexECPf6KnOHvJXRpAEq0ON1CBtzG/EY4zw08kCHk/kivBc5vUEtnCFNCHOpJZ2ne77fxwRLIKD4wuW2Q== +"@smallwei/avue@^3.6.2": + version "3.6.2" + resolved "https://registry.npmmirror.com/@smallwei/avue/-/avue-3.6.2.tgz#a9397aa1ae0863fe7e142f0893d570e5a5225d9d" + integrity sha512-Ifkt0o7KLsAMptfoNMG7qYS86OL2pEet761wWZyZGu8e48wuNNPOfqx5jnibGjx2oIoKtYUFh7tFdllOCth2EQ== + dependencies: + "@element-plus/icons-vue" "^2.0.6" + countup.js "^1.9.3" + dayjs "^1.10.4" + lodash "^4.17.21" + "@transloadit/prettier-bytes@0.0.7": version "0.0.7" resolved "https://registry.npmmirror.com/@transloadit/prettier-bytes/-/prettier-bytes-0.0.7.tgz#cdb5399f445fdd606ed833872fa0cabdbc51686b" @@ -1800,6 +1810,11 @@ cosmiconfig@^9.0.0: js-yaml "^4.1.0" parse-json "^5.2.0" +countup.js@^1.9.3: + version "1.9.3" + resolved "https://registry.npmmirror.com/countup.js/-/countup.js-1.9.3.tgz#ce3e50cd7160441e478f07da31895edcc0f1c9dd" + integrity sha512-UHf2P/mFKaESqdPq+UdBJm/1y8lYdlcDd0nTZHNC8cxWoJwZr1Eldm1PpWui446vDl5Pd8PtRYkr3q6K4+Qa5A== + cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.6" resolved "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" @@ -1916,7 +1931,7 @@ data-view-byte-offset@^1.0.1: es-errors "^1.3.0" is-data-view "^1.0.1" -dayjs@^1.11.11, dayjs@^1.11.13: +dayjs@^1.10.4, dayjs@^1.11.11, dayjs@^1.11.13: version "1.11.13" resolved "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c" integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg== From f1e6740b0da2ca42857ef2dc040ace6d3ccdb201 Mon Sep 17 00:00:00 2001 From: wangzenghua <1048523306@qq.com> Date: Thu, 27 Feb 2025 01:24:25 +0000 Subject: [PATCH 2/3] fix:sug-gas --- .../.env.development | 1 + .../.env.production | 1 + sub-government-affairs-service/index.html | 2 +- sub-government-affairs-service/package.json | 3 +- .../src/apis/login.js | 43 -- .../src/apis/plan.js | 61 +++ .../src/components/code-dialog/index.vue | 54 +++ .../src/layouts/component/Avatar/index.vue | 6 +- sub-government-affairs-service/src/main.js | 53 ++- .../src/plugins/micro.js | 2 +- .../src/router/index.js | 20 +- .../src/router/modules/resource.js | 12 +- .../src/store/modules/user.js | 8 +- .../src/utils/axios.js | 2 +- .../src/utils/permission.js | 19 +- .../src/views/resource/grid/index.vue | 18 +- .../src/views/resource/plan/index.vue | 383 ++++++++++++++++++ .../src/views/trace/breeding/coding/index.vue | 15 +- .../views/trace/breeding/quality/index.vue | 14 +- sub-government-affairs-service/vite.config.js | 74 ++-- 20 files changed, 645 insertions(+), 146 deletions(-) delete mode 100644 sub-government-affairs-service/src/apis/login.js create mode 100644 sub-government-affairs-service/src/apis/plan.js create mode 100644 sub-government-affairs-service/src/components/code-dialog/index.vue create mode 100644 sub-government-affairs-service/src/views/resource/plan/index.vue diff --git a/sub-government-affairs-service/.env.development b/sub-government-affairs-service/.env.development index 952a19a..187aabc 100644 --- a/sub-government-affairs-service/.env.development +++ b/sub-government-affairs-service/.env.development @@ -2,6 +2,7 @@ VITE_PORT = 9528 VITE_MODE = 'DEV' VITE_APP_MIAN = 'daimp-front-main' +VITE_APP_MIAN_URL = 'http://localhost:9000' VITE_APP_NAME = 'sub-government-affairs-service' VITE_APP_BASE_API = '/apis' VITE_APP_BASE_URL = 'http://192.168.18.99:8080' diff --git a/sub-government-affairs-service/.env.production b/sub-government-affairs-service/.env.production index d6aa6aa..a889d2f 100644 --- a/sub-government-affairs-service/.env.production +++ b/sub-government-affairs-service/.env.production @@ -1,6 +1,7 @@ # 生产环境 VITE_MODE = 'PRO' VITE_APP_MIAN = 'daimp-front-main' +VITE_APP_MIAN_URL = 'http://192.168.18.99:88' VITE_APP_NAME = 'sub-government-affairs-service' # 接口 VITE_APP_BASE_API = '/apis' diff --git a/sub-government-affairs-service/index.html b/sub-government-affairs-service/index.html index 965338c..5bc92df 100644 --- a/sub-government-affairs-service/index.html +++ b/sub-government-affairs-service/index.html @@ -7,7 +7,7 @@ 政务服务 -
+
diff --git a/sub-government-affairs-service/package.json b/sub-government-affairs-service/package.json index a073b05..eb69f44 100644 --- a/sub-government-affairs-service/package.json +++ b/sub-government-affairs-service/package.json @@ -6,8 +6,7 @@ "scripts": { "dev": "vite --mode development", "build": "vite build --mode production", - "build:dev": "vite build --mode dev", - "build:qa": "vite build --mode qa", + "test": "vite build --mode test", "preview": "vite preview", "format": "prettier --write 'src/**/*.{vue,ts,tsx,js,jsx,css,less,scss,json,md}'", "eslint": "npx eslint --init", diff --git a/sub-government-affairs-service/src/apis/login.js b/sub-government-affairs-service/src/apis/login.js deleted file mode 100644 index 3a08a9c..0000000 --- a/sub-government-affairs-service/src/apis/login.js +++ /dev/null @@ -1,43 +0,0 @@ -import request from '@/utils/axios'; - -/** - * @Title: 登录 - */ -export function Login(params, token) { - return request('/store/login', { - method: 'POST', - data: null, - params: params, - headers: { - 'fairies-auth-token': token, - }, - }); -} - -/** - * @Title: 登出 - */ -export function LogOut() { - return request('/store/logout', { - method: 'POST', - }); -} - -/** - * @Title: 验证码 - */ -export function GetCaptcha() { - return request('/store/login-captcha', { - method: 'GET', - responseType: 'arraybuffer', - }); -} - -/** - * @Title: 获取菜单 - */ -export function GetMenus() { - return request('/store/self/menu', { - method: 'GET', - }); -} diff --git a/sub-government-affairs-service/src/apis/plan.js b/sub-government-affairs-service/src/apis/plan.js new file mode 100644 index 0000000..617d29c --- /dev/null +++ b/sub-government-affairs-service/src/apis/plan.js @@ -0,0 +1,61 @@ +import request from '@/utils/axios'; + +/** + * @Title: 列表 + */ +export function GetEntityList(params = {}) { + return request('/land-resource/annualManage/page', { + method: 'GET', + params, + }); +} + +/** + * @Title: 新增 + */ +export function AddEntity(data = {}) { + return request('/land-resource/annualManage/save', { + method: 'POST', + data, + }); +} + +/** + * @Title: 修改 + */ +export function UpdateEntity(data = {}) { + return request('/land-resource/annualManage/edit', { + method: 'PUT', + data, + }); +} + +/** + * @Title: 审核 + */ +export function AuditEntity(data = {}) { + return request('/land-resource/annualManage/exam', { + method: 'PUT', + data, + }); +} + +/** + * @Title: 删除 + */ +export function DeleteEntity(params = {}) { + return request(`/land-resource/annualManage/delete/${params.id}`, { + method: 'DELETE', + }); +} + +/** + * @Title: 导出 + */ +export function ExportEntity(params = {}) { + return request('/land-resource/annualManage/export', { + method: 'GET', + params, + responseType: 'blob', + }); +} diff --git a/sub-government-affairs-service/src/components/code-dialog/index.vue b/sub-government-affairs-service/src/components/code-dialog/index.vue new file mode 100644 index 0000000..2a6a5bd --- /dev/null +++ b/sub-government-affairs-service/src/components/code-dialog/index.vue @@ -0,0 +1,54 @@ + + + diff --git a/sub-government-affairs-service/src/layouts/component/Avatar/index.vue b/sub-government-affairs-service/src/layouts/component/Avatar/index.vue index 0bb9d45..d85310a 100644 --- a/sub-government-affairs-service/src/layouts/component/Avatar/index.vue +++ b/sub-government-affairs-service/src/layouts/component/Avatar/index.vue @@ -3,7 +3,7 @@ * @Author: zenghua.wang * @Date: 2023-06-20 14:29:45 * @LastEditors: zenghua.wang - * @LastEditTime: 2025-02-14 11:39:56 + * @LastEditTime: 2025-02-18 09:48:18 --> + + @@ -68,6 +74,7 @@ const UserStore = useUserStore(); const crudRef = ref(null); const importExcelRef = ref(null); const qualityAddRef = ref(null); +const codeRef = ref(null); const state = reactive({ loading: false, query: { @@ -87,7 +94,6 @@ const state = reactive({ addDisplay: false, editDisplay: false, viewDisplay: true, - width: 200, }, { label: '采收批次', @@ -273,7 +279,7 @@ const state = reactive({ label: '原产地详细地址', prop: 'originAddressDetail', hide: true, - // span: 24, + viewDisplay: false, }, // { // label: '经营主体', @@ -607,4 +613,9 @@ const onExport = () => { state.loading = false; }); }; + +const onViewCode = (row) => { + state.currentRow = row; + codeRef?.value && codeRef.value.show(); +}; diff --git a/sub-government-affairs-service/src/views/trace/breeding/quality/index.vue b/sub-government-affairs-service/src/views/trace/breeding/quality/index.vue index 9836549..c4408a5 100644 --- a/sub-government-affairs-service/src/views/trace/breeding/quality/index.vue +++ b/sub-government-affairs-service/src/views/trace/breeding/quality/index.vue @@ -22,6 +22,10 @@ 批量删除 + + + + diff --git a/sub-government-affairs-service/vite.config.js b/sub-government-affairs-service/vite.config.js index 39091db..d67a68f 100644 --- a/sub-government-affairs-service/vite.config.js +++ b/sub-government-affairs-service/vite.config.js @@ -3,7 +3,7 @@ * @Author: zenghua.wang * @Date: 2022-09-18 21:24:29 * @LastEditors: zenghua.wang - * @LastEditTime: 2025-02-17 10:58:12 + * @LastEditTime: 2025-02-27 09:16:00 */ import { defineConfig, loadEnv } from 'vite'; @@ -23,46 +23,37 @@ import { resolve } from 'path'; const useDevMode = true; export default defineConfig(({ command, mode }) => { - const { - VITE_PORT, - VITE_APP_NAME, - VITE_APP_BASE_API, - VITE_APP_BASE_URL, - VITE_APP_UPLOAD_API, - VITE_APP_UPLOAD_URL, - VITE_APP_SYSTEM_API, - VITE_APP_SYSTEM_URL, - } = loadEnv(mode, process.cwd()); + const { VITE_PORT, VITE_APP_NAME, VITE_APP_BASE_API, VITE_APP_BASE_URL, VITE_APP_UPLOAD_API, VITE_APP_UPLOAD_URL } = loadEnv(mode, process.cwd()); const config = { base: '/sub-government-affairs-service/', build: { target: 'ESNext', outDir: 'dist', minify: 'terser', - // terserOptions: { - // compress: { - // drop_console: true, - // drop_debugger: true, - // pure_funcs: ['console.log'], - // }, - // output: { - // comments: true, - // }, - // }, - // reportCompressedSize: false, - // chunkSizeWarningLimit: 2000, - // rollupOptions: { - // output: { - // manualChunks(id) { - // if (id.includes('node_modules')) { - // return id.toString().split('node_modules/')[1].split('/')[1].toString(); - // } - // }, - // chunkFileNames: 'assets/js/[name]-[hash].js', - // entryFileNames: 'assets/js/[name]-[hash].js', - // assetFileNames: 'assets/[ext]/[name]-[hash].[ext]', - // }, - // }, + terserOptions: { + compress: { + drop_console: true, + drop_debugger: true, + pure_funcs: ['console.log'], + }, + output: { + comments: true, + }, + }, + reportCompressedSize: false, + chunkSizeWarningLimit: 2000, + rollupOptions: { + output: { + manualChunks(id) { + if (id.includes('node_modules')) { + return id.toString().split('node_modules/')[1].split('/')[1].toString(); + } + }, + chunkFileNames: 'assets/js/[name]-[hash].js', + entryFileNames: 'assets/js/[name]-[hash].js', + assetFileNames: 'assets/[ext]/[name]-[hash].[ext]', + }, + }, }, server: { host: '0.0.0.0', @@ -83,11 +74,6 @@ export default defineConfig(({ command, mode }) => { changeOrigin: true, rewrite: (path) => path.replace(/^\/uploadApis/, ''), }, - [VITE_APP_SYSTEM_API]: { - target: VITE_APP_SYSTEM_URL, - changeOrigin: true, - rewrite: (path) => path.replace(/^\/systemApis/, ''), - }, }, }, resolve: { @@ -142,13 +128,5 @@ export default defineConfig(({ command, mode }) => { }), ], }; - if (mode === 'production') { - config.build.terserOptions = { - compress: { - drop_console: true, - drop_debugger: true, - }, - }; - } return config; }); From 73fe382bf857caf6407e40af85c68b19b3e84155 Mon Sep 17 00:00:00 2001 From: wangzenghua <1048523306@qq.com> Date: Thu, 27 Feb 2025 01:25:24 +0000 Subject: [PATCH 3/3] fix:sub-gas --- sub-government-affairs-service/src/main.js | 11 +-- .../src/router/modules/resource-bak.js | 69 ------------------- 2 files changed, 3 insertions(+), 77 deletions(-) delete mode 100644 sub-government-affairs-service/src/router/modules/resource-bak.js diff --git a/sub-government-affairs-service/src/main.js b/sub-government-affairs-service/src/main.js index b684fc9..d79dd7c 100644 --- a/sub-government-affairs-service/src/main.js +++ b/sub-government-affairs-service/src/main.js @@ -13,12 +13,11 @@ import router from './router'; import pinia from './store'; import ElementPlus from 'element-plus'; import 'element-plus/dist/index.css'; -// import Avue from '@smallwei/avue'; -// import '@smallwei/avue/lib/index.css'; +import Avue from '@smallwei/avue'; +import '@smallwei/avue/lib/index.css'; import { registerDirective } from './directives'; import { registerGlobalComponents } from './plugins/globalComponents'; import { registerElIcons } from './plugins/icon'; -// import { registerMicroApps } from './plugins/micro'; import './utils/permission'; const registerMicroApps = () => { @@ -43,12 +42,8 @@ const registerMicroApps = () => { }; const render = async ({ container }) => { await new Promise((resolve) => setTimeout(resolve, 1000)); - // if (!container) { - // console.error('挂载容器不存在'); - // return; - // } app = createApp(App); - app.use(pinia).use(router).use(ElementPlus); + app.use(pinia).use(router).use(ElementPlus).use(Avue); registerGlobalComponents(app); registerElIcons(app); registerDirective(app); diff --git a/sub-government-affairs-service/src/router/modules/resource-bak.js b/sub-government-affairs-service/src/router/modules/resource-bak.js deleted file mode 100644 index 1a96caf..0000000 --- a/sub-government-affairs-service/src/router/modules/resource-bak.js +++ /dev/null @@ -1,69 +0,0 @@ -import Layout from '@/layouts/index.vue'; -import Views from '@/layouts/Views.vue'; - -export default [ - { - path: '/resource', - name: 'resource', - component: Layout, - redirect: '/grid', - meta: { title: '土地资源管理', icon: 'icon-test' }, - children: [ - { - path: '/grid', - component: () => import('@/views/resource/grid/index.vue'), - name: 'grid', - meta: { title: '网格化管理', icon: 'Document' }, - }, - ], - }, -]; - -// { -// path: '/resource-info', -// name: 'resource-info-manager', -// component: Views, -// meta: { title: '土地信息管理', icon: 'Document' }, -// redirect: '/land', -// children: [ -// { -// path: '/land', -// component: () => import('@/views/resource/land/index.vue'), -// name: 'land', -// meta: { title: '土地资源', icon: 'Document' }, -// }, -// { -// path: '/land-fill', -// name: 'land-fill', -// component: () => import('@/views/resource/land/index.vue'), -// meta: { title: '土地信息填报审核', icon: 'Document' }, -// }, -// { -// path: '/land-fill-review', -// name: 'land-fill-review', -// component: () => import('@/views/resource/land/index.vue'), -// meta: { title: '土地流转信息填报审核', icon: 'Document' }, -// }, -// ], -// }, -// { -// path: '/land-monitor', -// name: 'land-monitor', -// component: Views, -// meta: { title: '土地监管', icon: 'Document' }, -// redirect: '/land-patrol', -// children: [ -// { -// path: '/land-patrol', -// component: () => import('@/views/resource/land/index.vue'), -// name: 'land-patrol', -// meta: { title: '土地使用巡查', icon: 'Document' }, -// }, -// { -// path: '/land-handle', -// name: 'land-handle', -// component: () => import('@/views/resource/land/index.vue'), -// meta: { title: '土地违法处理', icon: 'Document' }, -// }, -// ], -// },