centaline-data-driven 1.6.35 → 1.6.37

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.35",
3
+ "version": "1.6.37",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/release-log.md CHANGED
@@ -1,3 +1,17 @@
1
+ # v1.6.37
2
+ 2024-02-14
3
+
4
+ 优化
5
+
6
+ 列表添加行样式字段rowStyle,支持自定义行样式、行字体样式
7
+
8
+ # v1.6.36
9
+ 2024-01-17
10
+
11
+ bug
12
+
13
+ 粘贴上传,exce单元格会识别成图片上图
14
+
1
15
  # v1.6.35
2
16
  2024-01-08
3
17
 
@@ -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'"
@@ -52,8 +52,7 @@
52
52
  <tr v-for="(row,rowindex) in model.listData" :key="rowindex"
53
53
  v-if="pageRowMin <= rowindex && rowindex <= pageRowMax"
54
54
  :ref="'rows.'+rowindex" @click="rowClickHandle($event,rowindex)"
55
- class="ct-tr"
56
- :style="row.$style">
55
+ class="ct-tr">
57
56
  <td v-if="model.isMulti" class="ct-td tdFiexd left-fixation checkbox-td" :class="[model.tdClass]" align="center">
58
57
  <label v-if="!model.rightMulti || row[model.rightMulti] == 1" class="el-checkbox is-checked"><span class="el-checkbox__input" :class="rowCheckClass(row)">
59
58
  <span class="el-checkbox__inner"></span>
@@ -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() {
@@ -75,7 +75,7 @@
75
75
  <!--可视区域的行数据-->
76
76
  <tr v-for="(row, rowindex) in model.listData" :key="rowindex"
77
77
  v-if="from == 'form' || pageRowMin <= rowindex && rowindex <= pageRowMax" :ref="'rows.' + rowindex"
78
- @click="rowClickHandle($event, rowindex)" class="ct-tr" :style="row.$style">
78
+ @click="rowClickHandle($event, rowindex)" class="ct-tr" :style="row.rowStyle">
79
79
  <td v-if="model.isMulti" class="ct-td tdFiexd left-fixation checkbox-td"
80
80
  :class="[model.tdClass, rowindex === model.selectIndex ? 'select' : null,]" align="center">
81
81
  <label v-if="!model.rightMulti || $common.getDataOfUpperLower(row, model.rightMulti) == 1"
@@ -2537,6 +2537,10 @@ export default {
2537
2537
  background-color: #ddd !important;
2538
2538
  }
2539
2539
 
2540
+ .ct-searchtable .ct-tr{
2541
+ background-color: #ffffff;
2542
+ }
2543
+
2540
2544
  .ct-searchtable .ct-tr>.ct-td {
2541
2545
  /*border: 1px solid #e7e8eb;
2542
2546
  border-bottom: 1px solid #e7e8eb;
@@ -2544,7 +2548,7 @@ export default {
2544
2548
  border-left: 1px solid #e7e8eb;*/
2545
2549
  padding: 2px 20px;
2546
2550
  cursor: default;
2547
- background-color: #ffffff;
2551
+ /* background-color: #ffffff; */
2548
2552
  // color: var(--centalineBlack);
2549
2553
  }
2550
2554
 
@@ -2694,10 +2698,12 @@ export default {
2694
2698
 
2695
2699
  .ct-table .left-fixation {
2696
2700
  position: sticky;
2701
+ background-color: inherit;
2697
2702
  }
2698
2703
 
2699
2704
  .ct-table .right-fixation {
2700
2705
  position: sticky;
2706
+ background-color: inherit;
2701
2707
  }
2702
2708
 
2703
2709
  .ct-table .left-fixation-th {
@@ -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
-
@@ -789,11 +789,8 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
789
789
  //设置行样式
790
790
  setStyleRow(rows) {
791
791
  rows.forEach((row) => {
792
- if (!row.$style) {
793
- row.$style = {};
794
- }
795
792
  if (rtn.rowColorColumn && row[rtn.rowColorColumn]) {
796
- row.$style.color = row[rtn.rowColorColumn];
793
+ row.rowStyle = row.rowStyle + ";color:" + row[rtn.rowColorColumn] + ";";
797
794
  }
798
795
  });
799
796
  },
package/src/main.js CHANGED
@@ -76,7 +76,7 @@ Vue.use(centaline, {
76
76
  estateId: '',
77
77
 
78
78
  authObject: '{"currentEstate":{},"platform":1,"osVersion":"","clientVersion":"","machineCode":"eeb8e2fc88b5bcbc2e4f297777142537","token":"","random":"588NJK","time":1733886962541,"sign":"7cb413ac60ed50fe406c9b91c8d4a836","systemSource":"CCESU","empNo":"hqxtgl","empId":"2411121446336B97FBEB7FD54905A903"}',
79
- AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6Ijc5ZThjMmI3LTg5NmUtNDc5MS1iZmYxLWM5YWE2NzhlMWZmYiJ9.CRhyx5tOWgVA5l5wmcjIuAyjAlgN9zCAvLoDQ9xjHbW9iLfdz8_fjhbe3QwoS4nQ7tzrzPu97PfVZNw0mQP6cA',
79
+ AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImIyYzIyYTNkLWZhOGQtNDIwZi1hMTQ3LTIzN2I5OWY1NTQyNSJ9.tyabbMCMbIcy5orjkpiO6ShZeZGIiNirKBKgdiqMPYvBfRCNTMYbsamHNe5rCtOSB6t5KA-Fwsv_GA6ENoJ1Lg',
80
80
  };
81
81
  },
82
82
  // 请求完成事件,可判断是否登录过期执行响应操作