Commit 99c339a2 by wangzhihui

```

feat(course-allocation): 调整课程分配组件功能

- 修改工具提示样式类名并调整高度为自适应
- 添加选中行数据传递给课程变量组件
- 初始化时清空已选择的员工课程列表
- 颜色映射逻辑改为固定返回特定颜色值
- 添加调试日志用于课程列表变化追踪
```
1 parent 7f4818fd
...@@ -329,9 +329,11 @@ $prefix: d2; ...@@ -329,9 +329,11 @@ $prefix: d2;
height: 200px !important; height: 200px !important;
overflow-y: scroll; overflow-y: scroll;
} }
.el-tooltip__popper.tools-gltip {
.tools-gltip {
width: 238px !important; width: 238px !important;
height: 95px !important; height: auto !important;
background: #fff;
} }
.el-tooltip__popper.is-light { .el-tooltip__popper.is-light {
width: 177px; width: 177px;
......
...@@ -369,7 +369,7 @@ export default { ...@@ -369,7 +369,7 @@ export default {
}, },
colorForText(text = "") { colorForText(text = "") {
const key = String(text).trim() const key = String(text).trim()
return FIXED_COLOR_MAP.get(key) || this.pickRandomColor() return FIXED_COLOR_MAP.get(key) || "#E33C64"
}, },
hexToRgba(hex, alpha = 0.12) { hexToRgba(hex, alpha = 0.12) {
let h = hex.replace("#", "") let h = hex.replace("#", "")
......
...@@ -306,6 +306,7 @@ export default { ...@@ -306,6 +306,7 @@ export default {
}, },
courseList: { courseList: {
handler() { handler() {
console.log("重置")
this.toggleRowSelectionData() this.toggleRowSelectionData()
// 程序化回显结束后再恢复事件 // 程序化回显结束后再恢复事件
this.$nextTick(() => { this.$nextTick(() => {
...@@ -717,7 +718,7 @@ export default { ...@@ -717,7 +718,7 @@ export default {
.tools-gltip { .tools-gltip {
width: 238px !important; width: 238px !important;
height: 95px !important; height: auto !important;
background: #fff; background: #fff;
.process-info { .process-info {
width: 238px; width: 238px;
......
...@@ -131,6 +131,7 @@ ...@@ -131,6 +131,7 @@
<div slot="allocationHtml" slot-scope="scope"> <div slot="allocationHtml" slot-scope="scope">
<curricula-variable <curricula-variable
ref="curriculaVariable" ref="curriculaVariable"
:selectedRows="selectStaffCourseList"
:courseList="courseList" :courseList="courseList"
@handleCourse="handleCourse" @handleCourse="handleCourse"
@fromAllocation="fromAllocation" @fromAllocation="fromAllocation"
...@@ -509,6 +510,7 @@ export default { ...@@ -509,6 +510,7 @@ export default {
studyType: 1, studyType: 1,
courseList: [] courseList: []
} }
this.selectStaffCourseList = []
this.$refs.curriculaVariable && this.$refs.curriculaVariable.reset() this.$refs.curriculaVariable && this.$refs.curriculaVariable.reset()
}, },
async handleMultiple() { async handleMultiple() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!