zydx-plus 1.32.217 → 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.217",
3
+ "version": "1.32.218",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -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"],
@@ -182,3 +182,26 @@ input[name='check'] {
182
182
  line-height: 26px;
183
183
  text-indent: 2em;
184
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,6 @@
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 v-if="collapse" class="but" :class="{'buts-actives': !item.open}" @click="openOption(index)">{{ item.open?'收起选项':'展开选项'}}</button>
16
15
  <button class="but" @click="replaceTap(item,index)" :class="{'buts-actives': item.replace}">{{ replaceText }}</button>
17
16
  </b>
18
17
  <b :style="{right: -item.right + 'px', top: item.top + 'px'}" v-if="choice" ref="b">
@@ -23,6 +22,10 @@
23
22
  {{ choiceState? '选择题目' : item.choice?'撤销选择': '选择题目' }}
24
23
  </button>
25
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>
26
29
  </i>
27
30
  </span>
28
31
  </div>
@@ -41,6 +44,25 @@
41
44
  </label>
42
45
  </div>
43
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>
44
66
  </div>
45
67
  </div>
46
68
  </div>
@@ -118,7 +140,7 @@ export default {
118
140
  item.right = 0
119
141
  item.top = 0
120
142
  item.open = true
121
- item.replace = false
143
+ item.replace = true
122
144
  if(item.alist) {
123
145
  item.alist.map(x => {
124
146
  x.annexContent = json2html({node: "root",child: JSON.parse(x.annexContent)})
@@ -175,6 +197,9 @@ export default {
175
197
  openOption(i) {
176
198
  this.data[i].open = !this.data[i].open
177
199
  },
200
+ statistics(i) {
201
+ this.data[i].replace = !this.data[i].replace
202
+ },
178
203
  answerChange(e,v,id) {
179
204
  let answerArr = []
180
205
  const ids = document.getElementsByName(id)
@@ -218,8 +243,6 @@ export default {
218
243
  this.$emit('replaceData', {
219
244
  data: v,
220
245
  index: i
221
- }, (e) => {
222
- this.data[i].replace = e
223
246
  })
224
247
  },
225
248
  choiceTap(v,i) {
package/src/index.js CHANGED
@@ -79,7 +79,7 @@ function install(app) {
79
79
  }
80
80
 
81
81
  export default {
82
- version: '1.32.217',
82
+ version: '1.32.218',
83
83
  install,
84
84
  Calendar,
85
85
  Message,