ocpview-plus 1.1.1 → 1.1.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": "ocpview-plus",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "title": "ocpviewPlus",
5
5
  "description": "A high quality Service UI components Library with Vue.js",
6
6
  "homepage": "",
@@ -108,12 +108,11 @@ export default {
108
108
  },
109
109
  computed: {
110
110
  tableHeight() {
111
- let currentHeight = this.currentHeight - this.extraHeight - this.outsideHeight;
112
111
  if(this.isFull) {
113
- currentHeight = this.clientHeight - this.$refs.table.$el.offsetTop;
112
+ return this.clientHeight - this.$refs.table.$el.offsetTop;
114
113
  } else {
115
114
  if (!this.myConfig.dynamicHeight) {
116
- currentHeight = this.currentHeight;
115
+ let currentHeight = this.currentHeight;
117
116
  if (this.extraHeight) {
118
117
  currentHeight = currentHeight - Number(this.extraHeight);
119
118
  }
@@ -123,22 +122,27 @@ export default {
123
122
  if (this.myConfig.showSummary) {
124
123
  currentHeight = currentHeight - 50;
125
124
  }
126
- }
125
+ return currentHeight;
126
+ } else {
127
+ return null;
128
+ }
129
+
127
130
  }
128
- return currentHeight;
129
131
  },
130
132
  tableMaxHeight() {
131
- let currentHeight = this.currentHeight - this.extraHeight - this.outsideHeight;
132
133
  if(this.isFull) {
133
- currentHeight = this.clientHeight - this.$refs.table.$el.offsetTop;
134
+ return this.clientHeight - this.$refs.table.$el.offsetTop;
134
135
  } else {
135
136
  if (this.myConfig.dynamicHeight) {
137
+ let currentHeight = this.currentHeight - this.extraHeight - this.outsideHeight;
136
138
  if (this.myConfig.showSummary) {
137
139
  currentHeight = currentHeight - 50;
138
140
  }
141
+ return currentHeight;
142
+ } else {
143
+ return null;
139
144
  }
140
145
  }
141
- return currentHeight;
142
146
  }
143
147
  },
144
148
  methods: {
@@ -46,12 +46,12 @@
46
46
  <template #content>
47
47
  <div>{{filename}}</div>
48
48
  </template>
49
- </Poptip>
49
+ </Poptip>
50
50
  </Col>
51
51
  <Col>
52
52
  <Upload ref="upload"
53
53
  :before-upload="handleUpload"
54
- accept=".xlsx,.xls"
54
+ accept=".xlsx,.xls"
55
55
  :format="myConfig.fileType"
56
56
  :on-format-error="handleFormatError"
57
57
  :on-success="handleSuccess"
@@ -77,7 +77,7 @@
77
77
  </RadioGroup>
78
78
  </Modal>
79
79
  </template>
80
-
80
+
81
81
  </div>
82
82
  </template>
83
83
  <script>
@@ -168,7 +168,22 @@
168
168
  } else {
169
169
  let temp = this.url +'&param=' +encodeURI(JSON.stringify(param));
170
170
  window.open(temp,'_self');
171
- }
171
+ }
172
+ },
173
+ setExportDownUrl(url,param) {
174
+ /*if (url) {
175
+ url = url.replace('rest', 'exportTemplate');
176
+ }*/
177
+ let self = this;
178
+ this.url = this.getResturl(url,null,{},self);
179
+ if (this.myConfig.typeData.length > 1) {
180
+ this.param = param;
181
+ this.type = this.myConfig.typeData[0].code;
182
+ this.showUpload = true;
183
+ } else {
184
+ let temp = this.url +'&param=' +encodeURI(JSON.stringify(param));
185
+ window.open(temp,'_self');
186
+ }
172
187
  },
173
188
  handleUpload (file) {
174
189
  if (!this.checkFormat(file)) {
@@ -214,7 +229,7 @@
214
229
  this.$emit('importSuccess',res);
215
230
  }
216
231
  this.loading = false;
217
-
232
+
218
233
  },
219
234
  downTemplate() {
220
235
  if (this.type) {
@@ -225,7 +240,7 @@
225
240
  window.open(temp,'_self');
226
241
  this.showUpload = false;
227
242
  }
228
-
243
+
229
244
  }
230
245
  }
231
246
  }
@@ -1173,7 +1173,7 @@ function buildFilename(postObj, xhr) {
1173
1173
  ].join('');
1174
1174
 
1175
1175
  const billmoduleid = postObj.billmoduleid || 'export';
1176
- return `${t}${billmoduleid}.xlsx`;
1176
+ return `${t}${billmoduleid}.xls`;
1177
1177
  }
1178
1178
 
1179
1179
  caseMethod.getFilesInfo = function(billno, billmoduleid,notdelfile,scenetype, callBackMethod) {