Commit e7853851 by wangzhihui

长课程

1 parent 82ff1f69
......@@ -117,3 +117,8 @@ 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)
}
......@@ -133,6 +133,10 @@ export default {
console.log(this.courseList, "courseList")
},
methods: {
reset() {
this.selected = []
this.selectCourseList = []
},
handleCheckedChange(val) {
console.log(val)
this.selected = val ? val : []
......
......@@ -47,7 +47,7 @@
></components>
</div>
</div>
<div class="end-configuration">结束配置</div>
<div class="end-configuration" @click="handleEndConfigure">结束配置</div>
</div>
</template>
<script>
......@@ -87,6 +87,7 @@ export default {
}
},
created() {
//课程搜索功能
this.$EventBus.$on("fromAllocation", (courseForm) => {
console.log("父组件接收到孙组件事件:", courseForm)
this.getStaffTagCourseList(courseForm)
......@@ -95,12 +96,10 @@ export default {
async mounted() {
this.queryData = this.$route.query
//获取员工列表
await this.getStaffInfoData()
this.staffList = await this.getStaffInfoData()
this.staffItem = this.staffList[this.staffIndex]
//查询员工详情
this.findStoreEmployeePerformanceData()
// //获取配置课程列表
// this.getStaffTagCourseList()
},
methods: {
//提交本员工配置回调
......@@ -108,25 +107,23 @@ export default {
this.staffIndex = 0
//获取员工列表
await this.getStaffInfoData()
this.staffList = await this.getStaffInfoData()
this.handleTabClick(0)
},
//查询员工详情
findStoreEmployeePerformanceData() {
let { staffIndex, staffList, queryData } = this
// this.staffPhone = "18978849947"
let { staffItem, queryData } = this
findStoreEmployeePerformance({
// phone: "18978849947",
phone: staffList[staffIndex].phone,
phone: staffItem.phone,
scene: queryData.scene
}).then((res) => {
console.log(this.staffItem, "staffItem")
this.staffDetailInfo = res
console.log(res)
})
},
getStaffTagCourseList(courseForm = {}) {
console.log(this.staffItem, " this.staffItem")
let params = {
// staffPhone: "18978849947",
staffPhone: this.staffItem.phone,
currentPage: 1,
pageSize: 99999,
......@@ -134,14 +131,13 @@ export default {
...courseForm
}
getStaffTagCourseList(params).then((res) => {
console.log(res, "getStaffTagCourseList")
this.courseList = res ? res.list : []
})
},
handleStatistics() {
handleStatistics(res) {
let total = 0,
complete = 0
this.staffList.forEach((item) => {
res.forEach((item) => {
if (item.courseConfigFlag == 1) {
complete++
}
......@@ -154,19 +150,24 @@ export default {
console.log(this.statisticsObj)
},
getStaffInfoData() {
let { unionOrAndType } = this.queryData
let methods = unionOrAndType ? customizeList : findStaffByMerchantNo
methods(this.queryData).then((res) => {
console.log(res)
this.staffList = res
//员工统计
this.handleStatistics()
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)
})
})
},
handleClick(index) {
this.staffIndex = index
this.staffItem = this.staffList[this.staffIndex]
if (this.activeName == 0) {
//查询员工详情
this.findStoreEmployeePerformanceData()
} else {
//获取配置课程列表
......@@ -181,11 +182,31 @@ export default {
}
this.tabName = arr[+this.activeName]
if (index == 0) {
//查询员工详情
this.findStoreEmployeePerformanceData()
} else {
//获取配置课程列表
this.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"
})
}
}
}
}
......
<!-- 倒计时 -->
<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>
......@@ -3,10 +3,11 @@
<div class="couse-wrap">
<div class="header">
课程任务配置
<div class="count-down">
<count-down></count-down>
<!-- <div class="count-down">
<img class="error-circle" src="../../images/error-circle.png" />
倒计时:还剩 2天11时23分57秒 完成本周课程配置
</div>
</div> -->
</div>
<div class="condition">
<div class="couse-tabs" v-if="longForm.scene != 3">
......@@ -19,7 +20,12 @@
{{ item.brand }}
</div>
</div>
<el-button size="small" type="primary" @click="handleCustom"
<el-button
size="small"
type="primary"
@click="handleCustom"
v-if="longForm.isDisabled"
>自定义配课</el-button
>
</div>
......@@ -34,13 +40,13 @@
<div class="configuration">
<div class="item">
<div>可配置</div>
<div class="number">
{{
metric.merchantCount && metric.merchantCount === 0
? metric.merchantCount
: "-"
}}家
<div
class="number"
v-if="metric.merchantCount || metric.merchantCount === 0"
>
{{ metric.merchantCount }}家
</div>
<div v-else class="number">-</div>
</div>
<div class="item">
<div>
......@@ -48,24 +54,37 @@
metric.matchMerchantCourseCount == null ? "未配课" : "已配置"
}}
</div>
<div class="number">
{{
(metric.matchMerchantCourseCount &&
metric.matchMerchantCourseCount === 0) ||
"-"
}}家
<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="details" @click="handleDetail(metric)">详情</div>
<div class="configure-course" @click="handleConfigureCourse(metric)">
<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]"
......@@ -77,9 +96,13 @@
</template>
<script>
import customCouse from "./customCouse.vue"
import { findAllItemByConfigId } from "@/api/serviceCentre"
import countDown from "./countDown.vue"
import {
findAllItemByConfigId,
findStaffByMerchantNo
} from "@/api/serviceCentre"
export default {
components: { customCouse },
components: { customCouse, countDown },
data() {
return {
activeIndex: 0,
......@@ -134,23 +157,46 @@ export default {
this.$emit("changeBrand", params.configId)
}, 0)
},
handleConfigureCourse(item) {
async handleConfigureCourse(item) {
console.log(item)
this.$router.push({
name: "configureCourse",
query: {
scene: this.longForm.scene,
merchantNos: [44211227]
// merchantNos: item.merchantNos ? item.merchantNos : [44211227]
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: item.id
}
})
} 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) {
console.log(row)
row.activeName = "indicatorInfo"
row.scene = this.longForm.scene
row.pageId = row.id
this.$emit("openWindow", row)
if (row.merchantCount) {
row.activeName = "indicatorInfo"
row.scene = this.longForm.scene
row.pageId = row.id
this.$emit("openWindow", row)
}
},
handleClick(index) {
console.log(index)
......@@ -294,6 +340,17 @@ export default {
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;
......
......@@ -6,10 +6,13 @@
{{ staffDetailInfo.aiJy ? staffDetailInfo.aiJy : "暂无AI导师建议" }}
</div>
<div class="header">课程配置</div>
<!-- 已配置 -->
<template v-if="staffItem.courseConfigFlag == 1">
<el-form class="edit-sub-block" label-width="138px">
<el-form-item label="学习完成时间:">本周内 </el-form-item>
<el-form-item label="处罚方式:"> 不处罚 </el-form-item>
<el-form-item label="处罚方式:">
{{ alreadyConfig.punishTypeText }}
</el-form-item>
<el-form-item label="配置课程:">
<div class="right">
<div class="title-type">
......@@ -34,9 +37,12 @@
</div>
</div>
</el-form-item>
<el-form-item label="学习任务标题:">延保营销技巧 </el-form-item>
<el-form-item label="学习任务标题:"
>{{ alreadyConfig.title }}
</el-form-item>
</el-form>
</template>
<!-- 未配置 -->
<template v-else>
<div class="allocation">
<glsx-combi-form
......@@ -50,6 +56,7 @@
:form-data="allocationFormData"
:form-rules="formRules"
>
<!-- 配置课程 -->
<div slot="allocationHtml" slot-scope="scope">
<curricula-variable
ref="curriculaVariable"
......@@ -60,13 +67,14 @@
</glsx-combi-form>
</div>
<div class="foot-btns">
<div class="btn reset">重置</div>
<div class="btn reset" @click="handleReset">重置</div>
<div class="btn multiple" @click="handleMultiple">多人配置</div>
<div class="btn submit" @click="handleSubmit">提交本员工配置</div>
</div>
</template>
<!-- 多人配置 -->
<multipleDialog
ref="multipleDialog"
:multipleVisible="multipleVisible"
v-if="multipleVisible"
@dialogClose="handleCloseDialog"
......@@ -78,7 +86,7 @@
<script>
import curriculaVariable from "./allocation"
import multipleDialog from "./multiple"
import { insertOrUpdate, staffCourse } from "@/api/serviceCentre"
import { insertOrUpdate, staffCourse, getByTaskId } from "@/api/serviceCentre"
export default {
components: {
curriculaVariable,
......@@ -96,6 +104,7 @@ export default {
studyType: 1,
courseList: []
},
alreadyConfig: {},
handleFormRef: "handleFormRef",
formRules: {
punishType: [
......@@ -151,7 +160,9 @@ export default {
{
label: "学习任务标题:",
name: "title",
type: "input"
type: "input",
isClear: true,
maxlength: 20
}
],
courseAllocationData: [],
......@@ -186,6 +197,7 @@ export default {
handler(val) {
console.log(val, "val")
this.courseAllocationData = val
this.handleReset()
},
deep: true
},
......@@ -206,6 +218,8 @@ export default {
if (val.courseConfigFlag == 1) {
//查询员工已配置课程
this.getStaffTagCourseList()
//查询员工已配置详情
this.getByTaskId()
}
},
deep: true,
......@@ -216,25 +230,50 @@ export default {
methods: {
//查询员工已配置课程
getStaffTagCourseList() {
staffCourse({ staffPhone: this.staffItem.phone }).then((res) => {
staffCourse({
taskId: this.staffItem.taskId
}).then((res) => {
console.log("获取到已配课", res)
this.staffTagCourseList = res.list
})
}, //获取配置课程列表
},
//查询员工已配置详情
getByTaskId() {
getByTaskId({ id: this.staffItem.taskId }).then((res) => {
console.log("获取到已配课详情", res)
this.alreadyConfig = {
title: res.title,
punishTypeText:
res.extendConfig.punishType == 1 ? "不处罚" : "限制录单"
}
})
},
//获取配置课程列表
handleCourse(data) {
this.extendConfig.courseList = data.map((item) => {
return {
courseId: item.courseId,
courseName: item.courseName
courseTitle: item.courseName
}
})
console.log(this.extendConfig.courseList)
if (data.length > 0) {
this.$refs.editFormRef.$refs[this.handleFormRef].clearValidate(
`courseList`
)
}
},
//重置
handleReset() {
this.extendConfig = {
punishType: 1, //惩罚方式:0无 1禁止录单
deadline: "",
title: "",
studyType: 1,
courseList: []
}
this.$refs.curriculaVariable && this.$refs.curriculaVariable.reset()
},
handleMultiple() {
this.$refs.editFormRef.$refs[this.handleFormRef].validate((valid) => {
console.log(valid)
......
......@@ -136,7 +136,8 @@ export default {
coustomForm: {
merchantNos: "",
unionOrAndType: "",
scene: ""
scene: "",
brandId: ""
},
coustomFormData: [
{
......@@ -168,10 +169,9 @@ export default {
},
methods: {
handleChange(index) {
console.log(index, this.conditionData)
this.conditionData.metricRuleList[index].active =
!this.conditionData.metricRuleList[index].active
let merchantNos = [44211227]
let merchantNos = []
this.conditionData.metricRuleList.forEach((item) => {
if (item.active) {
if (item.merchantNos && item.merchantNos.length) {
......@@ -184,10 +184,10 @@ export default {
`merchantNos`
)
}
console.log(merchantNos)
this.coustomForm.merchantNos = merchantNos
this.coustomForm.merchantNos = merchantNos.join(",")
},
handleData(val) {
this.coustomForm.brandId = val.id
let data = JSON.parse(JSON.stringify(val))
data.metricRuleList.forEach((item) => {
item.active = false
......@@ -199,24 +199,38 @@ export default {
// this.visible = false
this.coustomForm.merchantNos = ""
this.coustomForm.unionOrAndType = ""
this.coustomForm.brandId = ""
this.conditionData.metricRuleList.forEach((item) => {
item.active = false
})
},
handleConfirm() {
this.$refs.editFormRef.$refs[this.handleFormRef].validate((valid) => {
if (valid) {
this.$router.push({
name: "configureCourse",
query: this.coustomForm
})
this.visible = false
// customizeList(this.coustomForm).then((res) => {
// console.log(res)
// this.notice.okTips("操作成功")
// })
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
} else {
this.$message({
message: "选中指标无匹配驻店人员",
type: "warning"
})
}
}
}
)
},
getStaffInfoData() {
return new Promise((resolve, reject) => {
customizeList({ ...this.coustomForm }).then((res) => {
console.log(res)
resolve(res)
})
})
}
}
......
......@@ -86,10 +86,12 @@ export default {
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%;"></div>
height: 6px;background: ${
params[0].color
};border-radius:50%;margin-right:8px;"></div>
${this.title}:${params[0].value}
</div>
<div style="margin-left:10px; line-height: 20px;">环比: <span style="color:${
<div style="margin-left:18px; line-height: 20px;">环比: <span style="color:${
rate.indexOf("-") > -1 ? "#2CCA74" : "#EB4E4E"
}">${rate || 0}${rate.indexOf("-") > -1 ? "↓" : "↑"}</span></div>
`
......
......@@ -96,10 +96,12 @@ export default {
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%;"></div>
height: 6px;background: ${
params[0].color
};border-radius:50%;margin-right:8px;"></div>
${this.title}:${params[0].value}
</div>
<div style="margin-left:10px; line-height: 20px;">环比: <span style="color:${
<div style="margin-left:18px; line-height: 20px;">环比: <span style="color:${
rate.indexOf("-") > -1 ? "#2CCA74" : "#EB4E4E"
}">${rate || 0}${rate.indexOf("-") > -1 ? "↓" : "↑"}</span></div>
`
......
......@@ -21,7 +21,10 @@
<script type="text/ecmascript-6">
import { mapActions, mapState } from "vuex"
import { findStoreInfoByMerchantNo } from "@api/serviceCentre"
import {
findStoreInfoByMerchantNo,
findStaffByMerchantNo
} from "@api/serviceCentre"
import { Util, deepClone } from "@/common/util"
import noDataImg from "@/assets/empty.png"
import dayjs from "dayjs"
......@@ -63,7 +66,12 @@ export default {
},
{
label: "展业时间",
prop: "businessDevDate"
prop: "businessDevDate",
formatter: (cellValue) => {
return cellValue.businessDevDate
? Util.dateFormate(cellValue.businessDevDate, "YYYY-MM-DD")
: ""
}
},
{
label: "归属业务",
......@@ -103,28 +111,30 @@ export default {
default: () => {}
}
},
watch:{
queryData:{
handler(val){
// this.findStoreInfoByMerchantNoData()
watch: {
queryData: {
handler(val) {
// this.findStoreInfoByMerchantNoData()
},
deep: true,
immediate: true
}
},
deep:true,
immediate:true
}
},
mounted() {
this.findStoreInfoByMerchantNoData()
},
methods: {
findStoreInfoByMerchantNoData() {
console.log(this.queryData, "queryData")
this.searchForm = {
...this.$refs.storeTable.page
}
this.searchForm.scene = this.queryData.scene
// this.searchForm.merchantNos=this.queryData.merchantNos?this.queryData.merchantNos:[44211227]
this.searchForm.merchantNos = [44211227]
this.searchForm.merchantNos = this.queryData.merchantNos
? this.queryData.merchantNos
: [44211227]
findStoreInfoByMerchantNo( this.searchForm ).then((res) => {
findStoreInfoByMerchantNo(this.searchForm).then((res) => {
this.tableData = res
})
},
......@@ -138,16 +148,51 @@ queryData:{
handleBatch() {
let selectedData = []
let merchantNos = []
if (this.$refs.storeTable.mutiSelectArr.indicatorIndex) {
selectedData = this.$refs.storeTable.mutiSelectArr.indicatorIndex
}
if(selectedData.length>0){
}else{
this.$message.error('请先选择门店')
console.log(selectedData)
if (selectedData.length > 0) {
selectedData.forEach((item) => {
if (item.merchantNo) {
merchantNos.push(item.merchantNo)
}
this.handleConfigureCourse(merchantNos)
})
} else {
this.$message.error("请先选择门店")
}
console.log(selectedData)
},
//获取门店下的员工
getStaffInfoData(merchantNos) {
return new Promise((resolve, reject) => {
findStaffByMerchantNo({
merchantNos,
scene: this.queryData.scene
}).then((res) => {
console.log(res)
resolve(res)
})
})
},
async handleConfigureCourse(merchantNos) {
let data = await this.getStaffInfoData(merchantNos)
if (data && data.length > 0) {
this.$router.push({
name: "configureCourse",
query: {
scene: this.queryData.scene,
merchantNos
}
})
} else {
this.$message({
message: "选中指标无匹配驻店人员",
type: "warning"
})
}
}
}
}
......
......@@ -23,6 +23,40 @@
:before-search-fn="beforeSearchFn"
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="{
scrollHeight: 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">
<!-- 查看 -->
<span style="margin-right: 10px; cursor: pointer">
......@@ -89,6 +123,7 @@ export default {
{
label: "门店名称",
prop: "merchantName",
addHtml: "merchantName",
width: "300",
isHide: false
},
......
......@@ -10,8 +10,11 @@
:key="index"
>
<div class="text">{{ item.text }}:</div>
<div v-if="item.className" class="spot greenSpot"></div>
<div class="result">已改善</div>
<div
v-if="item.className"
:class="['spot', item.className(learningInfo)]"
></div>
<div class="result">{{ learningInfo[item.key] }}</div>
</div>
</div>
</div>
......@@ -95,38 +98,24 @@ export default {
couseData: [
{
text: "长课程",
key: 1,
formatter: (cellValue) => {
return {
1: "已改善",
2: "进行中"
}[cellValue.violationStatus]
},
key: "longCourseTag",
className: (cellValue) => {
return {
1: "greenSpot",
2: "greenSpot",
3: "ashSpot",
0: "ashSpot"
}[cellValue.pushStatus]
已改善: "greenSpot",
未改善: "redSpot",
进行中: "yellowSpot"
}[cellValue.longCourseTag]
}
},
{
text: "短课程",
key: 2,
formatter: (cellValue) => {
return {
1: "已改善",
2: "进行中"
}[cellValue.violationStatus]
},
key: "shortCourseTag",
className: (cellValue) => {
return {
1: "greenSpot",
2: "greenSpot",
3: "ashSpot",
0: "ashSpot"
}[cellValue.pushStatus]
已改善: "greenSpot",
未改善: "redSpot",
进行中: "yellowSpot"
}[cellValue.shortCourseTag]
}
}
],
......@@ -192,7 +181,7 @@ export default {
...val,
courseRecords: val.courseRecords.map((record) => ({
...record,
isCollapse: true // 初始化为 false
isCollapse: false // 初始化为 false
}))
}
}
......
......@@ -36,12 +36,15 @@
</el-row>
</el-form>
</div>
<div v-if="detail.key == 'infoTableData'" style="margin-top: 20px">
<div style="margin-top: 20px">
<d2-table
:hasNum="detail.hasNum"
ref="infoTableData"
:table-params="detail.tableParams"
:tableData="detailInfo.infoTableData"
:tableData="
detail.key == 'infoTableData'
? detailInfo.infoTableData
: detailInfo.configTableData
"
:hasPage="false"
>
<div slot="OutputValue" slot-scope="scope">
......@@ -94,16 +97,6 @@
</div>
</d2-table>
</div>
<div v-if="detail.key == 'configTableData'" style="margin-top: 20px">
<d2-table
:hasNum="detail.hasNum"
ref="configTableData"
:table-params="detail.tableParams"
:tableData="detailInfo.configTableData"
:hasPage="false"
>
</d2-table>
</div>
</div>
</div>
</baseDialog>
......@@ -214,7 +207,7 @@ export default {
},
{
label: "成绩",
prop: "totalScore "
prop: "totalScore"
},
{
label: "完成时间",
......@@ -259,26 +252,26 @@ export default {
var params = { staffStudyId: this.paramsObj.id }
staffCourse(params).then((res) => {
this.detailInfo.configTableData = res.list
console.log(this.detailInfo, " console.log(this.detailInfo)")
})
},
getStaffInfo() {
var params = { staffPhone: this.paramsObj.staffPhone }
staffInfo(params).then((res) => {
this.detailInfo = res
this.detailInfo.infoTableData = [
{
lastConversion: res.lastConversion,
currentConversion: res.currentConversion,
conversionRate: res.conversionRate,
lastCustomerUnitPrice: res.lastCustomerUnitPrice,
currentCustomerUnitPrice: res.currentCustomerUnitPrice,
customerUnitPriceRate: res.customerUnitPriceRate,
lastOutputValue: res.lastOutputValue,
currentOutputValue: res.currentOutputValue,
outputValueRate: res.outputValueRate
}
]
Object.assign(this.detailInfo, res, {
infoTableData: [
{
lastConversion: res.lastConversion,
currentConversion: res.currentConversion,
conversionRate: res.conversionRate,
lastCustomerUnitPrice: res.lastCustomerUnitPrice,
currentCustomerUnitPrice: res.currentCustomerUnitPrice,
customerUnitPriceRate: res.customerUnitPriceRate,
lastOutputValue: res.lastOutputValue,
currentOutputValue: res.currentOutputValue,
outputValueRate: res.outputValueRate
}
]
})
this.getStaffCourse()
})
......
......@@ -106,6 +106,10 @@ export default {
}
},
methods: {
reset() {
this.checkAll = []
this.selectStaffList = []
},
handleChooseStaff(index) {
this.selectStaffList[index].active = !this.selectStaffList[index].active
this.checkAll = this.selectStaffList.every((item) => item.active)
......
......@@ -30,25 +30,28 @@
<!-- 业绩状况 -->
<performance-status :performanceInfo="performanceInfo"></performance-status>
<!-- 谈客能力-->
<div class="header">谈客能力</div>
<div class="presentation">
<div
v-for="(item, index) in capacityList"
:key="index"
class="capacity-line"
>
<div class="title">{{ item.title }}</div>
<div class="capacity">
<div
:class="['capacity-item', item.key == 'ohterList' ? 'other' : '']"
v-for="(child, chindIndex) of item.children"
:key="chindIndex"
>
{{ child.label }} {{ child.value }}
<template v-if="queryData.brandId == 1 && queryData.scene == 1">
<div class="header">谈客能力</div>
<div class="presentation">
<div
v-for="(item, index) in capacityList"
:key="index"
class="capacity-line"
>
<div class="title">{{ item.title }}</div>
<div class="capacity">
<div
:class="['capacity-item', item.key == 'ohterList' ? 'other' : '']"
v-for="(child, chindIndex) of item.children"
:key="chindIndex"
>
{{ child.label }} {{ child.value }}
</div>
</div>
</div>
</div>
</div>
</template>
<!-- 学习情况 -->
<learning-situation
:learningProgress="learningProgress"
......@@ -115,6 +118,7 @@ export default {
}
}
],
queryData: this.$route.query,
capacityList: [
{
title: "弱项:",
......@@ -186,6 +190,7 @@ export default {
.el-form-item {
width: 100%;
margin-bottom: 0px;
display: flex;
}
.itemDiv {
display: flex;
......@@ -202,11 +207,13 @@ export default {
white-space: nowrap;
}
::v-deep .el-form-item__label {
white-space: nowrap;
color: #666666;
}
::v-deep .el-form-item__content {
// max-width: calc(100% - 1280px);
word-break: break-all;
width: 90%;
}
}
......
......@@ -8,7 +8,9 @@
详情<i class="el-icon-arrow-right"></i>
</div>
</div>
<template v-if="storeIndicatoerInfo.metricDTOList.length">
<template
v-if="storeIndicatoerInfo && storeIndicatoerInfo.metricDTOList.length"
>
<div
v-for="(item, index) in storeIndicatoerInfo.metricDTOList"
:key="index"
......
......@@ -34,7 +34,8 @@ export default {
let timeStr = `${this.formatDate(start)} - ${this.formatDate(end)}`
this.$emit("changeWeek", {
weekOffset: this.weekOffset,
timeStr
timeStr,
isDisabled: this.isDisabled
})
return timeStr
......
......@@ -43,13 +43,13 @@
></store-indicators>
</div>
<!-- 课程任务配置 -->
<couse-config
<course-config
ref="couseConfig"
@openWindow="openWindow"
:longAllData="longAllData"
:longForm="longForm"
@changeBrand="changeBrand"
></couse-config>
></course-config>
<!--上周学习复盘 -->
<last-week-replay
:longForm="longForm"
......@@ -62,14 +62,14 @@
import weekTimePicker from "./components/weekTimePicker"
// import monthTimePicker from "./components/monthTimePicker"
import storeIndicators from "./components/storeIndicators"
import couseConfig from "./components/couseConfig"
import courseConfig from "./components/courseConfig"
import lastWeekReplay from "./components/lastWeekReplay"
import { findAllConfig } from "@/api/serviceCentre"
export default {
components: {
weekTimePicker,
storeIndicators,
couseConfig,
courseConfig,
lastWeekReplay
// monthTimePicker
},
......@@ -80,7 +80,8 @@ export default {
longForm: {
scene: 1,
startTime: "",
endTime: ""
endTime: "",
isDisabled: true
},
analysisActiveIndex: 0,
activeIndex: 0,
......@@ -194,6 +195,7 @@ export default {
// analysisActiveIndex 0:上周 1:当月
this.analysisList[0].value = analysisObj[0](weekOffset)
this.analysisList[1].value = analysisObj[1](weekOffset)
this.longForm.isDisabled = data.isDisabled
this.handleSetTime()
},
handleClick(index) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!