centaline-data-driven 1.3.1 → 1.3.4

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.01",
3
+ "version": "1.3.04",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -21,7 +21,6 @@
21
21
  "save": "^2.4.0",
22
22
  "v-viewer": "^1.6.4",
23
23
  "vue": "2.5.17",
24
- "vue-pdf": "^4.3.0",
25
24
  "vue-ueditor-wrap": "^2.5.6",
26
25
  "vuedraggable": "^2.24.3"
27
26
  },
package/src/Form.vue CHANGED
@@ -25,7 +25,7 @@ pageTitle: "成交报告",
25
25
  methods: {
26
26
  test111(val) {
27
27
  alert(JSON.stringify(val));
28
- }
28
+ },
29
29
  }
30
30
  }
31
31
  </script>
@@ -4,14 +4,15 @@
4
4
 
5
5
  <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'" :searchDataApi="'/PropertyRETList/getListOfSearchModel'" :searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"></ct-searchlist> -->
6
6
 
7
- <!-- <ct-searchlist :searchConditionApi="'/SystemParameterList/getLayoutOfSearch'"
8
- :searchDataApi="'/SystemParameterList/getListOfSearchModel'" :apiParam="para"></ct-searchlist> -->
7
+ <ct-searchlist :searchConditionApi="'/ProfileWorklistList/getLayoutOfSearch'"
8
+ :searchCategoryApi="'/ProfileWorklistList/getLayoutOfSearchCategory'"
9
+ :searchDataApi="'/ProfileWorklistList/getListOfSearchModel'" :apiParam="para"></ct-searchlist>
9
10
 
10
- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
11
+ <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
11
12
  :searchDataApi="'/PropertyRETList/getListOfSearchModel'"
12
13
  :searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"
13
14
  :searchStatsApi="'/exampleList/getListStats'"
14
- ></ct-searchlist>
15
+ ></ct-searchlist> -->
15
16
 
16
17
  <ct-dialog-list></ct-dialog-list>
17
18
  </div>
@@ -0,0 +1,11 @@
1
+ import browseIframe from './src/browseIframe'
2
+
3
+ browseIframe.install = function (Vue) {
4
+ Vue.component(browseIframe.name, browseIframe);
5
+ }
6
+
7
+ if (typeof window !== 'undefined' && window.Vue) {
8
+ window.Vue.use(browseIframe);
9
+ }
10
+
11
+ export default browseIframe;
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <div style="width:100%;height:100%;">
3
+ <iframe :src="src" ref="iframe" id="iframe1" name="iframe1" style="width:100%;height:100%;"></iframe>
4
+ </div>
5
+ </template>
6
+ <script>
7
+ export default {
8
+ name: 'ct-iframe',
9
+ props: {
10
+ src:String,
11
+ },
12
+ data() {
13
+ return {
14
+
15
+ };
16
+ },
17
+ mounted () {
18
+ },
19
+ methods: {
20
+ }
21
+ }
22
+ </script>
23
+ <style scoped>
24
+
25
+ </style>
@@ -75,8 +75,10 @@
75
75
  //'class': [
76
76
  // 'dialog-content '
77
77
  //]
78
- }, [
79
- h('table', {
78
+ },
79
+ [
80
+ h('table',
81
+ {
80
82
  attrs: {
81
83
  border: '0',
82
84
  cellspacing: '0',
@@ -92,7 +94,8 @@
92
94
  this.bodyClickHandler(event);
93
95
  }
94
96
  }
95
- }, [
97
+ },
98
+ [
96
99
  h('tbody', {}, [
97
100
  h('tr', {}, [
98
101
  h('td', {
@@ -152,8 +155,7 @@
152
155
  if(self.vmodel.pane && self.vmodel.pane.$el.clientHeight<ph){
153
156
  item.attrs.height=(self.vmodel.pane.$el.clientHeight-40)+'px';
154
157
  }
155
- // console.log(document.body.clientHeight);可见区域高度
156
- // console.log(item.attrs.height)
158
+
157
159
  return h('div', {
158
160
  style: {
159
161
  width: item.attrs.width,
@@ -167,7 +169,13 @@
167
169
  }, [])
168
170
  ]);
169
171
  }
170
- else {
172
+ else {var ph=0;
173
+ if(item.attrs.height){
174
+ ph=parseInt(item.attrs.height.replace('px',''));
175
+ }
176
+ if(self.vmodel.pane && self.vmodel.pane.$el.clientHeight<ph){
177
+ item.attrs.height=(self.vmodel.pane.$el.clientHeight-50)+'px';
178
+ }
171
179
  return h('div', {
172
180
  style: {
173
181
  }
@@ -176,11 +184,11 @@
176
184
  attrs: {
177
185
  name: 'name',
178
186
  id: 'id',
179
- src: 'http://10.88.22.35:3333/#/form',
187
+ src: item.attrs.src,
180
188
  frameborder: '0',
181
189
  align: "left",
182
- width: '100%',
183
- height: '100%',
190
+ width: item.attrs.width,
191
+ height: item.attrs.height,
184
192
  scrolling: "yes"
185
193
  }
186
194
  })
@@ -22,6 +22,7 @@
22
22
  mounted() {
23
23
  this.$common.dialogList = this;
24
24
  this.overflow = document.body.style.overflow;
25
+ window.addEventListener('message', this.handleMessage)
25
26
  },
26
27
  computed: {
27
28
  zindex: function () {
@@ -59,7 +60,28 @@
59
60
  document.body.style.overflow = this.overflow;//出现滚动条
60
61
  document.removeEventListener("touchmove", mo, false);
61
62
  }
62
- }
63
+ },
64
+ handleMessage (event) {
65
+ var self=this;
66
+ var data = event.data;
67
+ switch (data.functionName) {
68
+ case 'new':
69
+ self.$children[0].vmodel.content[0].on.new(data.params.data);
70
+ break
71
+ case 'update':
72
+ self.$children[0].vmodel.content[0].on.update();
73
+ break
74
+ case 'delete':
75
+ self.$children[0].vmodel.content[0].on.delete();
76
+ break
77
+ case 'refresh':
78
+ self.$children[0].vmodel.content[0].on.refreshParent();
79
+ break
80
+ case 'close':
81
+ self.$children[0].vmodel.content[0].on.closeDialog();
82
+ break
83
+ }
84
+ },
63
85
  }
64
86
  }
65
87
  </script>
@@ -2,44 +2,58 @@
2
2
  <template>
3
3
  <div>
4
4
  <div style="position: relative">
5
- <el-carousel
6
- arrow="hover"
7
- height="199px"
8
- :autoplay="false"
9
- indicator-position="none"
10
- :initial-index="getinitialIndex(albumsList)"
11
- >
12
- <template v-for="(item, index) in albumsList.medias">
13
- <el-carousel-item :key="index">
14
- <div class="swiper-i">
15
- <img
16
- :src="item.mediaUrl + '/260/200'"
17
- @click="viewerfile(index)"
18
- />
19
- <img
20
- :src="item.albumBigImageUrl"
21
- alt=""
22
- class="hous-icon"
23
- v-if="item.albumBigImageUrl && item.albumBigImageUrl != ''"
24
- />
25
- </div> </el-carousel-item
26
- ></template>
27
- </el-carousel>
5
+ <template v-if="newMediaAlbums.length > 0">
6
+ <el-carousel
7
+ arrow="hover"
8
+ height="199px"
9
+ :autoplay="false"
10
+ indicator-position="none"
11
+ :initial-index="getinitialIndex(albumsList)"
12
+ >
13
+ <template v-for="(item, index) in albumsList.medias">
14
+ <el-carousel-item :key="index">
15
+ <div class="swiper-i">
16
+ <img :src="getShowUrl(item)" @click="viewerfile(index)" />
17
+ <img
18
+ :src="albumsList.albumBigImageUrl"
19
+ alt=""
20
+ @click="viewerfile(index)"
21
+ class="hous-icon"
22
+ v-if="
23
+ albumsList.albumBigImageUrl &&
24
+ albumsList.albumBigImageUrl != ''
25
+ "
26
+ />
27
+ </div> </el-carousel-item
28
+ ></template>
29
+ </el-carousel>
28
30
 
29
- <div class="hous-img" style="position: absolute; bottom: 0; z-index: 9">
30
- <div class="img-i" v-for="(item, index) in newMediaAlbums" :key="index">
31
- <img
32
- :src="getDefaultUrl(item) + '/140/135'"
33
- @click="handleClick(index)"
34
- />
35
- <div class="img-bot">
36
- <div>
37
- <img :src="item.albumSmallImageUrl" alt="" class="img-icon" />
38
- <span>{{ item.albumName }}</span>
31
+ <div class="hous-img" style="position: absolute; bottom: 0; z-index: 9">
32
+ <div
33
+ class="img-i"
34
+ v-for="(item, index) in newMediaAlbums"
35
+ :key="index"
36
+ >
37
+ <img :src="getDefaultUrl(item)" @click="handleClick(index)" />
38
+ <div class="img-bot">
39
+ <div>
40
+ <img
41
+ :src="item.albumSmallImageUrl"
42
+ v-if="
43
+ item.albumSmallImageUrl && item.albumSmallImageUrl != ''
44
+ "
45
+ alt=""
46
+ class="img-icon"
47
+ @click="handleClick(index)"
48
+ />
49
+ <span @click="handleClick(index)">{{ item.albumName }}</span>
50
+ </div>
39
51
  </div>
40
52
  </div>
41
- </div>
42
- </div>
53
+ </div> </template
54
+ ><template v-else>
55
+ <img :src="noMediaUrl" width="260px" height="199px" @click="addMedia" />
56
+ </template>
43
57
  </div>
44
58
  </div>
45
59
  </template>
@@ -48,12 +62,14 @@ export default {
48
62
  props: {
49
63
  mediaAlbums: Array,
50
64
  title: String,
65
+ noMediaUrl: String,
51
66
  },
52
67
  data() {
53
68
  return {
54
69
  newMediaAlbums: [],
55
70
  albumsList: [],
56
71
  activeAlbumsIndex: 0,
72
+ flagChange: true,
57
73
  };
58
74
  },
59
75
  created() {
@@ -62,7 +78,7 @@ export default {
62
78
  methods: {
63
79
  init() {
64
80
  var self = this;
65
- this.newMediaAlbums = this.mediaAlbums || [];
81
+ this.newMediaAlbums =this.mediaAlbums || [];
66
82
  this.albumsList = this.newMediaAlbums[0];
67
83
  self.$forceUpdate();
68
84
  },
@@ -70,23 +86,36 @@ export default {
70
86
  if (index == this.activeAlbumsIndex) return;
71
87
  this.albumsList = this.newMediaAlbums[index];
72
88
  this.activeAlbumsIndex = index;
89
+ this.flagChange = !this.flagChange;
90
+ this.$forceUpdate();
91
+ },
92
+ addMedia() {
93
+ this.$emit("addMedia");
73
94
  },
74
95
  getinitialIndex(list) {
75
96
  var initialIndex = 0;
76
97
  try {
77
98
  initialIndex = list.medias.findIndex((v) => v.flagDefault == 1) | 0;
78
- } catch (error) {
79
- debugger;
80
- }
99
+ } catch (error) {}
81
100
  return initialIndex < 0 ? 0 : initialIndex;
82
101
  },
83
102
  getDefaultUrl(list) {
84
103
  var initialIndex = this.getinitialIndex(list);
85
- return list.medias[initialIndex].mediaUrl;
104
+ return this.getShowUrl(list.medias[initialIndex]);
105
+ },
106
+
107
+ getShowUrl(list) {
108
+ if (list.mediaTypeID == "2") {
109
+ return list.mediaUrl + "/260/200";
110
+ } else {
111
+ return list.thumbnailUrl;
112
+ }
86
113
  },
87
114
  viewerfile(index) {
88
115
  var self = this;
89
116
 
117
+ var width = parseInt(window.document.body.clientWidth * 0.8);
118
+ width = width > 1160 ? 1160 : width;
90
119
  var dialogOption = {
91
120
  title: this.title || "预览媒体",
92
121
  pane: self.$common.getParentPane(self),
@@ -100,9 +129,7 @@ export default {
100
129
  index: index || 0,
101
130
  // width: self.modelPhotoselect.router.pageWidth + 'px',
102
131
  // height: self.modelPhotoselect.router.pageHeight+'px',
103
- width:
104
- parseInt(window.document.body.clientWidth * 0.8).toString() +
105
- "px",
132
+ width: width + "px",
106
133
  height:
107
134
  parseInt(window.document.body.clientHeight * 0.8).toString() +
108
135
  "px",