cloud-web-corejs 1.0.54-dev.784 → 1.0.54-dev.785

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,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.784",
4
+ "version": "1.0.54-dev.785",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "dev:micro": "vue-cli-service serve --port 17527",
@@ -1,10 +1,10 @@
1
- import {getToken} from "../../utils/auth";
2
- import {openCnPrint} from "../../components/cnPrint/index";
3
- import {openHiPrint} from "../../components/hiprint/index";
4
- import {openJdPrint} from "../../components/jdPrint/index";
5
- import {openPddPrint} from "../../components/pddPrint/index";
6
- import {openVipPrint} from "../../components/vipPrint/index";
7
- import {openXhsPrint} from "../../components/xhsPrint/index";
1
+ import { getToken } from "../../utils/auth";
2
+ import { openCnPrint } from "../../components/cnPrint/index";
3
+ import { openHiPrint } from "../../components/hiprint/index";
4
+ import { openJdPrint } from "../../components/jdPrint/index";
5
+ import { openPddPrint } from "../../components/pddPrint/index";
6
+ import { openVipPrint } from "../../components/vipPrint/index";
7
+ import { openXhsPrint } from "../../components/xhsPrint/index";
8
8
 
9
9
  let modules;
10
10
  let configUtil = {
@@ -29,7 +29,7 @@ modules = {
29
29
  },
30
30
  computed: {
31
31
  buttonName() {
32
- if(this.option.label){
32
+ if (this.option.label) {
33
33
  return this.option.label;
34
34
  }
35
35
  let exportTemplates = this.exportTemplates;
@@ -143,14 +143,13 @@ modules = {
143
143
  },
144
144
  getTableGrid() {
145
145
  let grid = null;
146
- let tableTarget = this.option.tableTarget
146
+ let tableTarget = this.option.tableTarget;
147
147
  if (tableTarget) {
148
148
  if (typeof tableTarget === "function") {
149
149
  grid = tableTarget();
150
150
  } else {
151
151
  grid = tableTarget;
152
152
  }
153
-
154
153
  } else if (this.option.tableRef) {
155
154
  grid = this.parentTarget.$refs[this.option.tableRef];
156
155
  }
@@ -160,23 +159,22 @@ modules = {
160
159
  let checkRows = [];
161
160
  let $grid = this.getTableGrid();
162
161
 
163
-
164
162
  let condition = null;
165
- if(this.option.customCondition){
163
+ if (this.option.customCondition) {
166
164
  let condition1 = this.option.customCondition(item);
167
- if(condition1)condition = condition1;
165
+ if (condition1) condition = condition1;
168
166
  }
169
- if(!condition){
167
+ if (!condition) {
170
168
  if ($grid) {
171
169
  checkRows = $grid.getCheckboxRecords(true);
172
170
  } else {
173
- checkRows
174
- = typeof this.option.param === "function"
175
- ? this.option.param(item)
176
- : this.option.param;
171
+ checkRows =
172
+ typeof this.option.param === "function"
173
+ ? this.option.param(item)
174
+ : this.option.param;
177
175
  }
178
176
  let ids = checkRows ? checkRows.map((row) => row.id) : [];
179
- condition = ids.length ? {id: ids} : null;
177
+ condition = ids.length ? { id: ids } : null;
180
178
  }
181
179
  return condition;
182
180
 
@@ -222,7 +220,12 @@ modules = {
222
220
  if ($grid) {
223
221
  checkRows = $grid.getCheckboxRecords(true);
224
222
  if (!checkRows.length) {
225
- this.$baseAlert(this.$t2("请选择需要导出/打印的数据", "components.baseInputExport.selectDataTip"));
223
+ this.$baseAlert(
224
+ this.$t2(
225
+ "请选择需要导出/打印的数据",
226
+ "components.baseInputExport.selectDataTip"
227
+ )
228
+ );
226
229
  return;
227
230
  }
228
231
  }
@@ -238,7 +241,9 @@ modules = {
238
241
  } else if (this.exportTypes.includes(etType)) {
239
242
  //导出excel
240
243
  let conditions = this.tableDefalutHandle(exportTemplate) || [];
241
- this.$baseConfirm(this.$t2("您确定要导出吗?", "components.baseInputExport.exportTip")).then(() => {
244
+ this.$baseConfirm(
245
+ this.$t2("您确定要导出吗?", "components.baseInputExport.exportTip")
246
+ ).then(() => {
242
247
  let condition = $grid
243
248
  ? this.tableDefalutHandle(exportTemplate)
244
249
  : this.tableDefalutHandle(exportTemplate);
@@ -371,16 +376,17 @@ modules = {
371
376
  }
372
377
 
373
378
  function downLoadFile(row, that) {
374
- let realFileName = fileName ? fileName + "-" + row.uuid : row.uuid;
375
- let fileUrl
376
- = configUtil.baseUrl
377
- + that.option.prefix
378
- + "/export_ins/download?uuid="
379
- + row.uuid
380
- + "&ippaaapp="
381
- + row.ippaaapp
382
- + "&n="
383
- + realFileName;
379
+ let filename = row.filename || fileName;
380
+ let realFileName = filename ? filename + "-" + row.uuid : row.uuid;
381
+ let fileUrl =
382
+ configUtil.baseUrl +
383
+ that.option.prefix +
384
+ "/export_ins/download?uuid=" +
385
+ row.uuid +
386
+ "&ippaaapp=" +
387
+ row.ippaaapp +
388
+ "&n=" +
389
+ realFileName;
384
390
  var params = {};
385
391
  that.parentTarget.$http({
386
392
  method: "post",