jufubao-admin-library 1.1.140 → 1.1.142

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.
@@ -37,7 +37,7 @@
37
37
  <el-button
38
38
  type="primary"
39
39
  size="small"
40
- @click="handleOperate(item.action,scope.row.serial_no,scope.row.download_url)"
40
+ @click="handleOperate(item.action,scope.row.serial_no,scope.row.download_url, scope.row)"
41
41
  v-for="(item,index) in scope.row.buttons"
42
42
  :key="index"
43
43
  >{{item.title}}</el-button>
@@ -54,6 +54,7 @@
54
54
  ></xd-pagination>
55
55
  </div>
56
56
  </el-card>
57
+ <iframe id="download-url" style="display: none"></iframe>
57
58
  </div>
58
59
  </template>
59
60
 
@@ -296,10 +297,10 @@ export default {
296
297
  /**
297
298
  *按钮操作
298
299
  **/
299
- handleOperate (action, serial_no, url) {
300
+ handleOperate (action, serial_no, url , {file_name,file_ext }) {
300
301
  if (action === 'retry') {
301
302
  //重新执行
302
- this.asyncRetry({
303
+ this.asyncRetry({
303
304
  serial_no: serial_no,
304
305
  // #ifdef open-dist
305
306
  app_id:xdCookie.get('app_value'),
@@ -315,20 +316,28 @@ export default {
315
316
  console.log(err, 'err')
316
317
  })
317
318
 
318
- } else if (action === 'download') {
319
+ }
320
+ else if (action === 'download') {
319
321
  let loading = this.$loading({})
320
322
  this.getDownloadUrl({serial_no})
321
323
  .then(res=>{
324
+ let download_url = ''
322
325
  //#ifdef partner-site
323
- if(res.download_url) {
324
- window.open(res.download_url)
326
+ if(res['download_url']) {
327
+ download_url = res['download_url']
325
328
  }
326
329
  // #endif
327
330
  //#ifndef partner-site
328
- if(res.data.download_url) {
329
- window.open(res.data.download_url)
331
+ if(res.data['download_url']) {
332
+ download_url = res.data['download_url']
330
333
  }
331
334
  // #endif
335
+ let fileName = '';
336
+ if(file_name && file_ext) fileName = `${file_name}.${file_ext}`;
337
+ let download = document.getElementById('download-url');
338
+ download.src = download_url
339
+
340
+ // downloadJs(download_url,fileName);
332
341
  loading.close()
333
342
  }).catch(err=>{
334
343
  loading.close()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.140",
3
+ "version": "1.1.142",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {