n20-common-lib 2.7.49 → 2.7.51
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
|
@@ -283,9 +283,9 @@ export default {
|
|
|
283
283
|
if (value?.length > 1) {
|
|
284
284
|
return getWidth(selectedName) + 32 > textMaxWidth
|
|
285
285
|
? textMaxWidth + 'px'
|
|
286
|
-
: getWidth(selectedName) +
|
|
286
|
+
: getWidth(selectedName) + 110 + 'px'
|
|
287
287
|
} else {
|
|
288
|
-
return getWidth(selectedName) + 32 < textMinWidth ? textMinWidth + 'px' : getWidth(selectedName) +
|
|
288
|
+
return getWidth(selectedName) + 32 < textMinWidth ? textMinWidth + 'px' : getWidth(selectedName) + 84 + 'px'
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
}
|
|
@@ -17,23 +17,23 @@
|
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
<el-table
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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,17 +97,17 @@
|
|
|
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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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>
|
|
107
107
|
</el-table-column>
|
|
108
108
|
<el-table-column v-if="readonly" :label="'附件上传' | $lc" :prop="keys.name">
|
|
109
109
|
<template v-slot:header="scope">
|
|
110
|
-
<slot name="upload-header" :column="scope.column">{{ '附件上传' | $lc }}
|
|
110
|
+
<slot name="upload-header" :column="scope.column">{{ '附件上传' | $lc }}</slot>
|
|
111
111
|
</template>
|
|
112
112
|
<template v-slot="{ row }">
|
|
113
113
|
<slot name="upload" :row="row">
|
|
@@ -117,23 +117,23 @@
|
|
|
117
117
|
</el-table-column>
|
|
118
118
|
<el-table-column v-if="!readonly" :label="'附件上传' | $lc" width="150">
|
|
119
119
|
<template v-slot:header="scope">
|
|
120
|
-
<slot name="upload-header" :column="scope.column">{{ '附件上传' | $lc }}
|
|
120
|
+
<slot name="upload-header" :column="scope.column">{{ '附件上传' | $lc }}</slot>
|
|
121
121
|
</template>
|
|
122
122
|
<template v-slot="{ row, $index }">
|
|
123
123
|
<slot name="upload" :row="row" :[indexKey]="$index">
|
|
124
124
|
<el-input
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
|
|
135
|
-
|
|
136
|
-
|
|
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
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
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
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
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
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
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
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
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
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
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,25 @@
|
|
|
271
271
|
|
|
272
272
|
<Dialog title="基础附件选择" width="85%" max-dialog :visible.sync="baseVisible">
|
|
273
273
|
<el-table
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
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
282
|
<el-radio :label="scope.$index" v-model="radio" @change.native="getCurrentRow(scope.row)">{{
|
|
283
|
-
|
|
284
|
-
|
|
283
|
+
''
|
|
284
|
+
}}
|
|
285
|
+
</el-radio>
|
|
285
286
|
</template>
|
|
286
287
|
</el-table-column>
|
|
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"
|
|
291
|
-
<el-table-column prop="endValidTime" width="120px" label="截至有效时间" align="center"
|
|
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"/>
|
|
292
|
+
<el-table-column prop="endValidTime" width="120px" label="截至有效时间" align="center"></el-table-column>
|
|
292
293
|
<el-table-column prop="uploadTime" label="更新时间" width="160px" align="center">
|
|
293
294
|
<template v-slot="{ row }">
|
|
294
295
|
{{ dayjs(row.uploadTime).format('YYYY-MM-DD HH:mm:ss') }}
|
|
@@ -305,37 +306,38 @@
|
|
|
305
306
|
</Dialog>
|
|
306
307
|
|
|
307
308
|
<Dialog
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
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"
|
|
316
317
|
>
|
|
317
318
|
<span class="file-upload-table_preview-pn">
|
|
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"
|
|
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"/>
|
|
320
321
|
</span>
|
|
321
322
|
|
|
322
323
|
<div v-if="visiblePv" class="p-a" style="height: 82vh">
|
|
323
324
|
<ViewerImg v-if="imgType.test(previewName)" :options="viewerOptions" style="height: 100%">
|
|
324
|
-
<img :src="previewUrl" :alt="previewName" style="display: none"
|
|
325
|
+
<img :src="previewUrl" :alt="previewName" style="display: none"/>
|
|
325
326
|
</ViewerImg>
|
|
326
327
|
<component
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
328
|
+
:is="previewSameOrg ? 'object' : 'div'"
|
|
329
|
+
v-else
|
|
330
|
+
:key="previewUrl"
|
|
331
|
+
:data="previewUrl"
|
|
332
|
+
style="width: 100%; height: 100%"
|
|
332
333
|
>
|
|
333
334
|
<div class="flex-column flex-c flex-v" style="height: 100%">
|
|
334
335
|
<i class="el-icon-s-release" style="font-size: 60px; color: #999"></i>
|
|
335
336
|
<span style="margin-top: 16px">
|
|
336
|
-
{{
|
|
337
|
+
{{
|
|
338
|
+
'不支持在线预览,请' | $lc
|
|
337
339
|
}}<el-link type="primary" class="color-primary" @click="downFile(seeRow)">{{ '下载' | $lc }}</el-link
|
|
338
|
-
|
|
340
|
+
>{{ '到本地查看' | $lc }}
|
|
339
341
|
</span>
|
|
340
342
|
</div>
|
|
341
343
|
</component>
|
|
@@ -348,18 +350,18 @@
|
|
|
348
350
|
import _axios from 'axios'
|
|
349
351
|
import auth from '../../utils/auth.js'
|
|
350
352
|
import Upload from '../Upload/index.vue'
|
|
351
|
-
import {
|
|
353
|
+
import {$lc} from '../../utils/i18n/index.js'
|
|
352
354
|
import axios from '../../utils/axios.js'
|
|
353
|
-
import {
|
|
355
|
+
import {msgboxPor} from '../../utils/msgboxPor'
|
|
354
356
|
import dayjs from 'dayjs'
|
|
355
357
|
import Dialog from '../Dialog/index.vue'
|
|
356
358
|
import 'viewerjs/dist/viewer.css'
|
|
357
359
|
import importG from '../../utils/importGlobal.js'
|
|
358
360
|
import downloadBlob from '../../utils/downloadBlob.js'
|
|
359
|
-
import {
|
|
361
|
+
import {log} from 'qrcode/lib/core/galois-field'
|
|
360
362
|
|
|
361
363
|
const ViewerImg = async function () {
|
|
362
|
-
let {
|
|
364
|
+
let {component} = await importG('v-viewer', () => import(/*webpackChunkName: "v-viewer"*/ 'v-viewer'))
|
|
363
365
|
return component
|
|
364
366
|
}
|
|
365
367
|
|
|
@@ -375,7 +377,7 @@ const keysDefault = {
|
|
|
375
377
|
|
|
376
378
|
export default {
|
|
377
379
|
name: 'ElectronicArchive',
|
|
378
|
-
components: {
|
|
380
|
+
components: {Dialog, Upload, ViewerImg},
|
|
379
381
|
props: {
|
|
380
382
|
readonly: {
|
|
381
383
|
type: Boolean,
|
|
@@ -412,7 +414,8 @@ export default {
|
|
|
412
414
|
},
|
|
413
415
|
callBackFileData: {
|
|
414
416
|
type: Function,
|
|
415
|
-
default: () => {
|
|
417
|
+
default: () => {
|
|
418
|
+
}
|
|
416
419
|
},
|
|
417
420
|
tableData: {
|
|
418
421
|
type: Array,
|
|
@@ -475,15 +478,15 @@ export default {
|
|
|
475
478
|
handler(data) {
|
|
476
479
|
if (data.length > 0) {
|
|
477
480
|
this.tableDataC = data
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
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)
|
|
487
490
|
}
|
|
488
491
|
}
|
|
489
492
|
}
|
|
@@ -541,19 +544,19 @@ export default {
|
|
|
541
544
|
},
|
|
542
545
|
methods: {
|
|
543
546
|
async getOfficeStatus() {
|
|
544
|
-
const {
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
547
|
+
const {data} = await this.$axios.get(
|
|
548
|
+
this.requestPrefix
|
|
549
|
+
? `${this.requestPrefix}/neams/eamsBaseFile/getOfficeIsEnable`
|
|
550
|
+
: `/neams/eamsBaseFile/getOfficeIsEnable`
|
|
548
551
|
)
|
|
549
552
|
this.officeStatus = data
|
|
550
553
|
},
|
|
551
|
-
rowStyle({
|
|
554
|
+
rowStyle({row, rowIndex}) {
|
|
552
555
|
if (row.isEnable === '0') {
|
|
553
|
-
return {
|
|
556
|
+
return {'background-color': '#FF3C2F10'}
|
|
554
557
|
}
|
|
555
558
|
},
|
|
556
|
-
tableRowClassName({
|
|
559
|
+
tableRowClassName({row, rowIndex}) {
|
|
557
560
|
// 基于 row 数据来判断是否需要变色
|
|
558
561
|
if (row.isEnable === '0') {
|
|
559
562
|
return 'hover-active' // 返回一个 CSS 类名
|
|
@@ -567,15 +570,15 @@ export default {
|
|
|
567
570
|
},
|
|
568
571
|
getCurrentRow(row) {
|
|
569
572
|
axios.post(
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
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
|
+
}
|
|
579
582
|
)
|
|
580
583
|
this.$set(this.row, 'beid', row.beid)
|
|
581
584
|
this.$set(this.row, 'isEnable', row.isEnable)
|
|
@@ -589,14 +592,14 @@ export default {
|
|
|
589
592
|
this.getFileList(this.row)
|
|
590
593
|
},
|
|
591
594
|
async getFileList(row) {
|
|
592
|
-
const {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
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
|
+
}
|
|
600
603
|
)
|
|
601
604
|
if (code === 200) {
|
|
602
605
|
if (data.length > 0) {
|
|
@@ -605,15 +608,15 @@ export default {
|
|
|
605
608
|
}
|
|
606
609
|
},
|
|
607
610
|
async getBaseData(row) {
|
|
608
|
-
const {
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
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
|
+
}
|
|
617
620
|
)
|
|
618
621
|
this.baseAttnoData = data.records || []
|
|
619
622
|
},
|
|
@@ -666,7 +669,7 @@ export default {
|
|
|
666
669
|
return Pro
|
|
667
670
|
},
|
|
668
671
|
handleTypeChange(val, row) {
|
|
669
|
-
const {
|
|
672
|
+
const {isBaseFile} = this.typeOptions.find((item) => item.attno === val)
|
|
670
673
|
if (isBaseFile === '1') {
|
|
671
674
|
this.$set(row, 'isBaseFile', true)
|
|
672
675
|
} else {
|
|
@@ -683,11 +686,11 @@ export default {
|
|
|
683
686
|
// bussValue:this.dataProp.bussValue,
|
|
684
687
|
bussValeList: this.dataProp.bussValues
|
|
685
688
|
}
|
|
686
|
-
const {
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
689
|
+
const {code, data} = await axios.post(
|
|
690
|
+
this.requestPrefix
|
|
691
|
+
? `${this.requestPrefix}/neams/eamsbusstype/getListByGradeAndBussValue`
|
|
692
|
+
: `/neams/eamsbusstype/getListByGradeAndBussValue`,
|
|
693
|
+
dto
|
|
691
694
|
)
|
|
692
695
|
if (code === 200) {
|
|
693
696
|
this.bussTypeOptions = data || []
|
|
@@ -699,11 +702,11 @@ export default {
|
|
|
699
702
|
*/
|
|
700
703
|
async getAttachList() {
|
|
701
704
|
console.log(this.dataProp)
|
|
702
|
-
const {
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
705
|
+
const {data, code} = await axios.post(
|
|
706
|
+
this.requestPrefix
|
|
707
|
+
? `${this.requestPrefix}/neams/eamsattachfile/getByBussValues`
|
|
708
|
+
: `/neams/eamsattachfile/getByBussValues`,
|
|
709
|
+
this.dataProp.bussValues
|
|
707
710
|
)
|
|
708
711
|
if (code === 200) {
|
|
709
712
|
this.typeOptions = data || []
|
|
@@ -755,20 +758,20 @@ export default {
|
|
|
755
758
|
}
|
|
756
759
|
})
|
|
757
760
|
axios
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
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
|
+
})
|
|
772
775
|
},
|
|
773
776
|
deleteRows() {
|
|
774
777
|
this.deleteRowsFn(this.selectionList)
|
|
@@ -793,8 +796,8 @@ export default {
|
|
|
793
796
|
// 调接口删除
|
|
794
797
|
if (filesId.length > 0) {
|
|
795
798
|
const res = await axios.post(
|
|
796
|
-
|
|
797
|
-
|
|
799
|
+
this.requestPrefix ? `${this.requestPrefix}/neams/eamsbaserecord/delete` : `/neams/eamsbaserecord/delete`,
|
|
800
|
+
filesId
|
|
798
801
|
)
|
|
799
802
|
if (res.code === 200) {
|
|
800
803
|
if (!update) {
|
|
@@ -817,9 +820,9 @@ export default {
|
|
|
817
820
|
if (bu) return bu(file, row)
|
|
818
821
|
},
|
|
819
822
|
async onSuccessFn(response, file, fileList, row) {
|
|
820
|
-
const {
|
|
823
|
+
const {data} = response
|
|
821
824
|
if (row.beid) {
|
|
822
|
-
await this.deleteRows([{
|
|
825
|
+
await this.deleteRows([{beid: row.beid}], 'update')
|
|
823
826
|
}
|
|
824
827
|
let obj
|
|
825
828
|
let _obj = data[0]
|
|
@@ -862,7 +865,7 @@ export default {
|
|
|
862
865
|
let row = this.tableData[i + 1] || this.tableData[0]
|
|
863
866
|
this.seeFile(row)
|
|
864
867
|
},
|
|
865
|
-
onProgressFn({
|
|
868
|
+
onProgressFn({percent}, row) {
|
|
866
869
|
this.$set(row, '_percent', percent <= 99 ? Math.round(percent) : 99)
|
|
867
870
|
},
|
|
868
871
|
errorFn(err, file, fileList, row, $index) {
|
|
@@ -888,11 +891,12 @@ export default {
|
|
|
888
891
|
this.$refs['upload' + $index]?.$refs['upload']?.submit()
|
|
889
892
|
},
|
|
890
893
|
seeFile(row) {
|
|
894
|
+
if (!this.officeStatus) return;
|
|
891
895
|
if (this.getFileMethod) {
|
|
892
896
|
this.getFileMethod(row, 'preview')
|
|
893
897
|
return
|
|
894
898
|
}
|
|
895
|
-
this.previewUrl = `/onlinePreview?beid=${row.beid}`
|
|
899
|
+
this.previewUrl = `/api/onlinePreview?beid=${row.beid}`
|
|
896
900
|
this.previewName = row.name
|
|
897
901
|
this.previewSameOrg = true
|
|
898
902
|
this.visibleP = true
|
|
@@ -907,13 +911,13 @@ export default {
|
|
|
907
911
|
}
|
|
908
912
|
// 下载
|
|
909
913
|
let blob = await axios.get(
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
914
|
+
this.requestPrefix
|
|
915
|
+
? `${this.requestPrefix}/neams/eamsbaserecord/download/${row.beid}`
|
|
916
|
+
: `/neams/eamsbaserecord/download/${row.beid}`,
|
|
917
|
+
null,
|
|
918
|
+
{
|
|
919
|
+
responseType: 'blob'
|
|
920
|
+
}
|
|
917
921
|
)
|
|
918
922
|
let url = URL.createObjectURL(blob)
|
|
919
923
|
if (url) {
|
|
@@ -1,6 +1,81 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span>
|
|
3
|
-
<
|
|
3
|
+
<template v-for="(item, i) in dfBtns" class="flex-box flex-v">
|
|
4
|
+
<el-dropdown
|
|
5
|
+
v-if="item.children && item.children.length"
|
|
6
|
+
:key="item.label"
|
|
7
|
+
class="m-l-b"
|
|
8
|
+
@command="(c) => $emit('command', c)"
|
|
9
|
+
>
|
|
10
|
+
<div class="flex-box flex-v">
|
|
11
|
+
<el-link
|
|
12
|
+
:key="item.label"
|
|
13
|
+
:class="i ? 'm-l-b' : ''"
|
|
14
|
+
type="primary"
|
|
15
|
+
:underline="false"
|
|
16
|
+
:disabled="item.disabled | dbdBtn(row)"
|
|
17
|
+
@click="$emit('command', item.command)"
|
|
18
|
+
>
|
|
19
|
+
<span v-if="item.tip" v-title="`${item.tip}`">{{ item.label }}</span>
|
|
20
|
+
<span v-else>{{ item.label }}</span>
|
|
21
|
+
</el-link>
|
|
22
|
+
<i class="el-icon-arrow-down color-primary" />
|
|
23
|
+
</div>
|
|
24
|
+
<el-dropdown-menu slot="dropdown" class="text-c">
|
|
25
|
+
<el-dropdown-item
|
|
26
|
+
v-for="item1 in item.children"
|
|
27
|
+
:key="item1.label"
|
|
28
|
+
:command="item1.command"
|
|
29
|
+
:disabled="item1.disabled | dbdBtn(row)"
|
|
30
|
+
>
|
|
31
|
+
<el-link v-if="item1.type" :type="item1.type" :underline="false">{{ item1.label }}</el-link>
|
|
32
|
+
<template v-else>{{ item1.label }}</template>
|
|
33
|
+
</el-dropdown-item>
|
|
34
|
+
</el-dropdown-menu>
|
|
35
|
+
</el-dropdown>
|
|
36
|
+
<el-link
|
|
37
|
+
v-else
|
|
38
|
+
:key="item.label"
|
|
39
|
+
:class="i ? 'm-l-b' : ''"
|
|
40
|
+
:type="item.type || 'primary'"
|
|
41
|
+
:underline="false"
|
|
42
|
+
:disabled="item.disabled | dbdBtn(row)"
|
|
43
|
+
@click="$emit('command', item.command)"
|
|
44
|
+
>
|
|
45
|
+
<span v-if="item.tip" v-title="`${item.tip}`">{{ item.label }}</span>
|
|
46
|
+
<span v-else>{{ item.label }}</span>
|
|
47
|
+
</el-link>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<el-dropdown v-if="moreBtns.length" class="m-l-b" @command="(c) => $emit('command', c)">
|
|
51
|
+
<el-button class="n20-icon-moren" type="text" size="mini" />
|
|
52
|
+
<el-dropdown-menu slot="dropdown" class="text-c">
|
|
53
|
+
<template v-for="(item, i) in moreBtns">
|
|
54
|
+
<el-dropdown-item :key="i" v-if="item.children && item.children.length">
|
|
55
|
+
<template>{{ item.label }}</template>
|
|
56
|
+
<el-dropdown class="m-l-b" @command="(c) => $emit('command', c)">
|
|
57
|
+
<i class="el-icon-arrow-down" />
|
|
58
|
+
<el-dropdown-menu slot="dropdown" class="text-c">
|
|
59
|
+
<el-dropdown-item
|
|
60
|
+
v-for="item2 in item.children"
|
|
61
|
+
:key="item2.label"
|
|
62
|
+
:command="item2.command"
|
|
63
|
+
:disabled="item2.disabled | dbdBtn(row)"
|
|
64
|
+
>
|
|
65
|
+
<el-link v-if="item2.type" :type="item2.type" :underline="false">{{ item2.label }}</el-link>
|
|
66
|
+
<template v-else>{{ item2.label }}</template>
|
|
67
|
+
</el-dropdown-item>
|
|
68
|
+
</el-dropdown-menu>
|
|
69
|
+
</el-dropdown>
|
|
70
|
+
</el-dropdown-item>
|
|
71
|
+
<el-dropdown-item v-else :key="item.label" :command="item.command" :disabled="item.disabled | dbdBtn(row)">
|
|
72
|
+
<el-link v-if="item.type" :type="item.type" :underline="false">{{ item.label }}</el-link>
|
|
73
|
+
<template v-else>{{ item.label }}</template>
|
|
74
|
+
</el-dropdown-item>
|
|
75
|
+
</template>
|
|
76
|
+
</el-dropdown-menu>
|
|
77
|
+
</el-dropdown>
|
|
78
|
+
<!-- <el-link
|
|
4
79
|
v-for="(item, i) in dfBtns"
|
|
5
80
|
:key="item.label"
|
|
6
81
|
:class="i ? 'm-l-b' : ''"
|
|
@@ -25,7 +100,7 @@
|
|
|
25
100
|
<template v-else>{{ item.label }}</template>
|
|
26
101
|
</el-dropdown-item>
|
|
27
102
|
</el-dropdown-menu>
|
|
28
|
-
</el-dropdown>
|
|
103
|
+
</el-dropdown> -->
|
|
29
104
|
</span>
|
|
30
105
|
</template>
|
|
31
106
|
|