centaline-data-driven 1.2.99 → 1.3.0

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.
@@ -173,9 +173,9 @@ export default {
173
173
  },
174
174
  viewerfile(file) {
175
175
  var self = this;
176
- var MediaAlbum = [{ albumName: "媒体", medias: [] }];
176
+ var MediaAlbum = [{ albumName: this.model.label||"媒体", medias: [] }];
177
177
 
178
- let fileList = this.model.sourceList.filter((item) => {
178
+ let fileList = this.model.sourceList.filter((item) => {
179
179
  return item.flagDeleted !== true;
180
180
  });
181
181
  fileList.forEach((v) => {
@@ -185,7 +185,7 @@ export default {
185
185
  (v) => v.mediaID === file.source.mediaID
186
186
  );
187
187
  var dialogOption = {
188
- title: "预览媒体",
188
+ title: this.model.label||"预览媒体",
189
189
  pane: self.$common.getParentPane(self),
190
190
  content: [
191
191
  {
@@ -9,7 +9,7 @@
9
9
 
10
10
  <ct-searchscreen ref="screen" :api="searchConditionApi" :key="reloadKeyScreen"
11
11
  @loaded="screenLoaded" :screenPara="screenPara"
12
- :categoryLoaded="loaded.categoryLoaded" @search="search()"
12
+ :categoryLoaded="loaded.categoryLoaded" @search="search()" @saveShortcut="saveShortcut"
13
13
  @showTitle="showTitleScreenHandler"></ct-searchscreen>
14
14
 
15
15
  <ct-searchtable ref="table" :api="searchDataApi" :searchStatsApi="searchStatsApi" :from="from" @loaded="tableLoaded"
@@ -274,6 +274,9 @@
274
274
  this.rowClickHandle();
275
275
  this.$refs.table.refreshFromSimple(field,data);
276
276
  },
277
+ saveShortcut(){
278
+ this.$refs.table.getPage(1);
279
+ },
277
280
  }
278
281
  }
279
282
  </script>
@@ -8,9 +8,9 @@
8
8
  </template>
9
9
  <component v-for="(col, index) in model.btnScreen" :key="index" :is="col.is" :vmodel="col" :api="model.optionApi" @click="clickHandler(col)"></component>
10
10
  </div>
11
- <!-- <div class="ct-ptb5" v-if="model.shortcutForm">
11
+ <div class="shortcutFollow" style="padding-left: 20px;" v-if="model.shortcutForm">
12
12
  <ct-form :source="model.shortcutForm.code1" @submit="saveShortcut"></ct-form>
13
- </div> -->
13
+ </div>
14
14
  <el-popover class="SeachScreenPop max-seachpopper" placement="top" transition="el-zoom-in-top" v-model="highScreen" trigger="click" visible-arrow="false">
15
15
  <div style="width:100%">
16
16
  <template v-for="(col, index) in highScreenRow" v-if="col.show !== false">
@@ -166,8 +166,7 @@
166
166
  });
167
167
  },
168
168
  saveShortcut(){
169
- var self=this;
170
-
169
+ this.$emit('saveShortcut');
171
170
  },
172
171
  }
173
172
  }
@@ -1,15 +1,19 @@
1
1
  <template>
2
- <div style="height: 100%" id="viewer-file">
2
+ <div style="height: 100%" id="viewer-file" ref="viewerfile">
3
3
  <el-container style="height: 100%; border: 1px solid #eee">
4
4
  <el-aside style="background-color: rgb(238, 241, 246)"
5
- ><div>
6
- <el-menu :default-openeds="openeds" :default-active="activeitem">
5
+ ><div style="height: 100%">
6
+ <el-menu
7
+ :default-openeds="openeds"
8
+ :default-active="activeitem"
9
+ style="height: 100%"
10
+ >
7
11
  <el-submenu
8
12
  :key="groupIndex"
9
13
  :index="groupIndex.toString()"
10
14
  v-for="(group, groupIndex) in MediaAlbum"
11
15
  >
12
- <template slot="title"> <i></i>{{ group.albumName }} </template>
16
+ <template slot="title"> <i></i><div style="padding: 0 10px !important">{{ group.albumName }}</div> </template>
13
17
  <el-menu-item-group>
14
18
  <el-menu-item
15
19
  @click="handleClick(item, groupIndex, index)"
@@ -23,7 +27,7 @@
23
27
  </el-menu>
24
28
  </div>
25
29
  </el-aside>
26
- <el-main>
30
+ <el-main ref="displayArea">
27
31
  <div
28
32
  style="position: relative; width: 100%; height: 100%"
29
33
  v-if="resultObject"
@@ -84,7 +88,10 @@
84
88
  <!--File-->
85
89
  <template v-else-if="itemFile.mediaTypeID == '6'">
86
90
  <template
87
- v-if="'doc,docx,xlsx'.search(FileExtension(itemFile)) > -1"
91
+ v-if="
92
+ 'doc,docx,xlsx'.search(itemFile.fileExtension.toLowerCase()) >
93
+ -1
94
+ "
88
95
  >
89
96
  <div
90
97
  class="viewerContent"
@@ -97,7 +104,11 @@
97
104
  >
98
105
  </div>
99
106
  </template>
100
- <template v-else-if="'pdf'.search(FileExtension(itemFile)) > -1">
107
+ <template
108
+ v-else-if="
109
+ 'pdf'.search(itemFile.fileExtension.toLowerCase()) > -1
110
+ "
111
+ >
101
112
  <div
102
113
  class="viewerContent"
103
114
  style="height: 100%; width: 800px; text-align: center"
@@ -109,7 +120,7 @@
109
120
  <template v-else> 不支持此类型:{{ itemFile.mediaTypeID }} </template>
110
121
 
111
122
  <template v-if="resultObject != ''">
112
- <div class="magnify-footer">
123
+ <div class="magnify-footer" :style="{width:displayAreaWidth+'px','bottom':(displayAreabtm+10)+'px'}">
113
124
  <div class="magnify-toolbar">
114
125
  <a
115
126
  href="javascript:void(0)"
@@ -198,6 +209,8 @@ export default {
198
209
  groupCountLen: 0,
199
210
  activeitem: "",
200
211
  openeds: [],
212
+ displayAreaWidth: 0,
213
+ displayAreabtm: 0,
201
214
  };
202
215
  },
203
216
  created() {
@@ -210,7 +223,15 @@ export default {
210
223
  });
211
224
  });
212
225
  },
213
- mounted() {
226
+
227
+ mounted() {
228
+ var self = this;
229
+ self.displayAreaWidth = this.DomWidth();
230
+ self.displayAreabtm =self.leftDomTop( self.$refs.displayArea.$el);
231
+ window.onresize = () => {
232
+ self.displayAreaWidth = self.DomWidth();
233
+ self.displayAreabtm =self.leftDomTop( self.$refs.displayArea.$el);
234
+ };
214
235
 
215
236
  if (
216
237
  this.groupIndex != undefined &&
@@ -218,15 +239,40 @@ export default {
218
239
  this.groupIndex > -1 &&
219
240
  this.index > -1
220
241
  ) {
221
- var item = this.MediaAlbum[this.groupIndex].medias[this.index];
242
+ var item = this.MediaAlbum[this.groupIndex].medias[this.index];
222
243
  this.handleClick(item, this.groupIndex, this.index);
223
244
  }
224
245
  },
225
246
  methods: {
247
+ DomWidth(){
248
+ let arrLength = (window.innerWidth-this.$refs.viewerfile.offsetWidth);
249
+ arrLength=arrLength>0?arrLength:0;
250
+ var Width= window.innerWidth-arrLength-this.$refs.displayArea.$el.offsetLeft-40;
251
+
252
+ return Width;
253
+ },
254
+ leftDomTop() {
255
+ const height = window.innerHeight; //可视区窗口高度
256
+ const curDomHeight = this.$refs.viewerfile.offsetHeight;
257
+ // const curDomHeight = dom.getBoundingClientRect().height
258
+ const curDomY = this.$refs.viewerfile.getBoundingClientRect().y;
259
+ let curDomBottom = height - curDomHeight - curDomY;
260
+ curDomBottom=curDomBottom>0?curDomBottom:0;
261
+ return curDomBottom;
262
+ },
226
263
  FileExtension(item) {
227
264
  return item.savedFileName.replace(/.+\./, "").toLowerCase();
228
265
  },
266
+ offsetLeft(elements) {
267
+ var left = elements.offsetLeft;
268
+ var parent = elements.offsetParent;
269
+ while (parent != null) {
270
+ left += parent.offsetLeft;
271
+ parent = parent.offsetParent;
272
+ }
229
273
 
274
+ return left;
275
+ },
230
276
  handleClick(item, groupIndex, index) {
231
277
  if (index == this.activeIndex && groupIndex == this.activeGroup) return;
232
278
  this.activeIndex = index;
@@ -344,10 +390,9 @@ html {
344
390
  }
345
391
 
346
392
  .magnify-footer {
347
- width: calc(100vw - 340px);
348
393
  position: fixed;
349
394
  height: 50px;
350
- bottom: 20px;
395
+ bottom: 0px;
351
396
  text-align: center;
352
397
  color: #fff;
353
398
  z-index: 9;
@@ -30,6 +30,9 @@ const Detail = function (source,para ,callBack) {
30
30
  _operationList:null,
31
31
  _operationRouters:[],
32
32
  _commissionList:null,
33
+ get mediaAlbums() {
34
+ return data.mediaAlbums||[];
35
+ },
33
36
  get title() {
34
37
  return data.title;
35
38
  },