n20-common-lib 1.3.22 → 1.3.25
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 +4 -4
- package/src/assets/css/cl-approve-card.scss +2 -2
- package/src/assets/css/cl-expandable-pane.scss +3 -4
- package/src/assets/css/cl-expandable.scss +2 -2
- package/src/assets/css/cl-layout-tabs.scss +2 -2
- package/src/assets/css/cl-layout.scss +3 -3
- package/src/assets/css/cl-secondary-tab.scss +1 -1
- package/src/assets/css/cl-upload.scss +5 -0
- package/src/assets/css/element-variables.scss +1 -1
- package/src/assets/css/plain-text.scss +28 -130
- package/src/assets/css/rootvar.scss +4 -0
- package/src/components/ApprovalButtons/index.vue +1 -1
- package/src/components/ApprovalCard/index.vue +4 -4
- package/src/components/ApprovalRecord/index.vue +5 -1
- package/src/components/Descriptions/index.vue +42 -0
- package/src/components/ECharts/index.vue +9 -10
- package/src/components/ECharts/mixins/resize.js +10 -43
- package/src/components/Expandable/main.vue +1 -1
- package/src/components/FileUploadTable/index.vue +32 -3
- package/src/components/Layout/AsideNav/index.vue +1 -1
- package/src/components/Layout/HeaderWrap/index.vue +1 -1
- package/src/components/LoginTemporary/form.vue +8 -10
- package/src/components/Statis/index.vue +16 -2
- package/src/components/Statis/statisItem.vue +10 -4
- package/src/components/Statis/statisPopover.vue +7 -0
- package/src/components/Upload/index.vue +8 -4
- package/src/directives/VTitle/index.js +18 -16
- package/src/index.js +3 -6
- package/src/plugins/Sign/index.js +23 -59
- package/src/plugins/Sign/sign.js +64 -1
- package/src/utils/theme.config.js +22 -0
- package/src/utils/theme.js +1 -1
- package/style/index.css +1 -1
- package/style/index.css.map +1 -1
- package/{treme → theme}/blue.css +1 -1
- package/{treme → theme}/fonts/element-icons.535877f5.woff +0 -0
- package/{treme → theme}/fonts/element-icons.732389de.ttf +0 -0
- package/{treme → theme}/fonts/iconfont.022f36c4.woff2 +0 -0
- package/{treme → theme}/fonts/iconfont.4a1b2c93.woff +0 -0
- package/{treme → theme}/fonts/iconfont.a9febaa2.ttf +0 -0
- package/{treme → theme}/green.css +1 -1
- package/{treme → theme}/lightBlue.css +1 -1
- package/{treme → theme}/orange.css +1 -1
- package/{treme → theme}/purple.css +1 -1
- package/{treme → theme}/red.css +1 -1
- package/{treme → theme}/yellow.css +1 -1
- package/src/components/PlainText/PlainTextItem.vue +0 -17
- package/src/components/PlainText/index.vue +0 -12
|
@@ -394,18 +394,16 @@ export default {
|
|
|
394
394
|
let certDn = undefined
|
|
395
395
|
if (checkCert) {
|
|
396
396
|
if (supplier === 'bjca') {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
certDn = userDn
|
|
397
|
+
// 北京CA
|
|
398
|
+
window.sessionStorage.setItem('signType', 'bjcaSign')
|
|
400
399
|
} else {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
certDn = userDn
|
|
400
|
+
// 信安CA
|
|
401
|
+
window.sessionStorage.setItem('signType', 'inetSign')
|
|
404
402
|
}
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
403
|
+
|
|
404
|
+
let { getSign } = await import('../../plugins/Sign')
|
|
405
|
+
sign = await getSign(username, userDn)
|
|
406
|
+
certDn = userDn
|
|
409
407
|
}
|
|
410
408
|
|
|
411
409
|
await this.authorizationCode(username, password, code) // authorizationValue 使用一次后就失效了
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<div v-if="size !== 'mini'" class="flex-box p-t-s p-b-s">
|
|
4
|
-
<statisItem
|
|
5
|
-
|
|
4
|
+
<statisItem
|
|
5
|
+
type="当页合计"
|
|
6
|
+
:list="pageList"
|
|
7
|
+
:show-w="showW"
|
|
8
|
+
:count-label="countLabel"
|
|
9
|
+
/>
|
|
10
|
+
<statisItem
|
|
11
|
+
type="全部合计"
|
|
12
|
+
:list="totalList"
|
|
13
|
+
:show-w="showW"
|
|
14
|
+
:count-label="countLabel"
|
|
15
|
+
/>
|
|
6
16
|
</div>
|
|
7
17
|
<div v-else class="n20-statis p-t-s p-b-s">
|
|
8
18
|
<span class="m-r">
|
|
@@ -49,6 +59,10 @@ export default {
|
|
|
49
59
|
type: [Boolean, String],
|
|
50
60
|
default: false
|
|
51
61
|
},
|
|
62
|
+
countLabel: {
|
|
63
|
+
type: Array,
|
|
64
|
+
default: undefined
|
|
65
|
+
},
|
|
52
66
|
size: {
|
|
53
67
|
type: String,
|
|
54
68
|
default: undefined
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
><span class="stati-type stati-item-cell">{{ type }}</span
|
|
5
5
|
><span class="n20-statis-division p-l-s p-r-s stati-item-cell">|</span
|
|
6
6
|
><span v-for="(item, i) in list" :key="i" class="p-r stati-item-cell"
|
|
7
|
-
>{{ item.label }}:<span
|
|
7
|
+
>{{ item.label }}:<span
|
|
8
|
+
v-if="countLabel.includes(item.label)"
|
|
9
|
+
class="n20-primary"
|
|
10
|
+
>{{ item.value }}</span
|
|
11
|
+
><span v-else class="n20-primary">{{
|
|
8
12
|
item | numerify('0,0.00', showW)
|
|
9
13
|
}}</span></span
|
|
10
14
|
>
|
|
@@ -19,9 +23,7 @@ export default {
|
|
|
19
23
|
name: 'StatisItem',
|
|
20
24
|
filters: {
|
|
21
25
|
numerify({ label, value, unit = '' }, f, w) {
|
|
22
|
-
if (
|
|
23
|
-
return value
|
|
24
|
-
} else if (!w) {
|
|
26
|
+
if (!w) {
|
|
25
27
|
return numerify(value, f) + unit
|
|
26
28
|
} else {
|
|
27
29
|
if (value > n) {
|
|
@@ -48,6 +50,10 @@ export default {
|
|
|
48
50
|
showW: {
|
|
49
51
|
type: Boolean,
|
|
50
52
|
default: false
|
|
53
|
+
},
|
|
54
|
+
countLabel: {
|
|
55
|
+
type: Array,
|
|
56
|
+
default: () => ['笔数']
|
|
51
57
|
}
|
|
52
58
|
}
|
|
53
59
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
:title="i === 0 ? lists[0].title : undefined"
|
|
7
7
|
:type="item.type"
|
|
8
8
|
:list="item.list"
|
|
9
|
+
:count-label="countLabel"
|
|
9
10
|
/>
|
|
10
11
|
</div>
|
|
11
12
|
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
:title="i === 0 ? lists[0].title : undefined"
|
|
24
25
|
:type="item.type"
|
|
25
26
|
:list="item.list"
|
|
27
|
+
:count-label="countLabel"
|
|
26
28
|
/>
|
|
27
29
|
<i class="rotating-icon n20-icon-nianfenqiehuan-youce"></i>
|
|
28
30
|
</div>
|
|
@@ -35,6 +37,7 @@
|
|
|
35
37
|
:title="i === 0 ? group.title : undefined"
|
|
36
38
|
:type="item.type"
|
|
37
39
|
:list="item.list"
|
|
40
|
+
:count-label="countLabel"
|
|
38
41
|
/>
|
|
39
42
|
</div>
|
|
40
43
|
</div>
|
|
@@ -50,6 +53,10 @@ export default {
|
|
|
50
53
|
lists: {
|
|
51
54
|
type: Array,
|
|
52
55
|
default: () => []
|
|
56
|
+
},
|
|
57
|
+
countLabel: {
|
|
58
|
+
type: Array,
|
|
59
|
+
default: undefined
|
|
53
60
|
}
|
|
54
61
|
}
|
|
55
62
|
}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
:headers="headers"
|
|
6
6
|
:accept="accept"
|
|
7
7
|
:multiple="multiple"
|
|
8
|
-
:file-list="fileList
|
|
9
|
-
:show-file-list="
|
|
8
|
+
:file-list="fileList"
|
|
9
|
+
:show-file-list="multiple ? true : showFileList"
|
|
10
10
|
v-bind="$attrs"
|
|
11
11
|
:on-success="successFn"
|
|
12
12
|
:on-error="errorFn"
|
|
@@ -95,6 +95,10 @@ export default {
|
|
|
95
95
|
type: [String, Number],
|
|
96
96
|
default: undefined
|
|
97
97
|
},
|
|
98
|
+
showFileList: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: false
|
|
101
|
+
},
|
|
98
102
|
accept: {
|
|
99
103
|
type: String,
|
|
100
104
|
default: undefined
|
|
@@ -216,9 +220,9 @@ export default {
|
|
|
216
220
|
if (this.onSuccess) {
|
|
217
221
|
this.onSuccess(response, file, fileList)
|
|
218
222
|
} else {
|
|
219
|
-
this.fileNameC = file.name
|
|
223
|
+
this.fileNameC = this.multiple ? '' : file.name
|
|
220
224
|
this.fileUrlC = response.data
|
|
221
|
-
this.fileList =
|
|
225
|
+
this.fileList = fileList
|
|
222
226
|
}
|
|
223
227
|
|
|
224
228
|
if (this.msgType === 'dialog') {
|
|
@@ -7,7 +7,7 @@ function tipShow(el, tip) {
|
|
|
7
7
|
if (el.$tooltipTitle) {
|
|
8
8
|
let _el = _input || el
|
|
9
9
|
if (!el.$tooltipTitleOverflow || _el.clientWidth < _el.scrollWidth) {
|
|
10
|
-
|
|
10
|
+
document.querySelector('.' + popClass).innerText = el.$tooltipTitle
|
|
11
11
|
|
|
12
12
|
tip.$refs['title-pop'].referenceElm = el
|
|
13
13
|
tip.$refs['title-pop'].doDestroy()
|
|
@@ -33,27 +33,29 @@ TitleDirective.install = (Vue) => {
|
|
|
33
33
|
el: document.createElement('div'),
|
|
34
34
|
data() {
|
|
35
35
|
return {
|
|
36
|
-
title: '',
|
|
37
36
|
visible: false
|
|
38
37
|
}
|
|
39
38
|
},
|
|
40
39
|
render(_h) {
|
|
41
40
|
var _vm = this
|
|
42
|
-
return _h(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
return _h(
|
|
42
|
+
'el-popover',
|
|
43
|
+
{
|
|
44
|
+
ref: 'title-pop',
|
|
45
|
+
attrs: {
|
|
46
|
+
value: _vm.visible,
|
|
47
|
+
trigger: 'manual',
|
|
48
|
+
'popper-class': 'n20-title-pop',
|
|
49
|
+
placement: 'top'
|
|
50
|
+
},
|
|
51
|
+
on: {
|
|
52
|
+
input(v) {
|
|
53
|
+
_vm.visible = v
|
|
54
|
+
}
|
|
54
55
|
}
|
|
55
|
-
}
|
|
56
|
-
|
|
56
|
+
},
|
|
57
|
+
[_h('span', { staticClass: popClass })]
|
|
58
|
+
)
|
|
57
59
|
}
|
|
58
60
|
})
|
|
59
61
|
document.querySelector('body').appendChild(tooltip.$el)
|
package/src/index.js
CHANGED
|
@@ -50,8 +50,7 @@ import FlowDialog from './components/ApprovalRecord/flowDialog.vue'
|
|
|
50
50
|
import ChildRange from './components/ChildRange/index'
|
|
51
51
|
import FileImport from './components/FileImport/index'
|
|
52
52
|
import PageHeader from './components/PageHeader/index'
|
|
53
|
-
import
|
|
54
|
-
import PlainTextItem from './components/PlainText/PlainTextItem'
|
|
53
|
+
import Descriptions from './components/Descriptions'
|
|
55
54
|
// ECharts 不要打包进来
|
|
56
55
|
// import Search from './components/Search/index.vue'
|
|
57
56
|
import Stamp from './components/Stamp/index.vue'
|
|
@@ -140,8 +139,7 @@ const components = [
|
|
|
140
139
|
ChildRange,
|
|
141
140
|
FileImport,
|
|
142
141
|
PageHeader,
|
|
143
|
-
|
|
144
|
-
PlainTextItem,
|
|
142
|
+
Descriptions,
|
|
145
143
|
// Search,
|
|
146
144
|
approvalImg,
|
|
147
145
|
Stamp,
|
|
@@ -249,8 +247,7 @@ export {
|
|
|
249
247
|
ChildRange,
|
|
250
248
|
FileImport,
|
|
251
249
|
PageHeader,
|
|
252
|
-
|
|
253
|
-
PlainTextItem,
|
|
250
|
+
Descriptions,
|
|
254
251
|
// Search,
|
|
255
252
|
approvalImg,
|
|
256
253
|
Stamp
|
|
@@ -1,64 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
let _dn
|
|
7
|
-
function getDN() {
|
|
8
|
-
if (!_dn) {
|
|
9
|
-
let userInfo = JSON.parse(sessionStorage.getItem('userInfo'))
|
|
10
|
-
if (userInfo?.dn) {
|
|
11
|
-
_dn = userInfo.dn
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return _dn
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* 检测本地签名端口是否可用 */
|
|
18
|
-
export function availableSign(fn) {
|
|
19
|
-
IWSASendAvailable() // 异步请求,需等待
|
|
20
|
-
setTimeout(() => {
|
|
21
|
-
let available = IWSAGetAvailable()
|
|
22
|
-
fn && fn(available)
|
|
23
|
-
}, 300)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/* 签名解签 */
|
|
27
|
-
export function verifySign(signedMsg) {
|
|
28
|
-
let plainText
|
|
29
|
-
IWSAAttachedVerify('1', signedMsg, (errorCode, PlainText, SigncertDN) => {
|
|
30
|
-
if (errorCode === 0 || errorCode === '0') {
|
|
31
|
-
plainText = PlainText
|
|
32
|
-
} else {
|
|
33
|
-
alert('签名解签失败!')
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
return plainText
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* 给对象或字符串签名 */
|
|
40
|
-
export function getSign(plain, dn) {
|
|
41
|
-
if (dn === undefined) {
|
|
42
|
-
dn = getDN()
|
|
1
|
+
export async function getSign(p1, p2, p3) {
|
|
2
|
+
let signType = window.sessionStorage.getItem('signType')
|
|
3
|
+
let CaMap = {
|
|
4
|
+
inetSign: '信安CA',
|
|
5
|
+
bjcaSign: '北京CA'
|
|
43
6
|
}
|
|
44
|
-
if (!
|
|
45
|
-
|
|
46
|
-
|
|
7
|
+
if (!signType || !CaMap[signType]) {
|
|
8
|
+
console.error('请设置签名服务公司sessionStorage.signType,公司字段映射:', CaMap)
|
|
9
|
+
signType = 'inetSign'
|
|
47
10
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
alert('签名失败!')
|
|
11
|
+
const por = new Promise((resolve) => {
|
|
12
|
+
if (signType === 'inetSign' /* 信安CA */) {
|
|
13
|
+
import('./sign.js').then(({ getSign }) => {
|
|
14
|
+
const sign = getSign(p1, p2, p3)
|
|
15
|
+
resolve(sign)
|
|
16
|
+
})
|
|
17
|
+
} else if (signType === 'bjcaSign' /* 北京CA */) {
|
|
18
|
+
import('./bjca/index.js').then(({ getSign }) => {
|
|
19
|
+
getSign(p1, p2, p3).then((sign) => {
|
|
20
|
+
resolve(sign)
|
|
21
|
+
})
|
|
22
|
+
})
|
|
61
23
|
}
|
|
62
24
|
})
|
|
63
|
-
return
|
|
25
|
+
return por
|
|
64
26
|
}
|
|
27
|
+
|
|
28
|
+
export { availableSign, verifySign } from './sign.js'
|
package/src/plugins/Sign/sign.js
CHANGED
|
@@ -1 +1,64 @@
|
|
|
1
|
-
|
|
1
|
+
// Attached方式签名
|
|
2
|
+
import { IWSAgent } from './InfosecNetSignCNGAgent.min.js'
|
|
3
|
+
const { IWSASetTimeOut, IWSAAttachedSign, IWSAAttachedVerify, IWSASendAvailable, IWSAGetAvailable } = new IWSAgent()
|
|
4
|
+
IWSASetTimeOut(6000)
|
|
5
|
+
|
|
6
|
+
let _dn
|
|
7
|
+
function getDN() {
|
|
8
|
+
if (!_dn) {
|
|
9
|
+
let userInfo = JSON.parse(sessionStorage.getItem('userInfo'))
|
|
10
|
+
if (userInfo?.dn) {
|
|
11
|
+
_dn = userInfo.dn
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return _dn
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* 检测本地签名端口是否可用 */
|
|
18
|
+
export function availableSign(fn) {
|
|
19
|
+
IWSASendAvailable() // 异步请求,需等待
|
|
20
|
+
setTimeout(() => {
|
|
21
|
+
let available = IWSAGetAvailable()
|
|
22
|
+
fn && fn(available)
|
|
23
|
+
}, 300)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* 签名解签 */
|
|
27
|
+
export function verifySign(signedMsg) {
|
|
28
|
+
let plainText
|
|
29
|
+
IWSAAttachedVerify('1', signedMsg, (errorCode, PlainText, SigncertDN) => {
|
|
30
|
+
if (errorCode === 0 || errorCode === '0') {
|
|
31
|
+
plainText = PlainText
|
|
32
|
+
} else {
|
|
33
|
+
alert('签名解签失败!')
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
return plainText
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* 给对象或字符串签名 */
|
|
40
|
+
export function getSign(plain, dn) {
|
|
41
|
+
if (dn === undefined) {
|
|
42
|
+
dn = getDN()
|
|
43
|
+
}
|
|
44
|
+
if (!dn) {
|
|
45
|
+
alert('签名参数DN错误!')
|
|
46
|
+
return false
|
|
47
|
+
}
|
|
48
|
+
let plainText = ''
|
|
49
|
+
if (typeof plain === 'object') {
|
|
50
|
+
plainText = JSON.stringify(plain)
|
|
51
|
+
} else {
|
|
52
|
+
plainText = plain
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
let answer = undefined
|
|
56
|
+
IWSAAttachedSign('1', plainText, '0', 'SHA1', (errorCode, signedData) => {
|
|
57
|
+
if (errorCode === 0 || errorCode === '0') {
|
|
58
|
+
answer = signedData
|
|
59
|
+
} else {
|
|
60
|
+
alert('签名失败!')
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
return answer
|
|
64
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const themeList = [
|
|
2
|
+
{ label: '科技蓝', value: 'blue', color: '#007aff', aD: `$--color-primary: #007aff;` },
|
|
3
|
+
{ label: '中国红', value: 'red', color: '#f5222d', aD: `$--color-primary: #f5222d;` },
|
|
4
|
+
{ label: '阳光橘', value: 'orange', color: '#fa541c', aD: `$--color-primary: #fa541c;` },
|
|
5
|
+
{ label: '金融金', value: 'yellow', color: '#fadb14', aD: `$--color-primary: #fadb14;` },
|
|
6
|
+
{ label: '青春绿', value: 'green', color: '#3eaf7c', aD: `$--color-primary: #3eaf7c;` },
|
|
7
|
+
{ label: '天空蓝', value: 'lightBlue', color: '#1890ff', aD: `$--color-primary: #1890ff;` },
|
|
8
|
+
{ label: '优雅紫', value: 'purple', color: '#722ed1', aD: `$--color-primary: #722ed1;` }
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
// 菜单颜色(仅支持 hex 格式)
|
|
12
|
+
const asideMenu = {
|
|
13
|
+
backgroundColor: '#3d4b6a',
|
|
14
|
+
textColor: '#fefefea6',
|
|
15
|
+
activeTextColor: '#ffffff'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (typeof exports === 'object' && typeof module === 'object') {
|
|
19
|
+
module.exports = { themeList, asideMenu }
|
|
20
|
+
} else if (typeof exports === 'object') {
|
|
21
|
+
exports = { themeList, asideMenu }
|
|
22
|
+
}
|
package/src/utils/theme.js
CHANGED
|
@@ -4,7 +4,7 @@ export function setTheme(val) {
|
|
|
4
4
|
var links = document.querySelectorAll('link[rel="stylesheet"]')
|
|
5
5
|
var link, newLink, nextEl, pEl
|
|
6
6
|
links.forEach(function (el) {
|
|
7
|
-
if (el.href && el.href.indexOf('/
|
|
7
|
+
if (el.href && el.href.indexOf('/theme/') !== -1) {
|
|
8
8
|
link = el
|
|
9
9
|
}
|
|
10
10
|
})
|