n20-common-lib 2.22.65-patch → 2.22.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/ApprovalButtons/index.vue +2 -5
- package/src/components/ApprovalButtons/indexApp.vue +3 -6
- package/src/components/ApprovalRecord/index.vue +2 -2
- package/src/components/ApprovalRecord/indexApp.vue +6 -1
- package/src/components/FileUploadTable/FileUploadTableV3.vue +10 -10
- package/src/components/FileUploadTable/index.vue +2 -2
- package/src/utils/serverConfig.js +0 -77
package/package.json
CHANGED
|
@@ -187,9 +187,7 @@
|
|
|
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">{{
|
|
191
|
-
$lc(btnsNames['rejectTo'])
|
|
192
|
-
}}</el-button>
|
|
190
|
+
<el-button v-if="authList.includes('rejectTo')" plain @click="rejectToB">{{ $lc(btnsNames['rejectTo']) }}</el-button>
|
|
193
191
|
<el-button v-if="authList.includes('reject')" plain @click="rejectFn">{{ $lc(btnsNames['reject']) }}</el-button>
|
|
194
192
|
<el-button v-if="authList.includes('rejectPre')" plain @click="rejectPreFn">{{
|
|
195
193
|
$lc(btnsNames['rejectPre'])
|
|
@@ -343,7 +341,6 @@
|
|
|
343
341
|
<script>
|
|
344
342
|
import selectSpr from './selectSpr.vue'
|
|
345
343
|
import getJsonc from '../../assets/getJsonc.js'
|
|
346
|
-
import { getServerConfig } from '../../utils/serverConfig'
|
|
347
344
|
import { closeTagsForBackPage } from '../../plugins/CompatibleOld'
|
|
348
345
|
import axios from '../../utils/axios'
|
|
349
346
|
import { $lc } from '../../utils/i18n/index'
|
|
@@ -646,7 +643,7 @@ export default {
|
|
|
646
643
|
},
|
|
647
644
|
// 意见是否必填
|
|
648
645
|
getConfiguration() {
|
|
649
|
-
|
|
646
|
+
getJsonc('portal/server-config.jsonc', null, true)
|
|
650
647
|
.then(({ opinionRequired, showApproveTo }) => {
|
|
651
648
|
this.requiredC = opinionRequired ?? this.required
|
|
652
649
|
this.showApproveTo = showApproveTo ?? true
|
|
@@ -126,9 +126,7 @@
|
|
|
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">
|
|
130
|
-
{{ $lc('请点击左上角返回处,进入OA待办页面') }}
|
|
131
|
-
</div>
|
|
129
|
+
<div v-if="!approveBtns" style="text-align: center; font-size: 18px">{{ $lc('请点击左上角返回处,进入OA待办页面') }}</div>
|
|
132
130
|
<!-- 特殊会签按钮 START -->
|
|
133
131
|
<el-button v-if="authList.includes('pass')" type="primary" @click="checkFlowFn">{{
|
|
134
132
|
$lc(btnsNames['pass'])
|
|
@@ -305,7 +303,6 @@
|
|
|
305
303
|
<script>
|
|
306
304
|
import selectSpr from './selectSpr.vue'
|
|
307
305
|
import getJsonc from '../../assets/getJsonc.js'
|
|
308
|
-
import { getServerConfig } from '../../utils/serverConfig'
|
|
309
306
|
import { closeTagsForBackPage } from '../../plugins/CompatibleOld'
|
|
310
307
|
import axios from '../../utils/axios'
|
|
311
308
|
import { $lc } from '../../utils/i18n/index'
|
|
@@ -557,7 +554,7 @@ export default {
|
|
|
557
554
|
},
|
|
558
555
|
// 意见是否必填
|
|
559
556
|
getConfiguration() {
|
|
560
|
-
|
|
557
|
+
getJsonc('portal/server-config.jsonc', null, true)
|
|
561
558
|
.then(({ opinionRequired }) => {
|
|
562
559
|
this.requiredC = opinionRequired ?? this.required
|
|
563
560
|
// 读取该工作流是否意见必填
|
|
@@ -863,7 +860,7 @@ export default {
|
|
|
863
860
|
if (this.isWyfk) {
|
|
864
861
|
this.attributes = {
|
|
865
862
|
appOrPc: '3',
|
|
866
|
-
ebsPaymentRiskWarning: $lc(
|
|
863
|
+
ebsPaymentRiskWarning: $lc("核实无误")
|
|
867
864
|
}
|
|
868
865
|
} else {
|
|
869
866
|
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 getJsonc from '../../assets/getJsonc'
|
|
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
|
+
getJsonc('portal/server-config.jsonc').then(({ approvalMode }) => {
|
|
104
104
|
this.approvalMode = approvalMode || 'dialog'
|
|
105
105
|
})
|
|
106
106
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
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'
|
|
16
17
|
export default {
|
|
17
18
|
name: 'ApprovalRecord',
|
|
18
19
|
components: {
|
|
@@ -45,6 +46,10 @@ export default {
|
|
|
45
46
|
return this.procInstId || this.$route.query.processInstanceId
|
|
46
47
|
}
|
|
47
48
|
},
|
|
48
|
-
mounted() {
|
|
49
|
+
mounted() {
|
|
50
|
+
/* getJsonc('portal/server-config.jsonc').then(({ approvalMode }) => {
|
|
51
|
+
this.approvalMode = approvalMode
|
|
52
|
+
}) */
|
|
53
|
+
}
|
|
49
54
|
}
|
|
50
55
|
</script>
|
|
@@ -188,8 +188,7 @@
|
|
|
188
188
|
</el-table-column>
|
|
189
189
|
</el-table> -->
|
|
190
190
|
<div class="flex-box flex-v flex-lr">
|
|
191
|
-
<div class="title">
|
|
192
|
-
{{ $lc('附件上传') }}<span>{{ $lc('(带 * 为必要上传的附件)') }}</span>
|
|
191
|
+
<div class="title">{{ $lc('附件上传') }}<span>{{ $lc('(带 * 为必要上传的附件)') }}</span>
|
|
193
192
|
</div>
|
|
194
193
|
</div>
|
|
195
194
|
<div class="file-list">
|
|
@@ -314,10 +313,10 @@
|
|
|
314
313
|
</template>
|
|
315
314
|
|
|
316
315
|
<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'
|
|
321
320
|
|
|
322
321
|
import 'viewerjs/dist/viewer.css'
|
|
323
322
|
import auth from '../../utils/auth.js'
|
|
@@ -327,6 +326,7 @@ import importG from '../../utils/importGlobal.js'
|
|
|
327
326
|
import Dialog from '../Dialog/index.vue'
|
|
328
327
|
import Upload from '../Upload/index.vue'
|
|
329
328
|
|
|
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
|
+
getJsonc('portal/server-config.jsonc', null, true)
|
|
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 getJsonc from '../../assets/getJsonc.js'
|
|
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
|
+
getJsonc('portal/server-config.jsonc', null, true)
|
|
746
746
|
.then(({ loginConf, fileRequired }) => {
|
|
747
747
|
this.fileText = loginConf?.sLogan?.fileText
|
|
748
748
|
this.fileRequired = fileRequired ?? true
|
|
@@ -1,77 +0,0 @@
|
|
|
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
|
-
}
|