listOfPenaltiesDialog.vue
2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<template>
<d2-dialog :is-visible="show" class="accountDailog" :title="`学习任务情况 | ${detailInfo.staffName}`" :isShowFooter="false"
:noCancel="true" width="720px" @confirmDialog="handleAddConfirm" @closeDialog="handleClose">
<!-- <div class="d2-container-content"> -->
<!-- :before-search-fn="beforeSearchFn" -->
<d2-table ref="recordTable" :search-form="searchFormSearch" :get-list-api="getListApi" :table-params="tableParams">
<div slot="other" slot-scope="scope">
<div class="online-status">
<span class="dot"
:style="{ background: LEARN_PROGRESS_OPTIONS.find(item => item.id === scope.scope.status).backgroundColor }"></span>
{{LEARN_PROGRESS_OPTIONS.find(item => item.id === scope.scope.status).label}}
</div>
</div>
</d2-table>
<!-- </div> -->
</d2-dialog>
</template>
<script>
import { deepClone } from "@/common/util"
import { LEARN_PROGRESS_OPTIONS } from "../constant"
import { coursePage, contentManagerTaskPage, contentManagerTaskCourseList } from "@/api/contentManager"
export default {
name: "listOfPenaltiesDialog",
props: {
detailInfo: {
type: Object,
require: true
},
dialogVisible: {
type: Boolean,
default: false
}
},
data() {
return {
LEARN_PROGRESS_OPTIONS,
getListApi: coursePage,
searchFormSearch: {
staffStudyId: '',
},
tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// singleSelectUniqueKey: 'id',
tableOption: false,
tableColumns: [
// {
// label: "序号",
// addHtml: "num",
// width: '100'
// },
{
label: '课程名称',
prop: 'courseName',
},
{
label: "学习进度",
prop: "other",
addHtml: "other",
width: '150'
},
]
},
// getListApi: getAllMerchantList,
}
},
computed: {
show: {
get() {
return this.dialogVisible
},
set(val) {
this.$emit("update:dialogVisible", val)
}
}
},
mounted() {
this.searchFormSearch.staffStudyId = this.detailInfo.id
// this.getList()
},
methods: {
handleAddConfirm() {
this.show = false
},
handleClose() {
// this.$emit("closeDialogFn")
this.show = false
}
}
}
</script>
<style scoped lang="scss">
.online-status {
display: flex;
justify-content: center;
align-items: center;
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
.gray {
background-color: #c5c5c5;
}
.orange {
background-color: #fdb757;
}
.blue {
background-color: #2a58ad;
}
}
</style>