centaline-data-driven 1.6.34 → 1.6.36

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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "marscode.chatLanguage": "cn"
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.6.34",
3
+ "version": "1.6.36",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/release-log.md CHANGED
@@ -1,3 +1,25 @@
1
+ # v1.6.36
2
+ 2024-01-17
3
+
4
+ bug
5
+
6
+ 粘贴上传,exce单元格会识别成图片上图
7
+
8
+ # v1.6.35
9
+ 2024-01-08
10
+
11
+ 优化
12
+
13
+ 列表新增和修改页面引用的父页面的表单项将以label的形式展现在表单的最上面,多个用逗号(,) 分隔
14
+
15
+ onAfterChanged找不到路由后,支持直接执行脚本
16
+
17
+ 表单列表弹层支持修改必填required到行数据上
18
+
19
+ BUG
20
+
21
+ 文件预览,部分发票PDF,内容显示不全,前端更新pdf.js必须更新SDK版本
22
+
1
23
  # v1.6.34
2
24
  2024-12-30
3
25
 
@@ -31,7 +31,7 @@
31
31
 
32
32
  <!-- CCES -->
33
33
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/agentuserlist/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/agentuserlist/getList'"></ct-searchlist> -->
34
- <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/contractmanage/ContractList/getLayoutOfSearch'" :searchDataApi="'/contractmanage/ContractList/getList'"></ct-searchlist> -->
34
+ <ct-searchlist :apiParam="para" :searchConditionApi="'/contractmanage/ContractList/getLayoutOfSearch'" :searchDataApi="'/contractmanage/ContractList/getList'"></ct-searchlist>
35
35
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/sunexpensemanage/sunexpenserecordlist/getLayoutOfSearch'" :searchDataApi="'/sunexpensemanage/sunexpenserecordlist/getList'"></ct-searchlist> -->
36
36
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/customermanage/ProjectCustomerList/getLayoutOfSearch'" :searchDataApi="'/customermanage/ProjectCustomerList/getList'"></ct-searchlist> -->
37
37
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/workwxmanage/WorkWXApplicationList/getLayoutOfSearch'" :searchDataApi="'/workwxmanage/WorkWXApplicationList/getList'"></ct-searchlist> -->
@@ -41,7 +41,7 @@
41
41
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/EntranceNoticeInfoList/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/EntranceNoticeInfoList/getList'"></ct-searchlist> -->
42
42
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/commissionquery/properformanceszjjbreport/getLayoutOfSearch'" :searchDataApi="'/commissionquery/properformanceszjjbreport/getList'"></ct-searchlist> -->
43
43
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/employeelist/getLayoutOfSearch'" :searchDataApi="'/employeelist/getList'"></ct-searchlist> -->
44
- <ct-searchlist :apiParam="para" :searchConditionApi="'/estatemanage/estatlist/getLayoutOfSearch'" :searchDataApi="'/estatemanage/estatlist/getList'"></ct-searchlist>
44
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/estatemanage/estatlist/getLayoutOfSearch'" :searchDataApi="'/estatemanage/estatlist/getList'"></ct-searchlist> -->
45
45
  <!-- CCES -->
46
46
 
47
47
  <!-- <ct-searchlist :apiParam="para"
@@ -79,6 +79,10 @@
79
79
 
80
80
  <!-- <ct-searchlist :searchCategoryApi="'/PropertyPublishList/getLayoutOfSearchCategory'" :searchConditionApi="'/PropertyPublishList/getLayoutOfSearchForRET'" :searchStatsApi="'/PropertyPublishList/getListStatsForRET'" :searchDataApi="'/PropertyPublishList/getListOfSearchModelForRET'"></ct-searchlist> -->
81
81
 
82
+ <!-- <ct-searchlist :searchConditionApi="'/propertyTenderList/getLayoutOfSearch'"
83
+ :searchDataApi="'/propertyTenderList/getListOfSearchModel'"
84
+ ></ct-searchlist> -->
85
+
82
86
  <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
83
87
  :searchDataApi="'/PropertyRETList/getListOfSearchModel'"
84
88
  :searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"
@@ -159,7 +163,7 @@
159
163
  // appRootUrl:'http://10.88.22.13:6060/onecard-api/',
160
164
  appRootUrl:'',
161
165
  para:{
162
-
166
+ type: "top",
163
167
  "deleteRight": 0,
164
168
  "editRight": 0,
165
169
  "browseRight": 0,
@@ -8,7 +8,7 @@
8
8
  :file-list="model.fileList" :multiple="true" :auto-upload="true" :action="model.action" :data="model.uploadData"
9
9
  :headers="headers" :before-upload="beforeUploadProcess" :on-success="handleAvatarSuccess"
10
10
  :on-error="handleAvatarError" :on-progress="uploadProcess" :limit="parseInt(model.max || 999)"
11
- :on-exceed="handleExceed" :uploadStatus="!disableUpload&&!model.lock?'upload':'lock'">
11
+ :on-exceed="handleExceed" :uploadStatus="!disableUpload && !model.lock ? 'upload' : 'lock'">
12
12
  <template slot="default">
13
13
  <i class="el-icon-plus"></i>
14
14
  </template>
@@ -18,10 +18,9 @@
18
18
  </div>
19
19
  <div slot="tip" v-show="model.description" v-html="model.description">
20
20
  </div>
21
- <div class="qrcode-target" v-if="model.QRCodeAction">
22
- <img @click.stop="qrcodeFn" ref="QRCodeRef"
23
- :src="require('../../../assets/serw1.png')" style="width: 35px;height: 35px;float: right;" alt="扫码上传"
24
- title="扫码上传">
21
+ <div class="qrcode-target" v-if="model.QRCodeAction">
22
+ <img @click.stop="qrcodeFn" ref="QRCodeRef" :src="require('../../../assets/serw1.png')"
23
+ style="width: 35px;height: 35px;float: right;" alt="扫码上传" title="扫码上传">
25
24
  </div>
26
25
  <div class="ScanUploadPhoto" v-if="qrcodeVisible" @click.stop="qrcodeVisible = true"
27
26
  :style="{ top: QRCodeRefTop + 'px', left: QRCodeRefLeft + 'px' }">
@@ -75,7 +74,7 @@
75
74
  </el-dropdown-item>
76
75
  </el-dropdown-menu>
77
76
  </el-dropdown>
78
- </span>
77
+ </span>
79
78
  <div slot="file" slot-scope="{ file }" :title="file.fileName">
80
79
  <div class="cover-list-item">
81
80
  <div @click="viewerfile(file)">
@@ -156,8 +155,7 @@
156
155
  :multiple="true" :auto-upload="true" :action="model.action" :data="model.uploadData" :headers="headers"
157
156
  :before-upload="beforeUploadProcess" :on-success="handleAvatarSuccess" :on-error="handleAvatarError"
158
157
  :on-progress="uploadProcess" :limit="parseInt(model.max || 999)" :on-exceed="handleExceed"
159
- :uploadStatus="!disableUpload&&!model.lock?'upload':'lock'"
160
- >
158
+ :uploadStatus="!disableUpload && !model.lock ? 'upload' : 'lock'">
161
159
  <i slot="default" class="el-icon-plus"></i>
162
160
  <div slot="tip" class="el-upload__tip errorMessage" style="white-space:pre-wrap;" v-show="!valid"
163
161
  v-html="validMessage">
@@ -330,16 +328,16 @@ export default {
330
328
  return this.$common.getDataDrivenOpts().zindex + 100;
331
329
  },
332
330
  },
333
- deactivated() {
334
- document.addEventListener('paste', this.ListenerPaste);
331
+ deactivated() {
332
+ document.addEventListener('paste', this.ListenerPaste);
335
333
 
336
- },
337
- mounted() {
338
- document.addEventListener('paste', this.ListenerPaste);
334
+ },
335
+ mounted() {
336
+ document.addEventListener('paste', this.ListenerPaste);
339
337
 
340
338
  },
341
339
  created() {
342
- var self = this;
340
+ var self = this;
343
341
  this.$nextTick(function () {
344
342
  if (self.vmodel) {
345
343
  self.load(self.vmodel);
@@ -351,8 +349,8 @@ export default {
351
349
  });
352
350
  }
353
351
  this.disableUpload = this.model.lock;
354
-
355
-
352
+
353
+
356
354
  });
357
355
  },
358
356
  methods: {
@@ -722,7 +720,7 @@ export default {
722
720
 
723
721
  var refupload = this.$refs.refupload;
724
722
  if (refupload) {
725
- if (flagError) {
723
+ if (flagError) {
726
724
  this.$message({
727
725
  message: res,
728
726
  type: 'error',
@@ -860,30 +858,44 @@ export default {
860
858
  }
861
859
  self.QRCodeRefLeft = QRCodeRef.getBoundingClientRect().left + QRCodeRefWith + 20;
862
860
  }
863
- },
861
+ },
864
862
  PasteUpload(event) {
865
863
  let self = this;
866
864
  if (!self.model.locked && !self.disableUpload) {
867
865
  // 获取粘贴板中的图片
868
866
  const clipboardDatas = (event.clipboardData || event.originalEvent.clipboardData);
869
867
  const items = clipboardDatas.items;
868
+
869
+ //检测是否全是文件才上传
870
+ let fileSum = 0;
871
+
870
872
  for (let index in items) {
871
- const item = items[index];
873
+ const item = items[index];
872
874
  if (item.kind === 'file') {
873
- const file = item.getAsFile();
874
- let uid = self.uploadguid();
875
- file.uid = file.uid || uid;
876
- self.$refs.upload.handleStart(file);
877
- // 提交上传队列
878
- self.$refs.upload.submit();
875
+ ++fileSum;
876
+ }
877
+ }
878
+
879
+ if (fileSum == items.length) {
880
+
881
+ for (let index in items) {
882
+ const item = items[index];
883
+ if (item.kind === 'file') {
884
+ const file = item.getAsFile();
885
+ let uid = self.uploadguid();
886
+ file.uid = file.uid || uid;
887
+ self.$refs.upload.handleStart(file);
888
+ // 提交上传队列
889
+ self.$refs.upload.submit();
890
+ }
879
891
  }
880
892
  }
881
893
  }
882
894
 
883
895
  },
884
- ListenerPaste(event) {
896
+ ListenerPaste(event) {
885
897
  let self = this;
886
- if (!self.model.locked&&!self.disableUpload) {
898
+ if (!self.model.locked && !self.disableUpload) {
887
899
  var target = event.target;
888
900
  const uploads = document.querySelectorAll('[uploadStatus="upload"]');
889
901
 
@@ -896,7 +908,7 @@ export default {
896
908
 
897
909
  if (window.uploads.count == window.uploads.length) {
898
910
  window.uploads = null;
899
-
911
+
900
912
  self.$message({
901
913
  message: "存在多个上传组件,请点击上传!",
902
914
  type: 'info',
@@ -909,7 +921,7 @@ export default {
909
921
  window.uploads = null;
910
922
  self.PasteUpload(event);
911
923
  }
912
- }
924
+ }
913
925
  }
914
926
  },
915
927
  beforeDestroy() {
@@ -11,6 +11,21 @@
11
11
  <span style="font-weight:bold">{{model.title}}</span>
12
12
  </div>
13
13
 
14
+ <!--relationParentFormFields-->
15
+ <el-row v-if="relationParentFormFields.length > 0">
16
+ <template v-for="(col, index) in relationParentFormFields">
17
+ <el-col :key="index" v-if="col.show !== false" :span="col.colspan" style="padding:5px">
18
+ <component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" :parentModel="model" v-bind="col.bindPara"
19
+ :fileData="getFileData(col)" :from="'form'" :documentHeight="documentHeight" :documentWidth="documentWidth"
20
+ @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)" @enter="enterHandler(col,$event)"
21
+ @input="inputHandler(col,$event)" @importComplete="importComplete" @blur="blurHandler(col,$event)"
22
+ @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
23
+ @popupLocation="popupLocationHandler"
24
+ @tableButtonClick="clickHandler"></component>
25
+ </el-col>
26
+ </template>
27
+ </el-row>
28
+
14
29
  <!--头部元素-->
15
30
  <el-row v-if="collapseFieldsRow.length > 0">
16
31
  <template v-for="(col, index) in collapseFieldsRow[0]">
@@ -208,6 +223,12 @@
208
223
  Boolean,
209
224
  default: false,
210
225
  },
226
+ relationParentFormFields: {
227
+ Array,
228
+ default: function () {
229
+ return [];
230
+ },
231
+ },
211
232
  },
212
233
  data() {
213
234
  return {
@@ -1167,7 +1188,16 @@
1167
1188
  var router = self.model.actionRouters.find((v) => {
1168
1189
  return v.id === field.onAfterChanged;
1169
1190
  });
1170
- self.clickHandler(router);
1191
+ if(router){
1192
+ self.clickHandler(router);
1193
+ }
1194
+ else{
1195
+ if (typeof this.model.scripts !== 'undefined') {
1196
+ this.model.scripts.formData.setExcuteListData(this.model.fields);
1197
+ }
1198
+ this.model.scripts.$fd = field.id;
1199
+ this.$common.excute.call(this.model.scripts, field.onAfterChanged);
1200
+ }
1171
1201
  }
1172
1202
 
1173
1203
  self.$forceUpdate();
@@ -1177,8 +1207,17 @@
1177
1207
  if (field.onAfterChanged) {
1178
1208
  var router = self.model.actionRouters.find((v) => {
1179
1209
  return v.id === field.onAfterChanged;
1180
- });
1181
- self.clickHandler(router);
1210
+ });
1211
+ if(router){
1212
+ self.clickHandler(router);
1213
+ }
1214
+ else{
1215
+ if (typeof this.model.scripts !== 'undefined') {
1216
+ this.model.scripts.formData.setExcuteListData(this.model.fields);
1217
+ }
1218
+ this.model.scripts.$fd = field.id;
1219
+ this.$common.excute.call(this.model.scripts, field.onAfterChanged);
1220
+ }
1182
1221
  }
1183
1222
  self.$forceUpdate();
1184
1223
  },
@@ -795,8 +795,14 @@ import dynamicElement from '../../mixins/dynamicElement';
795
795
  if (field.onAfterChanged && field.type !== 4) {
796
796
  var router = self.model.actionRouters.find((v) => {
797
797
  return v.id === field.onAfterChanged;
798
- });
799
- self.clickHandlerfield(router);
798
+ });
799
+ if(router){
800
+ self.clickHandlerfield(router);
801
+ }
802
+ else{
803
+ this.model.scripts.$fd = field.id;
804
+ this.$common.excute.call(this.model.scripts, field.onAfterChanged);
805
+ }
800
806
  }
801
807
 
802
808
  self.$forceUpdate();
@@ -1,7 +1,8 @@
1
1
  <template>
2
2
  <div class='mytree' id="mytree" style="overflow:auto" v-loading="loading">
3
3
  <el-tree class="tree-line" :props="defaultProps" :load="loadNode" :indent="0" :expand-on-click-node="false"
4
- @node-click="handleNodeClick" lazy ref="Tree" @node-contextmenu="rightClick" node-key="code" current-node-key="currentNodeKey">
4
+ @node-click="handleNodeClick" lazy ref="Tree" @node-contextmenu="rightClick" node-key="code"
5
+ current-node-key="currentNodeKey">
5
6
  </el-tree>
6
7
  <div class="box-menu" v-if="menuVisible && model.actionRouter"
7
8
  :style="{ left: menu_left + 'px', top: menu_top + 'px' }">
@@ -51,7 +52,7 @@ export default {
51
52
  };
52
53
  },
53
54
  mounted() {
54
-
55
+
55
56
  },
56
57
  methods: {
57
58
  search(m) {
@@ -62,8 +63,8 @@ export default {
62
63
  clearTimeout(timer);
63
64
  self.searchStatus.push(1);
64
65
  self.treeNode.childNodes = [];
65
- self.searchComplate(m, undefined, self.treeResolve,true);
66
-
66
+ self.searchComplate(m, undefined, self.treeResolve, true);
67
+
67
68
  }
68
69
  else {
69
70
  timer = setTimeout(() => {
@@ -91,14 +92,14 @@ export default {
91
92
  if (node.level === 0) {
92
93
  self.treeNode = node;
93
94
  self.treeResolve = resolve;
94
- return self.loadtreeData(resolve,true);
95
+ return self.loadtreeData(resolve, true);
95
96
  }
96
97
  if (node.level >= 1) {
97
98
  return self.getChildByList(node.data.code, resolve, node.data);
98
99
  }
99
100
  },
100
- loadtreeData(resolve,firstLoad) { // 获取loadtreeData 就是父节点数据,getChildByList就是异步获取子节点数据
101
- this.searchComplate(undefined, undefined, resolve,firstLoad);
101
+ loadtreeData(resolve, firstLoad) { // 获取loadtreeData 就是父节点数据,getChildByList就是异步获取子节点数据
102
+ this.searchComplate(undefined, undefined, resolve, firstLoad);
102
103
  },
103
104
  getChildByList(_parentID, resolve,) { // 获取子节点请求
104
105
  var fields = this.model.searchData("code", _parentID, 9, 3);
@@ -107,7 +108,7 @@ export default {
107
108
  };
108
109
  this.searchComplate(model, undefined, resolve);
109
110
  },
110
- async load(data, resolve,firstLoad) {
111
+ async load(data, resolve, firstLoad) {
111
112
  var self = this;
112
113
  self.model = data;
113
114
  self.model.$vue = self;
@@ -119,33 +120,32 @@ export default {
119
120
  self.loading = false;
120
121
  self.LastResolve = treeResolve;
121
122
  self.menuVisible = false;
122
- if(firstLoad)
123
- {
124
- self.$nextTick(() => {
125
- if (self.model.modeltree&&self.model.modeltree[0]&&self.model.modeltree[0].code) {
126
- self.$refs.Tree.setCurrentKey(self.model.modeltree[0].code)
123
+ if (firstLoad) {
124
+ self.$nextTick(() => {
125
+ if (self.model.modeltree && self.model.modeltree[0] && self.model.modeltree[0].code) {
126
+ self.$refs.Tree.setCurrentKey(self.model.modeltree[0].code)
127
+ }
128
+ });
129
+ if (self.model.modeltree && self.model.modeltree[0]) {
130
+ self.handleNodeClick(self.model.modeltree[0], true);
127
131
  }
128
- });
129
- if (self.model.modeltree&&self.model.modeltree[0]) {
130
- self.handleNodeClick(self.model.modeltree[0],true);
131
- }
132
132
 
133
133
  }
134
-
134
+
135
135
  },
136
- searchComplate(m, defaultSearch, resolve,firstLoad) {
136
+ searchComplate(m, defaultSearch, resolve, firstLoad) {
137
137
  var self = this;
138
138
  this.$nextTick(function () {
139
139
  if (typeof self.api !== 'undefined') {
140
- self.loaderObj.Tree(self.api, self.load, m, defaultSearch, resolve,firstLoad);
140
+ self.loaderObj.Tree(self.api, self.load, m, defaultSearch, resolve, firstLoad);
141
141
  }
142
142
  });
143
143
  },
144
- handleNodeClick(data,formType) {
144
+ handleNodeClick(data, formType) {
145
145
  this.foo();
146
- var self = this;
147
- if(data&&formType){
148
- self.$refs.Tree.setCurrentKey(data.code)
146
+ var self = this;
147
+ if (data && formType) {
148
+ self.$refs.Tree.setCurrentKey(data.code)
149
149
  }
150
150
  if (self.LastClickNode != data) {
151
151
  self.LastClickNode = data;
@@ -186,30 +186,30 @@ export default {
186
186
  this.model.actionRouter.forEach(v => {
187
187
  if (this.currentData[v.rightField] == '1') {
188
188
  this.menuVisible = true //显示增删改的div
189
- actionIndex +=1;
189
+ actionIndex += 1;
190
190
  }
191
191
  })
192
192
  }
193
193
  document.addEventListener('click', this.foo)  // 监听事件鼠标点击事件,若点击则隐藏菜单
194
- // 获取树状图的高度
194
+ // 获取树状图的高度
195
195
  let treeHeight = document.getElementById("mytree").offsetHeight;
196
- // 获取文本内容的宽高
197
- let mainHeight = document.getElementById("app-Tree").offsetHeight;
198
- let mainWidth = document.getElementById("app-Tree").offsetWidth;
199
- // 10是padding 获取查询条件高度
200
- let screenHeight = document.getElementById("mytree").parentElement.offsetHeight - treeHeight - 10;
201
- let windowWidth = window.innerWidth;
202
- let windowHeight = window.innerHeight;
203
- // 将菜单显示在鼠标点击旁边定位
204
- this.menu_left = event.clientX -( windowWidth - mainWidth);
205
- // 18是节点文本的高度
206
- this.menu_top =event.clientY - ( windowHeight -mainHeight) - screenHeight + actionIndex*30 +18;
196
+ // 获取文本内容的宽高
197
+ let mainHeight = document.getElementById("app-Tree").offsetHeight;
198
+ let mainWidth = document.getElementById("app-Tree").offsetWidth;
199
+ // 10是padding 获取查询条件高度
200
+ let screenHeight = document.getElementById("mytree").parentElement.offsetHeight - treeHeight - 10;
201
+ let windowWidth = window.innerWidth;
202
+ let windowHeight = window.innerHeight;
203
+ // 将菜单显示在鼠标点击旁边定位
204
+ this.menu_left = event.clientX - (windowWidth - mainWidth);
205
+ // 18是节点文本的高度
206
+ this.menu_top = event.clientY - (windowHeight - mainHeight) - screenHeight + actionIndex * 30 + 18;
207
207
  // 微调
208
- if (document.getElementById("uplink")) {
209
- this.menu_top = this.menu_top -8;
210
- } else if(document.getElementById("onecard")){
211
- this.menu_top = this.menu_top +10;
212
- }
208
+ if (document.getElementById("uplink")) {
209
+ this.menu_top = this.menu_top - 8;
210
+ } else if (document.getElementById("onecard")) {
211
+ this.menu_top = this.menu_top + 10;
212
+ }
213
213
  },
214
214
  foo() {
215
215
  this.menuVisible = false
@@ -297,7 +297,7 @@ export default {
297
297
  add(newData) {
298
298
  let self = this;
299
299
  this.$refs.Tree.append(newData, self.currentNode)
300
- this.handleNodeClick(newData,true)
300
+ this.handleNodeClick(newData, true)
301
301
  },
302
302
  //修改树节点
303
303
  update(newData) {
@@ -309,20 +309,20 @@ export default {
309
309
  self.$set(self.currentData, key, newData[key]);
310
310
  }
311
311
  }
312
- this.handleNodeClick(newData,true)
312
+ this.handleNodeClick(newData, true)
313
313
  },
314
314
  getNextClickNode() {
315
- const tree= this.$refs.Tree;
316
- const node = tree.getNode(this.currentData.code);
317
- let data={};
318
- if (node.nextSibling) {
319
- data=node.nextSibling.data;
320
- } else if(node.previousSibling) {
321
- data=node.previousSibling.data;
322
- }else if(node.parent){
323
- data=node.parent.data;
324
- }
325
- this.handleNodeClick(data,true)
315
+ const tree = this.$refs.Tree;
316
+ const node = tree.getNode(this.currentData.code);
317
+ let data = {};
318
+ if (node.nextSibling) {
319
+ data = node.nextSibling.data;
320
+ } else if (node.previousSibling) {
321
+ data = node.previousSibling.data;
322
+ } else if (node.parent) {
323
+ data = node.parent.data;
324
+ }
325
+ this.handleNodeClick(data, true)
326
326
  }
327
327
  },
328
328
  created() {
@@ -334,26 +334,33 @@ export default {
334
334
  .mytree {
335
335
  height: 100%;
336
336
  }
337
+
337
338
  .mytree .el-tree {
338
339
  min-width: 100%;
339
340
  display: inline-block;
340
341
  }
342
+
341
343
  .mytree::-webkit-scrollbar-thumb {
342
- background-color: #bebebe;/* 设置滚动条滑块颜色 */
343
- height: 5px;
344
- border-radius: 4px;
345
- display: block;
344
+ background-color: #bebebe;
345
+ /* 设置滚动条滑块颜色 */
346
+ height: 5px;
347
+ border-radius: 4px;
348
+ display: block;
346
349
  }
350
+
347
351
  .mytree::-webkit-scrollbar {
348
- width: 6px;
349
- height: 6px; /* 设置滚动条高度 */
350
- background-color: #f1f1f1;
351
- display: block;
352
+ width: 6px;
353
+ height: 6px;
354
+ /* 设置滚动条高度 */
355
+ background-color: #f1f1f1;
356
+ display: block;
352
357
  }
358
+
353
359
  .mytree .el-tree-node.is-current>.el-tree-node__content {
354
360
  color: var(--centalineBlue) !important;
355
361
  background-color: #f5f7fa;
356
362
  }
363
+
357
364
  .tree-line:first-child div {
358
365
  overflow: hidden;
359
366
  }
@@ -504,6 +511,4 @@ export default {
504
511
  .box-menu .opertion:hover {
505
512
  color: var(--btnHoverRed);
506
513
  }
507
-
508
514
  </style>
509
-
@@ -1,15 +1,8 @@
1
-
2
1
  <template>
3
2
  <div v-loading="loading">
4
- <iframe
5
- ref="previewPdf"
6
- id="previewPdf"
7
- :src="'/static/pdf/web/viewer.html?' + fileUrl"
8
- :height="displayAreaHeight - 78 + 'px'"
9
- :width="displayAreaWidth + 'px'"
10
- @load="complete()"
11
- @contextmenu="handleMouse" style="border-width: 0px;"
12
- >
3
+ <iframe ref="previewPdf" id="previewPdf" :src="'/static/pdf/web/viewer.html?' + fileUrl"
4
+ :height="displayAreaHeight - 78 + 'px'" :width="displayAreaWidth + 'px'" @load="complete()"
5
+ @contextmenu="handleMouse" style="border-width: 0px;">
13
6
  </iframe>
14
7
  </div>
15
8
  </template>
@@ -22,7 +15,7 @@ export default {
22
15
  },
23
16
  data() {
24
17
  return {
25
- loading: true,
18
+ loading: true,
26
19
  numPages: 1,
27
20
  fileUrl: "",
28
21
  };
@@ -30,32 +23,53 @@ export default {
30
23
  mounted() {
31
24
  this.init(this.pdfUrl);
32
25
  },
33
- created() {
26
+ created() {
34
27
  },
35
- methods: {
36
- handleMouse(e) {
37
- e.preventDefault();
38
- },
28
+ methods: {
29
+ handleMouse(e) {
30
+ e.preventDefault();
31
+ },
39
32
  init(pdfUrl) {
40
33
  var self = this;
41
- self.fileUrl = 'r='+Math.random()+'&file='+encodeURIComponent(pdfUrl);
34
+ self.fileUrl = 'r=' + Math.random() + '&file=' + encodeURIComponent(pdfUrl);
42
35
  },
43
36
  complete() {
44
- this.loading = false;
37
+ this.loading = false;
45
38
  var doc = document.getElementById("previewPdf").contentWindow.document;
46
- doc.getElementById("download").style.display = "none";
47
- doc.getElementById("openFile").style.display = "none";
48
- doc.getElementById("print").style.display = "none";
49
- doc.getElementById("viewBookmark").style.display = "none";
39
+ elementHideById("download",doc)
40
+ elementHideById("openFile",doc)
41
+ elementHideById("print",doc)
42
+ elementHideById("viewBookmark",doc)
43
+
44
+ elementHideById("editorHighlightButton",doc)
45
+ elementHideById("editorFreeText",doc)
46
+ elementHideById("editorInk",doc)
47
+ elementHideById("editorStamp",doc)
48
+ elementHideById("editorModeButtons",doc)
49
+
50
+ elementHideById("printButton",doc)
51
+ elementHideById("downloadButton",doc)
52
+
53
+ elementHideById("secondaryOpenFile",doc)
54
+ elementHideById("cursorToolButtons",doc)
55
+ elementHideById("documentProperties",doc)
56
+
50
57
  doc.oncontextmenu = new Function("event.returnValue=false");
51
58
  },
52
59
  },
53
60
  watch: {
54
61
  pdfUrl(newValue, oldValue) {
55
- this.loading = true;
62
+ this.loading = true;
56
63
  this.init(newValue);
57
64
  },
58
65
  },
59
66
  };
67
+
68
+ function elementHideById(elementId, doc) {
69
+ if (doc.getElementById(elementId) != null) {
70
+ if (doc.getElementById(elementId).style) {
71
+ doc.getElementById(elementId).style.display = "none";
72
+ }
73
+ }
74
+ }
60
75
  </script>
61
-