Commit 30a06f86 by 吕海涛

修改订单运维bug

parent 63287d2d
...@@ -6,16 +6,16 @@ VUE_APP_BASE_API1 = 'https://apps.xoado.com' ...@@ -6,16 +6,16 @@ VUE_APP_BASE_API1 = 'https://apps.xoado.com'
VUE_APP_BASE_API2 = 'https://core.xoado.com' VUE_APP_BASE_API2 = 'https://core.xoado.com'
VUE_APP_BASE_API2_ = 'https://core.xoado.com' VUE_APP_BASE_API2_ = 'https://core.xoado.com'
VUE_APP_BASE_API3 = 'https://api.xoado.com' VUE_APP_BASE_API3 = 'https://api.xoado.com'
VUE_APP_BASE_API4 = 'https://hgxd.99zcx.com' VUE_APP_BASE_API4 = 'http://aitransport.xoado.com'
VUE_APP_BASE_API5 = 'http://192.168.0.251:8181/brand' VUE_APP_BASE_API5 = 'http://aitransport.xoado.com/brand'
VUE_APP_BASE_API6 = 'http://192.168.0.251:8182/transport' VUE_APP_BASE_API6 = 'https://projects.xoado.com/transport'
VUE_APP_BASE_API7 = 'http://192.168.0.251:8185/operate' VUE_APP_BASE_API7 = 'https://projects.xoado.com/operate'
VUE_APP_BASE_API8 = 'http://192.168.0.251:8183/trace' VUE_APP_BASE_API8 = 'https://projects.xoado.com/trace'
VUE_APP_BASE_API9 = 'http://192.168.0.251:8195/payment/' VUE_APP_BASE_API9 = 'https://account.xoado.com/payment/'
VUE_APP_BASE_API10 = 'http://192.168.0.251:8195/payment/v1/' VUE_APP_BASE_API10 = 'https://account.xoado.com/payment/v1/'
VUE_APP_BASE_API11 = 'https://oss.xoado.com/v1/' VUE_APP_BASE_API11 = 'https://oss.xoado.com/v1/'
VUE_APP_BASE_API12 = 'http://192.168.0.251:8195' VUE_APP_BASE_API12 = 'https://payment.sdk.xoado.com'
VUE_APP_BASE_API13 = 'https://projects.xoado.com/invoice' VUE_APP_BASE_API13 = 'https://projects.xoado.com/invoice'
VUE_APP_BASE_API14 = 'https://projects.xoado.com/message' VUE_APP_BASE_API14 = 'https://projects.xoado.com/message'
VUE_APP_BASE_API15 = 'http://192.168.0.251:8199/smart' VUE_APP_BASE_API15 = 'https://aitransport.xoado.com/smart'
VUE_APP_BASE_API16 = 'http://xoado.tpddns.net:10001/anc' VUE_APP_BASE_API16 = 'http://xoado.tpddns.net:10001/anc'
...@@ -5,16 +5,16 @@ VUE_APP_BASE_API1 = 'https://apps.xoado.com' ...@@ -5,16 +5,16 @@ VUE_APP_BASE_API1 = 'https://apps.xoado.com'
VUE_APP_BASE_API2 = 'https://core.xoado.com' VUE_APP_BASE_API2 = 'https://core.xoado.com'
VUE_APP_BASE_API2_ = 'https://core.xoado.com' VUE_APP_BASE_API2_ = 'https://core.xoado.com'
VUE_APP_BASE_API3 = 'https://api.xoado.com' VUE_APP_BASE_API3 = 'https://api.xoado.com'
VUE_APP_BASE_API4 = 'https://hgxd.99zcx.com' VUE_APP_BASE_API4 = 'http://aitransport.xoado.com'
VUE_APP_BASE_API5 = 'http://192.168.0.251:8181/brand' VUE_APP_BASE_API5 = 'http://aitransport.xoado.com/brand'
VUE_APP_BASE_API6 = 'http://192.168.0.251:8182/transport' VUE_APP_BASE_API6 = 'https://projects.xoado.com/transport'
VUE_APP_BASE_API7 = 'http://192.168.0.251:8185/operate' VUE_APP_BASE_API7 = 'https://projects.xoado.com/operate'
VUE_APP_BASE_API8 = 'http://192.168.0.251:8183/trace' VUE_APP_BASE_API8 = 'https://projects.xoado.com/trace'
VUE_APP_BASE_API9 = 'http://192.168.0.251:8195/payment/' VUE_APP_BASE_API9 = 'https://account.xoado.com/payment/'
VUE_APP_BASE_API10 = 'http://192.168.0.251:8195/payment/v1/' VUE_APP_BASE_API10 = 'https://account.xoado.com/payment/v1/'
VUE_APP_BASE_API11 = 'https://oss.xoado.com/v1/' VUE_APP_BASE_API11 = 'https://oss.xoado.com/v1/'
VUE_APP_BASE_API12 = 'http://192.168.0.251:8195' VUE_APP_BASE_API12 = 'https://payment.sdk.xoado.com'
VUE_APP_BASE_API13 = 'https://projects.xoado.com/invoice' VUE_APP_BASE_API13 = 'https://projects.xoado.com/invoice'
VUE_APP_BASE_API14 = 'https://projects.xoado.com/message' VUE_APP_BASE_API14 = 'https://projects.xoado.com/message'
VUE_APP_BASE_API15 = 'http://192.168.0.251:8199/smart' VUE_APP_BASE_API15 = 'https://aitransport.xoado.com/smart'
VUE_APP_BASE_API16 = 'http://xoado.tpddns.net:10001/anc' VUE_APP_BASE_API16 = 'http://xoado.tpddns.net:10001/anc'
\ No newline at end of file
...@@ -29,8 +29,8 @@ export default { ...@@ -29,8 +29,8 @@ export default {
await this.mustFun(); await this.mustFun();
}, },
mounted () { mounted () {
console.log(process.env.VUE_APP_BASE_API5) // console.log(process.env.VUE_APP_BASE_API5)
console.log(process.env.VUE_APP_BASE_API6) // console.log(process.env.VUE_APP_BASE_API6)
this.GetPlatformCode() this.GetPlatformCode()
this.keepLifeToken() this.keepLifeToken()
}, },
......
...@@ -5,13 +5,13 @@ export default { ...@@ -5,13 +5,13 @@ export default {
for (let i = 0; i < 36; i++) { for (let i = 0; i < 36; i++) {
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1); s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
} }
s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010 s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01 s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
s[8] = s[13] = s[18] = s[23] = ""; s[8] = s[13] = s[18] = s[23] = "";
let uuid = s.join(""); let uuid = s.join("");
console.log(uuid) // console.log(uuid)
return uuid return uuid
} }
} }
\ No newline at end of file
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
if (allList[0].path !== '/' && allList[0].path !== '/dashbord') { if (allList[0].path !== '/' && allList[0].path !== '/dashbord') {
allList.unshift({path: '/', meta: {title: '首页'}}) allList.unshift({path: '/', meta: {title: '首页'}})
} }
console.log(allList) // console.log(allList)
this.breadList = allList this.breadList = allList
}, },
immediate: true immediate: true
......
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
} }
}, },
created() { created() {
console.info(this.listData); // console.info(this.listData);
}, },
methods: { methods: {
/** /**
......
...@@ -35,9 +35,9 @@ export default { ...@@ -35,9 +35,9 @@ export default {
}, },
watch: { watch: {
polylines(newValue) { polylines(newValue) {
console.log(newValue); // console.log(newValue);
if (newValue.length > 0) { if (newValue.length > 0) {
console.log("我的值变化了"); // console.log("我的值变化了");
this.reload(newValue); this.reload(newValue);
} }
}, },
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
o.clearMap(); // 清除覆盖物 o.clearMap(); // 清除覆盖物
o.setMapStyle("amap://styles/macaron"); // 自定义的高德地图的样式,我选的是马卡龙 o.setMapStyle("amap://styles/macaron"); // 自定义的高德地图的样式,我选的是马卡龙
if (that.type.includes("driving")) { if (that.type.includes("driving")) {
console.log(that.startLng, that.startLat); // console.log(that.startLng, that.startLat);
// 点图标 // 点图标
let marker = new AMap.Marker({ let marker = new AMap.Marker({
position: [that.startLng, that.startLat] position: [that.startLng, that.startLat]
...@@ -64,13 +64,13 @@ export default { ...@@ -64,13 +64,13 @@ export default {
o.setZoomAndCenter(16, [that.startLng, that.startLat]); o.setZoomAndCenter(16, [that.startLng, that.startLat]);
marker.setMap(o); marker.setMap(o);
o.setFitView(); o.setFitView();
console.log(1111111111); // console.log(1111111111);
o.plugin(["AMap.Driving"], function() { o.plugin(["AMap.Driving"], function() {
var driving = new AMap.Driving({ var driving = new AMap.Driving({
map: o, map: o,
policy: "REAL_TRAFFIC" policy: "REAL_TRAFFIC"
}); });
console.log(22222222); // console.log(22222222);
driving.search( driving.search(
new AMap.LngLat(that.startLng, that.startLat), new AMap.LngLat(that.startLng, that.startLat),
new AMap.LngLat(that.endLng, that.endLat), new AMap.LngLat(that.endLng, that.endLat),
...@@ -80,13 +80,13 @@ export default { ...@@ -80,13 +80,13 @@ export default {
}, },
function(status, result) { function(status, result) {
if (status === "complete") { if (status === "complete") {
console.log("绘制成功"); // console.log("绘制成功");
} else { } else {
console.log("绘制失败", result); // console.log("绘制失败", result);
} }
} }
); );
console.log(33333333); // console.log(33333333);
o.addControl(driving); o.addControl(driving);
// driving.search( // driving.search(
// new AMap.LngLat(that.startLng, that.startLat), // new AMap.LngLat(that.startLng, that.startLat),
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
} }
}, },
click: e => { click: e => {
console.info(e); // console.info(e);
}, },
mouseover: e => { mouseover: e => {
// e.target.setOptions({ // e.target.setOptions({
......
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
Select = val; Select = val;
} }
} else if (!val.includes("999")) { } else if (!val.includes("999")) {
console.log("------取消全选----"); // console.log("------取消全选----");
if (val.length === dataSource.length) { if (val.length === dataSource.length) {
if (oldVal.length === dataSource.length - 1) { if (oldVal.length === dataSource.length - 1) {
Select = ["999"].concat(allValues); Select = ["999"].concat(allValues);
......
...@@ -674,7 +674,7 @@ export default { ...@@ -674,7 +674,7 @@ export default {
} }
}, },
platformText(name) { platformText(name) {
console.log('这里是name') // console.log('这里是name')
switch (name) { switch (name) {
case '61fdff1d455c4ab8a2efc564c245b905': case '61fdff1d455c4ab8a2efc564c245b905':
return '安化玖玖' return '安化玖玖'
......
...@@ -319,7 +319,7 @@ Paho.MQTT = (function(global) { ...@@ -319,7 +319,7 @@ Paho.MQTT = (function(global) {
remLength += UTF8Length(this.password) + 2; remLength += UTF8Length(this.password) + 2;
break; break;
// Subscribe, Unsubscribe can both contain topic strings // Subscribe, Unsubscribe can both contain topic strings
case MESSAGE_TYPE.SUBSCRIBE: case MESSAGE_TYPE.SUBSCRIBE:
first |= 0x02; // Qos = 1; first |= 0x02; // Qos = 1;
for (var i = 0; i < this.topics.length; i++) { for (var i = 0; i < this.topics.length; i++) {
...@@ -434,10 +434,10 @@ Paho.MQTT = (function(global) { ...@@ -434,10 +434,10 @@ Paho.MQTT = (function(global) {
break; break;
// case MESSAGE_TYPE.PUBREC: // case MESSAGE_TYPE.PUBREC:
// case MESSAGE_TYPE.PUBREL: // case MESSAGE_TYPE.PUBREL:
// case MESSAGE_TYPE.PUBCOMP: // case MESSAGE_TYPE.PUBCOMP:
// break; // break;
case MESSAGE_TYPE.SUBSCRIBE: case MESSAGE_TYPE.SUBSCRIBE:
// SUBSCRIBE has a list of topic strings and request QoS // SUBSCRIBE has a list of topic strings and request QoS
...@@ -454,7 +454,7 @@ Paho.MQTT = (function(global) { ...@@ -454,7 +454,7 @@ Paho.MQTT = (function(global) {
break; break;
default: default:
// Do nothing. // Do nothing.
} }
return buffer; return buffer;
...@@ -2169,7 +2169,7 @@ Paho.MQTT = (function(global) { ...@@ -2169,7 +2169,7 @@ Paho.MQTT = (function(global) {
* @throws {InvalidState} if the client is not connected. * @throws {InvalidState} if the client is not connected.
*/ */
this.publish = function(topic, payload, qos, retained) { this.publish = function(topic, payload, qos, retained) {
console.log("Publising message to: ", topic); // console.log("Publising message to: ", topic);
var message; var message;
if (arguments.length === 0) { if (arguments.length === 0) {
...@@ -2412,4 +2412,4 @@ Paho.MQTT = (function(global) { ...@@ -2412,4 +2412,4 @@ Paho.MQTT = (function(global) {
export default Paho; export default Paho;
// return PahoMQTT; // return PahoMQTT;
// }); // });
\ No newline at end of file
...@@ -5,31 +5,31 @@ ...@@ -5,31 +5,31 @@
* @time: 2020/4/13 11:52 AM * @time: 2020/4/13 11:52 AM
* *
*/ */
import {get, post, put} from '@/request/http' import {get, post, put } from '@/request/http'
/* /*
*获取车辆类型 *获取车辆类型
*/ */
export function getCarType() { export function getCarType() {
const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/carType'; const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/carType';
return get(url) return get(url)
} }
/** /**
* 修改车辆类型 * 修改车辆类型
* *
*/ */
export function putcartype(typeId,data) { export function putcartype(typeId, data) {
const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/carType/'+typeId; const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/carType/' + typeId;
return put(url,data) return put(url, data)
} }
/** /**
* 添加车辆类型 * 添加车辆类型
* *
*/ */
export function addputcartype(data) { export function addputcartype(data) {
const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/carType'; const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/carType';
return post(url,data) return post(url, data)
} }
...@@ -41,15 +41,15 @@ export function getCarType() { ...@@ -41,15 +41,15 @@ export function getCarType() {
export function getMarkup() { export function getMarkup() {
const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/addAmount'; const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/addAmount';
return get(url) return get(url)
} }
export function addMarkup(typeId,data) { export function addMarkup(typeId, data) {
const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/addAmount/'+typeId; const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/addAmount/' + typeId;
return put(url,data) return put(url, data)
} }
export function updateMarkup(data) { export function updateMarkup(data) {
const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/addAmount'; const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/addAmount';
return post(url,data) return post(url, data)
} }
/** /**
* 查询围栏 * 查询围栏
...@@ -59,34 +59,33 @@ export function getMarkup() { ...@@ -59,34 +59,33 @@ export function getMarkup() {
export function getselectAll() { export function getselectAll() {
const url = process.env.VUE_APP_BASE_API3 + '/location/penset/selectAll'; const url = process.env.VUE_APP_BASE_API3 + '/location/penset/selectAll';
return get(url) return get(url)
} }
export function addselectAll(data) { export function addselectAll(data) {
console.log(JSON.stringify(data)) // console.log(JSON.stringify(data))
const url = process.env.VUE_APP_BASE_API3 + '/location/fence/addfence'; const url = process.env.VUE_APP_BASE_API3 + '/location/fence/addfence';
return post(url,data) return post(url, data)
} }
export function updateselectAll(data) { export function updateselectAll(data) {
const url = process.env.VUE_APP_BASE_API3 + '/location/fence/updateFence'; const url = process.env.VUE_APP_BASE_API3 + '/location/fence/updateFence';
return put(url,data) return put(url, data)
} }
// cityConfig // cityConfig
/** /**
* 运力城市列表 * 运力城市列表
* https://hgcx.99zcx.com/hgcxconfig/platformConfig/cityConfig?seachStr=&&page=1&&rows=10 * https://hgcx.99zcx.com/hgcxconfig/platformConfig/cityConfig?seachStr=&&page=1&&rows=10
* *
*/ */
export function cityConfig(page,rows,keyword) { export function cityConfig(page, rows, keyword) {
const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/cityConfig?seachStr='+keyword+'&&page='+page+"&&rows="+rows; const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/cityConfig?seachStr=' + keyword + '&&page=' + page + "&&rows=" + rows;
return get(url) return get(url)
} }
export function getcity(parentid) { export function getcity(parentid) {
const url = process.env.VUE_APP_BASE_API3 + '/location/citycode/child/'+parentid; const url = process.env.VUE_APP_BASE_API3 + '/location/citycode/child/' + parentid;
return get(url) return get(url)
} }
export function addcityConfig(data) { export function addcityConfig(data) {
const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/cityConfig'; const url = process.env.VUE_APP_BASE_API4 + '/hgcxconfig/platformConfig/cityConfig';
return post(url,data) return post(url, data)
} }
\ No newline at end of file
...@@ -4,15 +4,15 @@ import { post, get } from "@/request/http"; ...@@ -4,15 +4,15 @@ import { post, get } from "@/request/http";
/* /*
*取消订单 *取消订单
*/ */
export function CancelOrder(id) { export function CancelOrder(u, id) {
const url = process.env.VUE_APP_BASE_API5 + `/xoado/order/cancelNew/${id}`; const url = u + `/xoado/order/cancelNew/${id}`;
return get(url, {}) return get(url, {})
} }
/* /*
*强制完单 *强制完单
*/ */
export function updateBatchOrder(data) { export function updateBatchOrder(u, data) {
const url = process.env.VUE_APP_BASE_API5 + `/xoado/order/update/batch`; const url = u + `/xoado/order/update/batch`;
return post(url, data) return post(url, data)
} }
...@@ -35,7 +35,7 @@ export function getpayInfo(data) { ...@@ -35,7 +35,7 @@ export function getpayInfo(data) {
/* /*
*更改支付状态 *更改支付状态
*/ */
export function paymentchannel(data) { export function paymentchannel(u, data) {
const url = process.env.VUE_APP_BASE_API5 + `/xoado/order/channel/payment`; const url = u + `/xoado/order/channel/payment`;
return post(url, data) return post(url, data)
} }
\ No newline at end of file
...@@ -37,7 +37,7 @@ const mutations = { ...@@ -37,7 +37,7 @@ const mutations = {
sessionStorage.setItem('productJJInfo', payload) sessionStorage.setItem('productJJInfo', payload)
}, },
SET_BRANDLIST(state, payload) { SET_BRANDLIST(state, payload) {
console.log(payload) // console.log(payload)
state.brandList = payload state.brandList = payload
sessionStorage.setItem('brandList', payload) sessionStorage.setItem('brandList', payload)
...@@ -72,9 +72,9 @@ const actions = { ...@@ -72,9 +72,9 @@ const actions = {
/** 测试环境注释 */ /** 测试环境注释 */
res.data.forEach(item => { res.data.forEach(item => {
item.brandUrl = item.brandUrl + '/brand'; item.brandUrl = item.brandUrl + '/brand';
}) })
console.log(res.data); // console.log(res.data);
let data = res.data; let data = res.data;
commit('SET_BRANDLIST', JSON.stringify(data)) commit('SET_BRANDLIST', JSON.stringify(data))
......
import router,{resetRouter} from '@/router/index' import router, { resetRouter } from '@/router/index'
import {getAppCode, keepTokenTime} from '@/port/account' import { getAppCode, keepTokenTime } from '@/port/account'
import axios from 'axios' import axios from 'axios'
const state = { const state = {
code: sessionStorage.getItem('code') ? sessionStorage.getItem('code') : '', // 平台code code: sessionStorage.getItem('code') ? sessionStorage.getItem('code') : '', // 平台code
token: sessionStorage.getItem('token') ? sessionStorage.getItem('token') : '', // 认证凭证 token: sessionStorage.getItem('token') ? sessionStorage.getItem('token') : '', // 认证凭证
platformId: sessionStorage.getItem('platformId') ? sessionStorage.getItem('platformId') : '', // 认证凭证 platformId: sessionStorage.getItem('platformId') ? sessionStorage.getItem('platformId') : '', // 认证凭证
accountPlatformId: sessionStorage.getItem('accountPlatformId') ? sessionStorage.getItem('accountPlatformId') : '', // 账户凭证 accountPlatformId: sessionStorage.getItem('accountPlatformId') ? sessionStorage.getItem('accountPlatformId') : '', // 账户凭证
transportId: sessionStorage.getItem('transportId') ? sessionStorage.getItem('transportId') : '', // 认证凭证 transportId: sessionStorage.getItem('transportId') ? sessionStorage.getItem('transportId') : '', // 认证凭证
userInfo: sessionStorage.getItem('userInfo') || {},// 用户信息 userInfo: sessionStorage.getItem('userInfo') || {}, // 用户信息
roles: [], roles: [],
roleType: sessionStorage.getItem('roleType') ? sessionStorage.getItem('roleType') : '', roleType: sessionStorage.getItem('roleType') ? sessionStorage.getItem('roleType') : '',
roleValue: sessionStorage.getItem('roleValue') ? sessionStorage.getItem('roleValue') : '', roleValue: sessionStorage.getItem('roleValue') ? sessionStorage.getItem('roleValue') : '',
} }
const mutations = { const mutations = {
ROLE_VALUE(state, val) { ROLE_VALUE(state, val) {
state.roleValue = val state.roleValue = val
sessionStorage.setItem('roleValue', val) sessionStorage.setItem('roleValue', val)
}, },
ROLE_TYPE(state, val) { ROLE_TYPE(state, val) {
state.roleType = val state.roleType = val
sessionStorage.setItem('roleType', val) sessionStorage.setItem('roleType', val)
}, },
SET_CODE(state, val) { SET_CODE(state, val) {
state.code = val state.code = val
sessionStorage.setItem('code', val) sessionStorage.setItem('code', val)
}, },
SET_PLATFORMID(state, val) { SET_PLATFORMID(state, val) {
state.platformId = val state.platformId = val
sessionStorage.setItem('platformId', val) sessionStorage.setItem('platformId', val)
}, },
SET_TRANSPORTID(state, val) { SET_TRANSPORTID(state, val) {
state.transportId = val state.transportId = val
sessionStorage.setItem('transportId', val) sessionStorage.setItem('transportId', val)
}, },
SET_TOKEN(state, val) { SET_TOKEN(state, val) {
state.token = val state.token = val
sessionStorage.setItem('token', val) sessionStorage.setItem('token', val)
}, },
DEL_TOKEN(state) { DEL_TOKEN(state) {
state.token = '' state.token = ''
state.roles = '' state.roles = ''
sessionStorage.removeItem('token') sessionStorage.removeItem('token')
}, },
SET_ROLES(state, payload) { SET_ROLES(state, payload) {
state.roles = payload state.roles = payload
}, },
SET_USERINFO(state, val) { SET_USERINFO(state, val) {
sessionStorage.setItem('userInfo', val) sessionStorage.setItem('userInfo', val)
state.userInfo = val state.userInfo = val
}, },
SET_ACCOUNTPLATFORMID(state, val) { SET_ACCOUNTPLATFORMID(state, val) {
state.accountPlatformId = val state.accountPlatformId = val
sessionStorage.setItem('accountPlatformId', val) sessionStorage.setItem('accountPlatformId', val)
}, },
CLEAR_LOGIN(state) { CLEAR_LOGIN(state) {
sessionStorage.removeItem('user') sessionStorage.removeItem('user')
sessionStorage.removeItem('userInfo') sessionStorage.removeItem('userInfo')
sessionStorage.removeItem('token') sessionStorage.removeItem('token')
state.roles = [] state.roles = []
}, },
} }
const actions = { const actions = {
loginOut({commit}) { loginOut({ commit }) {
console.log('2222') // console.log('2222')
commit('DEL_TOKEN') commit('DEL_TOKEN')
state.roleType = '' state.roleType = ''
state.roleValue = '' state.roleValue = ''
resetRouter() resetRouter()
router.push({ router.push({
path: '/login', path: '/login',
query: { query: {
redirect: '/' redirect: '/'
} }
}) })
}, },
PlatformCode({commit}) { PlatformCode({ commit }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getAppCode().then(res => { getAppCode().then(res => {
axios.defaults.headers.XOADOAPPACCESSCODE = res; axios.defaults.headers.XOADOAPPACCESSCODE = res;
commit('SET_CODE', res) commit('SET_CODE', res)
resolve(res) resolve(res)
}).catch(err => { }).catch(err => {
reject(err) reject(err)
}) })
}) })
}, },
_keepTokenTime({commit, rootGetters}) { _keepTokenTime({ commit, rootGetters }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let _token = rootGetters.token; let _token = rootGetters.token;
keepTokenTime({tokenId: _token}).then(res => { keepTokenTime({ tokenId: _token }).then(res => {
if (res.status == 200) { if (res.status == 200) {
commit('SET_TOKEN', res.data) commit('SET_TOKEN', res.data)
} }
resolve(res) resolve(res)
}).catch(err => { }).catch(err => {
reject(err) reject(err)
}) })
}) })
}, },
getRoutes({commit, rootGetters}) { getRoutes({ commit, rootGetters }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
setTimeout(() => { setTimeout(() => {
console.log('获取用户对应权限路由成功') // console.log('获取用户对应权限路由成功')
var datas = {} var datas = {}
var userInfo = rootGetters.nameInfo; var userInfo = rootGetters.nameInfo;
datas = { datas = {
'name': userInfo.name, 'name': userInfo.name,
'roles': ['Home', 'CompanyInformation', 'AccountInformation', 'DepartmentInformation', 'operationSet', 'operationSetIndex','operationSetInfos','productinfo', 'configure', 'configureSetIndex', 'configurePage', 'configureOrderSet', 'sendOrderSet', 'operationArea', 'operationArea-index1', 'operationArea-index2', 'operationArea-index3', 'DispatchService', 'OrderManager','CollectionManager', 'CustomerComplaint', 'Statistics', 'OrderStatistics', 'transportStatistics', 'RealtimeData', 'Permission', 'PageUser', 'PageAdmin', 'Roles', 'RoleManager'], 'roles': ['Home', 'CompanyInformation', 'AccountInformation', 'DepartmentInformation', 'operationSet', 'operationSetIndex', 'operationSetInfos', 'productinfo', 'configure', 'configureSetIndex', 'configurePage', 'configureOrderSet', 'sendOrderSet', 'operationArea', 'operationArea-index1', 'operationArea-index2', 'operationArea-index3', 'DispatchService', 'OrderManager', 'CollectionManager', 'CustomerComplaint', 'Statistics', 'OrderStatistics', 'transportStatistics', 'RealtimeData', 'Permission', 'PageUser', 'PageAdmin', 'Roles', 'RoleManager'],
} }
const {roles} = datas; const { roles } = datas;
commit('SET_ROLES', roles) commit('SET_ROLES', roles)
resolve(datas) resolve(datas)
}, 200) }, 200)
}) })
} }
} }
export default { export default {
namespaced: true, namespaced: true,
state, state,
mutations, mutations,
actions actions
} }
\ No newline at end of file
...@@ -727,8 +727,8 @@ ...@@ -727,8 +727,8 @@
// result += val.substring(val.length - 4, val.length); // result += val.substring(val.length - 4, val.length);
// return result; // return result;
const addSpace = (v) => { const addSpace = (v) => {
console.log(v) // console.log(v)
console.log(v.length) // console.log(v.length)
if(v.length > 4) { if(v.length > 4) {
res += '**** '; res += '**** ';
console.log('r============================================'+res) console.log('r============================================'+res)
......
...@@ -513,7 +513,7 @@ export default { ...@@ -513,7 +513,7 @@ export default {
let that = this let that = this
setTimeout(function () { setTimeout(function () {
// 打印screenWidth变化的值 // 打印screenWidth变化的值
console.log(that.TableHeight) // console.log(that.TableHeight)
that.timer = false that.timer = false
}, 500) }, 500)
} }
......
...@@ -276,7 +276,6 @@ export default { ...@@ -276,7 +276,6 @@ export default {
}; };
this.tableLoading = true; this.tableLoading = true;
this.data = []; this.data = [];
this.total = 0;
listFindManage(params) listFindManage(params)
.then((res) => { .then((res) => {
if (res.status === 200) { if (res.status === 200) {
......
...@@ -367,8 +367,11 @@ ...@@ -367,8 +367,11 @@
>取消订单 >取消订单
</el-button> </el-button>
<!-- v-if="dataSource.status * 1 < 3" --> <!-- v-if="dataSource.status * 1 < 3" -->
<el-button type="primary" size="mini" @click="driverInfo()" v-if=" <el-button
!!dataSource.driverId" type="primary"
size="mini"
@click="driverInfo()"
v-if="!!dataSource.driverId"
>同步司机信息 >同步司机信息
</el-button> </el-button>
<!-- v-if=" <!-- v-if="
...@@ -841,8 +844,9 @@ export default { ...@@ -841,8 +844,9 @@ export default {
this.finishStatus = true; this.finishStatus = true;
}, },
updataBatch() { updataBatch() {
let brandUrl=JSON.parse(this.platformInfo).brandUrl;
let json = [{ orderid: this.finishdata.orderId, status: 6 }]; let json = [{ orderid: this.finishdata.orderId, status: 6 }];
updateBatchOrder(json).then((res) => { updateBatchOrder(brandUrl,json).then((res) => {
if (res.status == 200) { if (res.status == 200) {
this.finishStatus = false; this.finishStatus = false;
this.$message({ this.$message({
...@@ -889,7 +893,9 @@ export default { ...@@ -889,7 +893,9 @@ export default {
? data.trealMoney ? data.trealMoney
: data.estimateMoney, : data.estimateMoney,
}; };
paymentchannel(json).then((res) => { let brandUrl = JSON.parse(this.platformInfo).brandUrl;
paymentchannel(brandUrl, json).then((res) => {
debugger;
if (res.status == 200) { if (res.status == 200) {
this.paystatus = false; this.paystatus = false;
this.$message({ this.$message({
...@@ -906,12 +912,12 @@ export default { ...@@ -906,12 +912,12 @@ export default {
}); });
}, },
pushDrive() { pushDrive() {
let u=JSON.parse( this.platformInfo).brandUrl let u = JSON.parse(this.platformInfo).brandUrl;
let json = { let json = {
platformId: this.driverdata.platformId, platformId: this.driverdata.platformId,
orderId: this.driverdata.orderId, orderId: this.driverdata.orderId,
}; };
pushDriver(u,json).then((res) => { pushDriver(u, json).then((res) => {
if (res.status == 200) { if (res.status == 200) {
this.driverStatus = false; this.driverStatus = false;
this.$message({ this.$message({
...@@ -935,20 +941,23 @@ export default { ...@@ -935,20 +941,23 @@ export default {
}) })
.then(() => { .then(() => {
// 取消订单 // 取消订单
CancelOrder(this.orderid).then((res) => { let brandUrl = JSON.parse(this.platformInfo).brandUrl;
if (res.status == 200) { CancelOrder(brandUrl,this.orderid).then(
this.$message({ (res) => {
type: "success", if (res.status == 200) {
message: "操作成功!", this.$message({
}); type: "success",
this.Inquire(); message: "操作成功!",
} else { });
this.$message({ this.Inquire();
type: "error", } else {
message: res.msg, this.$message({
}); type: "error",
message: res.msg,
});
}
} }
}); );
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment