centaline-data-driven 1.3.21 → 1.3.24

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.
@@ -101,31 +101,23 @@
101
101
  />
102
102
  <div class="info-row mb20 mt5">
103
103
  <div class="row-i">
104
- <span>{{ model.fields1Dic.Price.label }}</span
105
- ><span
106
- class="base-clolr expand-f"
107
- v-html="model.fields1Dic.Price.value"
108
- ></span
109
- ><span class="base-clolr">{{
110
- model.fields1Dic.Price.unitName
111
- }}</span>
112
- <img src="../../../assets/jsq.png" class="img-jsq" alt="" />
104
+ <span>{{ model.fields1Dic.Price.label }}</span>
105
+ <span class="base-clolr expand-f" v-html="model.fields1Dic.Price.value"></span>
106
+ <span class="base-clolr">{{model.fields1Dic.Price.unitName}}</span>
107
+ <component v-if="model.actionRouterPrice" class="ml10" style="display: flex;"
108
+ :is="model.actionRouterPrice.is" :vmodel="model.actionRouterPrice" :api="model.optionApi"
109
+ @click="fieldClickHandler(model.actionRouterPrice, $event)">
110
+ </component>
113
111
  </div>
114
112
  <div class="row-i">
115
- <span>{{ model.fields1Dic.PriceUnit.label }}</span
116
- ><span
117
- class="base-clolr expand-f"
118
- v-html="model.fields1Dic.PriceUnit.value"
119
- ></span
120
- ><span class="base-clolr">{{
121
- model.fields1Dic.PriceUnit.unitName
122
- }}</span>
113
+ <span>{{ model.fields1Dic.PriceUnit.label }}</span>
114
+ <span class="base-clolr expand-f" v-html="model.fields1Dic.PriceUnit.value"></span>
115
+ <span class="base-clolr">{{model.fields1Dic.PriceUnit.unitName}}</span>
123
116
  </div>
124
117
  <div v-if="model.fields1Dic.PriceLine" class="row-i">
125
118
  <span>{{ model.fields1Dic.PriceLine.label }}</span>
126
119
  <div>
127
- {{ model.fields1Dic.PriceLine.value
128
- }}{{ model.fields1Dic.PriceLine.unitName }}
120
+ {{ model.fields1Dic.PriceLine.value}}{{ model.fields1Dic.PriceLine.unitName }}
129
121
  </div>
130
122
  </div>
131
123
  </div>
@@ -691,14 +683,9 @@ export default {
691
683
  var self = this;
692
684
  var callBack = null;
693
685
  let submitData = {};
694
- var router = this.model.actionRouters.find((v) => {
686
+ var router = this.model.actionRoutersAll.find((v) => {
695
687
  return v.id === field.id;
696
688
  });
697
- if (router == undefined && this.model.actionRoutersMoreList) {
698
- router = this.model.actionRoutersMoreList.find((v) => {
699
- return v.id === field.id;
700
- });
701
- }
702
689
  if (router == undefined && this.model.otherTradeActionRouter) {
703
690
  if (field.id === this.model.otherTradeActionRouter.id) {
704
691
  router = this.model.otherTradeActionRouter;
@@ -19,16 +19,9 @@
19
19
  <img :src="model.fields1Dic.LocationUrl.value" alt="" class="location"/>
20
20
  </div>
21
21
  <div class="title-tags">
22
- <div
23
- class="t-tag"
24
- v-for="(tag, index) in model.actionRouterLabel"
25
- :key="index"
26
- :style="{
27
- color: tag.textColor,
28
- backgroundColor: tag.bgColor,
29
- borderColor: tag.borderColor,
30
- }"
31
- >
22
+ <div class="t-tag"
23
+ v-for="(tag, index) in model.actionRouterLabel" :key="index"
24
+ :style="{ color: tag.textColor, backgroundColor: tag.bgColor,borderColor: tag.borderColor,}">
32
25
  {{ tag.label }}
33
26
  </div>
34
27
  </div>
@@ -38,49 +31,21 @@
38
31
  </div>
39
32
  <div class="head-but">
40
33
  <div>
41
- <component
42
- v-if="model.otherTradeActionRouter !== null"
43
- v-bind="model.otherTradeActionRouter"
44
- class="max-default w93"
45
- :is="model.otherTradeActionRouter.is"
46
- :vmodel="model.otherTradeActionRouter"
47
- :api="model.optionApi"
48
- @click="fieldClickHandler(model.otherTradeActionRouter, $event)"
49
- ></component>
50
- <img
51
- :class="{ domDisabled: flagDisabledPrev }"
52
- @click="clickPrevHandler"
53
- src="../../../assets/T.png"
54
- alt=""
55
- style="
56
- width: 26px;
57
- height: 26px;
58
- vertical-align: bottom;
59
- margin-left: 20px;
60
- cursor: pointer;
61
- "
62
- />
63
- <img
64
- :class="{ domDisabled: flagDisabledNext }"
65
- @click="clickNextHandler"
66
- src="../../../assets/B.png"
67
- alt=""
68
- style="
69
- width: 26px;
70
- height: 26px;
71
- vertical-align: bottom;
72
- margin-left: 15px;
73
- margin-right: 13px;
74
- cursor: pointer;
75
- "
76
- />
34
+ <component v-if="model.otherTradeActionRouter !== null" v-bind="model.otherTradeActionRouter" class="max-default w93"
35
+ :is="model.otherTradeActionRouter.is" :vmodel="model.otherTradeActionRouter" :api="model.optionApi"
36
+ @click="fieldClickHandler(model.otherTradeActionRouter, $event)">
37
+ </component>
38
+ <img :class="{ domDisabled: flagDisabledPrev }" @click="clickPrevHandler"
39
+ src="../../../assets/T.png" alt=""
40
+ style=" width: 26px; height: 26px;vertical-align: bottom; margin-left: 20px;cursor: pointer;"/>
41
+ <img :class="{ domDisabled: flagDisabledNext }" @click="clickNextHandler"
42
+ src="../../../assets/B.png" alt=""
43
+ style=" width: 26px; height: 26px;vertical-align: bottom; margin-left: 15px; margin-right: 13px; cursor: pointer;"/>
77
44
  </div>
78
45
  <div class="mt5">
79
46
  <component
80
47
  class="max-report w93"
81
- v-if="
82
- model.actionRouters !== null && model.actionRouters[0] !== null
83
- "
48
+ v-if=" model.actionRouters !== null && model.actionRouters[0] !== null"
84
49
  :is="model.actionRouters[0].is"
85
50
  :vmodel="model.actionRouters[0]"
86
51
  :api="model.optionApi"
@@ -98,26 +63,14 @@
98
63
  ></component>
99
64
  </div>
100
65
  <div class="mt5">
101
- <button
102
- type="button"
103
- class="
104
- el-button el-button--info el-button--mini
105
- max-report
106
- rel
107
- w93
108
- "
109
- v-if="
110
- model.actionRoutersMoreList !== null &&
111
- model.actionRoutersMoreList.length > 0
112
- "
113
- >
66
+ <button type="button"
67
+ class="el-button el-button--info el-button--mini max-report rel w93"
68
+ v-if=" model.actionRoutersMoreList !== null && model.actionRoutersMoreList.length > 0">
114
69
  <img src="../../../assets/dian.png" alt="" class="report" />
115
70
  <ul class="report-cont">
116
- <li
117
- v-for="(col, index) in model.actionRoutersMoreList"
71
+ <li v-for="(col, index) in model.actionRoutersMoreList"
118
72
  :key="index"
119
- v-if="col.show !== false"
120
- >
73
+ v-if="col.show !== false">
121
74
  <component
122
75
  class="max-report w93"
123
76
  :is="col.is"
@@ -129,9 +82,7 @@
129
82
  </ul>
130
83
  </button>
131
84
  <component
132
- v-else-if="
133
- model.actionRouters !== null && model.actionRouters.length === 3
134
- "
85
+ v-else-if=" model.actionRouters !== null && model.actionRouters.length === 3 "
135
86
  class="max-report w93"
136
87
  :is="model.actionRouters[2].is"
137
88
  :vmodel="model.actionRouters[2]"
@@ -158,7 +109,10 @@
158
109
  <span>{{ model.fields1Dic.Price.label }}</span>
159
110
  <span class="base-clolr expand-f" v-html="model.fields1Dic.Price.value"></span>
160
111
  <span class="base-clolr">{{ model.fields1Dic.Price.unitName}}</span>
161
- <img src="../../../assets/jsq.png" class="img-jsq" alt="" />
112
+ <component v-if="model.actionRouterPrice" class="ml10" style="display: flex;"
113
+ :is="model.actionRouterPrice.is" :vmodel="model.actionRouterPrice" :api="model.optionApi"
114
+ @click="fieldClickHandler(model.actionRouterPrice, $event)">
115
+ </component>
162
116
  </div>
163
117
  <div class="row-i">
164
118
  <span>{{ model.fields1Dic.PriceUnit.label }}</span>
@@ -242,17 +196,8 @@
242
196
  <div style="position: relative">
243
197
  <div ref="tabsbox" style="position: absolute; left: -10000px">
244
198
  <el-tabs>
245
- <el-tab-pane
246
- v-for="(col, index) in model.tags1"
247
- :key="col.appID"
248
- :index="index.toString()"
249
- :name="index.toString()"
250
- >
251
- <div
252
- slot="label"
253
- v-html="col.appName"
254
- :ref="'StatisticsItem' + index"
255
- ></div>
199
+ <el-tab-pane v-for="(col, index) in model.tags1" :key="col.appID" :index="index.toString()" :name="index.toString()">
200
+ <div slot="label" v-html="col.appName" :ref="'StatisticsItem' + index"></div>
256
201
  </el-tab-pane>
257
202
  </el-tabs>
258
203
  </div>
@@ -869,14 +814,9 @@ export default {
869
814
  var self = this;
870
815
  var callBack = null;
871
816
  let submitData = {};
872
- var router = this.model.actionRouters.find((v) => {
817
+ var router = this.model.actionRoutersAll.find((v) => {
873
818
  return v.id === field.id;
874
819
  });
875
- if (router == undefined && this.model.actionRoutersMoreList) {
876
- router = this.model.actionRoutersMoreList.find((v) => {
877
- return v.id === field.id;
878
- });
879
- }
880
820
  if (router == undefined && this.model.otherTradeActionRouter) {
881
821
  if (field.id === this.model.otherTradeActionRouter.id) {
882
822
  router = this.model.otherTradeActionRouter;
@@ -1007,9 +947,7 @@ export default {
1007
947
  else if (field.isSearchPageInTab) {
1008
948
  // 外部框架tab页打开
1009
949
  submitData = field.getActionPara(submitData).para;
1010
- self.$common
1011
- .getDataDrivenOpts()
1012
- .handler.openTabSearch(field, submitData);
950
+ self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
1013
951
  }
1014
952
  else if (field.isBrowserNewTab) {
1015
953
  // 浏览器打开
@@ -0,0 +1,19 @@
1
+ /*
2
+ * @Author: linchunmei 179466780@qq.com
3
+ * @Date: 2022-07-07 11:00:16
4
+ * @LastEditors: linchunmei 179466780@qq.com
5
+ * @LastEditTime: 2022-07-07 11:01:26
6
+ * @FilePath: \js-sdk-v3\src\centaline\dynamicDragSort\index.js
7
+ * @Description: 排序拖拽组件
8
+ */
9
+ import dynamicDragSort from './src/dynamicDragSort'
10
+
11
+ dynamicDragSort.install = function (Vue) {
12
+ Vue.component(dynamicDragSort.name, dynamicDragSort);
13
+ }
14
+
15
+ if (typeof window !== 'undefined' && window.Vue) {
16
+ window.Vue.use(dynamicDragSort);
17
+ }
18
+
19
+ export default dynamicDragSort;
@@ -0,0 +1,197 @@
1
+ <template>
2
+ <!--使用draggable组件-->
3
+ <div class="dragCol">
4
+ <div class="dragItem">
5
+ <el-checkbox id="all" v-model="checkAll" @change="handleAllChecked" class="checkbox-common">{{ controlLabel
6
+ }}
7
+ </el-checkbox>
8
+ <span class="svgIcon">
9
+ <!-- <svg-icon icon-class="sort" style="cursor: pointer"></svg-icon> -->
10
+ </span>
11
+ </div>
12
+ <draggable v-model="testList" :options="{ group: { name: 'itxst', pull: 'clone' }, sort: true }" animation="300"
13
+ :move="onMove" dragClass="dragClass" ghostClass="ghostClass" chosenClass="chosenClass"
14
+ @input="handleListChange($event)">
15
+ <transition-group>
16
+ <div class="dragItem canDragon" v-for="(item, index) in testList" :key="index">
17
+ <el-checkbox v-model="item.checked" :disabled="item.locked" name="checkItem"
18
+ @change="handleChecked(item, $event)" class="checkbox-common"> {{ item.displayName
19
+ }}</el-checkbox>
20
+ <span class="svgIcon">
21
+ <img :src="iconSort" alt="" width="100%" />
22
+ </span>
23
+ </div>
24
+ </transition-group>
25
+ </draggable>
26
+ </div>
27
+ </template>
28
+
29
+ <script>
30
+ //导入draggable组件
31
+ import draggable from 'vuedraggable'
32
+
33
+ export default {
34
+ //注册draggable组件
35
+ name: 'ct-dragSort',
36
+ components: {
37
+ draggable,
38
+ },
39
+ props: {
40
+ vmodel: Object,
41
+ api: String,
42
+ },
43
+ data() {
44
+ return {
45
+ iconSort: require("../../../assets/sort.png"),
46
+ drag: false,
47
+ checkAll: true,
48
+ controlLabel: '列名',
49
+ //定义要被拖拽对象的数组
50
+ testList: [],
51
+ };
52
+ },
53
+ watch: {
54
+ testList: { // 监听事件,监听复选框是否全部选中,全部选中则全选的复选框勾选上
55
+ handler(val) {
56
+ var i = 0
57
+ this.testList.forEach(item => {
58
+ if (item.checked === true) {
59
+ i++
60
+ }
61
+ if (i === this.testList.length) {
62
+ this.checkAll = true
63
+ } else {
64
+ this.checkAll = false
65
+ }
66
+ })
67
+ },
68
+ deep: true
69
+ }
70
+ },
71
+ created() {
72
+ console.log('draglist', this.vmodel.dragList);
73
+ this.$nextTick(function () {
74
+ if (typeof this.vmodel === 'undefined') {
75
+ this.model = this.loaderObj.DragSort(this.source);
76
+ }
77
+ else {
78
+ this.model = this.vmodel;
79
+ this.testList = this.vmodel.dragList;
80
+ console.log('this.testList', this.testList);
81
+ }
82
+ });
83
+
84
+ this.testList.forEach(item => { // 处理后端传过来的数据,如果没有可以判断是否勾选复选框的字段,则需给数据作处理,加上一个isChecked字段,判断复选框勾选
85
+ this.$set(item, 'checked', false) // 添加判断的字段
86
+ })
87
+ },
88
+ methods: {
89
+ // 更新位置
90
+ handleListChange(event) {
91
+ console.log(event);
92
+ this.testList = event;
93
+
94
+ this.testList.forEach((item, i) => {
95
+ this.model.dragList.splice(i, 1, item)
96
+ })
97
+
98
+ console.log('handleListChange-testList', this.testList);
99
+ console.log('this.model.code1', this.model.code1);
100
+ },
101
+ //move回调方法
102
+ onMove(e, originalEvent) {
103
+ },
104
+ //开始拖拽事件
105
+ onStart() {
106
+ this.drag = true;
107
+ },
108
+ //拖拽结束事件
109
+ onEnd() {
110
+ this.drag = false;
111
+ // this.handleListChange()
112
+ },
113
+ handleAllChecked(v) { // 实现全选,反选(点击会传递true或者false过来)
114
+ this.testList.map(item => {
115
+ if (!item.locked) {
116
+ item.checked = v
117
+ } else {
118
+ return false
119
+ }
120
+ })
121
+ this.vmodel.draglist = this.testList
122
+ console.log('this.vmodel.draglist', this.vmodel.dragList);
123
+ },
124
+ handleChecked(item, e) { // 单个选中
125
+ item.checked = e
126
+ console.log('this.testList', this.testList);
127
+ this.vmodel.draglist = this.testList
128
+ console.log('this.vmodel.draglist', this.vmodel.dragList);
129
+ }
130
+ }
131
+ }
132
+ </script>
133
+ <style scoped>
134
+ /*定义要拖拽元素的样式*/
135
+ .ghostClass {
136
+ background-color: #fff !important;
137
+ }
138
+
139
+ .chosenClass {
140
+ background-color: #ccc !important;
141
+ opacity: 1 !important;
142
+ }
143
+
144
+ /* 拖拽过程 */
145
+ .dragClass {
146
+ background-color: #fff !important;
147
+ opacity: 1 !important;
148
+ box-shadow: none !important;
149
+ outline: none !important;
150
+ background-image: none !important;
151
+ }
152
+
153
+ .dragCol {
154
+ width: 100%;
155
+ flex: 1;
156
+ border-radius: 5px;
157
+ float: left;
158
+ }
159
+
160
+ .dragCol+.dragCol {
161
+ margin-left: 10px;
162
+ }
163
+
164
+ .dragItem {
165
+ width: auto;
166
+ padding: 12px 10px;
167
+ margin: 0 -5px;
168
+ border-bottom: solid 1px #eee;
169
+ display: flex;
170
+ flex-flow: row nowrap;
171
+ justify-content: space-between;
172
+ }
173
+
174
+ .dragItem:hover {
175
+ background-color: #F5F7FA;
176
+ cursor: move;
177
+ }
178
+
179
+ .dragItem+.dragItem {
180
+ border-top: none;
181
+ }
182
+
183
+ #all {
184
+ color: #909399;
185
+ font-weight: 700;
186
+ }
187
+
188
+ .svgIcon {
189
+ width: 16px;
190
+ text-align: center;
191
+ cursor: pointer
192
+ }
193
+
194
+ /* .checkbox-common>>>span.el-checkbox__label {
195
+ padding-left: 30px;
196
+ } */
197
+ </style>
@@ -28,7 +28,7 @@
28
28
  @input="inputHandler(model.currentRow.data[v.id], model.currentRow.data.$sourceIndex)"></component>
29
29
  </span>
30
30
  <span v-else-if="v.is=='ct-sensitiveeye'">
31
- <component v-if ref="Fields" :is="v.is" :vmodel="scope.row[v.id]" :vrowmodel="scope.row" :api="model.OptApi"></component>
31
+ <component ref="Fields" :is="v.is" :vmodel="scope.row[v.id]" :vrowmodel="scope.row" :api="model.OptApi"></component>
32
32
  </span>
33
33
  <!--可点击的列-->
34
34
  <span v-else-if="v.router" :class="'cell'" style="display: flex;">
@@ -26,6 +26,7 @@
26
26
  {{model.labelValue}}
27
27
  </label>
28
28
  <span slot="suffix" v-if="model.unitName" class="ct-unitnameLable">{{model.unitName}}</span>
29
+ <span v-if="model.sufLabel" style="width:auto" class="spanMessage">{{model.sufLabel}}</span>
29
30
  </div>
30
31
  </div>
31
32
  </div>
@@ -17,6 +17,7 @@
17
17
  mixins: [dynamicElement],
18
18
  props: {
19
19
  vmodel: Object,
20
+ rowdata: Object,
20
21
  actionRouter: Array,
21
22
  rowindex: Number,
22
23
  forname: String,
@@ -9,8 +9,10 @@
9
9
  mixins: [dynamicElement],
10
10
  props: {
11
11
  vmodel: Object,
12
+ rowdata: Object,
13
+ actionRouter: Array,
12
14
  rowindex: Number,
13
- forname: String,
15
+ forname: String,
14
16
  forrowindex: String
15
17
  },
16
18
  data() {
@@ -277,20 +277,20 @@ export default {
277
277
  if (rtn) {
278
278
  self.$forceUpdate();
279
279
  self.$nextTick(() => {
280
- if (
281
- self.$refs.tableParent.scrollHeight <=
282
- self.$refs.tableParent.offsetHeight
283
- ) {
284
- self.tableLoading = true;
285
- self.model.nextPage(next);
286
- } else {
287
- self.tableLoading = false;
288
- self.rowColorChange();
289
-
290
- self.calculatingRowHeight();
280
+ if(!self.isLayout){
281
+ if (self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
282
+ self.tableLoading = true;
283
+ self.model.nextPage(next);
284
+ }
285
+ else {
286
+ self.tableLoading = false;
287
+ self.rowColorChange();
288
+ self.calculatingRowHeight();
289
+ }
291
290
  }
292
291
  });
293
- } else {
292
+ }
293
+ else {
294
294
  self.tableLoading = false;
295
295
  }
296
296
  };
@@ -569,34 +569,24 @@ export default {
569
569
  setTableHeight() {
570
570
  var self = this;
571
571
  this.$nextTick(() => {
572
- if (
573
- this.$refs.searchTable &&
574
- this.$refs.toolbar &&
575
- this.$refs.searchTable.parentElement &&
576
- !self.isLayout
577
- ) {
572
+ if (this.$refs.searchTable && this.$refs.toolbar &&
573
+ this.$refs.searchTable.parentElement &&!self.isLayout) {
578
574
  var h1 = this.$refs.searchTable.parentElement.offsetHeight | 0;
579
575
  var h2 = this.$refs.searchTable.offsetTop | 0;
580
576
  var h3 = this.$refs.toolbar.$el.offsetHeight | 0;
581
577
  var h4 = this.$refs.footer.$el.offsetHeight | 0;
582
578
  var h5 = this.$refs.listHeader.$el.offsetHeight | 0;
583
579
  var h6 = this.$refs.listFooter.$el.offsetHeight | 0;
584
- var h7 = this.$refs.tableStats
585
- ? (this.$refs.tableStats.$el.offsetHeight + 7) | 0
586
- : 0;
580
+ var h7 = this.$refs.tableStats ? (this.$refs.tableStats.$el.offsetHeight + 7) | 0: 0;
587
581
  let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - h7 - 22;
588
582
  this.model.tableHeight = tableHeight < 40 ? 350 : tableHeight;
589
583
  this.$nextTick(() => {
590
584
  self.getScrollAttr();
591
585
  });
592
- } else {
593
- if (
594
- this.$parent.$parent.$vnode.componentOptions.tag ===
595
- "ct-PropertySimpleDetailRET"
596
- ) {
597
- var h1 =
598
- this.$parent.$parent.$parent.$parent.$refs.sidebar.offsetHeight |
599
- 0;
586
+ }
587
+ else {
588
+ if (this.$parent.$parent.$vnode.componentOptions.tag === "ct-PropertySimpleDetailRET") {
589
+ var h1 = this.$parent.$parent.$parent.$parent.$refs.sidebar.offsetHeight | 0;
600
590
  var h2 = 0;
601
591
  if (this.$parent.$parent.$refs.contact) {
602
592
  h2 = this.$parent.$parent.$refs.contact.offsetHeight | 0;
@@ -59,7 +59,7 @@ const Base = function (source) {
59
59
  source.code2 = v;
60
60
  },
61
61
  get labelValue() {
62
- if (source.code1)
62
+ if (source.code1!=undefined && source.code1!=null)
63
63
  return source.code1;
64
64
  else
65
65
  return '';