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
|
@@ -30,14 +30,8 @@
|
|
|
30
30
|
@click="!disabled && (dialogVisible = true) && handleSelectClick()"
|
|
31
31
|
/>
|
|
32
32
|
</div>
|
|
33
|
-
<div
|
|
34
|
-
|
|
35
|
-
class="select-in-dialog-result"
|
|
36
|
-
@click="!disabled && (dialogVisible = true) && handleSelectClick()"
|
|
37
|
-
>
|
|
38
|
-
<span :class="{ 'select-in-dialog-result-null': !resultLabel }">{{
|
|
39
|
-
resultLabel || $t("common_w_0018")
|
|
40
|
-
}}</span>
|
|
33
|
+
<div v-else class="select-in-dialog-result" @click="!disabled && (dialogVisible = true) && handleSelectClick()">
|
|
34
|
+
<span :class="{ 'select-in-dialog-result-null': !resultLabel }">{{ resultLabel || $t('common_w_0018') }}</span>
|
|
41
35
|
<el-button
|
|
42
36
|
v-if="clearable && !disabled && hasValue"
|
|
43
37
|
type="text"
|
|
@@ -90,182 +84,182 @@
|
|
|
90
84
|
</template>
|
|
91
85
|
|
|
92
86
|
<script>
|
|
93
|
-
import DialogCustom from
|
|
94
|
-
import TableRadioCustom from
|
|
95
|
-
import SelectCustom from
|
|
96
|
-
import NstcFormDialog from
|
|
97
|
-
import variables from
|
|
87
|
+
import DialogCustom from '^/Dialog/src/main'
|
|
88
|
+
import TableRadioCustom from '../TableRadioCustom/index'
|
|
89
|
+
import SelectCustom from '../SelectCustom/index'
|
|
90
|
+
import NstcFormDialog from '../ComponentSecond'
|
|
91
|
+
import variables from '@/theme/theme1/styles/variables.scss'
|
|
98
92
|
|
|
99
|
-
import request from
|
|
93
|
+
import request from '@/utils/request'
|
|
100
94
|
|
|
101
95
|
export default {
|
|
102
|
-
name:
|
|
96
|
+
name: 'NstcSelectInDialog',
|
|
103
97
|
|
|
104
98
|
components: {
|
|
105
99
|
DialogCustom,
|
|
106
100
|
TableRadioCustom,
|
|
107
101
|
SelectCustom,
|
|
108
|
-
NstcFormDialog
|
|
102
|
+
NstcFormDialog
|
|
109
103
|
},
|
|
110
104
|
|
|
111
105
|
props: {
|
|
112
106
|
// 双向绑定值,单选时为{ [valueKey]: 'xxx', [labelKey]: 'xxx' },多选时为[{ [valueKey]: 'xxx', [labelKey]: 'xxx' }, { [valueKey]: 'xxx', [labelKey]: 'xxx' },...]
|
|
113
107
|
value: {
|
|
114
108
|
type: [Object, Array, String],
|
|
115
|
-
default: null
|
|
109
|
+
default: null
|
|
116
110
|
},
|
|
117
111
|
|
|
118
112
|
width: {
|
|
119
113
|
type: [Number, String],
|
|
120
|
-
default: variables.formItemDefaultWidth
|
|
114
|
+
default: variables.formItemDefaultWidth
|
|
121
115
|
},
|
|
122
116
|
|
|
123
117
|
// 是否多选
|
|
124
118
|
multiple: {
|
|
125
119
|
type: Boolean,
|
|
126
|
-
default: false
|
|
120
|
+
default: false
|
|
127
121
|
},
|
|
128
122
|
|
|
129
123
|
// 是否可清空
|
|
130
124
|
clearable: {
|
|
131
125
|
type: Boolean,
|
|
132
|
-
default: false
|
|
126
|
+
default: false
|
|
133
127
|
},
|
|
134
128
|
|
|
135
129
|
// 是否禁用
|
|
136
130
|
disabled: {
|
|
137
131
|
type: Boolean,
|
|
138
|
-
default: false
|
|
132
|
+
default: false
|
|
139
133
|
},
|
|
140
134
|
|
|
141
135
|
// 弹窗标题
|
|
142
136
|
title: {
|
|
143
137
|
type: String,
|
|
144
|
-
default:
|
|
138
|
+
default: ''
|
|
145
139
|
},
|
|
146
140
|
|
|
147
141
|
// 弹窗表单配置项
|
|
148
142
|
formConfig: {
|
|
149
143
|
type: Array,
|
|
150
|
-
default: () => []
|
|
144
|
+
default: () => []
|
|
151
145
|
},
|
|
152
146
|
|
|
153
147
|
formLabelWidth: {
|
|
154
|
-
default:
|
|
155
|
-
type: [String, Number]
|
|
148
|
+
default: '80px',
|
|
149
|
+
type: [String, Number]
|
|
156
150
|
},
|
|
157
151
|
|
|
158
152
|
// 弹窗表单请求的url
|
|
159
153
|
url: {
|
|
160
154
|
type: String,
|
|
161
|
-
default:
|
|
155
|
+
default: ''
|
|
162
156
|
},
|
|
163
157
|
|
|
164
158
|
// 弹窗表格列配置
|
|
165
159
|
columns: {
|
|
166
160
|
type: Array,
|
|
167
|
-
default: () => []
|
|
161
|
+
default: () => []
|
|
168
162
|
},
|
|
169
163
|
|
|
170
164
|
// 双向绑定值的valueKey,需对应到表格行数据的某个属性
|
|
171
165
|
valueKey: {
|
|
172
166
|
type: String,
|
|
173
|
-
default:
|
|
167
|
+
default: 'key'
|
|
174
168
|
},
|
|
175
169
|
|
|
176
170
|
// 双向绑定值的labelKey,需对应到表格行数据的某个属性
|
|
177
171
|
labelKey: {
|
|
178
172
|
type: String,
|
|
179
|
-
default:
|
|
173
|
+
default: ''
|
|
180
174
|
},
|
|
181
175
|
|
|
182
176
|
// 对请求参数的格式化
|
|
183
177
|
queryParamFormatter: {
|
|
184
178
|
type: Function,
|
|
185
|
-
default: undefined
|
|
179
|
+
default: undefined
|
|
186
180
|
},
|
|
187
181
|
|
|
188
182
|
// 对请求返回数据的格式化
|
|
189
183
|
queryDataFormatter: {
|
|
190
184
|
type: Function,
|
|
191
|
-
default: undefined
|
|
185
|
+
default: undefined
|
|
192
186
|
},
|
|
193
187
|
|
|
194
188
|
// 分页器是否展示
|
|
195
189
|
showPagination: {
|
|
196
190
|
default: false,
|
|
197
|
-
type: Boolean
|
|
191
|
+
type: Boolean
|
|
198
192
|
},
|
|
199
193
|
|
|
200
194
|
// 是否支持远程搜索
|
|
201
195
|
remote: {
|
|
202
196
|
type: Boolean,
|
|
203
|
-
default: false
|
|
197
|
+
default: false
|
|
204
198
|
},
|
|
205
199
|
|
|
206
200
|
// 远程搜索传参的key
|
|
207
201
|
query: {
|
|
208
202
|
type: String,
|
|
209
|
-
default:
|
|
203
|
+
default: 'query'
|
|
210
204
|
},
|
|
211
205
|
|
|
212
206
|
// 远程搜索的其他参数
|
|
213
207
|
queryParams: {
|
|
214
208
|
type: Object,
|
|
215
|
-
default: () => ({})
|
|
209
|
+
default: () => ({})
|
|
216
210
|
},
|
|
217
211
|
|
|
218
212
|
placeholder: {
|
|
219
213
|
type: String,
|
|
220
214
|
default: function () {
|
|
221
|
-
return
|
|
222
|
-
}
|
|
215
|
+
return '请选择'
|
|
216
|
+
}
|
|
223
217
|
},
|
|
224
218
|
|
|
225
219
|
// 如果该标志设置为true, 将缓存查询结果
|
|
226
220
|
cache: {
|
|
227
221
|
type: Boolean,
|
|
228
|
-
default: false
|
|
222
|
+
default: false
|
|
229
223
|
},
|
|
230
224
|
|
|
231
225
|
// 接收外部组件传来的表单默认值 (特殊)
|
|
232
226
|
account: {
|
|
233
227
|
type: String,
|
|
234
|
-
default:
|
|
228
|
+
default: ''
|
|
235
229
|
},
|
|
236
230
|
|
|
237
231
|
// 弹框宽度
|
|
238
232
|
dialogWidth: {
|
|
239
233
|
type: String,
|
|
240
|
-
default:
|
|
234
|
+
default: ''
|
|
241
235
|
},
|
|
242
236
|
|
|
243
237
|
// 请求方式
|
|
244
238
|
httpMethod: {
|
|
245
239
|
type: String,
|
|
246
|
-
default:
|
|
240
|
+
default: 'post'
|
|
247
241
|
},
|
|
248
242
|
|
|
249
243
|
// 是否使用原始查询表单
|
|
250
244
|
originalForm: {
|
|
251
245
|
type: Boolean,
|
|
252
|
-
default: true
|
|
246
|
+
default: true
|
|
253
247
|
},
|
|
254
248
|
|
|
255
249
|
// 是否使用原始表格
|
|
256
250
|
originalTable: {
|
|
257
251
|
type: Boolean,
|
|
258
|
-
default: true
|
|
252
|
+
default: true
|
|
259
253
|
},
|
|
260
254
|
optionValueIsObject: {
|
|
261
255
|
type: Boolean,
|
|
262
|
-
default: false
|
|
256
|
+
default: false
|
|
263
257
|
},
|
|
264
258
|
// 表格数据选择的key
|
|
265
259
|
tableDataKey: {
|
|
266
260
|
type: String,
|
|
267
|
-
default: null
|
|
268
|
-
}
|
|
261
|
+
default: null
|
|
262
|
+
}
|
|
269
263
|
},
|
|
270
264
|
|
|
271
265
|
data() {
|
|
@@ -282,25 +276,25 @@ export default {
|
|
|
282
276
|
pagination: {
|
|
283
277
|
page: 1,
|
|
284
278
|
limit: 20,
|
|
285
|
-
total: 0
|
|
279
|
+
total: 0
|
|
286
280
|
},
|
|
287
281
|
|
|
288
282
|
multipleSelected: [],
|
|
289
283
|
footerHandlers: {
|
|
290
284
|
confirm: {
|
|
291
|
-
text:
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
285
|
+
text: '确认'
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
295
289
|
},
|
|
296
290
|
|
|
297
291
|
computed: {
|
|
298
292
|
resultLabel() {
|
|
299
293
|
return this.value
|
|
300
294
|
? this.multiple
|
|
301
|
-
? this.value.map((item) => item[this.labelKey]).join(
|
|
302
|
-
: this.value[this.labelKey] ||
|
|
303
|
-
:
|
|
295
|
+
? this.value.map((item) => item[this.labelKey]).join(',')
|
|
296
|
+
: this.value[this.labelKey] || ''
|
|
297
|
+
: ''
|
|
304
298
|
},
|
|
305
299
|
|
|
306
300
|
_formConfig() {
|
|
@@ -308,30 +302,30 @@ export default {
|
|
|
308
302
|
if (Array.isArray(item)) {
|
|
309
303
|
return item.map((cItem) => ({
|
|
310
304
|
...cItem,
|
|
311
|
-
clearable: true
|
|
312
|
-
}))
|
|
305
|
+
clearable: true
|
|
306
|
+
}))
|
|
313
307
|
}
|
|
314
308
|
|
|
315
309
|
return {
|
|
316
310
|
...item,
|
|
317
|
-
clearable: true
|
|
318
|
-
}
|
|
319
|
-
})
|
|
311
|
+
clearable: true
|
|
312
|
+
}
|
|
313
|
+
})
|
|
320
314
|
|
|
321
315
|
if (_formConfig[0] && _formConfig[0][0]) {
|
|
322
|
-
return [..._formConfig, [{ mold:
|
|
316
|
+
return [..._formConfig, [{ mold: 'querybutton' }]]
|
|
323
317
|
}
|
|
324
318
|
|
|
325
|
-
return [..._formConfig, { mold:
|
|
319
|
+
return [..._formConfig, { mold: 'querybutton' }]
|
|
326
320
|
},
|
|
327
321
|
|
|
328
322
|
_value: {
|
|
329
323
|
get() {
|
|
330
|
-
return this.value
|
|
324
|
+
return this.value
|
|
331
325
|
},
|
|
332
326
|
set(val) {
|
|
333
|
-
const _val = val ===
|
|
334
|
-
this.$emit(
|
|
327
|
+
const _val = val === '' ? null : val // 避免单选时el-select清空时将_value设为'',导致value的type校验错误
|
|
328
|
+
this.$emit('input', _val)
|
|
335
329
|
|
|
336
330
|
// let parent = this.$parent || this.$root
|
|
337
331
|
// let name = parent.$options.componentName
|
|
@@ -347,14 +341,12 @@ export default {
|
|
|
347
341
|
// if (parent) {
|
|
348
342
|
// parent.$emit.apply(parent, ['el.form.change'].concat([value]))
|
|
349
343
|
// }
|
|
350
|
-
}
|
|
344
|
+
}
|
|
351
345
|
},
|
|
352
346
|
|
|
353
347
|
hasValue() {
|
|
354
|
-
return this.multiple
|
|
355
|
-
|
|
356
|
-
: this._value || this._value === 0;
|
|
357
|
-
},
|
|
348
|
+
return this.multiple ? this._value && this._value.length : this._value || this._value === 0
|
|
349
|
+
}
|
|
358
350
|
},
|
|
359
351
|
|
|
360
352
|
watch: {
|
|
@@ -362,123 +354,117 @@ export default {
|
|
|
362
354
|
deep: true,
|
|
363
355
|
handler(val) {
|
|
364
356
|
if (this.isSelectChangeValue) {
|
|
365
|
-
this.isSelectChangeValue = false
|
|
357
|
+
this.isSelectChangeValue = false
|
|
366
358
|
} else {
|
|
367
|
-
this.setSelectOptions(val)
|
|
359
|
+
this.setSelectOptions(val)
|
|
368
360
|
}
|
|
369
|
-
}
|
|
361
|
+
}
|
|
370
362
|
},
|
|
371
363
|
|
|
372
364
|
dialogVisible(val) {
|
|
373
365
|
if (this.$refs.formCustom) {
|
|
374
|
-
this.$refs.formCustom.resetFields()
|
|
366
|
+
this.$refs.formCustom.resetFields()
|
|
375
367
|
}
|
|
376
368
|
|
|
377
|
-
const init =
|
|
378
|
-
|
|
379
|
-
const query = init || !this.cache; // 不需要缓存
|
|
369
|
+
const init = (!this.formConfig || !this.formConfig.length) && !this.hasInit // 未初始化
|
|
370
|
+
const query = init || !this.cache // 不需要缓存
|
|
380
371
|
if (query && val) {
|
|
381
|
-
this.handleQuery()
|
|
372
|
+
this.handleQuery()
|
|
382
373
|
}
|
|
383
|
-
}
|
|
374
|
+
}
|
|
384
375
|
},
|
|
385
376
|
|
|
386
377
|
mounted() {
|
|
387
|
-
this.setSelectOptions(this.value)
|
|
378
|
+
this.setSelectOptions(this.value)
|
|
388
379
|
},
|
|
389
380
|
|
|
390
381
|
methods: {
|
|
391
382
|
handleClear() {
|
|
392
383
|
this.$nextTick(() => {
|
|
393
|
-
this._value = this.multiple ? [] : null
|
|
394
|
-
})
|
|
384
|
+
this._value = this.multiple ? [] : null
|
|
385
|
+
})
|
|
395
386
|
},
|
|
396
387
|
|
|
397
388
|
async handleQuery(model, initPage = true) {
|
|
398
|
-
console.log(
|
|
389
|
+
console.log('initPage', initPage, this.loading)
|
|
399
390
|
if (this.loading) {
|
|
400
|
-
return
|
|
391
|
+
return ''
|
|
401
392
|
}
|
|
402
|
-
this.loading = true
|
|
403
|
-
console.log(
|
|
404
|
-
this.pagination.page = initPage.page || 1
|
|
393
|
+
this.loading = true
|
|
394
|
+
console.log('__log_err', 11)
|
|
395
|
+
this.pagination.page = initPage.page || 1
|
|
405
396
|
try {
|
|
406
397
|
let param = {
|
|
407
|
-
...this.queryParams
|
|
408
|
-
}
|
|
398
|
+
...this.queryParams
|
|
399
|
+
}
|
|
409
400
|
|
|
410
401
|
if (this.queryParamFormatter && model) {
|
|
411
|
-
const formatParam = await this.queryParamFormatter(
|
|
412
|
-
model,
|
|
413
|
-
this.pagination
|
|
414
|
-
);
|
|
402
|
+
const formatParam = await this.queryParamFormatter(model, this.pagination)
|
|
415
403
|
|
|
416
404
|
param = {
|
|
417
405
|
...param,
|
|
418
|
-
...formatParam
|
|
419
|
-
}
|
|
406
|
+
...formatParam
|
|
407
|
+
}
|
|
420
408
|
// 如果没有分页
|
|
421
|
-
!param.pagination && (param.pagination = this.pagination)
|
|
409
|
+
!param.pagination && (param.pagination = this.pagination)
|
|
422
410
|
} else {
|
|
423
411
|
if (this.showPagination) {
|
|
424
412
|
param = {
|
|
425
413
|
...param,
|
|
426
414
|
...model,
|
|
427
|
-
pagination: this.pagination
|
|
428
|
-
}
|
|
415
|
+
pagination: this.pagination
|
|
416
|
+
}
|
|
429
417
|
} else {
|
|
430
418
|
param = {
|
|
431
419
|
...param,
|
|
432
|
-
...model
|
|
433
|
-
}
|
|
420
|
+
...model
|
|
421
|
+
}
|
|
434
422
|
}
|
|
435
423
|
}
|
|
436
|
-
console.log(
|
|
424
|
+
console.log('查询参数', param)
|
|
437
425
|
|
|
438
|
-
const key = this.httpMethod ===
|
|
439
|
-
if (this.httpMethod ===
|
|
440
|
-
param[
|
|
441
|
-
param[
|
|
442
|
-
delete param.pagination
|
|
426
|
+
const key = this.httpMethod === 'get' ? 'params' : 'data'
|
|
427
|
+
if (this.httpMethod === 'get' && param.pagination) {
|
|
428
|
+
param['page.current'] = param.pagination.page
|
|
429
|
+
param['page.size'] = param.pagination.limit
|
|
430
|
+
delete param.pagination
|
|
443
431
|
}
|
|
444
|
-
let res = []
|
|
432
|
+
let res = []
|
|
445
433
|
await request({
|
|
446
434
|
url: this.url,
|
|
447
435
|
method: this.httpMethod,
|
|
448
|
-
[key]: param
|
|
436
|
+
[key]: param
|
|
449
437
|
})
|
|
450
438
|
.then((data) => {
|
|
451
|
-
res = data
|
|
452
|
-
this.loading = false
|
|
453
|
-
console.log(
|
|
439
|
+
res = data
|
|
440
|
+
this.loading = false
|
|
441
|
+
console.log('__log_返回数据', data)
|
|
454
442
|
})
|
|
455
443
|
.catch(() => {
|
|
456
|
-
this.loading = false
|
|
457
|
-
})
|
|
444
|
+
this.loading = false
|
|
445
|
+
})
|
|
458
446
|
|
|
459
|
-
let tableData = res.list || res
|
|
447
|
+
let tableData = res.list || res
|
|
460
448
|
|
|
461
449
|
if (this.tableDataKey) {
|
|
462
|
-
tableData = tableData[this.tableDataKey]
|
|
450
|
+
tableData = tableData[this.tableDataKey]
|
|
463
451
|
}
|
|
464
452
|
|
|
465
453
|
// 后台报错时
|
|
466
454
|
if (!(tableData instanceof Array)) {
|
|
467
|
-
tableData = []
|
|
455
|
+
tableData = []
|
|
468
456
|
}
|
|
469
457
|
|
|
470
|
-
this.tableData = this.queryDataFormatter
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
this.hasInit = true;
|
|
474
|
-
this.loading = false;
|
|
458
|
+
this.tableData = this.queryDataFormatter ? await this.queryDataFormatter(tableData) : tableData
|
|
459
|
+
this.hasInit = true
|
|
460
|
+
this.loading = false
|
|
475
461
|
|
|
476
462
|
if (this.showPagination) {
|
|
477
|
-
this.pagination.total = res.total
|
|
463
|
+
this.pagination.total = res.total
|
|
478
464
|
}
|
|
479
465
|
} catch (err) {
|
|
480
|
-
this.loading = false
|
|
481
|
-
console.error(err)
|
|
466
|
+
this.loading = false
|
|
467
|
+
console.error(err)
|
|
482
468
|
}
|
|
483
469
|
},
|
|
484
470
|
|
|
@@ -486,58 +472,58 @@ export default {
|
|
|
486
472
|
this.$nextTick(() => {
|
|
487
473
|
this.$refs.formCustom.handleExpectQuery({
|
|
488
474
|
initPage: page === 1,
|
|
489
|
-
page
|
|
490
|
-
})
|
|
491
|
-
})
|
|
475
|
+
page
|
|
476
|
+
})
|
|
477
|
+
})
|
|
492
478
|
},
|
|
493
479
|
|
|
494
480
|
setSelectOptions(val) {
|
|
495
481
|
if (this.remote && val) {
|
|
496
|
-
let options
|
|
482
|
+
let options
|
|
497
483
|
|
|
498
484
|
if (this.multiple) {
|
|
499
485
|
options = val.map((item) => {
|
|
500
486
|
return {
|
|
501
487
|
label: item[this.labelKey],
|
|
502
|
-
value: item
|
|
503
|
-
}
|
|
504
|
-
})
|
|
488
|
+
value: item
|
|
489
|
+
}
|
|
490
|
+
})
|
|
505
491
|
} else {
|
|
506
492
|
options = [
|
|
507
493
|
{
|
|
508
494
|
label: val[this.labelKey],
|
|
509
|
-
value: val
|
|
510
|
-
}
|
|
511
|
-
]
|
|
495
|
+
value: val
|
|
496
|
+
}
|
|
497
|
+
]
|
|
512
498
|
}
|
|
513
499
|
|
|
514
|
-
this.$refs.selectCustom.setRemoteOptions(options)
|
|
500
|
+
this.$refs.selectCustom.setRemoteOptions(options)
|
|
515
501
|
}
|
|
516
502
|
},
|
|
517
503
|
|
|
518
504
|
handleMultipleChange(val) {
|
|
519
|
-
this.multipleSelected = val
|
|
505
|
+
this.multipleSelected = val
|
|
520
506
|
},
|
|
521
507
|
|
|
522
508
|
handleMultipleConfirm() {
|
|
523
|
-
this._value = this.multipleSelected
|
|
509
|
+
this._value = this.multipleSelected
|
|
524
510
|
},
|
|
525
511
|
|
|
526
512
|
async handleSelectClick() {
|
|
527
513
|
if (this.account) {
|
|
528
|
-
this._formConfig[0].default = this.account
|
|
529
|
-
this._formConfig[1].default = null
|
|
514
|
+
this._formConfig[0].default = this.account
|
|
515
|
+
this._formConfig[1].default = null
|
|
530
516
|
}
|
|
531
517
|
},
|
|
532
518
|
|
|
533
519
|
handleTableChange({ recordId, ...val }) {
|
|
534
|
-
this.dialogVisible = false
|
|
520
|
+
this.dialogVisible = false
|
|
535
521
|
// console.log(recordId, val)
|
|
536
|
-
this.$emit(
|
|
537
|
-
this.$emit(
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
}
|
|
522
|
+
this.$emit('recordId-change', { recordId })
|
|
523
|
+
this.$emit('selectindialog-change', val)
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
541
527
|
</script>
|
|
542
528
|
|
|
543
529
|
<style lang="scss">
|
|
@@ -631,14 +617,13 @@ export default {
|
|
|
631
617
|
}
|
|
632
618
|
.select-in-dialog-result {
|
|
633
619
|
height: 32px;
|
|
634
|
-
.el-select .el-tag__close{
|
|
620
|
+
.el-select .el-tag__close {
|
|
635
621
|
font-size: 14px;
|
|
636
622
|
&::before {
|
|
637
623
|
transform: none;
|
|
638
|
-
|
|
624
|
+
color: #fff;
|
|
639
625
|
}
|
|
640
|
-
|
|
641
|
-
}
|
|
626
|
+
}
|
|
642
627
|
}
|
|
643
628
|
.form-base-wrapper {
|
|
644
629
|
display: flex;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import NstcSelectInDialog from './index.vue'
|
|
2
2
|
|
|
3
|
-
NstcSelectInDialog.install = function(Vue) {
|
|
4
|
-
|
|
3
|
+
NstcSelectInDialog.install = function (Vue) {
|
|
4
|
+
Vue.component(NstcSelectInDialog.name, NstcSelectInDialog)
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export default NstcSelectInDialog
|
|
7
|
+
export default NstcSelectInDialog
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<TableRadioCustom
|
|
3
|
-
v-model="value"
|
|
4
|
-
:columns="columns"
|
|
5
|
-
:data="data"
|
|
6
|
-
value-key="prop1"
|
|
7
|
-
@change="handleChange"
|
|
8
|
-
/>
|
|
2
|
+
<TableRadioCustom v-model="value" :columns="columns" :data="data" value-key="prop1" @change="handleChange" />
|
|
9
3
|
</template>
|
|
10
4
|
|
|
11
5
|
<script>
|