Commit 82ff1f69 by wangzhihui

长课程

1 parent 3aef2d8f
...@@ -106,3 +106,14 @@ export function getStaffInfo(data) { ...@@ -106,3 +106,14 @@ 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)
}
...@@ -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,34 @@ ...@@ -27,20 +27,34 @@
<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"
> >
<div slot="content" class="process-info"> <div slot="content" class="process-info">
<div>学习进度:<span>已完成</span></div> <div v-if="course.status">
<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>
完成时间:<span>{{ course.finishDate || "-" }}</span>
</div>
</div>
<div class="status orange" 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 +63,9 @@ ...@@ -49,7 +63,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 +74,117 @@ ...@@ -58,39 +74,117 @@
/>提示:总课程时长建议< 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: {
1: "未学习",
2: "未完成",
3: "待考核",
4: "未通过",
5: "已完成"
},
selectObj: {
courseTotalDuration: 0,
count: 0
}
}
},
props: {
courseList: {
type: Array,
default: () => []
} }
}, },
mounted() {
console.log(this.courseList, "courseList")
},
methods: { methods: {
handleClick(index) { 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) {
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)
},
handleTitleClick(index) {
this.titleActiveIndex = index this.titleActiveIndex = index
this.courseForm.queryAll = this.titleTypeList[index].queryAll
console.log(this.courseForm, " this.courseForm")
this.search()
}, },
resetForm() {}, resetForm() {
search() {} this.courseForm.tagSearch = ""
this.search()
},
search() {
this.$EventBus.$emit("fromAllocation", this.courseForm)
}
} }
} }
</script> </script>
...@@ -161,13 +255,14 @@ export default { ...@@ -161,13 +255,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;
min-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;
......
...@@ -40,6 +40,10 @@ ...@@ -40,6 +40,10 @@
<components <components
:is="tabName" :is="tabName"
:staffDetailInfo="staffDetailInfo" :staffDetailInfo="staffDetailInfo"
:courseList="courseList"
:staffItem="staffItem"
@handleConfigureCourse="handleConfigureCourse"
:staffList="staffList"
></components> ></components>
</div> </div>
</div> </div>
...@@ -49,10 +53,12 @@ ...@@ -49,10 +53,12 @@
<script> <script>
import staffDetail from "./staffDetail" import staffDetail from "./staffDetail"
import couseAllocation from "./couseAllocation" 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",
...@@ -69,8 +75,10 @@ export default { ...@@ -69,8 +75,10 @@ export default {
label: "课程配置" label: "课程配置"
} }
], ],
tabName: "couseAllocation", tabName: "staffDetail",
staffItem: {},
staffList: [], staffList: [],
courseList: [],
staffDetailInfo: {}, staffDetailInfo: {},
statisticsObj: { statisticsObj: {
total: 0, total: 0,
...@@ -78,26 +86,58 @@ export default { ...@@ -78,26 +86,58 @@ export default {
} }
} }
}, },
async created() { created() {
this.$EventBus.$on("fromAllocation", (courseForm) => {
console.log("父组件接收到孙组件事件:", courseForm)
this.getStaffTagCourseList(courseForm)
})
},
async mounted() {
this.queryData = this.$route.query this.queryData = this.$route.query
//获取员工列表 //获取员工列表
await this.getStaffInfoData() await this.getStaffInfoData()
//查询员工详情 //查询员工详情
this.findStoreEmployeePerformanceData() this.findStoreEmployeePerformanceData()
// //获取配置课程列表
// this.getStaffTagCourseList()
}, },
methods: { methods: {
//提交本员工配置回调
async handleConfigureCourse() {
this.staffIndex = 0
//获取员工列表
await this.getStaffInfoData()
this.handleTabClick(0)
},
findStoreEmployeePerformanceData() { findStoreEmployeePerformanceData() {
let { staffIndex, staffList, queryData } = this let { staffIndex, staffList, queryData } = this
// this.staffPhone = "18978849947"
findStoreEmployeePerformance({ findStoreEmployeePerformance({
phone: "18978849947", // phone: "18978849947",
// phone: staffList[staffIndex].phone, phone: staffList[staffIndex].phone,
scene: queryData.scene scene: queryData.scene
}).then((res) => { }).then((res) => {
console.log(this.staffItem, "staffItem")
this.staffDetailInfo = res this.staffDetailInfo = res
console.log(res) console.log(res)
}) })
}, },
getStaffTagCourseList(courseForm = {}) {
let params = {
// staffPhone: "18978849947",
staffPhone: this.staffItem.phone,
currentPage: 1,
pageSize: 99999,
queryAll: false,
...courseForm
}
getStaffTagCourseList(params).then((res) => {
console.log(res, "getStaffTagCourseList")
this.courseList = res ? res.list : []
})
},
handleStatistics() { handleStatistics() {
let total = 0, let total = 0,
complete = 0 complete = 0
...@@ -125,7 +165,13 @@ export default { ...@@ -125,7 +165,13 @@ export default {
}, },
handleClick(index) { handleClick(index) {
this.staffIndex = index this.staffIndex = index
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
...@@ -134,7 +180,12 @@ export default { ...@@ -134,7 +180,12 @@ export default {
1: "couseAllocation" 1: "couseAllocation"
} }
this.tabName = arr[+this.activeName] this.tabName = arr[+this.activeName]
if (index == 0) {
this.findStoreEmployeePerformanceData() this.findStoreEmployeePerformanceData()
} else {
//获取配置课程列表
this.getStaffTagCourseList()
}
} }
} }
} }
......
...@@ -140,7 +140,8 @@ export default { ...@@ -140,7 +140,8 @@ export default {
name: "configureCourse", name: "configureCourse",
query: { query: {
scene: this.longForm.scene, scene: this.longForm.scene,
merchantNos: item.merchantNos ? item.merchantNos : [44211227] merchantNos: [44211227]
// merchantNos: item.merchantNos ? item.merchantNos : [44211227]
} }
}) })
}, },
......
...@@ -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"
> >
...@@ -22,11 +23,11 @@ ...@@ -22,11 +23,11 @@
<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 +36,26 @@ ...@@ -35,11 +36,26 @@
</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: () => []
}
},
watch: {
staffList: {
handler(val) {
console.log(val, "🚀🚀🚀🚀🚀🚀🚀🚀🚀")
this.filterStaffList(deepClone(val))
},
deep: true,
immediate: true
} }
}, },
computed: { computed: {
...@@ -61,7 +77,14 @@ export default { ...@@ -61,7 +77,14 @@ export default {
title: "多人配置", title: "多人配置",
width: "720px" width: "720px"
}, },
checkAll: true, config: {
showClose: true,
appendToBody: false, // 是否将自身插入至 body 元素,有嵌套的弹窗时一定要设置
isShowFooter: true,
cancel_name: "取 消",
confirm_name: "确定配置"
},
checkAll: false,
infoRules: { infoRules: {
refundType: [ refundType: [
{ {
...@@ -79,71 +102,22 @@ export default { ...@@ -79,71 +102,22 @@ 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
},
{
text: "魏小敏",
value: 2,
active: false
},
{
text: "侯裕",
value: 3,
active: false
}
]
} }
}, },
methods: { methods: {
handleChooseStaff(index) {
this.selectStaffList[index].active = !this.selectStaffList[index].active
this.checkAll = this.selectStaffList.every((item) => item.active)
},
filterStaffList(val) {
this.selectStaffList = []
val.forEach((item) => {
if (item.courseConfigFlag != 1) {
this.selectStaffList.push(item)
}
})
},
handleCheckAllChange() { handleCheckAllChange() {
this.staffList.forEach((item) => { this.staffList.forEach((item) => {
item.active = this.checkAll item.active = this.checkAll
...@@ -153,6 +127,8 @@ export default { ...@@ -153,6 +127,8 @@ export default {
this.visible = false this.visible = false
}, },
handleConfirm() { handleConfirm() {
this.$emit("handleMultiple", this.selectStaffList)
// this.$emit("handleMultiple")
this.visible = false this.visible = false
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!