n20-common-lib 2.7.64 → 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.
- package/package.json +1 -1
- package/src/components/AdvancedFilter/formItemRender.vue +8 -4
- package/src/components/ApprovalRecord/approvalImgPro/index.vue +0 -1
- package/src/components/DateChoose/index.vue +0 -1
- package/src/components/ElectronicArchive/index.vue +227 -234
- package/src/components/FileUploadTable/index.vue +20 -13
- package/src/components/Layout/HeaderWrap/menuDrawer.vue +0 -1
- package/src/components/Sifting/index.vue +1 -4
- package/src/directives/VRuleKey/index.js +2 -2
package/package.json
CHANGED
|
@@ -279,13 +279,18 @@ export default {
|
|
|
279
279
|
item.props?.valueKey || 'value',
|
|
280
280
|
item.props?.labelKey || 'label'
|
|
281
281
|
)
|
|
282
|
-
console.log(selectedName)
|
|
283
282
|
if (value?.length > 1) {
|
|
284
283
|
return getWidth(selectedName) + 32 > textMaxWidth
|
|
285
284
|
? textMaxWidth + 'px'
|
|
285
|
+
: getWidth(selectedName) > 88
|
|
286
|
+
? '170px'
|
|
286
287
|
: getWidth(selectedName) + 110 + 'px'
|
|
287
288
|
} else {
|
|
288
|
-
return getWidth(selectedName)
|
|
289
|
+
return getWidth(selectedName) > 88
|
|
290
|
+
? '128px'
|
|
291
|
+
: getWidth(selectedName) + 32 < textMinWidth
|
|
292
|
+
? textMinWidth + 'px'
|
|
293
|
+
: getWidth(selectedName) + 84 + 'px'
|
|
289
294
|
}
|
|
290
295
|
}
|
|
291
296
|
}
|
|
@@ -297,7 +302,6 @@ export default {
|
|
|
297
302
|
if (!value && !value2) {
|
|
298
303
|
return textMinWidth + 'px'
|
|
299
304
|
} else {
|
|
300
|
-
console.log(value, value2, getWidth(value))
|
|
301
305
|
if (!value || !value2) {
|
|
302
306
|
let widthMax = (getWidth(value) + getWidth(value2) + 72) * 2
|
|
303
307
|
if (widthMax < textMinWidth) {
|
|
@@ -432,7 +436,7 @@ export default {
|
|
|
432
436
|
const selectProps = {
|
|
433
437
|
placeholder: item.props && item.props.placeholder ? item.props.placeholder : $lc('请选择'),
|
|
434
438
|
clearable: (item.props && this.item.props.clearable) ?? true,
|
|
435
|
-
multiple: item.multiple,
|
|
439
|
+
multiple: item.multiple || item.props.multiple,
|
|
436
440
|
...item.props
|
|
437
441
|
}
|
|
438
442
|
elementDom = h(
|
|
@@ -269,7 +269,6 @@ export default {
|
|
|
269
269
|
Object.keys(data).forEach((id) => {
|
|
270
270
|
let task = this.svgW.querySelector(`[data-element-id="${id}"]`)
|
|
271
271
|
if (task) {
|
|
272
|
-
console.log('setPendingUserInfo:', data[id])
|
|
273
272
|
this.addEvent(task, { taskCandidate: data[id] }, 'unApply')
|
|
274
273
|
}
|
|
275
274
|
})
|
|
@@ -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,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
|
-
|
|
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>
|
|
@@ -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
|
-
|
|
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,23 @@
|
|
|
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
|
-
<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
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
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
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
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
|
-
|
|
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
|
|
351
|
+
import auth from '../../utils/auth.js'
|
|
352
|
+
import axios from '../../utils/axios.js'
|
|
360
353
|
import downloadBlob from '../../utils/downloadBlob.js'
|
|
361
|
-
import {
|
|
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
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
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
|
-
|
|
549
|
-
|
|
550
|
-
|
|
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
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
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
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
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
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
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
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
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
|
-
|
|
705
|
-
|
|
706
|
-
this.requestPrefix
|
|
707
|
-
|
|
708
|
-
|
|
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
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
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
|
-
|
|
800
|
-
|
|
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
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
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) {
|
|
@@ -164,7 +164,13 @@
|
|
|
164
164
|
<el-table-column :label="'操作' | $lc" align="center" width="90" fixed="right">
|
|
165
165
|
<slot slot="header" slot-scope="scope" name="handle-header" :column="scope.column">{{ '操作' | $lc }}</slot>
|
|
166
166
|
<slot slot-scope="{ row }" name="handle" :row="row">
|
|
167
|
-
<el-button
|
|
167
|
+
<el-button
|
|
168
|
+
type="text"
|
|
169
|
+
icon="el-icon-view"
|
|
170
|
+
v-if="getOfficeStatus"
|
|
171
|
+
:disabled="!row[keys.url]"
|
|
172
|
+
@click="seeFile(row)"
|
|
173
|
+
/>
|
|
168
174
|
<el-button
|
|
169
175
|
v-if="readonly"
|
|
170
176
|
type="text"
|
|
@@ -267,16 +273,16 @@
|
|
|
267
273
|
</template>
|
|
268
274
|
|
|
269
275
|
<script>
|
|
276
|
+
import _axios from 'axios'
|
|
270
277
|
import dayjs from 'dayjs'
|
|
271
278
|
import cloneDeep from 'lodash/cloneDeep'
|
|
272
279
|
import 'viewerjs/dist/viewer.css'
|
|
280
|
+
import auth from '../../utils/auth'
|
|
273
281
|
import axios from '../../utils/axios'
|
|
274
282
|
import { $lc } from '../../utils/i18n/index'
|
|
275
283
|
import importG from '../../utils/importGlobal.js'
|
|
276
284
|
import Dialog from '../Dialog/index.vue'
|
|
277
285
|
import Upload from '../Upload/index.vue'
|
|
278
|
-
import auth from '../../utils/auth'
|
|
279
|
-
import _axios from 'axios'
|
|
280
286
|
|
|
281
287
|
const ViewerImg = async function () {
|
|
282
288
|
let { component } = await importG('v-viewer', () => import(/*webpackChunkName: "v-viewer"*/ 'v-viewer'))
|
|
@@ -410,7 +416,7 @@ export default {
|
|
|
410
416
|
}
|
|
411
417
|
|
|
412
418
|
return {
|
|
413
|
-
bathType:'',
|
|
419
|
+
bathType: '',
|
|
414
420
|
indexK: '$index',
|
|
415
421
|
imgType: /\.(jpg|png|gif|svg)$/i,
|
|
416
422
|
selectionList: [],
|
|
@@ -422,7 +428,7 @@ export default {
|
|
|
422
428
|
previewName: undefined,
|
|
423
429
|
previewSameOrg: false,
|
|
424
430
|
seeRow: {},
|
|
425
|
-
officeStatus:false
|
|
431
|
+
officeStatus: false
|
|
426
432
|
}
|
|
427
433
|
},
|
|
428
434
|
computed: {
|
|
@@ -450,8 +456,11 @@ export default {
|
|
|
450
456
|
},
|
|
451
457
|
methods: {
|
|
452
458
|
async getOfficeStatus() {
|
|
453
|
-
const {data} =await this.$axios.get(
|
|
454
|
-
|
|
459
|
+
const { data } = await this.$axios.get(
|
|
460
|
+
this.apiPrefix
|
|
461
|
+
? `${this.apiPrefix}/neams/eamsBaseFile/getOfficeIsEnable`
|
|
462
|
+
: `/neams/eamsBaseFile/getOfficeIsEnable`
|
|
463
|
+
)
|
|
455
464
|
this.officeStatus = data
|
|
456
465
|
},
|
|
457
466
|
handleBathUpload() {
|
|
@@ -493,7 +502,7 @@ export default {
|
|
|
493
502
|
let bu = this.$listeners['before-upload'] || this.$listeners['beforeUpload']
|
|
494
503
|
if (bu) return bu(file)
|
|
495
504
|
},
|
|
496
|
-
handleBathChange(){
|
|
505
|
+
handleBathChange() {
|
|
497
506
|
let dto = JSON.parse(this.dataPorp.fileData.data)
|
|
498
507
|
dto[this.keys.type] = this.bathType
|
|
499
508
|
this.fileData.data = JSON.stringify(dto)
|
|
@@ -525,7 +534,7 @@ export default {
|
|
|
525
534
|
file.OrgName || (file.OrgName = file.name)
|
|
526
535
|
file.name = file.OrgName + ` *(${err.msg})`
|
|
527
536
|
}
|
|
528
|
-
|
|
537
|
+
|
|
529
538
|
list.push(file)
|
|
530
539
|
let $uploadwrap = this.$refs['upload-batch']
|
|
531
540
|
$uploadwrap.fileList = list
|
|
@@ -573,7 +582,7 @@ export default {
|
|
|
573
582
|
if (type === 'preview') {
|
|
574
583
|
// 预览
|
|
575
584
|
return {
|
|
576
|
-
url
|
|
585
|
+
url: `/api/onlinePreview?beid=${row[this.keys.rowKey]}`,
|
|
577
586
|
name: row[this.keys.name] + '.html',
|
|
578
587
|
sameOrg: this.seeTypes.test(row[this.keys.name])
|
|
579
588
|
}
|
|
@@ -645,7 +654,6 @@ export default {
|
|
|
645
654
|
}, 300)
|
|
646
655
|
},
|
|
647
656
|
uploadHttpRequestBath(opt) {
|
|
648
|
-
console.log(opt.data)
|
|
649
657
|
if (this.uploadHttpRequest) {
|
|
650
658
|
return this.uploadHttpRequest(opt)
|
|
651
659
|
} else {
|
|
@@ -686,7 +694,6 @@ export default {
|
|
|
686
694
|
Pro.abort = abort
|
|
687
695
|
return Pro
|
|
688
696
|
}
|
|
689
|
-
console.log(opt)
|
|
690
697
|
},
|
|
691
698
|
beforeUploadFn(file, row) {
|
|
692
699
|
this.$set(row, '_percent', 0)
|
|
@@ -702,7 +709,7 @@ export default {
|
|
|
702
709
|
this.$set(row, '_typeDisabled', true)
|
|
703
710
|
this.$set(row, '_name', file.name)
|
|
704
711
|
this.$set(row, '_percent', 100)
|
|
705
|
-
this.$set(row,[this.keys.type],row[this.keys.type]||this.bathType)
|
|
712
|
+
this.$set(row, [this.keys.type], row[this.keys.type] || this.bathType)
|
|
706
713
|
row[this.keys.time] = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
707
714
|
|
|
708
715
|
row[this.keys.url] = response.data
|
|
@@ -61,7 +61,6 @@ export default {
|
|
|
61
61
|
window.location.href = window.location.origin + base + 'dashboard/workplace'
|
|
62
62
|
},
|
|
63
63
|
async clickMenu(row, MenuTre) {
|
|
64
|
-
console.log(row)
|
|
65
64
|
window.sessionStorage.setItem('navFlog', true)
|
|
66
65
|
let pageInSystemNo = window.localStorage.getItem('pageInSystemNo')
|
|
67
66
|
window.localStorage.setItem('pageInType', 'toFront')
|
|
@@ -71,14 +71,11 @@ export default {
|
|
|
71
71
|
.map((c) => c.children)
|
|
72
72
|
.flat()
|
|
73
73
|
.map((r) => r.name)
|
|
74
|
-
console.log(this.checkedCities)
|
|
75
74
|
},
|
|
76
75
|
handlAffirm() {
|
|
77
76
|
this.$emit('Affirm', this.checkedCities)
|
|
78
77
|
},
|
|
79
|
-
handleCheckedCitiesChange(val) {
|
|
80
|
-
console.log(val)
|
|
81
|
-
}
|
|
78
|
+
handleCheckedCitiesChange(val) {}
|
|
82
79
|
}
|
|
83
80
|
}
|
|
84
81
|
</script>
|
|
@@ -118,7 +118,7 @@ directive.install = (Vue) => {
|
|
|
118
118
|
let ruleField = _this.$attrs['ruleField']
|
|
119
119
|
// 表单验证
|
|
120
120
|
el[VALIDATE] = async (type) => {
|
|
121
|
-
let _value = _this[binding
|
|
121
|
+
let _value = _this[binding?.value || 'value']
|
|
122
122
|
let _rules = getRules(_this.$attrs['rules'], type)
|
|
123
123
|
|
|
124
124
|
if (_rules.length > 0) {
|
|
@@ -147,7 +147,7 @@ directive.install = (Vue) => {
|
|
|
147
147
|
})
|
|
148
148
|
|
|
149
149
|
// 监听值变化
|
|
150
|
-
_this.$watch(binding
|
|
150
|
+
_this.$watch(binding?.value || 'value', () => {
|
|
151
151
|
setTimeout(() => el[VALIDATE]('change'))
|
|
152
152
|
})
|
|
153
153
|
}
|