n20-common-lib 1.3.2 → 1.3.5
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/g6.js +197 -0
- package/package.json +3 -2
- package/src/components/ECharts/mixins/resize.js +1 -1
- package/src/components/FileImport/index.vue +1 -1
- package/src/components/LoginTemporary/index.vue +3 -3
- package/src/components/NstcG6Components/Form/DatepickerCustom/index.vue +32 -32
- package/src/components/NstcG6Components/NstcBranchLazyLoad/NstcBranchLazyLoad.vue +37 -33
- package/src/components/NstcG6Components/NstcCharts/mixins/resize.js +1 -1
- package/src/components/NstcG6Components/NstcDropdownTree/NstcDropdownTree.vue +141 -137
- package/src/components/NstcG6Components/NstcExcelExport/NstcExcelExport.vue +47 -47
- package/src/components/NstcG6Components/NstcExcelImport/NstcExcelImport.vue +1 -1
- package/src/components/NstcG6Components/NstcExcelImportN/NstcExcelImportN.vue +186 -188
- package/src/components/NstcG6Components/NstcFileUpload/NstcFileUpload.vue +429 -451
- package/src/components/NstcG6Components/NstcForm/BusinessSpecific/InputMultiple.vue +66 -68
- package/src/components/NstcG6Components/NstcForm/CascaderCustom/index.vue +7 -7
- package/src/components/NstcG6Components/NstcForm/DatepickerCustom/index.vue +32 -32
- package/src/components/NstcG6Components/NstcForm/InputAndDialog/NstcInputAndDialog.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/InputCustom/index.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/SelectAccount/NstcSelectAccount.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/SelectAndDialog/NstcSelectAndDialog.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/SelectCustom/index.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/SelectindialogCustom/index.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/UploadCustom/index.vue +1 -1
- package/src/components/NstcG6Components/NstcSelectTree/NstcSelectTree.vue +172 -172
- package/src/components/NstcG6Components/NstcSelectTreeList/NstcSelectTreeList.vue +1 -1
- package/src/components/NstcG6Components/NstcSvgIcon/NstcSvgIcon.vue +7 -12
- package/src/components/NstcG6Components/NstcTable/NstcTable.vue +145 -145
- package/src/components/NstcG6Components/NstcTableSet/NstcTableSet.vue +4 -4
- package/src/components/NstcG6Components/NstcWorkBench/NstcWorkBench.vue +45 -36
- package/src/components/NstcG6Components/Search/NstcSearch.vue +6 -6
- package/src/components/NstcG6Components/approvelTwo/main.vue +1 -1
- package/src/components/NstcG6Components/approvelTwo/progress.vue +1 -1
- package/src/components/Search/index.vue +8 -8
- package/src/index.js +3 -3
- package/style/css/normalize.scss +726 -0
- package/style/pageDemo/demo-1.vue +131 -0
- package/style/pageDemo/demo-2.vue +35 -0
- package/style/pageDemo/demo-3.vue +22 -0
- package/style/pageDemo/seeCode.js +20 -0
- package/style/server-config.jsonc +723 -0
package/g6.js
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import NstcDialog from './src/components/NstcG6Components/NstcDialog/NstcDialog.vue'
|
|
2
|
+
import NstcBackToTop from './src/components/NstcG6Components/NstcBackToTop/NstcBackToTop.vue'
|
|
3
|
+
import NstcBranchLazyLoad from './src/components/NstcG6Components/NstcBranchLazyLoad/NstcBranchLazyLoad.vue'
|
|
4
|
+
import NstcCharts from './src/components/NstcG6Components/NstcCharts/NstcCharts.vue'
|
|
5
|
+
NstcApprovelTwo
|
|
6
|
+
import NstcApprovelTwo from './src/components/NstcG6Components/approvelTwo/main.vue'
|
|
7
|
+
import NstcApprovel from './src/components/NstcG6Components/NstcApprovel/NstcApprovel.vue'
|
|
8
|
+
import confirmFunction from './src/components/NstcG6Components/NstcConfirm/index'
|
|
9
|
+
import NstcWorkBench from './src/components/NstcG6Components/NstcWorkBench/NstcWorkBench.vue'
|
|
10
|
+
import NstcThemePicker from './src/components/NstcG6Components/NstcThemePicker/NstcThemePicker.vue'
|
|
11
|
+
import NstcTabWithBadge from './src/components/NstcG6Components/NstcTabWithBadge/NstcTabWithBadge.vue'
|
|
12
|
+
import NstcTableSet from './src/components/NstcG6Components/NstcTableSet/NstcTableSet.vue'
|
|
13
|
+
import NstcDropdown from './src/components/NstcG6Components/NstcDropdown/NstcDropdown.vue'
|
|
14
|
+
import NstcPagination from './src/components/NstcG6Components/NstcPagination/NstcPagination.vue'
|
|
15
|
+
import NstcTable from './src/components/NstcG6Components/NstcTable/NstcTable.vue'
|
|
16
|
+
import NstcTab from './src/components/NstcG6Components/NstcTab/NstcTab.vue'
|
|
17
|
+
import NstcSvgIcon from './src/components/NstcG6Components/NstcSvgIcon/NstcSvgIcon.vue'
|
|
18
|
+
import NstcSticky from './src/components/NstcG6Components/NstcSticky/NstcSticky.vue'
|
|
19
|
+
import InputTag from './src/components/NstcG6Components/InputTag/InputTag.vue'
|
|
20
|
+
import NstcSelectTreeList from './src/components/NstcG6Components/NstcSelectTreeList/NstcSelectTreeList.vue'
|
|
21
|
+
import NstcSelectTree from './src/components/NstcG6Components/NstcSelectTree/NstcSelectTree.vue'
|
|
22
|
+
import NstcScreenFull from './src/components/NstcG6Components/NstcScreenFull/NstcScreenFull.vue'
|
|
23
|
+
import NstcExpandCollapse from './src/components/NstcG6Components/NstcExpandCollapse/NstcExpandCollapse.vue'
|
|
24
|
+
import NstcFileUpload from './src/components/NstcG6Components/NstcFileUpload/NstcFileUpload.vue'
|
|
25
|
+
import NstcExcelImportN from './src/components/NstcG6Components/NstcExcelImportN/NstcExcelImportN.vue'
|
|
26
|
+
import NstcUploadExcel from './src/components/NstcG6Components/NstcUploadExcel/NstcUploadExcel.vue'
|
|
27
|
+
import NstcExcelImport from './src/components/NstcG6Components/NstcExcelImport/NstcExcelImport.vue'
|
|
28
|
+
import NstcExcelExport from './src/components/NstcG6Components/NstcExcelExport/NstcExcelExport.vue'
|
|
29
|
+
import NstcUploadCustomExcel from './src/components/NstcG6Components/NstcUploadCustomExcel/NstcUploadCustomExcel.vue'
|
|
30
|
+
import NstcExcelCustomImport from './src/components/NstcG6Components/NstcExcelCustomImport/NstcExcelCustomImport.vue'
|
|
31
|
+
import NstcElectronicFile from './src/components/NstcG6Components/NstcElectronicFile/NstcElectronicFile.vue'
|
|
32
|
+
import NstcDropdownTree from './src/components/NstcG6Components/NstcDropdownTree/NstcDropdownTree.vue'
|
|
33
|
+
import NstcDialogTable from './src/components/NstcG6Components/NstcDialogTable/NstcDialogTable.vue'
|
|
34
|
+
import InputCustom from './src/components/NstcG6Components/NstcForm/InputCustom/index.vue'
|
|
35
|
+
import IntervalInputCustom from './src/components/NstcG6Components/NstcForm/IntervalInputCustom/index.vue'
|
|
36
|
+
import AutocompleteCustom from './src/components/NstcG6Components/NstcForm/AutocompleteCustom/index.vue'
|
|
37
|
+
import SelectCustom from './src/components/NstcG6Components/NstcForm/SelectCustom/index.vue'
|
|
38
|
+
import NstcSelectInDialog from './src/components/NstcG6Components/NstcForm/SelectindialogCustom/index.vue'
|
|
39
|
+
import UploadCustom from './src/components/NstcG6Components/NstcForm/UploadCustom/index.vue'
|
|
40
|
+
import RadioCustom from './src/components/NstcG6Components/NstcForm/RadioCustom/index.vue'
|
|
41
|
+
import CheckboxCustom from './src/components/NstcG6Components/NstcForm/CheckboxCustom/index'
|
|
42
|
+
import CascaderCustom from './src/components/NstcG6Components/NstcForm/CascaderCustom/index'
|
|
43
|
+
import TextCustom from './src/components/NstcG6Components/NstcForm/TextCustom/index'
|
|
44
|
+
import NstcInputAndDialog from './src/components/NstcG6Components/NstcForm/InputAndDialog/NstcInputAndDialog.vue'
|
|
45
|
+
import NstcSelectAndDialog from './src/components/NstcG6Components/NstcForm/SelectAndDialog/NstcSelectAndDialog.vue'
|
|
46
|
+
import NstcPayeePerson from './src/components/NstcG6Components/NstcForm/payeePersonSelect/NstcPayeePerson.vue'
|
|
47
|
+
import NstcSelectSubject from './src/components/NstcG6Components/NstcForm/SelectSubject/NstcSelectSubject.vue'
|
|
48
|
+
import NstcSelectCashFlow from './src/components/NstcG6Components/NstcForm/SelectCashFlow/NstcSelectCashFlow.vue'
|
|
49
|
+
import NstcSelectAccount from './src/components/NstcG6Components/NstcForm/SelectAccount/NstcSelectAccount.vue'
|
|
50
|
+
import TableRadioCustom from './src/components/NstcG6Components/NstcForm/TableRadioCustom/index.vue'
|
|
51
|
+
import NstcSearch from './src/components/NstcG6Components/Search/NstcSearch.vue'
|
|
52
|
+
// import NstcDialogForm from './src/components/NstcG6Components/NstcDialogForm/NstcDialogForm'
|
|
53
|
+
|
|
54
|
+
const req = require.context('./src/assets/svg', false, /\.svg$/)
|
|
55
|
+
|
|
56
|
+
const requireAll = (requireContext) => requireContext.keys().map(requireContext)
|
|
57
|
+
requireAll(req)
|
|
58
|
+
|
|
59
|
+
/* 方法 */
|
|
60
|
+
import VueBus from '@/utils/vue-bus'
|
|
61
|
+
|
|
62
|
+
/* 指令 */
|
|
63
|
+
|
|
64
|
+
import VCopy from '@/directives/VCopy'
|
|
65
|
+
import VNstcNumber from '@/directives/VNstcNumber'
|
|
66
|
+
|
|
67
|
+
const components = [
|
|
68
|
+
NstcDialog,
|
|
69
|
+
NstcBackToTop,
|
|
70
|
+
NstcBranchLazyLoad,
|
|
71
|
+
NstcCharts,
|
|
72
|
+
NstcApprovel,
|
|
73
|
+
NstcApprovelTwo,
|
|
74
|
+
NstcWorkBench,
|
|
75
|
+
NstcThemePicker,
|
|
76
|
+
NstcTabWithBadge,
|
|
77
|
+
NstcTableSet,
|
|
78
|
+
NstcDropdown,
|
|
79
|
+
NstcPagination,
|
|
80
|
+
NstcTable,
|
|
81
|
+
NstcTab,
|
|
82
|
+
NstcSvgIcon,
|
|
83
|
+
NstcSticky,
|
|
84
|
+
InputTag,
|
|
85
|
+
NstcSelectTreeList,
|
|
86
|
+
NstcSelectTree,
|
|
87
|
+
NstcScreenFull,
|
|
88
|
+
NstcExpandCollapse,
|
|
89
|
+
NstcFileUpload,
|
|
90
|
+
NstcExcelImportN,
|
|
91
|
+
NstcUploadExcel,
|
|
92
|
+
NstcExcelImport,
|
|
93
|
+
NstcExcelExport,
|
|
94
|
+
NstcUploadCustomExcel,
|
|
95
|
+
NstcExcelCustomImport,
|
|
96
|
+
NstcElectronicFile,
|
|
97
|
+
NstcDropdownTree,
|
|
98
|
+
NstcDialogTable,
|
|
99
|
+
InputCustom,
|
|
100
|
+
IntervalInputCustom,
|
|
101
|
+
AutocompleteCustom,
|
|
102
|
+
SelectCustom,
|
|
103
|
+
NstcSelectInDialog,
|
|
104
|
+
UploadCustom,
|
|
105
|
+
RadioCustom,
|
|
106
|
+
CheckboxCustom,
|
|
107
|
+
CascaderCustom,
|
|
108
|
+
TextCustom,
|
|
109
|
+
NstcInputAndDialog,
|
|
110
|
+
NstcSelectAndDialog,
|
|
111
|
+
NstcPayeePerson,
|
|
112
|
+
NstcSelectSubject,
|
|
113
|
+
NstcSelectCashFlow,
|
|
114
|
+
NstcSelectAccount,
|
|
115
|
+
TableRadioCustom,
|
|
116
|
+
NstcSearch
|
|
117
|
+
// NstcDialogForm
|
|
118
|
+
]
|
|
119
|
+
|
|
120
|
+
const install = function (Vue) {
|
|
121
|
+
components.forEach((component) => {
|
|
122
|
+
let name = component.name
|
|
123
|
+
Vue.component(name, component)
|
|
124
|
+
})
|
|
125
|
+
Vue.use(VCopy)
|
|
126
|
+
Vue.use(VNstcNumber)
|
|
127
|
+
Vue.prototype.$bus = {
|
|
128
|
+
$on(...event) {
|
|
129
|
+
VueBus.$on(...event)
|
|
130
|
+
},
|
|
131
|
+
$off(...event) {
|
|
132
|
+
VueBus.$off(...event)
|
|
133
|
+
},
|
|
134
|
+
$once(...event) {
|
|
135
|
+
VueBus.$emit(...event)
|
|
136
|
+
},
|
|
137
|
+
$emit(...event) {
|
|
138
|
+
VueBus.$emit(...event)
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
Vue.prototype.$confirmTip = confirmFunction
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export default {
|
|
146
|
+
install
|
|
147
|
+
}
|
|
148
|
+
export {
|
|
149
|
+
NstcDialog,
|
|
150
|
+
NstcBackToTop,
|
|
151
|
+
NstcBranchLazyLoad,
|
|
152
|
+
NstcCharts,
|
|
153
|
+
NstcApprovel,
|
|
154
|
+
NstcWorkBench,
|
|
155
|
+
NstcThemePicker,
|
|
156
|
+
NstcTabWithBadge,
|
|
157
|
+
NstcTableSet,
|
|
158
|
+
NstcDropdown,
|
|
159
|
+
NstcPagination,
|
|
160
|
+
NstcTable,
|
|
161
|
+
NstcTab,
|
|
162
|
+
NstcSvgIcon,
|
|
163
|
+
NstcSticky,
|
|
164
|
+
InputTag,
|
|
165
|
+
NstcSelectTreeList,
|
|
166
|
+
NstcSelectTree,
|
|
167
|
+
NstcScreenFull,
|
|
168
|
+
NstcExpandCollapse,
|
|
169
|
+
NstcFileUpload,
|
|
170
|
+
NstcExcelImportN,
|
|
171
|
+
NstcUploadExcel,
|
|
172
|
+
NstcExcelImport,
|
|
173
|
+
NstcExcelExport,
|
|
174
|
+
NstcUploadCustomExcel,
|
|
175
|
+
NstcExcelCustomImport,
|
|
176
|
+
NstcElectronicFile,
|
|
177
|
+
NstcDropdownTree,
|
|
178
|
+
NstcDialogTable,
|
|
179
|
+
InputCustom,
|
|
180
|
+
IntervalInputCustom,
|
|
181
|
+
AutocompleteCustom,
|
|
182
|
+
SelectCustom,
|
|
183
|
+
NstcSelectInDialog,
|
|
184
|
+
UploadCustom,
|
|
185
|
+
RadioCustom,
|
|
186
|
+
CheckboxCustom,
|
|
187
|
+
CascaderCustom,
|
|
188
|
+
TextCustom,
|
|
189
|
+
NstcInputAndDialog,
|
|
190
|
+
NstcSelectAndDialog,
|
|
191
|
+
NstcPayeePerson,
|
|
192
|
+
NstcSelectSubject,
|
|
193
|
+
NstcSelectCashFlow,
|
|
194
|
+
NstcSelectAccount,
|
|
195
|
+
TableRadioCustom,
|
|
196
|
+
NstcSearch
|
|
197
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n20-common-lib",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"src/utils",
|
|
25
25
|
"src/plugins",
|
|
26
26
|
"src/index.js",
|
|
27
|
-
"style"
|
|
27
|
+
"style",
|
|
28
|
+
"g6.js"
|
|
28
29
|
],
|
|
29
30
|
"dependencies": {
|
|
30
31
|
"axios": "^0.21.4",
|
|
@@ -107,8 +107,8 @@ export default {
|
|
|
107
107
|
<style scoped>
|
|
108
108
|
.login-logo-box {
|
|
109
109
|
position: absolute;
|
|
110
|
-
top:
|
|
111
|
-
left:
|
|
110
|
+
top: 88px;
|
|
111
|
+
left: 116px;
|
|
112
112
|
color: #ffffff;
|
|
113
113
|
}
|
|
114
114
|
.login-logo-hr {
|
|
@@ -121,7 +121,7 @@ export default {
|
|
|
121
121
|
}
|
|
122
122
|
.login-form {
|
|
123
123
|
position: absolute;
|
|
124
|
-
top:
|
|
124
|
+
top: 25%;
|
|
125
125
|
right: 10%;
|
|
126
126
|
width: 324px;
|
|
127
127
|
min-height: 360px;
|
|
@@ -16,89 +16,89 @@
|
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script>
|
|
19
|
-
import dateAndValidator from
|
|
19
|
+
import dateAndValidator from '../../../../utils/dateAndValidator'
|
|
20
20
|
|
|
21
21
|
export default {
|
|
22
|
-
name:
|
|
22
|
+
name: 'DatePickerCustom',
|
|
23
23
|
|
|
24
24
|
inheritAttrs: false,
|
|
25
25
|
|
|
26
26
|
props: {
|
|
27
27
|
value: {
|
|
28
28
|
default: null,
|
|
29
|
-
type: [Date, Array, String]
|
|
29
|
+
type: [Date, Array, String]
|
|
30
30
|
},
|
|
31
|
-
dateType:{
|
|
31
|
+
dateType: {
|
|
32
32
|
type: [String, Number],
|
|
33
|
-
default:
|
|
33
|
+
default: ''
|
|
34
34
|
},
|
|
35
35
|
width: {
|
|
36
36
|
type: [String, Number],
|
|
37
|
-
default:
|
|
37
|
+
default: ''
|
|
38
38
|
},
|
|
39
39
|
|
|
40
40
|
limit: {
|
|
41
41
|
type: Array,
|
|
42
|
-
default: () => []
|
|
42
|
+
default: () => []
|
|
43
43
|
},
|
|
44
44
|
|
|
45
45
|
pickerOptions: {
|
|
46
46
|
type: Object,
|
|
47
|
-
default: () => ({})
|
|
47
|
+
default: () => ({})
|
|
48
48
|
},
|
|
49
49
|
|
|
50
50
|
unlinkPanels: {
|
|
51
51
|
type: Boolean,
|
|
52
|
-
default: true
|
|
52
|
+
default: true
|
|
53
53
|
},
|
|
54
54
|
|
|
55
55
|
valueFormat: {
|
|
56
56
|
type: String,
|
|
57
|
-
default:
|
|
58
|
-
}
|
|
57
|
+
default: 'yyyy-MM-dd'
|
|
58
|
+
}
|
|
59
59
|
},
|
|
60
60
|
|
|
61
61
|
data() {
|
|
62
62
|
return {
|
|
63
|
-
key: `DatePickerCustomID-${Math.random().toString(36).slice(2)}
|
|
64
|
-
}
|
|
63
|
+
key: `DatePickerCustomID-${Math.random().toString(36).slice(2)}`
|
|
64
|
+
}
|
|
65
65
|
},
|
|
66
66
|
created() {
|
|
67
|
-
this.$bus.$on(
|
|
68
|
-
console.log(
|
|
69
|
-
})
|
|
70
|
-
console.log(this.dateType,'----------dateType')
|
|
67
|
+
this.$bus.$on('nstc_custom_form_config_update', (formData) => {
|
|
68
|
+
console.log('监听到的全局事件', formData)
|
|
69
|
+
})
|
|
70
|
+
console.log(this.dateType, '----------dateType')
|
|
71
71
|
},
|
|
72
72
|
beforeDestroy() {
|
|
73
|
-
this.$bus.$off(
|
|
73
|
+
this.$bus.$off('nstc_custom_form_config_update')
|
|
74
74
|
},
|
|
75
75
|
computed: {
|
|
76
76
|
_value: {
|
|
77
77
|
get() {
|
|
78
|
-
return this.value
|
|
78
|
+
return this.value
|
|
79
79
|
},
|
|
80
80
|
set(val) {
|
|
81
|
-
this.$emit(
|
|
82
|
-
this.$emit(
|
|
83
|
-
}
|
|
81
|
+
this.$emit('input', val)
|
|
82
|
+
this.$emit('change', val)
|
|
83
|
+
}
|
|
84
84
|
},
|
|
85
85
|
|
|
86
86
|
_pickerOptions() {
|
|
87
87
|
// 今天以及今天之前
|
|
88
|
-
if(this.dateType == 'includeTodayBefore') {
|
|
88
|
+
if (this.dateType == 'includeTodayBefore') {
|
|
89
89
|
return {
|
|
90
|
-
|
|
90
|
+
disabledDate(time) {
|
|
91
91
|
return time.getTime() > Date.now() - 8.64e6
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
} else if(this.dateType == 'todayBefore') {
|
|
94
|
+
} else if (this.dateType == 'todayBefore') {
|
|
95
95
|
// 今天之前
|
|
96
96
|
return {
|
|
97
97
|
disabledDate(time) {
|
|
98
98
|
return time.getTime() > Date.now()
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
} else if(this.dateType == 'includeTodayAfter') {
|
|
101
|
+
} else if (this.dateType == 'includeTodayAfter') {
|
|
102
102
|
// 今天以及今天之后
|
|
103
103
|
return {
|
|
104
104
|
disabledDate(time) {
|
|
@@ -112,15 +112,15 @@ export default {
|
|
|
112
112
|
return time.getTime() < Date.now()
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
} else{
|
|
115
|
+
} else {
|
|
116
116
|
return {
|
|
117
117
|
...dateAndValidator.limit.pickerOptions(...this.limit),
|
|
118
|
-
...this.pickerOptions
|
|
119
|
-
}
|
|
118
|
+
...this.pickerOptions
|
|
119
|
+
}
|
|
120
120
|
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
124
|
</script>
|
|
125
125
|
|
|
126
126
|
<style scoped>
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="BranchLazyLoad">
|
|
3
3
|
<el-select
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
v-model="registerForm.branchBankNo"
|
|
5
|
+
v-el-select-loadmore="loadMore"
|
|
6
|
+
:default-first-option="true"
|
|
7
|
+
:filterable="true"
|
|
8
|
+
clearable
|
|
9
|
+
remote
|
|
10
|
+
:remote-method="remoteMethod"
|
|
11
|
+
@change="changeBranchBank"
|
|
12
|
+
@blur="blurBranchBank"
|
|
13
13
|
>
|
|
14
14
|
<el-option
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
v-for="(item, index) in accountAssociateBankDb"
|
|
16
|
+
:key="index"
|
|
17
|
+
:label="item.label"
|
|
18
|
+
:value="item.value"
|
|
19
19
|
/>
|
|
20
20
|
</el-select>
|
|
21
21
|
</div>
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<script>
|
|
25
|
-
import axios from '
|
|
25
|
+
import axios from '../../../utils/axios'
|
|
26
26
|
export default {
|
|
27
|
-
name:
|
|
27
|
+
name: 'NstcBranchLazyLoad',
|
|
28
28
|
data() {
|
|
29
29
|
return {
|
|
30
30
|
associatePagination: {
|
|
@@ -37,7 +37,7 @@ export default {
|
|
|
37
37
|
registerForm: {
|
|
38
38
|
branchBankNo: ''
|
|
39
39
|
},
|
|
40
|
-
accountAssociateBankDb: []
|
|
40
|
+
accountAssociateBankDb: []
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
props: {
|
|
@@ -50,11 +50,11 @@ export default {
|
|
|
50
50
|
'el-select-loadmore': {
|
|
51
51
|
bind(el, binding) {
|
|
52
52
|
const SELECTWRAP_DOM = el.querySelector(
|
|
53
|
-
|
|
53
|
+
'.el-select-dropdown .el-select-dropdown__wrap'
|
|
54
54
|
)
|
|
55
|
-
SELECTWRAP_DOM.addEventListener('scroll', function() {
|
|
55
|
+
SELECTWRAP_DOM.addEventListener('scroll', function () {
|
|
56
56
|
const condition =
|
|
57
|
-
|
|
57
|
+
this.scrollHeight - this.scrollTop <= this.clientHeight
|
|
58
58
|
if (condition) {
|
|
59
59
|
binding.value()
|
|
60
60
|
}
|
|
@@ -81,22 +81,26 @@ export default {
|
|
|
81
81
|
* 获取支行下拉值
|
|
82
82
|
*/
|
|
83
83
|
async getAssociateBank(flag) {
|
|
84
|
-
flag === 'loadMore' &&
|
|
84
|
+
flag === 'loadMore' && this.associatePagination['page.current']++
|
|
85
85
|
// this.associatePagination.bankNo = this.applyForm.bankNo
|
|
86
|
-
await axios
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
86
|
+
await axios
|
|
87
|
+
.get(this.url, this.associatePagination)
|
|
88
|
+
.then((res) => {
|
|
89
|
+
res = res.data.map((i) => {
|
|
90
|
+
return {
|
|
91
|
+
label: i[`branchBankName`],
|
|
92
|
+
value: i[`cnapsNo`],
|
|
93
|
+
bankNo: i[`bankNo`]
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
if (flag === 'query') {
|
|
97
|
+
this.accountAssociateBankDb = res
|
|
98
|
+
} else {
|
|
99
|
+
this.accountAssociateBankDb =
|
|
100
|
+
this.accountAssociateBankDb.concat(res)
|
|
92
101
|
}
|
|
93
102
|
})
|
|
94
|
-
|
|
95
|
-
this.accountAssociateBankDb = res
|
|
96
|
-
} else {
|
|
97
|
-
this.accountAssociateBankDb = this.accountAssociateBankDb.concat(res)
|
|
98
|
-
}
|
|
99
|
-
}).catch(() => {})
|
|
103
|
+
.catch(() => {})
|
|
100
104
|
},
|
|
101
105
|
/**
|
|
102
106
|
* 支行失去焦点
|
|
@@ -113,7 +117,7 @@ export default {
|
|
|
113
117
|
},
|
|
114
118
|
async loadMore() {
|
|
115
119
|
await this.getAssociateBank('loadMore')
|
|
116
|
-
}
|
|
120
|
+
}
|
|
117
121
|
}
|
|
118
122
|
}
|
|
119
123
|
</script>
|