zydx-plus 1.30.171 → 1.30.172
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
<template>
|
|
16
16
|
<div class="headLevel">
|
|
17
|
-
<div v-for="(item, index) in nodeList" :key="index" class="borderBottom1cccccc padding0_10 box_sizing_border_box">
|
|
17
|
+
<div v-for="(item, index) in nodeList" :key="index" class="borderBottom1cccccc padding0_10 box_sizing_border_box" v-show="getShow(item)">
|
|
18
18
|
<zydx-topic-dry>
|
|
19
19
|
<template v-slot:title_slot><span class="fontSize16" :class="'level'+item.level">{{item.name}}</span></template>
|
|
20
20
|
<template v-slot:button_slot v-if="isShowBtn">
|
|
@@ -152,6 +152,14 @@ export default {
|
|
|
152
152
|
}
|
|
153
153
|
},
|
|
154
154
|
methods: {
|
|
155
|
+
getShow(item) {
|
|
156
|
+
if (this.headerType === 2 && (this.actionId == 'action_notes' || this.actionId == 'action_lesson013' || this.actionId == 'action_lesson055' || this.actionId == 'action_lesson056')) {
|
|
157
|
+
if (!item.children || item.children.length == 0) {
|
|
158
|
+
return false
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return true;
|
|
162
|
+
},
|
|
155
163
|
// 选择节点
|
|
156
164
|
selectNode: function (node) {
|
|
157
165
|
this.nodeList = []
|
|
@@ -4,25 +4,23 @@
|
|
|
4
4
|
*/
|
|
5
5
|
<template>
|
|
6
6
|
<div class="lesson_template_main_div">
|
|
7
|
-
<
|
|
8
|
-
<div
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
<div
|
|
15
|
-
|
|
16
|
-
<div class="
|
|
17
|
-
<div class="x_style">+</div>
|
|
18
|
-
</div>
|
|
7
|
+
<div v-if="topText !== ''" class="title_box display_flex">
|
|
8
|
+
<div class="title_box_text">{{topText}}</div>
|
|
9
|
+
<div class="z-button" @click="clearSelectAction" v-if="!readonly">清空已选</div>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="main_center_div" :class="!readonly?'select_margin':''">
|
|
12
|
+
<template v-if="selectActionSort.length != 0">
|
|
13
|
+
<div v-for="(item, index) in selectActionSort" @click="cancel(item)" :key="index" :class="getClasses">
|
|
14
|
+
<div class="width70">{{item[viewName]}}</div>
|
|
15
|
+
<div class="display_flex flex_center" v-if="!readonly">
|
|
16
|
+
<div class="x_style">+</div>
|
|
19
17
|
</div>
|
|
20
|
-
</
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</
|
|
25
|
-
</
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
<template v-else>
|
|
21
|
+
<div class="tip_text">暂未添加{{tipText}},现在添加吧...</div>
|
|
22
|
+
</template>
|
|
23
|
+
</div>
|
|
26
24
|
<div v-if="allText !== ''" class="title_box">{{allText}}</div>
|
|
27
25
|
<div class="main_center_div">
|
|
28
26
|
<div v-for="(item, index) in dataList" :key="index" class="item_div all_item width70" :class="isIncludeItem(item)? '' : 'select_item'" @click="save(item)" >{{item[viewName]}}</div>
|
|
@@ -32,186 +30,205 @@
|
|
|
32
30
|
</template>
|
|
33
31
|
|
|
34
32
|
<script>
|
|
35
|
-
export default {
|
|
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
|
-
|
|
33
|
+
export default {
|
|
34
|
+
name: 'zydx-lesson-template',
|
|
35
|
+
model: {
|
|
36
|
+
prop: "selectDataList",
|
|
37
|
+
event: "update:modelValue"
|
|
38
|
+
},
|
|
39
|
+
props: {
|
|
40
|
+
selectDataList: {
|
|
41
|
+
type: Array,
|
|
42
|
+
default: () => []
|
|
43
|
+
},
|
|
44
|
+
dataList: {
|
|
45
|
+
type: Array,
|
|
46
|
+
default: () => []
|
|
47
|
+
},
|
|
48
|
+
topText: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: ''
|
|
51
|
+
},
|
|
52
|
+
allText: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: ''
|
|
55
|
+
},
|
|
56
|
+
sortName: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: ''
|
|
59
|
+
},
|
|
60
|
+
viewName: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: ''
|
|
63
|
+
},
|
|
64
|
+
tipText: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: ''
|
|
67
|
+
},
|
|
68
|
+
readonly: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: false
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
computed: {
|
|
74
|
+
getClasses() {
|
|
75
|
+
let arr = []
|
|
76
|
+
if (this.readonly) {
|
|
77
|
+
arr.push("item_div");
|
|
78
|
+
arr.push("all_item");
|
|
79
|
+
arr.push("width70");
|
|
80
|
+
arr.push("display_flex")
|
|
81
|
+
|
|
82
|
+
} else {
|
|
83
|
+
arr.push("item_div");
|
|
84
|
+
arr.push("select_item_margin");
|
|
85
|
+
arr.push("display_flex")
|
|
86
|
+
}
|
|
87
|
+
return arr;
|
|
88
|
+
},
|
|
89
|
+
selectActionSort () {
|
|
90
|
+
let _that = this
|
|
91
|
+
if (this.sortName != '' && this.selectAction.length != 0) {
|
|
92
|
+
return _that.selectAction.sort(function(a, b){
|
|
93
|
+
return parseInt(a[_that.sortName]) > parseInt(b[_that.sortName]) ? 1: -1
|
|
94
|
+
})
|
|
95
|
+
}
|
|
96
|
+
return this.selectAction;
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
data () {
|
|
100
|
+
return {
|
|
101
|
+
selectAction: this.selectDataList
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
watch: {
|
|
105
|
+
selectActionSort: {
|
|
106
|
+
deep: true,
|
|
107
|
+
handler(newValue) {
|
|
108
|
+
this.$emit('update:modelValue', this.selectAction)
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
methods: {
|
|
113
|
+
cancel (param) {
|
|
114
|
+
if (this.readonly) {
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
this.selectAction.splice(this.selectAction.indexOf(param),1)
|
|
118
|
+
},
|
|
119
|
+
save (param) {
|
|
120
|
+
if (!this.readonly && this.isIncludeItem(param)) {
|
|
121
|
+
this.selectAction.push(param)
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
clearSelectAction () {
|
|
125
|
+
this.selectAction = []
|
|
126
|
+
},
|
|
127
|
+
isIncludeItem (item) {
|
|
128
|
+
// if (this.readonly) {
|
|
129
|
+
// return true;
|
|
130
|
+
// }
|
|
131
|
+
return JSON.stringify(this.selectDataList).indexOf(JSON.stringify(item)) === -1;
|
|
132
|
+
}
|
|
82
133
|
}
|
|
83
|
-
return this.selectAction;
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
data () {
|
|
87
|
-
return {
|
|
88
|
-
selectAction: this.selectDataList
|
|
89
134
|
}
|
|
90
|
-
},
|
|
91
|
-
watch: {
|
|
92
|
-
selectActionSort: {
|
|
93
|
-
deep: true,
|
|
94
|
-
handler(newValue) {
|
|
95
|
-
this.$emit('update:modelValue', this.selectAction)
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
methods: {
|
|
100
|
-
cancel (param) {
|
|
101
|
-
this.selectAction.splice(this.selectAction.indexOf(param),1)
|
|
102
|
-
},
|
|
103
|
-
save (param) {
|
|
104
|
-
if (!this.readonly && this.isIncludeItem(param)) {
|
|
105
|
-
this.selectAction.push(param)
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
clearSelectAction () {
|
|
109
|
-
this.selectAction = []
|
|
110
|
-
},
|
|
111
|
-
isIncludeItem (item) {
|
|
112
|
-
if (this.readonly) {
|
|
113
|
-
return true;
|
|
114
|
-
}
|
|
115
|
-
return JSON.stringify(this.selectDataList).indexOf(JSON.stringify(item)) === -1;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
135
|
</script>
|
|
120
136
|
|
|
121
137
|
<style scoped>
|
|
122
|
-
.lesson_template_main_div {
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
.select_margin {
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.main_center_div {
|
|
130
|
-
width: 922px;
|
|
131
|
-
display: flex;
|
|
132
|
-
padding: 7px 4px;
|
|
133
|
-
flex-direction: row;
|
|
134
|
-
align-content: center;
|
|
135
|
-
box-sizing: border-box;
|
|
136
|
-
border: 1px solid #cccccc;
|
|
137
|
-
flex-wrap: wrap;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.item_div {
|
|
141
|
-
box-sizing: border-box;
|
|
142
|
-
border: 1px solid rgba(204, 204, 204, 1);
|
|
143
|
-
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.2);
|
|
144
|
-
cursor: pointer;
|
|
145
|
-
border-radius: 2px;
|
|
146
|
-
height: 32px;
|
|
147
|
-
line-height: 32px;
|
|
148
|
-
border: 1px solid #cccccc;
|
|
149
|
-
text-align: center;
|
|
150
|
-
}
|
|
151
|
-
.display_flex {
|
|
152
|
-
display: flex;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.select_item_margin {
|
|
156
|
-
width: 86px;
|
|
157
|
-
margin: 3px 5px 3px 0px;
|
|
138
|
+
.lesson_template_main_div {
|
|
139
|
+
width: 100%;
|
|
140
|
+
}
|
|
141
|
+
.select_margin {
|
|
142
|
+
padding: 10px 2px 10px 7px !important;
|
|
143
|
+
}
|
|
158
144
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
145
|
+
.main_center_div {
|
|
146
|
+
width: 923px;
|
|
147
|
+
box-sizing: border-box;
|
|
148
|
+
display: flex;
|
|
149
|
+
padding: 7px 4px;
|
|
150
|
+
flex-direction: row;
|
|
151
|
+
align-content: center;
|
|
152
|
+
border: 1px solid #cccccc;
|
|
153
|
+
flex-wrap: wrap;
|
|
154
|
+
}
|
|
164
155
|
|
|
165
|
-
.
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
156
|
+
.item_div {
|
|
157
|
+
box-sizing: border-box;
|
|
158
|
+
border: 1px solid rgba(204, 204, 204, 1);
|
|
159
|
+
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.2);
|
|
160
|
+
cursor: pointer;
|
|
161
|
+
border-radius: 2px;
|
|
162
|
+
height: 32px;
|
|
163
|
+
line-height: 32px;
|
|
164
|
+
border: 1px solid #cccccc;
|
|
165
|
+
text-align: center;
|
|
166
|
+
}
|
|
167
|
+
.display_flex {
|
|
168
|
+
display: flex;
|
|
169
|
+
}
|
|
170
170
|
|
|
171
|
-
.
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
171
|
+
.select_item_margin {
|
|
172
|
+
width: 86px;
|
|
173
|
+
margin: 3px 5px 3px 0px;
|
|
174
|
+
}
|
|
175
|
+
.width86 {
|
|
176
|
+
width: 86px;
|
|
177
|
+
}
|
|
178
|
+
.all_item {
|
|
179
|
+
width: 70px;
|
|
180
|
+
margin: 3px;
|
|
181
|
+
}
|
|
177
182
|
|
|
183
|
+
.width70 {
|
|
184
|
+
width: 70px;
|
|
185
|
+
font-size: 14px;
|
|
186
|
+
font-weight: 400;
|
|
187
|
+
box-sizing: border-box;
|
|
188
|
+
}
|
|
178
189
|
|
|
190
|
+
.title_box {
|
|
191
|
+
font-size: 16px;
|
|
192
|
+
font-weight: 400;
|
|
193
|
+
width: 923px;
|
|
194
|
+
margin: 5px 0px;
|
|
179
195
|
|
|
196
|
+
}
|
|
180
197
|
|
|
181
|
-
.select_item {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
198
|
+
.select_item {
|
|
199
|
+
background: rgba(255, 255, 255, 1);
|
|
200
|
+
color: #cccccc;
|
|
201
|
+
}
|
|
185
202
|
|
|
186
|
-
.tip_text {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
.z-button {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
203
|
+
.tip_text {
|
|
204
|
+
font-size: 16px;
|
|
205
|
+
font-weight: 400;
|
|
206
|
+
color: rgba(0, 0, 0, 0.6);
|
|
207
|
+
text-align: center;
|
|
208
|
+
width: 100%;
|
|
209
|
+
}
|
|
210
|
+
.z-button {
|
|
211
|
+
margin: 1px;
|
|
212
|
+
width: auto;
|
|
213
|
+
min-width: 60px;
|
|
214
|
+
max-width: 60px;
|
|
215
|
+
text-overflow: ellipsis;
|
|
216
|
+
white-space: nowrap;
|
|
217
|
+
overflow: hidden;
|
|
218
|
+
height: 20px;
|
|
219
|
+
background-color: #FFFFFF;
|
|
220
|
+
color: #000000;
|
|
221
|
+
border: #000000 1px solid;
|
|
222
|
+
line-height: 18px;
|
|
223
|
+
border-radius: 3px;
|
|
224
|
+
font-size: 12px !important;
|
|
225
|
+
letter-spacing: 0px !important;
|
|
226
|
+
text-align: center;
|
|
227
|
+
cursor: pointer;
|
|
228
|
+
padding: 0 5px;
|
|
229
|
+
font-weight: normal;
|
|
230
|
+
box-sizing: border-box;
|
|
231
|
+
}
|
|
215
232
|
.flex_center {
|
|
216
233
|
display: flex;
|
|
217
234
|
justify-content: center;
|
|
@@ -223,4 +240,9 @@ export default {
|
|
|
223
240
|
line-height: 8px;
|
|
224
241
|
width: 8px;
|
|
225
242
|
}
|
|
243
|
+
.title_box_text {
|
|
244
|
+
width: 100%;
|
|
245
|
+
padding-left: 60px;
|
|
246
|
+
box-sizing: border-box;
|
|
247
|
+
}
|
|
226
248
|
</style>
|
|
@@ -52,7 +52,7 @@ export default {
|
|
|
52
52
|
},
|
|
53
53
|
multiple: {
|
|
54
54
|
type: Boolean,
|
|
55
|
-
default:
|
|
55
|
+
default: true
|
|
56
56
|
},
|
|
57
57
|
borderShow: {
|
|
58
58
|
type: Boolean,
|
|
@@ -73,6 +73,7 @@ export default {
|
|
|
73
73
|
deep: true
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
|
+
emits: ['change','modify','del'],
|
|
76
77
|
methods: {
|
|
77
78
|
checkboxChange(e,index) {
|
|
78
79
|
this.$emit('change', {
|