Commit 1794e584 by chenwq

移除部分未使用的代码和注释,优化组件结构

1 parent 506dea30
......@@ -413,4 +413,4 @@ export function getReconciliationGoodsTypeListApi(data = {}) {
}
......@@ -13,130 +13,137 @@ import axios from "@/plugin/axios/index_code";
import RequestMethods from "./request.methods";
import sign from "./sign";
function request(params = {}, method = RequestMethods.GET, noSignAttr = [], options = {}) {
// 兼容线上dj和scrm appkey和secret不一样的情况
let apiName = "";
if (params.method.includes("dj.api.smartcarlife")) {
apiName = "dj";
} else if (params.method.includes("dj.api.script")) {
apiName = "script";
} else if (params.method.includes("dj.staff.api")) {
apiName = "staff";
} else if (params.method.includes("dj.smartcarlife.stock")) {
apiName = "dj.smartcarlife";
} else if (params.method.includes("risk.manage.api")) {
apiName = "riskmanage";
} else if (params.method.includes("dj.api.strategy")) {
apiName = "strategy";
} else if (params.method.includes("dj.api.supervisor")) {
apiName = "supervisor";
} else if (params.method.includes("dj.pad.api")) {
// rop-dj-pad 等方法名含 dj.pad,split(".api") 会得到 dj.pad 无 mapping;签名与 appKey 沿用 dj
apiName = "dj";
} else {
// console.log(params.method.split(".api"))
apiName = params.method.split(".api")[0];
}
function request(
params = {},
method = RequestMethods.GET,
noSignAttr = [],
options = {},
) {
// 兼容线上dj和scrm appkey和secret不一样的情况
let apiName = "";
if (params.method.includes("dj.api.smartcarlife")) {
apiName = "dj";
} else if (params.method.includes("dj.api.script")) {
apiName = "script";
} else if (params.method.includes("dj.staff.api")) {
apiName = "staff";
} else if (params.method.includes("dj.smartcarlife.stock")) {
apiName = "dj.smartcarlife";
} else if (params.method.includes("risk.manage.api")) {
apiName = "riskmanage";
} else if (params.method.includes("dj.api.strategy")) {
apiName = "strategy";
} else if (params.method.includes("dj.api.supervisor")) {
apiName = "supervisor";
} else if (params.method.includes("dj.pad.api")) {
// rop-dj-pad 等方法名含 dj.pad,split(".api") 会得到 dj.pad 无 mapping;签名与 appKey 沿用 dj
apiName = "dj";
} else {
// console.log(params.method.split(".api"))
apiName = params.method.split(".api")[0];
}
// console.log("params.method", params.method)
// console.log("apiName", apiName)
// 为空报错
if (!apiName) {
throw new Error("apiName is null");
}
const mappingName = {
"dj.smartcarlife": "axios",
"dj": "axios",
"scrm": "axios2",
"merchants": "axios3",
"reportExport": "axios4",
"glsx.accounts.biz.common.pictureUpload": "common",
"clue": "axios5",
"dj.businessSchool": "axios6",
"script": "axios7",
"staff": "axios9",
"riskmanage": "axios10",
"strategy": "axios_strategy",
"supervisor": "axios_supervisor",
};
const baseApiName = mappingName[apiName];
// console.log(baseApiName, "baseApiName")
// params.appKey = baseConfig[baseApiName].appkey
if (baseApiName == "common") {
params.app_key = baseConfig[baseApiName].appkey;
} else {
params.appKey = baseConfig[baseApiName].appkey;
}
// console.log("params.appKey", params.appKey)
params.timestamp = new Date().getTime();
params.v = "1.0.0";
params.format = "json";
params.locale = "zh_CN";
if (params.method !== "dj.api.user.login") {
params.sessionId = util.cookies.get("token");
}
/**
* mock - url = params.method
* 调后端接口 - url = ''
*/
const url = baseConfig[baseApiName].baseURL;
// const url = "/api"
/**
* 调后端接口,请使用以下代码。
*/
const signWay = {
"dj.smartcarlife": "sha1",
"dj": "sha1",
"scrm": "sha1",
"glsx": "md5",
"glsx.accounts.biz.common.pictureUpload": "md5",
"clue": "sha1",
"script": "sha1",
"staff": "sha1",
"riskmanage": "sha1",
};
// console.log(signWay[apiName], "baseApiName")
const secret = baseConfig[baseApiName].secret;
const CancelToken = axiosPackage.CancelToken;
let reqData
= method === RequestMethods.POST
? {
baseURL: "/",
data: sign(params, noSignAttr, secret, signWay[apiName]),
}
: { params: sign(params, noSignAttr, secret, signWay[apiName]) };
// console.log("params.method", params.method)
// console.log("apiName", apiName)
// 为空报错
if (!apiName) {
throw new Error("apiName is null");
}
const mappingName = {
"dj.smartcarlife": "axios",
dj: "axios",
scrm: "axios2",
merchants: "axios3",
reportExport: "axios4",
"glsx.accounts.biz.common.pictureUpload": "common",
clue: "axios5",
"dj.businessSchool": "axios6",
script: "axios7",
staff: "axios9",
riskmanage: "axios10",
strategy: "axios_strategy",
supervisor: "axios_supervisor",
};
const baseApiName = mappingName[apiName];
// console.log(baseApiName, "baseApiName")
// params.appKey = baseConfig[baseApiName].appkey
if (baseApiName == "common") {
params.app_key = baseConfig[baseApiName].appkey;
} else {
params.appKey = baseConfig[baseApiName].appkey;
}
reqData = Object.assign(reqData, options, {});
// 请求进度
if (params?.onProcess) {
reqData.onUploadProgress = params.onProcess;
}
// 取消请求
if (params?.cancelFun) {
reqData.cancelToken = new CancelToken((c) => {
params.cancelFun.cancel = c;
});
}
// console.log(method === RequestMethods.POST)
// console.log(url)
// console.log(options)
// console.log(reqData)
let axiosParams = {
url,
method,
...reqData,
};
if (options.returnAll)
axiosParams.headers = { "return-all": true };
return axios(axiosParams);
if (util.cookies.get("uuid")) {
params.accountId = util.cookies.get("uuid");
}
params.timestamp = new Date().getTime();
params.v = "1.0.0";
params.format = "json";
params.locale = "zh_CN";
if (params.method !== "dj.api.user.login") {
params.sessionId = util.cookies.get("token");
}
/**
* mock - url = params.method
* 调后端接口 - url = ''
*/
const url = baseConfig[baseApiName].baseURL;
// const url = "/api"
/**
* 调后端接口,请使用以下代码。
*/
const signWay = {
"dj.smartcarlife": "sha1",
dj: "sha1",
scrm: "sha1",
glsx: "md5",
"glsx.accounts.biz.common.pictureUpload": "md5",
clue: "sha1",
script: "sha1",
staff: "sha1",
riskmanage: "sha1",
};
// console.log(signWay[apiName], "baseApiName")
const secret = baseConfig[baseApiName].secret;
const CancelToken = axiosPackage.CancelToken;
let reqData =
method === RequestMethods.POST
? {
baseURL: "/",
data: sign(params, noSignAttr, secret, signWay[apiName]),
}
: { params: sign(params, noSignAttr, secret, signWay[apiName]) };
/**
* mock,请使用以下代码。
*/
// return axios({
// url,
// method,
// params: sign(params, noSignAttr)
// })
reqData = Object.assign(reqData, options, {});
// 请求进度
if (params?.onProcess) {
reqData.onUploadProgress = params.onProcess;
}
// 取消请求
if (params?.cancelFun) {
reqData.cancelToken = new CancelToken((c) => {
params.cancelFun.cancel = c;
});
}
// console.log(method === RequestMethods.POST)
// console.log(url)
// console.log(options)
// console.log(reqData)
let axiosParams = {
url,
method,
...reqData,
};
if (options.returnAll) axiosParams.headers = { "return-all": true };
return axios(axiosParams);
/**
* mock,请使用以下代码。
*/
// return axios({
// url,
// method,
// params: sign(params, noSignAttr)
// })
}
export default request;
......@@ -553,19 +553,19 @@ export function getStaffAttendanceDetailAPI(data) {
// 查询录音标签
export function getRecordTagList(data) {
data.method = `${path2}reception.findRecordingTagByBatchId`;
data.method = `dj.api.smartcarlife.reception.findRecordingTagByBatchId.out`;
return request(data, "post");
}
// 查询质检列表|侧边栏
export function getQualityList(data) {
data.method = `${path2}reception.findCheckResultByBatchId`;
data.method = `dj.api.smartcarlife.reception.findCheckResultByBatchId.out`;
return request(data, "post");
}
// 查询对话内容
export function getConversationDetail(data) {
data.method = `${path2}reception.findConversationDetailByBatchIdNew`;
data.method = `dj.api.smartcarlife.reception.findConversationDetailByBatchIdNew.out`;
return request(data, "post");
}
// dj.api.smartcarlife.performanceSalaryConfig.page 分页查询绩效工资扣减规则
......@@ -643,7 +643,7 @@ export function getPermissionsByPhone(data) {
* 质检管理-平铺视图
*/
export function getReclistWithPageV2(data) {
data.method = "dj.api.mindworkplate.badge.employeeBadgeReclistWithPageV2";
data.method = "dj.api.mindworkplate.badge.employeeBadgeReclistWithPage.out";
return request(data, "post");
}
......
......@@ -30,8 +30,7 @@
</span>
</el-popover>
<span v-if="show" class="btn-text">{{ info && info.detail ? (info.detail.userType == 2 ? `${info.detail.userName}` :
'管理员') : '未登录' }}</span>
<span v-if="show" class="btn-text">{{ info && info.accountId ? (info.accountId || '管理员') : '未登录' }}</span>
<span class="btn-text out-txt" @click="clear">退出</span>
</div>
......@@ -429,9 +428,9 @@ export default {
window.location.reload()
}
// 开始请求退出接口
AccountLoginOut({}).then(async (res) => {
reload()
})
// AccountLoginOut({}).then(async (res) => {
reload()
// })
// if (this.$router.currentRoute.name === 'index') {
// reload()
// } else {
......
......@@ -108,118 +108,117 @@ service.interceptors.request.use(
);
// 响应拦截器
service.interceptors.response.use(
(response) => {
// console.log(response)
store.commit("d2admin/loading/set", false);
// dataAxios 是 axios 返回数据中的 data
// const dataAxios = {
// code: "20",
// message: "缺少sessionId参数",
// solution: "将添加会话ID请求参数",
// subErrors: null
// }
const dataAxios = response.data;
const ruleResult = baseConfig.axios.result;
const errCodeMsg = baseConfig.errCode || {};
const errCodes = Object.keys(errCodeMsg);
const returnAll = response.config.headers["return-all"];
// 请求级配置:为 true 时,code 为 -1 直接使用响应的 message,不查 errCode 配置
const useResponseMessage = response.config.useResponseMessage;
(response) => {
// console.log(response)
store.commit("d2admin/loading/set", false);
// dataAxios 是 axios 返回数据中的 data
// const dataAxios = {
// code: "20",
// message: "缺少sessionId参数",
// solution: "将添加会话ID请求参数",
// subErrors: null
// }
const dataAxios = response.data;
const ruleResult = baseConfig.axios.result;
const errCodeMsg = baseConfig.errCode || {};
const errCodes = Object.keys(errCodeMsg);
const returnAll = response.config.headers["return-all"];
// 请求级配置:为 true 时,code 为 -1 直接使用响应的 message,不查 errCode 配置
const useResponseMessage = response.config.useResponseMessage;
// console.log("baseConfig", baseConfig)
// console.log("response", response)
// console.log("errCodes", errCodes)
// 这个状态码是和后端约定的
// 有 code 代表这是一个后端接口 可以进行进一步的判断
let goBackArr = ["20", "21"];
// console.log(dataAxios[ruleResult.code_key])
if (goBackArr.includes(dataAxios[ruleResult.code_key])) {
// await store.dispatch('d2admin/account/logout')
store.dispatch("d2admin/user/clear");
util.cookies.remove("token");
router.replace("/login");
// return Promise.reject(new Error("登录超时,请重新登录"))
return errorCreate("登录超时,请重新登录");
// return Promise.reject(new Error(response.message || 'Error'))
}
if (returnAll)
return dataAxios;
const codeValue = dataAxios[ruleResult.code_key] || dataAxios.returnCode;
switch (+codeValue) {
case ruleResult.code_success_value:
// [ 示例 ] code === 0 代表没有错误
return dataAxios[ruleResult.data_key];
case ruleResult.code_error_value:
// [ 示例 ] code === -1 代表需将返回的message弹窗展示
return errorCreate(`${dataAxios[ruleResult.message_key]}`);
default: {
// 不是正确的 code
// 请求配置 useResponseMessage 时:code 为 -1 直接使用响应的 message
const codeStr = String(dataAxios[ruleResult.code_key] ?? "");
const isCodeMinusOne = codeStr === "-1" || +dataAxios[ruleResult.code_key] === -1;
if (useResponseMessage && isCodeMinusOne) {
return errorCreate(`${dataAxios[ruleResult.message_key]}`);
}
if (errCodes.includes(dataAxios[ruleResult.code_key])) {
return errorCreate(`${errCodeMsg[dataAxios[ruleResult.code_key]]}`);
}
// 返回约定定义之外的错误码直接取message
return errorCreate(`${dataAxios[ruleResult.message_key]}`);
}
}
},
// console.log("baseConfig", baseConfig)
// console.log("response", response)
// console.log("errCodes", errCodes)
// 这个状态码是和后端约定的
// 有 code 代表这是一个后端接口 可以进行进一步的判断
let goBackArr = ["20", "21"];
// console.log(dataAxios[ruleResult.code_key])
if (goBackArr.includes(dataAxios[ruleResult.code_key])) {
// await store.dispatch('d2admin/account/logout')
store.dispatch("d2admin/user/clear");
util.cookies.remove("token");
router.replace("/login");
// return Promise.reject(new Error("登录超时,请重新登录"))
return errorCreate("登录超时,请重新登录");
// return Promise.reject(new Error(response.message || 'Error'))
}
if (returnAll) return dataAxios;
const codeValue = dataAxios[ruleResult.code_key] || dataAxios.returnCode;
switch (+codeValue) {
case ruleResult.code_success_value:
// [ 示例 ] code === 0 代表没有错误
return dataAxios[ruleResult.data_key];
case ruleResult.code_error_value:
// [ 示例 ] code === -1 代表需将返回的message弹窗展示
return errorCreate(`${dataAxios[ruleResult.message_key]}`);
default: {
// 不是正确的 code
// 请求配置 useResponseMessage 时:code 为 -1 直接使用响应的 message
const codeStr = String(dataAxios[ruleResult.code_key] ?? "");
const isCodeMinusOne =
codeStr === "-1" || +dataAxios[ruleResult.code_key] === -1;
if (useResponseMessage && isCodeMinusOne) {
return errorCreate(`${dataAxios[ruleResult.message_key]}`);
}
if (errCodes.includes(dataAxios[ruleResult.code_key])) {
return errorCreate(`${errCodeMsg[dataAxios[ruleResult.code_key]]}`);
}
// 返回约定定义之外的错误码直接取message
return errorCreate(`${dataAxios[ruleResult.message_key]}`);
}
}
},
(error) => {
if (error && error.response) {
switch (error.response.status) {
case 400:
error.message = "请求错误";
break;
case 401:
error.message = "未授权,请登录";
break;
case 403:
error.message = "拒绝访问";
break;
case 404:
error.message = `请求地址出错: ${error.response.config.url}`;
break;
case 408:
error.message = "请求超时";
break;
case 500:
error.message = "服务器内部错误";
break;
case 501:
error.message = "服务未实现";
break;
case 502:
error.message = "网关错误";
break;
case 503:
error.message = "服务不可用";
break;
case 504:
error.message = "网关超时";
break;
case 505:
error.message = "HTTP版本不受支持";
break;
default:
break;
}
}
if (error && error?.stack?.indexOf("timeout") > -1) {
if (error.stack.indexOf("5000ms")) {
error.message = "查询超时,请刷新页面重试!";
}
// console.log('超时')
// console.log(error)
}
store.commit("d2admin/loading/set", false);
if (!error.__CANCEL__)
errorLog(error); // 取消请求 不做错误提示
return Promise.reject(error);
},
(error) => {
if (error && error.response) {
switch (error.response.status) {
case 400:
error.message = "请求错误";
break;
case 401:
error.message = "未授权,请登录";
break;
case 403:
error.message = "拒绝访问";
break;
case 404:
error.message = `请求地址出错: ${error.response.config.url}`;
break;
case 408:
error.message = "请求超时";
break;
case 500:
error.message = "服务器内部错误";
break;
case 501:
error.message = "服务未实现";
break;
case 502:
error.message = "网关错误";
break;
case 503:
error.message = "服务不可用";
break;
case 504:
error.message = "网关超时";
break;
case 505:
error.message = "HTTP版本不受支持";
break;
default:
break;
}
}
if (error && error?.stack?.indexOf("timeout") > -1) {
if (error.stack.indexOf("5000ms")) {
error.message = "查询超时,请刷新页面重试!";
}
// console.log('超时')
// console.log(error)
}
store.commit("d2admin/loading/set", false);
if (!error.__CANCEL__) errorLog(error); // 取消请求 不做错误提示
return Promise.reject(error);
},
);
export default service;
......@@ -26,7 +26,6 @@ export default {
// 开始请求登录接口
AccountLogin(params)
.then(async (accountInfo = {}) => {
console.log("accountInfo: ", accountInfo);
util.cookies.set("uuid", accountInfo.accountId);
util.cookies.set("userInfo", accountInfo);
await dispatch("getAuth", {
......
......@@ -6,16 +6,8 @@ const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_AP
const userInfo = JSON.parse(unescape(sessionStorage.getItem(SESSION_NAME))) || {
detail: {}
}
const INDEX_PATH = userInfo
? userInfo.detail.accountType !== 7
? "/index"
: "/onlineAccountList"
: "/index"
const defaultPage = userInfo
? userInfo.detail.accountType !== 7
? home
: localRoutes["90503"]
: home
const INDEX_PATH = "/index";
const defaultPage = home;
defaultPage.fullPath = INDEX_PATH
// 判定是否需要缓存
const isKeepAlive = (data) => _.get(data, "meta.cache", false)
......
......@@ -167,7 +167,7 @@ export default {
if (this.$refs.qualityDetail) this.$refs.qualityDetail.onPageHide()
if (this.$refs.newQualityDetail) {
this.$refs.newQualityDetail.onPause()
this.$refs.newQualityDetail.onPageHide()
// this.$refs.newQualityDetail.onPageHide()
}
this.isQualityVisible = false
this.isNewQualityVisible = false
......@@ -261,4 +261,4 @@ export default {
overflow: auto scroll;
}
}
</style>
\ No newline at end of file
</style>
......@@ -125,20 +125,21 @@
</template>
<script type='text/ecmascript-6'>
import { listShop4sByRef } from "@api/merchant"
// import { listShop4sByRef } from "@api/merchant"
import { getMerchantEmployeeList, updateRecordings, getAliOSSToken } from "@api/serviceManage"
import OSS from 'ali-oss'
import * as dayjs from 'dayjs'
import { rangePickerOptions } from "@/common/format"
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
// import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
export default {
mixins: [reportTrackFunMixin],
// mixins: [reportTrackFunMixin],
name: 'VoiceDialog',
props: {
visible: Boolean
},
data () {
return {
userInfo: this.$store.state.d2admin.user.info,
rangePickerOptions,
client: null,
loading: false,
......@@ -280,12 +281,11 @@ export default {
})
},
getServiceStore () {
listShop4sByRef({
yqMerchantId: ''
}).then((res) => {
this.merchantList = res || []
console.log(res)
})
// listShop4sByRef({
// yqMerchantId: ''
// }).then((res) => {
this.merchantList = this.userInfo.merchantList || []
// })
},
async getMerchantEmployeeList (storeMerchantNo) {
try {
......@@ -362,4 +362,4 @@ export default {
cursor: pointer;
}
}
</style>
\ No newline at end of file
</style>
......@@ -207,9 +207,9 @@ const toMinutesAndSeconds = (seconds) => {
return formattedTime
}
}
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
// import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
export default {
mixins: [reportTrackFunMixin],
// mixins: [reportTrackFunMixin],
name: "NewQualityDetail",
components: {
Dialogue,
......@@ -257,7 +257,7 @@ export default {
currentNum: {
handler (val) {
this.searchForm.batchId = this.qualityDetailList[val].id
this.onPageShow()
// this.onPageShow()
},
immediate: true
},
......@@ -332,7 +332,7 @@ export default {
max = qualityDetailList.length - 1
if ((currentNum == 0 && num == -1) || (currentNum == max && num == 1))
throw "无更多接待记录"
this.onPageHide()
// this.onPageHide()
this.currentNum += num
} catch (error) {
if (error) this.$message.error(error)
......
......@@ -101,9 +101,9 @@ const toMinutesAndSeconds = (seconds) => {
return formattedTime
}
}
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
// import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
export default {
mixins: [reportTrackFunMixin],
// mixins: [reportTrackFunMixin],
name: "RelatActivityOrderDialog",
components: {
QualityAnalyse,
......@@ -210,7 +210,7 @@ export default {
currentNum: {
handler (val) {
this.searchForm.batchId = this.qualityDetailList[val].id
this.onPageShow()
// this.onPageShow()
},
immediate: true
}
......@@ -230,7 +230,7 @@ export default {
max = qualityDetailList.length - 1
if ((currentNum == 0 && num == -1) || (currentNum == max && num == 1))
throw "无更多接待记录"
this.onPageHide()
// this.onPageHide()
this.currentNum += num
} catch (error) {
if (error) this.$message.error(error)
......
......@@ -54,127 +54,127 @@ const VIEW_LIST = [
];
const FORM_DATA = [
{
label: "接待日期",
name: "searchdate",
type: "datePicker",
isClear: false,
pickerOptions: "rangePickerOptions",
},
{
label: "质检评分",
name: "qualityTestScore",
addHtml: "score",
},
{
label: "归属服务商",
name: "serviceMerchantNo",
type: "select",
optionList: [],
optionId: "partnerMerchantId",
optionLabel: "partnerMerchantName",
optionsName: "parkServiceList",
},
{
label: "归属门店",
name: "RecMerchantNo",
type: "select",
optionList: [],
optionId: "merchantId",
optionLabel: "merchantName",
optionsName: "storeIdList",
},
{
label: "员工姓名",
name: "employeeName",
type: "input",
maxlength: "40",
isClear: true,
},
{
label: "手机号",
name: "phoneNumber",
type: "input",
placeholder: "请输入手机号(至少4位)",
maxlength: "11",
isClear: true,
},
{
label: "业务场景",
name: "BussinessType",
type: "select",
optionList: [],
optionId: "id",
optionLabel: "name",
optionsName: "sceneTypeList",
},
{
label: "品牌",
name: "carBrandIds",
type: "select",
multiple: true,
isClear: true,
collapseTags: true,
optionList: [],
optionId: "id",
optionLabel: "label",
optionsName: "brandList",
},
{
label: "是否成交",
name: "orderTransactionFlag",
type: "select",
optionList: [],
optionId: "id",
optionLabel: "name",
optionsName: "orderTransactionList",
},
{
label: "客户类型",
name: "enterpriseCustomerFlag",
type: "select",
optionList: [],
optionId: "id",
optionLabel: "name",
optionsName: "enterpriseCustomerList",
},
{
label: "客户姓名",
name: "customerName",
type: "input",
maxlength: "20",
isClear: true,
},
{
label: "客户手机号",
name: "customerPhone",
addHtml: "customerPhone",
},
{
label: "安心包是否成交",
name: "orderAxbTransactionFlag",
type: "select",
optionList: [],
optionId: "id",
optionLabel: "name",
optionsName: "orderAxTransactionList",
},
{
label: "成交金额大于",
name: "orderTransactionAmount",
addHtml: "orderTransactionAmount",
},
{
label: "接待日期",
name: "searchdate",
type: "datePicker",
isClear: false,
pickerOptions: "rangePickerOptions",
},
// {
// label: "质检评分",
// name: "qualityTestScore",
// addHtml: "score",
// },
// {
// label: "归属服务商",
// name: "serviceMerchantNo",
// type: "select",
// optionList: [],
// optionId: "partnerMerchantId",
// optionLabel: "partnerMerchantName",
// optionsName: "parkServiceList",
// },
{
label: "归属门店",
name: "RecMerchantNo",
type: "select",
optionList: [],
optionId: "merchantId",
optionLabel: "merchantName",
optionsName: "storeIdList",
},
// {
// label: "员工姓名",
// name: "employeeName",
// type: "input",
// maxlength: "40",
// isClear: true,
// },
// {
// label: "手机号",
// name: "phoneNumber",
// type: "input",
// placeholder: "请输入手机号(至少4位)",
// maxlength: "11",
// isClear: true,
// },
// {
// label: "业务场景",
// name: "BussinessType",
// type: "select",
// optionList: [],
// optionId: "id",
// optionLabel: "name",
// optionsName: "sceneTypeList",
// },
// {
// label: "品牌",
// name: "carBrandIds",
// type: "select",
// multiple: true,
// isClear: true,
// collapseTags: true,
// optionList: [],
// optionId: "id",
// optionLabel: "label",
// optionsName: "brandList",
// },
// {
// label: "是否成交",
// name: "orderTransactionFlag",
// type: "select",
// optionList: [],
// optionId: "id",
// optionLabel: "name",
// optionsName: "orderTransactionList",
// },
// {
// label: "客户类型",
// name: "enterpriseCustomerFlag",
// type: "select",
// optionList: [],
// optionId: "id",
// optionLabel: "name",
// optionsName: "enterpriseCustomerList",
// },
{
label: "客户姓名",
name: "customerName",
type: "input",
maxlength: "20",
isClear: true,
},
{
label: "客户手机号",
name: "customerPhone",
addHtml: "customerPhone",
},
// {
// label: "安心包是否成交",
// name: "orderAxbTransactionFlag",
// type: "select",
// optionList: [],
// optionId: "id",
// optionLabel: "name",
// optionsName: "orderAxTransactionList",
// },
// {
// label: "成交金额大于",
// name: "orderTransactionAmount",
// addHtml: "orderTransactionAmount",
// },
// {
// label: "当日到店量",
// name: "toStoreCount",
// addHtml: "toStoreCount"
// },
// {
// label: "异常占比",
// name: "AbnormalProportion",
// addHtml: "AbnormalProportion"
// }
// {
// label: "当日到店量",
// name: "toStoreCount",
// addHtml: "toStoreCount"
// },
// {
// label: "异常占比",
// name: "AbnormalProportion",
// addHtml: "AbnormalProportion"
// }
];
const TABLE_TYPE_1 = {
......
......@@ -194,9 +194,9 @@ import ElInputRange from "../el-input-range"
import QualityDetail from "./qualityDetail.vue"
import NewQualityDetail from "./newQualityDetail.vue"
import { conversationPage } from "@api/resident"
import reportTrackFunMixin from "@/mixins/reportTrackFunMixin"
// import reportTrackFunMixin from "@/mixins/reportTrackFunMixin"
export default {
mixins: [reportTrackFunMixin],
// mixins: [reportTrackFunMixin],
props: {
queryData: Object,
show: Boolean
......@@ -356,8 +356,8 @@ export default {
watch: {
show: {
handler(val) {
if (val) this.onPageShow()
else this.onPageHide()
// if (val) this.onPageShow()
// else this.onPageHide()
},
immediate: true
}
......@@ -407,14 +407,14 @@ export default {
this.$refs.recepDetail.refreshTable()
},
closeDialog() {
if (this.$refs.qualityDetail) this.$refs.qualityDetail.onPageHide()
// if (this.$refs.qualityDetail) this.$refs.qualityDetail.onPageHide()
if (this.$refs.newQualityDetail) {
this.$refs.newQualityDetail.onPause()
this.$refs.newQualityDetail.onPageHide()
// this.$refs.newQualityDetail.onPageHide()
}
this.isQualityVisible = false
this.isNewQualityVisible = false
this.onPageShow()
// this.onPageShow()
},
qualitDetail(row) {
const list = this.$refs.recepDetail.data,
......@@ -426,7 +426,7 @@ export default {
} else {
this.isQualityVisible = true
}
this.onPageHide()
// this.onPageHide()
},
beforeSearchFn() {
return new Promise((resolve) => {
......
......@@ -83,9 +83,9 @@
<script type='text/ecmascript-6'>
import qualityIndex from "./components/qualityIndex/index"
import recepDetail from "./components/recepDetail.vue"
import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
// import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
export default {
mixins: [reportTrackPageMixin],
// mixins: [reportTrackPageMixin],
name: "",
components: {
qualityIndex,
......
......@@ -192,77 +192,77 @@ export default {
handleReturnLogin() {
this.isMutiAccount && (this.isMutiAccount = false)
},
handleSelectAccount(idx) {
if (this.logining) return false
this.logining = true
var currentItem = this.accountInfo.accountList[idx]
var params = {
loginAccount: currentItem.loginAccout,
merchantId: +currentItem.merchantNo,
loginToken: this.loginToken
}
selectAccount(params).then((res) => {
util.cookies.set("token", res.sessionId)
// console.log(currentItem)
getUserInfo({})
.then((userInfo) => {
userInfo.beSuper = userInfo.loginAccount.isAdmin == 1
if (userInfo.beSuper) {
// 是否园区店
userInfo.beYQMerchant = true
// 是否服务商
userInfo.beServerMerchant = true
} else {
// 是否园区店
userInfo.beYQMerchant =
userInfo.loginAccount.merchantAccountList.includes("6") ||
userInfo.loginAccount.merchantAccountList.includes("8")
// 是否服务商
userInfo.beServerMerchant =
userInfo.loginAccount.merchantAccountList.includes("7")
}
userInfo.detail = userInfo.merchant
Object.keys(userInfo.loginAccount).forEach((item) => {
if (userInfo.loginAccount[item] && !userInfo.detail[item]) {
userInfo.detail[item] = userInfo.loginAccount[item]
}
})
userInfo.merchantAccountLevel = userInfo.detail.merchantAccountLevel
this.getAuth({
userInfo: userInfo,
accountInfo: this.accountInfo
})
.then(async (res) => {
console.log(res, "merchantAccountLevel")
const _current =
userInfo.detail.accountType !== 7
? await this.current()
: "/onlineAccountList"
await this.initBaseData()
// console.log(this.$route.query.redirect)
// console.log(_current)
// return
this.$router.replace(this.$route.query.redirect || _current)
})
.catch((err) => {
// 接收 getAuth 的 reject 并做对应处理
console.error("getAuth failed:", err)
const msg =
typeof err === "string"
? err
: (err && err.message) || "获取权限失败,请联系管理员"
this.$message && this.$message.error(msg)
this.isMutiAccount = false
// 可选:重置登录按钮 loading / 回到登录页 / 清理态
// if (this.loading) this.loading = false
// this.$router.replace('/login')
})
})
.finally(() => {
this.logining = false
})
})
},
// handleSelectAccount(idx) {
// if (this.logining) return false
// this.logining = true
// var currentItem = this.accountInfo.accountList[idx]
// var params = {
// loginAccount: currentItem.loginAccout,
// merchantId: +currentItem.merchantNo,
// loginToken: this.loginToken
// }
// selectAccount(params).then((res) => {
// util.cookies.set("token", res.sessionId)
// // console.log(currentItem)
// getUserInfo({})
// .then((userInfo) => {
// userInfo.beSuper = userInfo.loginAccount.isAdmin == 1
// if (userInfo.beSuper) {
// // 是否园区店
// userInfo.beYQMerchant = true
// // 是否服务商
// userInfo.beServerMerchant = true
// } else {
// // 是否园区店
// userInfo.beYQMerchant =
// userInfo.loginAccount.merchantAccountList.includes("6") ||
// userInfo.loginAccount.merchantAccountList.includes("8")
// // 是否服务商
// userInfo.beServerMerchant =
// userInfo.loginAccount.merchantAccountList.includes("7")
// }
// userInfo.detail = userInfo.merchant
// Object.keys(userInfo.loginAccount).forEach((item) => {
// if (userInfo.loginAccount[item] && !userInfo.detail[item]) {
// userInfo.detail[item] = userInfo.loginAccount[item]
// }
// })
// userInfo.merchantAccountLevel = userInfo.detail.merchantAccountLevel
// this.getAuth({
// userInfo: userInfo,
// accountInfo: this.accountInfo
// })
// .then(async (res) => {
// console.log(res, "merchantAccountLevel")
// const _current =
// userInfo.detail.accountType !== 7
// ? await this.current()
// : "/onlineAccountList"
// await this.initBaseData()
// // console.log(this.$route.query.redirect)
// // console.log(_current)
// // return
// this.$router.replace(this.$route.query.redirect || _current)
// })
// .catch((err) => {
// // 接收 getAuth 的 reject 并做对应处理
// console.error("getAuth failed:", err)
// const msg =
// typeof err === "string"
// ? err
// : (err && err.message) || "获取权限失败,请联系管理员"
// this.$message && this.$message.error(msg)
// this.isMutiAccount = false
// // 可选:重置登录按钮 loading / 回到登录页 / 清理态
// // if (this.loading) this.loading = false
// // this.$router.replace('/login')
// })
// })
// .finally(() => {
// this.logining = false
// })
// })
// },
// 提交登录信息
submit() {
this.$refs.loginForm.validate((valid) => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!