ocpview-plus 1.1.1 → 1.1.2

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.2",
4
4
  "title": "ocpviewPlus",
5
5
  "description": "A high quality Service UI components Library with Vue.js",
6
6
  "homepage": "",
@@ -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) {