Commit 11b0e6d3 by 张立顺

Merge branch 'SAAS+V4.55.0-0730' into SAAS+V4.55.1

2 parents cd53d214 6857ba85
Showing 56 changed files with 2242 additions and 949 deletions
...@@ -20,7 +20,7 @@ const request = ( ...@@ -20,7 +20,7 @@ const request = (
) => { ) => {
// 兼容线上dj和scrm appkey和secret不一样的情况 // 兼容线上dj和scrm appkey和secret不一样的情况
let apiName = "" let apiName = ""
console.log("params.method", params)
if (params.method.includes("dj.api.smartcarlife")) { if (params.method.includes("dj.api.smartcarlife")) {
apiName = "dj" apiName = "dj"
} else if (params.method.includes("dj.api.script")) { } else if (params.method.includes("dj.api.script")) {
......
...@@ -39,7 +39,7 @@ export function customizeList(data) { ...@@ -39,7 +39,7 @@ export function customizeList(data) {
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 查询所有配置 // 查询所有配置
export function findAllConfig(data) { export function findAllConfig(data = {}) {
data.method = `${path}longcoursesceneconfig.findAllConfig` data.method = `${path}longcoursesceneconfig.findAllConfig`
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
...@@ -106,3 +106,19 @@ export function getStaffInfo(data) { ...@@ -106,3 +106,19 @@ export function getStaffInfo(data) {
data.method = `${path}servicecenter.staff.info` data.method = `${path}servicecenter.staff.info`
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 长课程配置-查询课程列表
export function getStaffTagCourseList(data = {}) {
data.method = `${path}servicecenter.contentmanager.staff.tag.course`
return request(data, RequestMethods.POST)
}
//提交配置
export function insertOrUpdate(data) {
data.method = `${path}contentManagerTask.insertOrUpdate`
return request(data, RequestMethods.POST)
}
// 根据ID查询详细信息
export function getByTaskId(data) {
data.method = `${path}contentManagerTask.getById`
return request(data, RequestMethods.POST)
}
...@@ -317,6 +317,10 @@ $prefix: d2; ...@@ -317,6 +317,10 @@ $prefix: d2;
max-height: 200px !important; max-height: 200px !important;
overflow-y: scroll; overflow-y: scroll;
} }
.serverHeight {
height: 200px !important;
overflow-y: scroll;
}
.el-tooltip__popper.tools-gltip { .el-tooltip__popper.tools-gltip {
width: 238px !important; width: 238px !important;
height: 95px !important; height: 95px !important;
...@@ -356,7 +360,3 @@ $prefix: d2; ...@@ -356,7 +360,3 @@ $prefix: d2;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.el-popover {
height: 200px;
overflow: scroll;
}
...@@ -710,7 +710,8 @@ export const businessNatureShow = { ...@@ -710,7 +710,8 @@ export const businessNatureShow = {
export const storeType = [ export const storeType = [
{ confId: 1, confName: "嘀加" }, { confId: 1, confName: "嘀加" },
{ confId: 2, confName: "广汇" }, { confId: 2, confName: "广汇" },
{ confId: 3, confName: "直营" } { confId: 3, confName: "直营" },
{ confId: 9, confName: "冀联" }
] ]
// 店面配置 部署场景 // 店面配置 部署场景
export const sceneForShop = [ export const sceneForShop = [
...@@ -903,7 +904,6 @@ export const refundExamine_status = [ ...@@ -903,7 +904,6 @@ export const refundExamine_status = [
{ confId: 3, confValue: "财务结算" }, { confId: 3, confValue: "财务结算" },
{ confId: 4, confValue: "已完成" }, { confId: 4, confValue: "已完成" },
{ confId: 5, confValue: "驳回" }, { confId: 5, confValue: "驳回" },
{ confId: 6, confValue: "驻店发起" },
{ confId: 7, confValue: "区域运营审核" }, { confId: 7, confValue: "区域运营审核" },
{ confId: 8, confValue: "运营补充" } { confId: 8, confValue: "运营补充" }
] ]
...@@ -1393,9 +1393,9 @@ export const punishStatusOpt = [ ...@@ -1393,9 +1393,9 @@ export const punishStatusOpt = [
] ]
// 服务中心-长课程配置 归属业务 // 服务中心-长课程配置 归属业务
export const course_businessOpt = [ export const course_businessOpt = [
{ confId: "0", confValue: "轻改" }, { confId: "轻改", confValue: "轻改" },
{ confId: "1", confValue: "权益" }, { confId: "权益", confValue: "权益" },
{ confId: "2", confValue: "延保" } { confId: "延保", confValue: "延保" }
] ]
export const taskStatusOpt = [ export const taskStatusOpt = [
...@@ -1408,12 +1408,11 @@ export const effectiveTypeOpt = [ ...@@ -1408,12 +1408,11 @@ export const effectiveTypeOpt = [
] ]
// 服务中心-长课程配置 处罚方式 // 服务中心-长课程配置 处罚方式
export const punishTypeOpt = [ export const punishTypeOpt = [
{ confId: "0", confValue: "不处罚" }, { confId: 0, confValue: "不处罚" },
{ confId: "1", confValue: "限制录单" } { confId: 1, confValue: "限制录单" }
] ]
// 服务中心-长课程配置 任务状态 // 服务中心-长课程配置 任务状态
export const course_taskStatusOpt = [ export const course_taskStatusOpt = [
{ confId: 0, confValue: "未开始" },
{ confId: 1, confValue: "进行中" }, { confId: 1, confValue: "进行中" },
{ confId: 2, confValue: "已结束" } { confId: 2, confValue: "已结束" }
] ]
...@@ -1425,3 +1424,8 @@ export const learningProgressOpt = [ ...@@ -1425,3 +1424,8 @@ export const learningProgressOpt = [
{ confId: 4, confValue: "未通过" }, { confId: 4, confValue: "未通过" },
{ confId: 5, confValue: "已完成" } { confId: 5, confValue: "已完成" }
] ]
export const long_businessOpt = [
{ confId: "1", confValue: "延保" },
{ confId: "3", confValue: "权益" },
{ confId: "2", confValue: "轻改" }
]
...@@ -3,6 +3,7 @@ class GlOssApi { ...@@ -3,6 +3,7 @@ class GlOssApi {
constructor(params = {}) { constructor(params = {}) {
this.baseConfig = params.baseConfig this.baseConfig = params.baseConfig
} }
/** /**
* 分片上传大文件到阿里云OSS(带断点续传和重试机制) * 分片上传大文件到阿里云OSS(带断点续传和重试机制)
* @param {*} file 文件流(大文件) * @param {*} file 文件流(大文件)
...@@ -26,24 +27,27 @@ class GlOssApi { ...@@ -26,24 +27,27 @@ class GlOssApi {
if (!baseConfig) errCallBack(new Error("初始化缺少baseConfig配置")) if (!baseConfig) errCallBack(new Error("初始化缺少baseConfig配置"))
const fileName = file.name const fileName = file.name
const client = new OSS({ const client = new OSS({
accessKeyId: baseConfig.alyOss.accessKeyId, accessKeyId: baseConfig.alyOss2.accessKeyId,
accessKeySecret: baseConfig.alyOss.accessKeySecret, accessKeySecret: baseConfig.alyOss2.accessKeySecret,
bucket: baseConfig.alyOss.bucket, bucket: baseConfig.alyOss2.bucket,
endpoint: baseConfig.alyOss.endpoint endpoint: baseConfig.alyOss2.endpoint
}) })
if (partSize < 100) { if (partSize < 100) {
console.error("分片大小不能小于100KB") console.error("分片大小不能小于100KB")
errCallBack(new Error("分片大小不能小于100KB")) errCallBack(new Error("分片大小不能小于100KB"))
return return
} }
// 确保目录以斜杠结尾 // 确保目录以斜杠结尾
if (!dir.endsWith("/")) { if (!dir.endsWith("/")) {
dir += "/" dir += "/"
} }
const key = dir + fileName const uniqueDir =
dir + Date.now() + "_" + Math.floor(Math.random() * 10000) + "/"
const key = uniqueDir + fileName
let retryCount = 0 let retryCount = 0
let currentCheckpoint = null let currentCheckpoint = null
const uploadWithRetry = async () => { const uploadWithRetry = () => {
client client
.multipartUpload(key, file, { .multipartUpload(key, file, {
partSize: partSize * 1024, // 转换为字节 partSize: partSize * 1024, // 转换为字节
...@@ -53,25 +57,20 @@ class GlOssApi { ...@@ -53,25 +57,20 @@ class GlOssApi {
console.log(`上传进度: ${p * 100}%`) console.log(`上传进度: ${p * 100}%`)
} }
}) })
.then(async (result) => { .then((result) => {
const size = const size =
file.size > 1000000 file.size > 1000000
? parseFloat(file.size / 1000000).toFixed(2) + "M" ? parseFloat(file.size / 1000000).toFixed(2) + "M"
: parseFloat(file.size / 1000).toFixed(2) + "KB" : parseFloat(file.size / 1000).toFixed(2) + "KB"
console.log(result, 111111111) console.log(result.res)
let [aliyunAddress] = result.res.requestUrls let [aliyunAddress] = result.res.requestUrls
console.log(aliyunAddress, "aliyunAddress") console.log(aliyunAddress, "aliyunAddress")
const sourceImage = aliyunAddress let url = aliyunAddress.split("?")[0].split("https:")[1]
const targetImage = "exampledir/dest.png" console.log(url, "url")
await processImage(
"image/quality,Q_50",
bucketName,
result.name,
targetImage
)
successCallback({ successCallback({
attachment: fileName, attachment: fileName,
aliyunAddress: decodeURIComponent(aliyunAddress).split("?")[0], aliyunAddress:
"https:" + encodeOSSFilename(decodeURIComponent(url)),
size: size size: size
}) })
}) })
...@@ -88,19 +87,21 @@ class GlOssApi { ...@@ -88,19 +87,21 @@ class GlOssApi {
} }
}) })
} }
const processImage = async ( const encodeOSSFilename = (filename) => {
processStr, // 定义需要转码的特殊字符(包括空格)
targetBucket, const specialChars = '? \\ * | " < > [ ] { } % # & + = ^ ` ~ ; '
sourceImage, // 创建正则表达式匹配所有特殊字符
targetImage const escapeRegex = new RegExp(
) => { `[${specialChars.replace(/ /g, "").replace(/(.)/g, "\\$1")}]`,
const result = await client.processObjectSave( "g"
sourceImage,
targetImage,
processStr,
targetBucket
) )
console.log(result.res, "99999") // 转码函数:将字符转为百分号编码
return filename.replace(escapeRegex, (char) => {
// 获取字符的UTF-8编码
const code = char.charCodeAt(0)
// 空格特殊处理为%20,其他转为大写十六进制
return code === 32 ? "%20" : `%${code.toString(16).toUpperCase()}`
})
} }
uploadWithRetry() // 启动上传流程 uploadWithRetry() // 启动上传流程
} }
......
...@@ -20,16 +20,16 @@ ...@@ -20,16 +20,16 @@
<script> <script>
export default { export default {
name: 'D2TebleHeader', name: "D2TebleHeader",
props: { props: {
title: { title: {
type: String, type: String,
required: false, required: false,
default: '' default: ""
}, },
titleClassName:{ titleClassName: {
type: String, type: String,
default: '' default: ""
}, },
leftSpan: { leftSpan: {
type: Number, type: Number,
...@@ -44,6 +44,10 @@ export default { ...@@ -44,6 +44,10 @@ export default {
.table-header { .table-header {
font-size: 14px; font-size: 14px;
} }
.table-header-title {
color: #111111;
font-size: 16px;
}
.table-header .el-col-12 { .table-header .el-col-12 {
/* min-width: 50%; */ /* min-width: 50%; */
......
...@@ -61,12 +61,12 @@ export const routerName = { ...@@ -61,12 +61,12 @@ export const routerName = {
], ],
component: _import("serviceCentre/shortCourse/index") component: _import("serviceCentre/shortCourse/index")
}, },
91403: { 91903: {
path: "/configureCourse", path: "/configureCourse",
name: "configureCourse", name: "configureCourse",
meta: { meta: {
title: "配置课程", title: "配置课程",
authId: "91403", authId: "91903",
parentId: "91901", parentId: "91901",
cache: false, cache: false,
activePath: "/longCourse" activePath: "/longCourse"
......
...@@ -13,7 +13,14 @@ ...@@ -13,7 +13,14 @@
:style="{ width: picOptions.width, height: picOptions.height }" :style="{ width: picOptions.width, height: picOptions.height }"
v-if="picOptions.type == 'video'" v-if="picOptions.type == 'video'"
> >
<video id="video" width="100%" height="100%" preload="none" loop muted> <video
id="video"
width="100%"
height="100%"
preload="none"
loop
muted
>
<source :src="item" type="video/mp4" /> <source :src="item" type="video/mp4" />
</video> </video>
<img <img
...@@ -173,6 +180,7 @@ import draggable from "vuedraggable" ...@@ -173,6 +180,7 @@ import draggable from "vuedraggable"
import ImageViewer from "./Image.vue" import ImageViewer from "./Image.vue"
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import GlOssApi from "glsk-oss-jssdk" import GlOssApi from "glsk-oss-jssdk"
// import GlOssApi from "@/common/oss"
export default { export default {
components: { components: {
draggable, draggable,
...@@ -207,13 +215,13 @@ export default { ...@@ -207,13 +215,13 @@ export default {
dialogVisibleImg(val) { dialogVisibleImg(val) {
if (!val) { if (!val) {
// 关闭所有视频播放 // 关闭所有视频播放
const videos = document.querySelectorAll('.preVideo'); const videos = document.querySelectorAll(".preVideo")
videos.forEach(video => { videos.forEach((video) => {
if (video && !video.paused) { if (video && !video.paused) {
video.pause(); video.pause()
video.currentTime = 0; video.currentTime = 0
} }
}); })
} }
} }
}, },
......
...@@ -5,8 +5,13 @@ ...@@ -5,8 +5,13 @@
<d2-container> <d2-container>
<!-- <div class="offline-account"> --> <!-- <div class="offline-account"> -->
<div class="header" slot="header" style="padding: 10px 20px"> <div class="header" slot="header" style="padding: 10px 20px">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="labelWidth" <d2-search
:form-data="showFormData" /> ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData"
/>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button @click="handleSearch" size="small" type="primary">
查询 查询
...@@ -20,20 +25,33 @@ ...@@ -20,20 +25,33 @@
<d2-table-header> <d2-table-header>
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch" <d2-table
:table-params="tableParams" :before-search-fn="beforeSearchFn"> ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130502']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130502']" />
</span> </span>
<span style="margin-right: 10px" <span
v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2 || scope.scope.contentType == 5"> style="margin-right: 10px"
v-if="
(scope.scope.sendStatus == 1 && scope.scope.contentType == 5) ||
(scope.scope.sendStatus == 2 && scope.scope.contentType == 5)
"
>
<auth-button :data="scope.scope" :show-btn-ids="['9130503']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130503']" />
</span> </span>
<span style="margin-right: 10px" v-if="scope.scope.sendStatus == 3"> <span style="margin-right: 10px" v-if="scope.scope.sendStatus == 3">
<auth-button :data="scope.scope" :show-btn-ids="['9130504']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130504']" />
</span> </span>
<span style="margin-right: 10px" v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2"> <span
style="margin-right: 10px"
v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2"
>
<auth-button :data="scope.scope" :show-btn-ids="['9130505']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130505']" />
</span> </span>
</div> </div>
...@@ -311,7 +329,8 @@ export default { ...@@ -311,7 +329,8 @@ export default {
goStatisticsPage(row) { goStatisticsPage(row) {
this.$router.push({ this.$router.push({
name: row.contentType == 5 ? "massSendingStatisticsPage" : "statisticsPage", name:
row.contentType == 5 ? "massSendingStatisticsPage" : "statisticsPage",
query: { query: {
id: row.id, id: row.id,
title: row.title title: row.title
......
...@@ -532,6 +532,14 @@ export default { ...@@ -532,6 +532,14 @@ export default {
width: '100px', width: '100px',
formatter: (cellValue) => { formatter: (cellValue) => {
return this.baseData.oaApproveStatusList.find(item => item.confId === cellValue.oaApproveStatus)?.confValue || '--' return this.baseData.oaApproveStatusList.find(item => item.confId === cellValue.oaApproveStatus)?.confValue || '--'
},
className: (cellValue) => {
return {
1: 'blueSpot',
2: 'greenSpot',
3: 'redSpot',
4: 'ashSpot'
}[cellValue.oaApproveStatus]
} }
}, },
{ {
......
...@@ -621,8 +621,8 @@ import { limitPrice } from "@/common/format" ...@@ -621,8 +621,8 @@ import { limitPrice } from "@/common/format"
import { applicableModelTypeList, BaseData } from "@/common/constants.js" import { applicableModelTypeList, BaseData } from "@/common/constants.js"
import { mapActions, mapMutations } from "vuex" import { mapActions, mapMutations } from "vuex"
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
// import GlOssApi from "glsk-oss-jssdk" import GlOssApi from "glsk-oss-jssdk"
import GlOssApi from "@/common/oss.js" // import GlOssApi from "@/common/oss.js"
const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_APP_VERSION}-info` const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_APP_VERSION}-info`
export default { export default {
name: "ProductForm", name: "ProductForm",
......
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [{ showFormData: [{
label: '蓝字发票号码', label: '数电票号码',
name: 'electronicInvoiceNo', name: 'electronicInvoiceNo',
type: 'input', type: 'input',
maxlength: '50', maxlength: '50',
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div v-loading="loading"> <div v-loading="loading">
<div class="form_div"> <div class="form_div">
<el-form class="edit-sub-block" <el-form class="edit-sub-block"
label-width="150px" label-width="200px"
:inline="true"> :inline="true">
<el-form-item label="审批编号:"> <el-form-item label="审批编号:">
{{ detailInfo.applyCode ? detailInfo.applyCode : "-" }} {{ detailInfo.applyCode ? detailInfo.applyCode : "-" }}
...@@ -170,12 +170,11 @@ ...@@ -170,12 +170,11 @@
<div v-if="detailInfo.refundApplyDetailList"> <div v-if="detailInfo.refundApplyDetailList">
<d2-table :table-params="orderTableParams" :tableData="detailInfo.refundApplyDetailList" :hasPage="false"></d2-table> <d2-table :table-params="orderTableParams" :tableData="detailInfo.refundApplyDetailList" :hasPage="false"></d2-table>
</div> </div>
<div class="examine-record" <div class="examine-record">
v-if="detailInfo.approveType == 1">
<div class="title"> <div class="title">
操作记录<el-button type="text" 操作记录<el-button type="text"
class="edit-btn" class="edit-btn"
@click="handleRecordUpdate">编辑</el-button> @click="handleRecordUpdate" v-if="detailInfo.approveType == 1">编辑</el-button>
</div> </div>
<div class="record-div"> <div class="record-div">
<div class="record-div-d" <div class="record-div-d"
...@@ -572,18 +571,26 @@ export default { ...@@ -572,18 +571,26 @@ export default {
item.optStautsShow = "驳回" item.optStautsShow = "驳回"
item.optRemarkShow = "驳回原因" item.optRemarkShow = "驳回原因"
} }
} else if (item.beforeStatus == 6) { } else if (item.beforeStatus == 7) {
item.optShow = "区域运营审核" item.optShow = "区域运营审核"
item.optStautsShow = "通过" item.optStautsShow = "通过"
item.optPerShow = "审核人" item.optPerShow = "审核人"
item.optTimeShow = "审核时间" item.optTimeShow = "审核时间"
item.optRemarkShow = "备注" item.optRemarkShow = "备注"
} else if (item.beforeStatus == 7) { if (item.afterStatus == 5) {
item.optStautsShow = "驳回"
item.optRemarkShow = "驳回原因"
}
} else if (item.beforeStatus == 8) {
item.optShow = "运营补充" item.optShow = "运营补充"
item.optStautsShow = "通过" item.optStautsShow = "通过"
item.optPerShow = "操作人" item.optPerShow = "操作人"
item.optTimeShow = "操作时间" item.optTimeShow = "操作时间"
item.optRemarkShow = "备注" item.optRemarkShow = "备注"
if (item.afterStatus == 5) {
item.optStautsShow = "驳回"
item.optRemarkShow = "驳回原因"
}
} else { } else {
item.isShow = item.beforeStatus == item.afterStatus item.isShow = item.beforeStatus == item.afterStatus
if (item.beforeStatus == item.afterStatus) { if (item.beforeStatus == item.afterStatus) {
...@@ -796,7 +803,7 @@ export default { ...@@ -796,7 +803,7 @@ export default {
.el-form-item__content { .el-form-item__content {
display: inline-block; display: inline-block;
width: calc(100% - 150px); width: calc(100% - 200px);
line-height: 24px; line-height: 24px;
} }
......
...@@ -47,11 +47,11 @@ ...@@ -47,11 +47,11 @@
</div> </div>
</template> </template>
</glsx-combi-form> </glsx-combi-form>
<el-form :model="detail" :rules="tableRules" ref="refundTableForm"> <el-form :model="detail" :rules="tableRules" ref="refundTableForm" class="refund-table" v-if="detail && detail.refundApplyDetailList && detail.refundApplyDetailList.length">
<d2-table ref="recordTable" :table-params="orderTableParams" :tableData="detail.refundApplyDetailList" :hasPage="false"> <d2-table ref="recordTable" :table-params="orderTableParams" :tableData="detail.refundApplyDetailList" :hasPage="false">
<div slot="tableRefundAmount" slot-scope="scope"> <div slot="tableRefundAmount" slot-scope="scope">
<el-form-item :prop="'refundApplyDetailList.' + scope.index + '.refundAmount'" :rules="tableRules.refundAmount"> <el-form-item :prop="'refundApplyDetailList.' + scope.index + '.refundAmount'" :rules="tableRules.refundAmount">
<el-input v-model="detail.refundApplyDetailList[scope.index].refundAmount" placeholder="请输入退款金额" type="number" @input="handleInput(scope.index, 'refundAmount')"> <el-input v-model="detail.refundApplyDetailList[scope.index].refundAmount" placeholder="请输入退款金额" @input="handleInput(scope.index, 'refundAmount')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<template slot="attachmentListHtml" slot-scope="scope"> <template slot="attachmentListHtml" slot-scope="scope">
<el-upload action="" accept=".xlsx,.xls,.doc,.pdf,.docx,.jpg,.png" class="upload-file" :show-file-list="false" :file-list="uploadFileList" :limit="5" :auto-upload="false" :on-remove="importFileChange" :on-change=" <el-upload action="" accept=".xlsx,.xls,.doc,.pdf,.docx,.jpg,.png" class="upload-file" :show-file-list="false" :file-list="uploadFileList" :limit="5" :auto-upload="false" :on-remove="importFileChange" :on-change="
(file, fileList) => handleFileChange(file, fileList, scope.scope) (file, fileList) => handleFileChange(file, fileList, scope.scope)
" :on-exceed="hanldeOnExceed" multiple v-if="!detail.applyCode"> " :on-exceed="hanldeOnExceed" multiple v-if="!detail || (detail && !detail.applyCode)">
<!-- <i class="el-icon-upload"></i> <!-- <i class="el-icon-upload"></i>
<div class="el-upload__text">点击或将文件拖拽到此区域上传</div> <div class="el-upload__text">点击或将文件拖拽到此区域上传</div>
<div class="item-tips text-tips"> <div class="item-tips text-tips">
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<div class="file-name">{{ subItem.fileName }}</div> <div class="file-name">{{ subItem.fileName }}</div>
</div> </div>
<i v-if="!subItem.fileUrl" class="el-icon-close del-icon" @click="doCancel(scope.scope, subIndex)"></i> <i v-if="!subItem.fileUrl" class="el-icon-close del-icon" @click="doCancel(scope.scope, subIndex)"></i>
<i v-if="subItem.fileUrl && !detail.applyCode" class="el-icon-delete" @click="handleFileDelete(scope.scope, subIndex)"></i> <i v-if="subItem.fileUrl && (!detail || (detail && !detail.applyCode))" class="el-icon-delete" @click="handleFileDelete(scope.scope, subIndex)"></i>
</div> </div>
</div> </div>
</div> </div>
...@@ -108,6 +108,12 @@ ...@@ -108,6 +108,12 @@
</template> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<el-image-viewer
v-if="imgViewerVisible"
:on-close="closeImgViewer"
:url-list="imageFileArr"
:initial-index="initialIndex"
/>
</baseDialog> </baseDialog>
</template> </template>
...@@ -129,6 +135,9 @@ import { baseConfig } from "@/main" ...@@ -129,6 +135,9 @@ import { baseConfig } from "@/main"
import GlOssApi from "glsk-oss-jssdk" import GlOssApi from "glsk-oss-jssdk"
export default { export default {
name: "NewSignRefundDialog", name: "NewSignRefundDialog",
components: {
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer'),
},
data() { data() {
var checkAmount = (rule, value, callback) => { var checkAmount = (rule, value, callback) => {
if (!value) { if (!value) {
...@@ -144,6 +153,8 @@ export default { ...@@ -144,6 +153,8 @@ export default {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
loading: false, loading: false,
refundOldData: [], refundOldData: [],
imageFileArr: [],
imgViewerVisible: false,
// 标记apiList是否都正确返回数据 // 标记apiList是否都正确返回数据
baseApiIdx: 0, baseApiIdx: 0,
okParams: {}, okParams: {},
...@@ -479,7 +490,7 @@ export default { ...@@ -479,7 +490,7 @@ export default {
], ],
tableRules: { tableRules: {
refundAmount: [ refundAmount: [
{ required: true, message: '请输入退款金额', trigger: 'blur' } { required: true, message: '请输入退款金额', trigger: 'blur' },
] ]
}, },
orderTableParams: { orderTableParams: {
...@@ -592,6 +603,10 @@ export default { ...@@ -592,6 +603,10 @@ export default {
scene: { scene: {
type: String, type: String,
default: "" default: ""
},
title: {
type: String,
default: ''
} }
}, },
watch: { watch: {
...@@ -610,6 +625,9 @@ export default { ...@@ -610,6 +625,9 @@ export default {
this.uploadFileList = newVal.filter( this.uploadFileList = newVal.filter(
(v) => !this.filterEmpty(v.uploadProgress) || v.fileUrl (v) => !this.filterEmpty(v.uploadProgress) || v.fileUrl
) // 文件列表 ) // 文件列表
const imageFileArr = newVal.filter(v => v.fileUrl && (v.fileUrl.includes('.png') || v.fileUrl.includes('jpg')))
this.imageFileArr = imageFileArr.map(item => { return item.fileUrl })
console.log(this.imageFileArr, 'this.imageFileArr')
} }
}, },
deep: true deep: true
...@@ -685,6 +703,7 @@ export default { ...@@ -685,6 +703,7 @@ export default {
this.GlOssApi = new GlOssApi({ this.GlOssApi = new GlOssApi({
baseConfig baseConfig
}) })
this.dialogConfig.title = this.title || this.dialogConfig.title
this.infoForm.orderType = this.orderType this.infoForm.orderType = this.orderType
if (this.orderType == 1) { if (this.orderType == 1) {
this.infoEditFormData[this.findAttrIdx("refundType")].isDisabled = true this.infoEditFormData[this.findAttrIdx("refundType")].isDisabled = true
...@@ -697,7 +716,7 @@ export default { ...@@ -697,7 +716,7 @@ export default {
this.orderInfoList.push({ this.orderInfoList.push({
orderCode: this.detail.orderCode, orderCode: this.detail.orderCode,
price: this.detail.totalPrice, price: this.detail.totalPrice,
total: this.detail.total, total: this.detail.total.toFixed(2),
refundSubOrderCode: this.detail.refundSubOrderCode, refundSubOrderCode: this.detail.refundSubOrderCode,
refundApplyDetailList: this.detail.refundApplyDetailList refundApplyDetailList: this.detail.refundApplyDetailList
}) })
...@@ -799,7 +818,7 @@ export default { ...@@ -799,7 +818,7 @@ export default {
var params = { var params = {
orderCode: this.detail.orderCode orderCode: this.detail.orderCode
} }
if(this.detail.applyCode) { if(this.detail && this.detail?.applyCode) {
params.applyCode = this.detail.applyCode params.applyCode = this.detail.applyCode
} }
getOrderDefaultInfo(params).then((res) => { getOrderDefaultInfo(params).then((res) => {
...@@ -822,7 +841,7 @@ export default { ...@@ -822,7 +841,7 @@ export default {
this.infoForm.payee = res.refundApplyRecordInfo.payee || '' this.infoForm.payee = res.refundApplyRecordInfo.payee || ''
this.infoForm.openAccBankName = res.refundApplyRecordInfo.openAccBankName || '' this.infoForm.openAccBankName = res.refundApplyRecordInfo.openAccBankName || ''
this.infoForm.bankAccountNo = res.refundApplyRecordInfo.bankAccountNo || '' this.infoForm.bankAccountNo = res.refundApplyRecordInfo.bankAccountNo || ''
this.infoForm.payReason = res.refundApplyRecordInfo.payReason || '' this.infoForm.remark = res.refundApplyRecordInfo.payReason || ''
this.infoForm.attachmentList = [] this.infoForm.attachmentList = []
res.refundApplyRecordInfo.attachmentList.forEach(item => { res.refundApplyRecordInfo.attachmentList.forEach(item => {
this.infoForm.attachmentList.push({ this.infoForm.attachmentList.push({
...@@ -1044,15 +1063,16 @@ export default { ...@@ -1044,15 +1063,16 @@ export default {
}, },
// 预览文件 // 预览文件
handleFileView(item) { handleFileView(item) {
// if (!item.fileUrl) return console.log(item, 'item--')
// if (item?.fileUrl.includes('.pdf')) { // pdf文件直接打开新窗口预览 if (!item.fileUrl) return
// window.open(item.fileUrl) if (item?.fileUrl.includes('.pdf')) { // pdf文件直接打开新窗口预览
// } else { window.open(item.fileUrl)
// this.imgViewerVisible = true } else if (item.fileUrl.includes('.png') || item.fileUrl.includes('jpg')) {
// this.imageFileArr.forEach((val, index) => { this.imgViewerVisible = true
// if (val == item.fileUrl) this.initialIndex = index this.imageFileArr.forEach((val, index) => {
// }) if (val == item.fileUrl) this.initialIndex = index
// } })
}
}, },
closeImgViewer() { closeImgViewer() {
this.imgViewerVisible = false this.imgViewerVisible = false
...@@ -1141,8 +1161,14 @@ export default { ...@@ -1141,8 +1161,14 @@ export default {
infoValid = true infoValid = true
this.clearValid("refundPoints2") this.clearValid("refundPoints2")
} }
let tableValid = true
if (this.detail) {
this.$refs.refundTableForm.validate((valid) => {
tableValid = valid
})
}
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => { this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
this.$refs.refundTableForm.validate((tableValid) => { // this.$refs.refundTableForm.validate((tableValid) => {
if (infoValid && valid && tableValid) { if (infoValid && valid && tableValid) {
this.okParams = deepClone(this.infoForm) this.okParams = deepClone(this.infoForm)
// return console.log('this.okParams', this.okParams) // return console.log('this.okParams', this.okParams)
...@@ -1181,7 +1207,7 @@ export default { ...@@ -1181,7 +1207,7 @@ export default {
}) })
}) })
} }
if(this.detail.applyCode) { if(this.detail && this.detail?.applyCode) {
this.okParams.applyCode = this.detail.applyCode this.okParams.applyCode = this.detail.applyCode
this.okParams.id = this.detail.id this.okParams.id = this.detail.id
addOaRefund(this.okParams).then((res) => { addOaRefund(this.okParams).then((res) => {
...@@ -1195,7 +1221,7 @@ export default { ...@@ -1195,7 +1221,7 @@ export default {
}) })
} }
} }
}) // })
}) })
} }
) )
...@@ -1221,6 +1247,12 @@ export default { ...@@ -1221,6 +1247,12 @@ export default {
margin: 0 !important; margin: 0 !important;
} }
.refund-table {
.el-form-item {
margin: 16px 0;
}
}
.edit-sub-block { .edit-sub-block {
padding-top: 16px; padding-top: 16px;
.el-form-item { .el-form-item {
......
...@@ -151,7 +151,7 @@ export default { ...@@ -151,7 +151,7 @@ export default {
_refundSubOrderCode.push(item.subOrderCode) _refundSubOrderCode.push(item.subOrderCode)
this.$set(selection[idx], 'refundAmount', item.totalPrice) this.$set(selection[idx], 'refundAmount', item.totalPrice)
}) })
this.total = _total this.total = parseFloat(_total.toFixed(2))
this.refundSubOrderCode = _refundSubOrderCode.join("/") this.refundSubOrderCode = _refundSubOrderCode.join("/")
this.refundApplyDetailList = selection this.refundApplyDetailList = selection
console.log(this.refundSubOrderCode) console.log(this.refundSubOrderCode)
......
...@@ -13,10 +13,14 @@ ...@@ -13,10 +13,14 @@
<span class="status">{{ infoForm.approveStatus == null ? '未审核' : infoForm.approveStatus == "Y" ? '通过' : <span class="status">{{ infoForm.approveStatus == null ? '未审核' : infoForm.approveStatus == "Y" ? '通过' :
'未通过' }}</span> '未通过' }}</span>
</el-form-item> </el-form-item>
<el-form-item label="施工图片:" class="imgItem"> <el-form-item label="" class="imgItem">
<img class="img" v-for="(item, index) in infoForm.constructionImgList" :key="index" :src="item" alt=""> <img class="img" v-for="(item, index) in infoForm.constructionImgList" @click="
handleEnlargeImg(infoForm.constructionImgList, 'customerPhoto', index)
" :key="index" :src="item" alt="">
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-image-viewer v-if="imgVisible" :mask-closable="true" zIndex="3000" :on-close="closeImgViewer"
:url-list="imgList" :initial-index="initialIndex" />
</d2-dialog> </d2-dialog>
</template> </template>
...@@ -24,13 +28,21 @@ ...@@ -24,13 +28,21 @@
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
export default { export default {
name: 'technicianDialog', name: 'technicianDialog',
components: {
"el-image-viewer": () =>
import("element-ui/packages/image/src/image-viewer")
},
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
infoForm: { infoForm: {
// remark: '' // remark: ''
}, },
imgVisible: false,
index: 0,
initialIndex: 0,
imgList: [],
imgUrlName: "",
formRules: { formRules: {
remark: [{ required: true, message: '请输入备注信息', trigger: 'change' }] remark: [{ required: true, message: '请输入备注信息', trigger: 'change' }]
} }
...@@ -53,14 +65,23 @@ export default { ...@@ -53,14 +65,23 @@ export default {
created() { created() {
}, },
components: {},
mounted() { mounted() {
this.infoForm = deepClone(this.detail) this.infoForm = deepClone(this.detail)
}, },
methods: { methods: {
closeImgViewer() {
this.imgVisible = false
},
handleEnlargeImg(url, name, index) {
this.imgVisible = !this.imgVisible
// this.imgList = url
console.log("url", url)
this.initialIndex = index
this.imgList = url
this.imgUrlName = name
},
handleAddConfirm() { handleAddConfirm() {
this.handleClose(true) this.handleClose(true)
}, },
...@@ -93,6 +114,7 @@ export default { ...@@ -93,6 +114,7 @@ export default {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: flex-start; justify-content: flex-start;
padding: 0 10px;
::v-deep .el-form-item__content { ::v-deep .el-form-item__content {
margin-left: 0 !important; margin-left: 0 !important;
...@@ -102,12 +124,11 @@ export default { ...@@ -102,12 +124,11 @@ export default {
.img { .img {
width: 120px; width: 120px;
height: 120px; height: 120px;
}
.img+.img {
margin-left: 10px; margin-left: 10px;
} }
// .img {}
.status { .status {
color: #2A58AD; color: #2A58AD;
} }
......
...@@ -143,8 +143,8 @@ ...@@ -143,8 +143,8 @@
<img class="icon" src="./images/picIcon.png" /> <img class="icon" src="./images/picIcon.png" />
<span class="label">图片.jpg</span> <span class="label">图片.jpg</span>
<span class="handle" @click=" <span class="handle" @click="
handleEnlargeImg( handleImg(
[detail.electronicSignature], detail.electronicSignature,
'electronicSignature' 'electronicSignature'
) )
">点击查看</span> ">点击查看</span>
...@@ -279,24 +279,6 @@ ...@@ -279,24 +279,6 @@
</p> </p>
</div> </div>
<!-- <el-dialog :visible="imgVisible"
:before-close="handleEnlargeImg">
<el-carousel :autoplay="false"
arrow="always"
trigger="click"
height="695px"
:initial-index="index"
ref="carousel">
<el-carousel-item v-for="(item, index) in imgList"
:key="index"
class="carousel">
<img :src="item[imgUrlName]"
alt=""
class="carousel-img">
</el-carousel-item>
</el-carousel>
</el-dialog> -->
<el-image-viewer v-if="imgVisible" :on-close="closeImgViewer" :url-list="imgList" :initial-index="initialIndex" /> <el-image-viewer v-if="imgVisible" :on-close="closeImgViewer" :url-list="imgList" :initial-index="initialIndex" />
<!-- 标记退款 --> <!-- 标记退款 -->
...@@ -441,9 +423,20 @@ export default { ...@@ -441,9 +423,20 @@ export default {
}, },
handleEnlargeImg(url, name) { handleEnlargeImg(url, name) {
this.imgVisible = !this.imgVisible this.imgVisible = !this.imgVisible
this.initialIndex = 0
// this.imgList = url // this.imgList = url
console.log("url", url) console.log("url", url)
this.imgList = url.map((item) => item[name]) this.imgList = url.map((item) => item[name])
// this.imgList = url
this.imgUrlName = name
},
handleImg(url, name) {
this.imgVisible = !this.imgVisible
this.initialIndex = 0
// this.imgList = url
// this.imgList = url.map((item) => item[name])
this.imgList = [url]
console.log("url", this.imgList)
this.imgUrlName = name this.imgUrlName = name
}, },
handleEnlargeFile(url) { handleEnlargeFile(url) {
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</span> </span>
<!-- 下载 --> <!-- 下载 -->
<span style="margin-right: 10px;" <span style="margin-right: 10px;"
v-if="scope.scope.approveType == 1"> v-if="scope.scope.approveType == 1 && ![7, 8].includes(scope.scope.status)">
<auth-button :data="scope.scope" <auth-button :data="scope.scope"
:show-btn-ids="['9040808']" /> :show-btn-ids="['9040808']" />
<span v-if="scope.scope.downCount != 0" <span v-if="scope.scope.downCount != 0"
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
<!-- 补充 - 退款 --> <!-- 补充 - 退款 -->
<new-sign-refund-dialog :sign-refund-visible="signRefundVisible" <new-sign-refund-dialog :sign-refund-visible="signRefundVisible"
title="运营补充"
:detail="refundDetail" :detail="refundDetail"
:order-type="1" :order-type="1"
:scene="refundScene" :scene="refundScene"
...@@ -636,12 +637,12 @@ export default { ...@@ -636,12 +637,12 @@ export default {
info.refundApplyDetailList.forEach((item) => { info.refundApplyDetailList.forEach((item) => {
total += item.totalPrice total += item.totalPrice
}) })
let refundSubOrderCode = info.refundApplyDetailList.map(item => item.bizOrderCode).join("/")
this.refundScene = row.refundApplyOrderRefList[0].sceneType + '' this.refundScene = row.refundApplyOrderRefList[0].sceneType + ''
this.refundDetail.totalPrice = info.refundableTotalPrice
this.refundDetail.applyCode = row.applyCode this.refundDetail.applyCode = row.applyCode
this.refundDetail.total = total this.refundDetail.total = total
this.refundDetail.id = info.id this.refundDetail.id = info.id
this.refundDetail.refundSubOrderCode = refundSubOrderCode this.refundDetail.refundSubOrderCode = info.refundSubOrderCode
this.refundDetail.refundApplyDetailList = deepClone(info.refundApplyDetailList) this.refundDetail.refundApplyDetailList = deepClone(info.refundApplyDetailList)
this.refundDetail.isAll = res?.refundApplyRecordInfo.refundType == 1 this.refundDetail.isAll = res?.refundApplyRecordInfo.refundType == 1
this.refundDetail.isOneSubFirst = false this.refundDetail.isOneSubFirst = false
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
> >
<div class="detail-content"> <div class="detail-content">
<div class="form_div"> <div class="form_div">
<el-form class="edit-sub-block" label-width="140px" :inline="true"> <el-form class="edit-sub-block" label-width="100px" :inline="true">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="客户:"> <el-form-item label="客户:">
......
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
_total += item.totalPrice _total += item.totalPrice
_refundSubOrderCode.push(item.subOrderCode) _refundSubOrderCode.push(item.subOrderCode)
}) })
this.total = _total this.total = parseFloat(_total.toFixed(2))
this.refundSubOrderCode = _refundSubOrderCode.join('/') this.refundSubOrderCode = _refundSubOrderCode.join('/')
this.refundApplyDetailList = selection this.refundApplyDetailList = selection
console.log(this.refundSubOrderCode) console.log(this.refundSubOrderCode)
......
...@@ -108,11 +108,11 @@ ...@@ -108,11 +108,11 @@
<div class="max-value">可退金额:{{refundInfo.total}}</div> <div class="max-value">可退金额:{{refundInfo.total}}</div>
</template> </template>
</glsx-combi-form> </glsx-combi-form>
<el-form :model="refundInfo" :rules="tableRules" ref="refundTableForm"> <el-form :model="refundInfo" :rules="tableRules" ref="refundTableForm" class="refund-table">
<d2-table ref="recordTable" :table-params="orderTableParams" :tableData="refundInfo.refundApplyDetailList" :hasPage="false"> <d2-table ref="recordTable" :table-params="orderTableParams" :tableData="refundInfo.refundApplyDetailList" :hasPage="false">
<div slot="tableRefundAmount" slot-scope="scope"> <div slot="tableRefundAmount" slot-scope="scope">
<el-form-item :prop="'refundApplyDetailList.' + scope.index + '.refundAmount'" :rules="tableRules.refundAmount"> <el-form-item :prop="'refundApplyDetailList.' + scope.index + '.refundAmount'" :rules="tableRules.refundAmount">
<el-input v-model="refundInfo.refundApplyDetailList[scope.index].refundAmount" placeholder="请输入退款金额" type="number" @input="handleInput(scope.index, 'refundAmount')"> <el-input v-model="refundInfo.refundApplyDetailList[scope.index].refundAmount" placeholder="请输入退款金额" @input="handleInput(scope.index, 'refundAmount')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
...@@ -420,7 +420,7 @@ export default { ...@@ -420,7 +420,7 @@ export default {
refundOldData: [], refundOldData: [],
tableRules: { tableRules: {
refundAmount: [ refundAmount: [
{ required: true, message: '请输入退款金额', trigger: 'blur' } { required: true, message: '请输入退款金额', trigger: 'blur' },
] ]
}, },
orderTableParams: { orderTableParams: {
...@@ -731,7 +731,7 @@ export default { ...@@ -731,7 +731,7 @@ export default {
handleConfirm(val) { handleConfirm(val) {
console.log(val, '=====') console.log(val, '=====')
this.refundInfo.refundSubOrderCode = val.refundSubOrderCode this.refundInfo.refundSubOrderCode = val.refundSubOrderCode
this.refundInfo.total = val.total this.refundInfo.total = val.total.toFixed(2)
this.refundInfo.isAll = val.isAll this.refundInfo.isAll = val.isAll
this.refundInfo.isOneSubFirst = val.isOneSubFirst this.refundInfo.isOneSubFirst = val.isOneSubFirst
this.refundInfo.refundApplyDetailList = val.refundApplyDetailList this.refundInfo.refundApplyDetailList = val.refundApplyDetailList
...@@ -958,6 +958,13 @@ export default { ...@@ -958,6 +958,13 @@ export default {
::v-deep .el-dialog__footer { ::v-deep .el-dialog__footer {
border-top: 1px solid #e5e5e5; border-top: 1px solid #e5e5e5;
} }
.refund-table {
.el-form-item {
margin: 16px 0;
}
}
} }
.max-value { .max-value {
margin-left: 220px; margin-left: 220px;
......
...@@ -69,7 +69,9 @@ ...@@ -69,7 +69,9 @@
/> />
</div> </div>
</div> </div>
<el-link class="copy-btn" icon="el-icon-download" :underline="false" :href="detailObj.fileUrl" target="_blank">打开链接</el-link>
<div <div
v-if="detailObj.bussinessType!=2"
class="copy-btn" class="copy-btn"
@click="copyText" @click="copyText"
:data-track="JSON.stringify(copyTrack)" :data-track="JSON.stringify(copyTrack)"
...@@ -79,7 +81,7 @@ ...@@ -79,7 +81,7 @@
class="icon" class="icon"
src="@/assets/copy.png" src="@/assets/copy.png"
/> />
音频链接 分享链接
</div> </div>
</div> </div>
<div <div
...@@ -194,6 +196,7 @@ export default { ...@@ -194,6 +196,7 @@ export default {
} }
}, },
mounted () { mounted () {
console.log(this.detailObj, '=============')
this.conversationDetailPage() this.conversationDetailPage()
this.myAud = document.getElementById("audio1") this.myAud = document.getElementById("audio1")
...@@ -363,6 +366,7 @@ export default { ...@@ -363,6 +366,7 @@ export default {
align-items: center; align-items: center;
flex-shrink: 0; flex-shrink: 0;
cursor: pointer; cursor: pointer;
font-weight: 400;
.icon { .icon {
width: 16px; width: 16px;
height: 16px; height: 16px;
......
...@@ -67,10 +67,11 @@ ...@@ -67,10 +67,11 @@
<img src="@/assets/pause.png" /> <img src="@/assets/pause.png" />
</div> </div>
<div>{{ currentTime }}</div> <div>{{ currentTime }}</div>
<div class="copy-btn" @click="copyText" :data-track="JSON.stringify(copyTrack)" <el-link class="copy-btn" icon="el-icon-download" :underline="false" :href="qualityDetailList[currentNum].fileUrl" target="_blank">打开链接</el-link>
<div v-if="qualityDetailList[currentNum].bussinessType!=2" class="copy-btn" @click="copyText" :data-track="JSON.stringify(copyTrack)"
data-event-code="audio_link"> data-event-code="audio_link">
<img class="icon" src="@/assets/copy.png" /> <img class="icon" src="@/assets/copy.png" />
音频链接 分享链接
</div> </div>
</div> </div>
</div> </div>
...@@ -514,6 +515,7 @@ export default { ...@@ -514,6 +515,7 @@ export default {
align-items: center; align-items: center;
flex-shrink: 0; flex-shrink: 0;
cursor: pointer; cursor: pointer;
font-weight: 400;
.icon { .icon {
width: 16px; width: 16px;
......
...@@ -347,7 +347,7 @@ export default { ...@@ -347,7 +347,7 @@ export default {
}, },
{ {
label: "品牌", label: "品牌",
name: "carBrandId", name: "carBrandIds",
type: "select", type: "select",
multiple: true, multiple: true,
isClear: true, isClear: true,
......
...@@ -6,8 +6,10 @@ ...@@ -6,8 +6,10 @@
<div class="info-wrap"> <div class="info-wrap">
<div class="info-item flex"> <div class="info-item flex">
<label>员工:</label> <label>员工:</label>
<span>{{ queryData.employeeName || "-" }} <span
{{ queryData.phoneNumber || "" }}</span> >{{ queryData.employeeName || "-" }}
{{ queryData.phoneNumber || "" }}</span
>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>门店:</label> <label>门店:</label>
...@@ -79,7 +81,9 @@ ...@@ -79,7 +81,9 @@
@click="handleReset" @click="handleReset"
:data-track="JSON.stringify(searchForm)" :data-track="JSON.stringify(searchForm)"
data-event-code="reception_list_search" data-event-code="reception_list_search"
> 重置 </el-button> >
重置
</el-button>
</div> </div>
<div class="content-table"> <div class="content-table">
<d2-table <d2-table
...@@ -92,19 +96,13 @@ ...@@ -92,19 +96,13 @@
@setTableFinishFun="setTableFinishFun" @setTableFinishFun="setTableFinishFun"
@pageChange="pageChange" @pageChange="pageChange"
> >
<div <div slot="durationHtml" slot-scope="scope">
slot="durationHtml"
slot-scope="scope"
>
<template v-if="scope.scope.duration"> <template v-if="scope.scope.duration">
{{ toMinutesAndSeconds(scope.scope.duration) }} {{ toMinutesAndSeconds(scope.scope.duration) }}
</template> </template>
<template v-else>--</template> <template v-else>--</template>
</div> </div>
<div <div slot="scoreHtml" slot-scope="scope">
slot="scoreHtml"
slot-scope="scope"
>
<!-- <template v-if="scope.scope.bussinessType != 2"> --> <!-- <template v-if="scope.scope.bussinessType != 2"> -->
<template v-if="scope.scope.score || scope.scope.score === 0"> <template v-if="scope.scope.score || scope.scope.score === 0">
{{ scope.scope.score }} {{ scope.scope.score }}
...@@ -113,58 +111,56 @@ ...@@ -113,58 +111,56 @@
<!-- </template> <!-- </template>
<template v-else>-</template> --> <template v-else>-</template> -->
</div> </div>
<div <div slot="estimatedResult" slot-scope="scope">
slot="estimatedResult"
slot-scope="scope"
>
<!-- v-if="scope.scope.bussinessType != 2" --> <!-- v-if="scope.scope.bussinessType != 2" -->
<div :class="['tag', setTagColor(scope.scope.estimatedResult)]"> <div :class="['tag', setTagColor(scope.scope.estimatedResult)]">
{{ scope.scope.estimatedResult }} {{ scope.scope.estimatedResult }}
</div> </div>
<!-- <div v-else></div> --> <!-- <div v-else></div> -->
</div> </div>
<div <div slot="defencePoint" slot-scope="scope">
slot="defencePoint"
slot-scope="scope"
>
<template v-if="scope.scope.defence === 2">{{ <template v-if="scope.scope.defence === 2">{{
scope.scope.defencePoint ? scope.scope.defencePoint : "-" scope.scope.defencePoint ? scope.scope.defencePoint : "-"
}}</template> }}</template>
<template v-else-if=" <template
v-else-if="
scope.scope.defence === 1 || scope.scope.defence === 1 ||
scope.scope.defence === 0 || scope.scope.defence === 0 ||
scope.scope.defence === 4 scope.scope.defence === 4
">分析中</template> "
<template v-else-if="scope.scope.defence === 3">未发现攻防</template> >分析中</template
>
<template v-else-if="scope.scope.defence === 3"
>未发现攻防</template
>
<template v-else>-</template> <template v-else>-</template>
</div> </div>
<div <div slot="customerTypeName" slot-scope="scope">
slot="customerTypeName"
slot-scope="scope"
>
<template v-if="scope.scope.defence === 2">{{ <template v-if="scope.scope.defence === 2">{{
scope.scope.customerTypeName scope.scope.customerTypeName
? scope.scope.customerTypeName ? scope.scope.customerTypeName
: "-" : "-"
}}</template> }}</template>
<template v-else-if=" <template
v-else-if="
scope.scope.defence === 1 || scope.scope.defence === 1 ||
scope.scope.defence === 0 || scope.scope.defence === 0 ||
scope.scope.defence === 4 scope.scope.defence === 4
">分析中</template> "
>分析中</template
>
<template v-else-if="scope.scope.defence === 3">未知</template> <template v-else-if="scope.scope.defence === 3">未知</template>
<template v-else>-</template> <template v-else>-</template>
</div> </div>
<template <template slot="auth-button" slot-scope="scope">
slot="auth-button"
slot-scope="scope"
>
<el-button <el-button
type="text" type="text"
@click="qualitDetail(scope.scope)" @click="qualitDetail(scope.scope)"
:data-track="JSON.stringify({ :data-track="
batchId:scope.scope.id JSON.stringify({
})" batchId: scope.scope.id
})
"
data-event-code="reception_detail" data-event-code="reception_detail"
> >
接待详情 接待详情
...@@ -198,14 +194,14 @@ import ElInputRange from "../el-input-range" ...@@ -198,14 +194,14 @@ import ElInputRange from "../el-input-range"
import QualityDetail from "./qualityDetail.vue" import QualityDetail from "./qualityDetail.vue"
import NewQualityDetail from "./newQualityDetail.vue" import NewQualityDetail from "./newQualityDetail.vue"
import { conversationPage } from "@api/resident" import { conversationPage } from "@api/resident"
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin' import reportTrackFunMixin from "@/mixins/reportTrackFunMixin"
export default { export default {
mixins: [reportTrackFunMixin], mixins: [reportTrackFunMixin],
props: { props: {
queryData: Object, queryData: Object,
show: Boolean show: Boolean
}, },
data () { data() {
return { return {
isQualityVisible: false, isQualityVisible: false,
isNewQualityVisible: false, isNewQualityVisible: false,
...@@ -259,14 +255,14 @@ export default { ...@@ -259,14 +255,14 @@ export default {
{ {
label: "业务场景", label: "业务场景",
prop: "bussinessType", prop: "bussinessType",
formatter (row) { formatter(row) {
let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType] let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType]
return result || "-" return result || "-"
} }
}, },
{ {
label: "APP接待结果", label: "APP接待结果",
formatter (row) { formatter(row) {
let result = { let result = {
1: "成交", 1: "成交",
0: "战败" 0: "战败"
...@@ -303,7 +299,7 @@ export default { ...@@ -303,7 +299,7 @@ export default {
label: "安心包是否开口", label: "安心包是否开口",
prop: "axbOpenFlag", prop: "axbOpenFlag",
width: 130, width: 130,
formatter (row) { formatter(row) {
return row.axbOpenFlag ? "是" : "否" return row.axbOpenFlag ? "是" : "否"
} }
}, },
...@@ -311,7 +307,7 @@ export default { ...@@ -311,7 +307,7 @@ export default {
label: "安心包是否成交", label: "安心包是否成交",
prop: "isFinishFlag", prop: "isFinishFlag",
width: 130, width: 130,
formatter (row) { formatter(row) {
return row.finishFlag ? "是" : "否" return row.finishFlag ? "是" : "否"
} }
}, },
...@@ -344,8 +340,8 @@ export default { ...@@ -344,8 +340,8 @@ export default {
qualityDetailList: [], qualityDetailList: [],
currentNum: 0, currentNum: 0,
batchNum: null, batchNum: null,
track_event_code: 'reception_detail_list', track_event_code: "reception_detail_list",
track_businessParam_key: 'searchForm' track_businessParam_key: "searchForm"
} }
}, },
components: { components: {
...@@ -355,14 +351,14 @@ export default { ...@@ -355,14 +351,14 @@ export default {
}, },
watch: { watch: {
show: { show: {
handler (val) { handler(val) {
if (val) this.onPageShow() if (val) this.onPageShow()
else this.onPageHide() else this.onPageHide()
}, },
immediate: true immediate: true
} }
}, },
mounted () { mounted() {
this.getOptionsList() this.getOptionsList()
let timer = setInterval(() => { let timer = setInterval(() => {
if (timer && this.batchNum != null) { if (timer && this.batchNum != null) {
...@@ -374,7 +370,7 @@ export default { ...@@ -374,7 +370,7 @@ export default {
}, 1e3) }, 1e3)
}, },
methods: { methods: {
toMinutesAndSeconds (seconds) { toMinutesAndSeconds(seconds) {
seconds = Math.floor(seconds / 1000) seconds = Math.floor(seconds / 1000)
let formattedTime = "" let formattedTime = ""
if (seconds < 60) { if (seconds < 60) {
...@@ -395,10 +391,10 @@ export default { ...@@ -395,10 +391,10 @@ export default {
return formattedTime return formattedTime
} }
}, },
handleSearch () { handleSearch() {
this.$refs.recepDetail.refreshTable(true, true) this.$refs.recepDetail.refreshTable(true, true)
}, },
handleReset () { handleReset() {
this.searchForm = { this.searchForm = {
recepTime: [], recepTime: [],
qualityTestScore: [], qualityTestScore: [],
...@@ -406,9 +402,9 @@ export default { ...@@ -406,9 +402,9 @@ export default {
} }
this.$refs.recepDetail.refreshTable() this.$refs.recepDetail.refreshTable()
}, },
closeDialog () { closeDialog() {
if(this.$refs.qualityDetail) this.$refs.qualityDetail.onPageHide() if (this.$refs.qualityDetail) this.$refs.qualityDetail.onPageHide()
if(this.$refs.newQualityDetail) { if (this.$refs.newQualityDetail) {
this.$refs.newQualityDetail.onPause() this.$refs.newQualityDetail.onPause()
this.$refs.newQualityDetail.onPageHide() this.$refs.newQualityDetail.onPageHide()
} }
...@@ -416,7 +412,7 @@ export default { ...@@ -416,7 +412,7 @@ export default {
this.isNewQualityVisible = false this.isNewQualityVisible = false
this.onPageShow() this.onPageShow()
}, },
qualitDetail (row) { qualitDetail(row) {
const list = this.$refs.recepDetail.data, const list = this.$refs.recepDetail.data,
currentNum = list.findIndex((e) => e.id == row.id) currentNum = list.findIndex((e) => e.id == row.id)
this.currentNum = currentNum this.currentNum = currentNum
...@@ -428,7 +424,7 @@ export default { ...@@ -428,7 +424,7 @@ export default {
} }
this.onPageHide() this.onPageHide()
}, },
beforeSearchFn () { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
const { queryData } = this const { queryData } = this
if (!this.searchForm.recepTime.length) if (!this.searchForm.recepTime.length)
...@@ -471,13 +467,13 @@ export default { ...@@ -471,13 +467,13 @@ export default {
resolve() resolve()
}) })
}, },
setTableFinishFun (data) { setTableFinishFun(data) {
let { page } = this.$refs.recepDetail let { page } = this.$refs.recepDetail
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
data[i].key = i + 1 + page.pageSize * (page.currentPage - 1) data[i].key = i + 1 + page.pageSize * (page.currentPage - 1)
} }
}, },
getOptionsList () { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === "select") { if (item.type === "select") {
if ( if (
...@@ -499,7 +495,7 @@ export default { ...@@ -499,7 +495,7 @@ export default {
} }
}) })
}, },
setTagColor (estimatedResult) { setTagColor(estimatedResult) {
switch (estimatedResult) { switch (estimatedResult) {
case "成交": case "成交":
return "greenBg" return "greenBg"
...@@ -509,9 +505,9 @@ export default { ...@@ -509,9 +505,9 @@ export default {
return "grayBg" return "grayBg"
} }
}, },
pageChange (page) { pageChange(page) {
let { searchForm } = this let { searchForm } = this
this.setReportTrackData(0, 'reception_list_page', { this.setReportTrackData(0, "reception_list_page", {
...searchForm, ...searchForm,
...page ...page
}) })
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header title="标签录音管理列表"> <d2-table-header title="录音标签管理列表">
<el-button size="small" type="primary" @click="exportTable"> <el-button size="small" type="primary" @click="exportTable">
导出 导出
</el-button> </el-button>
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
}, },
{ {
label: "品牌", label: "品牌",
prop: "oneCarBrand" prop: "carBrand"
}, },
{ {
label: "录音链接", label: "录音链接",
...@@ -95,13 +95,11 @@ export default { ...@@ -95,13 +95,11 @@ export default {
}, },
{ {
label: "APP接待结果", label: "APP接待结果",
formatter(row) { prop: "isOrderFinishFlagName"
let result = { },
1: "成交", {
0: "战败" label: "质检得分",
}[row.receptionStatus] prop: "score"
return result || "-"
}
}, },
{ {
label: "身份介绍", label: "身份介绍",
...@@ -147,7 +145,7 @@ export default { ...@@ -147,7 +145,7 @@ export default {
staffName: "", staffName: "",
merchantId: "", merchantId: "",
checkType: "", checkType: "",
checkStart: [], checkStart: [new Date(), new Date()],
carBrandId: "" carBrandId: ""
}, },
showFormData: [ showFormData: [
...@@ -192,11 +190,11 @@ export default { ...@@ -192,11 +190,11 @@ export default {
label: "质检时间", label: "质检时间",
name: "checkStart", name: "checkStart",
type: "datePicker", type: "datePicker",
isClear: false, isClear: true,
pickerOptions: "rangePickerOptions_30day2" pickerOptions: "rangePickerOptions_30day2"
}, },
{ {
label: "app接待结果", label: "接待结果",
name: "orderFinishFlag", name: "orderFinishFlag",
type: "select", type: "select",
isClear: true, isClear: true,
...@@ -215,7 +213,7 @@ export default { ...@@ -215,7 +213,7 @@ export default {
}, },
{ {
confId: 1, confId: 1,
confValue: "未成交" confValue: "战败"
} }
], ],
brandList: [], brandList: [],
......
...@@ -6,17 +6,17 @@ ...@@ -6,17 +6,17 @@
:class="['type', titleActiveIndex == index ? 'active' : '']" :class="['type', titleActiveIndex == index ? 'active' : '']"
v-for="(item, index) in titleTypeList" v-for="(item, index) in titleTypeList"
:key="index" :key="index"
@click="handleClick(index)" @click="handleTitleClick(index)"
> >
{{ item.title }} {{ item.title }}
</div> </div>
</div> </div>
<div class="content gl-form-page"> <div class="content gl-form-page">
<el-form :inline="true" :model="cousrFrom" class="form-inline"> <el-form :inline="true" :model="courseForm" class="form-inline">
<el-form-item> <el-form-item>
<el-input <el-input
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="cousrFrom.user" v-model="courseForm.tagSearch"
placeholder="课程/标签搜索" placeholder="课程/标签搜索"
></el-input> ></el-input>
</el-form-item> </el-form-item>
...@@ -27,20 +27,38 @@ ...@@ -27,20 +27,38 @@
<el-button @click="resetForm" size="small">重置</el-button> <el-button @click="resetForm" size="small">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-checkbox-group v-model="checkedCities"> <el-checkbox-group v-model="selected" @change="handleCheckedChange">
<el-checkbox v-for="city in cityOptions" :label="city" :key="city"> <el-checkbox
<div class="title">问界延保+安心包套餐培训视频(含考核)</div> v-for="course in courseList"
:key="course.id"
:label="course.courseId"
>
<div class="title">{{ course.courseName }}</div>
<el-tooltip <el-tooltip
effect="light" effect="light"
placement="top" placement="top"
popper-class="tools-gltip" popper-class="tools-gltip"
v-if="course.status == 2 || course.status == 5"
> >
<div slot="content" class="process-info"> <div slot="content" class="process-info">
<div>学习进度:<span>已完成</span></div> <div>
<div>考核成绩:<span>80分</span></div> 学习进度:<span>
<div>完成时间:<span>2025-06-30 16:30:05</span></div> {{ statusObj[course.status] }}
</span>
</div>
<div>
考核成绩:<span>{{ course.totalScore || 0 }}分</span>
</div>
<div v-if="course.finishDate">
完成时间:<span>{{ course.finishDate || "-" }}</span>
</div>
</div>
<div
:class="['status', statusColors[course.status]]"
v-if="course.status"
>
{{ statusObj[course.status] }}
</div> </div>
<div class="status orange">已完成</div>
</el-tooltip> </el-tooltip>
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
...@@ -49,7 +67,9 @@ ...@@ -49,7 +67,9 @@
<div class="right"> <div class="right">
<div class="title-type"> <div class="title-type">
<div class="select">已选课程</div> <div class="select">已选课程</div>
<div class="time">共3节 75min</div> <div class="time">
共{{ selectObj.count }}节 {{ selectObj.courseTotalDuration }}min
</div>
</div> </div>
<div class="reminder"> <div class="reminder">
<img <img
...@@ -58,39 +78,167 @@ ...@@ -58,39 +78,167 @@
/>提示:总课程时长建议< 60 min />提示:总课程时长建议< 60 min
</div> </div>
<div class="select-list"> <div class="select-list">
<div class="select-item" v-for="i in 20"> <div
class="select-item"
v-for="(selectCourse, index) in selectCourseList"
:key="selectCourse.courseId"
>
<div class="item-content"> <div class="item-content">
问界销售异议处理问界销售异议处理问界销售异议处理-质量异议(含考核)<span {{ selectCourse.courseName
class="item-time" }}<span class="item-time"
>25min</span >{{ selectCourse.courseTotalDuration }}min</span
> >
</div> </div>
<div class="del">删除</div> <div class="del" @click="delCourse(selectCourse)">删除</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { getStaffTagCourseList } from "@/api/serviceCentre"
export default { export default {
name: "allocation", name: "allocation",
data() { data() {
return { return {
cousrFrom: { courseForm: {
user: "" tagSearch: "",
queryAll: false
}, },
checkedCities: [],
selected: [],
selectCourseList: [],
titleActiveIndex: 0, titleActiveIndex: 0,
titleTypeList: [{ title: "推荐课程" }, { title: "自选课程" }], titleTypeList: [
cityOptions: ["上海", "北京", "广州", "深圳"] { title: "推荐课程", queryAll: false },
{ title: "自选课程", queryAll: true }
],
cityOptions: ["上海", "北京", "广州", "深圳"],
statusObj: {
2: "未完成",
5: "已完成"
},
statusColors: {
2: "orange",
5: "green"
},
selectObj: {
courseTotalDuration: 0,
count: 0
} }
}
},
props: {
courseList: {
type: Array,
default: () => []
}
},
mounted() {
console.log(this.courseList, "courseList")
}, },
methods: { methods: {
handleClick(index) { reset() {
this.selected = []
this.selectCourseList = []
this.titleActiveIndex = 0
},
handleCheckedChange(val) {
console.log(val)
this.selected = val ? val : []
this.handleCourse()
},
handleCourse() {
this.selectObj = {
courseTotalDuration: 0,
count: 0
}
this.selectCourseList = this.courseList.filter((item) => {
const isSelected = this.selected.includes(item.courseId)
if (isSelected) {
// 使用 toFixed(2) 保留两位小数,防止浮点误差
this.selectObj.courseTotalDuration = parseFloat(
(
this.selectObj.courseTotalDuration + item.courseTotalDuration
).toFixed(2)
)
this.selectObj.count += 1
}
return isSelected
})
this.$emit("handleCourse", this.selectCourseList)
},
// handleCourse() {
// this.selectObj = {
// courseTotalDuration: 0,
// count: 0
// }
// this.selectCourseList = this.courseList.filter((item) => {
// const isSelected = this.selected.includes(item.courseId)
// if (isSelected) {
// this.selectObj.courseTotalDuration += item.courseTotalDuration
// this.selectObj.count += 1
// }
// return isSelected
// })
// this.$emit("handleCourse", this.selectCourseList)
// },
// delCourse(val) {
// this.selectObj = {
// courseTotalDuration: 0,
// count: 0
// }
// let currentIndex = this.selectCourseList.findIndex(
// (item) => item.courseId == val.courseId
// )
// let selectedIndex = this.selected.findIndex(
// (item) => item == val.courseId
// )
// this.selected.splice(selectedIndex, 1)
// this.selectCourseList.splice(currentIndex, 1)
// this.selectCourseList.forEach((item) => {
// this.selectObj.courseTotalDuration += item.courseTotalDuration
// this.selectObj.count += 1
// })
// this.$emit("handleCourse", this.selectCourseList)
// },
delCourse(val) {
this.selectObj = {
courseTotalDuration: 0,
count: 0
}
let currentIndex = this.selectCourseList.findIndex(
(item) => item.courseId == val.courseId
)
let selectedIndex = this.selected.findIndex(
(item) => item == val.courseId
)
this.selected.splice(selectedIndex, 1)
this.selectCourseList.splice(currentIndex, 1)
this.selectCourseList.forEach((item) => {
this.selectObj.courseTotalDuration = parseFloat(
(
this.selectObj.courseTotalDuration + item.courseTotalDuration
).toFixed(2)
)
this.selectObj.count += 1
})
this.$emit("handleCourse", this.selectCourseList)
},
handleTitleClick(index) {
this.titleActiveIndex = index this.titleActiveIndex = index
this.courseForm.queryAll = this.titleTypeList[index].queryAll
console.log(this.courseForm, " this.courseForm")
this.search()
},
resetForm() {
this.courseForm.tagSearch = ""
this.search()
}, },
resetForm() {}, search() {
search() {} this.$emit("fromAllocation", this.courseForm)
}
} }
} }
</script> </script>
...@@ -161,13 +309,14 @@ export default { ...@@ -161,13 +309,14 @@ export default {
padding: 14px 16px; padding: 14px 16px;
white-space: wrap; white-space: wrap;
border-right: 1px solid #e5e5e5; border-right: 1px solid #e5e5e5;
width: 284px;
} }
.item-time { .item-time {
font-size: 12px; font-size: 12px;
color: #666666; color: #666666;
} }
.del { .del {
padding: 14px 18px; padding: 0 18px;
color: #2a58ad; color: #2a58ad;
font-size: 14px; font-size: 14px;
white-space: nowrap; white-space: nowrap;
...@@ -198,6 +347,7 @@ export default { ...@@ -198,6 +347,7 @@ export default {
} }
.content { .content {
padding: 16px 7px 16px 16px; padding: 16px 7px 16px 16px;
overflow: hidden;
} }
} }
.gl-form-page { .gl-form-page {
...@@ -206,6 +356,7 @@ export default { ...@@ -206,6 +356,7 @@ export default {
} }
.el-form-item__content { .el-form-item__content {
height: 32px; height: 32px;
// width:231px;
} }
.el-form .el-button { .el-form .el-button {
width: 52px; width: 52px;
...@@ -213,7 +364,7 @@ export default { ...@@ -213,7 +364,7 @@ export default {
} }
::v-deep { ::v-deep {
.el-checkbox-group { .el-checkbox-group {
height: 365px; height: 360px;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
} }
...@@ -240,6 +391,10 @@ export default { ...@@ -240,6 +391,10 @@ export default {
font-weight: 500; font-weight: 500;
border-radius: 2px; border-radius: 2px;
} }
.ash {
color: #c6c8cc;
border: 1px solid #c6c8cc;
}
.orange { .orange {
color: #f59619; color: #f59619;
border: 1px solid #f59619; border: 1px solid #f59619;
......
...@@ -7,22 +7,26 @@ ...@@ -7,22 +7,26 @@
<img class="staff-icon" src="../../images/staff-icon.png" alt="" /> <img class="staff-icon" src="../../images/staff-icon.png" alt="" />
<div class="title"> <div class="title">
员工列表 员工列表
<div class="num">共7人,已配置1人</div> <div class="num">
共{{ statisticsObj.total }}人,已配置{{
statisticsObj.complete
}}人
</div>
</div> </div>
</div> </div>
<div class="staff-list"> <div class="staff-list">
<div <div
v-for="(item, index) in staffList" v-for="(item, index) in staffList"
:key="item.id" :key="item.staffUUID"
:class="['staff-item', staffIndex == index ? 'active' : '']" :class="['staff-item', staffIndex == index ? 'active' : '']"
@click="handleClick(index)" @click="handleClick(index)"
> >
{{ item.name }} <div class="employeeName">{{ item.employeeName }}</div>
<div class="config" v-if="item.isConfig">已配置</div> <div class="config" v-if="item.courseConfigFlag == 1">已配置</div>
</div> </div>
</div> </div>
</div> </div>
<div class="right-wrap"> <div class="right-wrap" v-loading="loading">
<div class="nav-tabs"> <div class="nav-tabs">
<div <div
:class="['nav-item', activeName == index ? 'active' : '']" :class="['nav-item', activeName == index ? 'active' : '']"
...@@ -33,20 +37,34 @@ ...@@ -33,20 +37,34 @@
{{ item.label }} {{ item.label }}
</div> </div>
</div> </div>
<components :is="tabName"></components> <components
ref="components"
:is="tabName"
:aiJy="aiJy"
:staffItem="staffItem"
@handleConfigureCourse="handleConfigureCourse"
:staffList="staffList"
></components>
</div> </div>
</div> </div>
<div class="end-configuration">结束配置</div> <div class="end-configuration" @click="handleEndConfigure">结束配置</div>
</div> </div>
</template> </template>
<script> <script>
import staffDetail from "./staffDetail" import staffDetail from "./staffDetail"
import couseAllocation from "./couseAllocation" import couseAllocation from "./couseAllocation"
import {
customizeList,
findStaffByMerchantNo,
findStoreEmployeePerformance
} from "@/api/serviceCentre"
export default { export default {
name: "configureCourse", name: "configureCourse",
components: { staffDetail, couseAllocation }, components: { staffDetail, couseAllocation },
data() { data() {
return { return {
loading: false,
staffIndex: 0, staffIndex: 0,
activeName: "0", activeName: "0",
tabPaneList: [ tabPaneList: [
...@@ -57,34 +75,103 @@ export default { ...@@ -57,34 +75,103 @@ export default {
label: "课程配置" label: "课程配置"
} }
], ],
tabName: "couseAllocation", tabName: "staffDetail",
staffList: [ aiJy: "",
{ staffItem: {},
name: "王小虎", staffList: [],
isConfig: true, courseList: [],
id: 1 staffDetailInfo: {},
statisticsObj: {
total: 0,
complete: 0
}
}
}, },
{ created() {
name: "李小宣", //课程搜索功能
isConfig: true, // this.$EventBus.$on("fromAllocation", (courseForm) => {
id: 1 // console.log("父组件接收到孙组件事件:", courseForm)
// this.getStaffTagCourseList(courseForm)
// })
}, },
{ async mounted() {
name: "胡明星", this.queryData = this.$route.query
isConfig: true, //获取员工列表
id: 1 this.staffList = await this.getStaffInfoData()
this.staffItem = this.staffList[this.staffIndex]
//查询员工详情
// this.findStoreEmployeePerformanceData()
}, },
{ methods: {
name: "郝怡逸", //提交本员工配置回调
isConfig: true, async handleConfigureCourse() {
id: 1 this.staffIndex = 0
//获取员工列表
this.staffList = await this.getStaffInfoData()
this.handleTabClick(1)
this.staffItem = this.staffList[0]
},
//查询员工详情
findStoreEmployeePerformanceData() {
this.loading = true
let { staffItem, queryData } = this
findStoreEmployeePerformance({
// phone: "18978849947",
phone: staffItem.phone,
scene: queryData.scene
}).then((res) => {
this.loading = false
this.aiJy = res.aiJy
})
},
// getStaffTagCourseList(courseForm = {}) {
// console.log(this.staffItem, " this.staffItem")
// let params = {
// staffPhone: this.staffItem.phone,
// currentPage: 1,
// pageSize: 99999,
// queryAll: false,
// ...courseForm
// }
// getStaffTagCourseList(params).then((res) => {
// this.courseList = res ? res.list : []
// })
// },
handleStatistics(res) {
let total = 0,
complete = 0
res.forEach((item) => {
if (item.courseConfigFlag == 1) {
complete++
} }
] total++
})
this.statisticsObj = {
total,
complete
} }
console.log(this.statisticsObj)
},
getStaffInfoData() {
return new Promise((resolve, reject) => {
let { unionOrAndType } = this.queryData
let methods = unionOrAndType ? customizeList : findStaffByMerchantNo
methods(this.queryData).then((res) => {
console.log(res)
if (res) {
resolve(res)
}
//员工统计
this.handleStatistics(res)
})
})
}, },
methods: {
handleClick(index) { handleClick(index) {
this.staffIndex = index this.staffIndex = index
this.staffItem = this.staffList[this.staffIndex]
this.findStoreEmployeePerformanceData()
}, },
handleTabClick(index) { handleTabClick(index) {
this.activeName = index this.activeName = index
...@@ -93,6 +180,38 @@ export default { ...@@ -93,6 +180,38 @@ export default {
1: "couseAllocation" 1: "couseAllocation"
} }
this.tabName = arr[+this.activeName] this.tabName = arr[+this.activeName]
this.$nextTick(() => {
console.log(this.$refs.components)
if (index == 0) {
//查询员工详情
this.$refs.components?.findStoreEmployeePerformanceData()
// this.findStoreEmployeePerformanceData()
} else {
//获取配置课程列表
// this.getStaffTagCourseList()
this.$refs.components?.getStaffTagCourseList()
}
})
},
handleEndConfigure() {
if (this.statisticsObj.total != this.statisticsObj.complete) {
this.$confirm("还有员工未完成课程配置,是否确定结束配置?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$router.push({
name: "longCourse"
})
})
.catch(() => {})
} else {
this.$router.push({
name: "longCourse"
})
}
} }
} }
} }
...@@ -107,13 +226,14 @@ export default { ...@@ -107,13 +226,14 @@ export default {
min-width: 200px; min-width: 200px;
width: 200px; width: 200px;
height: 100%; height: 100%;
min-height: 760px; min-height: 100%;
background: #ffffff; background: #ffffff;
margin-right: 16px; margin-right: 16px;
box-sizing: border-box;
.header { .header {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
margin: 12px 0 8px 13px; margin: 12px 0 12px 13px;
.staff-icon { .staff-icon {
width: 16px; width: 16px;
height: 16px; height: 16px;
...@@ -137,18 +257,22 @@ export default { ...@@ -137,18 +257,22 @@ export default {
overflow-y: auto; overflow-y: auto;
.staff-item { .staff-item {
color: #666666; color: #666666;
font-size: 16px; font-size: 14px;
font-weight: 400; font-weight: 400;
padding: 10px 12px 10px 36px; padding: 10px 12px 10px 36px;
position: relative; position: relative;
.employeeName {
width: 90px;
white-space: wrap;
}
.config { .config {
position: absolute; position: absolute;
border-radius: 2px; border-radius: 2px;
border: 1px solid #2cca74; border: 1px solid #2cca74;
background: #e9eef7; background: #e9eef7;
padding: 4px 8px; padding: 2px 6px;
color: #2cca74; color: #2cca74;
font-size: 12px; font-size: 11px;
font-weight: 500; font-weight: 500;
top: 10px; top: 10px;
right: 12px; right: 12px;
...@@ -162,7 +286,7 @@ export default { ...@@ -162,7 +286,7 @@ export default {
} }
} }
.right-wrap { .right-wrap {
min-height: 760px; min-height: 100%;
width: calc(100% - 216px); width: calc(100% - 216px);
min-width: 984px; min-width: 984px;
overflow-x: auto; overflow-x: auto;
...@@ -180,14 +304,14 @@ export default { ...@@ -180,14 +304,14 @@ export default {
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
margin-right: 2px; margin-right: 2px;
border: 1px solid #e5e5e5; // border: 1px solid #e5e5e5;
background: #f8f8f8; background: #f8f8f8;
} }
.active { .active {
color: #2a58ad; color: #2a58ad;
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
border: 1px solid #e5e5e5; // border: 1px solid #e5e5e5;
background: #ffffff; background: #ffffff;
} }
} }
......
<!-- 倒计时 -->
<template>
<div class="count-down">
<img class="error-circle" src="../../images/error-circle.png" />
{{ countdown }}
</div>
</template>
<script>
export default {
data() {
return {
countdown: "",
isOvertime: false
}
},
mounted() {
this.startCountdown()
},
methods: {
startCountdown() {
const now = new Date()
const wednesday = new Date(now)
// 计算本周三的日期
const day = now.getDay()
const diff = (day - 3 + 7) % 7 // 3代表星期三
wednesday.setDate(wednesday.getDate() - diff)
wednesday.setHours(23, 59, 59, 0)
// 如果今天是周四或周五
if (day === 4 || day === 5) {
this.isOvertime = true
this.countdown = "已超出本周配课时间,学员需本周日前完成学习"
return
}
// 如果已过本周三,显示下周三
if (now > wednesday) {
wednesday.setDate(wednesday.getDate() + 7)
}
// 开始倒计时
this.updateCountdown(wednesday)
},
updateCountdown(endTime) {
const now = new Date()
if (now >= endTime) {
this.isOvertime = true
this.countdown = "已超出本周配课时间,学员需本周日前完成学习"
return
}
const diff = endTime - now
const days = Math.floor(diff / (1000 * 60 * 60 * 24))
const hours = Math.floor((diff / (1000 * 60 * 60)) % 24)
const minutes = Math.floor((diff / (1000 * 60)) % 60)
const seconds = Math.floor((diff / 1000) % 60)
this.countdown = `倒计时:完成本周课程配置还剩 ${days}天${hours}时${minutes}分${seconds}秒`
setTimeout(() => this.updateCountdown(endTime), 1000)
}
}
}
</script>
<style>
.count-down {
margin-left: 20px;
display: flex;
align-items: center;
width: 376px;
height: 32px;
border-radius: 2px;
opacity: 1;
background: #f47f131a;
padding: 6px 11px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
font-weight: 400;
.error-circle {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
</style>
<!-- 课程任务配置 -->
<template>
<div class="couse-wrap">
<div class="header">
课程任务配置
<count-down></count-down>
<!-- <div class="count-down">
<img class="error-circle" src="../../images/error-circle.png" />
倒计时:还剩 2天11时23分57秒 完成本周课程配置
</div> -->
</div>
<div class="condition">
<div class="couse-tabs" v-if="longForm.scene != 3">
<div
:class="['couse-tabs-item', activeIndex == index ? 'active' : '']"
v-for="(item, index) in longAllData[longForm.scene]"
:key="index"
@click="handleClick(index)"
>
{{ item.brand }}
</div>
</div>
<el-button
size="small"
type="primary"
class="custom-btn"
@click="handleCustom"
v-if="longForm.isDisabled"
>自定义配课</el-button
>
</div>
<div class="couse-content">
<div
class="content-item"
v-for="(metric, mIndex) in metricRuleList"
:key="mIndex"
>
<div class="name">{{ metric.metricName }}</div>
<div class="value">{{ metric.itemBrand }}</div>
<div class="configuration">
<div class="item">
<div>可配置</div>
<div
class="number"
v-if="metric.merchantCount || metric.merchantCount === 0"
>
{{ metric.merchantCount }}家
</div>
<div v-else class="number">-</div>
</div>
<div class="item">
<div>
{{
metric.matchMerchantCourseCount == null ? "未配课" : "已配置"
}}
</div>
<div
class="number"
v-if="
metric.matchMerchantCourseCount ||
metric.matchMerchantCourseCount === 0
"
>
{{ metric.matchMerchantCourseCount }}家
</div>
<div v-else class="number">-</div>
</div>
</div>
<div class="btns">
<div
:class="[metric.merchantCount ? 'details' : 'disabled']"
@click="handleDetail(metric)"
>
详情
</div>
<div
:class="[metric.merchantCount ? 'configure-course' : 'disabled']"
@click="handleConfigureCourse(metric)"
v-if="longForm.isDisabled"
>
配置课程
</div>
</div>
</div>
</div>
<!-- 自定义 -->
<custom-couse
:longForm="longForm"
:longItemData="longAllData[longForm.scene][activeIndex]"
:customVisible="customVisible"
v-if="customVisible"
@dialogClose="handleCloseDialog"
></custom-couse>
</div>
</template>
<script>
import customCouse from "./customCouse.vue"
import countDown from "./countDown.vue"
import {
findAllItemByConfigId,
findStaffByMerchantNo
} from "@/api/serviceCentre"
export default {
components: { customCouse, countDown },
data() {
return {
activeIndex: 0,
customVisible: false
}
},
props: {
longAllData: {
type: Object,
default: () => {}
},
longForm: {
type: Object,
default: () => {}
}
},
watch: {
longForm: {
handler(val) {
this.activeIndex = 0
this.findAllItemByConfigIdData()
},
deep: true
}
},
computed: {
metricRuleList() {
if (this.longAllData[this.longForm.scene]) {
return this.longAllData[this.longForm.scene][this.activeIndex]
.metricRuleList
}
}
},
mounted() {
// this.findAllItemByConfigIdData()
},
methods: {
findAllItemByConfigIdData() {
setTimeout(() => {
let params = {
...this.longForm,
configId: this.longAllData[this.longForm.scene][this.activeIndex].id
}
findAllItemByConfigId(params).then((res) => {
if (
params.configId ==
this.longAllData[this.longForm.scene][this.activeIndex].id
) {
this.longAllData[this.longForm.scene][
this.activeIndex
].metricRuleList = res
}
})
console.log(params.configId, 99999)
this.$emit("changeBrand", params.configId)
}, 0)
},
async handleConfigureCourse(item) {
let brandId = this.longAllData[this.longForm.scene][this.activeIndex].id
if (item.merchantCount) {
let data = await this.getStaffInfoData(item.merchantNos)
if (data && data.length > 0) {
this.$router.push({
name: "configureCourse",
query: {
scene: this.longForm.scene,
merchantNos: item.merchantNos,
brandId: brandId
}
})
} else {
this.$message({
message: "选中指标无匹配驻店人员",
type: "warning"
})
}
}
},
//获取门店下的员工
getStaffInfoData(merchantNos) {
return new Promise((resolve, reject) => {
findStaffByMerchantNo({
merchantNos,
scene: this.longForm.scene
}).then((res) => {
console.log(res)
resolve(res)
})
})
},
handleDetail(row) {
if (row.merchantCount) {
row.isDisabled = this.longForm.isDisabled
row.activeName = "indicatorInfo"
row.scene = this.longForm.scene
row.pageId = row.id
this.$emit("openWindow", row)
}
},
handleClick(index) {
console.log(index)
this.activeIndex = index
this.findAllItemByConfigIdData()
},
handleCustom() {
this.customVisible = true
},
handleCloseDialog() {
this.customVisible = false
}
}
}
</script>
<style lang="scss" scoped>
.couse-wrap {
margin-top: 16px;
background: #fff;
.header {
color: #111111;
font-size: 16px;
font-weight: 500;
padding: 14px 20px;
border-bottom: 1px solid #e5e5e5;
display: flex;
align-items: center;
.count-down {
margin-left: 20px;
display: flex;
align-items: center;
width: 376px;
height: 32px;
border-radius: 2px;
opacity: 1;
background: #f47f131a;
padding: 6px 11px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
font-weight: 400;
.error-circle {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
}
.condition {
display: flex;
align-items: center;
margin: 16px 20px 8px 20px;
position: relative;
height: 32px;
.couse-tabs {
flex: 3;
display: flex;
align-items: center;
flex-wrap: wrap;
&-item {
padding: 6px 20px;
background: #f2f3f5;
border-radius: 2px;
line-height: 20px;
color: #333333;
font-size: 14px;
font-weight: 500;
margin: 0 8px 8px 0;
cursor: pointer;
}
.active {
color: #2a58ad;
background: #2a58ad26;
}
}
.custom-btn {
position: absolute;
right: 0;
top: -1px;
}
}
.couse-content {
display: flex;
align-items: center;
flex-wrap: wrap;
margin: 0 20px;
.content-item {
min-width: 278px;
width: calc((100% / 4) - (16px * 3 / 4));
padding: 20px;
border-radius: 4px;
background: #f8faff;
height: 204px;
box-sizing: border-box;
margin-right: 16px;
margin-bottom: 16px;
.name {
color: #1d1d1d;
font-size: 20px;
font-weight: 500;
line-height: 28px;
}
.value {
color: #1d1d1d;
font-size: 14px;
font-weight: 400;
line-height: 20px;
margin: 4px 0 16px;
}
.configuration {
display: flex;
align-items: center;
margin-bottom: 16px;
justify-content: space-between;
.item {
width: 114px;
color: #888888;
font-size: 14px;
font-weight: 400;
.number {
color: #1d1d1d;
font-size: 16px;
font-weight: 400;
line-height: 24px;
margin-top: 4px;
}
}
}
}
.content-item:nth-child(4n) {
margin-right: 0;
}
.btns {
display: flex;
align-items: center;
justify-content: space-between;
color: #2a58ad;
font-size: 14px;
font-weight: 400;
.details {
width: 114px;
height: 32px;
border-radius: 24px;
opacity: 1;
border: 1px solid #2a58ad80;
background: #ffffff;
line-height: 32px;
text-align: center;
cursor: pointer;
}
.disabled {
width: 114px;
height: 32px;
border-radius: 24px;
opacity: 1;
line-height: 32px;
text-align: center;
color: rgb(188, 190, 194);
background-color: rgb(244, 244, 245);
border-color: rgb(233, 233, 235);
}
.configure-course {
width: 114px;
height: 32px;
border-radius: 24px;
opacity: 1;
background: #dfe6f3;
line-height: 32px;
text-align: center;
cursor: pointer;
}
}
}
}
</style>
...@@ -13,21 +13,23 @@ ...@@ -13,21 +13,23 @@
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="姓名:" <el-form-item label="姓名:"
class="halfItem"> class="halfItem">
{{ staffInfo.staffName ? staffInfo.staffName : "-" }} {{ paramsObj.staffName ? paramsObj.staffName : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="手机号码:" <el-form-item label="手机号码:"
class="halfItem"> class="halfItem">
{{ staffInfo.staffPhone ? staffInfo.staffPhone : "-" }} {{ paramsObj.staffPhone ? paramsObj.staffPhone : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="门店:" <el-form-item label="门店:"
class="halfItem"> class="halfItem"
{{ staffInfo.merchantNames ? staffInfo.merchantNames : "-" }} :title="paramsObj.merchantName">
{{ paramsObj.merchantName ? (paramsObj.merchantName.length > 15 ? (paramsObj.merchantName.slice(0, 15) + '...') : paramsObj.merchantName) : '' }}
</el-form-item> </el-form-item>
</div> </div>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="上级:" <el-form-item label="上级:"
class="halfItem"> class="halfItem"
{{ staffInfo.superiors ? staffInfo.superiors : "-" }} :title="staffInfo.superiors">
{{ staffInfo.superiors ? (staffInfo.superiors.length > 15 ? (staffInfo.superiors.slice(0, 15) + '...') : staffInfo.superiors) : '' }}
</el-form-item> </el-form-item>
<el-form-item label="导师:" <el-form-item label="导师:"
class="halfItem"> class="halfItem">
...@@ -37,8 +39,9 @@ ...@@ -37,8 +39,9 @@
<div class="div-title">任务信息</div> <div class="div-title">任务信息</div>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="学习任务名称:" <el-form-item label="学习任务名称:"
class="halfItem"> class="halfItem"
{{ paramsObj.title ? paramsObj.title : "-" }} :title="paramsObj.title">
{{ paramsObj.title ? (paramsObj.title .length > 15 ? (paramsObj.title .slice(0, 15) + '...') : paramsObj.title ) : '' }}
</el-form-item> </el-form-item>
<el-form-item label="任务状态:" <el-form-item label="任务状态:"
class="halfItem"> class="halfItem">
...@@ -67,6 +70,7 @@ ...@@ -67,6 +70,7 @@
<div class="div-title">课程列表</div> <div class="div-title">课程列表</div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table ref="recordTable" <d2-table ref="recordTable"
:has-page="false"
:get-list-api="getListApi" :get-list-api="getListApi"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
...@@ -75,18 +79,21 @@ ...@@ -75,18 +79,21 @@
</div> </div>
</div> </div>
</div> </div>
</basedialog> </baseDialog>
</div> </div>
</template> </template>
<script> <script>
import { staffCourse, staffInfo } from "@api/serviceCentre" import { staffCourse, staffInfo } from "@api/serviceCentre"
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { course_taskStatusOpt, punishStatusOpt, learningProgressOpt } from '@/common/constants.js' import {
course_taskStatusOpt,
punishStatusOpt,
learningProgressOpt
} from "@/common/constants.js"
export default { export default {
name: "CourseDetailDialog", name: "CourseDetailDialog",
components: { components: {},
},
props: { props: {
visible: { visible: {
type: Boolean, type: Boolean,
...@@ -104,8 +111,8 @@ export default { ...@@ -104,8 +111,8 @@ export default {
}, },
set(val) { set(val) {
// this.$emit("update:visible", val) // this.$emit("update:visible", val)
console.log('this.refreshFlag', this.refreshFlag) console.log("this.refreshFlag", this.refreshFlag)
this.$emit('dialogClose', { flag: this.refreshFlag }) this.$emit("dialogClose", { flag: this.refreshFlag })
} }
} }
}, },
...@@ -135,60 +142,72 @@ export default { ...@@ -135,60 +142,72 @@ export default {
getListApi: staffCourse, getListApi: staffCourse,
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: "list",
tableOption: false, tableOption: false,
tableColumns: [{ tableColumns: [
label: '课程名称', {
prop: 'courseName', label: "课程名称",
width: '300px' prop: "courseName",
}, { width: "300px"
label: '学习时长', },
prop: 'learnDuration' {
}, { label: "课程时长",
label: '学习进度', prop: "courseTotalDuration",
prop: 'failReason',
formatter: (cellValue) => { formatter: (cellValue) => {
return this.learningProgressOpt.find( return cellValue.courseTotalDuration ? cellValue.courseTotalDuration + 'min' : '-'
}
},
{
label: "学习进度",
prop: "failReason",
formatter: (cellValue) => {
return (
this.learningProgressOpt.find(
(item) => item.confId === cellValue.status (item) => item.confId === cellValue.status
)?.confValue + (cellValue.status == 2 ? `(${cellValue.progress}%)` : '') )?.confValue +
(cellValue.status == 2 ? `(${cellValue.progress * 100}%)` : "")
)
}, },
className: (cellValue) => { className: (cellValue) => {
return { return {
1: 'ashSpot', 1: "ashSpot",
2: 'orgenSpot', 2: "orgenSpot",
5: 'greenSpot' 5: "greenSpot"
}[cellValue.status] }[cellValue.status]
} }
}, { },
label: '成绩', {
prop: 'totalScore' label: "成绩",
}, { prop: "totalScore"
label: '完成时间', },
prop: 'finishDate' {
}] label: "完成时间",
prop: "finishDate"
}
]
}, },
taskStatusOpt: deepClone(course_taskStatusOpt), taskStatusOpt: deepClone(course_taskStatusOpt),
punishStatusOpt: deepClone(punishStatusOpt), punishStatusOpt: deepClone(punishStatusOpt),
learningProgressOpt: deepClone(learningProgressOpt), learningProgressOpt: deepClone(learningProgressOpt),
taskStatusShow: '', taskStatusShow: "",
punishStatusShow: '', punishStatusShow: "",
refreshFlag: false, refreshFlag: false,
colorClass: { colorClass: {
0: 'ashSpot', 1: "orgenSpot",
1: 'orgenSpot', 2: "ashSpot"
2: 'greenSpot'
}, },
colorClass2: { colorClass2: {
1: 'ashSpot', 1: "ashSpot",
2: 'orgenSpot', 2: "orgenSpot",
3: 'greenSpot' 3: "greenSpot"
} }
} }
}, },
methods: { methods: {
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise((resolve) => {
this.searchForm.staffStudyId = this.paramsObj.id this.searchForm.staffStudyId = this.paramsObj.id
this.searchForm.pageSize = 9999
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
resolve() resolve()
}) })
...@@ -196,13 +215,13 @@ export default { ...@@ -196,13 +215,13 @@ export default {
getStaffInfo() { getStaffInfo() {
var params = { staffPhone: this.paramsObj.staffPhone } var params = { staffPhone: this.paramsObj.staffPhone }
staffInfo(params).then(res => { staffInfo(params).then((res) => {
this.staffInfo = res this.staffInfo = res
}) })
}, },
getStaffCourse() { getStaffCourse() {
var params = { staffStudyId: this.paramsObj.id } var params = { staffStudyId: this.paramsObj.id }
staffCourse(params).then(res => { staffCourse(params).then((res) => {
// this.staffInfo = res // this.staffInfo = res
}) })
}, },
...@@ -214,7 +233,9 @@ export default { ...@@ -214,7 +233,9 @@ export default {
if (info.taskStatus == 1) { if (info.taskStatus == 1) {
this.taskStatusShow = this.taskStatusShow + `(${info.progress}%)` this.taskStatusShow = this.taskStatusShow + `(${info.progress}%)`
} }
this.punishStatusShow = this.punishStatusOpt.find(item => item.confId === info.punishStatus)?.confValue this.punishStatusShow = this.punishStatusOpt.find(
(item) => item.confId === info.punishStatus
)?.confValue || '-'
} }
} }
} }
...@@ -483,7 +504,7 @@ export default { ...@@ -483,7 +504,7 @@ export default {
} }
</style> </style>
<style > <style>
.detailDialog-tooltip-width { .detailDialog-tooltip-width {
max-width: 500px; max-width: 500px;
} }
......
<!-- 课程任务配置 -->
<template>
<div class="couse-wrap">
<div class="header">
课程任务配置
<div class="count-down">
<img class="error-circle" src="../../images/error-circle.png" />
倒计时:还剩 2天11时23分57秒 完成本周课程配置
</div>
</div>
<div class="condition">
<div class="couse-tabs">
<div
:class="['couse-tabs-item', activeIndex == index ? 'active' : '']"
v-for="(item, index) in 10"
:key="index"
@click="handleClick(index)"
>
问界
</div>
</div>
<el-button size="small" type="primary" @click="handleCustom"
>自定义配课</el-button
>
</div>
<div class="couse-content">
<div class="content-item" v-for="item in couseData" :key="item">
<div class="name">{{ item.title }}</div>
<div class="value">{{ item.rate }}</div>
<div class="configuration">
<div class="item">
<div>可配置</div>
<div class="number">{{ item.configNum }}家</div>
</div>
<div class="item">
<div>已配置</div>
<div class="number">{{ item.readyNum }}家</div>
</div>
</div>
<div class="btns">
<div class="details" @click="handleDetail(item)">详情</div>
<div class="configure-course" @click="handleConfigureCourse(item)">
配置课程
</div>
</div>
</div>
</div>
<custom-couse
:customVisible="customVisible"
v-if="customVisible"
@dialogClose="handleCloseDialog"
></custom-couse>
</div>
</template>
<script>
import customCouse from "./customCouse.vue"
export default {
components: { customCouse },
data() {
return {
activeIndex: 0,
customVisible: false,
couseData: [
{
title: "月产值",
rate: "<30万",
configNum: 3,
readyNum: 4,
id: 1
}
]
}
},
methods: {
handleConfigureCourse(item) {
this.$router.push({
name: "configureCourse"
// params: { id: item.id }
})
},
handleDetail(row) {
console.log(1111)
row.activeName = "indicatorInfo"
row.pageId = row.id
this.$emit("openWindow", row)
},
handleClick(index) {
console.log(index)
this.activeIndex = index
},
handleCustom() {
this.customVisible = true
},
handleCloseDialog() {
this.customVisible = false
}
}
}
</script>
<style lang="scss" scoped>
.couse-wrap {
margin-top: 16px;
background: #fff;
.header {
color: #111111;
font-size: 16px;
font-weight: 500;
padding: 14px 20px;
border-bottom: 1px solid #e5e5e5;
display: flex;
align-items: center;
.count-down {
margin-left: 20px;
display: flex;
align-items: center;
width: 376px;
height: 32px;
border-radius: 2px;
opacity: 1;
background: #f47f131a;
padding: 6px 11px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
font-weight: 400;
.error-circle {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
}
.condition {
display: flex;
align-items: center;
margin: 16px 20px;
.couse-tabs {
flex: 3;
display: flex;
align-items: center;
flex-wrap: wrap;
&-item {
padding: 6px 20px;
background: #f2f3f5;
border-radius: 2px;
line-height: 20px;
color: #333333;
font-size: 14px;
font-weight: 500;
margin: 0 8px 8px 0;
cursor: pointer;
}
.active {
color: #2a58ad;
background: #2a58ad26;
}
}
}
.couse-content {
display: flex;
align-items: center;
flex-wrap: wrap;
margin: 0 20px;
.content-item {
min-width: 278px;
width: calc((100% / 4) - (16px * 3 / 4));
padding: 20px;
border-radius: 4px;
background: #f8faff;
height: 204px;
box-sizing: border-box;
margin-right: 16px;
margin-bottom: 16px;
.name {
color: #1d1d1d;
font-size: 20px;
font-weight: 500;
line-height: 28px;
}
.value {
color: #1d1d1d;
font-size: 14px;
font-weight: 400;
line-height: 20px;
margin: 4px 0 16px;
}
.configuration {
display: flex;
align-items: center;
margin-bottom: 16px;
.item {
flex: 1;
color: #888888;
font-size: 14px;
font-weight: 400;
.number {
color: #1d1d1d;
font-size: 16px;
font-weight: 400;
line-height: 24px;
margin-top: 4px;
}
}
}
}
.content-item:nth-child(4n) {
margin-right: 0;
}
.btns {
display: flex;
align-items: center;
justify-content: space-between;
color: #2a58ad;
font-size: 14px;
font-weight: 400;
.details {
width: 114px;
height: 32px;
border-radius: 24px;
opacity: 1;
border: 1px solid #2a58ad80;
background: #ffffff;
line-height: 32px;
text-align: center;
cursor: pointer;
}
.configure-course {
width: 114px;
height: 32px;
border-radius: 24px;
opacity: 1;
background: #dfe6f3;
line-height: 32px;
text-align: center;
cursor: pointer;
}
}
}
}
</style>
...@@ -5,10 +5,27 @@ ...@@ -5,10 +5,27 @@
:dialog-config="dialogConfig" :dialog-config="dialogConfig"
:is-show.sync="visible" :is-show.sync="visible"
class="accountDailog" class="accountDailog"
:config="config"
@handleClick="handleConfirm" @handleClick="handleConfirm"
@closeDialog="handleClose" @closeDialog="handleClose"
> >
<el-form class="edit-sub-block" label-width="160px">
<el-form-item label="归属业务:">
{{
coustomForm.scene == 1
? "延保"
: coustomForm.scene == 2
? "轻改"
: "权益"
}}
</el-form-item>
<el-form-item label="品牌:">
{{ longItemData.brand || "-" }}
</el-form-item>
</el-form>
<glsx-combi-form <glsx-combi-form
ref="editFormRef"
:form-ref="handleFormRef"
label-width="150px" label-width="150px"
default-width="400px" default-width="400px"
:form-obj="coustomForm" :form-obj="coustomForm"
...@@ -19,26 +36,60 @@ ...@@ -19,26 +36,60 @@
<div class="condition-tabs"> <div class="condition-tabs">
<div <div
:class="['condition-tab', item.active ? 'active' : '']" :class="['condition-tab', item.active ? 'active' : '']"
v-for="(item, index) in conditionList" v-for="(item, index) in conditionData.metricRuleList"
:key="index" :key="index"
@click="item.active = !item.active" @click="handleChange(index)"
> >
{{ item.text }} {{ item.metricName }}{{ item.itemBrand }}
</div> </div>
</div> </div>
</template> </template>
</glsx-combi-form> </glsx-combi-form>
<div class="footer">
<el-button type="primary" @click="handleConfirm">
{{ config.confirm_name }}
</el-button>
<el-button @click="handleClose">
{{ config.cancel_name }}
</el-button>
</div>
</baseDialog> </baseDialog>
</div> </div>
</template> </template>
<script> <script>
import { customizeList } from "@/api/serviceCentre"
export default { export default {
props: { props: {
customVisible: { customVisible: {
type: Boolean, type: Boolean,
default: false default: false
},
longItemData: {
type: Object,
default: () => {}
},
longForm: {
type: Object,
default: () => {}
} }
}, },
watch: {
longItemData: {
handler(val) {
this.handleData(val)
},
immediate: true,
deep: true
},
longForm: {
handler(val) {
this.coustomForm.scene = val.scene
},
immediate: true,
deep: true
}
},
computed: { computed: {
visible: { visible: {
get() { get() {
...@@ -58,25 +109,45 @@ export default { ...@@ -58,25 +109,45 @@ export default {
title: "自定义配课", title: "自定义配课",
width: "720px" width: "720px"
}, },
config: {
showClose: true,
appendToBody: false, // 是否将自身插入至 body 元素,有嵌套的弹窗时一定要设置
isShowFooter: false,
cancel_name: "重置规则",
confirm_name: "配置课程"
},
handleFormRef: "handleFormRef",
infoRules: { infoRules: {
refundType: [ unionOrAndType: [
{
required: true,
message: "请选择组合筛选条件",
trigger: "change"
}
],
merchantNos: [
{ {
required: true, required: true,
message: "请选择退款类型", message: "请选择筛选条件",
trigger: "blur" trigger: "click"
} }
] ]
}, },
coustomForm: {}, coustomForm: {
merchantNos: "",
unionOrAndType: "",
scene: "",
brandId: ""
},
coustomFormData: [ coustomFormData: [
{ {
label: "选择筛选条件", label: "选择筛选条件",
name: "condition", name: "merchantNos",
addHtml: "condition" addHtml: "condition"
}, },
{ {
label: "组合筛选条件:", label: "组合筛选条件",
name: "condition", name: "unionOrAndType",
type: "radio", type: "radio",
optionId: "confId", optionId: "confId",
optionLabel: "confLabel", optionLabel: "confLabel",
...@@ -89,42 +160,102 @@ export default { ...@@ -89,42 +160,102 @@ export default {
confLabel: "符合已选规则(且)", confLabel: "符合已选规则(且)",
confId: 2 confId: 2
} }
] ],
handleRadioChange: () => {}
} }
], ],
conditionList: [ conditionData: {}
{ }
text: "月产值<30万",
value: 1,
active: true
},
{
text: "客单价<9000元",
value: 2,
active: false
}, },
{ methods: {
text: "转化率<30%", handleChange(index) {
value: 3, this.conditionData.metricRuleList[index].active =
active: false !this.conditionData.metricRuleList[index].active
let merchantNos = []
this.conditionData.metricRuleList.forEach((item) => {
if (item.active) {
console.log(item)
if (!item.merchantNos || item.merchantNos.length == 0) {
item.merchantNos = [-1]
} }
] merchantNos.push(item.merchantNos.join(","))
}
})
console.log(merchantNos)
if (merchantNos.length > 0) {
this.$refs.editFormRef.$refs[this.handleFormRef].clearValidate(
`merchantNos`
)
} }
this.coustomForm.merchantNos = merchantNos
},
handleData(val) {
this.coustomForm.brandId = val.id
let data = JSON.parse(JSON.stringify(val))
data.metricRuleList.forEach((item) => {
item.active = false
})
this.conditionData = data
}, },
methods: {
handleClose() { handleClose() {
this.visible = false //将已选项进行重置
// this.visible = false
this.coustomForm.merchantNos = ""
this.coustomForm.unionOrAndType = ""
this.coustomForm.brandId = ""
this.conditionData.metricRuleList.forEach((item) => {
item.active = false
})
}, },
handleConfirm() { handleConfirm() {
this.$refs.editFormRef.$refs[this.handleFormRef].validate(
async (valid) => {
if (valid) {
let data = await this.getStaffInfoData()
if (data && data.length > 0) {
this.$router.push({
name: "configureCourse",
query: this.coustomForm
})
this.visible = false this.visible = false
} else {
this.$message({
message: "选中指标无匹配驻店人员",
type: "warning"
})
}
}
}
)
},
getStaffInfoData() {
return new Promise((resolve, reject) => {
customizeList({ ...this.coustomForm }).then((res) => {
console.log(res)
resolve(res)
})
})
} }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.coustom-dialog {
.glsx-combi-form .el-form-item--small.el-form-item {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
}
.footer {
display: flex;
justify-content: flex-end;
}
}
.condition-tabs { .condition-tabs {
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap;
width: 500px;
.condition-tab { .condition-tab {
padding: 6px 12px; padding: 6px 12px;
border-radius: 2px; border-radius: 2px;
......
...@@ -6,6 +6,9 @@ import * as echarts from "echarts" ...@@ -6,6 +6,9 @@ import * as echarts from "echarts"
export default { export default {
name: "barChart", name: "barChart",
props: { props: {
title: {
type: String
},
colors: { colors: {
type: Array, type: Array,
default: () => ["#FFC154", "#FF9671"] default: () => ["#FFC154", "#FF9671"]
...@@ -18,6 +21,13 @@ export default { ...@@ -18,6 +21,13 @@ export default {
type: Array, type: Array,
default: [] default: []
}, },
rate: {
type: String
},
dataRate: {
type: Array,
default: () => []
},
id: { id: {
type: String, type: String,
default: "" default: ""
...@@ -38,9 +48,9 @@ export default { ...@@ -38,9 +48,9 @@ export default {
// this.lineOptions = this.revese ? getBarReverseOptions(obj) : getBarOptions(obj) // this.lineOptions = this.revese ? getBarReverseOptions(obj) : getBarOptions(obj)
// }, // },
watch: { watch: {
analysisList: { yData: {
handler() { handler() {
this.chart.setOption(this.getChartSetOption()) this.chart.setOption(this.getChartSetOption(), { notMerge: true })
}, },
deep: true deep: true
} }
...@@ -48,15 +58,74 @@ export default { ...@@ -48,15 +58,74 @@ export default {
mounted() { mounted() {
this.client = this.$refs[this.id] this.client = this.$refs[this.id]
this.chart = echarts.init(this.client) this.chart = echarts.init(this.client)
this.chart.setOption(this.getChartSetOption()) this.chart.setOption(this.getChartSetOption(), { notMerge: true })
window.addEventListener("resize", this.resizeHandler) window.addEventListener("resize", this.resizeHandler)
}, },
methods: { methods: {
resizeHandler() {
if (this.chart) {
this.chart.clear()
setTimeout(() => {
this.chart.setOption(this.getChartSetOption(), { notMerge: true })
this.chart.resize()
}, 1000)
}
},
getChartSetOption() { getChartSetOption() {
var options = { var options = {
tooltip: {
trigger: "axis",
axisPointer: {
lineStyle: {
type: "solid"
}
},
padding: 12,
borderColor: "transparent",
borderWidth: 1,
backgroundColor: "rgba(255, 255, 255, 0.95)",
borderRadius: 4,
textStyle: {
color: "rgba(0, 0, 0, 0.65)",
fontSize: 14
},
formatter: (params) => {
let rate = String(this.dataRate[params[0].dataIndex][this.rate])
return `
<div style="font-weight:bold;color:rgba(0, 0, 0, 0.65); line-height: 20px;">${
params[0].name
}</div>
<div style="rgba(0, 0, 0, 0.65);display:flex;align-items:center; line-height: 20px;"> <div style="width: 6px;
height: 6px;background: ${
params[0].color
};border-radius:50%;margin-right:8px;"></div>
${this.title}:${
params[0].value === 0 ? params[0].value : params[0].value || "-"
}
</div>
<div style="margin-left:18px; line-height: 20px;">环比: <span style="color:${
rate == "null" || rate == 0
? ""
: rate.indexOf("-") > -1
? "#2CCA74"
: "#EB4E4E"
}">${rate == "null" ? "-" : rate ? rate + "%" : 0 + "%"}${
rate == "null" || rate == 0
? ""
: rate.indexOf("-") > -1
? "↓"
: "↑"
}</span></div>
`
}
},
xAxis: { xAxis: {
type: "category", type: "category",
splitNumber: 4,
axisLabel: { axisLabel: {
// rotate: 30, // 横轴名称旋转
interval: 0,
show: true,
color: "#000000a6", color: "#000000a6",
fontSize: "11px" fontSize: "11px"
}, },
...@@ -81,13 +150,15 @@ export default { ...@@ -81,13 +150,15 @@ export default {
}, },
yAxis: { yAxis: {
type: "value", type: "value",
splitLine: {
lineStyle: {
color: "#E7EBEF"
}
},
axisLabel: { axisLabel: {
show: false show: false,
color: "transparent"
},
axisLine: { show: false, color: "#E7EBEF" },
axisTick: { show: false, color: "transparent" },
splitLine: {
show: true, // 根据截图隐藏网格线
color: "#F5F7F8"
} }
// splitNumber: 4 // splitNumber: 4
}, },
...@@ -103,14 +174,35 @@ export default { ...@@ -103,14 +174,35 @@ export default {
show: true, show: true,
color: "#999999" color: "#999999"
}, },
barWidth: "35%", itemStyle: {
color: "#2A58AD"
},
barWidth: "25%",
data: this.yData data: this.yData
} }
] ]
} }
return options return options
},
destroyChart() {
// 移除窗口 resize 事件监听器
window.removeEventListener("resize", this.resizeHandler)
// 销毁 ECharts 实例
if (this.chart) {
this.chart.dispose()
this.chart = null
} }
} }
},
beforeDestroy() {
this.destroyChart()
},
// 如果使用的是 Vue 3,则使用 beforeUnmount
beforeUnmount() {
this.destroyChart()
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -27,18 +27,30 @@ export default { ...@@ -27,18 +27,30 @@ export default {
id: { id: {
type: String, type: String,
default: "" default: ""
}
}, },
watch: { title: {
xData: { type: String,
handler() { default: ""
this.chart.setOption(this.getChartSetOption()) },
rate: {
type: String
},
dataRate: {
type: Array,
default: () => []
} }
}, },
watch: {
// xData: {
// handler() {
// this.chart.setOption(this.getChartSetOption())
// }
// },
yData: { yData: {
handler() { handler() {
this.chart.setOption(this.getChartSetOption()) this.chart.setOption(this.getChartSetOption())
} },
deep: true
} }
}, },
mounted() { mounted() {
...@@ -60,31 +72,73 @@ export default { ...@@ -60,31 +72,73 @@ export default {
getChartSetOption() { getChartSetOption() {
var option = { var option = {
grid: { grid: {
bottom: "12%", top: "8%",
top: "10%", bottom: "4%",
left: "15%", left: "6%",
right: "20px" right: "6%",
containLabel: true
}, },
tooltip: { tooltip: {
show: true,
trigger: "axis", trigger: "axis",
triggerOn: "click", axisPointer: {
backgroundColor: "rgba(41, 45, 51, 1)", lineStyle: {
borderRadius: 15, type: "solid"
borderColor: "rgba(41, 45, 51, 1)", }
},
padding: 12,
borderColor: "transparent",
borderWidth: 1,
backgroundColor: "rgba(255, 255, 255, 0.95)",
borderRadius: 4,
textStyle: { textStyle: {
// 悬浮框文字样式 color: "rgba(0, 0, 0, 0.65)",
color: "#fff", fontSize: 14
fontSize: 12
}, },
formatter: (params) => { formatter: (params) => {
return params[0].value console.log(params)
console.log(this.dataRate)
let rate = String(this.dataRate[params[0].dataIndex][this.rate])
console.log(
rate,
rate == "null" || params[0].value === 0,
rate.indexOf("-") > -1
)
return `
<div style="font-weight:bold;color:rgba(0, 0, 0, 0.65); line-height: 20px;">${
params[0].name
}</div>
<div style="rgba(0, 0, 0, 0.65);display:flex;align-items:center; line-height: 20px;"> <div style="width: 6px;
height: 6px;background: ${
params[0].color
};border-radius:50%;margin-right:8px;"></div>
${this.title}:${
params[0].value === 0
? "0%"
: params[0].value
? params[0].value + "%"
: "-"
}
</div>
<div style="margin-left:18px; line-height: 20px;">环比: <span style="color:${
rate == "null" || rate == 0
? ""
: rate.indexOf("-") > -1
? "#2CCA74"
: "#EB4E4E"
}">${rate == "null" ? "-" : rate ? rate + "%" : 0 + "%"}${
rate == "null" || rate == 0
? ""
: rate.indexOf("-") > -1
? "↓"
: "↑"
}</span></div>
`
} }
}, },
xAxis: { xAxis: {
type: "category", type: "category",
boundaryGap: false, // boundaryGap: false,
splitNumber: 8, splitNumber: 4,
axisLine: { axisLine: {
show: false show: false
}, },
...@@ -92,12 +146,14 @@ export default { ...@@ -92,12 +146,14 @@ export default {
show: false show: false
}, },
splitLine: { splitLine: {
show: false show: false, // 根据截图隐藏网格线
color: "#F5F7F8"
}, },
axisLine: { axisLine: {
show: false show: false
}, },
axisLabel: { axisLabel: {
// rotate: 30, // 横轴名称旋转
interval: 0, interval: 0,
show: true, show: true,
color: "#000000a6", color: "#000000a6",
...@@ -120,10 +176,8 @@ export default { ...@@ -120,10 +176,8 @@ export default {
show: false show: false
}, },
splitLine: { splitLine: {
show: true, show: true, // 根据截图隐藏网格线
lineStyle: { color: "#F5F7F8"
color: "#E7EBEF"
}
}, },
axisTick: { axisTick: {
show: false show: false
...@@ -149,7 +203,25 @@ export default { ...@@ -149,7 +203,25 @@ export default {
] ]
} }
return option return option
},
destroyChart() {
// 移除窗口 resize 事件监听器
window.removeEventListener("resize", this.resizeHandler)
// 销毁 ECharts 实例
if (this.chart) {
this.chart.dispose()
this.chart = null
}
} }
},
beforeDestroy() {
this.destroyChart()
},
// 如果使用的是 Vue 3,则使用 beforeUnmount
beforeUnmount() {
this.destroyChart()
} }
} }
</script> </script>
......
...@@ -2,35 +2,74 @@ ...@@ -2,35 +2,74 @@
<template> <template>
<div class="week-replay"> <div class="week-replay">
<div class="header"> <div class="header">
课程任务配置<span class="time">(2025-06-09 至 2025-06-15)</span> 上周学习复盘<span class="time"
>({{ lastForm.startTime }} 至 {{ lastForm.endTime }})</span
>
</div> </div>
<div class="improve"> <div class="improve">
<div <div
:class="['item', activeIndex == index ? 'active' : '']" :class="['item', activeIndex == index + 1 ? 'active' : '']"
v-for="(item, index) in improveList" v-for="(item, index) in improveList"
:key="item.id" :key="item.id"
@click="handleClick(index)"
> >
{{ item.name }} {{ item.name }}
</div> </div>
</div> </div>
<d2-table <d2-table
class="couse-table" class="couse-table"
ref="recordTable" ref="lastTable"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:get-list-api="getListApi" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
v-if="show" v-if="show"
> >
<div slot="merchantName" slot-scope="scope">
<template
v-if="
scope.scope.merchantName &&
scope.scope.merchantName.split(',').length > 1
"
>
<span>{{
scope.scope.merchantName.split(",").slice(0, 1).join("")
}}</span>
<el-popover placement="top" width="fit-content" trigger="hover">
<div
:class="{
serverHeight: scope.scope.merchantName.split(',').length >= 10
}"
>
<div
v-for="(item, index) in scope.scope.merchantName.split(',')"
:key="index"
>
{{ item }}
</div>
</div>
<span class="more-info" slot="reference"
>...({{ scope.scope.merchantName.split(",").length }})</span
>
</el-popover>
</template>
<template v-else>
<span>{{
scope.scope.merchantName ? scope.scope.merchantName : "--"
}}</span>
</template>
</div>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<!-- 查看 --> <!-- 查看 -->
<span style="margin-right: 10px; cursor: pointer"> <span style="margin-right: 10px; cursor: pointer">
<el-button type="text" @click="handleLookCouse"> 查看课程 </el-button> <el-button type="text" @click="handleLookCouse(scope.scope)">
查看课程
</el-button>
</span> </span>
</div> </div>
<!-- 查看课程 --> <!-- 查看课程 -->
</d2-table> </d2-table>
<long-detail-dialog <long-detail-dialog
:longForm="longForm"
:longVisible.sync="detailVisible" :longVisible.sync="detailVisible"
v-if="detailVisible" v-if="detailVisible"
:params-obj="recordInfo" :params-obj="recordInfo"
...@@ -39,8 +78,10 @@ ...@@ -39,8 +78,10 @@
</div> </div>
</template> </template>
<script> <script>
import { invoicePage } from "@api/invoiceManage"
import longDetailDialog from "./longDetailDialog" import longDetailDialog from "./longDetailDialog"
import { Util, deepClone } from "@/common/util"
import { course_taskStatusOpt } from "@/common/constants.js"
import { taskStaffStudyPage } from "@api/serviceCentre"
export default { export default {
components: { longDetailDialog }, components: { longDetailDialog },
data() { data() {
...@@ -48,91 +89,147 @@ export default { ...@@ -48,91 +89,147 @@ export default {
detailVisible: false, detailVisible: false,
recordInfo: "", recordInfo: "",
show: false, show: false,
activeIndex: 0, activeIndex: 1,
searchFormSearch: {}, searchFormSearch: {
getListApi: invoicePage, studyStatus: "1",
sendStartTime: "",
sendEndTime: ""
},
baseData: {
taskStatusOpt: deepClone(course_taskStatusOpt)
},
getListApi: taskStaffStudyPage,
improveList: [ improveList: [
{ {
name: "未改善", name: "未改善",
id: 1 id: 1
},
{
name: "已改善",
id: 2
} }
// {
// name: "已改善",
// id: 2
// }
], ],
column: [ column: [
{ {
label: "驻店人员", label: "驻店人员",
prop: "invoiceAmount", prop: "staffName",
width: "150", width: "150",
isHide: false isHide: false
}, },
{ {
label: "手机号码", label: "手机号码",
prop: "phone", prop: "staffPhone",
width: "150", width: "150",
isHide: false isHide: false
}, },
{ {
label: "门店名称", label: "门店名称",
prop: "itemNames", prop: "merchantName",
addHtml: "merchantName",
width: "300", width: "300",
isHide: false isHide: false
}, },
{ {
label: "主营品牌", label: "主营品牌",
prop: "merchantBrandName", prop: "mainBrand",
width: "300",
isHide: true isHide: true
}, },
{ {
label: "学习任务情况", label: "学习任务情况",
prop: "expireStatus",
width: "120px", width: "120px",
isHide: false isHide: false,
formatter: (cellValue) => {
return (
this.baseData.taskStatusOpt.find(
(item) => item.confId === cellValue.taskStatus
)?.confValue +
(cellValue.taskStatus == 1
? `(${
cellValue.progress ? cellValue.progress.toFixed(1) : "0"
}%)`
: "")
)
},
className: (cellValue) => {
return {
2: "ashSpot",
1: "orgenSpot",
0: "greenSpot"
}[cellValue.taskStatus]
}
}, },
{ {
label: "任务完成时间", label: "任务完成时间",
prop: "createdDate", prop: "passedTime",
width: "180",
isHide: false isHide: false
} }
], ],
// 表格参数 // 表格参数
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
// mutiSelectUniqueKey: 'id',
// mutiSelectName: 'invoiceCode',
listName: "list", listName: "list",
tableOption: { width: "150px" }, tableOption: { width: "150px" },
tableColumns: [] tableColumns: []
} }
} }
}, },
created() { props: {
this.handleClick(0) longForm: {
type: Object,
default: () => {}
},
lastForm: {
type: Object,
default: () => {}
},
configId: {
type: String
}
},
mounted() {
// this.handleClick()
}, },
methods: { methods: {
handleSearch() {
setTimeout(() => {
this.$refs.lastTable.refreshTable()
}, 0)
},
beforeSearchFn() {
console.log(this.longForm)
return new Promise((resolve) => {
this.searchFormSearch.sendStartTime =
this.lastForm.startTime + " 00:00:00"
this.searchFormSearch.studyStatus = 1
this.searchFormSearch.sendEndTime = this.lastForm.endTime + " 23:59:59"
this.searchFormSearch.scene = this.longForm.scene
this.searchFormSearch.startTime = this.lastForm.startTime + " 00:00:00"
this.searchFormSearch.endTime = this.lastForm.endTime + " 23:59:59"
this.searchFormSearch.configId = this.configId
resolve()
})
},
closeDetailDialog() { closeDetailDialog() {
this.detailVisible = !this.detailVisible this.detailVisible = !this.detailVisible
this.$refs.recordTable.refreshTable(false, true) this.handleSearch()
}, },
handleLookCouse() { handleLookCouse(row) {
console.log("查看课程") this.recordInfo = row
this.detailVisible = true this.detailVisible = true
}, },
handleClick(index) { handleClick(index) {
this.show = false this.show = false
this.activeIndex = index this.activeIndex = index ? index : this.activeIndex
if (this.activeIndex == 0) { if (this.activeIndex == 1) {
this.column[this.findAttrIdx("merchantBrandName")].isHide = true this.column[this.findAttrIdx("mainBrand")].isHide = true
this.column[this.findAttrIdx("phone")].isHide = false this.column[this.findAttrIdx("staffPhone")].isHide = false
} else { } else {
this.column[this.findAttrIdx("merchantBrandName")].isHide = false this.column[this.findAttrIdx("mainBrand")].isHide = false
this.column[this.findAttrIdx("phone")].isHide = true this.column[this.findAttrIdx("staffPhone")].isHide = true
} }
this.searchFormSearch.studyStatus = index
this.filterColumn() this.filterColumn()
}, },
filterColumn() { filterColumn() {
...@@ -143,6 +240,7 @@ export default { ...@@ -143,6 +240,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.show = true this.show = true
}) })
this.handleSearch()
}, },
findAttrIdx(attrName) { findAttrIdx(attrName) {
return this.column.findIndex((item) => item.prop == attrName) return this.column.findIndex((item) => item.prop == attrName)
...@@ -152,8 +250,9 @@ export default { ...@@ -152,8 +250,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.week-replay { .week-replay {
margin-top: 16px; margin: 16px 0;
background: #fff; background: #fff;
padding: 0 0 16px 0;
.header { .header {
color: #111111; color: #111111;
font-size: 16px; font-size: 16px;
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
:dialog-config="dialogConfig" :dialog-config="dialogConfig"
:is-show.sync="visible" :is-show.sync="visible"
class="accountDailog" class="accountDailog"
:config="config"
@handleClick="handleConfirm" @handleClick="handleConfirm"
@closeDialog="handleClose" @closeDialog="handleClose"
> >
...@@ -16,17 +17,20 @@ ...@@ -16,17 +17,20 @@
:form-rules="infoRules" :form-rules="infoRules"
> >
<template slot="multiple" slot-scope="scope"> <template slot="multiple" slot-scope="scope">
<el-checkbox v-model="checkAll" @change="handleCheckAllChange" <el-checkbox
v-model="checkAll"
@change="handleCheckAllChange"
:disabled="disabled"
>全选</el-checkbox >全选</el-checkbox
> >
<div class="staff-list"> <div class="staff-list">
<div <div
:class="['staff-item', item.active ? 'active' : '']" :class="['staff-item', item.active ? 'active' : '']"
v-for="(item, index) in staffList" v-for="(item, index) in selectStaffList"
:key="index" :key="index"
@click="item.active = !item.active" @click="handleChooseStaff(index)"
> >
{{ item.text }} {{ item.employeeName }}
</div> </div>
</div> </div>
</template> </template>
...@@ -35,11 +39,29 @@ ...@@ -35,11 +39,29 @@
</div> </div>
</template> </template>
<script> <script>
import { Util, deepClone } from "@/common/util"
export default { export default {
props: { props: {
multipleVisible: { multipleVisible: {
type: Boolean, type: Boolean,
default: false default: false
},
staffList: {
type: Array,
default: () => []
},
staffItem: {
type: Object,
default: () => {}
}
},
watch: {
staffList: {
handler(val) {
this.filterStaffList(deepClone(val))
},
deep: true,
immediate: true
} }
}, },
computed: { computed: {
...@@ -61,7 +83,15 @@ export default { ...@@ -61,7 +83,15 @@ export default {
title: "多人配置", title: "多人配置",
width: "720px" width: "720px"
}, },
checkAll: true, config: {
showClose: true,
appendToBody: false, // 是否将自身插入至 body 元素,有嵌套的弹窗时一定要设置
isShowFooter: true,
cancel_name: "取 消",
confirm_name: "确定配置"
},
disabled: false,
checkAll: false,
infoRules: { infoRules: {
refundType: [ refundType: [
{ {
...@@ -79,80 +109,54 @@ export default { ...@@ -79,80 +109,54 @@ export default {
addHtml: "multiple" addHtml: "multiple"
} }
], ],
staffList: [ selectStaffList: []
{ }
text: "杨婷瑶",
value: 1,
active: true
},
{
text: "魏小敏",
value: 2,
active: false
},
{
text: "侯裕",
value: 3,
active: false
},
{
text: "杨婷瑶",
value: 1,
active: true
},
{
text: "魏小敏",
value: 2,
active: false
},
{
text: "侯裕",
value: 3,
active: false
},
{
text: "杨婷瑶",
value: 1,
active: true
},
{
text: "魏小敏",
value: 2,
active: false
},
{
text: "侯裕",
value: 3,
active: false
},
{
text: "杨婷瑶",
value: 1,
active: true
}, },
{ methods: {
text: "魏小敏", reset() {
value: 2, this.checkAll = []
active: false this.selectStaffList = []
},
handleChooseStaff(index) {
if (this.staffItem.phone != this.selectStaffList[index].phone) {
this.selectStaffList[index].active = !this.selectStaffList[index].active
this.checkAll = this.selectStaffList.every((item) => item.active)
}
}, },
{ filterStaffList(val) {
text: "侯裕", this.selectStaffList = []
value: 3, val.forEach((item) => {
active: false if (item.courseConfigFlag != 1) {
this.selectStaffList.push(item)
} }
] })
this.checkAll = this.selectStaffList.every((item) => item.active)
if (
this.selectStaffList.length == 1 &&
this.selectStaffList[0].phone == this.staffItem.phone
) {
this.disabled = true
} else {
this.disabled = false
} }
}, },
methods: {
handleCheckAllChange() { handleCheckAllChange() {
this.staffList.forEach((item) => { this.selectStaffList.forEach((item) => {
if (item.phone == this.staffItem.phone) {
item.active = true
} else {
item.active = this.checkAll item.active = this.checkAll
}
}) })
}, },
handleClose() { handleClose() {
this.visible = false this.visible = false
}, },
handleConfirm() { handleConfirm() {
// console.log("this.selectStaffList", this.selectStaffList, this.checkAll)/
let arr = this.selectStaffList.filter((item) => item.active)
// console.log(arr)
this.$emit("handleMultiple", arr)
this.visible = false this.visible = false
} }
} }
......
<!-- 业绩状况 --> <!-- 业绩状况 -->
<template> <template>
<div class="performance-status"> <div class="performance-status">
<div class="header">业绩状况(延保)</div> <div class="header">
业绩状况({{
queryData.scene == 1 ? "延保" : queryData.scene == 2 ? "轻改" : "权益"
}})
</div>
<div class="tabs"> <div class="tabs">
<div <div
:class="{ :class="{
...@@ -20,28 +24,37 @@ ...@@ -20,28 +24,37 @@
<div class="content-item"> <div class="content-item">
<div class="title">个人产值(元)</div> <div class="title">个人产值(元)</div>
<echart-bar <echart-bar
title="个人产值"
class="echart" class="echart"
id="production" id="Output"
:rate="'outputChangeRatio'"
:dataRate="performanceItemInfo"
:xData="xData" :xData="xData"
:yData="yData" :yData="yOutputData"
></echart-bar> ></echart-bar>
</div> </div>
<div class="content-item"> <div class="content-item">
<div class="title">转化率(%)</div> <div class="title">转化率(%)</div>
<echart-line <echart-line
title="转化率"
class="echart" class="echart"
id="production" id="Conversion"
:rate="'conversionChangeRatio'"
:dataRate="performanceItemInfo"
:xData="xData" :xData="xData"
:yData="yData" :yData="yConversionData"
></echart-line> ></echart-line>
</div> </div>
<div class="content-item"> <div class="content-item">
<div class="title">客单价(元)</div> <div class="title">客单价(元)</div>
<echart-bar <echart-bar
title="客单价"
class="echart" class="echart"
id="production" id="AverageOrderValue"
:rate="'aovChangeRatio'"
:dataRate="performanceItemInfo"
:xData="xData" :xData="xData"
:yData="yData" :yData="yAverageOrderValueData"
></echart-bar> ></echart-bar>
</div> </div>
</div> </div>
...@@ -59,24 +72,90 @@ export default { ...@@ -59,24 +72,90 @@ export default {
name: "performanceStatus", name: "performanceStatus",
data() { data() {
return { return {
xData: ["2021-01-01", "2021-01-02", "2021-01-03", "2021-01-04"], xData: [],
yData: [15600, 24897, 24897, 18350], yOutputData: [], //产值
yConversionData: [], //转化率
yAverageOrderValueData: [], //客单价
activeIndex: 0, activeIndex: 0,
activeType: "week",
timeData: [ timeData: [
{ {
text: "近4周", text: "近4周",
value: 1 value: "week"
}, },
{ {
text: "近4月", text: "近4月",
value: 2 value: "month"
}
],
performanceItemInfo: [],
queryData: {}
}
},
watch: {
performanceInfo: {
handler(val) {
console.log(val, "业绩状况")
this.initData()
},
deep: true,
immediate: true
} }
] },
props: {
performanceInfo: {
type: Array,
default: () => []
} }
}, },
created() {
this.queryData = this.$route.query
},
methods: { methods: {
initData() {
this.performanceInfo.forEach((item) => {
if (item.timeUnit == this.activeType) {
this.performanceItemInfo = item.data
this.handleData(item.data)
}
})
},
handleData(data) {
let xData = [],
yOutputData = [],
yConversionData = [],
yAverageOrderValueData = []
//近四周
if (this.activeIndex == 0) {
data.forEach((item) => {
// let timeStr = item.startTime + "-" + item.endTime
xData.push(item.endTime)
yOutputData.push(item.personalOutput)
// yOutputDataRate
yConversionData.push(item.conversionRate)
yAverageOrderValueData.push(item.averageOrderValue)
})
} else {
//近四月
data.forEach((item) => {
// let timeStr = item.startTime + "-" + item.endTime
xData.unshift(item.endTime.substring(0, 7))
yOutputData.unshift(item.personalOutput)
// yOutputDataRate
yConversionData.unshift(item.conversionRate)
yAverageOrderValueData.unshift(item.averageOrderValue)
})
}
this.xData = xData
this.yOutputData = yOutputData
this.yConversionData = yConversionData
this.yAverageOrderValueData = yAverageOrderValueData
},
handleClick(index) { handleClick(index) {
this.activeIndex = index this.activeIndex = index
this.activeType = this.timeData[index].value
this.initData()
} }
} }
} }
......
<!-- 员工详情 --> <!-- 员工详情 -->
<template> <template>
<div class="staff-detail"> <div class="staff-detail-wrap">
<div class="header">基础信息</div> <div class="header">基础信息</div>
<div class="baseInfo"> <div class="baseInfo">
<div class="form_div" v-if="infoData && infoData.length"> <div class="form_div" v-if="infoData && infoData.length">
...@@ -11,15 +11,60 @@ ...@@ -11,15 +11,60 @@
<el-form-item :label="item.title"> <el-form-item :label="item.title">
<div <div
v-if="item.className" v-if="item.className"
:class="[item.className(detailInfo)]" :class="[item.className(baseInfo)]"
></div> ></div>
<template
v-if="item.key == 'store' || item.key == 'regionManager'"
>
<template
v-if="
baseInfo[item.key] &&
baseInfo[item.key].split(',').length > 1
"
>
<span>{{
baseInfo[item.key].split(",").slice(0, 1).join("")
}}</span>
<el-popover
placement="top"
width="fit-content"
trigger="hover"
>
<div
:class="{
serverHeight:
baseInfo[item.key].split(',').length >= 10
}"
>
<div
v-for="(item, index) in baseInfo[item.key].split(
','
)"
:key="index"
>
{{ item }}
</div>
</div>
<span class="more-info" slot="reference"
>...({{ baseInfo[item.key].split(",").length }})</span
>
</el-popover>
</template>
<template v-else>
<span>{{
baseInfo[item.key] ? baseInfo[item.key] : "-"
}}</span>
</template>
</template>
<template v-else>
{{ {{
item.formatter item.formatter
? item.formatter(detailInfo) ? item.formatter(baseInfo)
: detailInfo[item.key] : baseInfo[item.key]
? detailInfo[item.key] ? baseInfo[item.key]
: "-" : "-"
}} }}
</template>
</el-form-item></el-col </el-form-item></el-col
> >
</template> </template>
...@@ -28,8 +73,9 @@ ...@@ -28,8 +73,9 @@
</div> </div>
</div> </div>
<!-- 业绩状况 --> <!-- 业绩状况 -->
<performance-status :detailInfo="detailInfo"></performance-status> <performance-status :performanceInfo="performanceInfo"></performance-status>
<!-- 谈客能力--> <!-- 谈客能力-->
<template v-if="queryData.brandId == 1 && queryData.scene == 1">
<div class="header">谈客能力</div> <div class="header">谈客能力</div>
<div class="presentation"> <div class="presentation">
<div <div
...@@ -40,99 +86,151 @@ ...@@ -40,99 +86,151 @@
<div class="title">{{ item.title }}</div> <div class="title">{{ item.title }}</div>
<div class="capacity"> <div class="capacity">
<div <div
class="capacity-item" :class="['capacity-item', item.key == 'ohterList' ? 'other' : '']"
v-for="(child, seconds) in item.children" v-for="(child, chindIndex) of item.children"
:key="seconds" :key="chindIndex"
> >
{{ child.title }} {{ child.label }}:{{ child.value }}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template>
<!-- 学习情况 --> <!-- 学习情况 -->
<learning-situation></learning-situation> <learning-situation
:learningProgress="learningProgress"
></learning-situation>
</div> </div>
</template> </template>
<script> <script>
import LearningSituation from "./learningSituation.vue" import LearningSituation from "./learningSituation.vue"
import PerformanceStatus from "./performanceStatus.vue" import PerformanceStatus from "./performanceStatus.vue"
import { long_businessOpt } from "@/common/constants.js"
import { Util, deepClone } from "@/common/util"
import { findStoreEmployeePerformance } from "@/api/serviceCentre"
export default { export default {
components: { components: {
PerformanceStatus, PerformanceStatus,
LearningSituation LearningSituation
}, },
props: {
staffItem: {
type: Object,
default: () => {}
}
},
watch: {
staffItem: {
handler(val) {
this.findStoreEmployeePerformanceData()
},
// immediate: true,
deep: true
}
},
data() { data() {
return { return {
detailInfo: {}, businessOpt: deepClone(long_businessOpt),
aiJy: "",
baseInfo: {},
performanceInfo: [],
consultationAbility: {},
learningProgress: {},
infoData: [ infoData: [
{ {
title: "入职时间:", title: "入职时间:",
key: "employeeName", key: "joinDateTag"
formatter(cellValue) {
return cellValue.employeeName
}
}, },
{ {
title: "上级:", title: "上级:",
key: "fileUrl" key: "regionManager"
}, },
{ {
title: "导师:", title: "导师:",
key: "carModel" key: "mentor"
}, },
{ {
title: "门店:", title: "门店:",
key: "merchantName" key: "store"
}, },
{ {
title: "归属业务:", title: "归属业务:",
key: "merchantName" key: "businessType",
formatter: (cellValue) => {
return (
this.businessOpt.find(
(item) => item.confId === cellValue.businessType
)?.confValue || "-"
)
}
} }
], ],
queryData: this.$route.query,
capacityList: [ capacityList: [
{ {
title: "弱项:", title: "弱项:",
children: [ key: "badList",
{ children: []
title: "身份介绍:差",
key: "weakItem"
},
{
title: "场景塑造:差",
key: "weakItem"
}, },
{ {
title: "案例展示:差", title: "其他项:",
key: "weakItem" key: "ohterList",
children: []
} }
] ]
}
}, },
{ methods: {
title: "其他项:", //查询员工详情
children: [ findStoreEmployeePerformanceData() {
{ let { staffItem, queryData } = this
title: "逼单能力:一般", findStoreEmployeePerformance({
key: "weakItem" phone: staffItem.phone,
}, scene: queryData.scene
{ }).then((res) => {
title: "话题介入:一般", this.initBaseData(res)
key: "weakItem" })
}, },
{ initBaseData(val) {
title: "攻防能力:一般", this.baseInfo = val.baseInfo ? val.baseInfo : {}
key: "weakItem" // this.aiJy = val.aiJy
this.consultationAbility = val.consultationAbility
val.learningProgress.courseRecords &&
val.learningProgress.courseRecords.forEach((item) => {
item.isCollapse = true
})
this.learningProgress = val.learningProgress
this.performanceInfo = val.performance
// 处理 otherList 数据
const otherData = this.consultationAbility.ohterList || {}
const ohterList = Object.keys(otherData).map((key) => ({
label: key,
value: otherData[key]
}))
const badData = this.consultationAbility.badList || {}
const badList = Object.keys(badData).map((key) => ({
label: key,
value: badData[key]
}))
// 更新 capacityList.children
this.capacityList = this.capacityList.map((item) => {
if (item.key === "ohterList") {
item.children = ohterList
} }
] if (item.key === "badList") {
item.children = badList
} }
] return item
})
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.staff-detail { .staff-detail-wrap {
background: #fff; background: #fff;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
...@@ -152,6 +250,7 @@ export default { ...@@ -152,6 +250,7 @@ export default {
.el-form-item { .el-form-item {
width: 100%; width: 100%;
margin-bottom: 0px; margin-bottom: 0px;
display: flex;
} }
.itemDiv { .itemDiv {
display: flex; display: flex;
...@@ -168,11 +267,13 @@ export default { ...@@ -168,11 +267,13 @@ export default {
white-space: nowrap; white-space: nowrap;
} }
::v-deep .el-form-item__label { ::v-deep .el-form-item__label {
white-space: nowrap;
color: #666666; color: #666666;
} }
::v-deep .el-form-item__content { ::v-deep .el-form-item__content {
max-width: calc(100% - 1280px); // max-width: calc(100% - 1280px);
word-break: break-all; word-break: break-all;
width: 90%;
} }
} }
...@@ -206,6 +307,11 @@ export default { ...@@ -206,6 +307,11 @@ export default {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
margin-left: 8px; margin-left: 8px;
margin-bottom: 4px;
}
.other {
color: #333333 !important;
font-size: 14px;
} }
} }
} }
......
<!-- 门店指标 --> <!-- 门店指标 -->
<template> <template>
<div class="store-wrap"> <div class="store-wrap" v-if="storeIndicatoerInfo">
<div v-for="(item, index) in storeList" :key="index" class="store-item"> <div class="store-item">
<div class="name">{{ item.name }}</div> <div class="name">门店总数</div>
<div class="value">{{ item.value }}</div> <div class="value">{{ storeIndicatoerInfo.merchantCount }}</div>
<div class="link" v-if="item.link"> <div class="detail" @click="handleDetail(storeIndicatoerInfo)">
环比<span>{{ item.link }}</span>
<div class="triangle-up"></div>
</div>
<div class="detail" v-if="item.addHtml" @click="handleDetail(item)">
详情<i class="el-icon-arrow-right"></i> 详情<i class="el-icon-arrow-right"></i>
</div> </div>
</div> </div>
<template
v-if="storeIndicatoerInfo && storeIndicatoerInfo.metricDTOList.length"
>
<div
v-for="(item, index) in storeIndicatoerInfo.metricDTOList"
:key="index"
class="store-item"
>
<template v-if="item">
<div class="name">{{ indicatorCode[item.metricCode] }}</div>
<div class="value">
{{ item.metricValue === 0 ? 0 : item.metricValue || "-" }}
</div>
<div class="link">
环比<span
v-if="item.linkRelativeRatio || item.linkRelativeRatio === 0"
:class="[
item.linkRelativeRatio
? String(item.linkRelativeRatio).indexOf('-') > -1
? 'dowm'
: 'up'
: ''
]"
>{{
item.linkRelativeRatio === 0
? "0%"
: item.linkRelativeRatio + "%" || "-"
}}</span
>
<span v-else>-</span>
<template v-if="item.linkRelativeRatio">
<div
class="triangle-down"
v-if="String(item.linkRelativeRatio).indexOf('-') > -1"
></div>
<div class="triangle-up" v-else></div>
</template>
</div>
</template>
</div>
</template>
</div> </div>
</template> </template>
<script> <script>
import { findAllItem } from "@/api/serviceCentre"
export default { export default {
data() { data() {
return { return {
storeIndicatoerInfo: "",
indicatorCode: {
A075: "订单数",
A036: "产值(元)",
A076: "客单价(元)",
A062: "交车数",
A063: "触客数"
},
storeList: [ storeList: [
{ {
name: "门店总数", name: "门店总数",
value: "100", value: "100",
addHtml: "store", addHtml: "store",
id: 2 id: 9999
}, },
{ {
name: "产值(元)", name: "产值(元)",
...@@ -31,8 +77,7 @@ export default { ...@@ -31,8 +77,7 @@ export default {
link: "11%", link: "11%",
trend: () => { trend: () => {
return false return false
}, }
id: 3
}, },
{ {
name: "客单价(元)", name: "客单价(元)",
...@@ -40,8 +85,7 @@ export default { ...@@ -40,8 +85,7 @@ export default {
link: "11%", link: "11%",
trend: () => { trend: () => {
return false return false
}, }
id: 4
}, },
{ {
name: "交车数", name: "交车数",
...@@ -49,8 +93,7 @@ export default { ...@@ -49,8 +93,7 @@ export default {
link: "11%", link: "11%",
trend: () => { trend: () => {
return false return false
}, }
id: 5
}, },
{ {
name: "触客数", name: "触客数",
...@@ -58,8 +101,7 @@ export default { ...@@ -58,8 +101,7 @@ export default {
link: "11%", link: "11%",
trend: () => { trend: () => {
return false return false
}, }
id: 6
}, },
{ {
name: "订单数", name: "订单数",
...@@ -67,17 +109,50 @@ export default { ...@@ -67,17 +109,50 @@ export default {
link: "11%", link: "11%",
trend: () => { trend: () => {
return false return false
}, }
id: 6
} }
] ]
} }
}, },
props: {
longAllData: {},
longForm: {
type: Object,
default: () => {}
}
},
watch: {
longForm: {
handler(val) {
this.findAllItemData()
},
deep: true,
immediate: true
}
},
mounted() {
this.findAllItemData()
},
methods: { methods: {
findAllItemData() {
console.log(33333333333333333)
let params = {
...this.longForm
}
findAllItem(params)
.then((res) => {
this.storeIndicatoerInfo = res
this.storeIndicatoerInfo.id = "-9999"
})
.catch((err) => {
new Error(err)
})
},
handleDetail(row) { handleDetail(row) {
console.log(1111)
row.activeName = "storeInfo" row.activeName = "storeInfo"
row.pageId = row.id row.pageId = row.id
row.merchantNos = row.merchantCount ? row.merchantNos : [-1]
row.scene = this.longForm.scene
this.$emit("openWindow", row) this.$emit("openWindow", row)
} }
}, },
...@@ -89,6 +164,7 @@ export default { ...@@ -89,6 +164,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 16px;
.store-item { .store-item {
width: calc((100% / 3) - (16px * 2 / 3)); width: calc((100% / 3) - (16px * 2 / 3));
min-width: 376px; min-width: 376px;
...@@ -124,9 +200,14 @@ export default { ...@@ -124,9 +200,14 @@ export default {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
span { span {
color: #eb4e4e;
margin: 0 6px; margin: 0 6px;
} }
span.up {
color: #eb4e4e;
}
span.dowm {
color: #43cf7c;
}
} }
} }
.store-item:nth-child(3n) { .store-item:nth-child(3n) {
......
...@@ -3,218 +3,198 @@ ...@@ -3,218 +3,198 @@
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header title="门店列表"> </d2-table-header> <d2-table-header title="门店列表"> </d2-table-header>
<d2-table <d2-table
ref="table" :hasPage="hasPage"
:get-list-api="getListApi" ref="storeTable"
:search-form="searchFormSearch" :tableData="tableData"
:search-form="searchForm"
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn"
> >
<div slot="mainBrand" slot-scope="scope">
<template
v-if="
scope.scope.mainBrand &&
scope.scope.mainBrand.split(',').length > 1
"
>
<span>{{
scope.scope.mainBrand.split(",").slice(0, 1).join("")
}}</span>
<el-popover placement="top" width="fit-content" trigger="hover">
<div
:class="{
serverHeight: scope.scope.mainBrand.split(',').length >= 10
}"
>
<div
v-for="(item, index) in scope.scope.mainBrand.split(',')"
:key="index"
>
{{ item }}
</div>
</div>
<span class="more-info" slot="reference"
>...({{ scope.scope.mainBrand.split(",").length }})</span
>
</el-popover>
</template>
<template v-else>
<span>{{
scope.scope.mainBrand ? scope.scope.mainBrand : "--"
}}</span>
</template>
</div>
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import { mapActions, mapState } from 'vuex'
import { refundApplyRecordPage } from "@api/refundExamine"
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { import {
studyPage, findStoreInfoByMerchantNo
studyUpdate } from "@api/serviceCentre"
} from "@api/contentManager" import { long_businessOpt } from "@/common/constants.js"
import noDataImg from "@/assets/empty.png" import noDataImg from "@/assets/empty.png"
import dayjs from "dayjs" import dayjs from "dayjs"
export default { export default {
name: "storreInfo", name: "storreInfo",
data() { data() {
return { return {
hasPage:false,
listOfPenaltiesShow: false, listOfPenaltiesShow: false,
noDataImg, noDataImg,
searchForm: { searchForm: {
bussinessScene: "", scene: "",
merchantId: "", merchantNos: []
scriptMatching: "", },
receptionist: "", tableData:[],
solutionBrowsing: "", baseData: {
// searchdate: [new Date(), new Date()] directOperateOpt: [
sendStartData: [], { confId: 0, confValue: "非直营" },
finishStartData: [] { confId: 1, confValue: "直营" }
],
businessOpt:long_businessOpt,
}, },
searchFormSearch: {},
currentItem: {},
getListApi: studyPage,
// 表格参数 // 表格参数
tableParams: { tableParams: {
listName: "list", listName: "list",
tableOption: {
width: "100"
},
tableColumns: [ tableColumns: [
{ {
label: "门店名称", label: "门店名称",
prop: "title" prop: "storeName"
}, },
{ {
label: "商户号", label: "商户号",
prop: "staffName" prop: "merchantNo"
// minWidth: 144, // minWidth: 144,
}, },
{ {
label: "是否直营", label: "是否直营",
prop: "staffPhone" formatter: (cellValue) => {
return this.baseData.directOperateOpt.find(
(item) => item.confId === cellValue.isDirectOperated
)?.confValue
}
}, },
{ {
label: "展业时间", label: "展业时间",
prop: "createdDate", prop: "businessDevDate",
// minWidth: 140 formatter: (cellValue) => {
// formatter: (cellValue) => { return cellValue.businessDevDate
// return cellValue.sendStartTime ? Util.dateFormate(cellValue.businessDevDate, "YYYY-MM-DD")
// ? Util.dateFormate(cellValue.sendStartTime, "YYYY-MM-DD HH:mm:ss") : ""
// : "-" }
// }
}, },
{ {
label: "归属业务", label: "归属业务",
addHtml: 'taskStatus' formatter: (cellValue) => {
return this.baseData.businessOpt.find(
(item) => item.confId ==this.queryData.scene
)?.confValue
}
}, },
{ {
label: "主营品牌", label: "主营品牌",
prop: "finishDate", prop: "mainBrand",
// minWidth: 140 addHtml: "mainBrand"
// formatter: (cellValue) => {
// return cellValue.finishEndTime
// ? Util.dateFormate(cellValue.finishEndTime, "YYYY-MM-DD HH:mm:ss")
// : "-"
// }
}, },
{ {
label: "区域运营经理", label: "区域运营经理",
prop: "finishDate", prop: "regionalManager",
}, },
{ {
label: "驻店人数", label: "驻店人数",
prop: "finishDate", prop: "staffCount",
}, },
{ {
label: "已配课程人数", label: "已配课程人数",
prop: "finishDate", prop: "courseConfiguredCount",
} }
] ]
}
}
}, },
detailInfo: {}
props: {
queryData: {
type: Object,
default: () => {}
} }
}, },
computed: { watch: {
...mapState({ queryData: {
dowloadList: (state) => state.d2admin.user.dowloadList handler(val) {
}) setTimeout(() => {
this.findStoreInfoByMerchantNoData()
}, 0)
},
deep: true,
immediate: true
}
}, },
created() { },
mounted() { mounted() {
// this.getServiceStore() this.findStoreInfoByMerchantNoData()
// this.getStudyPage()
}, },
methods: { methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']), findStoreInfoByMerchantNoData() {
// 详情 console.log(this.queryData, "queryData")
handleDetail(row) { this.searchForm.scene = this.queryData.scene
this.listOfPenaltiesShow = true this.searchForm.merchantNos = this.queryData.merchantNos
this.detailInfo = row ? this.queryData.merchantNos
: []
findStoreInfoByMerchantNo(this.searchForm).then((res) => {
this.tableData = res
})
}, },
beforeSearchFn(type = 1) {
//获取门店下的员工
getStaffInfoData(merchantNos) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm) findStaffByMerchantNo({
if (this.searchForm?.sendStartData?.length) { merchantNos,
let [searchStartDate, searchEndDate] = this.searchForm.sendStartData scene: this.queryData.scene
this.searchFormSearch.sendStartTime = Util.dateFormate( }).then((res) => {
searchStartDate, console.log(res)
"YYYY-MM-DD HH:mm:ss" resolve(res)
) })
this.searchFormSearch.sendEndTime = Util.dateFormate(
searchEndDate, "YYYY-MM-DD") + " 23:59:59"
}
if (this.searchForm?.finishStartData?.length) {
let [searchStartDate, searchEndDate] = this.searchForm.finishStartData
this.searchFormSearch.finishStartTime = Util.dateFormate(
searchStartDate,
"YYYY-MM-DD HH:mm:ss"
)
this.searchFormSearch.finishEndTime = Util.dateFormate(
searchEndDate, "YYYY-MM-DD") + " 23:59:59"
}
delete this.searchFormSearch.sendStartData
delete this.searchFormSearch.finishStartData
resolve()
}) })
}, },
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true)
// this.getStudyPage()
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
},
async exportTable() {
await this.beforeSearchFn()
// console.log(params)
let params = this.searchFormSearch
params.method = 'dj.api.smartcarlife.study.punish.list.export'
const list = [
...this.dowloadList,
{
name: '处罚名单',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
// try {
// await this.beforeSearchFn()
// const res = await studyExport({
// ...this.searchFormSearch
// })
// console.log(res)
// if (res) window.open(res)
// } catch (error) {
// if (error) this.$message.error(error)
// }
},
// getServiceStore() {
// listShop4sByRef({}).then((res) => {
// res ||= []
// this.showFormData.forEach((item, index) => {
// if (item.type === "select" && item.name == "merchantId") {
// this.$set(this.showFormData[index], "optionList", [
// {
// merchantName: "全部",
// merchantId: ""
// },
// ...res
// ])
// }
// })
// })
// },
// async getStudyPage() {
// try {
// await this.beforeSearchFn()
// const res = await studyPage({
// ...this.searchFormSearch
// })
// console.log(res)
// this.staticData = res || {}
// } catch (error) {
// if (error) this.$message.error(error)
// }
// },
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.customer-tags {
.d2-container-content {
margin-top: 0 !important;
}
}
.emptyBg { .emptyBg {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!