centaline-data-driven 1.3.4 → 1.3.7

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.04",
3
+ "version": "1.3.07",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -80,6 +80,9 @@
80
80
  case 'close':
81
81
  self.$children[0].vmodel.content[0].on.closeDialog();
82
82
  break
83
+ case 'title':
84
+ self.$children[0].vmodel.title=data.params.data;
85
+ break
83
86
  }
84
87
  },
85
88
  }
@@ -764,20 +764,20 @@
764
764
  else if (field.isSeeVoice) {//看视频
765
765
  self.$common.browseVideo(field,submitData)
766
766
  }
767
- else if (field.isUrlInLayer) {//URL页面(弹层)
767
+ else if (field.isUrlInLayer) {//URL页面(弹层)
768
768
  var dialogOption = {
769
769
  title: field.pageTitle,
770
770
  pane: self.$common.getParentPane(self),
771
771
  content: [{
772
772
  attrs: {
773
- apiParam: field.getActionPara(submitData).para,
774
- src: 'http://localhost/BAgency/Test/TestPropertyAll.aspx',
773
+ src: submitData[field.submitListField],
775
774
  width: field.dialogWidth + 'px',
776
775
  height: field.dialogHeight + 'px'
777
776
  },
778
777
  on: {
779
778
  new(id) {
780
779
  field.flagAddRowAfterAction=true;
780
+ field.flagFreshCurrentRow=false;
781
781
  var res={responseData:{content:id}};
782
782
  self.updateCurrentRow(field, res);
783
783
  self.$forceUpdate();
@@ -785,6 +785,7 @@
785
785
  self.$common.closeDialog(dialogOption.dialog);
786
786
  },
787
787
  update() {
788
+ field.flagAddRowAfterAction=false;
788
789
  field.flagFreshCurrentRow=true;
789
790
  self.updateCurrentRow(field, null);
790
791
  self.$common.closeDialog(dialogOption.dialog);
@@ -1,5 +1,10 @@
1
1
  <template>
2
- <div style="height: 100%" id="viewer-file" ref="viewerfile" @contextmenu="handleMouse">
2
+ <div
3
+ style="height: 100%"
4
+ id="viewer-file"
5
+ ref="viewerfile"
6
+ @contextmenu="handleMouse"
7
+ >
3
8
  <el-container style="height: 100%; border: 1px solid #eee">
4
9
  <el-aside style="background-color: rgb(238, 241, 246)"
5
10
  ><div style="height: 100%" class="viewerMenu">
@@ -40,18 +45,18 @@
40
45
  </el-aside>
41
46
  <el-main ref="displayArea">
42
47
  <div
43
- style="position: relative; width: 100%; height: 100%"
48
+ style="position: relative; width: 100%"
49
+ :style="{ height: displayAreaHeight - 78 + 'px' }"
44
50
  v-if="resultObject"
45
51
  >
46
52
  <!--VR-->
47
53
  <template v-if="itemFile.mediaTypeID == '1'">
48
- <div
49
- class="viewerContent"
50
- style="height: 100%; width: 800px; text-align: center"
51
- >
52
- 暂不支持VR
53
- <!-- <ct-viewerVR :VRUrl="resultObject"> </ct-viewerVR> -->
54
- </div>
54
+ <iframe
55
+ :src="resultObject"
56
+ :height="displayAreaHeight - 80 + 'px'"
57
+ :width="displayAreaWidth + 'px'"
58
+ >
59
+ </iframe>
55
60
  </template>
56
61
  <!--Photo-->
57
62
  <template v-else-if="itemFile.mediaTypeID == '2'">
@@ -100,13 +105,13 @@
100
105
  <template v-else-if="itemFile.mediaTypeID == '6'">
101
106
  <template
102
107
  v-if="
103
- 'doc,docx,xlsx'.search((itemFile.fileExtension).toLowerCase()) >
108
+ 'doc,docx,xlsx'.search(itemFile.fileExtension.toLowerCase()) >
104
109
  -1
105
110
  "
106
111
  >
107
112
  <div
108
113
  class="viewerContent"
109
- style="height: 100px; text-align: center"
114
+ style="max-height: 200px; text-align: center"
110
115
  >
111
116
  <a :href="resultObject">
112
117
  <img :src="itemFile.thumbnailUrl" /><br />{{
@@ -120,9 +125,12 @@
120
125
  'pdf'.search(itemFile.fileExtension.toLowerCase()) > -1
121
126
  "
122
127
  >
123
-
124
- <ct-viewerPDF :pdfUrl="resultObject" :displayAreaHeight="displayAreaHeight" :displayAreaWidth="displayAreaWidth"> </ct-viewerPDF>
125
-
128
+ <ct-viewerPDF
129
+ :pdfUrl="resultObject"
130
+ :displayAreaHeight="displayAreaHeight"
131
+ :displayAreaWidth="displayAreaWidth"
132
+ >
133
+ </ct-viewerPDF>
126
134
  </template>
127
135
  </template>
128
136
  <template v-else> 不支持此类型:{{ itemFile.mediaTypeID }} </template>
@@ -248,12 +256,12 @@ export default {
248
256
  self.displayAreaWidth = this.DomWidth();
249
257
  self.displayArealeft = self.DomLeft();
250
258
  self.displayAreabtm = self.DomTop(self.$refs.displayArea.$el);
251
- self.displayAreaHeight =self.$refs.displayArea.$el.offsetHeight;
259
+ self.displayAreaHeight = self.$refs.displayArea.$el.offsetHeight;
252
260
  window.onresize = () => {
253
261
  self.displayAreaWidth = self.DomWidth();
254
262
  self.displayArealeft = self.DomLeft();
255
263
  self.displayAreabtm = self.DomTop(self.$refs.displayArea.$el);
256
- self.displayAreaHeight =self.$refs.displayArea.$el.offsetHeight;
264
+ self.displayAreaHeight = self.$refs.displayArea.$el.offsetHeight;
257
265
  };
258
266
 
259
267
  if (
@@ -267,7 +275,6 @@ export default {
267
275
  }
268
276
  },
269
277
  methods: {
270
-
271
278
  handleMouse(e) {
272
279
  e.preventDefault();
273
280
  },
@@ -405,10 +412,6 @@ export default {
405
412
  },
406
413
  },
407
414
  };
408
- // 禁止右键菜单
409
- // document.oncontextmenu = function () {
410
- // return false;
411
- // };
412
415
  </script>
413
416
 
414
417
  <style>
@@ -1,10 +1,11 @@
1
1
 
2
2
  <template>
3
- <div class="Imagebox" @mousewheel="bagimg($event)">
3
+ <div class="Imagebox" @mousewheel="bagimg($event)" v-loading="loading">
4
4
  <img
5
5
  id="ViewerImage"
6
6
  class="scaleimg"
7
7
  border="0"
8
+ @load="complete()"
8
9
  v-bind:style="{
9
10
  transform:
10
11
  'scale(' +
@@ -25,6 +26,7 @@ export default {
25
26
  },
26
27
  data() {
27
28
  return {
29
+ loading: true,
28
30
  params: {
29
31
  zoomVal: 1,
30
32
  left: 0,
@@ -36,12 +38,21 @@ export default {
36
38
  };
37
39
  },
38
40
  mounted() {
41
+ this.loading = true;
39
42
  this.startDrag(
40
43
  document.getElementById("ViewerImage"),
41
44
  document.getElementById("ViewerImage")
42
45
  );
46
+ },
47
+ watch: {
48
+ imgUrl(newValue, oldValue) {
49
+ this.loading = true;
50
+ },
43
51
  },
44
52
  methods: {
53
+ complete() {
54
+ this.loading = false;
55
+ },
45
56
  zoom(n) {
46
57
  this.params.zoomVal += n;
47
58
  },
@@ -1,13 +1,13 @@
1
1
 
2
2
  <template>
3
- <div>
4
- <iframe
3
+ <div v-loading="loading">
4
+ <iframe
5
5
  ref="previewPdf"
6
6
  id="previewPdf"
7
7
  :src="'/static/pdf/web/viewer.html?' + fileUrl"
8
8
  :height="displayAreaHeight - 78 + 'px'"
9
9
  :width="displayAreaWidth + 'px'"
10
- @load="loadFrame()"
10
+ @load="complete()"
11
11
  >
12
12
  </iframe>
13
13
  </div>
@@ -21,6 +21,7 @@ export default {
21
21
  },
22
22
  data() {
23
23
  return {
24
+ loading: true,
24
25
  numPages: 1,
25
26
  fileUrl: "",
26
27
  };
@@ -28,19 +29,15 @@ export default {
28
29
  mounted() {
29
30
  this.init(this.pdfUrl);
30
31
  },
31
- created() {
32
- this.$nextTick(() => {
33
- // 可以使用回调函数的写法
34
- // 这个函数中DOM必定渲染完成
35
- //this.loadFrame();
36
- });
32
+ created() {
37
33
  },
38
- methods: {
34
+ methods: {
39
35
  init(pdfUrl) {
40
36
  var self = this;
41
37
  self.fileUrl = 'r='+Math.random()+'&file='+encodeURIComponent(pdfUrl);
42
38
  },
43
- loadFrame() {
39
+ complete() {
40
+ this.loading = false;
44
41
  var doc = document.getElementById("previewPdf").contentWindow.document;
45
42
  doc.getElementById("download").style.display = "none";
46
43
  doc.getElementById("openFile").style.display = "none";
@@ -50,6 +47,7 @@ export default {
50
47
  },
51
48
  watch: {
52
49
  pdfUrl(newValue, oldValue) {
50
+ this.loading = true;
53
51
  this.init(newValue);
54
52
  },
55
53
  },