n20-common-lib 2.4.5 → 2.4.7
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/README.md +1 -1
- package/nstc-g6/components/Calendar/index.js +5 -5
- package/nstc-g6/components/Calendar/src/basic/month-table.vue +12 -20
- package/nstc-g6/components/Calendar/src/basic/year-table.vue +18 -22
- package/nstc-g6/components/Calendar/src/main.vue +1 -5
- package/nstc-g6/components/DialogForm/index.js +5 -5
- package/nstc-g6/components/DialogForm/src/demo/index.vue +18 -27
- package/nstc-g6/components/DialogForm/src/main.vue +15 -21
- package/nstc-g6/components/Form/A_DEMO/component/originalForm.vue +35 -50
- package/nstc-g6/components/Form/A_DEMO/config/config_3.js +1115 -1110
- package/nstc-g6/components/Form/A_DEMO/index.vue +7 -29
- package/nstc-g6/components/Form/AutocompleteCustom/index.vue +3 -5
- package/nstc-g6/components/Form/BusinessSpecific/InputMultiple.vue +60 -62
- package/nstc-g6/components/Form/BusinessSpecific/InputWithUnit.vue +12 -35
- package/nstc-g6/components/Form/BusinessSpecific/SelectTreeDialog.vue +77 -77
- package/nstc-g6/components/Form/CascaderCustom/index.vue +4 -4
- package/nstc-g6/components/Form/CheckboxCustom/index.vue +5 -11
- package/nstc-g6/components/Form/Component.vue +56 -78
- package/nstc-g6/components/Form/ComponentSecond.vue +55 -77
- package/nstc-g6/components/Form/InputAndDialog/index.js +5 -5
- package/nstc-g6/components/Form/InputAndDialog/src/main.vue +130 -153
- package/nstc-g6/components/Form/InputCustom/demo/index.vue +4 -12
- package/nstc-g6/components/Form/InputCustom/index.vue +51 -54
- package/nstc-g6/components/Form/IntervalinputCustom/demo/index.vue +1 -3
- package/nstc-g6/components/Form/IntervalinputCustom/index.vue +19 -41
- package/nstc-g6/components/Form/Item.vue +15 -30
- package/nstc-g6/components/Form/ItemSecond.vue +7 -22
- package/nstc-g6/components/Form/List.vue +12 -28
- package/nstc-g6/components/Form/ListSecond.vue +11 -27
- package/nstc-g6/components/Form/RadioCustom/index.vue +5 -23
- package/nstc-g6/components/Form/SelectAccount/index.js +5 -5
- package/nstc-g6/components/Form/SelectAccount/src/demo/index.vue +34 -28
- package/nstc-g6/components/Form/SelectAccount/src/main.vue +112 -83
- package/nstc-g6/components/Form/SelectAndDialog/index.js +5 -5
- package/nstc-g6/components/Form/SelectAndDialog/src/main.vue +126 -149
- package/nstc-g6/components/Form/SelectCashFlow/index.js +5 -5
- package/nstc-g6/components/Form/SelectCashFlow/src/demo/index.vue +18 -19
- package/nstc-g6/components/Form/SelectCashFlow/src/main.vue +52 -41
- package/nstc-g6/components/Form/SelectCustom/demo/index.vue +14 -16
- package/nstc-g6/components/Form/SelectCustom/index.vue +129 -139
- package/nstc-g6/components/Form/SelectSubject/index.js +5 -5
- package/nstc-g6/components/Form/SelectSubject/src/demo/index.vue +42 -48
- package/nstc-g6/components/Form/SelectSubject/src/main.vue +83 -86
- package/nstc-g6/components/Form/SelectindialogCustom/demo/index.vue +34 -35
- package/nstc-g6/components/Form/SelectindialogCustom/index.vue +133 -148
- package/nstc-g6/components/Form/SelectindialogCustom/install.js +3 -3
- package/nstc-g6/components/Form/TableRadioCustom/demo/index.vue +1 -7
- package/nstc-g6/components/Form/TableRadioCustom/index.vue +17 -26
- package/nstc-g6/components/Form/TextCustom/index.vue +2 -2
- package/nstc-g6/components/Form/UploadCustom/demo/index.vue +1 -3
- package/nstc-g6/components/Form/UploadCustom/index.vue +143 -173
- package/nstc-g6/components/Form/configs.js +3 -14
- package/nstc-g6/components/Form/configsSecond.js +3 -16
- package/nstc-g6/components/Form/index.js +1 -1
- package/nstc-g6/components/Form/payeePersonSelect/index.js +5 -5
- package/nstc-g6/components/Form/payeePersonSelect/src/demo/index.vue +50 -44
- package/nstc-g6/components/Form/payeePersonSelect/src/main.vue +73 -82
- package/nstc-g6/components/FormGroup/index.js +5 -5
- package/nstc-g6/components/FormGroup/src/demo/config.js +18 -19
- package/nstc-g6/components/FormGroup/src/demo/index.vue +14 -22
- package/nstc-g6/components/FormGroup/src/main.vue +122 -141
- package/nstc-g6/components/FormGroup/src/validate.js +11 -13
- package/nstc-g6/components/InputTag/InputTag.vue +78 -111
- package/nstc-g6/components/NstcBackToTop/NstcBackToTop.vue +24 -24
- package/nstc-g6/components/NstcBranchLazyLoad/NstcBranchLazyLoad.vue +4 -13
- package/nstc-g6/components/NstcCharts/NstcCharts.vue +9 -18
- package/nstc-g6/components/NstcCharts/define.js +1 -6
- package/nstc-g6/components/NstcConfirm/NstcConfirm.vue +6 -21
- package/nstc-g6/components/NstcConfirm/index.js +21 -19
- package/nstc-g6/components/NstcDialog/NstcDialog.vue +34 -38
- package/nstc-g6/components/NstcDialogForm/NstcDialogForm.vue +17 -21
- package/nstc-g6/components/NstcDialogTable/NstcDialogTable.vue +4 -17
- package/nstc-g6/components/NstcDropdown/NstcDropdown.vue +2 -12
- package/nstc-g6/components/NstcDropdownTree/NstcDropdownTree.vue +3 -13
- package/nstc-g6/components/NstcElectronicFile/NstcElectronicFile.vue +18 -78
- package/nstc-g6/components/NstcExcelCustomImport/NstcExcelCustomImport.vue +121 -147
- package/nstc-g6/components/NstcExcelImport/NstcExcelImport.vue +9 -31
- package/nstc-g6/components/NstcExcelImportN/NstcExcelImportN.vue +10 -33
- package/nstc-g6/components/NstcExpandCollapse/NstcExpandCollapse.vue +12 -16
- package/nstc-g6/components/NstcFileUpload/NstcFileUpload.vue +19 -75
- package/nstc-g6/components/NstcForm/A_DEMO/component/originalForm.vue +35 -50
- package/nstc-g6/components/NstcForm/A_DEMO/config/config_3.js +1115 -1110
- package/nstc-g6/components/NstcForm/A_DEMO/index.vue +340 -354
- package/nstc-g6/components/NstcForm/AutocompleteCustom/index.vue +2 -2
- package/nstc-g6/components/NstcForm/BusinessSpecific/InputWithUnit.vue +11 -34
- package/nstc-g6/components/NstcForm/BusinessSpecific/SelectTreeDialog.vue +77 -77
- package/nstc-g6/components/NstcForm/CheckboxCustom/index.vue +5 -11
- package/nstc-g6/components/NstcForm/Component.vue +17 -62
- package/nstc-g6/components/NstcForm/ComponentSecond.vue +55 -77
- package/nstc-g6/components/NstcForm/InputAndDialog/NstcInputAndDialog.vue +6 -24
- package/nstc-g6/components/NstcForm/InputCustom/index.vue +2 -8
- package/nstc-g6/components/NstcForm/IntervalInputCustom/index.vue +4 -21
- package/nstc-g6/components/NstcForm/Item.vue +3 -15
- package/nstc-g6/components/NstcForm/ItemSecond.vue +7 -22
- package/nstc-g6/components/NstcForm/List.vue +12 -28
- package/nstc-g6/components/NstcForm/ListSecond.vue +11 -27
- package/nstc-g6/components/NstcForm/RadioCustom/index.vue +5 -23
- package/nstc-g6/components/NstcForm/SelectAccount/NstcSelectAccount.vue +4 -24
- package/nstc-g6/components/NstcForm/SelectAndDialog/NstcSelectAndDialog.vue +7 -30
- package/nstc-g6/components/NstcForm/SelectCashFlow/NstcSelectCashFlow.vue +50 -38
- package/nstc-g6/components/NstcForm/SelectCustom/index.vue +6 -16
- package/nstc-g6/components/NstcForm/SelectSubject/NstcSelectSubject.vue +72 -82
- package/nstc-g6/components/NstcForm/SelectindialogCustom/index.vue +6 -20
- package/nstc-g6/components/NstcForm/TableRadioCustom/index.vue +17 -26
- package/nstc-g6/components/NstcForm/TextCustom/index.vue +2 -2
- package/nstc-g6/components/NstcForm/UploadCustom/index.vue +13 -60
- package/nstc-g6/components/NstcForm/configs.js +3 -14
- package/nstc-g6/components/NstcForm/configsSecond.js +3 -16
- package/nstc-g6/components/NstcForm/index.js +1 -1
- package/nstc-g6/components/NstcForm/payeePersonSelect/NstcPayeePerson.vue +57 -73
- package/nstc-g6/components/NstcPagination/NstcPagination.vue +2 -12
- package/nstc-g6/components/NstcScreenFull/NstcScreenFull.vue +2 -3
- package/nstc-g6/components/NstcSelectTree/NstcSelectTree.vue +4 -15
- package/nstc-g6/components/NstcSelectTreeList/NstcSelectTreeList.vue +5 -20
- package/nstc-g6/components/NstcSticky/NstcSticky.vue +10 -4
- package/nstc-g6/components/NstcSvgIcon/NstcSvgIcon.vue +1 -7
- package/nstc-g6/components/NstcTab/NstcTab.vue +8 -20
- package/nstc-g6/components/NstcTabWithBadge/NstcTabWithBadge.vue +7 -7
- package/nstc-g6/components/NstcTable/ElTableColumnCustom/index.vue +88 -126
- package/nstc-g6/components/NstcTable/NstcTable.vue +4 -17
- package/nstc-g6/components/NstcTableSet/NstcTableSet.vue +27 -72
- package/nstc-g6/components/NstcThemePicker/NstcThemePicker.vue +13 -14
- package/nstc-g6/components/NstcUploadCustomExcel/NstcUploadCustomExcel.vue +3 -13
- package/nstc-g6/components/NstcUploadExcel/NstcUploadExcel.vue +21 -22
- package/nstc-g6/components/NstcWorkBench/NstcWorkBench.vue +4 -17
- package/nstc-g6/components/Search/NstcSearch.vue +12 -47
- package/nstc-g6/components/Search/src/demo/index copy.vue +28 -28
- package/nstc-g6/components/Search/src/demo/index.vue +36 -36
- package/nstc-g6/components/Search/src/main copy.vue +169 -204
- package/nstc-g6/components/approvelTwo/main.vue +2 -6
- package/nstc-g6/components/approvelTwo/progress.vue +7 -29
- package/nstc-g6/directives/VCopy/index.js +52 -54
- package/nstc-g6/directives/VNstcNumber/index.js +1 -1
- package/nstc-g6/directives/VNstcNumber/temp.js +357 -362
- package/nstc-g6/utils/mapper_aims.js +774 -775
- package/nstc-g6/utils/parseTime.js +38 -36
- package/nstc-g6/utils/validate/index.js +2 -2
- package/nstc-g6/utils/vendor/Export2Excel.js +110 -111
- package/nstc-g6/utils/vendor/Export2Zip.js +12 -7
- package/nstc-g6/utils/vue-bus.js +1 -1
- package/package.json +1 -1
- package/src/assets/iconFont/demo_index.html +1 -1
- package/src/assets/iconFont/iconfont.js +66 -1
- package/src/assets/iconFont2/demo_index.html +277 -286
- package/src/assets/iconFont2/iconfont.js +66 -1
- package/src/components/Button/button-group.vue +1 -1
- package/src/components/Layout/HeaderWrap/indexN.vue +1 -1
- package/src/components/Layout/indexN.vue +1 -2
- package/src/components/LoginTemporary/indexN.vue +12 -2
- package/src/components/TableOperateColumn/index.vue +1 -1
- package/src/plugins/Print/print-js/README.md +5 -5
- package/src/plugins/Print/print-js/package.json +2 -2
- package/src/plugins/Print/print-js/src/index.d.ts +36 -36
- package/src/plugins/Print/print-js/src/js/browser.js +3 -1
- package/src/plugins/Print/print-js/src/js/functions.js +16 -10
- package/src/plugins/Print/print-js/src/js/html.js +2 -2
- package/src/plugins/Print/print-js/src/js/image.js +1 -1
- package/src/plugins/Print/print-js/src/js/init.js +15 -7
- package/src/plugins/Print/print-js/src/js/json.js +14 -4
- package/src/plugins/Print/print-js/src/js/modal.js +16 -15
- package/src/plugins/Print/print-js/src/js/pdf.js +1 -1
- package/src/plugins/Print/print-js/src/js/print.js +6 -6
- package/src/plugins/Sign/NetSM3/InfosecNetSignCNGAgent.min.js +1825 -1592
- package/src/plugins/Sign/cfca/index.js +525 -520
- package/src/plugins/Sign/sign.js +128 -128
- package/style/index.css +1 -1
- package/style/index.css.map +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
|
@@ -33,9 +33,7 @@
|
|
|
33
33
|
<el-option v-else :key="JSON.stringify(item.value)" v-bind="item">
|
|
34
34
|
<div v-if="useCustomTemplate === 1">
|
|
35
35
|
<span style="float: left; margin-right: 6px">{{ item.value }}</span>
|
|
36
|
-
<span style="float: right; color: #8492a6; font-size: 13px">{{
|
|
37
|
-
item.label
|
|
38
|
-
}}</span>
|
|
36
|
+
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.label }}</span>
|
|
39
37
|
</div>
|
|
40
38
|
</el-option>
|
|
41
39
|
</template>
|
|
@@ -59,156 +57,156 @@
|
|
|
59
57
|
</template>
|
|
60
58
|
|
|
61
59
|
<script>
|
|
62
|
-
import request from
|
|
60
|
+
import request from '@/utils/request'
|
|
63
61
|
|
|
64
62
|
export default {
|
|
65
|
-
name:
|
|
63
|
+
name: 'SelectCustom',
|
|
66
64
|
|
|
67
65
|
inheritAttrs: false,
|
|
68
66
|
|
|
69
67
|
props: {
|
|
70
68
|
value: {
|
|
71
69
|
type: [String, Number, Boolean, Array, Object],
|
|
72
|
-
default: null
|
|
70
|
+
default: null
|
|
73
71
|
},
|
|
74
72
|
|
|
75
73
|
width: {
|
|
76
74
|
type: [String, Number],
|
|
77
|
-
default:
|
|
75
|
+
default: ''
|
|
78
76
|
},
|
|
79
77
|
|
|
80
78
|
options: {
|
|
81
79
|
type: [Array, String],
|
|
82
|
-
default: () => []
|
|
80
|
+
default: () => []
|
|
83
81
|
},
|
|
84
82
|
|
|
85
83
|
collapseTags: {
|
|
86
84
|
type: Boolean,
|
|
87
|
-
default: true
|
|
85
|
+
default: true
|
|
88
86
|
},
|
|
89
87
|
|
|
90
88
|
remote: {
|
|
91
89
|
type: Boolean,
|
|
92
|
-
default: false
|
|
90
|
+
default: false
|
|
93
91
|
},
|
|
94
92
|
|
|
95
93
|
url: {
|
|
96
94
|
type: String,
|
|
97
|
-
default:
|
|
95
|
+
default: ''
|
|
98
96
|
},
|
|
99
97
|
|
|
100
98
|
multiple: {
|
|
101
99
|
type: Boolean,
|
|
102
|
-
default: false
|
|
100
|
+
default: false
|
|
103
101
|
},
|
|
104
102
|
|
|
105
103
|
filterable: {
|
|
106
104
|
type: Boolean,
|
|
107
|
-
default: false
|
|
105
|
+
default: false
|
|
108
106
|
},
|
|
109
107
|
|
|
110
108
|
allowCreate: {
|
|
111
109
|
type: Boolean,
|
|
112
|
-
default: false
|
|
110
|
+
default: false
|
|
113
111
|
},
|
|
114
112
|
|
|
115
113
|
defaultFirstOption: {
|
|
116
114
|
type: Boolean,
|
|
117
|
-
default: false
|
|
115
|
+
default: false
|
|
118
116
|
},
|
|
119
117
|
|
|
120
118
|
reserveKeyword: {
|
|
121
119
|
type: Boolean,
|
|
122
|
-
default: false
|
|
120
|
+
default: false
|
|
123
121
|
},
|
|
124
122
|
|
|
125
123
|
query: {
|
|
126
124
|
type: String,
|
|
127
|
-
default:
|
|
125
|
+
default: 'query'
|
|
128
126
|
},
|
|
129
127
|
|
|
130
128
|
// 远程搜索的其他参数
|
|
131
129
|
params: {
|
|
132
130
|
type: Object,
|
|
133
|
-
default: () => ({})
|
|
131
|
+
default: () => ({})
|
|
134
132
|
},
|
|
135
133
|
|
|
136
134
|
valueKey: {
|
|
137
135
|
type: String,
|
|
138
|
-
default:
|
|
136
|
+
default: 'value'
|
|
139
137
|
},
|
|
140
138
|
|
|
141
139
|
labelKey: {
|
|
142
140
|
type: String,
|
|
143
|
-
default:
|
|
141
|
+
default: 'label'
|
|
144
142
|
},
|
|
145
143
|
|
|
146
144
|
// 返回的值是不是对象
|
|
147
145
|
optionValueIsObject: {
|
|
148
146
|
type: Boolean,
|
|
149
|
-
default: false
|
|
147
|
+
default: false
|
|
150
148
|
},
|
|
151
149
|
|
|
152
150
|
isSelectChangeValue: {
|
|
153
151
|
type: Boolean,
|
|
154
|
-
default: false
|
|
152
|
+
default: false
|
|
155
153
|
},
|
|
156
154
|
|
|
157
155
|
placeholder: {
|
|
158
156
|
type: String,
|
|
159
157
|
default: function () {
|
|
160
|
-
return
|
|
161
|
-
}
|
|
158
|
+
return '请选择'
|
|
159
|
+
}
|
|
162
160
|
},
|
|
163
161
|
|
|
164
162
|
httpMethod: {
|
|
165
163
|
type: String,
|
|
166
|
-
default:
|
|
164
|
+
default: 'get'
|
|
167
165
|
},
|
|
168
166
|
|
|
169
167
|
queryDataFormatter: {
|
|
170
168
|
type: Function,
|
|
171
169
|
default: (data) => {
|
|
172
|
-
return data
|
|
173
|
-
}
|
|
170
|
+
return data
|
|
171
|
+
}
|
|
174
172
|
},
|
|
175
173
|
|
|
176
174
|
useCustomTemplate: {
|
|
177
175
|
type: Number,
|
|
178
|
-
default: -1
|
|
176
|
+
default: -1
|
|
179
177
|
},
|
|
180
178
|
|
|
181
179
|
template: {
|
|
182
180
|
type: String,
|
|
183
|
-
default:
|
|
181
|
+
default: ''
|
|
184
182
|
},
|
|
185
183
|
|
|
186
184
|
// 是否添加懒加载
|
|
187
185
|
lazyLoad: {
|
|
188
186
|
type: Boolean,
|
|
189
|
-
default: false
|
|
187
|
+
default: false
|
|
190
188
|
},
|
|
191
189
|
|
|
192
190
|
pageMode: {
|
|
193
191
|
type: String,
|
|
194
|
-
default:
|
|
192
|
+
default: 'common' // common 公共模式; special: 特殊模式
|
|
195
193
|
},
|
|
196
194
|
|
|
197
195
|
pageCurrentKey: {
|
|
198
196
|
type: String,
|
|
199
|
-
default:
|
|
197
|
+
default: 'current'
|
|
200
198
|
},
|
|
201
199
|
|
|
202
200
|
pageSizeKey: {
|
|
203
201
|
type: String,
|
|
204
|
-
default:
|
|
202
|
+
default: 'size'
|
|
205
203
|
},
|
|
206
204
|
|
|
207
205
|
pageSize: {
|
|
208
206
|
type: Number,
|
|
209
|
-
default: 20
|
|
207
|
+
default: 20
|
|
210
208
|
},
|
|
211
|
-
|
|
209
|
+
|
|
212
210
|
clearable: {
|
|
213
211
|
type: Boolean,
|
|
214
212
|
default: true
|
|
@@ -221,31 +219,28 @@ export default {
|
|
|
221
219
|
// 是否缓存远程查询option
|
|
222
220
|
isCache: {
|
|
223
221
|
type: Boolean,
|
|
224
|
-
default: false
|
|
222
|
+
default: false
|
|
225
223
|
},
|
|
226
224
|
// 是否初始化请求
|
|
227
225
|
isInitRequest: {
|
|
228
226
|
type: Boolean,
|
|
229
|
-
default: false
|
|
227
|
+
default: false
|
|
230
228
|
}
|
|
231
229
|
},
|
|
232
230
|
|
|
233
231
|
directives: {
|
|
234
|
-
|
|
232
|
+
'nstc-lazy-load': {
|
|
235
233
|
bind(el, binding) {
|
|
236
|
-
const SELECTWRAP_DOM = el.querySelector(
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
const condition =
|
|
241
|
-
this.scrollHeight - this.scrollTop <= this.clientHeight;
|
|
242
|
-
console.log("condition", condition);
|
|
234
|
+
const SELECTWRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap')
|
|
235
|
+
SELECTWRAP_DOM.addEventListener('scroll', function () {
|
|
236
|
+
const condition = this.scrollHeight - this.scrollTop <= this.clientHeight
|
|
237
|
+
console.log('condition', condition)
|
|
243
238
|
if (condition) {
|
|
244
|
-
binding.value()
|
|
239
|
+
binding.value()
|
|
245
240
|
}
|
|
246
|
-
})
|
|
247
|
-
}
|
|
248
|
-
}
|
|
241
|
+
})
|
|
242
|
+
}
|
|
243
|
+
}
|
|
249
244
|
},
|
|
250
245
|
|
|
251
246
|
data() {
|
|
@@ -256,70 +251,69 @@ export default {
|
|
|
256
251
|
remoteOptions: [],
|
|
257
252
|
queryStr: null,
|
|
258
253
|
paginationObj: {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
}
|
|
254
|
+
'page.current': 1,
|
|
255
|
+
'page.size': 20
|
|
256
|
+
}
|
|
257
|
+
}
|
|
263
258
|
},
|
|
264
259
|
created() {
|
|
265
|
-
this.$bus.$on(
|
|
266
|
-
console.log(
|
|
267
|
-
})
|
|
260
|
+
this.$bus.$on('nstc_custom_form_config_update', (formData) => {
|
|
261
|
+
console.log('监听到的全局事件', formData)
|
|
262
|
+
})
|
|
268
263
|
},
|
|
269
264
|
beforeDestroy() {
|
|
270
|
-
this.$bus.$off(
|
|
265
|
+
this.$bus.$off('nstc_custom_form_config_update')
|
|
271
266
|
},
|
|
272
267
|
|
|
273
268
|
computed: {
|
|
274
269
|
_value: {
|
|
275
270
|
get() {
|
|
276
|
-
return this.value
|
|
271
|
+
return this.value
|
|
277
272
|
},
|
|
278
273
|
set(val) {
|
|
279
|
-
this.$emit(
|
|
274
|
+
this.$emit('update:isSelectChangeValue', true)
|
|
280
275
|
|
|
281
276
|
this.$nextTick(() => {
|
|
282
|
-
this.$emit(
|
|
283
|
-
})
|
|
284
|
-
}
|
|
277
|
+
this.$emit('input', val)
|
|
278
|
+
})
|
|
279
|
+
}
|
|
285
280
|
},
|
|
286
281
|
|
|
287
282
|
remoteMethod() {
|
|
288
283
|
return this.remote
|
|
289
284
|
? (query) => {
|
|
290
|
-
this.queryStr = query
|
|
291
|
-
this.remoteOptions = []
|
|
292
|
-
this.getList()
|
|
285
|
+
this.queryStr = query
|
|
286
|
+
this.remoteOptions = []
|
|
287
|
+
this.getList()
|
|
293
288
|
}
|
|
294
|
-
: undefined
|
|
289
|
+
: undefined
|
|
295
290
|
},
|
|
296
291
|
|
|
297
292
|
_options: {
|
|
298
293
|
get() {
|
|
299
294
|
// return this.remote ? this.remoteOptions : this.options;
|
|
300
|
-
|
|
301
|
-
if(this.url) {
|
|
295
|
+
|
|
296
|
+
if (this.url) {
|
|
302
297
|
return this.remoteOptions
|
|
303
|
-
} else{
|
|
304
|
-
if(Array.isArray(this.options)) {
|
|
305
|
-
return this.options
|
|
306
|
-
}else {
|
|
298
|
+
} else {
|
|
299
|
+
if (Array.isArray(this.options)) {
|
|
300
|
+
return this.options
|
|
301
|
+
} else {
|
|
307
302
|
try {
|
|
308
303
|
return JSON.parse(this.options)
|
|
309
304
|
} catch (error) {
|
|
310
|
-
|
|
305
|
+
return []
|
|
311
306
|
}
|
|
312
|
-
|
|
313
|
-
}
|
|
307
|
+
}
|
|
314
308
|
}
|
|
315
309
|
},
|
|
316
310
|
set(val) {
|
|
317
|
-
return val
|
|
318
|
-
}
|
|
319
|
-
}
|
|
311
|
+
return val
|
|
312
|
+
}
|
|
313
|
+
}
|
|
320
314
|
},
|
|
321
315
|
watch: {
|
|
322
|
-
isInitRequest:{
|
|
316
|
+
isInitRequest: {
|
|
323
317
|
handler(val) {
|
|
324
318
|
if (val) {
|
|
325
319
|
this.remoteOptions = []
|
|
@@ -331,8 +325,8 @@ export default {
|
|
|
331
325
|
url: {
|
|
332
326
|
immediate: true,
|
|
333
327
|
handler(val) {
|
|
334
|
-
if(val){
|
|
335
|
-
|
|
328
|
+
if (val) {
|
|
329
|
+
this.getList()
|
|
336
330
|
}
|
|
337
331
|
}
|
|
338
332
|
}
|
|
@@ -343,10 +337,10 @@ export default {
|
|
|
343
337
|
this._value && (this.showIcon = false)
|
|
344
338
|
},
|
|
345
339
|
mouseleave() {
|
|
346
|
-
this.showIcon = true
|
|
340
|
+
this.showIcon = true
|
|
347
341
|
},
|
|
348
342
|
setRemoteOptions(options) {
|
|
349
|
-
this.remoteOptions = options
|
|
343
|
+
this.remoteOptions = options
|
|
350
344
|
},
|
|
351
345
|
|
|
352
346
|
/**
|
|
@@ -354,8 +348,8 @@ export default {
|
|
|
354
348
|
*/
|
|
355
349
|
lazyLoadAction() {
|
|
356
350
|
if (this.lazyLoad) {
|
|
357
|
-
this.paginationObj[
|
|
358
|
-
this.getList()
|
|
351
|
+
this.paginationObj['page.current']++
|
|
352
|
+
this.getList()
|
|
359
353
|
}
|
|
360
354
|
},
|
|
361
355
|
|
|
@@ -363,10 +357,10 @@ export default {
|
|
|
363
357
|
* 获取下拉列表
|
|
364
358
|
*/
|
|
365
359
|
async getList() {
|
|
366
|
-
this.loading = true
|
|
360
|
+
this.loading = true
|
|
367
361
|
try {
|
|
368
362
|
// 构建请求的体
|
|
369
|
-
let key = this.httpMethod.toLowerCase() ===
|
|
363
|
+
let key = this.httpMethod.toLowerCase() === 'post' ? 'data' : 'params'
|
|
370
364
|
// try {
|
|
371
365
|
// if (this.params["unitNo"]) {
|
|
372
366
|
// let User_Info = JSON.parse(sessionStorage.getItem("User_Info"));
|
|
@@ -384,80 +378,76 @@ export default {
|
|
|
384
378
|
// } catch (e) {
|
|
385
379
|
// console.log(e);
|
|
386
380
|
// }
|
|
387
|
-
this._options = []
|
|
388
|
-
let keyParams = this.lazyLoad
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
381
|
+
this._options = []
|
|
382
|
+
let keyParams = this.lazyLoad
|
|
383
|
+
? {
|
|
384
|
+
[this.query]: this.queryStr,
|
|
385
|
+
...this.paginationObj,
|
|
386
|
+
...this.params
|
|
387
|
+
}
|
|
388
|
+
: {
|
|
389
|
+
[this.query]: this.queryStr,
|
|
390
|
+
...this.params
|
|
391
|
+
}
|
|
396
392
|
let remoteOptions = await request({
|
|
397
393
|
url: this.url,
|
|
398
394
|
method: this.httpMethod,
|
|
399
395
|
[key]: keyParams,
|
|
400
|
-
loading: false
|
|
401
|
-
})
|
|
402
|
-
|
|
396
|
+
loading: false
|
|
397
|
+
})
|
|
398
|
+
|
|
403
399
|
console.log(this.resProp, remoteOptions)
|
|
404
400
|
|
|
405
|
-
|
|
406
401
|
if (this.resProp && this.resProp !== '' && this.resProp !== null) {
|
|
407
|
-
remoteOptions = remoteOptions[this.resProp] || remoteOptions
|
|
402
|
+
remoteOptions = remoteOptions[this.resProp] || remoteOptions
|
|
408
403
|
} else {
|
|
409
|
-
remoteOptions = remoteOptions[`list`] || remoteOptions
|
|
404
|
+
remoteOptions = remoteOptions[`list`] || remoteOptions
|
|
410
405
|
}
|
|
411
|
-
|
|
406
|
+
|
|
412
407
|
// remoteOptions = remoteOptions[`list`] || remoteOptions;
|
|
413
408
|
if (!Array.isArray(remoteOptions)) {
|
|
414
|
-
remoteOptions = remoteOptions[Object.keys(remoteOptions)[0]]
|
|
409
|
+
remoteOptions = remoteOptions[Object.keys(remoteOptions)[0]]
|
|
415
410
|
}
|
|
416
411
|
// 返回数据格式化
|
|
417
|
-
this.queryDataFormatter &&
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
console.log(this.remoteOptions);
|
|
412
|
+
this.queryDataFormatter && (remoteOptions = await this.queryDataFormatter(remoteOptions))
|
|
413
|
+
console.log(remoteOptions, 'remoteOptions', this.remoteOptions)
|
|
414
|
+
!remoteOptions.length && (this.remoteOptions = []) //未查出数据,需要把下拉值置空
|
|
415
|
+
console.log(this.remoteOptions)
|
|
422
416
|
if (this.lazyLoad) {
|
|
423
417
|
const temp = remoteOptions.map((item) => {
|
|
424
|
-
const label = item[this.labelKey ? this.labelKey :
|
|
425
|
-
const value = item[this.valueKey ? this.valueKey :
|
|
418
|
+
const label = item[this.labelKey ? this.labelKey : 'label']
|
|
419
|
+
const value = item[this.valueKey ? this.valueKey : 'value']
|
|
426
420
|
return {
|
|
427
|
-
value: this.optionValueIsObject
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
});
|
|
433
|
-
this.remoteOptions = this.remoteOptions.concat(temp);
|
|
421
|
+
value: this.optionValueIsObject ? { ...item, label, value } : value,
|
|
422
|
+
label
|
|
423
|
+
}
|
|
424
|
+
})
|
|
425
|
+
this.remoteOptions = this.remoteOptions.concat(temp)
|
|
434
426
|
} else {
|
|
435
427
|
this.remoteOptions = remoteOptions.map((item) => {
|
|
436
|
-
const label = item[this.labelKey ? this.labelKey :
|
|
437
|
-
const value = item[this.valueKey ? this.valueKey :
|
|
428
|
+
const label = item[this.labelKey ? this.labelKey : 'label']
|
|
429
|
+
const value = item[this.valueKey ? this.valueKey : 'value']
|
|
438
430
|
return {
|
|
439
|
-
value: this.optionValueIsObject
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
};
|
|
444
|
-
});
|
|
431
|
+
value: this.optionValueIsObject ? { ...item, label, value } : value,
|
|
432
|
+
label
|
|
433
|
+
}
|
|
434
|
+
})
|
|
445
435
|
}
|
|
446
436
|
} catch (err) {
|
|
447
|
-
console.error(err)
|
|
437
|
+
console.error(err)
|
|
448
438
|
} finally {
|
|
449
|
-
this.loading = false
|
|
439
|
+
this.loading = false
|
|
450
440
|
}
|
|
451
441
|
},
|
|
452
442
|
visibleChange(val) {
|
|
453
|
-
this.showUp = val
|
|
443
|
+
this.showUp = val
|
|
454
444
|
},
|
|
455
445
|
/**
|
|
456
446
|
* 失去焦点
|
|
457
447
|
*/
|
|
458
448
|
selectBlur() {
|
|
459
449
|
if (this.lazyLoad) {
|
|
460
|
-
this.paginationObj[
|
|
450
|
+
this.paginationObj['page.current']++
|
|
461
451
|
}
|
|
462
452
|
},
|
|
463
453
|
|
|
@@ -465,17 +455,17 @@ export default {
|
|
|
465
455
|
* 获取焦点
|
|
466
456
|
*/
|
|
467
457
|
selectFocus() {
|
|
468
|
-
this.queryStr = null
|
|
458
|
+
this.queryStr = null
|
|
469
459
|
if (!this.isCache && this.url && this._options.length < 1) {
|
|
470
|
-
this.remoteOptions = []
|
|
471
|
-
this.getList()
|
|
472
|
-
}else
|
|
473
|
-
this.remoteOptions = []
|
|
474
|
-
this.getList()
|
|
460
|
+
this.remoteOptions = []
|
|
461
|
+
this.getList()
|
|
462
|
+
} else if (this.isCache && this.url) {
|
|
463
|
+
this.remoteOptions = []
|
|
464
|
+
this.getList()
|
|
475
465
|
}
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
479
469
|
</script>
|
|
480
470
|
|
|
481
471
|
<style scoped>
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* @Description: 科目输入弹窗
|
|
7
7
|
* @FilePath: \nstc_g6_common\packages\Form\NstcSelectSubject\index.js
|
|
8
8
|
*/
|
|
9
|
-
import NstcSelectSubject from
|
|
9
|
+
import NstcSelectSubject from './src/main.vue'
|
|
10
10
|
|
|
11
|
-
NstcSelectSubject.install = function(Vue) {
|
|
12
|
-
Vue.component(NstcSelectSubject.name, NstcSelectSubject)
|
|
13
|
-
}
|
|
11
|
+
NstcSelectSubject.install = function (Vue) {
|
|
12
|
+
Vue.component(NstcSelectSubject.name, NstcSelectSubject)
|
|
13
|
+
}
|
|
14
14
|
|
|
15
|
-
export default NstcSelectSubject
|
|
15
|
+
export default NstcSelectSubject
|
|
@@ -9,77 +9,71 @@
|
|
|
9
9
|
<template>
|
|
10
10
|
<div>
|
|
11
11
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="ruleFrom">
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
</el-select>
|
|
27
|
-
</el-form-item>
|
|
28
|
-
<el-form-item label="科目" prop="subjectNo">
|
|
29
|
-
<NstcSelectSubject v-model="ruleForm.subjectNo" :query-conf="subjectConf" />
|
|
30
|
-
</el-form-item>
|
|
12
|
+
<el-form-item label="机构" prop="brNo">
|
|
13
|
+
<el-select
|
|
14
|
+
v-model="ruleForm.brNo"
|
|
15
|
+
:placeholder="$t('set_c_0006')"
|
|
16
|
+
filterable
|
|
17
|
+
clearable
|
|
18
|
+
@change="handleBranchChange"
|
|
19
|
+
>
|
|
20
|
+
<el-option v-for="item in brNoArr" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
21
|
+
</el-select>
|
|
22
|
+
</el-form-item>
|
|
23
|
+
<el-form-item label="科目" prop="subjectNo">
|
|
24
|
+
<NstcSelectSubject v-model="ruleForm.subjectNo" :query-conf="subjectConf" />
|
|
25
|
+
</el-form-item>
|
|
31
26
|
</el-form>
|
|
32
27
|
</div>
|
|
33
28
|
</template>
|
|
34
29
|
|
|
35
30
|
<script>
|
|
36
|
-
import NstcSelectSubject from
|
|
31
|
+
import NstcSelectSubject from '../main.vue'
|
|
37
32
|
export default {
|
|
38
33
|
components: { NstcSelectSubject },
|
|
39
34
|
data() {
|
|
40
35
|
return {
|
|
41
|
-
subject:
|
|
36
|
+
subject: '',
|
|
42
37
|
subjectConf: {
|
|
43
|
-
url:
|
|
44
|
-
method:
|
|
38
|
+
url: 'http://192.168.20.109:8080/api/nstc-tss/1.0/remote/list',
|
|
39
|
+
method: 'POST',
|
|
45
40
|
defaultParam: {
|
|
46
|
-
brNo:
|
|
41
|
+
brNo: '',
|
|
47
42
|
yr: new Date().getFullYear()
|
|
48
43
|
}
|
|
49
44
|
},
|
|
50
45
|
brNoArr: [
|
|
51
|
-
{value: '001', label:
|
|
52
|
-
{value: '000111', label:
|
|
53
|
-
{value: '999888', label:
|
|
54
|
-
{value: '100001', label:
|
|
46
|
+
{ value: '001', label: '总部' },
|
|
47
|
+
{ value: '000111', label: '九恒星' },
|
|
48
|
+
{ value: '999888', label: 'wsl' },
|
|
49
|
+
{ value: '100001', label: '总部24' }
|
|
55
50
|
],
|
|
56
51
|
labelconf: {
|
|
57
|
-
title:
|
|
58
|
-
plcInput:
|
|
59
|
-
plcSelect:
|
|
60
|
-
noselectmsg:
|
|
61
|
-
subjectNoLabel:
|
|
62
|
-
subjectNameLabel:
|
|
63
|
-
balanceDirectionlabel:
|
|
52
|
+
title: '选择科目',
|
|
53
|
+
plcInput: '请输入',
|
|
54
|
+
plcSelect: '请选择',
|
|
55
|
+
noselectmsg: '请选择科目',
|
|
56
|
+
subjectNoLabel: '科目编号',
|
|
57
|
+
subjectNameLabel: '科目名称',
|
|
58
|
+
balanceDirectionlabel: '余额方向'
|
|
64
59
|
},
|
|
65
60
|
ruleForm: {
|
|
66
|
-
brNo:
|
|
67
|
-
subjectNo:
|
|
61
|
+
brNo: '',
|
|
62
|
+
subjectNo: ''
|
|
68
63
|
}
|
|
69
|
-
}
|
|
64
|
+
}
|
|
70
65
|
},
|
|
71
66
|
methods: {
|
|
72
67
|
input(val) {
|
|
73
|
-
console.log(val,
|
|
74
|
-
}
|
|
68
|
+
console.log(val, '0000')
|
|
69
|
+
}, // 开户机构change
|
|
75
70
|
async handleBranchChange(data) {
|
|
76
|
-
this.subjectConf.defaultParam.brNo = data
|
|
77
|
-
console.log(this.subjectConf.defaultParam.brNo,'this.subjectConf.defaultParam.brNo')
|
|
78
|
-
this.ruleForm.subjectNo =
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
71
|
+
this.subjectConf.defaultParam.brNo = data
|
|
72
|
+
console.log(this.subjectConf.defaultParam.brNo, 'this.subjectConf.defaultParam.brNo')
|
|
73
|
+
this.ruleForm.subjectNo = ''
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
82
77
|
</script>
|
|
83
78
|
|
|
84
|
-
<style>
|
|
85
|
-
</style>
|
|
79
|
+
<style></style>
|