From e747b80b95fb6f3d12e937fe2414e88d4824fee8 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Thu, 29 Aug 2024 13:18:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=20=E4=BB=A3=E7=A0=81=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development-nw | 11 + .env.production-nw | 2 +- package.json | 1 + src/api/dataPush/index.js | 19 + src/api/login.js | 4 +- src/router/index.js | 2 +- src/store/modules/user.js | 3 +- .../return/receive/component/handlePage.vue | 34 +- src/views/nw-login.vue | 23 +- .../machinery/coding-nw/index.vue | 1077 ++++++++++++++--- .../warehouseManage/pushAndAccept/index.vue | 251 ++++ .../pushAndAccept/pushAndAcceptDetail.vue | 576 +++++++++ .../rentalEquipmentManagement/index.vue | 190 +++ vue.config.js | 61 +- 14 files changed, 2025 insertions(+), 229 deletions(-) create mode 100644 .env.development-nw create mode 100644 src/api/dataPush/index.js create mode 100644 src/views/warehouseManage/pushAndAccept/index.vue create mode 100644 src/views/warehouseManage/pushAndAccept/pushAndAcceptDetail.vue create mode 100644 src/views/warehouseManage/rentalEquipmentManagement/index.vue diff --git a/.env.development-nw b/.env.development-nw new file mode 100644 index 0000000..951be77 --- /dev/null +++ b/.env.development-nw @@ -0,0 +1,11 @@ +# 页面标题 +VUE_APP_TITLE = 施工装备管理系统 + +# 开发环境配置 +VUE_APP_ENV = 'development-nw' + +# 若依管理系统/开发环境 +VUE_APP_BASE_API = '/dev-api' + +# 路由懒加载 +VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/.env.production-nw b/.env.production-nw index e850d34..9dd1389 100644 --- a/.env.production-nw +++ b/.env.production-nw @@ -9,4 +9,4 @@ NODE_ENV = production VUE_APP_ENV = 'production-nw' # 若依管理系统/生产环境 -VUE_APP_BASE_API = '/gl/dev-api' +VUE_APP_BASE_API = '/sgzbgl/dev-api' diff --git a/package.json b/package.json index afc1cc6..906438a 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "license": "MIT", "scripts": { "dev": "vue-cli-service serve", + "dev:nw": "vue-cli-service serve --mode development-nw", "build": "vue-cli-service build", "build:prod": "vue-cli-service build", "build:stage": "vue-cli-service build --mode staging", diff --git a/src/api/dataPush/index.js b/src/api/dataPush/index.js new file mode 100644 index 0000000..d1f022f --- /dev/null +++ b/src/api/dataPush/index.js @@ -0,0 +1,19 @@ +import request from '@/utils/request' + +// 推送设备 +export const pushNotificationsApi = (data) => { + return request.post('/material/base/machine/pushNotifications', data) +} +// 接收设备 +export const receiveNotificationsApi = (params) => { + return request.get('/material/base/receive/getDataReceive', { + params + }) +} +// 接收设备详情 +export const receiveNotificationsDetailsApi = (params) => { + return request.get('/material/base/receive/getDataReceiveDetails', { + params + }) +} + diff --git a/src/api/login.js b/src/api/login.js index eab4630..d04e7fc 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -1,7 +1,7 @@ import request from '@/utils/request' // 登录方法 -export function login(username, password, code, uuid) { +export function login(username, password, code, uuid, textCode) { return request({ url: '/auth/login', headers: { @@ -10,7 +10,7 @@ export function login(username, password, code, uuid) { }, method: 'post', timeout: 20000, - data: { username, password, code, uuid } + data: { username, password, code, uuid, textCode } }) } diff --git a/src/router/index.js b/src/router/index.js index 1ec2065..deba38d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -29,7 +29,7 @@ import Layout from '@/layout' */ import Login from '@/views/login.vue' import nwLogin from '@/views/nw-login.vue' -const comLogin = process.env.VUE_APP_ENV === 'production-nw' ? nwLogin : Login +const comLogin = process.env.VUE_APP_ENV === 'production-nw' || process.env.VUE_APP_ENV === 'development-nw' ? nwLogin : Login // 公共路由 export const constantRoutes = [ diff --git a/src/store/modules/user.js b/src/store/modules/user.js index f8d66d1..440c035 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -45,8 +45,9 @@ const user = { // const password = userInfo.password const code = userInfo.code const uuid = userInfo.uuid + const textCode = userInfo.textCode return new Promise((resolve, reject) => { - login(username, password, code, uuid).then(res => { + login(username, password, code, uuid, textCode).then(res => { let data = res.data localStorage.setItem('isCode', data.code || '') setToken(data.access_token) diff --git a/src/views/claimAndreturn/return/receive/component/handlePage.vue b/src/views/claimAndreturn/return/receive/component/handlePage.vue index 5b2ad0f..03b43b9 100644 --- a/src/views/claimAndreturn/return/receive/component/handlePage.vue +++ b/src/views/claimAndreturn/return/receive/component/handlePage.vue @@ -151,6 +151,12 @@ prop="typeCode" :show-overflow-tooltip="true" /> + @@ -174,7 +180,7 @@ (scope.row.partNum = scope.row.manageType == 0 || scope.row.manageType == 1 - ? scope.row.num + ? scope.row.maxBackNum : scope.row.partNum) }} @@ -210,7 +216,7 @@ v-if=" !isView && scope.row.manageType == '0' && - scope.row.num > 0 && + scope.row.maxBackNum > 0 && (userId == scope.row.userId || userId == 1) " > @@ -224,7 +230,7 @@ !isView && (scope.row.manageType == '1' || scope.row.manageType == '2') && - scope.row.num > 0 && + scope.row.maxBackNum > 0 && (userId == scope.row.userId || userId == 1) " > @@ -236,7 +242,7 @@ @click="handleBackup(scope.row)" v-if=" !isView && - scope.row.num < scope.row.preNum - scope.row.finishedBackNum && + scope.row.inCompletedBackNum > 0 && (userId == scope.row.userId || userId == 1) " > @@ -542,7 +548,7 @@ :show-overflow-tooltip="true" /> -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - 搜索 - 重置 - - + +
+ + + + + + + + + - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + 搜索 + 重置 + 导出 + + - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
二维码编号:{{ rowObj.qrCode }}
+
+ +
+ +
+
+ +
- diff --git a/src/views/warehouseManage/pushAndAccept/index.vue b/src/views/warehouseManage/pushAndAccept/index.vue new file mode 100644 index 0000000..bc6e282 --- /dev/null +++ b/src/views/warehouseManage/pushAndAccept/index.vue @@ -0,0 +1,251 @@ + + + + + diff --git a/src/views/warehouseManage/pushAndAccept/pushAndAcceptDetail.vue b/src/views/warehouseManage/pushAndAccept/pushAndAcceptDetail.vue new file mode 100644 index 0000000..3fccf1b --- /dev/null +++ b/src/views/warehouseManage/pushAndAccept/pushAndAcceptDetail.vue @@ -0,0 +1,576 @@ + + + + + diff --git a/src/views/warehouseManage/rentalEquipmentManagement/index.vue b/src/views/warehouseManage/rentalEquipmentManagement/index.vue new file mode 100644 index 0000000..3110331 --- /dev/null +++ b/src/views/warehouseManage/rentalEquipmentManagement/index.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/vue.config.js b/vue.config.js index 199a6fb..3a1d6c9 100644 --- a/vue.config.js +++ b/vue.config.js @@ -42,9 +42,9 @@ module.exports = { // target: `https://test-cc.zhgkxt.com`,//线上环境-南网 // target: `https://z.csgmall.com.cn`, - target: `http://192.168.2.152:39080`, //超 + // target: `http://192.168.2.152:39080`, //超 // target: `http://10.40.92.81:8080`, //韩/ - // target: `http://192.168.2.81:39080`,//旭/ + target: `http://192.168.2.81:49080`,//旭/ // target: `http://10.40.92.138:28080`, //帅 // target: `http://192.168.2.218:39080`, //福 // target: `http://192.168.2.120:39080`, //跃 @@ -79,19 +79,18 @@ module.exports = { name: name, resolve: { alias: { - '@': resolve('src') - } + '@': resolve('src'), + }, }, plugins: [ - // http://doc.bonus.vip/bonus-vue/other/faq.html#使用gzip解压缩静态文件 + // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件 new CompressionPlugin({ - cache: false, // 不启用文件缓存 - test: /\.(js|css|html|jpe?g|png|gif|svg)?$/i, // 压缩文件格式 - filename: '[path][base].gz[query]', // 压缩后的文件名 - algorithm: 'gzip', // 使用gzip压缩 - minRatio: 0.8, // 压缩比例,小于 80% 的文件不会被压缩 - deleteOriginalAssets: false // 压缩后删除原文件 - }) + cache: false, // 不启用文件缓存 + test: /\.(js|css|html)?$/i, // 压缩文件格式 + filename: '[path].gz[query]', // 压缩后的文件名 + algorithm: 'gzip', // 使用gzip压缩 + minRatio: 0.8, // 压缩率小于1才会压缩 + }), ], }, chainWebpack(config) { @@ -99,10 +98,7 @@ module.exports = { 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') .test(/\.svg$/) @@ -111,7 +107,7 @@ module.exports = { .use('svg-sprite-loader') .loader('svg-sprite-loader') .options({ - symbolId: 'icon-[name]' + symbolId: 'icon-[name]', }) .end() @@ -119,10 +115,12 @@ module.exports = { config .plugin('ScriptExtHtmlWebpackPlugin') .after('html') - .use('script-ext-html-webpack-plugin', [{ - // `runtime` must same as runtimeChunk name. default is `runtime` - inline: /runtime\..*\.js$/ - }]) + .use('script-ext-html-webpack-plugin', [ + { + // `runtime` must same as runtimeChunk name. default is `runtime` + inline: /runtime\..*\.js$/, + }, + ]) .end() config.optimization.splitChunks({ @@ -132,23 +130,28 @@ module.exports = { name: 'chunk-libs', test: /[\\/]node_modules[\\/]/, priority: 10, - chunks: 'initial' // only package third parties that are initially dependent + 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 + 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 - } - } + reuseExistingChunk: true, + }, + }, }) - config.optimization.runtimeChunk('single') - }) - } + + config.optimization.runtimeChunk("single"), + { + from: path.resolve(__dirname, "./public/robots.txt"), //防爬虫文件 + to: "./", //到根目录下 + }; + }); + }, }