centaline-data-driven 1.3.41 → 1.3.44

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": "centaline-data-driven",
3
- "version": "1.3.41",
3
+ "version": "1.3.44",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/src/Detail.vue CHANGED
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div id="appDetail" style="height:100%;">
3
- <ct-Detail :api="'PropertyRET/readDetailForBrowse'" :apiParam="apiParam" :pageType="'PropertyDetailRET'"></ct-Detail>
3
+ <ct-Detail :api="'PropertyOFI/readDetailForBrowse'" :apiParam="apiParam" :pageType="'PropertyDetailOFI'"></ct-Detail>
4
4
  <ct-dialog-list></ct-dialog-list>
5
5
  </div>
6
6
  </template>
@@ -10,7 +10,7 @@
10
10
  name: 'DataDrivendetail',
11
11
  data() {
12
12
  return {
13
- apiParam: {actionType: 1,chanceID: "1524555083688316928"} ,
13
+ apiParam: {actionType: 1,chanceID: "1524955049590132736"} ,
14
14
  }
15
15
  },
16
16
  mounted() {
@@ -11,6 +11,9 @@
11
11
  <span> {{ model.fields1Dic.BuildingName.value }}</span>
12
12
  <span>{{ model.fields1Dic.RoomNo.value }}</span>
13
13
  <img :src="model.actionRouterFavorite.imgUrl" alt="" @click="fieldClickHandler(model.actionRouterFavorite, $event)" class="collection" />
14
+ <component v-if="model.otherTradeActionRouter !== null" v-bind="model.otherTradeActionRouter" class="max-default w93"
15
+ :is="model.otherTradeActionRouter.is" :vmodel="model.otherTradeActionRouter" :api="model.optionApi" style="margin-left: 10px;"
16
+ @click="fieldClickHandler(model.otherTradeActionRouter, $event)"></component>
14
17
  </div>
15
18
  <div class="title-other">
16
19
  <span>{{ model.fields1Dic.PropertyNo.label }}{{ model.fields1Dic.PropertyNo.value }}</span>
@@ -24,44 +27,23 @@
24
27
  {{ tag.label }}
25
28
  </div>
26
29
  </div>
27
- <div
28
- v-if="model.fields1Dic.PropertyDepict"
29
- v-html="model.fields1Dic.PropertyDepict.value"
30
- style="
31
- font-weight: bold;
32
- font-size: 13px;
33
- margin-top: 10px;
34
- background: rgb(236, 249, 255);
35
- flex: 1;
36
- align-items: center;
37
- padding: 5px;
38
- border-radius: 5px;
39
- "
40
- ></div>
30
+ <div v-if="model.fields1Dic.PropertyDepict" v-html="model.fields1Dic.PropertyDepict.value"
31
+ style=" font-weight: bold; font-size: 13px; margin-top: 10px; background: rgb(236, 249, 255);
32
+ flex: 1; align-items: center; padding: 5px; border-radius: 5px;">
33
+ </div>
41
34
  </div>
42
35
  <div class="head-but">
43
36
  <div>
44
- <component v-if="model.otherTradeActionRouter !== null" v-bind="model.otherTradeActionRouter" class="max-default w93"
45
- :is="model.otherTradeActionRouter.is" :vmodel="model.otherTradeActionRouter" :api="model.optionApi"
46
- @click="fieldClickHandler(model.otherTradeActionRouter, $event)"></component>
47
- <img :class="{domDisabled:flagDisabledPrev,}" @click="clickPrevHandler"
48
- src="../../../assets/T.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left: 20px;cursor: pointer;"/>
49
- <img :class="{domDisabled:flagDisabledNext,}" @click="clickNextHandler"
50
- src="../../../assets/B.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left: 15px;margin-right: 13px;cursor: pointer;"/>
51
- </div>
52
- <div class="mt5">
53
37
  <component class="max-report w93"
54
38
  v-if="model.actionRouters !== null && model.actionRouters[0] !== null"
55
39
  :is="model.actionRouters[0].is" :vmodel="model.actionRouters[0]" :api="model.optionApi"
56
- @click="fieldClickHandler(model.actionRouters[0], $event)"
57
- ></component>
40
+ @click="fieldClickHandler(model.actionRouters[0], $event)">
41
+ </component>
58
42
  <component class="max-report w93"
59
43
  v-if="model.actionRouters !== null && model.actionRouters[1] !== null"
60
44
  :is="model.actionRouters[1].is" :vmodel="model.actionRouters[1]" :api="model.optionApi"
61
- @click="fieldClickHandler(model.actionRouters[1], $event)"
62
- ></component>
63
- </div>
64
- <div class="mt5">
45
+ @click="fieldClickHandler(model.actionRouters[1], $event)">
46
+ </component>
65
47
  <button type="button" class="el-button el-button--info el-button--mini max-report rel w93"
66
48
  v-if="model.actionRoutersMoreList !== null && model.actionRoutersMoreList.length > 0">
67
49
  <img src="../../../assets/dian.png" alt="" class="report" />
@@ -76,6 +58,10 @@
76
58
  :is="model.actionRouters[2].is" :vmodel="model.actionRouters[2]" :api="model.optionApi"
77
59
  @click="fieldClickHandler(model.actionRouters[2], $event)">
78
60
  </component>
61
+ <img :class="{domDisabled:flagDisabledPrev,}" @click="clickPrevHandler"
62
+ src="../../../assets/T.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left: 10px;cursor: pointer;"/>
63
+ <img :class="{domDisabled:flagDisabledNext,}" @click="clickNextHandler"
64
+ src="../../../assets/B.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left: 10px;margin-right: 13px;cursor: pointer;"/>
79
65
  </div>
80
66
  </div>
81
67
  </div>
@@ -11,6 +11,10 @@
11
11
  <span> {{ model.fields1Dic.BuildingName.value }}</span>
12
12
  <span>{{ model.fields1Dic.RoomNo.value }}</span>
13
13
  <img :src="model.actionRouterFavorite.imgUrl" alt="" @click="fieldClickHandler(model.actionRouterFavorite, $event)" class="collection" />
14
+ <component v-if="model.otherTradeActionRouter !== null" v-bind="model.otherTradeActionRouter" class="max-default w93"
15
+ :is="model.otherTradeActionRouter.is" :vmodel="model.otherTradeActionRouter" :api="model.optionApi" style="margin-left: 10px;"
16
+ @click="fieldClickHandler(model.otherTradeActionRouter, $event)">
17
+ </component>
14
18
  </div>
15
19
  <div class="title-other">
16
20
  <span>{{ model.fields1Dic.PropertyNo.label }}{{ model.fields1Dic.PropertyNo.value }}</span>
@@ -19,8 +23,7 @@
19
23
  <img :src="model.fields1Dic.LocationUrl.value" alt="" class="location"/>
20
24
  </div>
21
25
  <div class="title-tags">
22
- <div class="t-tag"
23
- v-for="(tag, index) in model.actionRouterLabel" :key="index"
26
+ <div class="t-tag" v-for="(tag, index) in model.actionRouterLabel" :key="index"
24
27
  :style="{ color: tag.textColor, backgroundColor: tag.bgColor,borderColor: tag.borderColor,}">
25
28
  {{ tag.label }}
26
29
  </div>
@@ -31,65 +34,33 @@
31
34
  </div>
32
35
  <div class="head-but">
33
36
  <div>
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;"/>
44
- </div>
45
- <div class="mt5">
46
- <component
47
- class="max-report w93"
37
+ <component class="max-report w93"
48
38
  v-if=" model.actionRouters !== null && model.actionRouters[0] !== null"
49
- :is="model.actionRouters[0].is"
50
- :vmodel="model.actionRouters[0]"
51
- :api="model.optionApi"
52
- @click="fieldClickHandler(model.actionRouters[0], $event)"
53
- ></component>
54
- <component
55
- class="max-report w93"
56
- v-if="
57
- model.actionRouters !== null && model.actionRouters[1] !== null
58
- "
59
- :is="model.actionRouters[1].is"
60
- :vmodel="model.actionRouters[1]"
61
- :api="model.optionApi"
62
- @click="fieldClickHandler(model.actionRouters[1], $event)"
63
- ></component>
64
- </div>
65
- <div class="mt5">
66
- <button type="button"
67
- class="el-button el-button--info el-button--mini max-report rel w93"
39
+ :is="model.actionRouters[0].is" :vmodel="model.actionRouters[0]" :api="model.optionApi"
40
+ @click="fieldClickHandler(model.actionRouters[0], $event)"></component>
41
+ <component class="max-report w93"
42
+ v-if="model.actionRouters !== null && model.actionRouters[1] !== null"
43
+ :is="model.actionRouters[1].is" :vmodel="model.actionRouters[1]" :api="model.optionApi"
44
+ @click="fieldClickHandler(model.actionRouters[1], $event)"></component>
45
+ <button type="button" class="el-button el-button--info el-button--mini max-report rel w93"
68
46
  v-if=" model.actionRoutersMoreList !== null && model.actionRoutersMoreList.length > 0">
69
47
  <img src="../../../assets/dian.png" alt="" class="report" />
70
48
  <ul class="report-cont">
71
- <li v-for="(col, index) in model.actionRoutersMoreList"
72
- :key="index"
73
- v-if="col.show !== false">
74
- <component
75
- class="max-report w93"
76
- :is="col.is"
77
- :vmodel="col"
78
- :api="model.optionApi"
79
- @click="fieldClickHandler(col, $event)"
80
- ></component>
49
+ <li v-for="(col, index) in model.actionRoutersMoreList" :key="index" v-if="col.show !== false">
50
+ <component class="max-report w93" :is="col.is" :vmodel="col" :api="model.optionApi" @click="fieldClickHandler(col, $event)"></component>
81
51
  </li>
82
52
  </ul>
83
53
  </button>
84
- <component
85
- v-else-if=" model.actionRouters !== null && model.actionRouters.length === 3 "
86
- class="max-report w93"
87
- :is="model.actionRouters[2].is"
88
- :vmodel="model.actionRouters[2]"
89
- :api="model.optionApi"
90
- @click="fieldClickHandler(model.actionRouters[2], $event)"
91
- >
54
+ <component v-else-if=" model.actionRouters !== null && model.actionRouters.length === 3 " class="max-report w93"
55
+ :is="model.actionRouters[2].is" :vmodel="model.actionRouters[2]" :api="model.optionApi"
56
+ @click="fieldClickHandler(model.actionRouters[2], $event)">
92
57
  </component>
58
+ <img :class="{ domDisabled: flagDisabledPrev }" @click="clickPrevHandler"
59
+ src="../../../assets/T.png" alt=""
60
+ style=" width: 26px; height: 26px;vertical-align: bottom; margin-left: 10px;cursor: pointer;"/>
61
+ <img :class="{ domDisabled: flagDisabledNext }" @click="clickNextHandler"
62
+ src="../../../assets/B.png" alt=""
63
+ style=" width: 26px; height: 26px;vertical-align: bottom; margin-left: 10px; margin-right: 13px; cursor: pointer;"/>
93
64
  </div>
94
65
  </div>
95
66
  </div>
@@ -971,8 +942,7 @@ export default {
971
942
  };
972
943
  self.$common.openDialog(dialogOption);
973
944
  }
974
- else if (field.isFormPageInTab) {
975
- // 外部框架tab页打开
945
+ else if (field.isFormPageInTab) {// 外部框架tab页打开
976
946
  submitData = field.getActionPara(submitData).para;
977
947
  self.$common
978
948
  .getDataDrivenOpts()
@@ -984,23 +954,19 @@ export default {
984
954
  field.dialogWidth
985
955
  );
986
956
  }
987
- else if (field.isSearchPageInTab) {
988
- // 外部框架tab页打开
957
+ else if (field.isSearchPageInTab) {// 外部框架tab页打开
989
958
  submitData = field.getActionPara(submitData).para;
990
959
  self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
991
960
  }
992
- else if (field.isBrowserNewTab) {
993
- // 浏览器打开
961
+ else if (field.isBrowserNewTab) {// 浏览器打开
994
962
  submitData = field.getActionPara(submitData).para;
995
963
  let query = self.$common.objectToQueryStr(submitData);
996
964
  window.open(field.action + query, "_blank");
997
965
  }
998
- else if (field.isOpenUrlInBrowse) {
999
- // 浏览器打开
966
+ else if (field.isOpenUrlInBrowse) {// 浏览器打开
1000
967
  window.open(submitData[field.submitFormField], "_blank");
1001
968
  }
1002
- else if (field.isSeeVoice) {
1003
- //看视频
969
+ else if (field.isSeeVoice) {//看视频
1004
970
  self.$common.browseVideo(field, submitData);
1005
971
  }
1006
972
  else {
@@ -63,7 +63,7 @@
63
63
  @tableButtonClick="clickHandler"></component>
64
64
  </el-col>
65
65
  </el-row>
66
- <el-row v-if="model.links.length > -1" style="margin-top: 8px;">
66
+ <el-row v-if="model.links.findIndex((v)=>{return v.show}).length > -1" style="margin-top: 8px;">
67
67
  <el-col :span="24" style="text-align:left">
68
68
  <component v-for="(btn, index) in model.links" :key="index" :is="btn.is" :vmodel="btn" @click="clickHandler" v-if="btn.show"></component>
69
69
  </el-col>
@@ -22,12 +22,27 @@
22
22
  <span class="el-select__tags-text">{{item}}</span>
23
23
  </span>
24
24
  </span>
25
- <label v-else class="ct-lable" :class="{ isWidth: model.labelValue.length > 30 }">
26
- <el-tooltip :content="model.labelValue" placement="top" effect="light" v-if="model.labelValue.length > 30">
27
- <span :class="{ isEllipsis: model.labelValue.length > 30 }"> {{ model.labelValue }}</span>
28
- </el-tooltip>
29
- <span v-else> {{ model.labelValue }}</span>
30
- </label>
25
+ <div v-else style="display:inline-block">
26
+ <!-- --计算占用宽度-- -->
27
+ <div style="position: relative" v-if="isShowComput">
28
+ <label class="ct-lable" style="position: absolute; left: -10000px">
29
+ <span :ref="'computLabel' + model.index"> {{ model.labelValue }}</span>
30
+ </label>
31
+ </div>
32
+ <!-- 展示 -->
33
+ <label class="ct-lable" :style="{ display: (model.labelValue ? 'inline-flex' : '') }">
34
+ <el-tooltip placement="top" effect="light" :disabled="isShowTooltip">
35
+ <div slot="content" :style="{ 'width': (model.labelValue.length > 66 ? '400px' : 'auto') }">{{
36
+ model.labelValue
37
+ }}</div>
38
+ <div class="isEllipsis" :style="{ display: (model.labelValue ? '-webkit-box' : 'none') }"
39
+ @mouseover="onMouseOver('refLabelValue' + model.index, model.index)">
40
+ <span :ref="'refLabelValue' + model.index">{{ model.labelValue
41
+ }}</span>
42
+ </div>
43
+ </el-tooltip>
44
+ </label>
45
+ </div>
31
46
  <span slot="suffix" v-if="model.unitName" class="ct-unitnameLable">{{model.unitName}}</span>
32
47
  <span v-if="model.sufLabel" style="width:auto" class="spanMessage">{{model.sufLabel}}</span>
33
48
  </div>
@@ -44,7 +59,9 @@
44
59
  },
45
60
  data() {
46
61
  return {
47
- }
62
+ isShowTooltip: true,// 是否需要禁止提示
63
+ isShowComput: false
64
+ }
48
65
  },
49
66
  created() {
50
67
  if (typeof this.vmodel === 'undefined') {
@@ -54,19 +71,34 @@
54
71
  this.model = this.vmodel;
55
72
  }
56
73
  this.model.self=this;
74
+ },
75
+ methods: {
76
+ // 移入事件: 判断内容的宽度contentWidth是否大于父级的宽度
77
+ onMouseOver(str, index) {
78
+ this.isShowComput = true
79
+ this.$nextTick(function () {
80
+ if (this.model.labelValue.length > 0) {
81
+ let sumLabelItem = 'computLabel' + index;
82
+ let contentWidth = this.$refs[sumLabelItem].offsetWidth;
83
+ let parentWidth = this.$refs[str].parentNode.offsetWidth;
84
+ // 判断是否禁用tooltip功能
85
+ this.isShowTooltip = contentWidth <= parentWidth;
86
+ this.isShowComput = false
87
+ }
88
+ });
57
89
  }
90
+ }
58
91
  }
59
92
  </script>
60
93
  <style scoped>
61
94
  .isWidth {
62
- width: 60%;
63
- display: flex;
95
+ display: inline-flex;
64
96
  }
65
97
  .isEllipsis {
66
- width: auto;
67
98
  overflow: hidden;
68
- white-space: nowrap;
69
99
  text-overflow: ellipsis;
70
- -o-text-overflow: ellipsis;
100
+ display: -webkit-box;
101
+ -webkit-box-orient: vertical;
102
+ -webkit-line-clamp: 1;
71
103
  }
72
104
  </style>
@@ -89,6 +89,9 @@
89
89
  this.$emit('search', this.model);
90
90
  break;
91
91
  default:
92
+ if (model.type === 15) {
93
+ this.$emit('clickHandler', model);
94
+ }
92
95
  break;
93
96
  }
94
97
 
@@ -36,14 +36,7 @@
36
36
  };
37
37
  },
38
38
  created() {
39
- this.$watch('model.value', (n, o) => {
40
- if (typeof this.model.child !== 'undefined') {
41
- for (var item of this.model.child) {
42
- item.value = item.defaultValue || '';
43
- item.text = item.defaultText || '';
44
- }
45
- }
46
- });
39
+
47
40
  },
48
41
  mounted() {
49
42
  var self = this;
@@ -62,6 +55,14 @@
62
55
  self.load(data);
63
56
  });
64
57
  }
58
+ self.$watch('model.value', (n, o) => {
59
+ if (typeof self.model.child !== 'undefined') {
60
+ for (var item of self.model.child) {
61
+ item.value = item.defaultValue || '';
62
+ item.text = item.defaultText || '';
63
+ }
64
+ }
65
+ });
65
66
  });
66
67
  },
67
68
  methods: {