Commit ad5be5dd by wangzhihui

长课程需求开发联调

1 parent f80b6584
...@@ -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
......
...@@ -48,11 +48,14 @@ ...@@ -48,11 +48,14 @@
<div> <div>
考核成绩:<span>{{ course.totalScore || 0 }}分</span> 考核成绩:<span>{{ course.totalScore || 0 }}分</span>
</div> </div>
<div> <div v-if="course.finishDate">
完成时间:<span>{{ course.finishDate || "-" }}</span> 完成时间:<span>{{ course.finishDate || "-" }}</span>
</div> </div>
</div> </div>
<div class="status orange" v-if="course.status"> <div
:class="['status', statusColors[course.status]]"
v-if="course.status"
>
{{ statusObj[course.status] }} {{ statusObj[course.status] }}
</div> </div>
</el-tooltip> </el-tooltip>
...@@ -111,12 +114,14 @@ export default { ...@@ -111,12 +114,14 @@ export default {
], ],
cityOptions: ["上海", "北京", "广州", "深圳"], cityOptions: ["上海", "北京", "广州", "深圳"],
statusObj: { statusObj: {
1: "未学习",
2: "未完成", 2: "未完成",
3: "待考核",
4: "未通过",
5: "已完成" 5: "已完成"
}, },
statusColors: {
2: "orange",
5: "green"
},
selectObj: { selectObj: {
courseTotalDuration: 0, courseTotalDuration: 0,
count: 0 count: 0
...@@ -136,6 +141,7 @@ export default { ...@@ -136,6 +141,7 @@ export default {
reset() { reset() {
this.selected = [] this.selected = []
this.selectCourseList = [] this.selectCourseList = []
this.titleActiveIndex = 0
}, },
handleCheckedChange(val) { handleCheckedChange(val) {
console.log(val) console.log(val)
...@@ -150,13 +156,52 @@ export default { ...@@ -150,13 +156,52 @@ export default {
this.selectCourseList = this.courseList.filter((item) => { this.selectCourseList = this.courseList.filter((item) => {
const isSelected = this.selected.includes(item.courseId) const isSelected = this.selected.includes(item.courseId)
if (isSelected) { if (isSelected) {
this.selectObj.courseTotalDuration += item.courseTotalDuration // 使用 toFixed(2) 保留两位小数,防止浮点误差
this.selectObj.courseTotalDuration = parseFloat(
(
this.selectObj.courseTotalDuration + item.courseTotalDuration
).toFixed(2)
)
this.selectObj.count += 1 this.selectObj.count += 1
} }
return isSelected return isSelected
}) })
this.$emit("handleCourse", this.selectCourseList) 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) { delCourse(val) {
this.selectObj = { this.selectObj = {
courseTotalDuration: 0, courseTotalDuration: 0,
...@@ -171,7 +216,11 @@ export default { ...@@ -171,7 +216,11 @@ export default {
this.selected.splice(selectedIndex, 1) this.selected.splice(selectedIndex, 1)
this.selectCourseList.splice(currentIndex, 1) this.selectCourseList.splice(currentIndex, 1)
this.selectCourseList.forEach((item) => { this.selectCourseList.forEach((item) => {
this.selectObj.courseTotalDuration += item.courseTotalDuration this.selectObj.courseTotalDuration = parseFloat(
(
this.selectObj.courseTotalDuration + item.courseTotalDuration
).toFixed(2)
)
this.selectObj.count += 1 this.selectObj.count += 1
}) })
this.$emit("handleCourse", this.selectCourseList) this.$emit("handleCourse", this.selectCourseList)
...@@ -187,7 +236,7 @@ export default { ...@@ -187,7 +236,7 @@ export default {
this.search() this.search()
}, },
search() { search() {
this.$EventBus.$emit("fromAllocation", this.courseForm) this.$emit("fromAllocation", this.courseForm)
} }
} }
} }
...@@ -339,6 +388,10 @@ export default { ...@@ -339,6 +388,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;
......
...@@ -38,9 +38,9 @@ ...@@ -38,9 +38,9 @@
</div> </div>
</div> </div>
<components <components
ref="components"
:is="tabName" :is="tabName"
:staffDetailInfo="staffDetailInfo" :aiJy="aiJy"
:courseList="courseList"
:staffItem="staffItem" :staffItem="staffItem"
@handleConfigureCourse="handleConfigureCourse" @handleConfigureCourse="handleConfigureCourse"
:staffList="staffList" :staffList="staffList"
...@@ -57,8 +57,7 @@ import couseAllocation from "./couseAllocation" ...@@ -57,8 +57,7 @@ import couseAllocation from "./couseAllocation"
import { import {
customizeList, customizeList,
findStaffByMerchantNo, findStaffByMerchantNo,
findStoreEmployeePerformance, findStoreEmployeePerformance
getStaffTagCourseList
} from "@/api/serviceCentre" } from "@/api/serviceCentre"
export default { export default {
name: "configureCourse", name: "configureCourse",
...@@ -76,6 +75,7 @@ export default { ...@@ -76,6 +75,7 @@ export default {
} }
], ],
tabName: "staffDetail", tabName: "staffDetail",
aiJy: "",
staffItem: {}, staffItem: {},
staffList: [], staffList: [],
courseList: [], courseList: [],
...@@ -88,10 +88,10 @@ export default { ...@@ -88,10 +88,10 @@ export default {
}, },
created() { created() {
//课程搜索功能 //课程搜索功能
this.$EventBus.$on("fromAllocation", (courseForm) => { // this.$EventBus.$on("fromAllocation", (courseForm) => {
console.log("父组件接收到孙组件事件:", courseForm) // console.log("父组件接收到孙组件事件:", courseForm)
this.getStaffTagCourseList(courseForm) // this.getStaffTagCourseList(courseForm)
}) // })
}, },
async mounted() { async mounted() {
this.queryData = this.$route.query this.queryData = this.$route.query
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
this.staffList = await this.getStaffInfoData() this.staffList = await this.getStaffInfoData()
this.staffItem = this.staffList[this.staffIndex] this.staffItem = this.staffList[this.staffIndex]
//查询员工详情 //查询员工详情
this.findStoreEmployeePerformanceData() // this.findStoreEmployeePerformanceData()
}, },
methods: { methods: {
//提交本员工配置回调 //提交本员工配置回调
...@@ -118,22 +118,22 @@ export default { ...@@ -118,22 +118,22 @@ export default {
phone: staffItem.phone, phone: staffItem.phone,
scene: queryData.scene scene: queryData.scene
}).then((res) => { }).then((res) => {
this.staffDetailInfo = res 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 : []
}) })
}, },
// 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) { handleStatistics(res) {
let total = 0, let total = 0,
complete = 0 complete = 0
...@@ -166,13 +166,8 @@ export default { ...@@ -166,13 +166,8 @@ export default {
handleClick(index) { handleClick(index) {
this.staffIndex = index this.staffIndex = index
this.staffItem = this.staffList[this.staffIndex] this.staffItem = this.staffList[this.staffIndex]
if (this.activeName == 0) {
//查询员工详情
this.findStoreEmployeePerformanceData() this.findStoreEmployeePerformanceData()
} else {
//获取配置课程列表
this.getStaffTagCourseList()
}
}, },
handleTabClick(index) { handleTabClick(index) {
this.activeName = index this.activeName = index
...@@ -181,13 +176,19 @@ export default { ...@@ -181,13 +176,19 @@ 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) { if (index == 0) {
//查询员工详情 //查询员工详情
this.findStoreEmployeePerformanceData() this.$refs.components?.findStoreEmployeePerformanceData()
// this.findStoreEmployeePerformanceData()
} else { } else {
//获取配置课程列表 //获取配置课程列表
this.getStaffTagCourseList() // this.getStaffTagCourseList()
this.$refs.components?.getStaffTagCourseList()
} }
})
}, },
handleEndConfigure() { handleEndConfigure() {
if (this.statisticsObj.total != this.statisticsObj.complete) { if (this.statisticsObj.total != this.statisticsObj.complete) {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="couseAllocation"> <div class="couseAllocation">
<div class="header">AI导师建议</div> <div class="header">AI导师建议</div>
<div class="ai-suggest"> <div class="ai-suggest">
{{ staffDetailInfo.aiJy ? staffDetailInfo.aiJy : "暂无AI导师建议" }} {{ aiJy ? aiJy : "暂无AI导师建议" }}
</div> </div>
<div class="header">课程配置</div> <div class="header">课程配置</div>
<!-- 已配置 --> <!-- 已配置 -->
...@@ -60,8 +60,9 @@ ...@@ -60,8 +60,9 @@
<div slot="allocationHtml" slot-scope="scope"> <div slot="allocationHtml" slot-scope="scope">
<curricula-variable <curricula-variable
ref="curriculaVariable" ref="curriculaVariable"
:courseList="courseAllocationData" :courseList="courseList"
@handleCourse="handleCourse" @handleCourse="handleCourse"
@fromAllocation="fromAllocation"
></curricula-variable> ></curricula-variable>
</div> </div>
</glsx-combi-form> </glsx-combi-form>
...@@ -79,6 +80,7 @@ ...@@ -79,6 +80,7 @@
v-if="multipleVisible" v-if="multipleVisible"
@dialogClose="handleCloseDialog" @dialogClose="handleCloseDialog"
:staffList="staffListData" :staffList="staffListData"
:staffItem="staffItem"
@handleMultiple="handleConfirmMultiple" @handleMultiple="handleConfirmMultiple"
></multipleDialog> ></multipleDialog>
</div> </div>
...@@ -86,7 +88,12 @@ ...@@ -86,7 +88,12 @@
<script> <script>
import curriculaVariable from "./allocation" import curriculaVariable from "./allocation"
import multipleDialog from "./multiple" import multipleDialog from "./multiple"
import { insertOrUpdate, staffCourse, getByTaskId } from "@/api/serviceCentre" import {
insertOrUpdate,
staffCourse,
getByTaskId,
getStaffTagCourseList
} from "@/api/serviceCentre"
export default { export default {
components: { components: {
curriculaVariable, curriculaVariable,
...@@ -104,6 +111,7 @@ export default { ...@@ -104,6 +111,7 @@ export default {
studyType: 1, studyType: 1,
courseList: [] courseList: []
}, },
aiJy: "",
alreadyConfig: {}, alreadyConfig: {},
handleFormRef: "handleFormRef", handleFormRef: "handleFormRef",
formRules: { formRules: {
...@@ -165,8 +173,8 @@ export default { ...@@ -165,8 +173,8 @@ export default {
maxlength: 20 maxlength: 20
} }
], ],
courseAllocationData: [],
staffListData: [], staffListData: [],
courseList: [],
staffTagCourseList: [], //已配置的课程列表 staffTagCourseList: [], //已配置的课程列表
selectObj: { selectObj: {
courseTotalDuration: 0, courseTotalDuration: 0,
...@@ -179,9 +187,9 @@ export default { ...@@ -179,9 +187,9 @@ export default {
type: Object, type: Object,
default: () => {} default: () => {}
}, },
courseList: { aiJy: {
type: Array, type: String,
default: () => [] default: ""
}, },
staffItem: { staffItem: {
type: Object, type: Object,
...@@ -193,21 +201,29 @@ export default { ...@@ -193,21 +201,29 @@ export default {
} }
}, },
watch: { watch: {
courseList: { // courseList: {
handler(val) { // handler(val) {
console.log(val, "val") // console.log(val, "val")
this.courseAllocationData = val // this.courseAllocationData = val
this.handleReset() // this.handleReset()
}, // },
deep: true // deep: true
}, // },
staffList: { staffList: {
handler(val) { handler(val) {
console.log(val, "我是员工我是员工我是员工") this.staffListData = val.map((record) => {
this.staffListData = val.map((record) => ({ if (record.staffUUID == this.staffItem.staffUUID) {
return {
...record, ...record,
active: false // 初始化为 false active: true
})) }
} else {
return {
...record,
active: false
}
}
})
}, },
deep: true, deep: true,
immediate: true immediate: true
...@@ -217,24 +233,52 @@ export default { ...@@ -217,24 +233,52 @@ export default {
console.log(val, "我是员工详情") console.log(val, "我是员工详情")
if (val.courseConfigFlag == 1) { if (val.courseConfigFlag == 1) {
//查询员工已配置课程 //查询员工已配置课程
this.getStaffTagCourseList() this.getStaffCourse()
//查询员工已配置详情 //查询员工已配置详情
this.getByTaskId() this.getByTaskId()
} else {
this.handleReset()
//获取配置课程列表
this.getStaffTagCourseList()
} }
}, },
deep: true, deep: true,
immediate: true immediate: true
} }
}, },
created() {},
methods: { methods: {
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 : []
})
},
//查询员工已配置课程 //查询员工已配置课程
getStaffTagCourseList() { getStaffCourse() {
this.selectObj = {
courseTotalDuration: 0,
count: 0
}
staffCourse({ staffCourse({
taskId: this.staffItem.taskId taskId: this.staffItem.taskId
}).then((res) => { }).then((res) => {
console.log("获取到已配课", res)
this.staffTagCourseList = res.list this.staffTagCourseList = res.list
res.list.forEach((item) => {
this.selectObj.courseTotalDuration = parseFloat(
(
this.selectObj.courseTotalDuration + item.courseTotalDuration
).toFixed(2)
)
this.selectObj.count += 1
})
}) })
}, },
//查询员工已配置详情 //查询员工已配置详情
...@@ -263,6 +307,9 @@ export default { ...@@ -263,6 +307,9 @@ export default {
) )
} }
}, },
fromAllocation(courseForm) {
this.getStaffTagCourseList(courseForm)
},
//重置 //重置
handleReset() { handleReset() {
this.extendConfig = { this.extendConfig = {
......
...@@ -62,6 +62,15 @@ export default { ...@@ -62,6 +62,15 @@ export default {
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())
this.chart.resize()
}, 1000)
}
},
getChartSetOption() { getChartSetOption() {
var options = { var options = {
tooltip: { tooltip: {
......
...@@ -28,6 +28,10 @@ export default { ...@@ -28,6 +28,10 @@ export default {
type: String, type: String,
default: "" default: ""
}, },
title: {
type: String,
default: ""
},
rate: { rate: {
type: String type: String
}, },
...@@ -71,7 +75,7 @@ export default { ...@@ -71,7 +75,7 @@ export default {
grid: { grid: {
bottom: "12%", bottom: "12%",
top: "10%", top: "10%",
left: "15%", left: "20px",
right: "20px" right: "20px"
}, },
tooltip: { tooltip: {
...@@ -90,6 +94,7 @@ export default { ...@@ -90,6 +94,7 @@ export default {
fontSize: 14 fontSize: 14
}, },
formatter: (params) => { formatter: (params) => {
console.log(params)
let rate = String(this.dataRate[params[0].dataIndex][this.rate]) let rate = String(this.dataRate[params[0].dataIndex][this.rate])
return ` return `
<div style="font-weight:bold;color:rgba(0, 0, 0, 0.65); line-height: 20px;">${ <div style="font-weight:bold;color:rgba(0, 0, 0, 0.65); line-height: 20px;">${
...@@ -99,7 +104,7 @@ export default { ...@@ -99,7 +104,7 @@ export default {
height: 6px;background: ${ height: 6px;background: ${
params[0].color params[0].color
};border-radius:50%;margin-right:8px;"></div> };border-radius:50%;margin-right:8px;"></div>
${this.title}:${params[0].value} ${this.title}:${params[0].value}%
</div> </div>
<div style="margin-left:18px; line-height: 20px;">环比: <span style="color:${ <div style="margin-left:18px; line-height: 20px;">环比: <span style="color:${
rate.indexOf("-") > -1 ? "#2CCA74" : "#EB4E4E" rate.indexOf("-") > -1 ? "#2CCA74" : "#EB4E4E"
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import { mapActions, mapState } from "vuex"
import { import {
findStoreInfoByMerchantNo, findStoreInfoByMerchantNo,
findStaffByMerchantNo findStaffByMerchantNo
...@@ -32,7 +31,6 @@ export default { ...@@ -32,7 +31,6 @@ export default {
name: "indicatorInfo", name: "indicatorInfo",
data() { data() {
return { return {
listOfPenaltiesShow: false,
noDataImg, noDataImg,
searchForm: { searchForm: {
scene: "", scene: "",
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
<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"
>({{ longForm.startTime }} 至 {{ longForm.endTime }})</span
>
</div> </div>
<div class="improve"> <div class="improve">
<div <div
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="situation-content"> <div class="situation-content" v-if="!isHide">
<div class="time-line"> <div class="time-line">
<div <div
class="line-item" class="line-item"
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
{{ sitem.courseNum }}节|{{ sitem.taskTime }} {{ sitem.courseNum }}节|{{ sitem.taskTime }}
<template v-if="sitem.countNameList"> <template v-if="sitem.countNameList">
<div class="collapse" @click="handleCollapse(sIndex)"> <div class="collapse" @click="handleCollapse(sIndex)">
{{ sitem.isCollapse ? "展开" : "收起" }} {{ sitem.isCollapse ? "收起" : "展开" }}
</div> </div>
</template> </template>
</div> </div>
...@@ -87,6 +87,11 @@ ...@@ -87,6 +87,11 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else class="emptyBg">
<img class="noDataImg" src="@/assets/empty.png" />
<p>暂无数据</p>
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -95,6 +100,7 @@ export default { ...@@ -95,6 +100,7 @@ export default {
data() { data() {
return { return {
learningInfo: {}, learningInfo: {},
isHide: false,
couseData: [ couseData: [
{ {
text: "长课程", text: "长课程",
...@@ -103,7 +109,8 @@ export default { ...@@ -103,7 +109,8 @@ export default {
return { return {
已改善: "greenSpot", 已改善: "greenSpot",
未改善: "redSpot", 未改善: "redSpot",
进行中: "yellowSpot" 进行中: "yellowSpot",
未学习: "ashSpot"
}[cellValue.longCourseTag] }[cellValue.longCourseTag]
} }
}, },
...@@ -114,7 +121,8 @@ export default { ...@@ -114,7 +121,8 @@ export default {
return { return {
已改善: "greenSpot", 已改善: "greenSpot",
未改善: "redSpot", 未改善: "redSpot",
进行中: "yellowSpot" 进行中: "yellowSpot",
未学习: "ashSpot"
}[cellValue.shortCourseTag] }[cellValue.shortCourseTag]
} }
} }
...@@ -184,6 +192,9 @@ export default { ...@@ -184,6 +192,9 @@ export default {
isCollapse: false // 初始化为 false isCollapse: false // 初始化为 false
})) }))
} }
this.isHide = false
} else {
this.isHide = true
} }
}, },
deep: true, deep: true,
...@@ -443,4 +454,18 @@ export default { ...@@ -443,4 +454,18 @@ export default {
overflow: hidden; overflow: hidden;
} }
} }
.emptyBg {
display: flex;
flex-direction: column;
align-items: center;
padding: 120px 0;
.noDataImg {
width: 64px;
height: 40px;
}
p {
color: #999999;
font-size: 14px;
}
}
</style> </style>
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
> >
环 {{ scope.scope.outputValueRate }} 环 {{ scope.scope.outputValueRate }}
</div> </div>
<div v-else class="normal">环 -</div>
</div> </div>
<div slot="Conversion" slot-scope="scope"> <div slot="Conversion" slot-scope="scope">
<div> <div>
...@@ -77,6 +78,7 @@ ...@@ -77,6 +78,7 @@
> >
环 {{ scope.scope.conversionRate }} 环 {{ scope.scope.conversionRate }}
</div> </div>
<div v-else class="normal">环 -</div>
</div> </div>
<div slot="CustomerUnitPrice" slot-scope="scope"> <div slot="CustomerUnitPrice" slot-scope="scope">
<div> <div>
...@@ -94,6 +96,7 @@ ...@@ -94,6 +96,7 @@
> >
环 {{ scope.scope.customerUnitPriceRate }} 环 {{ scope.scope.customerUnitPriceRate }}
</div> </div>
<div v-else class="normal">环 -</div>
</div> </div>
</d2-table> </d2-table>
</div> </div>
...@@ -341,4 +344,7 @@ export default { ...@@ -341,4 +344,7 @@ export default {
font-size: 12px; font-size: 12px;
color: #43cf7c; color: #43cf7c;
} }
.normal {
font-size: 12px;
}
</style> </style>
...@@ -17,7 +17,10 @@ ...@@ -17,7 +17,10 @@
: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">
...@@ -46,12 +49,15 @@ export default { ...@@ -46,12 +49,15 @@ export default {
staffList: { staffList: {
type: Array, type: Array,
default: () => [] default: () => []
},
staffItem: {
type: Object,
default: () => {}
} }
}, },
watch: { watch: {
staffList: { staffList: {
handler(val) { handler(val) {
console.log(val, "🚀🚀🚀🚀🚀🚀🚀🚀🚀")
this.filterStaffList(deepClone(val)) this.filterStaffList(deepClone(val))
}, },
deep: true, deep: true,
...@@ -84,6 +90,7 @@ export default { ...@@ -84,6 +90,7 @@ export default {
cancel_name: "取 消", cancel_name: "取 消",
confirm_name: "确定配置" confirm_name: "确定配置"
}, },
disabled: false,
checkAll: false, checkAll: false,
infoRules: { infoRules: {
refundType: [ refundType: [
...@@ -111,8 +118,10 @@ export default { ...@@ -111,8 +118,10 @@ export default {
this.selectStaffList = [] this.selectStaffList = []
}, },
handleChooseStaff(index) { handleChooseStaff(index) {
if (this.staffItem.staffUUID !== this.selectStaffList[index].staffUUID) {
this.selectStaffList[index].active = !this.selectStaffList[index].active this.selectStaffList[index].active = !this.selectStaffList[index].active
this.checkAll = this.selectStaffList.every((item) => item.active) this.checkAll = this.selectStaffList.every((item) => item.active)
}
}, },
filterStaffList(val) { filterStaffList(val) {
this.selectStaffList = [] this.selectStaffList = []
...@@ -121,10 +130,23 @@ export default { ...@@ -121,10 +130,23 @@ export default {
this.selectStaffList.push(item) this.selectStaffList.push(item)
} }
}) })
this.checkAll = this.selectStaffList.every((item) => item.active)
if (
this.selectStaffList.length == 1 &&
this.selectStaffList[0].staffUUID == this.staffItem.staffUUID
) {
this.disabled = true
} else {
this.disabled = false
}
}, },
handleCheckAllChange() { handleCheckAllChange() {
this.staffList.forEach((item) => { this.selectStaffList.forEach((item) => {
if (item.staffUUID == this.staffItem.staffUUID) {
item.active = true
} else {
item.active = this.checkAll item.active = this.checkAll
}
}) })
}, },
handleClose() { handleClose() {
......
...@@ -13,6 +13,48 @@ ...@@ -13,6 +13,48 @@
v-if="item.className" v-if="item.className"
:class="[item.className(baseInfo)]" :class="[item.className(baseInfo)]"
></div> ></div>
<template v-if="item.key == 'store'">
<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="{
scrollHeight:
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(baseInfo) ? item.formatter(baseInfo)
...@@ -20,6 +62,7 @@ ...@@ -20,6 +62,7 @@
? baseInfo[item.key] ? baseInfo[item.key]
: "-" : "-"
}} }}
</template>
</el-form-item></el-col </el-form-item></el-col
> >
</template> </template>
...@@ -63,21 +106,22 @@ import LearningSituation from "./learningSituation.vue" ...@@ -63,21 +106,22 @@ import LearningSituation from "./learningSituation.vue"
import PerformanceStatus from "./performanceStatus.vue" import PerformanceStatus from "./performanceStatus.vue"
import { course_businessOpt } from "@/common/constants.js" import { course_businessOpt } from "@/common/constants.js"
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { findStoreEmployeePerformance } from "@/api/serviceCentre"
export default { export default {
components: { components: {
PerformanceStatus, PerformanceStatus,
LearningSituation LearningSituation
}, },
props: { props: {
staffDetailInfo: { staffItem: {
type: Object, type: Object,
default: () => {} default: () => {}
} }
}, },
watch: { watch: {
staffDetailInfo: { staffItem: {
handler(val) { handler(val) {
this.initBaseData(val) this.findStoreEmployeePerformanceData()
}, },
// immediate: true, // immediate: true,
deep: true deep: true
...@@ -86,6 +130,7 @@ export default { ...@@ -86,6 +130,7 @@ export default {
data() { data() {
return { return {
businessOpt: deepClone(course_businessOpt), businessOpt: deepClone(course_businessOpt),
aiJy: "",
baseInfo: {}, baseInfo: {},
performanceInfo: [], performanceInfo: [],
consultationAbility: {}, consultationAbility: {},
...@@ -134,8 +179,19 @@ export default { ...@@ -134,8 +179,19 @@ export default {
} }
}, },
methods: { methods: {
//查询员工详情
findStoreEmployeePerformanceData() {
let { staffItem, queryData } = this
findStoreEmployeePerformance({
phone: staffItem.phone,
scene: queryData.scene
}).then((res) => {
this.initBaseData(res)
})
},
initBaseData(val) { initBaseData(val) {
this.baseInfo = val.baseInfo this.baseInfo = val.baseInfo ? val.baseInfo : {}
// this.aiJy = val.aiJy
this.consultationAbility = val.consultationAbility this.consultationAbility = val.consultationAbility
val.learningProgress.courseRecords.forEach((item) => { val.learningProgress.courseRecords.forEach((item) => {
item.isCollapse = true item.isCollapse = true
...@@ -164,7 +220,6 @@ export default { ...@@ -164,7 +220,6 @@ export default {
} }
return item return item
}) })
console.log(this.capacityList)
} }
} }
} }
......
...@@ -21,16 +21,20 @@ ...@@ -21,16 +21,20 @@
<div class="value">{{ item.metricValue }}</div> <div class="value">{{ item.metricValue }}</div>
<div class="link"> <div class="link">
环比<span 环比<span
v-if="item.linkRelativeRatio"
:class="[ :class="[
item.linkRelativeRatio.indexOf('-') > -1 ? 'dowm' : 'up' String(item.linkRelativeRatio).indexOf('-') > -1 ? 'dowm' : 'up'
]" ]"
>{{ item.linkRelativeRatio }}</span >{{ item.linkRelativeRatio || "-" }}</span
> >
<span v-else>-</span>
<template v-if="item.linkRelativeRatio">
<div <div
class="triangle-down" class="triangle-down"
v-if="item.linkRelativeRatio.indexOf('-') > -1" v-if="String(item.linkRelativeRatio).indexOf('-') > -1"
></div> ></div>
<div class="triangle-up" v-else></div> <div class="triangle-up" v-else></div>
</template>
</div> </div>
</template> </template>
</div> </div>
...@@ -124,24 +128,21 @@ export default { ...@@ -124,24 +128,21 @@ export default {
console.log(33333333333333333) console.log(33333333333333333)
let params = { let params = {
...this.longForm ...this.longForm
// scene: 1,
// startTime: "2025-06-01",
// endTime: "2025-07-06"
} }
findAllItem(params) findAllItem(params)
.then((res) => { .then((res) => {
this.storeIndicatoerInfo = res this.storeIndicatoerInfo = res
this.storeIndicatoerInfo.id = "-9999" this.storeIndicatoerInfo.id = "-9999"
console.log(res)
}) })
.catch((err) => { .catch((err) => {
new Error(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.merchantNos
row.scene = this.longForm.scene
this.$emit("openWindow", row) this.$emit("openWindow", row)
} }
}, },
...@@ -188,9 +189,11 @@ export default { ...@@ -188,9 +189,11 @@ 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 { span.dowm {
color: #43cf7c; color: #43cf7c;
} }
......
...@@ -3,11 +3,12 @@ ...@@ -3,11 +3,12 @@
<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" ref="storeTable"
:get-list-api="getListApi" :tableData="tableData"
:search-form="searchFormSearch" :search-form="searchForm"
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn" @refreshTable="refreshTable"
@pageChange="pageChange"
> >
</d2-table> </d2-table>
</div> </div>
...@@ -15,13 +16,10 @@ ...@@ -15,13 +16,10 @@
</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 noDataImg from "@/assets/empty.png" import noDataImg from "@/assets/empty.png"
import dayjs from "dayjs" import dayjs from "dayjs"
export default { export default {
...@@ -31,186 +29,131 @@ export default { ...@@ -31,186 +29,131 @@ export default {
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: "直营" }
]
}, },
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: () => {
return ["延保", "权益", "轻改"][this.queryData.scene - 1]
}
}, },
{ {
label: "主营品牌", label: "主营品牌",
prop: "finishDate", prop: "mainBrand"
// minWidth: 140
// 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) {
}) // this.findStoreInfoByMerchantNoData()
},
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 = {
this.listOfPenaltiesShow = true ...this.$refs.storeTable.page
this.detailInfo = row
},
beforeSearchFn(type = 1) {
return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchForm?.sendStartData?.length) {
let [searchStartDate, searchEndDate] = this.searchForm.sendStartData
this.searchFormSearch.sendStartTime = Util.dateFormate(
searchStartDate,
"YYYY-MM-DD HH:mm:ss"
)
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 this.searchForm.scene = this.queryData.scene
delete this.searchFormSearch.finishStartData this.searchForm.merchantNos = this.queryData.merchantNos
resolve() ? this.queryData.merchantNos
: []
findStoreInfoByMerchantNo(this.searchForm).then((res) => {
this.tableData = res
}) })
}, },
handleSearch() { refreshTable() {
this.page = this.$options.data.call(this).page this.findStoreInfoByMerchantNoData()
this.$refs.table.refreshTable(true, true)
// this.getStudyPage()
}, },
handleReset() { pageChange(page) {
this.searchForm = this.$options.data.call(this).searchForm object.assign(this.searchForm, page)
this.handleSearch() this.refreshTable()
}, },
async exportTable() {
await this.beforeSearchFn()
// console.log(params) //获取门店下的员工
let params = this.searchFormSearch getStaffInfoData(merchantNos) {
params.method = 'dj.api.smartcarlife.study.punish.list.export' return new Promise((resolve, reject) => {
const list = [ findStaffByMerchantNo({
...this.dowloadList, merchantNos,
{ scene: this.queryData.scene
name: '处罚名单', }).then((res) => {
exportParam: JSON.stringify(params), console.log(res)
status: 'waiting', resolve(res)
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>
......
...@@ -250,9 +250,7 @@ export default { ...@@ -250,9 +250,7 @@ export default {
width: "150", width: "150",
formatter: (cellValue) => { formatter: (cellValue) => {
return ( return (
(cellValue.courseFinishCount (cellValue.courseCount ? cellValue.courseCount : "-") +
? cellValue.courseFinishCount
: "-") +
" | " + " | " +
(cellValue.courseDuration ? cellValue.courseDuration : "-") (cellValue.courseDuration ? cellValue.courseDuration : "-")
) )
......
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
const windowList = [...this.tab, ...this.dropdownList] const windowList = [...this.tab, ...this.dropdownList]
const windowItem = windowList.find((e) => e.id == id) const windowItem = windowList.find((e) => e.id == id)
let component = data.activeName, let component = data.activeName,
title = data.metricName+data.itemBrand || '-' title = data.metricName+data.itemBrand || '门店详情'
if (data.componentName) component = data.componentName if (data.componentName) component = data.componentName
if (windowItem) { if (windowItem) {
this.$refs[`page-${id}`]?.[0]?.setActiveName && this.$refs[`page-${id}`]?.[0]?.setActiveName(data) this.$refs[`page-${id}`]?.[0]?.setActiveName && this.$refs[`page-${id}`]?.[0]?.setActiveName(data)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!