From ad2c9e0db4c03a1c0d43e53c8b45930f0b50f2d8 Mon Sep 17 00:00:00 2001 From: jackal <13856223047@163.com> Date: Tue, 9 Apr 2024 15:10:31 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E8=AE=A1=E5=88=92=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=96=B0=E5=A2=9E=E9=A1=B5=E9=9D=A2=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/api/store/tools.js | 294 +++---- sgzb-ui/src/views/store/newBuy/plan.vue | 73 +- sgzb-ui/src/views/store/newBuy/planAdd.vue | 940 ++++++++++----------- sgzb-ui/vue.config.js | 159 ++-- 4 files changed, 693 insertions(+), 773 deletions(-) diff --git a/sgzb-ui/src/api/store/tools.js b/sgzb-ui/src/api/store/tools.js index 5a0c5cac..6a4e8751 100644 --- a/sgzb-ui/src/api/store/tools.js +++ b/sgzb-ui/src/api/store/tools.js @@ -1,308 +1,288 @@ -import request from '@/utils/request' +import request from "@/utils/request"; //机具类型管理 export function getMaTypeList(query) { return request({ - url: '/base/type/getMaTypeList', - method: 'get', - params: query - }) + url: "/base/type/getMaTypeList", + method: "get", + params: query, + }); } //获取机具类型列表 export function getListByMaType(query) { return request({ - url: '/base/type/getListByMaType', - method: 'get', - params: query - }) + url: "/base/type/getListByMaType", + method: "get", + params: query, + }); } //获取机具类型树2 export function equipmentTypeTree(query) { return request({ - url: '/base/type/equipmentType', - method: 'get', - params: query - }) + url: "/base/type/equipmentType", + method: "get", + params: query, + }); } //机具类型-详情 export function getMaType(typeId) { return request({ - url: '/base/type/' + typeId, - method: 'get' - }) + url: "/base/type/" + typeId, + method: "get", + }); +} +//获取基层单位 +export function getunitInfoAll(query) { + return request({ + url: "/base/bmUnitInfo/unitInfoAll", + method: "get", + params: query, + }); } //机具类型--新增 export function addMaType(data) { return request({ - url: '/base/type', - method: 'post', - data: data - }) + url: "/base/type", + method: "post", + data: data, + }); } // 机具类型--修改 export function updateMaType(data) { return request({ - url: '/base/type', - method: 'put', - data: data - }) + url: "/base/type", + method: "put", + data: data, + }); } //供应商管理--删除 export function delMaType(typeId) { return request({ - url: '/base/type/' + typeId, - method: 'delete' - }) + url: "/base/type/" + typeId, + method: "delete", + }); } - - - //供应商管理-列表 export function listSupplierInfo(query) { return request({ - url: '/base/supplierInfo/list', - method: 'get', - params: query - }) + url: "/base/supplierInfo/list", + method: "get", + params: query, + }); } //供应商管理-详情 export function getSupplierInfo(supplierId) { return request({ - url: '/base/supplierInfo/' + supplierId, - method: 'get' - }) + url: "/base/supplierInfo/" + supplierId, + method: "get", + }); } //供应商管理--新增 export function addSupplier(data) { return request({ - url: '/base/supplierInfo', - method: 'post', - data: data - }) + url: "/base/supplierInfo", + method: "post", + data: data, + }); } // 供应商管理--修改 export function updateSupplier(data) { return request({ - url: '/base/supplierInfo', - method: 'put', - data: data - }) + url: "/base/supplierInfo", + method: "put", + data: data, + }); } //供应商管理--删除 export function delSupplier(supplierIds) { return request({ - url: '/base/supplierInfo/' + supplierIds, - method: 'delete' - }) + url: "/base/supplierInfo/" + supplierIds, + method: "delete", + }); } //供应商管理-下拉数据 export function supplierInfoList(query) { return request({ - url: '/base/supplierInfo/supplierInfoList', - method: 'get', - params: query - }) + url: "/base/supplierInfo/supplierInfoList", + method: "get", + params: query, + }); } - - - - //机具设备管理-列表 export function listMachine(query) { return request({ - url: '/base/machine/getMachine', - method: 'get', - params: query - }) + url: "/base/machine/getMachine", + method: "get", + params: query, + }); } //机具设备管理-详情 export function getMachine(maId) { return request({ - url: '/base/machine/' + maId, - method: 'get' - }) + url: "/base/machine/" + maId, + method: "get", + }); } //机具设备管理--新增 export function addMachine(data) { return request({ - url: '/base/machine', - method: 'post', - data: data - }) + url: "/base/machine", + method: "post", + data: data, + }); } // 机具设备管理--修改 export function updateMachine(data) { return request({ - url: '/base/machine', - method: 'put', - data: data - }) + url: "/base/machine", + method: "put", + data: data, + }); } //机具设备管理--删除 export function delMachine(maIds) { return request({ - url: '/base/machine/' + maIds, - method: 'delete' - }) + url: "/base/machine/" + maIds, + method: "delete", + }); } // // //配件管理-列表 export function listPartType(query) { return request({ - url: '/base/maPartType/list', - method: 'get', - params: query - }) + url: "/base/maPartType/list", + method: "get", + params: query, + }); } //配件管理--新增 export function addPartType(data) { return request({ - url: '/base/maPartType', - method: 'post', - data: data - }) + url: "/base/maPartType", + method: "post", + data: data, + }); } //配件管理--新增 export function addMaPartType(data) { return request({ - url: '/base/maPartType', - method: 'post', - data: data - }) + url: "/base/maPartType", + method: "post", + data: data, + }); } // 配件管理--修改 export function updatePartType(data) { return request({ - url: '/base/maPartType', - method: 'put', - data: data - }) + url: "/base/maPartType", + method: "put", + data: data, + }); } // 配件管理--修改 export function updatePartTypeById(data) { return request({ - url: '/base/maPartType/updateById', - method: 'post', - data: data - }) + url: "/base/maPartType/updateById", + method: "post", + data: data, + }); } //配件管理--删除 export function delPartType(maIds) { return request({ - url: '/base/maPartType/' + maIds, - method: 'delete' - }) + url: "/base/maPartType/" + maIds, + method: "delete", + }); } //配件管理--查询 export function getPartType(maIds) { return request({ - url: '/base/maPartType/' + maIds, - method: 'get' - }) + url: "/base/maPartType/" + maIds, + method: "get", + }); } - - - // 获取库管员配置列表 export function warehouseKeeperInfoAll(query) { return request({ - url: '/base/maWarehouseKeeper/warehouseKeeperInfoAll', - method: 'get', - params: query - }) + url: "/base/maWarehouseKeeper/warehouseKeeperInfoAll", + method: "get", + params: query, + }); } //库管员配置-根据人员名称查询左侧列表 export function getMaUserList(query) { return request({ - url: '/base/maWarehouseKeeper/getMaUserList', - method: 'get', - params: query - }) + url: "/base/maWarehouseKeeper/getMaUserList", + method: "get", + params: query, + }); } //库管员配置-保存 export function addHouseKeeper(data) { return request({ - url: '/base/maWarehouseKeeper/addList', - method: 'post', - data: data - }) + url: "/base/maWarehouseKeeper/addList", + method: "post", + data: data, + }); } //库管员配置-删除 export function delHouseKeeper(data) { return request({ - url: '/base/maWarehouseKeeper/remove', - method: 'post', - data: data - }) + url: "/base/maWarehouseKeeper/remove", + method: "post", + data: data, + }); } // 获取维修班配置列表 export function wareRepairerInfoAll(query) { return request({ - url: '/base/maintenanceGang/maintenanceGangInfoAll', - method: 'get', - params: query - }) + url: "/base/maintenanceGang/maintenanceGangInfoAll", + method: "get", + params: query, + }); } //维修班配置-根据人员名称查询左侧列表 export function getRepairerList(query) { return request({ - url: '/base/maintenanceGang/getMaUserList', - method: 'get', - params: query - }) + url: "/base/maintenanceGang/getMaUserList", + method: "get", + params: query, + }); } //维修班配置-保存 export function addRepairer(data) { return request({ - url: '/base/maintenanceGang/addList', - method: 'post', - data: data - }) + url: "/base/maintenanceGang/addList", + method: "post", + data: data, + }); } //维修班配置-删除 export function delRepairer(data) { return request({ - url: '/base/maintenanceGang/remove', - method: 'post', - data: data - }) + url: "/base/maintenanceGang/remove", + method: "post", + data: data, + }); } //机具厂家-下拉数据 export function getDeviceFactoryCbx(data) { return request({ - url: '/base/select/getDeviceFactoryCbx', - method: 'post', - data: data - }) + url: "/base/select/getDeviceFactoryCbx", + method: "post", + data: data, + }); } - - - - - - - - - - - - - - - - - - diff --git a/sgzb-ui/src/views/store/newBuy/plan.vue b/sgzb-ui/src/views/store/newBuy/plan.vue index 0fa6425a..55ec65d6 100644 --- a/sgzb-ui/src/views/store/newBuy/plan.vue +++ b/sgzb-ui/src/views/store/newBuy/plan.vue @@ -2,13 +2,8 @@
- + @@ -19,23 +14,12 @@ - 新增 + 新增 - 导出 + 导出 - + @@ -52,31 +36,16 @@ - +
@@ -120,10 +89,10 @@ export default { getList() { this.loading = true; listType(this.queryParams).then(response => { - this.planList = response.rows; - this.total = response.total; - this.loading = false; - } + this.planList = response.rows; + this.total = response.total; + this.loading = false; + } ); }, /** 搜索按钮操作 */ @@ -138,20 +107,24 @@ export default { }, /** 新增按钮操作 */ handleAdd() { - this.$tab.closeOpenPage({ path: "/store/plan/planAdd"}); + this.$tab.closeOpenPage({ + path: "/store/plan/planAdd", + }); + // console.log(this.$router); + }, // 多选框选中数据 handleSelectionChange(selection) { this.ids = selection.map(item => item) - this.single = selection.length!=1 + this.single = selection.length != 1 this.multiple = !selection.length }, /** 修改按钮操作 */ handleUpdate(row) { - let query = { taskId:row.taskId } + let query = { taskId: row.taskId } this.$tab.closeOpenPage({ path: "/store/plan/planAdd", query }); }, - + /** 删除按钮操作 */ handleDelete(row) { // const dictIds = row.dictId || this.ids; diff --git a/sgzb-ui/src/views/store/newBuy/planAdd.vue b/sgzb-ui/src/views/store/newBuy/planAdd.vue index 215a2b1c..0b87f069 100644 --- a/sgzb-ui/src/views/store/newBuy/planAdd.vue +++ b/sgzb-ui/src/views/store/newBuy/planAdd.vue @@ -1,500 +1,468 @@ - - - \ No newline at end of file +}; + + \ No newline at end of file diff --git a/sgzb-ui/vue.config.js b/sgzb-ui/vue.config.js index 57811dcf..87c4a7da 100644 --- a/sgzb-ui/vue.config.js +++ b/sgzb-ui/vue.config.js @@ -1,15 +1,15 @@ -'use strict' -const path = require('path') +"use strict"; +const path = require("path"); function resolve(dir) { - return path.join(__dirname, dir) + return path.join(__dirname, dir); } -const CompressionPlugin = require('compression-webpack-plugin') +const CompressionPlugin = require("compression-webpack-plugin"); -const name = process.env.VUE_APP_TITLE || '施工装备管理系统' // 网页标题 +const name = process.env.VUE_APP_TITLE || "施工装备管理系统"; // 网页标题 -const port = process.env.port || process.env.npm_config_port || 80 // 端口 +const port = process.env.port || process.env.npm_config_port || 80; // 端口 // vue.config.js 配置说明 //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions @@ -18,18 +18,18 @@ module.exports = { // 部署生产环境和开发环境下的URL。 // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 - publicPath: process.env.NODE_ENV === "production" ? "/" : "/",///gl/ + publicPath: process.env.NODE_ENV === "production" ? "/" : "/", ///gl/ // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) - outputDir: 'dist', + outputDir: "dist", // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) - assetsDir: 'static', + assetsDir: "static", // 是否开启eslint保存检测,有效值:ture | false | 'error' - lintOnSave: process.env.NODE_ENV === 'development', + lintOnSave: process.env.NODE_ENV === "development", // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 productionSourceMap: false, // webpack-dev-server 相关配置 devServer: { - host: '0.0.0.0', + host: "0.0.0.0", port: port, open: true, proxy: { @@ -42,7 +42,7 @@ module.exports = { // target: `https://test-cc.zhgkxt.com`,//线上环境-南网 // target: `https://z.csgmall.com.cn`, - target: `http://10.40.92.8:8080`,//超 + target: `http://10.40.92.8:8080`, //超 // target: `http://10.40.92.253:8080`,//韩 // target: `http://10.40.92.209:8080`,//川/ @@ -59,97 +59,96 @@ module.exports = { changeOrigin: true, pathRewrite: { - ['^' + process.env.VUE_APP_BASE_API]: '' - } - } + ["^" + process.env.VUE_APP_BASE_API]: "", + }, + }, }, - disableHostCheck: true + disableHostCheck: true, }, css: { loaderOptions: { sass: { - sassOptions: { outputStyle: "expanded" } - } - } + sassOptions: { outputStyle: "expanded" }, + }, + }, }, configureWebpack: { name: name, resolve: { alias: { - '@': resolve('src') - } + "@": resolve("src"), + }, }, plugins: [ // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件 new CompressionPlugin({ - cache: false, // 不启用文件缓存 - test: /\.(js|css|html)?$/i, // 压缩文件格式 - filename: '[path].gz[query]', // 压缩后的文件名 - algorithm: 'gzip', // 使用gzip压缩 - minRatio: 0.8 // 压缩率小于1才会压缩 - }) + cache: false, // 不启用文件缓存 + test: /\.(js|css|html)?$/i, // 压缩文件格式 + filename: "[path].gz[query]", // 压缩后的文件名 + algorithm: "gzip", // 使用gzip压缩 + minRatio: 0.8, // 压缩率小于1才会压缩 + }), ], }, chainWebpack(config) { - config.plugins.delete('preload') // TODO: need test - config.plugins.delete('prefetch') // TODO: need test + config.plugins.delete("preload"); // TODO: need test + config.plugins.delete("prefetch"); // TODO: need test // set svg-sprite-loader + config.module.rule("svg").exclude.add(resolve("src/assets/icons")).end(); config.module - .rule('svg') - .exclude.add(resolve('src/assets/icons')) - .end() - config.module - .rule('icons') + .rule("icons") .test(/\.svg$/) - .include.add(resolve('src/assets/icons')) + .include.add(resolve("src/assets/icons")) .end() - .use('svg-sprite-loader') - .loader('svg-sprite-loader') + .use("svg-sprite-loader") + .loader("svg-sprite-loader") .options({ - symbolId: 'icon-[name]' + symbolId: "icon-[name]", }) - .end() + .end(); - config.when(process.env.NODE_ENV !== 'development', config => { - config - .plugin('ScriptExtHtmlWebpackPlugin') - .after('html') - .use('script-ext-html-webpack-plugin', [{ - // `runtime` must same as runtimeChunk name. default is `runtime` - inline: /runtime\..*\.js$/ - }]) - .end() - - config.optimization.splitChunks({ - chunks: 'all', - cacheGroups: { - libs: { - name: 'chunk-libs', - test: /[\\/]node_modules[\\/]/, - priority: 10, - chunks: 'initial' // only package third parties that are initially dependent - }, - elementUI: { - name: 'chunk-elementUI', // split elementUI into a single package - test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm - priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app - }, - commons: { - name: 'chunk-commons', - test: resolve('src/components'), // can customize your rules - minChunks: 3, // minimum common number - priority: 5, - reuseExistingChunk: true - } - } - }) - - config.optimization.runtimeChunk('single'), + config.when(process.env.NODE_ENV !== "development", (config) => { + config + .plugin("ScriptExtHtmlWebpackPlugin") + .after("html") + .use("script-ext-html-webpack-plugin", [ { - from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件 - to: './' //到根目录下 - } - }) - } -} + // `runtime` must same as runtimeChunk name. default is `runtime` + inline: /runtime\..*\.js$/, + }, + ]) + .end(); + + config.optimization.splitChunks({ + chunks: "all", + cacheGroups: { + libs: { + name: "chunk-libs", + test: /[\\/]node_modules[\\/]/, + priority: 10, + chunks: "initial", // only package third parties that are initially dependent + }, + elementUI: { + name: "chunk-elementUI", // split elementUI into a single package + test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm + priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app + }, + commons: { + name: "chunk-commons", + test: resolve("src/components"), // can customize your rules + minChunks: 3, // minimum common number + priority: 5, + reuseExistingChunk: true, + }, + }, + }); + + config.optimization.runtimeChunk("single"), + { + from: path.resolve(__dirname, "./public/robots.txt"), //防爬虫文件 + to: "./", //到根目录下 + }; + }); + }, +};