zydx-plus 1.35.472 → 1.35.474

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.35.472",
3
+ "version": "1.35.474",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -22,14 +22,14 @@
22
22
  <template v-if="buttonInfo instanceof Object" v-for="(childButtonInfo, childButtonIndex) in buttonInfo">
23
23
  <!-- 在课上渲染的 -->
24
24
  <button class="defaultButton"
25
- :class="childButtonIndex === getSelectBtnIndex && selectItem.level === item.level? 'active theme-text' : ''"
25
+ :class="{'active theme-text' : (childButtonIndex === getSelectBtnIndex && selectItem.level === item.level) && (headerType === 2 && isHasDemandContent && childButtonIndex === 'demand' || headerType === 2 && childButtonIndex !== 'demand' || headerType !== 2), 'defaultDisableButton': headerType === 2 && !isHasDemandContent && childButtonIndex === 'demand' }"
26
26
  v-if="item.level === 0 && buttonIndex === 'headLevel' && childButtonIndex !== 'default'"
27
27
  @click="clickRightBtn(item, childButtonIndex, childButtonInfo)"
28
28
  v-html="childButtonInfo"
29
29
  />
30
30
  <!-- 单独在最低节点设置的按钮 -->
31
31
  <button :ref="childButtonIndex + item.catalogId" class="defaultButton"
32
- :class="childButtonIndex === getSelectBtnIndex && selectItem.level === item.level? 'active theme-text' : ''"
32
+ :class="{'active theme-text' : childButtonIndex === getSelectBtnIndex && selectItem.level === item.level && (isHasResContent && childButtonIndex === 'viewResource' || childButtonIndex !== 'viewResource'), 'defaultDisableButton': !isHasResContent && childButtonIndex === 'viewResource'}"
33
33
  v-if="item.level !== 0 && (!item.children || item.children.length === 0) && buttonIndex === 'lowLevel' && childButtonIndex !== 'default' && (tabType === 2 && childButtonIndex !=='analysis' || tabType === 0)"
34
34
  @click="clickRightBtn(item, childButtonIndex, childButtonInfo)"
35
35
  v-html="childButtonInfo"
@@ -102,6 +102,14 @@ export default {
102
102
  headerType: {
103
103
  type: Number,
104
104
  required: true
105
+ },
106
+ isHasDemandContent: { // 学生端要求是否有内容
107
+ type: Boolean,
108
+ default: true
109
+ },
110
+ isHasResContent: { // 教师端-演示阅读、教学互动-模块最低节点资源列表是否有内容
111
+ type: Boolean,
112
+ default: true
105
113
  }
106
114
  },
107
115
  data() {
@@ -243,7 +251,24 @@ export default {
243
251
  margin: 1px;
244
252
  box-sizing: border-box;
245
253
  }
246
-
254
+ .defaultDisableButton {
255
+ width: auto;
256
+ min-width: 60px;
257
+ height: 20px;
258
+ font-size: 12px;
259
+ line-height: 20px;
260
+ color: #717171;
261
+ border: #717171 1px solid;
262
+ border-radius: 3px;
263
+ text-align: center;
264
+ cursor: pointer;
265
+ background-color: #fff;
266
+ user-select: none;
267
+ margin: 1px;
268
+ box-sizing: border-box;
269
+ pointer-events: none;
270
+ /*禁止点击*/
271
+ }
247
272
  .active{
248
273
  /* color: rgba(0, 255, 0, 1) !important; */
249
274
  }
@@ -43,9 +43,9 @@ export function butJson(editor, data) {
43
43
  <p data-signid="subject" style="text-align: center;margin: 80px 0 60px"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);line-height: 1;">请在此处输入标题</span></strong></p>
44
44
  <p data-signid="lookUp"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入抬头:</span></strong></p>
45
45
  <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
46
- <p data-signid="title-1" class="title indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p>
46
+ <p data-signid="title-1" class="title ${randomId()} indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p>
47
47
  <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
48
- <p data-signid="title-2" class="title indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>
48
+ <p data-signid="title-2" class="title ${randomId()} indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>
49
49
  <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
50
50
  <p data-signid="paragraph" style="margin: 30px 0px 0px; text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入落款</span></strong></p>
51
51
  <p data-signid="date" style="text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入日期</span></strong></p>`
@@ -57,9 +57,9 @@ export function butJson(editor, data) {
57
57
  html: `<p data-signid="subject" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);">请在此处输入标题</span></strong></p>
58
58
  <p data-signid="author" class="author" style="text-align: center;padding-bottom: 30px;"><span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0);">请在此处输入作者/来源</span></p>
59
59
  <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
60
- <p data-signid="title-1" class="title indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p>
60
+ <p data-signid="title-1" class="title ${randomId()} indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p>
61
61
  <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
62
- <p data-signid="title-2" class="title indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>
62
+ <p data-signid="title-2" class="title ${randomId()} indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>
63
63
  <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
64
64
  <p data-signid="paragraph" style="margin: 30px 0px 0px; text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入落款</span></strong></p>
65
65
  <p data-signid="date" style="text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入日期</span></strong></p>`
@@ -73,9 +73,9 @@ export function butJson(editor, data) {
73
73
  <p data-signid="abstract" class="abstract"><strong><span style="font-size: 14px; font-family: SimSun; color: rgb(0, 0, 0)">摘要:</span></strong> <span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0)">请在此处输入摘要文本...</span></p>
74
74
  <p data-signid="keyword" class="keyword"><strong><span contenteditable="false" style="font-size: 14px; font-family: SimSun; color: rgb(0, 0, 0)">关键词:</span></strong> <span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0)"> 请在此处输入关键字...</span></p>
75
75
  <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
76
- <p data-signid="title-1" class="title indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p>
76
+ <p data-signid="title-1" class="title ${randomId()} indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p>
77
77
  <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
78
- <p data-signid="title-2" class="title indent"><strong><span style="font-size: 16px; font-family: SimH ei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>
78
+ <p data-signid="title-2" class="title ${randomId()} indent"><strong><span style="font-size: 16px; font-family: SimH ei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>
79
79
  <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本(复用格式建议直接复制粘贴段落)</span></p>
80
80
  <p data-signid="splitLine" contenteditable="false" class="paging-line">分 页 线(保存文档时线下内容另起一页)</p>
81
81
  <p data-signid="annotation" contenteditable="false" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);">注释</span></strong></p>
@@ -210,13 +210,13 @@ export function butJson(editor, data) {
210
210
  name: '一级标题',
211
211
  key: 'firstLevelHeading',
212
212
  menuKeys: [],
213
- html: `<p data-signid="title-1" class="title indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p>`
213
+ html: `<p data-signid="title-1" class="title ${randomId()} indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p>`
214
214
  },
215
215
  secondaryHeading: {
216
216
  name: '二级标题',
217
217
  key: 'secondaryHeading',
218
218
  menuKeys: [],
219
- html: `<p data-signid="title-2" class="title indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>`
219
+ html: `<p data-signid="title-2" class="title ${randomId()} indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>`
220
220
  },
221
221
  paragraphBody: {
222
222
  name: '正文文本',
@@ -470,4 +470,4 @@ function getTime() {
470
470
  let month = date.getMonth() + 1
471
471
  let day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
472
472
  return year + '年' + month + '月' + day + '日'
473
- }
473
+ }
@@ -924,10 +924,9 @@ export default {
924
924
  Authorization: localStorage.getItem("remember") === "1" ? localStorage.getItem('sessionId') : sessionStorage.getItem('sessionId')
925
925
  },
926
926
  customInsert(res, insertFn) {
927
- setTimeout(() => {
928
- console.log('uploadImage100');
929
- insertFn('http://192.168.5.213:8888' + res.data)
930
- },100)
927
+ setTimeout(() => {
928
+ insertFn('http://192.168.5.213:8888' + res.data)
929
+ },100)
931
930
  },
932
931
  onSuccess(file, res) {
933
932
  console.log('图片上传成功', file, res)
@@ -1139,6 +1138,9 @@ export default {
1139
1138
  BubbleMenu.configure({ // 气泡菜单
1140
1139
  pluginKey: 'bubbleMenu',
1141
1140
  element: document.querySelector('.menu'),
1141
+ tippyOptions:{
1142
+ placement: 'right',
1143
+ },
1142
1144
  shouldShow: ({editor, view, state, oldState, from, to}) => {
1143
1145
  _this.encIndex = state.selection.$from.parent.attrs
1144
1146
  if (_this.encIndex && _this.encIndex.titleId) {
@@ -1152,6 +1154,9 @@ export default {
1152
1154
  BubbleMenu.configure({
1153
1155
  pluginKey: 'bubbleMenuOne',
1154
1156
  element: document.querySelector('.menu-one'),
1157
+ tippyOptions:{
1158
+ placement: 'right',
1159
+ },
1155
1160
  shouldShow: ({editor, view, state, oldState, from, to}) => {
1156
1161
  let encIndex = state.selection.$from.nodeBefore?.marks
1157
1162
  if (encIndex && encIndex.length) {
@@ -1357,7 +1362,7 @@ export default {
1357
1362
  // // this.close()
1358
1363
  // })
1359
1364
  },
1360
- emits: ['confirm', 'enclosure', 'enlDownload', 'enlSee'],
1365
+ emits: ['confirm', 'enclosure', 'enlDownload', 'enlSee', 'changeOutlineMenu'],
1361
1366
  methods: {
1362
1367
  showAi() {
1363
1368
  this.isShowAi = !this.isShowAi
@@ -2125,8 +2130,11 @@ export default {
2125
2130
  this.htmlArr = []
2126
2131
  const data = this.$refs['editing-cont'].$el.childNodes[0]?.childNodes//document.querySelectorAll('.editing-cont')[0]?.childNodes[0]?.childNodes
2127
2132
  this.wit = this.$refs['read-only'].offsetWidth//document.getElementsByClassName('read-only')[0]?.offsetWidth + 20
2128
- if (this.wit > 900) this.wit = 900
2129
- let max = this.wit * 1.6 - 46
2133
+ if (this.wit > 900) {
2134
+ this.$refs['read-only'].style.width = '900px'
2135
+ this.wit = 900
2136
+ }
2137
+ let max = this.wit * 1.6 - 186
2130
2138
  let pHeight = 0
2131
2139
  let html = ''
2132
2140
  for (let i = 0; i < data.length; i++) {
@@ -2154,7 +2162,11 @@ export default {
2154
2162
  // pHeight = 0
2155
2163
  // html = ''
2156
2164
  // }
2157
- let text = data[i].offsetHeight
2165
+ let top = parseInt(getComputedStyle(data[i]).paddingTop)
2166
+ let mtop = parseInt(getComputedStyle(data[i]).marginTop)
2167
+ let Bottom = parseInt(getComputedStyle(data[i]).paddingBottom)
2168
+ let mBottom = parseInt(getComputedStyle(data[i]).marginBottom)
2169
+ let text = data[i].offsetHeight+Bottom+top+mtop+mBottom
2158
2170
  if ((pHeight + text) > max) {
2159
2171
  const {start, end, size} = this.rows(data[i], max - pHeight)
2160
2172
  let child = data[i].childNodes[0]
@@ -2565,16 +2577,15 @@ export default {
2565
2577
  }
2566
2578
  if (v === 'uploadImage') {
2567
2579
  up.customInsert(res, (data) => {
2568
- setTimeout(() => {
2569
- console.log('uploadImage100');
2570
- const cla = this.randomId()
2571
- const html = `<p class="imgCont ${cla}"><img src="${data}" alt="" /></p>`
2572
- this.editor.chain().focus().insertContentAt(this.selection(), html).run()
2573
- if (this.selection() <= 6 && this.selection() > 2) this.selectionClass2(cla)
2574
- if (this.selectionClass(cla)) {
2575
- this.editor.chain().focus().insertContentAt(this.selection(), '<p></p>').run()
2576
- }
2577
- },100)
2580
+ setTimeout(() => {
2581
+ const cla = this.randomId()
2582
+ const html = `<p class="imgCont ${cla}"><img src="${data}" alt="" /></p>`
2583
+ this.editor.chain().focus().insertContentAt(this.selection(), html).run()
2584
+ if (this.selection() <= 6 && this.selection() > 2) this.selectionClass2(cla)
2585
+ if (this.selectionClass(cla)) {
2586
+ this.editor.chain().focus().insertContentAt(this.selection(), '<p></p>').run()
2587
+ }
2588
+ }, 100)
2578
2589
  })
2579
2590
  }
2580
2591
  up.onSuccess(file, res) // 上传成功回调
@@ -2826,19 +2837,19 @@ export default {
2826
2837
  // 切换版式
2827
2838
  if (data.key === 'switchingFormat') {
2828
2839
  this.templateType = key.key
2829
- if(this.templateType === 'freeTypesetting'){
2840
+ if (this.templateType === 'freeTypesetting') {
2830
2841
 
2831
2842
  await this.changeTemplateType()
2832
2843
  }
2833
- if(this.templateType === 'officialDocumentFormat'){
2844
+ if (this.templateType === 'officialDocumentFormat') {
2834
2845
 
2835
2846
  await this.changeTemplateType()
2836
2847
  }
2837
- if(this.templateType === 'newsFormat'){
2848
+ if (this.templateType === 'newsFormat') {
2838
2849
 
2839
2850
  await this.changeTemplateType()
2840
2851
  }
2841
- if(this.templateType === 'paperFormat'){
2852
+ if (this.templateType === 'paperFormat') {
2842
2853
 
2843
2854
  await this.changeTemplateType()
2844
2855
  }
@@ -3067,7 +3078,6 @@ export default {
3067
3078
  // 红头文件
3068
3079
  if (data.key === 'redMenu') {
3069
3080
  const html = butJson(this.editor, this.menusText)[data.key].html
3070
- // console.log('menusHtml',menusHtml)
3071
3081
  // const html = menusHtml.filter(item => item.key == key.key)[0].html
3072
3082
  const r = await this.signIdData('red')
3073
3083
  if (r === -1) {
@@ -3079,11 +3089,13 @@ export default {
3079
3089
  if (data.key === 'firstLevelHeading') {
3080
3090
  const html = butJson(this.editor, this.menusText)[data.key].html
3081
3091
  this.editor.chain().focus().insertContentAt(this.selection(), html).run()
3092
+ this.$emit('changeOutlineMenu')
3082
3093
  }
3083
3094
  // 二级标题
3084
3095
  if (data.key === 'secondaryHeading') {
3085
3096
  const html = butJson(this.editor, this.menusText)[data.key].html
3086
3097
  this.editor.chain().focus().insertContentAt(this.selection(), html).run()
3098
+ this.$emit('changeOutlineMenu')
3087
3099
  }
3088
3100
  // 正文
3089
3101
  if (data.key === 'paragraphBody') {
@@ -3188,13 +3200,14 @@ export default {
3188
3200
  if (key.key === 'text') {
3189
3201
  this.editor.commands.setTitleId(key.key)
3190
3202
  this.editor.commands.unsetSignId()
3191
- this.editor.chain().focus().unsetBold().setTextAlign('left').run()
3203
+ this.editor.chain().focus().unsetBold().setFontSize('14px').setTextAlign('left').run()
3192
3204
  } else {
3193
3205
  const t = key.key.split('-')[0]
3194
3206
  this.editor.commands.setSignId(key.key)
3195
3207
  this.editor.commands.setTitleId(`${t} ${this.randomId()}`)
3196
- this.editor.chain().focus().setBold().setTextAlign('left').run()
3208
+ this.editor.chain().focus().setBold().setFontSize('16px').setTextAlign('left').run()
3197
3209
  }
3210
+ this.$emit('changeOutlineMenu')
3198
3211
  }
3199
3212
  // 对齐方式
3200
3213
  if (data.key === 'alignmentMode') {
@@ -3932,9 +3945,9 @@ export default {
3932
3945
  const json = this.editor.getJSON()
3933
3946
  let jsonData = json.content.filter(item => !(/a-/.test(item.attrs.signId)))
3934
3947
  this.editor?.commands.setContent(jsonData)
3935
- this.interpositionData.forEach((item)=>{
3936
- if(item.type!=='taggingMenu') return
3937
- index+=1
3948
+ this.interpositionData.forEach((item) => {
3949
+ if (item.type !== 'taggingMenu') return
3950
+ index += 1
3938
3951
  const t = this.signIdData('annotation')
3939
3952
  const b = this.signIdData('annotationSplitLine') // 判断是否有分页线
3940
3953
  const html = `<p contenteditable="false" data-signId="annotation" style="text-align: center;margin-bottom: 30px;"><span style="font-weight: 700;font-size: 16px;">注释:</span></p>`
@@ -3968,7 +3981,7 @@ export default {
3968
3981
  }
3969
3982
  },
3970
3983
  // 删除举例说明
3971
- delGiveExample(){
3984
+ delGiveExample() {
3972
3985
  const json = this.editor.getJSON()
3973
3986
  let jsonData = json.content.filter(item => !(/r-l/.test(item.attrs.signId)) && !(/a-/.test(item.attrs.signId)))
3974
3987
  this.editor?.commands.setContent(jsonData)
@@ -4021,6 +4034,17 @@ export default {
4021
4034
  }
4022
4035
  //赋值,这样实现的效果就是用户按下非数字不会有任何反应
4023
4036
  element.target.value = val;
4037
+ },
4038
+ goAnchors(item) {
4039
+ const element = document.querySelector(`.${item.anchors}`)
4040
+ if (element) {
4041
+ if (this.readOnly) {
4042
+ let bodys = document.querySelector(`.z-editor`)
4043
+ bodys.scrollTop = element.offsetTop
4044
+ return
4045
+ }
4046
+ element.scrollIntoView({behavior: 'smooth'});
4047
+ }
4024
4048
  }
4025
4049
  }
4026
4050
  }
@@ -4087,7 +4111,7 @@ export default {
4087
4111
  }
4088
4112
 
4089
4113
  :deep(.read-only-p p) {
4090
- line-height: 24px;
4114
+ line-height: 1.5;
4091
4115
  text-align: justify;
4092
4116
  white-space: pre-wrap;
4093
4117
  }
@@ -4241,6 +4265,9 @@ li {
4241
4265
  border: 1px solid rgba(204, 204, 204, 1);
4242
4266
  position: relative;
4243
4267
  width: 100%;
4268
+ max-height: 900px;
4269
+ overflow-y: auto;
4270
+ scrollbar-width: none;
4244
4271
  }
4245
4272
 
4246
4273
  .editor-header {
@@ -4360,7 +4387,6 @@ li {
4360
4387
  background-color: #fff;
4361
4388
  padding: 5px;
4362
4389
  border-radius: 5px;
4363
- box-shadow: 0 0 10px rgba(0, 0, 0, .2);
4364
4390
  }
4365
4391
 
4366
4392
  .menus {
@@ -4573,10 +4599,12 @@ li {
4573
4599
  align-items: flex-start;
4574
4600
  font-size: 12px;
4575
4601
  }
4602
+
4576
4603
  :deep(p:has(>img)) {
4577
4604
  line-height: 0 !important;
4578
4605
  text-indent: 0 !important;
4579
4606
  }
4607
+
4580
4608
  .tip-btnBox > div {
4581
4609
  width: 60px;
4582
4610
  height: 20px;
@@ -4879,4 +4907,12 @@ li {
4879
4907
  border: 1px solid #000;
4880
4908
  border-radius: 50%;
4881
4909
  }
4910
+
4911
+ :deep(.drag-pop-shadow) {
4912
+ top: 200px
4913
+ }
4914
+
4915
+ * {
4916
+ box-sizing: border-box;
4917
+ }
4882
4918
  </style>
@@ -1023,6 +1023,7 @@ export default {
1023
1023
  .ed-head {
1024
1024
  display: flex;
1025
1025
  justify-content: center;
1026
+ flex-wrap: wrap;
1026
1027
  }
1027
1028
 
1028
1029
  .ed-head-but {
@@ -1045,6 +1046,7 @@ export default {
1045
1046
  float: right;
1046
1047
  }
1047
1048
  .ed-title {
1049
+ min-width: 120px;
1048
1050
  flex: 1;
1049
1051
  text-align: left;
1050
1052
  font-size: 16px;
@@ -3,11 +3,11 @@
3
3
  <slot></slot>
4
4
  <div v-for="(item, index) in targetTree" :key="index">
5
5
  <zydx-menu-tree-info
6
- :menuConfig="menuConfig"
7
- :nodeLevel="nodeLevel"
8
- :menu-info="item"
9
- :selectItem="selectItem"
10
- @clickItem="clickItem"
6
+ :menuConfig="menuConfig"
7
+ :nodeLevel="nodeLevel"
8
+ :menu-info="item"
9
+ :selectItem="selectItem"
10
+ @clickItem="clickItem"
11
11
  ></zydx-menu-tree-info>
12
12
  </div>
13
13
  </div>
@@ -15,6 +15,7 @@
15
15
 
16
16
  <script>
17
17
  import zydxMenuTreeInfo from "./ZydxMenuTreeInfo";
18
+
18
19
  export default {
19
20
  name: "zydx-menu-tree",
20
21
  components: {
@@ -23,17 +24,17 @@ export default {
23
24
  props: {
24
25
  // 目录配置
25
26
  menuConfig: {
26
- type: Object,
27
- default: function () {
28
- return {
29
- isShowUpDown: false, // 是否显示收起展开
30
- isShowLine: false, // 是否显示下划线
31
- isShowBtn: false, // 显示按钮或者图标
32
- isCheckBox: false, // 是否显示复选框
33
- isUnifyFontSize: false, // 字体是否需要统一字号,
34
- checkBoxValue: [], // 复选款选中的值
35
- };
36
- }
27
+ type: Object,
28
+ default: function () {
29
+ return {
30
+ isShowUpDown: false, // 是否显示收起展开
31
+ isShowLine: false, // 是否显示下划线
32
+ isShowBtn: false, // 显示按钮或者图标
33
+ isCheckBox: false, // 是否显示复选框
34
+ isUnifyFontSize: false, // 字体是否需要统一字号,
35
+ checkBoxValue: [], // 复选款选中的值
36
+ };
37
+ }
37
38
  },
38
39
  // 节点设置
39
40
  nodeLevel: {
@@ -53,22 +54,23 @@ export default {
53
54
  required: true,
54
55
  },
55
56
  },
56
- data () {
57
- return {
58
- pcatalogIds: ''
59
- }
57
+ data() {
58
+ return {
59
+ pcatalogIds: ''
60
+ }
60
61
  },
61
62
  computed: {
62
63
  targetTree: function () {
63
64
  let that = this;
64
65
  let targetTree = [];
65
66
  let minLevel = "";
67
+ let pId = ''
66
68
  that.treeData.map(function (item) {
67
69
  if (that.menuConfig.isShowUpDown) {
68
70
  // 如果设置收起展开, 添加控制变量
69
- Reflect.set(item, "isShowUpDown", false);
71
+ Reflect.set(item, "isShowUpDown", false);
70
72
  } else {
71
- Reflect.set(item, "isShowUpDown", true);
73
+ Reflect.set(item, "isShowUpDown", true);
72
74
  }
73
75
  if (minLevel === "") {
74
76
  minLevel = item.level;
@@ -80,7 +82,10 @@ export default {
80
82
  });
81
83
  this.treeData.map(function (item) {
82
84
  if (item.level === minLevel) {
85
+ pId = item.catalogId;
83
86
  targetTree.push(item);
87
+ } else {
88
+ item.pid = pId
84
89
  }
85
90
  });
86
91
  targetTree.map(function (item) {
@@ -100,7 +105,7 @@ export default {
100
105
  let that = this;
101
106
  let newArr = [];
102
107
  arr.map(function (item) {
103
- if (item.pcatalogId === obj.catalogId) {
108
+ if (item.pid === obj.catalogId) {
104
109
  newArr.push(item);
105
110
  }
106
111
  });
@@ -133,17 +138,17 @@ export default {
133
138
  },
134
139
  // 获取当前节点的父级id
135
140
  getPcatalogIds: function (pcatalogId) {
136
- let that = this
137
- if (pcatalogId === '-1') {
138
- that.pcatalogIds += ','
139
- } else {
140
- this.treeData.some(function (item) {
141
- if (item.catalogId === pcatalogId) {
142
- that.pcatalogIds += ',' + item.catalogId
143
- that.getPcatalogIds(item.pcatalogId)
144
- }
145
- })
146
- }
141
+ let that = this
142
+ if (pcatalogId === '-1') {
143
+ that.pcatalogIds += ','
144
+ } else {
145
+ this.treeData.some(function (item) {
146
+ if (item.catalogId === pcatalogId) {
147
+ that.pcatalogIds += ',' + item.catalogId
148
+ that.getPcatalogIds(item.pcatalogId)
149
+ }
150
+ })
151
+ }
147
152
  },
148
153
  },
149
154
  };
@@ -321,6 +321,10 @@ export default {
321
321
  },
322
322
  fullDel() {
323
323
  this.fullShow = true
324
+ this.mindMap.view.setTransformData({
325
+ state : {scale: 1, x: 0, y: 0, sx: 0, sy: 0},
326
+ transform : {a:1,b:0,c:0,d:1,e:0,f:0,originX:0,originY:0,rotate:0,scaleX:1,scaleY:1,shear:0,translateX:0,translateY:0}
327
+ })
324
328
  this.cancelFullscreen()
325
329
  },
326
330
  // 全屏
@@ -2,20 +2,20 @@
2
2
  <div class="list-tree">
3
3
  <div class="list-cont" v-if="list.length > 0">
4
4
  <div :class="{'list-li':true, 'theme-text': active === index, pos: multiple}"
5
- :style="{'border-bottom': (link)? '1px solid #ccc': '0', 'color': (active === index)? activeColor : '#333'}"
5
+ :style="{'border-bottom': (link)? '1px solid #ccc': '0'}"
6
6
  v-for="(item,index) in listCopy" :key="index" @click="listTap(item,index)">
7
7
  <input v-if="multiple" :checked="item.box" @change="checkboxChange($event,index)" class="box-list" type="checkbox" name="boxList" />
8
8
  <div class="list-title">
9
- <span :style="{'font-size': column[0].fontSize + 'px', 'font-weight': column[0].fontWeight}" v-html="(index + 1) + '.' + (angleBrackets ? '《' : '') + item[column[0].label] + (angleBrackets ? '》' : '')"></span>
9
+ <span :style="{'font-size': 'fontSize' in column[0]?column[0].fontSize + 'px':'16px', 'font-weight': column[0].fontWeight, 'color': (active === index)? activeColor : '#333333'}" v-html="(index + 1) + '.' + (angleBrackets ? '《' : '') + item[column[0].label] + (angleBrackets ? '》' : '')"></span>
10
10
  <button v-if="delShow" @click="del(item)" v-html="delText"></button>
11
11
  </div>
12
12
  <div class="list-cont" v-if="open">
13
- <div class="list-li-cont">
13
+ <div class="list-li-cont" :style="{'color': (active === index)? activeColor : '#000000'}">
14
14
  <p v-for="(it,ind) in column.slice(1, column.length)" :key="ind">{{ it.name }}:{{ item[it.label] }}</p>
15
15
  </div>
16
16
  </div>
17
17
  <div class="list-cont" v-else>
18
- <div class="list-li-cont" v-if="active === index">
18
+ <div class="list-li-cont" :style="{'color': (active === index)? activeColor : '#000000'}" v-if="active === index">
19
19
  <p v-for="(it,ind) in column.slice(1, column.length)" :key="ind">{{ it.name }}:{{ item[it.label] }}</p>
20
20
  </div>
21
21
  </div>
package/src/index.js CHANGED
@@ -87,7 +87,7 @@ function install(app) {
87
87
  }
88
88
 
89
89
  export default {
90
- version: '1.35.472',
90
+ version: '1.35.474',
91
91
  install,
92
92
  Calendar,
93
93
  Message,