n20-common-lib 3.2.37 → 3.2.39
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/assets/css/secondary-tab.scss +1 -0
- package/src/assets/css/v3/footer.scss +10 -4
- package/src/assets/css/v3/secondary-tab.scss +5 -3
- package/src/components/MdmSelect/index.vue +179 -0
- package/src/i18n.json +21 -0
- package/src/index.js +3 -0
- package/style/index.css +1 -1
- package/theme/blue.css +1 -1
- package/theme/cctcRed.css +1 -1
- package/theme/green.css +1 -1
- package/theme/lightBlue.css +1 -1
- package/theme/orange.css +1 -1
- package/theme/purple.css +1 -1
- package/theme/red.css +1 -1
- package/theme/yellow.css +1 -1
package/package.json
CHANGED
|
@@ -6,17 +6,23 @@
|
|
|
6
6
|
background: $--color-white;
|
|
7
7
|
justify-content: space-between;
|
|
8
8
|
|
|
9
|
+
.n20-page-footer-left,
|
|
10
|
+
.n20-page-footer-center,
|
|
11
|
+
.n20-page-footer-right {
|
|
12
|
+
flex: 1 1 auto;
|
|
13
|
+
min-width: 0;
|
|
14
|
+
display: flex;
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
.n20-page-footer-left {
|
|
10
|
-
|
|
18
|
+
justify-content: flex-start;
|
|
11
19
|
}
|
|
12
20
|
|
|
13
21
|
.n20-page-footer-center {
|
|
22
|
+
justify-content: center;
|
|
14
23
|
}
|
|
15
24
|
|
|
16
25
|
.n20-page-footer-right {
|
|
17
|
-
flex: 1;
|
|
18
|
-
width: 0;
|
|
19
|
-
display: flex;
|
|
20
26
|
justify-content: flex-end;
|
|
21
27
|
}
|
|
22
28
|
}
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
}
|
|
21
21
|
.el-tabs__item {
|
|
22
22
|
font-weight: 400;
|
|
23
|
+
color: $--color-text-regular;
|
|
23
24
|
// height: 27px;
|
|
24
25
|
font-family: 'PingFang SC';
|
|
25
26
|
font-size: 14px;
|
|
26
27
|
font-style: normal;
|
|
27
|
-
font-weight: 500;
|
|
28
28
|
line-height: 26px;
|
|
29
29
|
padding: 9px 16px;
|
|
30
30
|
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
height: 2px;
|
|
36
36
|
background-color: $--color-primary;
|
|
37
37
|
display: block;
|
|
38
|
-
margin-top:
|
|
38
|
+
margin-top: 2px;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
&.is-disabled {
|
|
@@ -104,7 +104,9 @@
|
|
|
104
104
|
line-height: 22px !important;
|
|
105
105
|
padding: 8px 12px !important;
|
|
106
106
|
border-radius: 4px !important;
|
|
107
|
-
box-shadow:
|
|
107
|
+
box-shadow:
|
|
108
|
+
0 6px 16px -8px rgba(0, 0, 0, 0.08),
|
|
109
|
+
0 9px 28px 0 rgba(0, 0, 0, 0.05),
|
|
108
110
|
0 12px 48px 16px rgba(0, 0, 0, 0.03) !important;
|
|
109
111
|
border: none !important;
|
|
110
112
|
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-select
|
|
3
|
+
:value="value"
|
|
4
|
+
v-bind="computedAttrs"
|
|
5
|
+
:loading="loading"
|
|
6
|
+
v-on="computedListeners"
|
|
7
|
+
@input="handleInput"
|
|
8
|
+
@change="handleChange"
|
|
9
|
+
>
|
|
10
|
+
<el-option
|
|
11
|
+
v-for="option in options"
|
|
12
|
+
:key="`${type}-${option.code}`"
|
|
13
|
+
:label="getOptionLabel(option)"
|
|
14
|
+
:value="option.code"
|
|
15
|
+
/>
|
|
16
|
+
</el-select>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
import { $lc } from '../../utils/i18n/index'
|
|
21
|
+
|
|
22
|
+
const TYPE_CASH_FLOW_DIRECTION = 'cashFlowDirection'
|
|
23
|
+
const TYPE_PAYMENT_CATEGORY = 'paymentCategory'
|
|
24
|
+
const TYPE_PAY_BANK = 'payBank'
|
|
25
|
+
const VALID_TYPES = [TYPE_CASH_FLOW_DIRECTION, TYPE_PAYMENT_CATEGORY, TYPE_PAY_BANK]
|
|
26
|
+
const VALID_LABEL_MODES = ['value', 'code-value']
|
|
27
|
+
|
|
28
|
+
export default {
|
|
29
|
+
name: 'MdmSelect',
|
|
30
|
+
inheritAttrs: false,
|
|
31
|
+
props: {
|
|
32
|
+
value: {
|
|
33
|
+
type: [String, Number],
|
|
34
|
+
default: undefined
|
|
35
|
+
},
|
|
36
|
+
type: {
|
|
37
|
+
type: String,
|
|
38
|
+
required: true,
|
|
39
|
+
validator(value) {
|
|
40
|
+
return VALID_TYPES.includes(value)
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
labelMode: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: 'value',
|
|
46
|
+
validator(value) {
|
|
47
|
+
return VALID_LABEL_MODES.includes(value)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
data() {
|
|
52
|
+
return {
|
|
53
|
+
loading: false,
|
|
54
|
+
options: [],
|
|
55
|
+
requestSequence: 0
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
computed: {
|
|
59
|
+
computedAttrs() {
|
|
60
|
+
const attrs = Object.assign({}, this.$attrs)
|
|
61
|
+
delete attrs.loading
|
|
62
|
+
delete attrs.multiple
|
|
63
|
+
return Object.assign(
|
|
64
|
+
{
|
|
65
|
+
clearable: true,
|
|
66
|
+
filterable: true,
|
|
67
|
+
placeholder: $lc('请选择')
|
|
68
|
+
},
|
|
69
|
+
attrs
|
|
70
|
+
)
|
|
71
|
+
},
|
|
72
|
+
computedListeners() {
|
|
73
|
+
const listeners = Object.assign({}, this.$listeners)
|
|
74
|
+
delete listeners.input
|
|
75
|
+
delete listeners.change
|
|
76
|
+
delete listeners['load-error']
|
|
77
|
+
return listeners
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
watch: {
|
|
81
|
+
type(newValue, oldValue) {
|
|
82
|
+
if (newValue === oldValue) return
|
|
83
|
+
this.$emit('input', undefined)
|
|
84
|
+
this.$emit('change', undefined)
|
|
85
|
+
this.loadOptions()
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
created() {
|
|
89
|
+
this.loadOptions()
|
|
90
|
+
},
|
|
91
|
+
beforeDestroy() {
|
|
92
|
+
this.requestSequence += 1
|
|
93
|
+
},
|
|
94
|
+
methods: {
|
|
95
|
+
handleInput(value) {
|
|
96
|
+
this.$emit('input', value)
|
|
97
|
+
},
|
|
98
|
+
handleChange(value) {
|
|
99
|
+
this.$emit('change', value)
|
|
100
|
+
},
|
|
101
|
+
getOptionLabel(option) {
|
|
102
|
+
if (this.labelMode === 'code-value') {
|
|
103
|
+
if (this.type === TYPE_CASH_FLOW_DIRECTION) {
|
|
104
|
+
return `${option.label}(${option.code})`
|
|
105
|
+
}
|
|
106
|
+
return `${option.code} - ${option.label}`
|
|
107
|
+
}
|
|
108
|
+
return option.label
|
|
109
|
+
},
|
|
110
|
+
getPaymentCategoryOptions() {
|
|
111
|
+
return [
|
|
112
|
+
{ code: 1, label: $lc('收入'), raw: { label: '收入', value: 1 } },
|
|
113
|
+
{ code: 0, label: $lc('支出'), raw: { label: '支出', value: 0 } },
|
|
114
|
+
{ code: 2, label: $lc('净额'), raw: { label: '净额', value: 2 } }
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
normalizeResponse(response) {
|
|
118
|
+
if (Array.isArray(response)) return response
|
|
119
|
+
if (response && Array.isArray(response.data)) return response.data
|
|
120
|
+
if (response && response.data && Array.isArray(response.data.list)) {
|
|
121
|
+
return response.data.list
|
|
122
|
+
}
|
|
123
|
+
if (response && Array.isArray(response.list)) return response.list
|
|
124
|
+
return []
|
|
125
|
+
},
|
|
126
|
+
normalizeOptions(list, codeKey, labelKey) {
|
|
127
|
+
return list
|
|
128
|
+
.filter((item) => item && item[codeKey] !== undefined && item[codeKey] !== null)
|
|
129
|
+
.map((item) => ({
|
|
130
|
+
code: item[codeKey],
|
|
131
|
+
label: item[labelKey] === undefined || item[labelKey] === null ? '' : item[labelKey],
|
|
132
|
+
raw: item
|
|
133
|
+
}))
|
|
134
|
+
},
|
|
135
|
+
async loadOptions() {
|
|
136
|
+
const requestSequence = ++this.requestSequence
|
|
137
|
+
this.options = []
|
|
138
|
+
|
|
139
|
+
if (this.type === TYPE_PAYMENT_CATEGORY) {
|
|
140
|
+
this.loading = false
|
|
141
|
+
this.options = this.getPaymentCategoryOptions()
|
|
142
|
+
return
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
this.loading = true
|
|
146
|
+
try {
|
|
147
|
+
let response
|
|
148
|
+
let codeKey
|
|
149
|
+
let labelKey
|
|
150
|
+
|
|
151
|
+
if (this.type === TYPE_CASH_FLOW_DIRECTION) {
|
|
152
|
+
response = await this.$axios.get(
|
|
153
|
+
'/bems/1.0/cashflow/fieldinfo/MDM_G_CASHFLOWflowDir',
|
|
154
|
+
{},
|
|
155
|
+
{ loading: false, noMsg: true }
|
|
156
|
+
)
|
|
157
|
+
codeKey = 'dbdata'
|
|
158
|
+
labelKey = 'otherdata'
|
|
159
|
+
} else if (this.type === TYPE_PAY_BANK) {
|
|
160
|
+
response = await this.$axios.get('/bems/1.0/bank', { isEnable: 1 }, { loading: false, noMsg: true })
|
|
161
|
+
codeKey = 'bankNo'
|
|
162
|
+
labelKey = 'bankName'
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (requestSequence !== this.requestSequence) return
|
|
166
|
+
this.options = this.normalizeOptions(this.normalizeResponse(response), codeKey, labelKey)
|
|
167
|
+
} catch (error) {
|
|
168
|
+
if (requestSequence !== this.requestSequence) return
|
|
169
|
+
this.options = []
|
|
170
|
+
this.$emit('load-error', error)
|
|
171
|
+
} finally {
|
|
172
|
+
if (requestSequence === this.requestSequence) {
|
|
173
|
+
this.loading = false
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
</script>
|
package/src/i18n.json
CHANGED
|
@@ -3550,6 +3550,27 @@
|
|
|
3550
3550
|
"th": "ไม่ทำการรีรันด้วยขั้นตอนเดิม",
|
|
3551
3551
|
"vi": "Không làm lại quy trình"
|
|
3552
3552
|
},
|
|
3553
|
+
"收入": {
|
|
3554
|
+
"en": "Inflow",
|
|
3555
|
+
"th": "ไหลเข้า",
|
|
3556
|
+
"vi": "Dòng vào",
|
|
3557
|
+
"ja": "流入",
|
|
3558
|
+
"zh-hk": "收入"
|
|
3559
|
+
},
|
|
3560
|
+
"支出": {
|
|
3561
|
+
"en": "Outflow",
|
|
3562
|
+
"th": "ไหลออก",
|
|
3563
|
+
"vi": "Dòng chảy ra",
|
|
3564
|
+
"ja": "流出",
|
|
3565
|
+
"zh-hk": "支出"
|
|
3566
|
+
},
|
|
3567
|
+
"净额": {
|
|
3568
|
+
"en": "Net Amount",
|
|
3569
|
+
"th": "จำนวนเงินสุทธิ",
|
|
3570
|
+
"vi": "Số tiền ròng",
|
|
3571
|
+
"ja": "正味金額",
|
|
3572
|
+
"zh-hk": "淨額"
|
|
3573
|
+
},
|
|
3553
3574
|
"此模式下被回退节点提交后将绕过中间已办节点,造成流程不严谨,谨慎使用!": {
|
|
3554
3575
|
"en": "This mode will bypass the middle nodes that have been completed after the node is returned, causing the process to be non-standard. Use with caution!",
|
|
3555
3576
|
"th": "เมื่อมีการย้อนกลับไปยังโครงการที่มีการเสร็จสิ้นแล้ว จะทำให้โครงการไม่สมบูรณ์ โปรดใช้ด้วยระวัง!",
|
package/src/index.js
CHANGED
|
@@ -85,6 +85,7 @@ import InputAccount from './components/InputAccount/index.vue'
|
|
|
85
85
|
import InputNumber from './components/InputNumber/index.vue'
|
|
86
86
|
import InputNumberRange from './components/InputNumber/numberRange.vue'
|
|
87
87
|
import InputSearch from './components/InputSearch/index.vue'
|
|
88
|
+
import MdmSelect from './components/MdmSelect/index.vue'
|
|
88
89
|
import NavMenu from './components/NavMenu/index.vue'
|
|
89
90
|
import operatingStatus from './components/operatingStatus/index.vue'
|
|
90
91
|
import PageHeader from './components/PageHeader/index.vue'
|
|
@@ -202,6 +203,7 @@ const components = [
|
|
|
202
203
|
InputAccount,
|
|
203
204
|
InputNumber,
|
|
204
205
|
InputNumberRange,
|
|
206
|
+
MdmSelect,
|
|
205
207
|
TimePicker,
|
|
206
208
|
DatePicker,
|
|
207
209
|
DatePickerPor,
|
|
@@ -400,6 +402,7 @@ export {
|
|
|
400
402
|
InputNumber,
|
|
401
403
|
InputNumberRange,
|
|
402
404
|
InputSearch,
|
|
405
|
+
MdmSelect,
|
|
403
406
|
ViewToggle,
|
|
404
407
|
N,
|
|
405
408
|
NavMenu,
|