This commit is contained in:
caoxinyu
2018-12-05 11:03:40 +08:00
132 changed files with 9929 additions and 1499 deletions

View File

@@ -79,9 +79,6 @@ export default {
})
}
}
if (this[carrier].length !== 0) {
this[carrier] = response.data[0][select[0]]
}
})
} else {
requestData(param).then(response => { // 这个方法没什么难度,不注释了
@@ -139,7 +136,7 @@ export default {
// 3接受值数组一般是['table','total','loading']顺序不能变
Vue.prototype.getTable = function(requestData, param, e) {
requestData(...param).then(response => {
const data = response.data.rows ? response.data.rows : response.data
const data = response.data.rows
this[e[0]] = []
this[e[1]] = 0
if (data && data.length > 0) {
@@ -159,9 +156,7 @@ export default {
// console.log('暂无数据')
}
}).then(() => {
if (this[e[2]]) {
this[e[2]] = false
}
this[e[2]] = false
})
}
// 添加表格数据
@@ -172,6 +167,7 @@ export default {
// 4) 回调函数,必须
Vue.prototype.addTable = function(requestData, param, form, callback) {
if (type(callback) === 'function' && type(requestData) === 'function' && type(form) === 'string') {
console.log(this.$refs[form])
this.$refs[form].validate((valid) => {
if (valid) {
requestData(...param).then(response => {

View File

@@ -3,15 +3,29 @@ import axios from 'axios'
// import store from '../store'
// import { getToken } from '@/utils/auth'
export const wsuri = `ws://192.168.1.128:61101//WebMoudule//websocket`
export const wsuri = `ws://192.168.1.149:61101//WebMoudule//websocket`
export const name = `OP8888`
// 创建axios实例
export const upload = `http://localhost:8411/submit/uploadFile.ashx`
export const download = `http://localhost:8411/submit/downloadFile.ashx`
const service = axios.create({
<<<<<<< HEAD
baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
=======
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
>>>>>>> 7cdb10d153358b72f95165dd7f3a12ad7675f14d
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
baseURL: `http://192.168.0.105:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.137.85:8411/submit/MESCommonBase.ashx`, // 李鑫
// baseURL: `http://192.168.1.112:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间
})