diff --git a/.env.development b/.env.development
index 3d5a50f..a8d313a 100644
--- a/.env.development
+++ b/.env.development
@@ -5,7 +5,7 @@ VUE_APP_TITLE = 供应商自助管理系统
ENV = 'development'
# 若依管理系统/开发环境
-VUE_APP_BASE_API = '/dev-api'
+VUE_APP_BASE_API = 'http://localhost:9993/dev-api/'
# 应用访问路径 例如使用前缀 /admin/
VUE_APP_CONTEXT_PATH = '/'
diff --git a/package.json b/package.json
index 57441c3..c77df60 100644
--- a/package.json
+++ b/package.json
@@ -5,8 +5,8 @@
"author": "LionLi",
"license": "MIT",
"scripts": {
- "dev": "vue-cli-service serve",
- "build:prod": "vue-cli-service build",
+ "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode development",
+ "build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode production",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src"
},
diff --git a/src/api/basic/basicHospType.js b/src/api/basic/basicHospType.js
index 766b347..b7a7d02 100644
--- a/src/api/basic/basicHospType.js
+++ b/src/api/basic/basicHospType.js
@@ -13,12 +13,21 @@ export function getBasicHospType(query) {
export function getListMenu(query) {
return axios({
url: "/udiwms/basic/hosp/type/menuList",
+ method: "post",
+ data: query
+ });
+}
+
+export function getOneName(query) {
+ return axios({
+ url: "/udiwms/basic/hosp/type/getOneName",
method: "get",
params: query
});
}
+
export function saveBasicHospType(query) {
return axios({
url: "/udiwms/basic/hosp/type/save",
diff --git a/src/api/sync/spsSyncStatus.js b/src/api/sync/spsSyncStatus.js
index d3425b4..091be2f 100644
--- a/src/api/sync/spsSyncStatus.js
+++ b/src/api/sync/spsSyncStatus.js
@@ -43,3 +43,12 @@ export function updateConfig(query) {
});
}
+export function infoByStatus(query) {
+ return axios({
+ url: "/spssync/basic/udiinfo/infoByStatus",
+ method: "post",
+ data: query,
+ responseType: 'blob'
+ });
+}
+
diff --git a/src/utils/request.js b/src/utils/request.js
index b02dfd7..86a9ce2 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -86,7 +86,7 @@ service.interceptors.response.use(res => {
if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') {
return res.data
}
- if (code === 401) {
+ if (code === 2) {
if (!isRelogin.show) {
isRelogin.show = true;
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
diff --git a/src/views/basic/business/stockOrder.vue b/src/views/basic/business/stockOrder.vue
index 2f8f704..7fc3c66 100644
--- a/src/views/basic/business/stockOrder.vue
+++ b/src/views/basic/business/stockOrder.vue
@@ -152,7 +152,7 @@
-
+
-
+
diff --git a/src/views/basic/product/productEdit.vue b/src/views/basic/product/productEdit.vue
index ae69725..0553ef8 100644
--- a/src/views/basic/product/productEdit.vue
+++ b/src/views/basic/product/productEdit.vue
@@ -578,7 +578,7 @@ import ProductSingleEdit from "@/views/basic/product/productSingleEdit";
import selectErp from "./udiInfoselectErpUdi";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import Treeselect from "@riophae/vue-treeselect";
-import {getListMenu} from "@/api/basic/basicHospType";
+import { getListMenu, getOneName } from '@/api/basic/basicHospType'
export default {
@@ -849,12 +849,15 @@ export default {
}
},
getTreeselect() {
- getListMenu().then(response => {
- this.fromDeptOptions = [];
- const menu = {id: 0, name: '主类目', children: []};
- menu.children = this.handleTree(response.data, "code", "parentCode");
- this.fromDeptOptions.push(menu);
- });
+ getOneName().then(res =>{
+ const menu = {id: res.data.id,code:res.data.code, name: res.data.name, children: []};
+ getListMenu({}).then(response => {
+ this.fromDeptOptions = [];
+ menu.children = this.handleTree(response.data,"code", "parentCode");
+ console.log(menu)
+ this.fromDeptOptions.push(menu);
+ });
+ })
},
/** 转换菜单数据结构 */
normalizer(node) {
diff --git a/src/views/basic/product/productUdiType.vue b/src/views/basic/product/productUdiType.vue
index fb186aa..1dc4bdd 100644
--- a/src/views/basic/product/productUdiType.vue
+++ b/src/views/basic/product/productUdiType.vue
@@ -32,7 +32,7 @@
新增
- 编辑
+ 编辑
删除
绑定
解绑
@@ -54,10 +54,11 @@
@@ -133,7 +134,7 @@
diff --git a/src/views/thirdSys/corps/thrCorpsExport.vue b/src/views/thirdSys/corps/thrCorpsExport.vue
index 421f914..e5c3e24 100644
--- a/src/views/thirdSys/corps/thrCorpsExport.vue
+++ b/src/views/thirdSys/corps/thrCorpsExport.vue
@@ -71,6 +71,7 @@ import {formatDate} from "@/utils/date";
export default {
data() {
return {
+ BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true,
filterQuery: {
genKey: null,
@@ -154,8 +155,7 @@ export default {
this.thrCorpSelectVisible = true;
},
downloadExcel(row) {
- axios.get("./config.json").then(res => {
- let baseUrl = res.data.BASE_URL;
+ let baseUrl = this.BASE_URL
let href = baseUrl + "/udiwms/thrCorp/exportLog/download" +
"?genKey=" + row.genKey;
let a = document.createElement("a");
@@ -170,7 +170,6 @@ export default {
a.click();
this.getList();
});
- });
},
cancelDialog(val) {
diff --git a/src/views/thirdSys/corps/thrCorpsExportSmp.vue b/src/views/thirdSys/corps/thrCorpsExportSmp.vue
index 02398d7..69950a0 100644
--- a/src/views/thirdSys/corps/thrCorpsExportSmp.vue
+++ b/src/views/thirdSys/corps/thrCorpsExportSmp.vue
@@ -68,6 +68,7 @@ import axios from "axios";
export default {
data() {
return {
+ BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true,
filterQuery: {
genKey: null,
@@ -153,8 +154,7 @@ export default {
this.thrCorpSelectVisible = true;
},
downloadExcel(row) {
- axios.get("./config.json").then(res => {
- let baseUrl = res.data.BASE_URL;
+ let baseUrl = this.BASE_URL;
let href = baseUrl + "/udiwms/thrCorp/exportLog/download" +
"?genKey=" + row.genKey;
let a = document.createElement("a");
@@ -171,7 +171,6 @@ export default {
a.click();
this.getList();
});
- });
},
cancelDialog(val) {
diff --git a/src/views/thirdSys/invProducts/thrInvProductsExport.vue b/src/views/thirdSys/invProducts/thrInvProductsExport.vue
index 8958620..4d5d91f 100644
--- a/src/views/thirdSys/invProducts/thrInvProductsExport.vue
+++ b/src/views/thirdSys/invProducts/thrInvProductsExport.vue
@@ -108,6 +108,7 @@ import axios from "axios";
export default {
data() {
return {
+ BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true,
filterQuery: {
genKey: null,
@@ -191,8 +192,8 @@ export default {
this.thrInvProductsSelectVisible = true;
},
downloadExcel(row) {
- axios.get("./config.json").then(res => {
- let baseUrl = res.data.BASE_URL;
+
+ let baseUrl = this.BASE_URL;
let href = baseUrl + "/udiwms/invProducts/exportLog/download" + "?genKey=" + row.genKey;
let a = document.createElement("a");
fetch(href)
@@ -208,10 +209,6 @@ export default {
a.click();
this.getList();
});
-
- });
-
-
},
cancelDialog(val) {
diff --git a/src/views/thirdSys/order/thrOrderExport.vue b/src/views/thirdSys/order/thrOrderExport.vue
index 24b01ed..68f266c 100644
--- a/src/views/thirdSys/order/thrOrderExport.vue
+++ b/src/views/thirdSys/order/thrOrderExport.vue
@@ -75,6 +75,7 @@ import {formatDate} from "@/utils/date";
export default {
data() {
return {
+ BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true,
filterQuery: {
type: 1,
@@ -158,8 +159,7 @@ export default {
this.thrOrderSelectVisible = true;
},
downloadExcel(row) {
- axios.get("./config.json").then(res => {
- let baseUrl = res.data.BASE_URL;
+ let baseUrl = this.BASE_URL
let href = baseUrl + "/udiwms/thrOrder/exportLog/download" + "?genKey=" + row.genKey;
let a = document.createElement("a");
var timestamp = formatDate(new Date(), "yyyyMMddhhmmss")
@@ -173,7 +173,6 @@ export default {
a.click();
this.getList();
});
- });
},
cancelDialog(val) {
diff --git a/src/views/thirdSys/product/thrProductsExport.vue b/src/views/thirdSys/product/thrProductsExport.vue
index cc9d415..5d0be0c 100644
--- a/src/views/thirdSys/product/thrProductsExport.vue
+++ b/src/views/thirdSys/product/thrProductsExport.vue
@@ -78,6 +78,7 @@ import {formatDate} from "../../../utils/date";
export default {
data() {
return {
+ BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true,
filterQuery: {
genKey: null,
@@ -158,8 +159,7 @@ export default {
this.thrProductsSelectVisible = true;
},
downloadExcel(row) {
- axios.get("./config.json").then(res => {
- let baseUrl = res.data.BASE_URL;
+ let baseUrl = this.BASE_URL;
let href = baseUrl + "/udiwms/thrProducts/exportLog/download" + "?genKey=" + row.genKey;
let a = document.createElement("a");
var timestamp = formatDate(new Date(), "yyyyMMddhhmmss")
@@ -173,8 +173,6 @@ export default {
a.click();
this.getList();
});
- });
-
},
cancelDialog(val) {
diff --git a/vue.config.js b/vue.config.js
index f9d3b19..2eee3de 100644
--- a/vue.config.js
+++ b/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 || "UDI自助平台"; // 网页标题
+const name = process.env.VUE_APP_TITLE || 'UDI自助平台' // 网页标题
-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
@@ -20,112 +20,117 @@ module.exports = {
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath: process.env.VUE_APP_CONTEXT_PATH,
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
- outputDir: "UDI_SPMS_CLIENT",
+ outputDir: 'UDI_SPMS_CLIENT',
// 用于放置生成的静态资源 (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: false,
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
- target: `http://192.168.0.66:9160/UDI_SPMS_SERVER/`,
+ target: process.env.VUE_APP_BASE_API,
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("icons")
+ .rule('svg')
+ .exclude.add(resolve('src/assets/icons'))
+ .end()
+ config.module
+ .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", [
- {
+ 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
- priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
- test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
- },
- 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: "./", //到根目录下
- };
- });
- },
-};
+ 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
+ priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
+ test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
+ },
+ 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: './' //到根目录下
+ }
+ }
+ )
+ }
+}