n20-common-lib 2.22.63 → 2.22.65-patch
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/nstc-g6/components/NstcDialog/NstcDialog.vue +0 -3
- package/nstc-g6/components/NstcDialogTable/NstcDialogTable.vue +0 -1
- package/nstc-g6/components/NstcElectronicFile/NstcElectronicFile.vue +14 -16
- package/nstc-g6/components/NstcExcelCustomImport/NstcExcelCustomImport.vue +1 -2
- package/nstc-g6/components/NstcExcelImport/NstcExcelImport.vue +1 -2
- package/nstc-g6/components/NstcExcelImportN/NstcExcelImportN.vue +0 -1
- package/nstc-g6/components/NstcFileUpload/NstcFileUpload.vue +18 -19
- package/nstc-g6/components/NstcPagination/NstcPagination.vue +0 -1
- package/nstc-g6/components/NstcScreenFull/NstcScreenFull.vue +1 -3
- package/nstc-g6/components/NstcTableSet/NstcTableSet.vue +3 -4
- package/nstc-g6/components/NstcWorkBench/NstcWorkBench.vue +0 -2
- package/nstc-g6/components/Search/NstcSearch.vue +0 -1
- package/package.json +1 -1
- package/src/components/ApprovalButtons/index.vue +5 -2
- package/src/components/ApprovalButtons/indexApp.vue +6 -3
- package/src/components/ApprovalRecord/index.vue +2 -2
- package/src/components/ApprovalRecord/indexApp.vue +1 -6
- package/src/components/FileUploadTable/FileUploadTableV3.vue +10 -10
- package/src/components/FileUploadTable/index.vue +2 -2
- package/src/utils/serverConfig.js +77 -0
|
@@ -44,8 +44,6 @@
|
|
|
44
44
|
</template>
|
|
45
45
|
|
|
46
46
|
<script>
|
|
47
|
-
import { $lc } from '../../../src/utils/i18n/index.js'
|
|
48
|
-
|
|
49
47
|
export default {
|
|
50
48
|
name: 'NstcDialog',
|
|
51
49
|
props: {
|
|
@@ -138,7 +136,6 @@ export default {
|
|
|
138
136
|
}
|
|
139
137
|
},
|
|
140
138
|
methods: {
|
|
141
|
-
$lc,
|
|
142
139
|
handleConfirm() {
|
|
143
140
|
this.handleListeners('confirm')
|
|
144
141
|
},
|
|
@@ -146,7 +146,6 @@
|
|
|
146
146
|
<script>
|
|
147
147
|
import axios from 'axios'
|
|
148
148
|
import Cookies from 'js-cookie'
|
|
149
|
-
import { $lc } from '../../../src/utils/i18n/index.js'
|
|
150
149
|
var CancelToken = axios.CancelToken
|
|
151
150
|
let token = Cookies.get('Admin-Token')
|
|
152
151
|
function randomString(num) {
|
|
@@ -225,7 +224,6 @@ export default {
|
|
|
225
224
|
this.getUploadedFile()
|
|
226
225
|
},
|
|
227
226
|
methods: {
|
|
228
|
-
$lc,
|
|
229
227
|
formatDate(date, fmt) {
|
|
230
228
|
date = new Date(date)
|
|
231
229
|
if (/(y+)/.test(fmt)) {
|
|
@@ -294,9 +292,9 @@ export default {
|
|
|
294
292
|
})
|
|
295
293
|
},
|
|
296
294
|
batchload() {
|
|
297
|
-
this.$confirm(
|
|
298
|
-
confirmButtonText:
|
|
299
|
-
cancelButtonText:
|
|
295
|
+
this.$confirm(this.$lc('确定下载选中的附件?'), {
|
|
296
|
+
confirmButtonText: this.$lc('确定'),
|
|
297
|
+
cancelButtonText: this.$lc('取消'),
|
|
300
298
|
type: 'warning'
|
|
301
299
|
}).then(() => {
|
|
302
300
|
let multipleSelection = this.multipleSelection
|
|
@@ -308,9 +306,9 @@ export default {
|
|
|
308
306
|
})
|
|
309
307
|
},
|
|
310
308
|
batchdel() {
|
|
311
|
-
this.$confirm(
|
|
312
|
-
confirmButtonText:
|
|
313
|
-
cancelButtonText:
|
|
309
|
+
this.$confirm(this.$lc('确定删除选中的附件?'), {
|
|
310
|
+
confirmButtonText: this.$lc('确定'),
|
|
311
|
+
cancelButtonText: this.$lc('取消'),
|
|
314
312
|
type: 'warning'
|
|
315
313
|
}).then(() => {
|
|
316
314
|
let files = this.files
|
|
@@ -333,10 +331,10 @@ export default {
|
|
|
333
331
|
.post('/api/neams/eamsbaserecord/delete', idArr)
|
|
334
332
|
.then((res) => {
|
|
335
333
|
if (res.code == '200') {
|
|
336
|
-
this.$message.success(
|
|
334
|
+
this.$message.success(this.$lc('删除成功'))
|
|
337
335
|
this.files = files
|
|
338
336
|
} else {
|
|
339
|
-
this.$message.success(
|
|
337
|
+
this.$message.success(this.$lc('删除失败') + res.data.msg)
|
|
340
338
|
}
|
|
341
339
|
})
|
|
342
340
|
.catch(function (error) {
|
|
@@ -393,19 +391,19 @@ export default {
|
|
|
393
391
|
cantTip() {
|
|
394
392
|
this.$message({
|
|
395
393
|
showClose: true,
|
|
396
|
-
message:
|
|
394
|
+
message: this.$lc('请选择附件类型')
|
|
397
395
|
})
|
|
398
396
|
},
|
|
399
397
|
cantTip1() {
|
|
400
398
|
this.$message({
|
|
401
399
|
showClose: true,
|
|
402
|
-
message:
|
|
400
|
+
message: this.$lc('请输入附件名称')
|
|
403
401
|
})
|
|
404
402
|
},
|
|
405
403
|
cantTip2() {
|
|
406
404
|
this.$message({
|
|
407
405
|
showClose: true,
|
|
408
|
-
message:
|
|
406
|
+
message: this.$lc('没有上传完成,不能再次上传')
|
|
409
407
|
})
|
|
410
408
|
},
|
|
411
409
|
uploadFile(params) {
|
|
@@ -446,7 +444,7 @@ export default {
|
|
|
446
444
|
this.eamsAttachfiles.forEach((item) => {
|
|
447
445
|
if (_file.attnoadd == item.attno) {
|
|
448
446
|
if (item.attSize * 1024 < _file.size) {
|
|
449
|
-
this.$message.error(
|
|
447
|
+
this.$message.error(this.$lc('附件超过设置大小,目前附件限制大小为') + item.attSize + 'M')
|
|
450
448
|
return
|
|
451
449
|
}
|
|
452
450
|
}
|
|
@@ -486,7 +484,7 @@ export default {
|
|
|
486
484
|
this.$message.error(res.data.msg)
|
|
487
485
|
} else {
|
|
488
486
|
_file.upstatus = 2
|
|
489
|
-
this.$message.success(
|
|
487
|
+
this.$message.success(this.$lc('上传成功!'))
|
|
490
488
|
let recordno = res.data.data.replace(',', '')
|
|
491
489
|
// _file.recordno = recordno
|
|
492
490
|
// if (this.recordarr.indexOf(recordno) === -1) {
|
|
@@ -546,7 +544,7 @@ export default {
|
|
|
546
544
|
}
|
|
547
545
|
// resolve(response)
|
|
548
546
|
} else {
|
|
549
|
-
this.$message.error(
|
|
547
|
+
this.$message.error(this.$lc('下载失败数据已删除!'))
|
|
550
548
|
}
|
|
551
549
|
})
|
|
552
550
|
.catch((error) => this.$message.error(error))
|
|
@@ -327,7 +327,6 @@ export default {
|
|
|
327
327
|
console.log('批量导入的国际化', '上述数据输入有误,请修改导入文件中相关信息!')
|
|
328
328
|
},
|
|
329
329
|
methods: {
|
|
330
|
-
$lc,
|
|
331
330
|
beforeUpload(file) {
|
|
332
331
|
this.percentage = 0
|
|
333
332
|
this.progressStatus = ''
|
|
@@ -388,7 +387,7 @@ export default {
|
|
|
388
387
|
this.reset = false
|
|
389
388
|
this.statisticsFlag = false
|
|
390
389
|
this.placeholderHasFile = false
|
|
391
|
-
this.placeholderText =
|
|
390
|
+
this.placeholderText = this.$lc('请选择')
|
|
392
391
|
console.log('执行了弹框关闭事件')
|
|
393
392
|
![`delete`].includes(flag) && (this._value = false)
|
|
394
393
|
this.$nextTick(() => {
|
|
@@ -341,7 +341,6 @@ export default {
|
|
|
341
341
|
},
|
|
342
342
|
created() {},
|
|
343
343
|
methods: {
|
|
344
|
-
$lc,
|
|
345
344
|
beforeUpload(file) {
|
|
346
345
|
this.percentage = 0
|
|
347
346
|
this.progressStatus = ''
|
|
@@ -421,7 +420,7 @@ export default {
|
|
|
421
420
|
this.reset = false
|
|
422
421
|
this.statisticsFlag = false
|
|
423
422
|
this.placeholderHasFile = false
|
|
424
|
-
this.placeholderText =
|
|
423
|
+
this.placeholderText = this.$lc('请选择')
|
|
425
424
|
console.log('执行了弹框关闭事件')
|
|
426
425
|
![`delete`].includes(flag) && (this._value = false)
|
|
427
426
|
this.$nextTick(() => {
|
|
@@ -320,7 +320,6 @@ export default {
|
|
|
320
320
|
}, 1)
|
|
321
321
|
},
|
|
322
322
|
methods: {
|
|
323
|
-
$lc,
|
|
324
323
|
beforeUpload(file, row) {
|
|
325
324
|
console.log(file, row)
|
|
326
325
|
// if(!row.attachmentName) {
|
|
@@ -447,17 +446,17 @@ export default {
|
|
|
447
446
|
deleteFile(index) {
|
|
448
447
|
this.$confirmTip({
|
|
449
448
|
type: 'info',
|
|
450
|
-
title:
|
|
449
|
+
title: this.$lc('确认删除该文件?'),
|
|
451
450
|
info: '',
|
|
452
451
|
button: {
|
|
453
|
-
ok:
|
|
454
|
-
cancel:
|
|
452
|
+
ok: this.$lc('提交'),
|
|
453
|
+
cancel: this.$lc('取消')
|
|
455
454
|
}
|
|
456
455
|
}).then(() => {
|
|
457
456
|
this.tableData.splice(index, 1)
|
|
458
457
|
this.$message({
|
|
459
458
|
type: 'success',
|
|
460
|
-
message:
|
|
459
|
+
message: this.$lc('删除成功!')
|
|
461
460
|
})
|
|
462
461
|
})
|
|
463
462
|
},
|
|
@@ -486,7 +485,7 @@ export default {
|
|
|
486
485
|
// 阻断下载
|
|
487
486
|
this.$message({
|
|
488
487
|
type: 'warning',
|
|
489
|
-
message:
|
|
488
|
+
message: this.$lc('勾选文件中有文件未上传')
|
|
490
489
|
})
|
|
491
490
|
return
|
|
492
491
|
}
|
|
@@ -523,7 +522,7 @@ export default {
|
|
|
523
522
|
let elink = document.createElement('a')
|
|
524
523
|
elink.style.display = 'none'
|
|
525
524
|
elink.href = window.URL.createObjectURL(blob)
|
|
526
|
-
elink.download = `${
|
|
525
|
+
elink.download = `${this.$lc('批量下载')}.zip`
|
|
527
526
|
document.body.appendChild(elink)
|
|
528
527
|
elink.click()
|
|
529
528
|
URL.revokeObjectURL(elink.href)
|
|
@@ -535,7 +534,7 @@ export default {
|
|
|
535
534
|
} else {
|
|
536
535
|
this.$message({
|
|
537
536
|
type: 'warning',
|
|
538
|
-
message:
|
|
537
|
+
message: this.$lc('请选择要下载的附件')
|
|
539
538
|
})
|
|
540
539
|
}
|
|
541
540
|
},
|
|
@@ -548,11 +547,11 @@ export default {
|
|
|
548
547
|
this.dialogShowDelete = true
|
|
549
548
|
this.$confirmTip({
|
|
550
549
|
type: 'error',
|
|
551
|
-
title:
|
|
552
|
-
info:
|
|
550
|
+
title: this.$lc('确认要删除所选附件吗?'),
|
|
551
|
+
info: this.$lc('删除后数据不可恢复'),
|
|
553
552
|
button: {
|
|
554
|
-
ok:
|
|
555
|
-
cancel:
|
|
553
|
+
ok: this.$lc('提交'),
|
|
554
|
+
cancel: this.$lc('取消')
|
|
556
555
|
}
|
|
557
556
|
}).then(() => {
|
|
558
557
|
this.tableData = this.tableData.filter((i) => {
|
|
@@ -563,13 +562,13 @@ export default {
|
|
|
563
562
|
}, 30)
|
|
564
563
|
this.$message({
|
|
565
564
|
type: 'success',
|
|
566
|
-
message:
|
|
565
|
+
message: this.$lc('删除成功!')
|
|
567
566
|
})
|
|
568
567
|
})
|
|
569
568
|
} else {
|
|
570
569
|
this.$message({
|
|
571
570
|
type: 'warning',
|
|
572
|
-
message:
|
|
571
|
+
message: this.$lc('请选择要删除的附件')
|
|
573
572
|
})
|
|
574
573
|
}
|
|
575
574
|
},
|
|
@@ -583,7 +582,7 @@ export default {
|
|
|
583
582
|
this.dialogShowDelete = false
|
|
584
583
|
this.$message({
|
|
585
584
|
type: 'success',
|
|
586
|
-
message:
|
|
585
|
+
message: this.$lc('删除成功!')
|
|
587
586
|
})
|
|
588
587
|
},
|
|
589
588
|
|
|
@@ -608,7 +607,7 @@ export default {
|
|
|
608
607
|
const isLt2M = fileObj.file.size / 1024 / 1024 < 20
|
|
609
608
|
if (!isLt2M) {
|
|
610
609
|
this.$message({
|
|
611
|
-
message:
|
|
610
|
+
message: this.$lc('上传文件大小不能超过 20MB!'),
|
|
612
611
|
type: 'warning'
|
|
613
612
|
})
|
|
614
613
|
this.tableData[this.currentUploadIndex].percentage = 75
|
|
@@ -662,7 +661,7 @@ export default {
|
|
|
662
661
|
handleExceed() {
|
|
663
662
|
this.$message({
|
|
664
663
|
type: 'error',
|
|
665
|
-
message:
|
|
664
|
+
message: this.$lc('最多只能选择一个文件')
|
|
666
665
|
})
|
|
667
666
|
},
|
|
668
667
|
|
|
@@ -727,7 +726,7 @@ export default {
|
|
|
727
726
|
if (t.length) {
|
|
728
727
|
this.$message({
|
|
729
728
|
type: 'error',
|
|
730
|
-
message:
|
|
729
|
+
message: this.$lc('文件名不能超过64个字,请重新上传!')
|
|
731
730
|
})
|
|
732
731
|
// this.tableData[index].status = 'exception';
|
|
733
732
|
return null
|
|
@@ -740,7 +739,7 @@ export default {
|
|
|
740
739
|
if (temp.length) {
|
|
741
740
|
this.$message({
|
|
742
741
|
type: 'error',
|
|
743
|
-
message:
|
|
742
|
+
message: this.$lc('暂不支持 .exe, .bin等格式文件格式上传!')
|
|
744
743
|
})
|
|
745
744
|
this.tableData[index].fileName = ''
|
|
746
745
|
return null
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
<script>
|
|
13
13
|
import screenfull from 'screenfull'
|
|
14
14
|
import NstcSvgIcon from '../NstcSvgIcon/NstcSvgIcon'
|
|
15
|
-
import { $lc } from '../../../src/utils/i18n/index.js'
|
|
16
15
|
export default {
|
|
17
16
|
name: 'NstcScreenFull',
|
|
18
17
|
components: {
|
|
@@ -30,12 +29,11 @@ export default {
|
|
|
30
29
|
this.destroy()
|
|
31
30
|
},
|
|
32
31
|
methods: {
|
|
33
|
-
$lc,
|
|
34
32
|
click() {
|
|
35
33
|
console.log(screenfull)
|
|
36
34
|
if (!screenfull.isEnabled) {
|
|
37
35
|
this.$message({
|
|
38
|
-
message:
|
|
36
|
+
message: this.$lc('浏览器不允许全屏'),
|
|
39
37
|
type: 'warning'
|
|
40
38
|
})
|
|
41
39
|
return false
|
|
@@ -231,7 +231,6 @@ export default {
|
|
|
231
231
|
},
|
|
232
232
|
|
|
233
233
|
methods: {
|
|
234
|
-
$lc,
|
|
235
234
|
upDown(index) {
|
|
236
235
|
this.$set(this.arrowStates, index, !this.arrowStates[index])
|
|
237
236
|
},
|
|
@@ -282,7 +281,7 @@ export default {
|
|
|
282
281
|
if (['condition', 'set'].includes(this.type)) {
|
|
283
282
|
const k = this.type === 'set' ? 'userUnit' : 'userCondition'
|
|
284
283
|
if (this.result.length == 0) {
|
|
285
|
-
return this.$message.warning(
|
|
284
|
+
return this.$message.warning(this.$lc('至少勾选一个字段'))
|
|
286
285
|
}
|
|
287
286
|
this.saveObj[k] = this.result.map((item) => item.id).join(',')
|
|
288
287
|
if (k == 'userUnit') {
|
|
@@ -309,12 +308,12 @@ export default {
|
|
|
309
308
|
.catch((e) => {
|
|
310
309
|
this.$message({
|
|
311
310
|
type: 'error',
|
|
312
|
-
message: e.msg ||
|
|
311
|
+
message: e.msg || this.$lc('保存失败')
|
|
313
312
|
})
|
|
314
313
|
})
|
|
315
314
|
} else {
|
|
316
315
|
if (this.result.length == 0) {
|
|
317
|
-
return this.$message.warning(
|
|
316
|
+
return this.$message.warning(this.$lc('至少勾选一个字段'))
|
|
318
317
|
}
|
|
319
318
|
await this.exportAction()
|
|
320
319
|
}
|
|
@@ -100,7 +100,6 @@
|
|
|
100
100
|
</template>
|
|
101
101
|
<script>
|
|
102
102
|
import axios from '../../utils/axios'
|
|
103
|
-
import { $lc } from '../../../src/utils/i18n/index.js'
|
|
104
103
|
export default {
|
|
105
104
|
name: 'NstcWorkBench',
|
|
106
105
|
data() {
|
|
@@ -115,7 +114,6 @@ export default {
|
|
|
115
114
|
this.intData()
|
|
116
115
|
},
|
|
117
116
|
methods: {
|
|
118
|
-
$lc,
|
|
119
117
|
async intData() {
|
|
120
118
|
try {
|
|
121
119
|
//待审核
|
package/package.json
CHANGED
|
@@ -187,7 +187,9 @@
|
|
|
187
187
|
<el-button v-if="showApprovalTo && showApproveTo" type="primary" @click="approvalToV = true"
|
|
188
188
|
>{{ $lc(btnsNames['approval']) }}{{ '至' | $lc }}</el-button
|
|
189
189
|
>
|
|
190
|
-
<el-button v-if="authList.includes('rejectTo')" plain @click="rejectToB">{{
|
|
190
|
+
<el-button v-if="authList.includes('rejectTo')" plain @click="rejectToB">{{
|
|
191
|
+
$lc(btnsNames['rejectTo'])
|
|
192
|
+
}}</el-button>
|
|
191
193
|
<el-button v-if="authList.includes('reject')" plain @click="rejectFn">{{ $lc(btnsNames['reject']) }}</el-button>
|
|
192
194
|
<el-button v-if="authList.includes('rejectPre')" plain @click="rejectPreFn">{{
|
|
193
195
|
$lc(btnsNames['rejectPre'])
|
|
@@ -341,6 +343,7 @@
|
|
|
341
343
|
<script>
|
|
342
344
|
import selectSpr from './selectSpr.vue'
|
|
343
345
|
import getJsonc from '../../assets/getJsonc.js'
|
|
346
|
+
import { getServerConfig } from '../../utils/serverConfig'
|
|
344
347
|
import { closeTagsForBackPage } from '../../plugins/CompatibleOld'
|
|
345
348
|
import axios from '../../utils/axios'
|
|
346
349
|
import { $lc } from '../../utils/i18n/index'
|
|
@@ -643,7 +646,7 @@ export default {
|
|
|
643
646
|
},
|
|
644
647
|
// 意见是否必填
|
|
645
648
|
getConfiguration() {
|
|
646
|
-
|
|
649
|
+
getServerConfig()
|
|
647
650
|
.then(({ opinionRequired, showApproveTo }) => {
|
|
648
651
|
this.requiredC = opinionRequired ?? this.required
|
|
649
652
|
this.showApproveTo = showApproveTo ?? true
|
|
@@ -126,7 +126,9 @@
|
|
|
126
126
|
</div>
|
|
127
127
|
|
|
128
128
|
<div v-else-if="!authList.includes('byAddTask')" class="text-c">
|
|
129
|
-
<div v-if="!approveBtns" style="text-align: center; font-size: 18px">
|
|
129
|
+
<div v-if="!approveBtns" style="text-align: center; font-size: 18px">
|
|
130
|
+
{{ $lc('请点击左上角返回处,进入OA待办页面') }}
|
|
131
|
+
</div>
|
|
130
132
|
<!-- 特殊会签按钮 START -->
|
|
131
133
|
<el-button v-if="authList.includes('pass')" type="primary" @click="checkFlowFn">{{
|
|
132
134
|
$lc(btnsNames['pass'])
|
|
@@ -303,6 +305,7 @@
|
|
|
303
305
|
<script>
|
|
304
306
|
import selectSpr from './selectSpr.vue'
|
|
305
307
|
import getJsonc from '../../assets/getJsonc.js'
|
|
308
|
+
import { getServerConfig } from '../../utils/serverConfig'
|
|
306
309
|
import { closeTagsForBackPage } from '../../plugins/CompatibleOld'
|
|
307
310
|
import axios from '../../utils/axios'
|
|
308
311
|
import { $lc } from '../../utils/i18n/index'
|
|
@@ -554,7 +557,7 @@ export default {
|
|
|
554
557
|
},
|
|
555
558
|
// 意见是否必填
|
|
556
559
|
getConfiguration() {
|
|
557
|
-
|
|
560
|
+
getServerConfig()
|
|
558
561
|
.then(({ opinionRequired }) => {
|
|
559
562
|
this.requiredC = opinionRequired ?? this.required
|
|
560
563
|
// 读取该工作流是否意见必填
|
|
@@ -860,7 +863,7 @@ export default {
|
|
|
860
863
|
if (this.isWyfk) {
|
|
861
864
|
this.attributes = {
|
|
862
865
|
appOrPc: '3',
|
|
863
|
-
ebsPaymentRiskWarning: $lc(
|
|
866
|
+
ebsPaymentRiskWarning: $lc('核实无误')
|
|
864
867
|
}
|
|
865
868
|
} else {
|
|
866
869
|
this.attributes = { appOrPc: '3' }
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
import expandableWrap from '../Expandable/main.vue'
|
|
62
62
|
import approvalCard from '../ApprovalCard/index.vue'
|
|
63
63
|
import approvalImg from './approvalImg.vue'
|
|
64
|
-
import
|
|
64
|
+
import { getServerConfig } from '../../utils/serverConfig'
|
|
65
65
|
export default {
|
|
66
66
|
name: 'ApprovalRecord',
|
|
67
67
|
components: {
|
|
@@ -100,7 +100,7 @@ export default {
|
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
mounted() {
|
|
103
|
-
|
|
103
|
+
getServerConfig().then(({ approvalMode }) => {
|
|
104
104
|
this.approvalMode = approvalMode || 'dialog'
|
|
105
105
|
})
|
|
106
106
|
}
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
<script>
|
|
14
14
|
import approvalCard from 'n20-common-lib/src/components/ApprovalCard/indexApp.vue'
|
|
15
15
|
import approvalImg from 'n20-common-lib/src/components/ApprovalRecord/approvalImg.vue'
|
|
16
|
-
import getJsonc from 'n20-common-lib/src/assets/getJsonc'
|
|
17
16
|
export default {
|
|
18
17
|
name: 'ApprovalRecord',
|
|
19
18
|
components: {
|
|
@@ -46,10 +45,6 @@ export default {
|
|
|
46
45
|
return this.procInstId || this.$route.query.processInstanceId
|
|
47
46
|
}
|
|
48
47
|
},
|
|
49
|
-
mounted() {
|
|
50
|
-
/* getJsonc('portal/server-config.jsonc').then(({ approvalMode }) => {
|
|
51
|
-
this.approvalMode = approvalMode
|
|
52
|
-
}) */
|
|
53
|
-
}
|
|
48
|
+
mounted() {}
|
|
54
49
|
}
|
|
55
50
|
</script>
|
|
@@ -188,7 +188,8 @@
|
|
|
188
188
|
</el-table-column>
|
|
189
189
|
</el-table> -->
|
|
190
190
|
<div class="flex-box flex-v flex-lr">
|
|
191
|
-
<div class="title">
|
|
191
|
+
<div class="title">
|
|
192
|
+
{{ $lc('附件上传') }}<span>{{ $lc('(带 * 为必要上传的附件)') }}</span>
|
|
192
193
|
</div>
|
|
193
194
|
</div>
|
|
194
195
|
<div class="file-list">
|
|
@@ -313,10 +314,10 @@
|
|
|
313
314
|
</template>
|
|
314
315
|
|
|
315
316
|
<script>
|
|
316
|
-
import getJsonc from '../../assets/getJsonc.js'
|
|
317
317
|
import _axios from 'axios'
|
|
318
318
|
import dayjs from 'dayjs'
|
|
319
319
|
import XEUtils from 'xe-utils'
|
|
320
|
+
import { getServerConfig } from '../../utils/serverConfig'
|
|
320
321
|
|
|
321
322
|
import 'viewerjs/dist/viewer.css'
|
|
322
323
|
import auth from '../../utils/auth.js'
|
|
@@ -326,7 +327,6 @@ import importG from '../../utils/importGlobal.js'
|
|
|
326
327
|
import Dialog from '../Dialog/index.vue'
|
|
327
328
|
import Upload from '../Upload/index.vue'
|
|
328
329
|
|
|
329
|
-
|
|
330
330
|
const ViewerImg = async function () {
|
|
331
331
|
let { component } = await importG('v-viewer', () => import(/*webpackChunkName: "v-viewer"*/ 'v-viewer'))
|
|
332
332
|
return component
|
|
@@ -340,9 +340,9 @@ const keysDefault = {
|
|
|
340
340
|
user: 'user'
|
|
341
341
|
}
|
|
342
342
|
const typeOptionsDefault = [
|
|
343
|
-
{ type: '001', label: $lc(
|
|
344
|
-
{ type: '002', label: $lc(
|
|
345
|
-
{ type: '003', label: $lc(
|
|
343
|
+
{ type: '001', label: $lc('信贷合同') },
|
|
344
|
+
{ type: '002', label: $lc('贴现合同') },
|
|
345
|
+
{ type: '003', label: $lc('其他合同') }
|
|
346
346
|
]
|
|
347
347
|
|
|
348
348
|
export default {
|
|
@@ -499,7 +499,7 @@ export default {
|
|
|
499
499
|
return this.dataPorp.fileSize || undefined
|
|
500
500
|
},
|
|
501
501
|
fileAcceptTip() {
|
|
502
|
-
return this.dataPorp.fileAcceptTip || $lc(
|
|
502
|
+
return this.dataPorp.fileAcceptTip || $lc('支持扩展名:.rar .zip .doc .docx .pdf .jpg...')
|
|
503
503
|
},
|
|
504
504
|
fileData() {
|
|
505
505
|
return this.dataPorp.fileData || undefined
|
|
@@ -540,7 +540,7 @@ export default {
|
|
|
540
540
|
// ai识别
|
|
541
541
|
async AiFn(row) {
|
|
542
542
|
if (!this.AIOptions.bussType) {
|
|
543
|
-
this.$message.error($lc(
|
|
543
|
+
this.$message.error($lc('请先配置bussType'))
|
|
544
544
|
return false
|
|
545
545
|
}
|
|
546
546
|
const { data, code } = await axios.post(
|
|
@@ -582,7 +582,7 @@ export default {
|
|
|
582
582
|
}
|
|
583
583
|
},
|
|
584
584
|
getConfiguration() {
|
|
585
|
-
|
|
585
|
+
getServerConfig()
|
|
586
586
|
.then(({ loginConf, fileRequired }) => {
|
|
587
587
|
this.fileText = loginConf?.sLogan?.fileText
|
|
588
588
|
this.fileRequired = fileRequired ?? true
|
|
@@ -704,7 +704,7 @@ export default {
|
|
|
704
704
|
deleteRows() {
|
|
705
705
|
if (!this.selectionList.length) {
|
|
706
706
|
return this.$message({
|
|
707
|
-
message: $lc(
|
|
707
|
+
message: $lc('请先勾选要删除的数据!'),
|
|
708
708
|
type: 'warning',
|
|
709
709
|
showClose: true
|
|
710
710
|
})
|
|
@@ -332,7 +332,7 @@ import XEUtils from 'xe-utils'
|
|
|
332
332
|
|
|
333
333
|
import aiCheckDialog from './aiCheckDialog.vue'
|
|
334
334
|
|
|
335
|
-
import
|
|
335
|
+
import { getServerConfig } from '../../utils/serverConfig'
|
|
336
336
|
import auth from '../../utils/auth'
|
|
337
337
|
import axios from '../../utils/axios'
|
|
338
338
|
import { $lc } from '../../utils/i18n/index'
|
|
@@ -742,7 +742,7 @@ export default {
|
|
|
742
742
|
}
|
|
743
743
|
},
|
|
744
744
|
getConfiguration() {
|
|
745
|
-
|
|
745
|
+
getServerConfig()
|
|
746
746
|
.then(({ loginConf, fileRequired }) => {
|
|
747
747
|
this.fileText = loginConf?.sLogan?.fileText
|
|
748
748
|
this.fileRequired = fileRequired ?? true
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import axios from './axios'
|
|
2
|
+
import CryptoJS from 'crypto-js'
|
|
3
|
+
|
|
4
|
+
let configPromise = null
|
|
5
|
+
|
|
6
|
+
// 生成密钥
|
|
7
|
+
const generateKey = () => {
|
|
8
|
+
const now = new Date()
|
|
9
|
+
const year = now.getFullYear()
|
|
10
|
+
const month = String(now.getMonth() + 1).padStart(2, '0')
|
|
11
|
+
const day = String(now.getDate()).padStart(2, '0')
|
|
12
|
+
const dateStr = `${year}${month}${day}`
|
|
13
|
+
const keyStr = dateStr.padEnd(32, '0')
|
|
14
|
+
return keyStr
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* AES 解密 - 后端返回 Base64 编码的密文和 IV
|
|
18
|
+
* @param ciphertextBase64 Base64编码的密文
|
|
19
|
+
* @param ivBase64 Base64编码的IV
|
|
20
|
+
*/
|
|
21
|
+
const decrypt = (ciphertextBase64, ivBase64) => {
|
|
22
|
+
const keyStr = generateKey()
|
|
23
|
+
|
|
24
|
+
const key = CryptoJS.enc.Utf8.parse(keyStr)
|
|
25
|
+
// 后端返回的 IV 是 Base64 编码,需要解码
|
|
26
|
+
const iv = CryptoJS.enc.Base64.parse(ivBase64)
|
|
27
|
+
|
|
28
|
+
// 执行解密(CryptoJS.AES.decrypt 可以直接解析 Base64 密文)
|
|
29
|
+
const decrypted = CryptoJS.AES.decrypt(ciphertextBase64, key, {
|
|
30
|
+
iv: iv,
|
|
31
|
+
mode: CryptoJS.mode.CBC,
|
|
32
|
+
padding: CryptoJS.pad.Pkcs7
|
|
33
|
+
})
|
|
34
|
+
return decrypted.toString(CryptoJS.enc.Utf8)
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 获取服务端配置(带缓存)
|
|
38
|
+
* 替代原有的 getJsonc('/server-config.jsonc')
|
|
39
|
+
* 后端接口返回与 server-config.jsonc 一致的 JSON 结构
|
|
40
|
+
* @returns {Promise<Object>} 配置对象
|
|
41
|
+
*/
|
|
42
|
+
export function getServerConfig() {
|
|
43
|
+
if (!configPromise) {
|
|
44
|
+
configPromise = axios
|
|
45
|
+
.get('/bems/getPortalServerConfig', null, {
|
|
46
|
+
loading: false,
|
|
47
|
+
noMsg: true
|
|
48
|
+
})
|
|
49
|
+
.then(({ data, code }) => {
|
|
50
|
+
if (code !== 200) return
|
|
51
|
+
// 检查是否有密文数据需要解密
|
|
52
|
+
if (data.ciphertext && data.iv) {
|
|
53
|
+
const decryptedData = decrypt(data.ciphertext, data.iv)
|
|
54
|
+
|
|
55
|
+
// 如果解密成功,解析JSON并合并到列表
|
|
56
|
+
if (decryptedData) {
|
|
57
|
+
return JSON.parse(decryptedData) || {}
|
|
58
|
+
}
|
|
59
|
+
return {}
|
|
60
|
+
}
|
|
61
|
+
return data || {}
|
|
62
|
+
})
|
|
63
|
+
.catch((err) => {
|
|
64
|
+
console.error('获取服务端配置失败:', err)
|
|
65
|
+
// 返回空对象,避免阻塞应用启动
|
|
66
|
+
return {}
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
return configPromise
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* 清除配置缓存(如需刷新配置时调用)
|
|
74
|
+
*/
|
|
75
|
+
export function clearConfigCache() {
|
|
76
|
+
configPromise = null
|
|
77
|
+
}
|