zydx-plus 1.30.171 → 1.30.173

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.30.171",
3
+ "version": "1.30.173",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -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
- <template v-if="!readonly">
8
- <div v-if="topText !== ''" class="title_box display_flex">
9
- <div style="width: 100%">{{topText}}</div>
10
- <div class="z-button" @click="clearSelectAction">清空已选</div>
11
- </div>
12
- <div class="main_center_div select_margin">
13
- <template v-if="selectActionSort.length != 0">
14
- <div v-for="(item, index) in selectActionSort" @click="cancel(item)" :key="index" class="item_div select_item_margin display_flex">
15
- <div class="width70">{{item[viewName]}}</div>
16
- <div class="display_flex flex_center">
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
- </template>
21
- <template v-else>
22
- <div class="tip_text">暂未添加{{tipText}},现在添加吧...</div>
23
- </template>
24
- </div>
25
- </template>
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
- name: 'zydx-lesson-template',
37
- model: {
38
- prop: "selectDataList",
39
- event: "update:modelValue"
40
- },
41
- props: {
42
- selectDataList: {
43
- type: Array,
44
- default: () => []
45
- },
46
- dataList: {
47
- type: Array,
48
- default: () => []
49
- },
50
- topText: {
51
- type: String,
52
- default: ''
53
- },
54
- allText: {
55
- type: String,
56
- default: ''
57
- },
58
- sortName: {
59
- type: String,
60
- default: ''
61
- },
62
- viewName: {
63
- type: String,
64
- default: ''
65
- },
66
- tipText: {
67
- type: String,
68
- default: ''
69
- },
70
- readonly: {
71
- type: Boolean,
72
- default: false
73
- },
74
- },
75
- computed: {
76
- selectActionSort () {
77
- let _that = this
78
- if (this.sortName != '' && this.selectAction.length != 0) {
79
- return _that.selectAction.sort(function(a, b){
80
- return parseInt(a[_that.sortName]) > parseInt(b[_that.sortName]) ? 1: -1
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
- width: 100%;
124
- }
125
- .select_margin {
126
- padding: 10px 2px 10px 7px !important;
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
- .all_item {
161
- width: 70px;
162
- margin: 3px;
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
- .width70 {
166
- width: 70px;
167
- font-size: 14px;
168
- font-weight: 400;
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
- .title_box {
172
- font-size: 16px;
173
- font-weight: 400;
174
- width: 100%;
175
- margin: 5px 0px;
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
- background: rgba(255, 255, 255, 1);
183
- color: #cccccc;
184
- }
198
+ .select_item {
199
+ background: rgba(255, 255, 255, 1);
200
+ color: #cccccc;
201
+ }
185
202
 
186
- .tip_text {
187
- font-size: 16px;
188
- font-weight: 400;
189
- color: rgba(0, 0, 0, 0.6);
190
- text-align: center;
191
- width: 100%;
192
- }
193
- .z-button {
194
- margin: 1px;
195
- width: auto;
196
- min-width: 60px;
197
- max-width: 60px;
198
- text-overflow: ellipsis;
199
- white-space: nowrap;
200
- overflow: hidden;
201
- height: 20px;
202
- background-color: #FFFFFF;
203
- color: #000000;
204
- border: #000000 1px solid;
205
- line-height: 18px;
206
- border-radius: 3px;
207
- font-size: 12px !important;
208
- letter-spacing: 0px !important;
209
- text-align: center;
210
- cursor: pointer;
211
- padding: 0 5px;
212
- font-weight: normal;
213
- box-sizing: border-box;
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>
@@ -88,7 +88,6 @@
88
88
  }
89
89
  .subject-title{
90
90
  flex: 1;
91
- text-indent: 2em;
92
91
  }
93
92
  .subject-title label{
94
93
  display: flex;
@@ -3,9 +3,9 @@
3
3
  <div class="parer-cont" ref="parer">
4
4
  <div class="paper-choice" :class="{'array-ch': !styleText(item.testKey)}" v-for="(item,index) in data">
5
5
  <div class="subject">
6
- <div class="subject-title">
6
+ <div class="subject-title" :style="{'text-indent': multipleShow? '0em': '2em'}">
7
7
  <label>
8
- <input v-if="multipleShow" type="checkbox" @change="checkboxChange($event,index)" name="check" />
8
+ <input v-if="multipleShow" type="checkbox" :checked="item.checked" @change="checkboxChange($event,index)" name="check" />
9
9
  <span>{{ item.order }}.<em v-html="item.title"></em></span>
10
10
  </label>
11
11
  </div>
@@ -57,6 +57,14 @@ export default {
57
57
  borderShow: {
58
58
  type: Boolean,
59
59
  default: true
60
+ },
61
+ selected: {
62
+ type: Array,
63
+ default: []
64
+ },
65
+ selectedID: {
66
+ type: String,
67
+ default: ''
60
68
  }
61
69
  },
62
70
  watch: {
@@ -71,8 +79,22 @@ export default {
71
79
  this.multipleShow = val
72
80
  },
73
81
  deep: true
74
- }
82
+ },
83
+ selected: {
84
+ handler: function (val, oldVal) {
85
+ if(val.length > 0) {
86
+ this.value.map(x => {
87
+ val.forEach(v => {
88
+ if(this.selectedID === '') return
89
+ if(x[this.selectedID] === v[this.selectedID]) x.checked = true
90
+ })
91
+ })
92
+ }
93
+ },
94
+ immediate: true
95
+ },
75
96
  },
97
+ emits: ['change','modify','del'],
76
98
  methods: {
77
99
  checkboxChange(e,index) {
78
100
  this.$emit('change', {
package/src/index.js CHANGED
@@ -73,7 +73,7 @@ function install(app) {
73
73
  }
74
74
 
75
75
  export default {
76
- version: '1.30.171',
76
+ version: '1.30.173',
77
77
  install,
78
78
  Calendar,
79
79
  Message,