Commit e0bbfd48 by zhangxw

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

…stem into SAAS+V5.5.3
2 parents f94e319d 40d0d86c
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
</el-transfer> </el-transfer>
</template> </template>
<template v-else-if="type == 2"> <template v-else-if="type == 2">
<div class="basic-info"><span>日报模板:</span>{{ templateData.typeName }}</div> <div class="basic-info"><span>汇报模板:</span>{{ templateData.typeName }}</div>
<div class="basic-info"><span>日报日期:</span>{{ reportTime }}</div> <div class="basic-info"><span>日期:</span>{{ reportTime }}</div>
<div class="basic-info"><span>缺失份数:</span>{{ templateData.undoCount }}份</div> <div class="basic-info"><span>缺失份数:</span>{{ templateData.undoCount }}份</div>
<div class="title">明细数据 <el-button type="primary" size="mini" @click="exportTable">导出</el-button></div> <div class="title">明细数据 <el-button type="primary" size="mini" @click="exportTable">导出</el-button></div>
<el-table :key="key" :data="tableData" height="400" border style="width: 100%;text-align: center;"> <el-table :key="key" :data="tableData" height="400" border style="width: 100%;text-align: center;">
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
prop: 'staffName' prop: 'staffName'
}, },
{ {
label: '最近提交日报日期', label: '最近提交日期',
prop: 'lastSubmitDate', prop: 'lastSubmitDate',
sortable: true sortable: true
}, },
......
...@@ -569,7 +569,7 @@ export default { ...@@ -569,7 +569,7 @@ export default {
.map((k) => k.name) .map((k) => k.name)
.includes(this.searchForm.typeName) .includes(this.searchForm.typeName)
) { ) {
this.summaryData = await getSummary(params1) this.summaryData = await getSummary({ ...params1, templateCode: r1.code })
} }
this.templateData.staffUuidList = this.searchForm.merchantIds this.templateData.staffUuidList = this.searchForm.merchantIds
this.getTableList() this.getTableList()
......
...@@ -17,13 +17,14 @@ ...@@ -17,13 +17,14 @@
> >
<template slot="urgentHtml"> <template slot="urgentHtml">
<el-switch <el-switch
v-model="addForm.urgent" :value="addForm.urgent"
:active-value="1" :active-value="1"
:inactive-value="0" :inactive-value="0"
active-color="#2a58ad" active-color="#2a58ad"
class="switchStyle" class="switchStyle"
active-text="开" active-text="开"
inactive-text="关" inactive-text="关"
@change="confirmUrgentChange"
> >
</el-switch> </el-switch>
</template> </template>
...@@ -68,7 +69,7 @@ export default { ...@@ -68,7 +69,7 @@ export default {
recruitmentType: "", //招聘类型 recruitmentType: "", //招聘类型
recruitmentTypeName: "", recruitmentTypeName: "",
requirementDescription: "", requirementDescription: "",
urgent: 0 urgent: 0 //0-非急招 1-急招 ,
}, },
labelWidth: "150px", labelWidth: "150px",
defaultWidth: "530px", defaultWidth: "530px",
...@@ -233,6 +234,24 @@ export default { ...@@ -233,6 +234,24 @@ export default {
} }
}, },
methods: { methods: {
confirmUrgentChange(val) {
console.log(val)
if (val == 1) {
let text =
"申请急招,在招聘负责人推送简历后,需在24小时内完成简历跟进处理,否则将自动上报总部,请知悉!"
this.$confirm(text, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.addForm.urgent = val
})
.catch((err) => {})
} else {
this.addForm.urgent = val
}
},
findAttrIdx(formName, name) { findAttrIdx(formName, name) {
var index = this[formName].findIndex((k) => k.name == name) var index = this[formName].findIndex((k) => k.name == name)
return index || "" return index || ""
...@@ -276,10 +295,7 @@ export default { ...@@ -276,10 +295,7 @@ export default {
handleSave() { handleSave() {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => { this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
if (valid) { if (valid) {
let text = let text = "确定是否提交招聘需求?"
this.addForm.urgent == 1
? "申请急招,在招聘负责人推送简历后,需在24小时内完成简历跟进处理,否则将自动上报总部,请知悉!"
: "确定是否提交招聘需求?"
this.$confirm(text, "提示", { this.$confirm(text, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
......
...@@ -626,6 +626,13 @@ export default { ...@@ -626,6 +626,13 @@ export default {
} }
}, },
async handleEntry(isCheck = false) { async handleEntry(isCheck = false) {
if (this.onboardingPlans.length >= 20) {
this.$message({
message: "入职人数不能超过20人",
type: "error"
})
return
}
this.isAdd = true this.isAdd = true
await this.fetchOnboardingPlans() await this.fetchOnboardingPlans()
this.isEntryVisible = !this.isEntryVisible this.isEntryVisible = !this.isEntryVisible
......
...@@ -416,17 +416,17 @@ export default { ...@@ -416,17 +416,17 @@ export default {
optionsName: "interviewResultOpt", optionsName: "interviewResultOpt",
handleRadioChange: (val) => { handleRadioChange: (val) => {
//面试不通过屏蔽面试时间 //面试不通过屏蔽面试时间
this.feedbackFormData[ // this.feedbackFormData[
this.findFormAttrId("feedbackFormData", "interviewTime") // this.findFormAttrId("feedbackFormData", "interviewTime")
].isHide = val == 1 ? false : true // ].isHide = val == 1 ? false : true
} }
}, },
{ {
label: "面试时间", label: "面试时间",
name: "interviewTime", name: "interviewTime",
type: "datePicker", type: "datePicker",
dateType: "date", dateType: "date"
isHide: true // isHide: true
// pickerOptions: "beforeRangePickerOptions", // pickerOptions: "beforeRangePickerOptions",
}, },
...@@ -680,6 +680,13 @@ export default { ...@@ -680,6 +680,13 @@ export default {
}, },
//新增简历 //新增简历
async handleAdd() { async handleAdd() {
if (this.resumes.length >= 98) {
this.$message({
message: "简历人数不能超过98人",
type: "error"
})
return
}
this.isAdd = true this.isAdd = true
this.isAddDialogConfig.title = "新增简历" this.isAddDialogConfig.title = "新增简历"
await this.fetchOnboardingPlans() await this.fetchOnboardingPlans()
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
type="primary" type="primary"
plain plain
icon="el-icon-plus" icon="el-icon-plus"
@click="handleAdd" @click="handleAdd()"
v-if="isBtn" v-if="isBtn"
>新增试岗</el-button >新增试岗</el-button
> >
...@@ -307,9 +307,9 @@ export default { ...@@ -307,9 +307,9 @@ export default {
//新增简历 //新增简历
async handleAdd(data) { async handleAdd(data) {
if (this.trialOnboardings.length >= 10) { if (this.trialOnboardings.length >= 20) {
this.$message({ this.$message({
message: "试岗人数不能超过10人", message: "试岗人数不能超过20人",
type: "error" type: "error"
}) })
return return
......
...@@ -116,7 +116,9 @@ import { ...@@ -116,7 +116,9 @@ import {
} from "@api/recruitment" } from "@api/recruitment"
import { inviteStatusOpt, inviteStatusOptMap } from "@/common/constants.js" import { inviteStatusOpt, inviteStatusOptMap } from "@/common/constants.js"
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
export default { export default {
mixins: [reportTrackPageMixin],
data() { data() {
return { return {
isRejectVisible: false, isRejectVisible: false,
...@@ -379,10 +381,12 @@ export default { ...@@ -379,10 +381,12 @@ export default {
marginTop: "-15px" marginTop: "-15px"
} }
} }
] ],
track_event_code: "recruitment_management"
} }
}, },
mounted() { mounted() {
this.onPageShow()
this.getRecruitmentSummaryData() this.getRecruitmentSummaryData()
this.fetchOnboardingPlans() this.fetchOnboardingPlans()
}, },
......
...@@ -83,48 +83,13 @@ ...@@ -83,48 +83,13 @@
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</d2-table> </d2-table>
<!-- <el-checkbox-group v-model="selected" @change="handleCheckedChange">
<el-checkbox
v-for="course in courseList"
:key="course.id"
:label="course.courseId"
>
<div class="title">{{ course.courseName }}</div>
<el-tooltip
effect="light"
placement="top"
popper-class="tools-gltip"
v-if="course.status == 2 || course.status == 5"
>
<div slot="content" class="process-info">
<div>
学习进度:<span>
{{ 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>
</el-tooltip>
</el-checkbox>
</el-checkbox-group> -->
</div> </div>
</div> </div>
<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"> <div class="time">
共{{ selectObj.count }}节 {{ selectObj.courseTotalDuration }}min 共{{ selectObj.count }}节 {{ selectObj.courseTotalDuration }}分钟
</div> </div>
</div> </div>
<div class="reminder"> <div class="reminder">
...@@ -134,25 +99,12 @@ ...@@ -134,25 +99,12 @@
/>提示:总课程时长建议< 60 min />提示:总课程时长建议< 60 min
</div> </div>
<div class="select-list"> <div class="select-list">
<!-- <div
class="select-item"
v-for="(selectCourse, index) in selectCourseList"
:key="selectCourse.courseId"
>
<div class="item-content">
{{ selectCourse.courseName
}}<span class="item-time"
>{{ selectCourse.courseTotalDuration }}min</span
>
</div>
<div class="del" @click="delCourse(selectCourse)">删除</div>
</div> -->
<d2-table <d2-table
:tableData="selectCourseList" :tableData="selectCourseList"
:table-params="selecTableParams" :table-params="selecTableParams"
:hasPage="hasPage" :hasPage="hasPage"
:hasNum="hasNum" :hasNum="hasNum"
:maxHeight="350" :maxHeight="385"
> >
<!-- 课程名称 --> <!-- 课程名称 -->
<div slot="courseName" slot-scope="scope"> <div slot="courseName" slot-scope="scope">
...@@ -294,7 +246,7 @@ export default { ...@@ -294,7 +246,7 @@ export default {
{ {
label: "课程名称", label: "课程名称",
prop: "courseName", prop: "courseName",
width: "162px", width: "159px",
addHtml: "courseName" addHtml: "courseName"
}, },
{ {
...@@ -305,7 +257,7 @@ export default { ...@@ -305,7 +257,7 @@ export default {
}, },
{ {
label: "类型", label: "类型",
prop: "positionName", prop: "courseFileType",
width: "88px", width: "88px",
formatter: (row) => { formatter: (row) => {
return this.getStatusItem( return this.getStatusItem(
...@@ -319,7 +271,7 @@ export default { ...@@ -319,7 +271,7 @@ export default {
{ {
label: "时长/分钟", label: "时长/分钟",
prop: "courseTotalDuration", prop: "courseTotalDuration",
width: 94 width: 92
} }
] ]
}, },
...@@ -439,6 +391,7 @@ export default { ...@@ -439,6 +391,7 @@ export default {
const newList = this.selectCourseList.filter( const newList = this.selectCourseList.filter(
(item) => String(item.courseId) !== idToDelete (item) => String(item.courseId) !== idToDelete
) )
this.selectCourseList = newList this.selectCourseList = newList
// 同步清理来源集合,避免后续合并把已删除项加回去 // 同步清理来源集合,避免后续合并把已删除项加回去
...@@ -481,36 +434,47 @@ export default { ...@@ -481,36 +434,47 @@ export default {
const selectedIdSet = new Set(selectedList.map((r) => String(r.courseId))) const selectedIdSet = new Set(selectedList.map((r) => String(r.courseId)))
// 当前标签页的已选集合(推荐 / 自选) // 当前标签页的已选集合(推荐 / 自选)
const currentList = const isRecommend = this.titleActiveIndex === 0
this.titleActiveIndex === 0 const currentList = isRecommend
? this.selectCourseObj.recommendData ? this.selectCourseObj.recommendData
: this.selectCourseObj.optional : this.selectCourseObj.optional
// 仅在“当前可见”范围内执行差异更新: // 计算“当前可见范围内被取消勾选”的课程集合(包含‘全部取消’的场景)
// - 对于当前可见但未选中的项:从当前集合中移除 const idsToRemove = new Set(
// - 对于当前可见且选中的项:保持或新增 [...visibleIdSet].filter((id) => !selectedIdSet.has(id))
// - 对于不可见项:保持原样,不受此次事件影响 )
const kept = currentList.filter((item) => {
const id = String(item.courseId)
if (!visibleIdSet.has(id)) return true // 不在当前列表中,保持
return selectedIdSet.has(id) // 在当前列表中仍选中则保留
})
// 把当前列表中新勾选但尚未在集合中的项补充进去 // 跨来源同步删除:同时从 recommendData 和 optional 移除这些课程
const keptIdSet = new Set(kept.map((item) => String(item.courseId))) this.selectCourseObj.recommendData =
const additions = selectedList.filter((item) => { this.selectCourseObj.recommendData.filter(
(item) => !idsToRemove.has(String(item.courseId))
)
this.selectCourseObj.optional = this.selectCourseObj.optional.filter(
(item) => !idsToRemove.has(String(item.courseId))
)
// 重新构建当前来源集合:保留不可见项 + 当前可见且仍选中的项 + 新增勾选项
const currentAfterRemove = currentList.filter((item) => {
const id = String(item.courseId) const id = String(item.courseId)
return !keptIdSet.has(id) // 已在可见范围内被取消的,已被移除;不可见项保留
if (!visibleIdSet.has(id)) return true
return selectedIdSet.has(id) // 可见且仍选中的保留
}) })
const currentIds = new Set(
currentAfterRemove.map((item) => String(item.courseId))
)
const additions = selectedList.filter(
(item) => !currentIds.has(String(item.courseId))
)
const updatedSourceList = [...currentAfterRemove, ...additions]
const updatedSourceList = [...kept, ...additions] if (isRecommend) {
if (this.titleActiveIndex === 0) {
this.selectCourseObj.recommendData = updatedSourceList this.selectCourseObj.recommendData = updatedSourceList
} else { } else {
this.selectCourseObj.optional = updatedSourceList this.selectCourseObj.optional = updatedSourceList
} }
// 合并并按 courseId 去重,防止重复计数 // 合并并按 courseId 去重
const merged = [ const merged = [
...this.selectCourseObj.recommendData, ...this.selectCourseObj.recommendData,
...this.selectCourseObj.optional ...this.selectCourseObj.optional
...@@ -554,17 +518,6 @@ export default { ...@@ -554,17 +518,6 @@ export default {
}) })
}) })
}, },
delCourse(val) {
const currentIndex = this.selectCourseList.findIndex(
(item) => item.courseId == val.courseId
)
if (currentIndex >= 0) {
this.selectCourseList.splice(currentIndex, 1)
}
this.updateStats()
this.toggleRowSelectionData()
this.$emit("handleCourse", this.selectCourseList)
},
resetForm() { resetForm() {
this.courseForm.tagSearch = "" this.courseForm.tagSearch = ""
// 重置将刷新列表,屏蔽 selection 事件以保留已选 // 重置将刷新列表,屏蔽 selection 事件以保留已选
...@@ -604,7 +557,7 @@ export default { ...@@ -604,7 +557,7 @@ export default {
.title-type { .title-type {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; // justify-content: space-between;
height: 40px; height: 40px;
box-sizing: border-box; box-sizing: border-box;
padding: 10px 16px; padding: 10px 16px;
...@@ -615,6 +568,7 @@ export default { ...@@ -615,6 +568,7 @@ export default {
font-size: 14px; font-size: 14px;
} }
.time { .time {
margin-left: 10px;
color: #666666; color: #666666;
font-size: 14px; font-size: 14px;
} }
...@@ -637,7 +591,7 @@ export default { ...@@ -637,7 +591,7 @@ export default {
} }
} }
.select-list { .select-list {
height: 365px; height: 390px;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
.select-item { .select-item {
...@@ -741,6 +695,24 @@ export default { ...@@ -741,6 +695,24 @@ export default {
border: 1px solid #2cca74; border: 1px solid #2cca74;
} }
} }
// 修改滚动条样式为透明
&::-webkit-scrollbar {
width: 1px;
height: 1px;
}
&::-webkit-scrollbar-thumb {
background-color: transparent;
border-radius: 1px;
}
&::-webkit-scrollbar-track {
background-color: transparent;
}
&::-webkit-scrollbar-corner {
background-color: transparent;
}
} }
.tools-gltip { .tools-gltip {
......
...@@ -22,7 +22,13 @@ ...@@ -22,7 +22,13 @@
@click="handleClick(index)" @click="handleClick(index)"
> >
<div class="employeeName">{{ item.employeeName }}</div> <div class="employeeName">{{ item.employeeName }}</div>
<div class="config" v-if="item.courseConfigFlag == 1">已配置</div> <div class="end" v-if="item.taskStatus == 2">已结束</div>
<div
class="config"
v-if="item.taskStatus != 2 && item.courseConfigFlag == 1"
>
已配置
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -279,6 +285,18 @@ export default { ...@@ -279,6 +285,18 @@ export default {
top: 10px; top: 10px;
right: 12px; right: 12px;
} }
.end {
position: absolute;
border-radius: 2px;
// border: 1px solid #c6c8cc;
background: #e9eef7;
padding: 2px 6px;
color: #c6c8cc;
font-size: 11px;
font-weight: 500;
top: 10px;
right: 12px;
}
} }
.active { .active {
color: #2a58ad; color: #2a58ad;
......
...@@ -158,7 +158,6 @@ export default { ...@@ -158,7 +158,6 @@ export default {
].metricRuleList = res ].metricRuleList = res
} }
}) })
console.log(params.configId, 99999)
this.$emit("changeBrand", params.configId) this.$emit("changeBrand", params.configId)
}, 0) }, 0)
}, },
......
...@@ -25,17 +25,18 @@ ...@@ -25,17 +25,18 @@
<div class="select-list"> <div class="select-list">
<d2-table <d2-table
ref="table" ref="table"
:tableData="staffTagCourseList" :tableData="allStaffCourseList"
:table-params="tableParams" :table-params="tableParams"
:hasPage="hasPage" :hasPage="hasPage"
:hasNum="hasNum" :hasNum="hasNum"
:maxHeight="350" :maxHeight="360"
@selectionTable="handleCheckedChange('left', $event)" @selectionTable="handleCheckedChange('left', $event)"
> >
<!-- 课程名称 --> <!-- 课程名称 -->
<div slot="courseName" slot-scope="scope"> <div slot="courseName" slot-scope="scope">
<span v-if="scope.scope.courseName.length < 28">{{ <template v-if="scope.scope.courseName">
scope.scope.courseName.slice(0, 28) <span v-if="scope.scope.courseName.length < 21">{{
scope.scope.courseName.slice(0, 21)
}}</span> }}</span>
<div v-else> <div v-else>
<el-tooltip <el-tooltip
...@@ -44,9 +45,13 @@ ...@@ -44,9 +45,13 @@
:content="scope.scope.courseName" :content="scope.scope.courseName"
placement="top-start" placement="top-start"
> >
<span> {{ scope.scope.courseName.slice(0, 28) }}...</span> <span>
{{ scope.scope.courseName.slice(0, 21) }}...</span
>
</el-tooltip> </el-tooltip>
</div> </div>
</template>
<template v-else>-</template>
</div> </div>
<!--状态 --> <!--状态 -->
<template slot="statusHtml" slot-scope="scope"> <template slot="statusHtml" slot-scope="scope">
...@@ -82,8 +87,22 @@ ...@@ -82,8 +87,22 @@
</el-tooltip> </el-tooltip>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
<div slot="auth-button" slot-scope="scope">
<el-button
type="text"
class="del"
@click="delCourse(scope.scope)"
v-if="!scope.scope.isSelect"
>删除</el-button
>
<span v-else>-</span>
</div>
</d2-table> </d2-table>
<div class="btn add el-icon-plus" @click="handleAddCourse"> <div
class="btn add el-icon-plus"
@click="handleAddCourse"
v-if="staffItem.taskStatus != 2"
>
添加课程 添加课程
</div> </div>
</div> </div>
...@@ -128,8 +147,10 @@ ...@@ -128,8 +147,10 @@
> >
重置 重置
</div> </div>
<template v-if="staffItem.taskStatus != 2">
<div class="btn multiple" @click="handleMultiple">多人配置</div> <div class="btn multiple" @click="handleMultiple">多人配置</div>
<div class="btn submit" @click="handleSubmit">提交本员工配置</div> <div class="btn submit" @click="handleSubmit">提交本员工配置</div>
</template>
</div> </div>
<!-- 多人配置 --> <!-- 多人配置 -->
<multipleDialog <multipleDialog
...@@ -147,7 +168,7 @@ ...@@ -147,7 +168,7 @@
:isVisible="isVisible" :isVisible="isVisible"
v-if="isVisible" v-if="isVisible"
:staffItem="staffItem" :staffItem="staffItem"
:selectedRows="staffTagCourseList" :selectedRows="selectStaffCourseList"
@handleConfirm="handleConfirmCouseDialog" @handleConfirm="handleConfirmCouseDialog"
@handleClose="handleCloseCouseDialog" @handleClose="handleCloseCouseDialog"
></allocationDialog> ></allocationDialog>
...@@ -257,7 +278,9 @@ export default { ...@@ -257,7 +278,9 @@ export default {
], ],
staffListData: [], staffListData: [],
courseList: [], courseList: [],
staffTagCourseList: [], //已配置的课程列表 staffTagCourseList: [], //已配置的课程列表不可以删除
selectStaffCourseList: [], //已配置的课程列表可以删除
allStaffCourseList: [], //合并的数据
selectObj: { selectObj: {
courseTotalDuration: 0, courseTotalDuration: 0,
count: 0 count: 0
...@@ -268,11 +291,14 @@ export default { ...@@ -268,11 +291,14 @@ export default {
hasPage: false, hasPage: false,
hasNum: false, hasNum: false,
tableParams: { tableParams: {
tableOption: {
width: "60"
},
tableColumns: [ tableColumns: [
{ {
label: "课程名称", label: "课程名称",
prop: "courseName", prop: "courseName",
width: "308px", width: "315px",
addHtml: "courseName" addHtml: "courseName"
}, },
{ {
...@@ -284,7 +310,7 @@ export default { ...@@ -284,7 +310,7 @@ export default {
{ {
label: "类型", label: "类型",
prop: "positionName", prop: "positionName",
width: "88px", width: "60px",
formatter: (row) => { formatter: (row) => {
return this.getStatusItem( return this.getStatusItem(
this.baseData, this.baseData,
...@@ -297,7 +323,7 @@ export default { ...@@ -297,7 +323,7 @@ export default {
{ {
label: "时长/分钟", label: "时长/分钟",
prop: "courseTotalDuration", prop: "courseTotalDuration",
width: 94 width: "94px"
} }
] ]
} }
...@@ -375,7 +401,6 @@ export default { ...@@ -375,7 +401,6 @@ export default {
return (item && item.confValue) || "-" return (item && item.confValue) || "-"
}, },
getStaffTagCourseList(courseForm = {}) { getStaffTagCourseList(courseForm = {}) {
console.log(this.staffItem, " this.staffItem")
let params = { let params = {
staffPhone: this.staffItem.phone, staffPhone: this.staffItem.phone,
currentPage: 1, currentPage: 1,
...@@ -398,8 +423,40 @@ export default { ...@@ -398,8 +423,40 @@ export default {
currentPage: 1, currentPage: 1,
pageSize: 99999 pageSize: 99999
}).then((res) => { }).then((res) => {
this.staffTagCourseList = res.list console.log(res, "员工已配置课程")
res.list.forEach((item) => { if (res.list.length) {
res.list.forEach((item) => (item.isSelect = true))
}
this.staffTagCourseList = res.list ? res.list : []
this.selectStaffCourseList = []
this.allStaffCourseList = deepClone(this.staffTagCourseList)
this.updateTotalDuration(this.staffTagCourseList)
})
},
delCourse(row) {
const id = String(row.courseId)
// 从全部课程列表删除该项
this.allStaffCourseList = (
Array.isArray(this.allStaffCourseList) ? this.allStaffCourseList : []
).filter((item) => String(item.courseId) !== id)
// 从已配置课程列表删除该项
this.selectStaffCourseList = (
Array.isArray(this.selectStaffCourseList)
? this.selectStaffCourseList
: []
).filter((item) => String(item.courseId) !== id)
this.updateTotalDuration(this.allStaffCourseList)
this.extendConfig.courseList = this.allStaffCourseList.map((item) => {
return {
courseId: item.courseId,
courseTitle: item.courseName
}
})
},
updateTotalDuration(data) {
this.selectObj.courseTotalDuration = 0
this.selectObj.count = 0
data.forEach((item) => {
this.selectObj.courseTotalDuration = parseFloat( this.selectObj.courseTotalDuration = parseFloat(
( (
this.selectObj.courseTotalDuration + item.courseTotalDuration this.selectObj.courseTotalDuration + item.courseTotalDuration
...@@ -407,8 +464,6 @@ export default { ...@@ -407,8 +464,6 @@ export default {
) )
this.selectObj.count += 1 this.selectObj.count += 1
}) })
console.log(this.staffTagCourseList, " this.staffTagCourseList")
})
}, },
//查询员工已配置详情 //查询员工已配置详情
getByTaskId() { getByTaskId() {
...@@ -484,14 +539,36 @@ export default { ...@@ -484,14 +539,36 @@ export default {
}, },
handleConfirmCouseDialog(data) { handleConfirmCouseDialog(data) {
this.isVisible = false this.isVisible = false
this.staffTagCourseList = data this.selectStaffCourseList = data
this.extendConfig.courseList = data.map((item) => { // let arr = [...this.selectStaffCourseList, ...this.staffTagCourseList]
// this.staffTagCourseList = data
this.allStaffCourseList = this.handleDuplicates()
this.updateTotalDuration(this.allStaffCourseList)
this.extendConfig.courseList = this.allStaffCourseList.map((item) => {
return { return {
courseId: item.courseId, courseId: item.courseId,
courseTitle: item.courseName courseTitle: item.courseName
} }
}) })
}, },
handleDuplicates() {
const primary = Array.isArray(this.staffTagCourseList)
? this.staffTagCourseList
: []
const secondary = Array.isArray(this.selectStaffCourseList)
? this.selectStaffCourseList
: []
const key = "courseId"
const primaryIdSet = new Set(primary.map((item) => String(item[key])))
const merged = [
...primary,
...secondary.filter((item) => !primaryIdSet.has(String(item[key])))
]
this.selectStaffCourseList = secondary.filter(
(item) => !primaryIdSet.has(String(item[key]))
)
return merged
},
getThisSundayWithTime() { getThisSundayWithTime() {
const now = new Date() const now = new Date()
const today = now.getDay() const today = now.getDay()
...@@ -535,26 +612,39 @@ export default { ...@@ -535,26 +612,39 @@ export default {
handleConfirmMultiple(selectStaffList) { handleConfirmMultiple(selectStaffList) {
let staffPhoneList = selectStaffList.map((item) => item.phone) let staffPhoneList = selectStaffList.map((item) => item.phone)
let params = this.handleParams() let params = this.handleParams()
if (this.staffItem.courseConfigFlag == 1) {
params.id = this.staffItem.taskId
}
params.staffPhoneList = staffPhoneList params.staffPhoneList = staffPhoneList
this.submit(params) this.submit(params)
}, },
submit(params) { submit(params) {
insertOrUpdate(params).then((res) => { insertOrUpdate(params)
.then((res) => {
this.isFlag = true this.isFlag = true
this.notice.okTips("操作成功") this.notice.okTips("操作成功")
this.multipleVisible = false this.multipleVisible = false
this.selectStaffCourseList = []
this.$emit("handleConfigureCourse") this.$emit("handleConfigureCourse")
}) })
.finally(() => {
this.isFlag = true
if (this.$refs.multipleDialog) {
this.$refs.multipleDialog.loading = false
}
})
}, },
async handleSubmit() { async handleSubmit() {
let params = this.handleParams() let params = this.handleParams()
console.log(JSON.stringify(params))
// 已配置 // 已配置
if (this.staffItem.courseConfigFlag == 1) { if (this.staffItem.courseConfigFlag == 1) {
if (!this.extendConfig.courseList.length) { if (!this.extendConfig.courseList.length) {
this.$message.error("请选择配置课程") this.$message.error("请选择配置课程")
return return
} }
params.id = this.staffItem.taskId
console.log(params)
} else { } else {
//未配置 //未配置
let valid = await this.$refs.editFormRef.$refs[ let valid = await this.$refs.editFormRef.$refs[
...@@ -632,7 +722,7 @@ export default { ...@@ -632,7 +722,7 @@ export default {
color: #ffffff; color: #ffffff;
} }
.right { .right {
width: 580px; width: 629px;
} }
.right { .right {
.title-type { .title-type {
...@@ -656,6 +746,7 @@ export default { ...@@ -656,6 +746,7 @@ export default {
} }
} }
.select-list { .select-list {
width: 629px;
// min-height: 365px; // min-height: 365px;
margin-top: -4px; margin-top: -4px;
overflow-y: auto; overflow-y: auto;
...@@ -679,6 +770,24 @@ export default { ...@@ -679,6 +770,24 @@ export default {
} }
} }
} }
// 修改滚动条样式为透明
&::-webkit-scrollbar {
width: 1px;
height: 1px;
}
&::-webkit-scrollbar-thumb {
background-color: transparent;
border-radius: 1px;
}
&::-webkit-scrollbar-track {
background-color: transparent;
}
&::-webkit-scrollbar-corner {
background-color: transparent;
}
} }
::v-deep { ::v-deep {
.cell { .cell {
......
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
filterStaffList(val) { filterStaffList(val) {
this.selectStaffList = [] this.selectStaffList = []
val.forEach((item) => { val.forEach((item) => {
if (item.courseConfigFlag != 1) { if (item.taskStatus != 2) {
this.selectStaffList.push(item) this.selectStaffList.push(item)
} }
}) })
...@@ -163,7 +163,6 @@ export default { ...@@ -163,7 +163,6 @@ export default {
if (this.isFlag) { if (this.isFlag) {
this.isFlag = false this.isFlag = false
let arr = this.selectStaffList.filter((item) => item.active) let arr = this.selectStaffList.filter((item) => item.active)
// console.log(arr)
this.$emit("handleMultiple", arr) this.$emit("handleMultiple", arr)
// this.visible = false // this.visible = false
} }
......
...@@ -318,7 +318,8 @@ export default { ...@@ -318,7 +318,8 @@ export default {
}, },
{ {
label: "配课人员", label: "配课人员",
prop: "taskCreatedBy" prop: "taskCreatedBy",
width: "180"
}, },
{ {
label: "课程配置时间", label: "课程配置时间",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!