zydx-plus 1.32.216 → 1.32.218

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.32.216",
3
+ "version": "1.32.218",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -210,7 +210,7 @@ export default defineComponent({
210
210
  position: absolute;
211
211
  top: 50%;
212
212
  right: 5px;
213
- transform: translateY(-30%);
213
+ transform: translateY(-40%);
214
214
  background: transparent;
215
215
  }
216
216
 
@@ -21,7 +21,7 @@
21
21
  <button class="but-brown" :disabled="page === 0" :class="{'but-act': page === 0}" @click="last">上一页</button>
22
22
  <button class="but-brown" :disabled="page === htmlArr.length - 1" :class="{'but-act': page === htmlArr.length - 1}" @click="next">下一页</button>
23
23
  </div>
24
- <div class="right-menu" :style="rightStyle" v-if="rightMenuShow">
24
+ <div class="right-menu" :style="rightStyle" v-if="rightMenuShow&&!readOnlys">
25
25
  <span @click="annotations">批注</span>
26
26
  </div>
27
27
  </div>
@@ -36,7 +36,7 @@
36
36
  <span>{{ teacher }}</span>
37
37
  <em>{{ item.time === '' ? '' : '(' + item.time + ')' }}</em>
38
38
  </div>
39
- <div class="list-right">
39
+ <div class="list-right" v-if="!readOnlys">
40
40
  <button v-if="item.readable" class="but" @click.stop="preservation(item.id,index)">保存批注</button>
41
41
  <button v-if="item.readable" class="but" @click.stop="cancel(item.id,index)">取消批注</button>
42
42
  <button v-if="!item.readable" class="but" @click.stop="modify(index)">修改批注</button>
@@ -81,7 +81,8 @@ export default {
81
81
  linkData: [],
82
82
  htmlArr: [],
83
83
  page: 0,
84
- dataID: []
84
+ dataID: [],
85
+ readOnlys: false
85
86
  }
86
87
  },
87
88
  props: {
@@ -95,6 +96,10 @@ export default {
95
96
  teacher: {
96
97
  type: String,
97
98
  default: ''
99
+ },
100
+ readOnly: {
101
+ type: Boolean,
102
+ default: false
98
103
  }
99
104
  },
100
105
  watch: {
@@ -110,6 +115,13 @@ export default {
110
115
  })
111
116
  },
112
117
  immediate: true
118
+ },
119
+ readOnly: {
120
+ handler(val) {
121
+ this.readOnlys = val
122
+ },
123
+ deep: true,
124
+ immediate: true
113
125
  }
114
126
  },
115
127
  emits: ["del","preservation"],
@@ -147,6 +147,9 @@
147
147
  min-width: 60px;
148
148
  height: 21px;
149
149
  }
150
+ .buts-actives{
151
+ color: #00ff00 !important;
152
+ }
150
153
  input[name='check'] {
151
154
  width: 15px;
152
155
  height: 15px;
@@ -179,3 +182,26 @@ input[name='check'] {
179
182
  line-height: 26px;
180
183
  text-indent: 2em;
181
184
  }
185
+ .table{
186
+ width: 100%;
187
+ margin: 5px 0;
188
+ }
189
+ .table table{
190
+ width: 100%;
191
+ border-left: 1px solid #ccc;
192
+ border-top: 1px solid #ccc;
193
+ }
194
+ .table table td{
195
+ line-height: 30px;
196
+ font-weight: normal;
197
+ text-align: center;
198
+ border-bottom: 1px solid #ccc;
199
+ border-right: 1px solid #ccc;
200
+ font-size: 14px;
201
+ }
202
+ .table table td:first-child{
203
+ width: 110px;
204
+ }
205
+ .tab-title{
206
+ font-weight: 700 !important;
207
+ }
@@ -12,7 +12,7 @@
12
12
  <button class="but" @click="del(item)">删除</button>
13
13
  </b>
14
14
  <b :style="{right: -item.right + 'px', top: item.top + 'px'}" v-if="replace" ref="b">
15
- <button class="but" @click="replaceTap(item,index)">{{ replaceText }}</button>
15
+ <button class="but" @click="replaceTap(item,index)" :class="{'buts-actives': item.replace}">{{ replaceText }}</button>
16
16
  </b>
17
17
  <b :style="{right: -item.right + 'px', top: item.top + 'px'}" v-if="choice" ref="b">
18
18
  <button class="but"
@@ -22,24 +22,47 @@
22
22
  {{ choiceState? '选择题目' : item.choice?'撤销选择': '选择题目' }}
23
23
  </button>
24
24
  </b>
25
+ <b :style="{right: -item.right + 'px', top: item.top + 'px'}" v-if="collapse" ref="b">
26
+ <button class="but" :class="{'buts-actives': item.open}" @click="openOption(index)">{{ item.open?'收起选项':'试题选项'}}</button>
27
+ <button class="but" :class="{'buts-actives': item.replace}" @click="statistics(index)">{{ item.replace?'收统计表':'统计表'}}</button>
28
+ </b>
25
29
  </i>
26
30
  </span>
27
31
  </div>
28
32
  </div>
29
- <div v-if="item.alist" class="subject-html">
30
- <div v-for="(item,index) in item.alist">
31
- <div class="subject-html-title">{{ titleText }}{{ index + 1 }}</div>
32
- <div class="subject-html-cont" v-html="item.annexContent"></div>
33
+ <div v-if="item.alist" class="subject-html" v-show="item.open">
34
+ <div v-for="(it,ind) in item.alist">
35
+ <div class="subject-html-title">{{ titleText }}{{ ind + 1 }}</div>
36
+ <div class="subject-html-cont" v-html="it.annexContent"></div>
33
37
  </div>
34
38
  </div>
35
- <div class="choice" v-if="item.testKey">
39
+ <div class="choice" v-if="item.testKey" v-show="item.open">
36
40
  <div class="choice-box" v-for="(ts,ind) in item.testKey">
37
41
  <label>
38
- <input class="choice-input" :disabled="disabled" :checked="ts.checked" @change="answerChange($event,item,index)" :type="ques(item.quesType)?'radio':'checkbox'" :name="index" />
39
- <span class="choice-span">{{ ts.index }}. {{ ts.content[0] }}</span>
42
+ <input class="choice-input" v-if="chooseAnswer" :disabled="disabled" :checked="ts.checked" @change="answerChange($event,item,index)" :type="ques(item.quesType)?'radio':'checkbox'" :name="index" />
43
+ <span :class="{'choice-span': chooseAnswer}">{{ ts.index }}. {{ ts.content[0] }}</span>
40
44
  </label>
41
45
  </div>
42
46
  </div>
47
+ <div class="table" v-if="item.replace&&item.itemList&&collapse">
48
+ <table border="0" cellspacing="0" cellpadding="0">
49
+ <tr>
50
+ <td :colspan="item.itemList.length + 1" class="tab-title">选项分布情况统计表</td>
51
+ </tr>
52
+ <tr>
53
+ <td>选&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;项</td>
54
+ <td v-for="(ts,ind) in item.itemList">{{ ts.itemName }}</td>
55
+ </tr>
56
+ <tr>
57
+ <td>选择人数</td>
58
+ <td v-for="(ts,ind) in item.itemList">{{ ts.count }}人</td>
59
+ </tr>
60
+ <tr>
61
+ <td>占&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;比</td>
62
+ <td v-for="(ts,ind) in item.itemList">{{ ts.percentage === null? 0: ts.percentage}}%</td>
63
+ </tr>
64
+ </table>
65
+ </div>
43
66
  </div>
44
67
  </div>
45
68
  </div>
@@ -54,7 +77,8 @@ export default {
54
77
  value: [],
55
78
  multipleShow: this.multiple,
56
79
  choiceState: true,
57
- replaceShow: this.replace
80
+ replaceShow: this.replace,
81
+ replaceOpen: false
58
82
  }
59
83
  },
60
84
  props: {
@@ -98,6 +122,14 @@ export default {
98
122
  type: String,
99
123
  default: '替换题目'
100
124
  },
125
+ collapse: {
126
+ type: Boolean,
127
+ default: false
128
+ },
129
+ chooseAnswer: {
130
+ type: Boolean,
131
+ default: true
132
+ }
101
133
  },
102
134
  watch: {
103
135
  data: {
@@ -107,6 +139,8 @@ export default {
107
139
  item.choice = true
108
140
  item.right = 0
109
141
  item.top = 0
142
+ item.open = true
143
+ item.replace = true
110
144
  if(item.alist) {
111
145
  item.alist.map(x => {
112
146
  x.annexContent = json2html({node: "root",child: JSON.parse(x.annexContent)})
@@ -160,6 +194,12 @@ export default {
160
194
  },
161
195
  emits: ['change','modify','del','changeAll','replaceData','choiceData','judgeAnswer'],
162
196
  methods: {
197
+ openOption(i) {
198
+ this.data[i].open = !this.data[i].open
199
+ },
200
+ statistics(i) {
201
+ this.data[i].replace = !this.data[i].replace
202
+ },
163
203
  answerChange(e,v,id) {
164
204
  let answerArr = []
165
205
  const ids = document.getElementsByName(id)
package/src/index.js CHANGED
@@ -79,7 +79,7 @@ function install(app) {
79
79
  }
80
80
 
81
81
  export default {
82
- version: '1.32.216',
82
+ version: '1.32.218',
83
83
  install,
84
84
  Calendar,
85
85
  Message,