Compare commits

..

No commits in common. 'dev' and 'master' have entirely different histories.
dev ... master

@ -1,3 +0,0 @@
VUE_APP_API_BASE=http://192.168.31.140:9998
template=./public/index-dev.html
outputDir=serve

@ -14,17 +14,15 @@
"babel-polyfill": "^6.26.0",
"clipboard": "^2.0.8",
"element-china-area-data": "^5.0.2",
"element-ui": "^2.15.13",
"element-ui": "^2.15.7",
"file-saver": "^2.0.2",
"fuse.js": "6.4.3",
"js-cookie": "^2.2.0",
"mockjs": "^1.0.1-beta3",
"node-sass": "^6.0.1",
"nprogress": "^0.2.0",
"pinyin": "^2.10.2",
"sass": "^1.32.8",
"screenfull": "^5.0.2",
"useless-files-webpack-plugin": "^1.0.1",
"vue": "2.6.12",
"vue": "2.5.16",
"vue-clipboard2": "^0.3.3",
"vue-router": "^3.0.1",
"vue2-verify": "^1.1.5",
@ -40,8 +38,8 @@
"@vue/test-utils": "^1.0.0-beta.16",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^23.0.1",
"sass-loader": "^8.0.2",
"vue-template-compiler": "2.6.12"
"sass-loader": "^7.0.1",
"vue-template-compiler": "2.5.16"
},
"browserslist": [
"> 1%",

@ -11,18 +11,16 @@ import "../../public/config.json";
import axios from "axios";
import myReq from "@/utils/axios";
// let BASE_URL = "";
let BASE_URL = process.env.VUE_APP_API_BASE;
let BASE_URL = "";
let SERVER_IP = "";
let ROUTER_MODE = "";
let IMG_BASE_URL = BASE_URL;
export {BASE_URL, ROUTER_MODE, IMG_BASE_URL, SERVER_IP};
let url = process.env.VUE_APP_API_BASE;
// axios.get('./config.json').then((res) => {
axios.get('./config.json').then((res) => {
// 基础地址
// BASE_URL = res.data.BASE_URL;
// SERVER_IP = res.data.SERVER_IP;
BASE_URL = res.data.BASE_URL;
SERVER_IP = res.data.SERVER_IP;
myReq.defaults.baseURL = BASE_URL;
// });
});

@ -19,7 +19,7 @@ import {addDateRange,selectDictLabel} from '@/utils/tools';
import "./assets/icons/iconfont";
import IconSvg from "./components/common/IconSvg.vue"; // svg组件
// import { BASE_URL } from "./config/app"
import { BASE_URL } from "./config/app"
import axios from "axios";
import "../public/config.json";
import myReq from "./utils/axios"
@ -37,22 +37,18 @@ Vue.config.silent = true;
Vue.config.productionTip = false;
Vue.prototype.selectDictLabel = selectDictLabel;
let getUrl = "";
let url = process.env.VUE_APP_API_BASE;
let startApp = function () {
// axios.get('./config.json').then((res) => {
axios.get('./config.json').then((res) => {
// 基础地址
getUrl = url;
getUrl = res.data.BASE_URL;
myReq.defaults.baseURL = getUrl;
// // 基础地址
// getUrl = res.data.BASE_URL;
// myReq.defaults.baseURL = getUrl;
new Vue({
router,
store,
render: h => h(App)
}).$mount("#app");
// });
});
};
startApp();

@ -53,9 +53,6 @@ service.interceptors.response.use(
});
});
}
// else if(data.code!=20000){
// Message.error(data.message)
// }
}
return data;
},

@ -1,83 +0,0 @@
/**
* @param {string} path
* @returns {Boolean}
*/
export function isExternal(path) {
return /^(https?:|mailto:|tel:)/.test(path)
}
/**
* @param {string} str
* @returns {Boolean}
*/
export function validUsername(str) {
const valid_map = ['admin', 'editor']
return valid_map.indexOf(str.trim()) >= 0
}
/**
* @param {string} url
* @returns {Boolean}
*/
export function validURL(url) {
const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
return reg.test(url)
}
/**
* @param {string} str
* @returns {Boolean}
*/
export function validLowerCase(str) {
const reg = /^[a-z]+$/
return reg.test(str)
}
/**
* @param {string} str
* @returns {Boolean}
*/
export function validUpperCase(str) {
const reg = /^[A-Z]+$/
return reg.test(str)
}
/**
* @param {string} str
* @returns {Boolean}
*/
export function validAlphabets(str) {
const reg = /^[A-Za-z]+$/
return reg.test(str)
}
/**
* @param {string} email
* @returns {Boolean}
*/
export function validEmail(email) {
const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
return reg.test(email)
}
/**
* @param {string} str
* @returns {Boolean}
*/
export function isString(str) {
if (typeof str === 'string' || str instanceof String) {
return true
}
return false
}
/**
* @param {Array} arg
* @returns {Boolean}
*/
export function isArray(arg) {
if (typeof Array.isArray === 'undefined') {
return Object.prototype.toString.call(arg) === '[object Array]'
}
return Array.isArray(arg)
}

@ -388,12 +388,11 @@ export default {
});
},
init() {
// axios.get("./config.json").then(res => {
// //
// let response = res.data.BASE_URL;
// this.uploadFileUrl = response + "/udiwms/busstiness/file/upload";
// });
this.uploadFileUrl = process.env.VUE_APP_API_BASE +"/udiwms/busstiness/file/upload";
axios.get("./config.json").then(res => {
//
let response = res.data.BASE_URL;
this.uploadFileUrl = response + "/udiwms/busstiness/file/upload";
});
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,

@ -840,12 +840,11 @@ export default {
}
},
init() {
// axios.get("./config.json").then(res => {
// //
// let response = res.data.BASE_URL;
// this.uploadFileUrl = response + "/spms/inv/warehouse/uploadJson";
// });
this.uploadFileUrl = process.env.VUE_APP_API_BASE +"/spms/inv/warehouse/uploadJson";
axios.get("./config.json").then(res => {
//
let response = res.data.BASE_URL;
this.uploadFileUrl = response + "/spms/inv/warehouse/uploadJson";
});
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token

@ -162,7 +162,7 @@ export default {
.tags-li.active {
color: #ffffff;
background: #409EFF;
background: #6495ed;
}
.tags-li-title {

@ -132,7 +132,6 @@
</div>
</el-dialog>
</el-header>
<vTags/>
<!--遮板-->
<div

@ -133,7 +133,7 @@ export default {
center: true,
type: "warning"
});
return false;
return;
}
this.$refs["ruleForm"].validate((valid) => {
if (valid) {

@ -182,8 +182,7 @@
<el-select v-model="editLogin.invCode"
style="width: 35%;"
:disabled="targetPlatformEdit"
placeholder="目标仓库信息"
@change="locInvChange"
placeholder="目标仓库信息" @change="locInvChange"
clearable>
<el-option
v-for="item in targetInvs"
@ -198,7 +197,7 @@
</el-col>
</el-row>
<!-- <el-row :gutter="20" class="el-row" type="flex">
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="20" class="el-col" type="flex">
<div class="text item">
<el-form-item label="目标分库" prop="invSubCode">
@ -218,7 +217,7 @@
</el-form-item>
</div>
</el-col>
</el-row> -->
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="15" class="el-col" type="flex">
@ -330,11 +329,11 @@ export default {
{required: true, message: "请选择自助平台", trigger: "change"}
],
invCode: [
{required: true, message: "请选择目标仓库", trigger: "change"}
{required: true, message: "请选择目标分库", trigger: "change"}
],
invSubCode: [
{required: true, message: "请选择目标分库", trigger: 'change'}
],
// invSubCode: [
// {required: true, message: "", trigger: 'change'}
// ],
platformUsername: [
{required: true, message: "请输入账号", trigger: "change"}
],
@ -423,8 +422,8 @@ export default {
this.curPlatformId = row.platformId;
this.getTargetInv();
// this.getTargetSubInv();
// this.getTargetActions();
this.getTargetSubInv();
this.getTargetActions();
}).catch(() => {
});
} else {
@ -485,9 +484,6 @@ export default {
this.loading = false;
this.platformList = [];
});
},
change(){
},
unitChange(value) {
this.editLogin.unitId = value;
@ -497,7 +493,7 @@ export default {
this.curPlatformId = value;
this.targetPlatformEdit = true;
//
// this.getTargetInv(value);
this.getTargetInv(value);
},
getTargetActions() {
@ -642,13 +638,7 @@ export default {
this.getList();
},
locInvChange() {
this.targetAction = null
let index = this.targetInvs.findIndex(i=>i.code==this.editLogin.invCode);
if(index!=-1){
this.targetActions = this.targetInvs[index].bussinessTypeList||[]
this.editLogin.invSubCode = this.targetInvs[index].deptCode||''
}
// this.getTargetSubInv();
this.getTargetSubInv();
},
locSubInvChange() {
@ -657,15 +647,15 @@ export default {
testUserInfo() {
if (isBlank(this.editLogin.platformId)) {
this.$message.error("请选择自助平台");
return false;
return;
}
if (isBlank(this.editLogin.platformUsername)) {
this.$message.error("请输入用户名");
return false;
return;
}
if (isBlank(this.editLogin.platformPassword)) {
this.$message.error("请输入密码");
return false;
return;
}
let data = {
platformId: this.editLogin.platformId,
@ -675,18 +665,6 @@ export default {
testUserInfo(data).then((res) => {
if (res.code === 20000) {
this.targetPlatformEdit = false;
this.targetInvs = res.data?res.data.invList || []:[];
if(this.editLogin.invCode){
let index = this.targetInvs.findIndex(i=>i.code==this.editLogin.invCode);
if(index!=-1){
this.targetActions = this.targetInvs[index].bussinessTypeList||[]
this.editLogin.invSubCode = this.targetInvs[index].deptCode||''
}
}
this.editLogin.appid = res.data.license.appid
this.editLogin.appKey = res.data.license.appKey
this.editLogin.sceretKey = res.data.license.sceretKey
this.$message.success("验证成功");
} else {
this.$message.error(res.message);

@ -1,15 +1,10 @@
const UselessFile = require('useless-files-webpack-plugin');
module.exports = {
devServer:{
port: 8089,
open: true
},
lintOnSave:false,
baseUrl: process.env.NODE_ENV === "production"|| "test" ? "./" : "/",
baseUrl: process.env.NODE_ENV === "production" ? "./" : "/",
outputDir: process.env.outputDir,
configureWebpack: config => {
if (process.env.NODE_ENV === "production" || process.env.NODE_ENV === "test" ) {
if (process.env.NODE_ENV === "production") {
// 为生产环境修改配置...
config.externals = {
vue: "Vue",

Loading…
Cancel
Save