n20-common-lib 2.7.63 → 2.7.65

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.
@@ -17,23 +17,23 @@
17
17
  </div>
18
18
  </div>
19
19
  <el-table
20
- :data="tableDataC"
21
- :row-key="keys.rowKey"
22
- border
23
- @selection-change="(selection) => (selectionList = selection)"
20
+ :data="tableDataC"
21
+ :row-key="keys.rowKey"
22
+ border
23
+ @selection-change="(selection) => (selectionList = selection)"
24
24
  >
25
25
  <slot name="selection-column">
26
- <el-table-column type="selection" width="50" align="center"/>
26
+ <el-table-column type="selection" width="50" align="center" />
27
27
  </slot>
28
28
  <template v-if="dataProp.slotHeader">
29
29
  <el-table-column
30
- v-for="item in dataProp.slotHeader"
31
- :key="item.prop"
32
- :label="item.label"
33
- :prop="item.prop"
34
- :align="item.align || 'center'"
35
- :width="item.width || 'auto'"
36
- :show-overflow-tooltip="item.showOverflowTooltip || item['show-overflow-tooltip']"
30
+ v-for="item in dataProp.slotHeader"
31
+ :key="item.prop"
32
+ :label="item.label"
33
+ :prop="item.prop"
34
+ :align="item.align || 'center'"
35
+ :width="item.width || 'auto'"
36
+ :show-overflow-tooltip="item.showOverflowTooltip || item['show-overflow-tooltip']"
37
37
  />
38
38
  </template>
39
39
  <template v-else>
@@ -45,19 +45,19 @@
45
45
  <slot name="type" :row="row">
46
46
  <span v-if="readonly">{{ row[keys.bussType] | bussTypeFilter(bussTypeOptions) }}</span>
47
47
  <el-select
48
- v-else
49
- v-model="row[keys.bussType]"
50
- :disabled="row._bussTypeDisabled || row.readonly"
51
- :placeholder="'请选择' | $lc"
52
- @change="(val) => bussTypeChange(val, row)"
53
- style="width: 100%"
48
+ v-else
49
+ v-model="row[keys.bussType]"
50
+ :disabled="row._bussTypeDisabled || row.readonly"
51
+ :placeholder="'请选择' | $lc"
52
+ @change="(val) => bussTypeChange(val, row)"
53
+ style="width: 100%"
54
54
  >
55
55
  <el-option
56
- v-for="item in bussTypeOptions"
57
- :key="item.bussValue"
58
- :disabled="item.disabled"
59
- :value="item.bussValue"
60
- :label="item.bussName"
56
+ v-for="item in bussTypeOptions"
57
+ :key="item.bussValue"
58
+ :disabled="item.disabled"
59
+ :value="item.bussValue"
60
+ :label="item.bussName"
61
61
  />
62
62
  </el-select>
63
63
  </slot>
@@ -71,19 +71,19 @@
71
71
  <slot name="type" :row="row">
72
72
  <span v-if="readonly">{{ row[keys.type] | typeFilter(typeOptions) }}</span>
73
73
  <el-select
74
- v-else
75
- v-model="row[keys.type]"
76
- :disabled="row._typeDisabled || row.readonly"
77
- :placeholder="'请选择' | $lc"
78
- style="width: 100%"
79
- @change="(val) => handleTypeChange(val, row)"
74
+ v-else
75
+ v-model="row[keys.type]"
76
+ :disabled="row._typeDisabled || row.readonly"
77
+ :placeholder="'请选择' | $lc"
78
+ style="width: 100%"
79
+ @change="(val) => handleTypeChange(val, row)"
80
80
  >
81
81
  <el-option
82
- v-for="item in typeOptions"
83
- :key="item.attno"
84
- :disabled="item.disabled"
85
- :value="item.attno"
86
- :label="item.attname"
82
+ v-for="item in typeOptions"
83
+ :key="item.attno"
84
+ :disabled="item.disabled"
85
+ :value="item.attno"
86
+ :label="item.attname"
87
87
  />
88
88
  </el-select>
89
89
  </slot>
@@ -97,10 +97,10 @@
97
97
  <slot name="name" :row="row">
98
98
  <span v-if="readonly">{{ row[keys.name] ? row[keys.name].replace(/\.[A-z0-9]+$/, '') : '' }}</span>
99
99
  <el-input
100
- v-else
101
- :value="row[keys.name] ? row[keys.name].replace(/\.[A-z0-9]+$/, '') : ''"
102
- disabled
103
- :placeholder="'请输入' | $lc"
100
+ v-else
101
+ :value="row[keys.name] ? row[keys.name].replace(/\.[A-z0-9]+$/, '') : ''"
102
+ disabled
103
+ :placeholder="'请输入' | $lc"
104
104
  />
105
105
  </slot>
106
106
  </template>
@@ -122,18 +122,18 @@
122
122
  <template v-slot="{ row, $index }">
123
123
  <slot name="upload" :row="row" :[indexKey]="$index">
124
124
  <el-input
125
- :value="row._name"
126
- :placeholder="'上传附件' | $lc"
127
- readonly
128
- :disabled="!row[keys.type] || row._name"
129
- v-if="row.isBaseFile"
130
- @click.native.stop="handleClick(row, $index)"
125
+ :value="row._name"
126
+ :placeholder="'上传附件' | $lc"
127
+ readonly
128
+ :disabled="!row[keys.type] || row._name"
129
+ v-if="row.isBaseFile"
130
+ @click.native.stop="handleClick(row, $index)"
131
131
  >
132
132
  <template slot="prefix">
133
133
  <i
134
- v-title="`附件已禁用`"
135
- v-if="row.isEnable === '0'"
136
- class="el-input__icon n20-icon-yichu color-danger"
134
+ v-title="`附件已禁用`"
135
+ v-if="row.isEnable === '0'"
136
+ class="el-input__icon n20-icon-yichu color-danger"
137
137
  ></i>
138
138
  </template>
139
139
  <template slot="suffix">
@@ -141,24 +141,24 @@
141
141
  </template>
142
142
  </el-input>
143
143
  <Upload
144
- v-else
145
- :ref="'upload' + $index"
146
- class="n20-upload-table-up"
147
- :file-name="row | fileName(keys.url)"
148
- :data="row['_fileData'] || fileData"
149
- :msg-type="null"
150
- :show-clear="false"
151
- :action="action"
152
- :multiple="multiple"
153
- :headers="dataProp.headers"
154
- :disabled="!row[keys.type] || row._typeDisabled || row.readonly"
155
- :accept="row[keys.type] | acceptFilter(typeOptions, fileAccept)"
156
- :size="row[keys.type] | sizeFilter(typeOptions, fileSize)"
157
- :http-request="(options) => httpRequest(options, row)"
158
- :before-upload="(file) => beforeUploadFn(file, row)"
159
- :on-progress="(event) => onProgressFn(event, row)"
160
- :on-success="(response, file, fileList) => onSuccessFn(response, file, fileList, row)"
161
- :on-error="(err, file, fileList) => errorFn(err, file, fileList, row, $index)"
144
+ v-else
145
+ :ref="'upload' + $index"
146
+ class="n20-upload-table-up"
147
+ :file-name="row | fileName(keys.url)"
148
+ :data="row['_fileData'] || fileData"
149
+ :msg-type="null"
150
+ :show-clear="false"
151
+ :action="action"
152
+ :multiple="multiple"
153
+ :headers="dataProp.headers"
154
+ :disabled="!row[keys.type] || row._typeDisabled || row.readonly"
155
+ :accept="row[keys.type] | acceptFilter(typeOptions, fileAccept)"
156
+ :size="row[keys.type] | sizeFilter(typeOptions, fileSize)"
157
+ :http-request="(options) => httpRequest(options, row)"
158
+ :before-upload="(file) => beforeUploadFn(file, row)"
159
+ :on-progress="(event) => onProgressFn(event, row)"
160
+ :on-success="(response, file, fileList) => onSuccessFn(response, file, fileList, row)"
161
+ :on-error="(err, file, fileList) => errorFn(err, file, fileList, row, $index)"
162
162
  />
163
163
  </slot>
164
164
  </template>
@@ -189,27 +189,27 @@
189
189
  <slot name="percent" :row="row" :[indexKey]="$index">
190
190
  <div v-if="row['_percent'] >= 0 && !row._typeDisabled" class="flex-box flex-v">
191
191
  <el-progress
192
- class="n20-upload-table-progress"
193
- :percentage="row['_percent']"
194
- :status="row._status"
195
- text-color=""
196
- style="width: 140px"
192
+ class="n20-upload-table-progress"
193
+ :percentage="row['_percent']"
194
+ :status="row._status"
195
+ text-color=""
196
+ style="width: 140px"
197
197
  />
198
198
  <el-button
199
- v-if="row['_status'] === 'exception'"
200
- type="text"
201
- size="mini"
202
- style="width: 60px"
203
- @click="anewSubmitFn(row, $index)"
204
- >{{ '重新上传' | $lc }}
199
+ v-if="row['_status'] === 'exception'"
200
+ type="text"
201
+ size="mini"
202
+ style="width: 60px"
203
+ @click="anewSubmitFn(row, $index)"
204
+ >{{ '重新上传' | $lc }}
205
205
  </el-button>
206
206
  <el-button
207
- v-else-if="row['_percent'] >= 0 && row['_percent'] < 100"
208
- type="text"
209
- size="mini"
210
- style="width: 60px"
211
- @click="abortFn(row, $index)"
212
- >{{ '取消' | $lc }}
207
+ v-else-if="row['_percent'] >= 0 && row['_percent'] < 100"
208
+ type="text"
209
+ size="mini"
210
+ style="width: 60px"
211
+ @click="abortFn(row, $index)"
212
+ >{{ '取消' | $lc }}
213
213
  </el-button>
214
214
  </div>
215
215
  </slot>
@@ -222,18 +222,18 @@
222
222
  <template v-slot="{ row }">
223
223
  <slot name="handle" :row="row">
224
224
  <el-button
225
- type="text"
226
- v-title="!officeStatus ? `缺少插件`: '预览'"
227
- :icon="!officeStatus ? 'n20-icon-yanjing': 'el-icon-view'"
228
- :disabled="!row[keys.url]"
229
- @click="seeFile(row)"
225
+ type="text"
226
+ v-title="!officeStatus ? `缺少插件` : '预览'"
227
+ :icon="!officeStatus ? 'n20-icon-yanjing' : 'el-icon-view'"
228
+ :disabled="!row[keys.url]"
229
+ @click="seeFile(row)"
230
230
  />
231
231
  <el-button
232
- v-if="readonly"
233
- type="text"
234
- icon="el-icon-download"
235
- :disabled="!row[keys.url]"
236
- @click="downFile(row)"
232
+ v-if="readonly"
233
+ type="text"
234
+ icon="el-icon-download"
235
+ :disabled="!row[keys.url]"
236
+ @click="downFile(row)"
237
237
  />
238
238
  </slot>
239
239
  </template>
@@ -243,23 +243,23 @@
243
243
  <Dialog width="432px" title="" :visible.sync="chooseVisible">
244
244
  <div class="flex-box flex-c flex-v">
245
245
  <Upload
246
- ref="baseUpload"
247
- class="n20-upload-table-up"
248
- :file-name="this.row | fileName(keys.url)"
249
- :data="this.row['_fileData'] || fileData"
250
- :msg-type="null"
251
- :show-clear="false"
252
- :action="action"
253
- :multiple="multiple"
254
- :headers="dataProp.headers"
255
- :disabled="!this.row[keys.type] || this.row._typeDisabled || this.row.readonly"
256
- :accept="this.row[keys.type] | acceptFilter(typeOptions, fileAccept)"
257
- :size="this.row[keys.type] | sizeFilter(typeOptions, fileSize)"
258
- :http-request="(options) => httpRequest(options, this.row)"
259
- :before-upload="(file) => beforeUploadFn(file, this.row)"
260
- :on-progress="(event) => onProgressFn(event, this.row)"
261
- :on-success="(response, file, fileList) => onSuccessFn(response, file, fileList, this.row)"
262
- :on-error="(err, file, fileList) => errorFn(err, file, fileList, this.row, $index)"
246
+ ref="baseUpload"
247
+ class="n20-upload-table-up"
248
+ :file-name="this.row | fileName(keys.url)"
249
+ :data="this.row['_fileData'] || fileData"
250
+ :msg-type="null"
251
+ :show-clear="false"
252
+ :action="action"
253
+ :multiple="multiple"
254
+ :headers="dataProp.headers"
255
+ :disabled="!this.row[keys.type] || this.row._typeDisabled || this.row.readonly"
256
+ :accept="this.row[keys.type] | acceptFilter(typeOptions, fileAccept)"
257
+ :size="this.row[keys.type] | sizeFilter(typeOptions, fileSize)"
258
+ :http-request="(options) => httpRequest(options, this.row)"
259
+ :before-upload="(file) => beforeUploadFn(file, this.row)"
260
+ :on-progress="(event) => onProgressFn(event, this.row)"
261
+ :on-success="(response, file, fileList) => onSuccessFn(response, file, fileList, this.row)"
262
+ :on-error="(err, file, fileList) => errorFn(err, file, fileList, this.row, $index)"
263
263
  >
264
264
  <template slot="trigger">
265
265
  <el-button size="small" type="primary">上传附件</el-button>
@@ -271,24 +271,23 @@
271
271
 
272
272
  <Dialog title="基础附件选择" width="85%" max-dialog :visible.sync="baseVisible">
273
273
  <el-table
274
- class="base-table_default"
275
- :row-style="rowStyle"
276
- :row-class-name="tableRowClassName"
277
- :data="baseAttnoData"
278
- border
274
+ class="base-table_default"
275
+ :row-style="rowStyle"
276
+ :row-class-name="tableRowClassName"
277
+ :data="baseAttnoData"
278
+ border
279
279
  >
280
280
  <el-table-column label="选择" align="center" width="65">
281
281
  <template scope="scope">
282
- <el-radio :label="scope.$index" v-model="radio" @change.native="getCurrentRow(scope.row)">{{
283
- ''
284
- }}
282
+ <el-radio :label="scope.$index" v-model="radio" @change.native="getCurrentRow(scope.row)"
283
+ >{{ '' }}
285
284
  </el-radio>
286
285
  </template>
287
286
  </el-table-column>
288
- <el-table-column prop="recordname" width="140px" show-overflow-tooltip label="文件名称"/>
289
- <el-table-column prop="cltName" width="140px" show-overflow-tooltip label="所属单位"/>
290
- <el-table-column prop="fileVersion" align="center" label="版本号"/>
291
- <el-table-column prop="startValidTime" width="120px" label="起始有效时间" align="center"/>
287
+ <el-table-column prop="recordname" width="140px" show-overflow-tooltip label="文件名称" />
288
+ <el-table-column prop="cltName" width="140px" show-overflow-tooltip label="所属单位" />
289
+ <el-table-column prop="fileVersion" align="center" label="版本号" />
290
+ <el-table-column prop="startValidTime" width="120px" label="起始有效时间" align="center" />
292
291
  <el-table-column prop="endValidTime" width="120px" label="截至有效时间" align="center"></el-table-column>
293
292
  <el-table-column prop="uploadTime" label="更新时间" width="160px" align="center">
294
293
  <template v-slot="{ row }">
@@ -306,38 +305,37 @@
306
305
  </Dialog>
307
306
 
308
307
  <Dialog
309
- v-drag
310
- class="p-a-0"
311
- :title="'附件预览' | $lc"
312
- :visible.sync="visibleP"
313
- top="2vh"
314
- width="96%"
315
- :close-on-click-modal="false"
316
- @close="closeSee"
308
+ v-drag
309
+ class="p-a-0"
310
+ :title="'附件预览' | $lc"
311
+ :visible.sync="visibleP"
312
+ top="2vh"
313
+ width="96%"
314
+ :close-on-click-modal="false"
315
+ @close="closeSee"
317
316
  >
318
317
  <span class="file-upload-table_preview-pn">
319
- <el-button round onlyicon plain size="mini" icon="el-icon-back" @click="preSee"/>
320
- <el-button round onlyicon plain size="mini" icon="el-icon-right" @click="nextSee"/>
318
+ <el-button round onlyicon plain size="mini" icon="el-icon-back" @click="preSee" />
319
+ <el-button round onlyicon plain size="mini" icon="el-icon-right" @click="nextSee" />
321
320
  </span>
322
321
 
323
322
  <div v-if="visiblePv" class="p-a" style="height: 82vh">
324
323
  <ViewerImg v-if="imgType.test(previewName)" :options="viewerOptions" style="height: 100%">
325
- <img :src="previewUrl" :alt="previewName" style="display: none"/>
324
+ <img :src="previewUrl" :alt="previewName" style="display: none" />
326
325
  </ViewerImg>
327
326
  <component
328
- :is="previewSameOrg ? 'object' : 'div'"
329
- v-else
330
- :key="previewUrl"
331
- :data="previewUrl"
332
- style="width: 100%; height: 100%"
327
+ :is="previewSameOrg ? 'object' : 'div'"
328
+ v-else
329
+ :key="previewUrl"
330
+ :data="previewUrl"
331
+ style="width: 100%; height: 100%"
333
332
  >
334
333
  <div class="flex-column flex-c flex-v" style="height: 100%">
335
334
  <i class="el-icon-s-release" style="font-size: 60px; color: #999"></i>
336
335
  <span style="margin-top: 16px">
337
- {{
338
- '不支持在线预览,请' | $lc
336
+ {{ '不支持在线预览,请' | $lc
339
337
  }}<el-link type="primary" class="color-primary" @click="downFile(seeRow)">{{ '下载' | $lc }}</el-link
340
- >{{ '到本地查看' | $lc }}
338
+ >{{ '到本地查看' | $lc }}
341
339
  </span>
342
340
  </div>
343
341
  </component>
@@ -348,20 +346,18 @@
348
346
 
349
347
  <script>
350
348
  import _axios from 'axios'
351
- import auth from '../../utils/auth.js'
352
- import Upload from '../Upload/index.vue'
353
- import {$lc} from '../../utils/i18n/index.js'
354
- import axios from '../../utils/axios.js'
355
- import {msgboxPor} from '../../utils/msgboxPor'
356
349
  import dayjs from 'dayjs'
357
- import Dialog from '../Dialog/index.vue'
358
350
  import 'viewerjs/dist/viewer.css'
359
- import importG from '../../utils/importGlobal.js'
351
+ import auth from '../../utils/auth.js'
352
+ import axios from '../../utils/axios.js'
360
353
  import downloadBlob from '../../utils/downloadBlob.js'
361
- import {log} from 'qrcode/lib/core/galois-field'
354
+ import { $lc } from '../../utils/i18n/index.js'
355
+ import importG from '../../utils/importGlobal.js'
356
+ import Dialog from '../Dialog/index.vue'
357
+ import Upload from '../Upload/index.vue'
362
358
 
363
359
  const ViewerImg = async function () {
364
- let {component} = await importG('v-viewer', () => import(/*webpackChunkName: "v-viewer"*/ 'v-viewer'))
360
+ let { component } = await importG('v-viewer', () => import(/*webpackChunkName: "v-viewer"*/ 'v-viewer'))
365
361
  return component
366
362
  }
367
363
 
@@ -377,7 +373,7 @@ const keysDefault = {
377
373
 
378
374
  export default {
379
375
  name: 'ElectronicArchive',
380
- components: {Dialog, Upload, ViewerImg},
376
+ components: { Dialog, Upload, ViewerImg },
381
377
  props: {
382
378
  readonly: {
383
379
  type: Boolean,
@@ -414,8 +410,7 @@ export default {
414
410
  },
415
411
  callBackFileData: {
416
412
  type: Function,
417
- default: () => {
418
- }
413
+ default: () => {}
419
414
  },
420
415
  tableData: {
421
416
  type: Array,
@@ -478,15 +473,15 @@ export default {
478
473
  handler(data) {
479
474
  if (data.length > 0) {
480
475
  this.tableDataC = data
481
- .map((res, i) => {
482
- if (res.bussValue !== this.dataProp.bussValue) {
483
- res.readonly = true
484
- }
485
- res.sort = i + 1
486
- res._name = res.recordname
487
- return res
488
- })
489
- .sort((a, b) => b.sort - a.sort)
476
+ .map((res, i) => {
477
+ if (res.bussValue !== this.dataProp.bussValue) {
478
+ res.readonly = true
479
+ }
480
+ res.sort = i + 1
481
+ res._name = res.recordname
482
+ return res
483
+ })
484
+ .sort((a, b) => b.sort - a.sort)
490
485
  }
491
486
  }
492
487
  }
@@ -534,7 +529,6 @@ export default {
534
529
  }
535
530
  },
536
531
  mounted() {
537
- console.log(this.dataProp)
538
532
  this.getAttachList()
539
533
  if (this.dataProp.bussId && this.dataProp.bussValue) {
540
534
  this.getFileList()
@@ -544,19 +538,19 @@ export default {
544
538
  },
545
539
  methods: {
546
540
  async getOfficeStatus() {
547
- const {data} = await this.$axios.get(
548
- this.requestPrefix
549
- ? `${this.requestPrefix}/neams/eamsBaseFile/getOfficeIsEnable`
550
- : `/neams/eamsBaseFile/getOfficeIsEnable`
541
+ const { data } = await this.$axios.get(
542
+ this.requestPrefix
543
+ ? `${this.requestPrefix}/neams/eamsBaseFile/getOfficeIsEnable`
544
+ : `/neams/eamsBaseFile/getOfficeIsEnable`
551
545
  )
552
546
  this.officeStatus = data
553
547
  },
554
- rowStyle({row, rowIndex}) {
548
+ rowStyle({ row, rowIndex }) {
555
549
  if (row.isEnable === '0') {
556
- return {'background-color': '#FF3C2F10'}
550
+ return { 'background-color': '#FF3C2F10' }
557
551
  }
558
552
  },
559
- tableRowClassName({row, rowIndex}) {
553
+ tableRowClassName({ row, rowIndex }) {
560
554
  // 基于 row 数据来判断是否需要变色
561
555
  if (row.isEnable === '0') {
562
556
  return 'hover-active' // 返回一个 CSS 类名
@@ -570,15 +564,15 @@ export default {
570
564
  },
571
565
  getCurrentRow(row) {
572
566
  axios.post(
573
- this.requestPrefix
574
- ? `${this.requestPrefix}/neams/eamsbaserecord/fileBind/bussId/beid/bussValue`
575
- : `/neams/eamsbaserecord/fileBind/bussId/beid/bussValue`,
576
- {
577
- beid: row.beid,
578
- beids: [row.beid],
579
- bussId: this.dataProp.bussId || this.row.bussId,
580
- bussValue: this.dataProp.bussValue
581
- }
567
+ this.requestPrefix
568
+ ? `${this.requestPrefix}/neams/eamsbaserecord/fileBind/bussId/beid/bussValue`
569
+ : `/neams/eamsbaserecord/fileBind/bussId/beid/bussValue`,
570
+ {
571
+ beid: row.beid,
572
+ beids: [row.beid],
573
+ bussId: this.dataProp.bussId || this.row.bussId,
574
+ bussValue: this.dataProp.bussValue
575
+ }
582
576
  )
583
577
  this.$set(this.row, 'beid', row.beid)
584
578
  this.$set(this.row, 'isEnable', row.isEnable)
@@ -592,14 +586,14 @@ export default {
592
586
  this.getFileList(this.row)
593
587
  },
594
588
  async getFileList(row) {
595
- const {code, data} = await axios.post(
596
- this.requestPrefix
597
- ? `${this.requestPrefix}/neams/eamsbaserecord/queryList?t=${Date.now()}`
598
- : `/neams/eamsbaserecord/queryList?t=${Date.now()}`,
599
- {
600
- bussValue: this.dataProp.bussValue,
601
- bussId: this.dataProp.bussId || row.bussId
602
- }
589
+ const { code, data } = await axios.post(
590
+ this.requestPrefix
591
+ ? `${this.requestPrefix}/neams/eamsbaserecord/queryList?t=${Date.now()}`
592
+ : `/neams/eamsbaserecord/queryList?t=${Date.now()}`,
593
+ {
594
+ bussValue: this.dataProp.bussValue,
595
+ bussId: this.dataProp.bussId || row.bussId
596
+ }
603
597
  )
604
598
  if (code === 200) {
605
599
  if (data.length > 0) {
@@ -608,15 +602,15 @@ export default {
608
602
  }
609
603
  },
610
604
  async getBaseData(row) {
611
- const {data} = await axios.post(
612
- this.requestPrefix
613
- ? `${this.requestPrefix}/neams/eamsBaseFile/qureyPageBaseFile`
614
- : `/neams/eamsBaseFile/qureyPageBaseFile`,
615
- {
616
- current: 1,
617
- attno: row[this.keys.type],
618
- pageSize: 200
619
- }
605
+ const { data } = await axios.post(
606
+ this.requestPrefix
607
+ ? `${this.requestPrefix}/neams/eamsBaseFile/qureyPageBaseFile`
608
+ : `/neams/eamsBaseFile/qureyPageBaseFile`,
609
+ {
610
+ current: 1,
611
+ attno: row[this.keys.type],
612
+ pageSize: 200
613
+ }
620
614
  )
621
615
  this.baseAttnoData = data.records || []
622
616
  },
@@ -669,7 +663,7 @@ export default {
669
663
  return Pro
670
664
  },
671
665
  handleTypeChange(val, row) {
672
- const {isBaseFile} = this.typeOptions.find((item) => item.attno === val)
666
+ const { isBaseFile } = this.typeOptions.find((item) => item.attno === val)
673
667
  if (isBaseFile === '1') {
674
668
  this.$set(row, 'isBaseFile', true)
675
669
  } else {
@@ -686,11 +680,11 @@ export default {
686
680
  // bussValue:this.dataProp.bussValue,
687
681
  bussValeList: this.dataProp.bussValues
688
682
  }
689
- const {code, data} = await axios.post(
690
- this.requestPrefix
691
- ? `${this.requestPrefix}/neams/eamsbusstype/getListByGradeAndBussValue`
692
- : `/neams/eamsbusstype/getListByGradeAndBussValue`,
693
- dto
683
+ const { code, data } = await axios.post(
684
+ this.requestPrefix
685
+ ? `${this.requestPrefix}/neams/eamsbusstype/getListByGradeAndBussValue`
686
+ : `/neams/eamsbusstype/getListByGradeAndBussValue`,
687
+ dto
694
688
  )
695
689
  if (code === 200) {
696
690
  this.bussTypeOptions = data || []
@@ -701,12 +695,11 @@ export default {
701
695
  * @returns {Promise<void>}
702
696
  */
703
697
  async getAttachList() {
704
- console.log(this.dataProp)
705
- const {data, code} = await axios.post(
706
- this.requestPrefix
707
- ? `${this.requestPrefix}/neams/eamsattachfile/getByBussValues`
708
- : `/neams/eamsattachfile/getByBussValues`,
709
- this.dataProp.bussValues
698
+ const { data, code } = await axios.post(
699
+ this.requestPrefix
700
+ ? `${this.requestPrefix}/neams/eamsattachfile/getByBussValues`
701
+ : `/neams/eamsattachfile/getByBussValues`,
702
+ this.dataProp.bussValues
710
703
  )
711
704
  if (code === 200) {
712
705
  this.typeOptions = data || []
@@ -758,20 +751,20 @@ export default {
758
751
  }
759
752
  })
760
753
  axios
761
- .post(
762
- this.requestPrefix
763
- ? `${this.requestPrefix}/neams/eamsbaserecord/batchDownloadFiles`
764
- : `/neams/eamsbaserecord/batchDownloadFiles`,
765
- data,
766
- {
767
- responseType: 'blob'
768
- }
769
- )
770
- .then((res) => {
771
- if (res) {
772
- downloadBlob(res, '附件压缩包.zip')
773
- }
774
- })
754
+ .post(
755
+ this.requestPrefix
756
+ ? `${this.requestPrefix}/neams/eamsbaserecord/batchDownloadFiles`
757
+ : `/neams/eamsbaserecord/batchDownloadFiles`,
758
+ data,
759
+ {
760
+ responseType: 'blob'
761
+ }
762
+ )
763
+ .then((res) => {
764
+ if (res) {
765
+ downloadBlob(res, '附件压缩包.zip')
766
+ }
767
+ })
775
768
  },
776
769
  deleteRows() {
777
770
  this.deleteRowsFn(this.selectionList)
@@ -796,8 +789,8 @@ export default {
796
789
  // 调接口删除
797
790
  if (filesId.length > 0) {
798
791
  const res = await axios.post(
799
- this.requestPrefix ? `${this.requestPrefix}/neams/eamsbaserecord/delete` : `/neams/eamsbaserecord/delete`,
800
- filesId
792
+ this.requestPrefix ? `${this.requestPrefix}/neams/eamsbaserecord/delete` : `/neams/eamsbaserecord/delete`,
793
+ filesId
801
794
  )
802
795
  if (res.code === 200) {
803
796
  if (!update) {
@@ -820,9 +813,9 @@ export default {
820
813
  if (bu) return bu(file, row)
821
814
  },
822
815
  async onSuccessFn(response, file, fileList, row) {
823
- const {data} = response
816
+ const { data } = response
824
817
  if (row.beid) {
825
- await this.deleteRows([{beid: row.beid}], 'update')
818
+ await this.deleteRows([{ beid: row.beid }], 'update')
826
819
  }
827
820
  let obj
828
821
  let _obj = data[0]
@@ -865,7 +858,7 @@ export default {
865
858
  let row = this.tableData[i + 1] || this.tableData[0]
866
859
  this.seeFile(row)
867
860
  },
868
- onProgressFn({percent}, row) {
861
+ onProgressFn({ percent }, row) {
869
862
  this.$set(row, '_percent', percent <= 99 ? Math.round(percent) : 99)
870
863
  },
871
864
  errorFn(err, file, fileList, row, $index) {
@@ -891,7 +884,7 @@ export default {
891
884
  this.$refs['upload' + $index]?.$refs['upload']?.submit()
892
885
  },
893
886
  seeFile(row) {
894
- if (!this.officeStatus) return;
887
+ if (!this.officeStatus) return
895
888
  if (this.getFileMethod) {
896
889
  this.getFileMethod(row, 'preview')
897
890
  return
@@ -911,13 +904,13 @@ export default {
911
904
  }
912
905
  // 下载
913
906
  let blob = await axios.get(
914
- this.requestPrefix
915
- ? `${this.requestPrefix}/neams/eamsbaserecord/download/${row.beid}`
916
- : `/neams/eamsbaserecord/download/${row.beid}`,
917
- null,
918
- {
919
- responseType: 'blob'
920
- }
907
+ this.requestPrefix
908
+ ? `${this.requestPrefix}/neams/eamsbaserecord/download/${row.beid}`
909
+ : `/neams/eamsbaserecord/download/${row.beid}`,
910
+ null,
911
+ {
912
+ responseType: 'blob'
913
+ }
921
914
  )
922
915
  let url = URL.createObjectURL(blob)
923
916
  if (url) {