centaline-data-driven 1.3.0 → 1.3.3

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.00",
3
+ "version": "1.3.03",
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
@@ -2,7 +2,7 @@
2
2
  <div id="app-form" class="data-driven" style="width:100%;height:100%;overflow:auto">
3
3
  <!-- <ct-form :api="'/PropertyRET/getLayoutOfNew'" :apiParam="apiParam"></ct-form> -->
4
4
  <!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
5
- <ct-form :api="'/api/third-dept-tran/transaction/detail'" :apiParam="apiParam"></ct-form>
5
+ <ct-form :api="'/api/third-dept-tran/transaction/detail'" :apiParam="apiParam" @submit="submit"></ct-form>
6
6
  <!--<ct-form :api="'api/Form/formdata'"></ct-form>-->
7
7
  <ct-dialog-list></ct-dialog-list>
8
8
  </div>
@@ -25,6 +25,43 @@ pageTitle: "成交报告",
25
25
  methods: {
26
26
  test111(val) {
27
27
  alert(JSON.stringify(val));
28
+ },
29
+ submit(formData) {
30
+ window.parent.postMessage({
31
+ functionName: 'delete',
32
+ params: {
33
+ success: true,
34
+ data: null,
35
+ }
36
+ }, '*');
37
+ window.parent.postMessage({
38
+ functionName: 'update',
39
+ params: {
40
+ success: true,
41
+ data: null,
42
+ }
43
+ }, '*');
44
+ window.parent.postMessage({
45
+ functionName: 'refresh',
46
+ params: {
47
+ success: true,
48
+ data: null,
49
+ }
50
+ }, '*');
51
+ window.parent.postMessage({
52
+ functionName: 'close',
53
+ params: {
54
+ success: true,
55
+ data: null,
56
+ }
57
+ }, '*');
58
+ window.parent.postMessage({
59
+ functionName: 'new',
60
+ params: {
61
+ success: true,
62
+ data: '453FBDDF-1F56-4A1D-AB9E-F70C3681EB1C',
63
+ }
64
+ }, '*');
28
65
  }
29
66
  }
30
67
  }
@@ -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,94 @@
1
+ <template>
2
+ <div style="width:100%;height:100%;">
3
+ <iframe :src="src" ref="iframe" id="iframe1" style="width:100%;height:100%;"></iframe>
4
+ </div>
5
+ </template>
6
+ <script>
7
+ window.addEventListener('message', handleMessage1) ;
8
+ function handleMessage1 (event) {
9
+ debugger
10
+ var self=this;
11
+ var data = event.data;
12
+ switch (data.functionName) {
13
+ case 'new':
14
+ self.$emit('new',data.params.data);
15
+ break
16
+ case 'update':
17
+ self.$emit('update');
18
+ break
19
+ case 'delete':
20
+ self.$emit('delete');
21
+ break
22
+ case 'refresh':
23
+ self.$emit('refreshParent');
24
+ break
25
+ case 'close':
26
+ self.$emit('closeDialog');
27
+ break
28
+ }
29
+ }
30
+ export default {
31
+ name: 'ct-iframe',
32
+ props: {
33
+ src:String,
34
+ },
35
+ data() {
36
+ return {
37
+
38
+ };
39
+ },
40
+ mounted () {
41
+ window.addEventListener('message', this.handleMessage)
42
+ },
43
+ handleMessage (event) {
44
+ debugger
45
+ var self=this;
46
+ var data = event.data;
47
+ switch (data.functionName) {
48
+ case 'new':
49
+ self.$emit('new',data.params.data);
50
+ break
51
+ case 'update':
52
+ self.$emit('update');
53
+ break
54
+ case 'delete':
55
+ self.$emit('delete');
56
+ break
57
+ case 'refresh':
58
+ self.$emit('refreshParent');
59
+ break
60
+ case 'close':
61
+ self.$emit('closeDialog');
62
+ break
63
+ }
64
+ },
65
+ methods: {
66
+
67
+ handleMessage (event) {
68
+ debugger
69
+ var self=this;
70
+ var data = event.data;
71
+ switch (data.functionName) {
72
+ case 'new':
73
+ self.$emit('new',data.params.data);
74
+ break
75
+ case 'update':
76
+ self.$emit('update');
77
+ break
78
+ case 'delete':
79
+ self.$emit('delete');
80
+ break
81
+ case 'refresh':
82
+ self.$emit('refreshParent');
83
+ break
84
+ case 'close':
85
+ self.$emit('closeDialog');
86
+ break
87
+ }
88
+ },
89
+ }
90
+ }
91
+ </script>
92
+ <style scoped>
93
+
94
+ </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
  })
@@ -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",