From 14efbf82a69c2ac82d9b592d94c4403055342729 Mon Sep 17 00:00:00 2001 From: liuhr Date: Mon, 30 Oct 2023 11:34:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[FEAT]:=201.=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE=E5=88=86=E9=A1=B5=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PVDEMCSUI/quasar.config.js | 25 +- .../src/api/sysConfig/model/sysConfig.ts | 4 + PVDEMCSUI/src/api/sysConfig/sysConifgApi.ts | 36 ++ PVDEMCSUI/src/layouts/MainScreenLayout.vue | 5 + PVDEMCSUI/src/pages/sysConfig/index.vue | 420 ++++++++++++++++++ 5 files changed, 482 insertions(+), 8 deletions(-) create mode 100644 PVDEMCSUI/src/api/sysConfig/model/sysConfig.ts create mode 100644 PVDEMCSUI/src/api/sysConfig/sysConifgApi.ts create mode 100644 PVDEMCSUI/src/pages/sysConfig/index.vue diff --git a/PVDEMCSUI/quasar.config.js b/PVDEMCSUI/quasar.config.js index 9c32b1f..d6d58a4 100644 --- a/PVDEMCSUI/quasar.config.js +++ b/PVDEMCSUI/quasar.config.js @@ -9,7 +9,7 @@ // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js const { configure } = require('quasar/wrappers'); -const path = require('path') +const path = require('path'); module.exports = configure(function (/* ctx */) { return { @@ -30,11 +30,10 @@ module.exports = configure(function (/* ctx */) { // --> boot files are part of "main.js" // https://v2.quasar.dev/quasar-cli-vite/boot-files // boot: ['axios', 'i18n.js'], - boot: ['axios', 'vue-i18n','vue-print'], - + boot: ['axios', 'vue-i18n', 'vue-print'], // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css - css: ['app.scss','global.css'], + css: ['app.scss', 'global.css'], // https://github.com/quasarframework/quasar/tree/dev/extras extras: [ @@ -52,12 +51,12 @@ module.exports = configure(function (/* ctx */) { // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build build: { - extendWebpack (cfg, { isServer, isClient }) { + extendWebpack(cfg, { isServer, isClient }) { cfg.resolve.alias = { ...cfg.resolve.alias, // This adds the existing alias // Add your own alias like this '@': path.resolve(__dirname, 'src'), - } + }; }, target: { browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'], @@ -92,9 +91,19 @@ module.exports = configure(function (/* ctx */) { // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer devServer: { - // https: true + // https: true, port: 8080, open: true, // opens browser window automatically + proxy: { + '/api': { + target: 'https://127.0.0.1:7200', + secure: false, //开启代理:在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求 + changeOrigin: true, + pathRewrite: { + '^/api': '/', //重写匹配的字段。把/api 转为 / + }, + }, + }, }, // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework @@ -118,7 +127,7 @@ module.exports = configure(function (/* ctx */) { // directives: [], // Quasar plugins - plugins: ['Loading','Notify','Dialog','AppFullscreen'], + plugins: ['Loading', 'Notify', 'Dialog', 'AppFullscreen'], }, // animations: 'all', // --- includes all animations diff --git a/PVDEMCSUI/src/api/sysConfig/model/sysConfig.ts b/PVDEMCSUI/src/api/sysConfig/model/sysConfig.ts new file mode 100644 index 0000000..8565a21 --- /dev/null +++ b/PVDEMCSUI/src/api/sysConfig/model/sysConfig.ts @@ -0,0 +1,4 @@ +export class SysConfigEntity { + configName!: string; + configKey!: string; +} diff --git a/PVDEMCSUI/src/api/sysConfig/sysConifgApi.ts b/PVDEMCSUI/src/api/sysConfig/sysConifgApi.ts new file mode 100644 index 0000000..f874bdb --- /dev/null +++ b/PVDEMCSUI/src/api/sysConfig/sysConifgApi.ts @@ -0,0 +1,36 @@ +import { request } from '../../boot/axios'; +import { Pagination } from '../class'; +import { SysConfigEntity } from './model/sysConfig'; +const pathName = 'SysConfig/'; + +class SysConfigApi { + // 获取系统参数设置分页列表 configName: string, configKey: string, page: any, size: any + getPage = (val: Pagination) => { + return request.get( + `${pathName}GetSysConfigPageList?configName=${val.data.configName}&configKey=${val.data.configKey}&page=${val.page}&size=${val.rowsPerPage}` + ); + }; + // // 获取系统配置项 + // getControllerItem = () => { + // return request.get(`${pathName}getControllerItem`); + // }; + // // 修改 配置项 + // modifyControllerItem = (val: SystemSettingEntity) => { + // return request.post(`${pathName}modifyControllerItem`, val); + // }; + // // SAP库存同步接口 设置为无限请求时间 + // sapStockSynchronization = () => { + // return request.get(`${pathName}sapStockSynchronization`, { + // timeout: 0 + // }); + // }; + // // SAP物料同步接口 设置为无限请求时间 + // sapMaterialSynchronization = () => { + // return request.get(`${pathName}SapMaterialSynchronization`, { + // timeout: 0 + // }); + // }; +} +const sysConfigApi = new SysConfigApi(); + +export { sysConfigApi }; diff --git a/PVDEMCSUI/src/layouts/MainScreenLayout.vue b/PVDEMCSUI/src/layouts/MainScreenLayout.vue index a25dedd..4d0fba1 100644 --- a/PVDEMCSUI/src/layouts/MainScreenLayout.vue +++ b/PVDEMCSUI/src/layouts/MainScreenLayout.vue @@ -78,6 +78,11 @@
Hi! {{ user.userName }}
+ + 系统参数设置 + + +
+ +
+ + + 清空所有条件并,刷新数据 + + + 按条件查询数据 + + +
+ +
+ + + +
+
+
+ +
+
+ + + +
+
+
+ + + + + + \ No newline at end of file From 2f852c9e0d5e3456a0490a2bae52447110c6465b Mon Sep 17 00:00:00 2001 From: liuhr Date: Mon, 30 Oct 2023 11:35:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[FEAT]:=201.=E6=B7=BB=E5=8A=A0=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E9=85=8D=E7=BD=AE=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PVDEMCSUI/src/router/routes.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PVDEMCSUI/src/router/routes.ts b/PVDEMCSUI/src/router/routes.ts index 2ea0264..47112e4 100644 --- a/PVDEMCSUI/src/router/routes.ts +++ b/PVDEMCSUI/src/router/routes.ts @@ -50,6 +50,12 @@ const routes: RouteRecordRaw[] = [ name: 'screen4', component: () => import('pages/screen/screen4/index.vue'), children: [] + }, + { + path: 'sysConfig', + name: 'sysConfig', + component: () => import('pages/sysConfig/index.vue'), + children: [] } // { // redirect: '/web/screenTab/screen1',