Commit 13b5bc59 by wangzhihui

Merge branch 'SAAS+V5.8.1' of http://192.168.3.233:8090/saas_plus/dj-car-life-sy…

…stem into SAAS+V5.8.1
2 parents a5a07ef0 85493f76
# 所有环境默认
VUE_APP_CONFIG_CENTER_URL=https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-life-system-config-wzh
VUE_APP_CONFIG_CENTER_URL=https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-life-system-config
# 页面 title 前缀
VUE_APP_TITLE=D+
......
......@@ -4,4 +4,4 @@
# VUE_APP_API=http://192.168.3.171:7300/mock/5d638b3b6fbe9a0ac59d872e/tFIMS
VUE_APP_REPO=http://192.168.3.171:7300/mock/5be17454f31545347559d499/config
VUE_APP_CONFIG_CENTER_URL=https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-life-system-config-wzh
VUE_APP_CONFIG_CENTER_URL=https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-life-system-config
......@@ -828,3 +828,14 @@ export function beiSenEmployeeDisableApi(data = {}) {
data.method = "dj.api.smartcarlife.staffBaseInfo.account.disable";
return request(data, "post");
}
// 获取周任务提报优秀案例录音列表数据
export function getExcellentCaseAudioListApi(data = {}) {
data.method = "dj.api.supervisor.excellent.case.listByTaskId";
return request(data, "post");
}
// 获取周任务完成带教要求列表
export function getTeachingRequirementsListApi(data = {}) {
data.method = "dj.api.supervisor.page.teachingRecords";
return request(data, "post");
}
......@@ -2023,9 +2023,17 @@ export const superviseTaskTypeOpt = [
confName: "督导日报",
confId: 0,
},
// {
// confName: "本周复盘",
// confId: 1,
// },
{
confName: "本周复盘",
confId: 1,
confName: "提报优秀案例录音",
confId: 6,
},
{
confName: "带教要求",
confId: 7,
},
{
confName: "督导月度计划",
......
......@@ -1446,10 +1446,36 @@ export const routerName = {
name: "supervisionMissionDetail",
meta: {
title: "详情",
authId: "9122501",
authId: "912250101",
parentId: "91225",
activePath: "/supervisionMissionManagement",
},
auth: [
{
authId: "9122502",
parentId: "912250101",
label: "通过",
handle: "handlePass",
},
{
authId: "9122503",
parentId: "912250101",
label: "驳回",
handle: "handleReject",
},
{
authId: "9122504",
parentId: "912250101",
label: "下载录音",
handle: "handleDownload",
},
{
authId: "9122505",
parentId: "912250101",
label: "详情",
handle: "handleViewDetail",
}
],
component: _import(
"residentManage/supervisionManagement/mission/detail"
),
......
<template>
<div class="recording-detail">
<div class="header" v-if="viewMode !== 'detail'">
<div class="left">
<span class="title">带教要求</span>
<span>提交人:{{ detail.updatedBy }}</span>
</div>
<div>提交时间:{{ detail.updatedDate }}</div>
</div>
<div class="content">
<div v-if="viewMode === 'detail'">
<ReviewDetail :key="detailForView.id" :detail="detailForView" />
</div>
<d2-table v-else
ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<template #auth-button="scope">
<div>
<auth-button :data="scope.scope"
:show-btn-ids="['9122505']" />
</div>
</template>
</d2-table>
</div>
</div>
</template>
<script>
import { getTeachingRequirementsListApi } from "@api/resident";
import { mapActions } from "vuex";
import reviewDetail from "./reviewDetail.vue";
export default {
name: "Mentorship",
components: {
ReviewDetail: reviewDetail,
},
props: {
detail: {
type: Object,
default: () => {},
},
},
data() {
return {
getListApi: getTeachingRequirementsListApi,
searchFormSearch: {},
viewMode: "list",
detailForView: {},
tableParams: {
btnId: new Date().getTime() + Number.parseInt(Math.random() * 1000),
listName: "list",
tableOption: { width: "100px" },
tableColumns: [
{
label: "带教场景",
prop: "teachingSceneName",
},
{
label: "带教时间",
prop: "teachingTime",
},
{
label: "带教方式",
prop: "teachingMethodName",
},
{
label: "带教主题",
prop: "teachingTopicName",
},
{
label: "带教门店",
prop: "merchantNames",
},
{
label: "参与人员",
prop: "participantNames",
},
],
},
};
},
mounted() {
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close",
}),
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = { id: this.detail.id };
resolve();
});
},
resolveTaskIdForDetail(row) {
if (!row)
return "";
return row.id || row.taskId || row.teachingTaskId || row.supervisorTaskId || row.requirementId || row.teachingRequirementId || row.relatedTaskId || "";
},
handleClose() {
if (this.viewMode !== "detail")
return false;
this.viewMode = "list";
this.detailForView = {};
return true;
},
handleViewDetail(data) {
const id = this.resolveTaskIdForDetail(data);
this.detailForView = { id: id ? `${id}` : "", taskType: "5" };
this.viewMode = "detail";
},
},
};
</script>
<style lang="scss" scoped>
.recording-detail {
.header {
display: flex;
justify-content: space-between;
margin-bottom: 20px;
background: #ffffff;
padding: 14px 20px;
color: #666666;
font-size: 14px;
.title {
color: #333333;
font-weight: 500;
font-size: 16px;
margin-right: 10px;
}
}
.content {
background: #ffffff;
padding: 12px 20px;
}
}
</style>
<template>
<div class="recording-detail">
<div class="header">
<div class="left">
<span class="title">提报优秀案例录音</span>
<span>提交人:{{ detail.updatedBy }}</span>
</div>
<div>提交时间:{{ detail.updatedDate }}</div>
</div>
<div class="content">
<d2-table
ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<template #statusHtml="scope">
<div>
<div class="online-status">
<span class="dot"
:style="{
background: getStatusColor(
scope && scope.scope && scope.scope.reviewStatus,
'reviewCaseStatusOptMap',
),
}">
</span>
{{
getStatusItem(baseData, "reviewCaseStatusOpt", scope.scope, "reviewStatus")
}}
</div>
</div>
</template>
<template #auth-button="scope">
<div>
<!-- 通过 -->
<span v-if="scope.scope.reviewStatus == 0" style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9122502']" />
</span>
<!-- 驳回 -->
<span v-if="scope.scope.reviewStatus == 0" style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9122503']" />
</span>
<!-- 下载录音 -->
<span v-if="scope.scope.reviewStatus != 0" style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9122504']" />
</span>
</div>
</template>
</d2-table>
</div>
</div>
</template>
<script>
import { approveExcellentCase, getExcellentCaseAudioListApi, rejectExcellentCase } from "@/api/resident";
import { Util, deepClone } from "@/common/util"
import { reviewCaseStatusOpt, reviewCaseStatusOptMap } from "@/common/constants.js";
import { set } from 'js-cookie';
export default {
name: "PresentCase",
props: {
detail: {
type: Object,
default: () => {}
}
},
data() {
return {
getListApi: getExcellentCaseAudioListApi,
searchFormSearch: {},
tableParams: {
listName: "list",
tableOption: {
width: "170",
},
tableColumns: [
{
label: "驻店销售",
prop: "salesName",
width: "200px",
},
{
label: "接待日期",
prop: "receptionTime",
width: "100px",
},
{
label: "接待门店",
prop: "merchantName",
width: 140,
},
{
label: "质检评分",
prop: "score",
formatter(row) {
return row.score != null ? row.score : "-";
},
},
{
label: "攻防评分",
prop: "gfScroe",
formatter(row) {
return row.gfScroe != null ? row.gfScroe : "-";
},
},
{
label: "客户类型",
prop: "customerType",
width: 160,
},
{
label: "车型",
prop: "carModel",
width: 120,
},
{
label: "提交人",
prop: "submitterName",
width: 160,
},
{
label: "状态",
prop: "reviewStatus",
minWidth: 120,
addHtml: "statusHtml",
},
{
label: "提交时间",
prop: "createTime",
width: 150,
formatter(row, column) {
return row.createTime
? Util.dateFormate(row.createTime, "YYYY-MM-DD HH:mm:ss")
: "-";
},
},
],
},
baseData: {
reviewCaseStatusOpt: deepClone(reviewCaseStatusOpt),
reviewCaseStatusOptMap: deepClone(reviewCaseStatusOptMap)
}
}
},
mounted() {
},
methods: {
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = { id: this.detail.id }
resolve()
})
},
// 通过
handlePass(data) {
let params = { id: data.id }
approveExcellentCase(params).then((res) => {
if (res) {
this.$message.success("操作成功");
this.$refs.recordTable.refresh()
}
});
},
// 驳回
handleReject(data) {
const params = {
id: data.id,
};
rejectExcellentCase(params).then((res) => {
if (res) {
this.$message.success("操作成功");
this.$refs.recordTable.refresh()
}
});
},
getStatusColor(status, optKey) {
if (status === null || status === undefined)
return "#C0C4CC";
const map = (this.baseData && this.baseData[optKey]) || {};
return map[status] || "#C0C4CC";
},
getStatusItem(baseData, optKey, row, rowKey) {
if (!baseData || !baseData[optKey] || !row)
return null;
let item = baseData[optKey].find(item => item.confId == row[rowKey]);
return (item && item.confValue) || "-";
},
// 下载录音
handleDownload(row) {
const recordingUrl = row.recordingUrl;
if (!recordingUrl) {
this.$message.error("录音文件不存在");
return;
}
// downLoadFile(recordingUrl);
window.open(recordingUrl);
}
}
}
</script>
<style lang="scss" scoped>
.recording-detail {
.header {
display: flex;
justify-content: space-between;
margin-bottom: 20px;
background: #FFFFFF;
padding: 14px 20px;
color: #666666;
font-size: 14px;
.title {
color: #333333;
font-weight: 500;
font-size: 16px;
margin-right: 10px;
}
}
.content {
background: #FFFFFF;
padding: 12px 20px;
}
}
</style>
<!-- 督导任务详情 -->
<template>
<div class="mission-detail">
<d2-container>
<div v-if="detail.taskType == '3'">
<recording :detail="detail"/>
</div>
<div v-else>
<reviewDetail :detail="detail"/>
</div>
<div class="footer-btn">
<el-button class="cancel-btn" @click="handleBack"> 关闭 </el-button>
</div>
</d2-container>
</div>
<div class="mission-detail">
<d2-container>
<component :is="currentComponent"
ref="currentViewRef"
:detail="detail" />
<div class="footer-btn">
<el-button class="cancel-btn" @click="handleBack">
关闭
</el-button>
</div>
</d2-container>
</div>
</template>
<script>
import recording from "./components/recording.vue"
import reviewDetail from "./components/reviewDetail.vue"
import { mapActions } from "vuex"
import { mapActions } from "vuex";
import { Util } from "@/common/util";
import mentorship from "./components/mentorShip.vue";
import presentCase from "./components/presentCase.vue";
import recording from "./components/recording.vue";
import reviewDetail from "./components/reviewDetail.vue";
export default {
name: "MissionDetail",
components: {
recording,
reviewDetail
},
data() {
return {
detail: {}
}
},
mounted() {
let detail = JSON.parse(this.$route.query.detail)
detail = {
...detail,
updatedDate: detail.updatedDate ? Util.dateFormate(detail.updatedDate, 'YYYY-MM-DD HH:mm:ss') : '-'
}
this.detail = detail
},
methods: {
...mapActions({
name: "MissionDetail",
components: {
Recording: recording,
ReviewDetail: reviewDetail,
Mentorship: mentorship,
PresentCase: presentCase,
},
data() {
return {
detail: {},
};
},
computed: {
currentComponent() {
const typeMap = {
3: recording,
6: presentCase,
7: mentorship,
};
return typeMap[this.detail?.taskType] || reviewDetail;
},
},
mounted() {
let detail = JSON.parse(this.$route.query.detail);
detail = {
...detail,
updatedDate: detail.updatedDate ? Util.dateFormate(detail.updatedDate, "YYYY-MM-DD HH:mm:ss") : "-",
};
console.log(detail, "detail");
this.detail = detail;
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close",
}),
handleBack() {
this.close({ tagName: "/supervisionMissionManagement" })
this.$router.push({
name: "supervisionMissionManagement"
})
}
}
}
handleBack() {
const currentView = this.$refs.currentViewRef;
if (currentView && typeof currentView.handleClose === "function") {
const intercepted = currentView.handleClose();
if (intercepted)
return;
}
this.close({ tagName: "/supervisionMissionManagement" });
this.$router.push({
name: "supervisionMissionManagement",
});
},
},
};
</script>
<style lang="scss" scoped>
.footer-btn {
display: flex;
justify-content: center;
margin-top: 20px;
.cancel-btn {
width: 100px;
}
display: flex;
justify-content: center;
margin-top: 20px;
.cancel-btn {
width: 100px;
}
}
</style>
\ No newline at end of file
</style>
......@@ -170,7 +170,7 @@ export default {
updateTaskTypeOptionsByTab(tabName) {
const allowMap = {
"今日任务": [3, 0, 5],
"本周任务": [1],
"本周任务": [6, 7],
"月度任务": [2],
"专项任务": [4]
}
......@@ -189,7 +189,7 @@ export default {
this.searchFormSearch = deepClone(this.searchForm)
const allowMap = {
"day": [3, 0, 5],
"week": [1],
"week": [6, 7],
"month": [2],
"special": [4]
}
......@@ -208,7 +208,7 @@ export default {
getParams() {
const allowMap = {
"day": [3, 0, 5],
"week": [1],
"week": [6, 7],
"month": [2],
"special": [4]
}
......@@ -241,7 +241,6 @@ export default {
this.getStaticsData();
},
handleDetail(data) {
console.log(data, 'data')
this.close({ tagName: "/supervisionMissionDetail" });
this.$router.push({
name: "supervisionMissionDetail",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!