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
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
v-model="_value"
|
|
7
7
|
v-nstc-number="numberRule"
|
|
8
8
|
v-bind="$attrs"
|
|
9
|
-
:style="{width:parseFloat(width) + 'px'}"
|
|
9
|
+
:style="{ width: parseFloat(width) + 'px' }"
|
|
10
10
|
:placeholder="placeholder || '请输入'"
|
|
11
11
|
:type="_type"
|
|
12
12
|
:maxlength="maxlength"
|
|
13
|
-
:class="{'nstc-amount-num': isMoney, 'nstc-common-form-textarea': type === 'textarea' }"
|
|
13
|
+
:class="{ 'nstc-amount-num': isMoney, 'nstc-common-form-textarea': type === 'textarea' }"
|
|
14
14
|
:clearable="clearable"
|
|
15
15
|
v-on="$listeners"
|
|
16
16
|
>
|
|
@@ -61,8 +61,8 @@ export default {
|
|
|
61
61
|
numberRule: {
|
|
62
62
|
type: Object,
|
|
63
63
|
default: () => ({
|
|
64
|
-
isMoney:false,
|
|
65
|
-
precision:2
|
|
64
|
+
isMoney: false,
|
|
65
|
+
precision: 2
|
|
66
66
|
})
|
|
67
67
|
// 配置项
|
|
68
68
|
// min:最小值,类型为number;
|
|
@@ -122,7 +122,7 @@ export default {
|
|
|
122
122
|
|
|
123
123
|
mounted() {
|
|
124
124
|
this.$nextTick(() => {
|
|
125
|
-
if(this.type === 'textarea') {
|
|
125
|
+
if (this.type === 'textarea') {
|
|
126
126
|
this.resizeInputWidth()
|
|
127
127
|
window.onresize = this.resizeInputWidth
|
|
128
128
|
}
|
|
@@ -140,7 +140,7 @@ export default {
|
|
|
140
140
|
},
|
|
141
141
|
|
|
142
142
|
isMoney() {
|
|
143
|
-
return this.numberRule?this.numberRule.isMoney:false
|
|
143
|
+
return this.numberRule ? this.numberRule.isMoney : false
|
|
144
144
|
},
|
|
145
145
|
|
|
146
146
|
isNumber() {
|
|
@@ -148,11 +148,7 @@ export default {
|
|
|
148
148
|
},
|
|
149
149
|
|
|
150
150
|
_type() {
|
|
151
|
-
return this.type === 'text'
|
|
152
|
-
? this.isNumber
|
|
153
|
-
? 'number'
|
|
154
|
-
: this.type
|
|
155
|
-
: this.type
|
|
151
|
+
return this.type === 'text' ? (this.isNumber ? 'number' : this.type) : this.type
|
|
156
152
|
}
|
|
157
153
|
},
|
|
158
154
|
|
|
@@ -160,9 +156,9 @@ export default {
|
|
|
160
156
|
_value(val) {
|
|
161
157
|
// 当为金额时有两位小数
|
|
162
158
|
let l = 0
|
|
163
|
-
if(this.numberRule && this.numberRule.isMoney){
|
|
159
|
+
if (this.numberRule && this.numberRule.isMoney) {
|
|
164
160
|
l = 15
|
|
165
|
-
}else{
|
|
161
|
+
} else {
|
|
166
162
|
l = 13
|
|
167
163
|
}
|
|
168
164
|
this.numberRule.maxLength && (l = this.numberRule.maxLength)
|
|
@@ -171,7 +167,7 @@ export default {
|
|
|
171
167
|
}
|
|
172
168
|
console.log('__log', this.isNotZh)
|
|
173
169
|
if (this.isNotZh) {
|
|
174
|
-
this._value = val.replace(/[\u4e00-\u9fa5]/
|
|
170
|
+
this._value = val.replace(/[\u4e00-\u9fa5]/gi, '')
|
|
175
171
|
}
|
|
176
172
|
}
|
|
177
173
|
},
|
|
@@ -185,7 +181,6 @@ export default {
|
|
|
185
181
|
console.log('_wwww', w)
|
|
186
182
|
const inputArr = document.getElementsByClassName(`nstc-common-form-textarea`)
|
|
187
183
|
|
|
188
|
-
|
|
189
184
|
for (let i = 0; i < inputArr.length; i++) {
|
|
190
185
|
// 3 为了多留一点空间, 前面是计算出来的准确值
|
|
191
186
|
inputArr[i].style.width = w * 0.3625 + 380 + 3 + 'px'
|
|
@@ -193,35 +188,37 @@ export default {
|
|
|
193
188
|
},
|
|
194
189
|
inputClick() {
|
|
195
190
|
const that = this
|
|
196
|
-
console.log(this.httpMethod
|
|
197
|
-
if (this.httpMethod
|
|
191
|
+
console.log(this.httpMethod)
|
|
192
|
+
if (this.httpMethod === 'noRequest') {
|
|
198
193
|
this._value = this.getValue
|
|
199
194
|
} else if (this.httpMethod === 'get') {
|
|
200
195
|
request({
|
|
201
196
|
url: this.url,
|
|
202
197
|
method: this.httpMethod,
|
|
203
198
|
params: this.params
|
|
204
|
-
})
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
that.$
|
|
199
|
+
})
|
|
200
|
+
.then((res) => {
|
|
201
|
+
that._value = res
|
|
202
|
+
that.$nextTick(() => {
|
|
203
|
+
that.$forceUpdate()
|
|
204
|
+
})
|
|
208
205
|
})
|
|
209
|
-
|
|
206
|
+
.catch(() => {})
|
|
210
207
|
} else {
|
|
211
208
|
let data = this.params
|
|
212
209
|
request({
|
|
213
210
|
url: this.url,
|
|
214
211
|
method: this.httpMethod,
|
|
215
212
|
data
|
|
216
|
-
})
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
that.$
|
|
213
|
+
})
|
|
214
|
+
.then((res) => {
|
|
215
|
+
that._value = res
|
|
216
|
+
that.$nextTick(() => {
|
|
217
|
+
that.$forceUpdate()
|
|
218
|
+
})
|
|
220
219
|
})
|
|
221
|
-
|
|
220
|
+
.catch(() => {})
|
|
222
221
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
222
|
}
|
|
226
223
|
}
|
|
227
224
|
}
|
|
@@ -229,40 +226,40 @@ export default {
|
|
|
229
226
|
|
|
230
227
|
<style lang="scss" scoped>
|
|
231
228
|
.nstc-amount-num-temp {
|
|
232
|
-
.input-after-amount-num{
|
|
233
|
-
display: inline-block!important;
|
|
229
|
+
.input-after-amount-num {
|
|
230
|
+
display: inline-block !important;
|
|
234
231
|
text-align: right;
|
|
235
232
|
}
|
|
236
233
|
}
|
|
237
|
-
.nstc-amount-num{
|
|
234
|
+
.nstc-amount-num {
|
|
238
235
|
.el-input__inner {
|
|
239
236
|
text-align: right;
|
|
240
237
|
&::placeholder {
|
|
241
|
-
|
|
238
|
+
text-align: right;
|
|
242
239
|
}
|
|
243
240
|
|
|
244
241
|
&::-webkit-input-placeholder {
|
|
245
|
-
|
|
246
|
-
|
|
242
|
+
/* WebKit browsers 适配谷歌 */
|
|
243
|
+
text-align: right;
|
|
247
244
|
}
|
|
248
245
|
|
|
249
246
|
&:-moz-placeholder {
|
|
250
|
-
|
|
251
|
-
|
|
247
|
+
/* Mozilla Firefox 4 to 18 适配火狐 */
|
|
248
|
+
text-align: right;
|
|
252
249
|
}
|
|
253
250
|
|
|
254
251
|
&::-moz-placeholder {
|
|
255
|
-
|
|
256
|
-
|
|
252
|
+
/* Mozilla Firefox 19+ 适配火狐 */
|
|
253
|
+
text-align: right;
|
|
257
254
|
}
|
|
258
255
|
|
|
259
256
|
&:-ms-input-placeholder {
|
|
260
|
-
|
|
261
|
-
|
|
257
|
+
/* Internet Explorer 10+ 适配ie*/
|
|
258
|
+
text-align: right;
|
|
262
259
|
}
|
|
263
260
|
}
|
|
264
261
|
position: relative;
|
|
265
|
-
|
|
262
|
+
|
|
266
263
|
.input-after-amount-num {
|
|
267
264
|
position: absolute;
|
|
268
265
|
right: 10px;
|
|
@@ -280,23 +277,23 @@ export default {
|
|
|
280
277
|
}
|
|
281
278
|
// 当为空值时,透明
|
|
282
279
|
.nstc-amount-temp-transparent {
|
|
283
|
-
.input-after-amount-num{
|
|
284
|
-
background-color: rgba(0,0,0,0)!important;
|
|
280
|
+
.input-after-amount-num {
|
|
281
|
+
background-color: rgba(0, 0, 0, 0) !important;
|
|
285
282
|
}
|
|
286
283
|
}
|
|
287
284
|
// 当input框的为不可点击时
|
|
288
|
-
.nstc-amount-input-disabled{
|
|
289
|
-
.input-after-amount-num{
|
|
290
|
-
background-color: #
|
|
291
|
-
border-color: #dfe4ed!important;
|
|
292
|
-
color: #
|
|
293
|
-
cursor: not-allowed!important;
|
|
294
|
-
pointer-events:none;
|
|
285
|
+
.nstc-amount-input-disabled {
|
|
286
|
+
.input-after-amount-num {
|
|
287
|
+
background-color: #f5f7fa !important;
|
|
288
|
+
border-color: #dfe4ed !important;
|
|
289
|
+
color: #c0c4cc !important;
|
|
290
|
+
cursor: not-allowed !important;
|
|
291
|
+
pointer-events: none;
|
|
295
292
|
}
|
|
296
293
|
}
|
|
297
|
-
.nstc-common-form-textarea{
|
|
298
|
-
textarea{
|
|
299
|
-
border: 1px solid #
|
|
294
|
+
.nstc-common-form-textarea {
|
|
295
|
+
textarea {
|
|
296
|
+
border: 1px solid #c0c4cc;
|
|
300
297
|
font-family: auto;
|
|
301
298
|
font-size: 13px;
|
|
302
299
|
}
|
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="interval-input-custom">
|
|
3
|
-
<InputCustom
|
|
4
|
-
v-model="_value[0]"
|
|
5
|
-
:clearable="clearable"
|
|
6
|
-
:type="type"
|
|
7
|
-
@blur="changeNum"
|
|
8
|
-
:number-rule="numberRule"
|
|
9
|
-
/>
|
|
3
|
+
<InputCustom v-model="_value[0]" :clearable="clearable" :type="type" @blur="changeNum" :number-rule="numberRule" />
|
|
10
4
|
<span>-</span>
|
|
11
|
-
<InputCustom
|
|
12
|
-
v-model="_value[1]"
|
|
13
|
-
@blur="changeNum"
|
|
14
|
-
:clearable="clearable"
|
|
15
|
-
:type="type"
|
|
16
|
-
:number-rule="numberRule"
|
|
17
|
-
/>
|
|
18
|
-
|
|
5
|
+
<InputCustom v-model="_value[1]" @blur="changeNum" :clearable="clearable" :type="type" :number-rule="numberRule" />
|
|
19
6
|
</div>
|
|
20
7
|
</template>
|
|
21
8
|
|
|
@@ -47,57 +34,48 @@ export default {
|
|
|
47
34
|
|
|
48
35
|
numberRule: {
|
|
49
36
|
type: [String, Object, Array],
|
|
50
|
-
default:() => ({
|
|
51
|
-
})
|
|
37
|
+
default: () => ({})
|
|
52
38
|
},
|
|
53
39
|
defaultProps: {
|
|
54
40
|
type: [String, Object, Array],
|
|
55
41
|
default() {
|
|
56
|
-
return {
|
|
57
|
-
|
|
58
|
-
}
|
|
42
|
+
return {}
|
|
59
43
|
}
|
|
60
|
-
}
|
|
44
|
+
}
|
|
61
45
|
},
|
|
62
46
|
|
|
63
47
|
computed: {
|
|
64
48
|
_value: {
|
|
65
49
|
get() {
|
|
66
|
-
|
|
67
50
|
return this.value
|
|
68
51
|
},
|
|
69
52
|
set(val) {
|
|
70
|
-
|
|
71
53
|
this.$emit('input', val)
|
|
72
54
|
}
|
|
73
55
|
}
|
|
74
56
|
},
|
|
75
57
|
methods: {
|
|
76
58
|
changeNum() {
|
|
77
|
-
let newVal = this.value
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
newVal = ["", ""]
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
59
|
+
let newVal = this.value
|
|
60
|
+
console.log(this.value, 'this.value')
|
|
61
|
+
let value1 = this._value[0]
|
|
62
|
+
let value2 = this._value[1]
|
|
63
|
+
if (value1 && value2) {
|
|
64
|
+
value1 = isNaN(parseFloat(this._value[0])) ? 0 : parseFloat(this._value[0])
|
|
65
|
+
value2 = isNaN(parseFloat(this._value[1])) ? 0 : parseFloat(this._value[1])
|
|
66
|
+
if (value1 > value2) {
|
|
67
|
+
this.$message.warning('起始值不能大于结束值')
|
|
68
|
+
newVal = ['', '']
|
|
91
69
|
}
|
|
92
|
-
|
|
70
|
+
}
|
|
71
|
+
this._value = newVal
|
|
93
72
|
}
|
|
94
|
-
|
|
95
73
|
}
|
|
96
74
|
}
|
|
97
75
|
</script>
|
|
98
76
|
|
|
99
77
|
<style lang="scss">
|
|
100
|
-
@import
|
|
78
|
+
@import '~@/theme/theme1/styles/variables.scss';
|
|
101
79
|
|
|
102
80
|
.interval-input-custom {
|
|
103
81
|
width: $formItemDefaultWidth;
|
|
@@ -109,7 +87,7 @@ export default {
|
|
|
109
87
|
padding: 0 5px;
|
|
110
88
|
}
|
|
111
89
|
.input-custom {
|
|
112
|
-
width: calc((100% - 15px) / 2)!important;
|
|
90
|
+
width: calc((100% - 15px) / 2) !important;
|
|
113
91
|
.el-input {
|
|
114
92
|
width: 100%;
|
|
115
93
|
}
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<template v-if="SUPPORT_TYPE.includes(item.mold)">
|
|
4
|
-
<el-form-item
|
|
5
|
-
:label="item.name"
|
|
6
|
-
:prop="item.prop"
|
|
7
|
-
:ref="item.required ? item.prop : null"
|
|
8
|
-
>
|
|
4
|
+
<el-form-item :label="item.name" :prop="item.prop" :ref="item.required ? item.prop : null">
|
|
9
5
|
<el-tooltip
|
|
10
6
|
v-if="item.tooltip"
|
|
11
7
|
class="item-tooltip"
|
|
12
8
|
effect="dark"
|
|
13
9
|
:content="item.tooltip"
|
|
14
10
|
placement="top-start"
|
|
15
|
-
:style="{left: -tipLength + 'px'}"
|
|
11
|
+
:style="{ left: -tipLength + 'px' }"
|
|
16
12
|
>
|
|
17
13
|
<i class="el-icon-question" />
|
|
18
14
|
</el-tooltip>
|
|
19
15
|
<!-- 多个link -->
|
|
20
|
-
|
|
16
|
+
|
|
21
17
|
<template v-if="Array.isArray(item.link)">
|
|
22
18
|
<component
|
|
23
19
|
ref="item"
|
|
@@ -75,12 +71,11 @@
|
|
|
75
71
|
@treeNodeClick="treeNodeClick"
|
|
76
72
|
/>
|
|
77
73
|
</el-form-item>
|
|
78
|
-
|
|
79
74
|
</template>
|
|
80
75
|
</template>
|
|
81
76
|
</template>
|
|
82
77
|
<!-- 单个link -->
|
|
83
|
-
<template v-else-if="item.link &&item.link.mold">
|
|
78
|
+
<template v-else-if="item.link && item.link.mold">
|
|
84
79
|
<template v-if="item.link.position === 'after'">
|
|
85
80
|
<component
|
|
86
81
|
ref="item"
|
|
@@ -103,11 +98,7 @@
|
|
|
103
98
|
@enter-click="$emit('enter-click')"
|
|
104
99
|
@treeNodeClick="treeNodeClick"
|
|
105
100
|
/>
|
|
106
|
-
<span
|
|
107
|
-
v-show="item.link.name"
|
|
108
|
-
class="form-item-name form-item-name-link"
|
|
109
|
-
v-html="item.link.name"
|
|
110
|
-
/>
|
|
101
|
+
<span v-show="item.link.name" class="form-item-name form-item-name-link" v-html="item.link.name" />
|
|
111
102
|
<component
|
|
112
103
|
icon-type="drop"
|
|
113
104
|
:showCheckbox="item.showCheckbox"
|
|
@@ -148,12 +139,7 @@
|
|
|
148
139
|
@enter-click="$emit('enter-click')"
|
|
149
140
|
@treeNodeClick="treeNodeClick"
|
|
150
141
|
/>
|
|
151
|
-
<span
|
|
152
|
-
|
|
153
|
-
v-show="item.link.name"
|
|
154
|
-
class="form-item-name form-item-name-link"
|
|
155
|
-
v-html="item.link.name"
|
|
156
|
-
/>
|
|
142
|
+
<span v-show="item.link.name" class="form-item-name form-item-name-link" v-html="item.link.name" />
|
|
157
143
|
<component
|
|
158
144
|
icon-type="drop"
|
|
159
145
|
:showCheckbox="item.showCheckbox"
|
|
@@ -186,9 +172,9 @@
|
|
|
186
172
|
:disableUnclickLeaf="item.disableUnclickLeaf"
|
|
187
173
|
:is="getComponentModel(item.mold)"
|
|
188
174
|
:key="item.prop"
|
|
189
|
-
:lazyLoad=
|
|
190
|
-
:labelKey=
|
|
191
|
-
:valueKey=
|
|
175
|
+
:lazyLoad="item.lazyLoad"
|
|
176
|
+
:labelKey="item.labelKey"
|
|
177
|
+
:valueKey="item.valueKey"
|
|
192
178
|
:checkStrictly="item.checkStrictly"
|
|
193
179
|
:httpMethod="item.httpMethod"
|
|
194
180
|
:params="item.params"
|
|
@@ -205,7 +191,7 @@
|
|
|
205
191
|
:remote="item.remote"
|
|
206
192
|
:filterable="item.filterable"
|
|
207
193
|
:options="item.options"
|
|
208
|
-
:numberRule="item.defaultProps||{}"
|
|
194
|
+
:numberRule="item.defaultProps || {}"
|
|
209
195
|
:clearable="item.clearable"
|
|
210
196
|
:isCache="item.isCache"
|
|
211
197
|
:dateType="item.dateType"
|
|
@@ -303,11 +289,11 @@ export default {
|
|
|
303
289
|
}
|
|
304
290
|
},
|
|
305
291
|
treeNodeClick(data, node) {
|
|
306
|
-
this.$emit(
|
|
292
|
+
this.$emit('tree-node-click', data, node)
|
|
307
293
|
setTimeout(() => {
|
|
308
|
-
const key = this.item.queryKey
|
|
309
|
-
this.$refs[
|
|
310
|
-
}, 0)
|
|
294
|
+
const key = this.item.queryKey
|
|
295
|
+
this.$refs['item'].filterText = this.formData[key]
|
|
296
|
+
}, 0)
|
|
311
297
|
}
|
|
312
298
|
}
|
|
313
299
|
}
|
|
@@ -322,9 +308,8 @@ export default {
|
|
|
322
308
|
width: 72px;
|
|
323
309
|
height: 26px;
|
|
324
310
|
padding: 0px;
|
|
325
|
-
border: 1px solid #
|
|
311
|
+
border: 1px solid #007aff;
|
|
326
312
|
border-radius: 5px;
|
|
327
313
|
}
|
|
328
314
|
}
|
|
329
|
-
|
|
330
315
|
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="{ 'form-item-button':['querybutton', 'addbutton', 'otherbutton'].includes(item.mold) }">
|
|
2
|
+
<div :class="{ 'form-item-button': ['querybutton', 'addbutton', 'otherbutton'].includes(item.mold) }">
|
|
3
3
|
<el-form-item v-if="item.mold === 'querybutton'">
|
|
4
4
|
<el-button
|
|
5
5
|
type="primary"
|
|
@@ -38,17 +38,14 @@
|
|
|
38
38
|
</el-form-item>
|
|
39
39
|
|
|
40
40
|
<template v-else-if="SUPPORT_TYPE.includes(item.mold)">
|
|
41
|
-
<el-form-item
|
|
42
|
-
:label="item.name"
|
|
43
|
-
:prop="item.prop"
|
|
44
|
-
>
|
|
41
|
+
<el-form-item :label="item.name" :prop="item.prop">
|
|
45
42
|
<el-tooltip
|
|
46
43
|
v-if="item.tooltip"
|
|
47
44
|
class="item-tooltip"
|
|
48
45
|
effect="dark"
|
|
49
46
|
:content="item.tooltip"
|
|
50
47
|
placement="top-start"
|
|
51
|
-
:style="{left: -tipLength + 'px'}"
|
|
48
|
+
:style="{ left: -tipLength + 'px' }"
|
|
52
49
|
>
|
|
53
50
|
<i class="el-icon-question" />
|
|
54
51
|
</el-tooltip>
|
|
@@ -95,12 +92,11 @@
|
|
|
95
92
|
@enter-click="$emit('enter-click')"
|
|
96
93
|
/>
|
|
97
94
|
</el-form-item>
|
|
98
|
-
|
|
99
95
|
</template>
|
|
100
96
|
</template>
|
|
101
97
|
</template>
|
|
102
98
|
<!-- 单个 -->
|
|
103
|
-
<template v-else-if="item.link &&item.link.mold">
|
|
99
|
+
<template v-else-if="item.link && item.link.mold">
|
|
104
100
|
<template v-if="item.link.position === 'after'">
|
|
105
101
|
<component
|
|
106
102
|
:is="`${item.link.mold}-custom`"
|
|
@@ -115,12 +111,7 @@
|
|
|
115
111
|
@after-leave="$emit('after-leave', item.link.prop)"
|
|
116
112
|
@enter-click="$emit('enter-click')"
|
|
117
113
|
/>
|
|
118
|
-
<span
|
|
119
|
-
|
|
120
|
-
v-show="item.link.name"
|
|
121
|
-
class="form-item-name form-item-name-link"
|
|
122
|
-
v-html="item.link.name"
|
|
123
|
-
/>
|
|
114
|
+
<span v-show="item.link.name" class="form-item-name form-item-name-link" v-html="item.link.name" />
|
|
124
115
|
<component
|
|
125
116
|
:is="`${item.mold}-custom`"
|
|
126
117
|
:key="item.prop"
|
|
@@ -147,12 +138,7 @@
|
|
|
147
138
|
@after-leave="$emit('after-leave', item.prop)"
|
|
148
139
|
@enter-click="$emit('enter-click')"
|
|
149
140
|
/>
|
|
150
|
-
<span
|
|
151
|
-
|
|
152
|
-
v-show="item.link.name"
|
|
153
|
-
class="form-item-name form-item-name-link"
|
|
154
|
-
v-html="item.link.name"
|
|
155
|
-
/>
|
|
141
|
+
<span v-show="item.link.name" class="form-item-name form-item-name-link" v-html="item.link.name" />
|
|
156
142
|
<component
|
|
157
143
|
:is="`${item.link.mold}-custom`"
|
|
158
144
|
v-if="item.link.renderable !== false"
|
|
@@ -261,9 +247,8 @@ export default {
|
|
|
261
247
|
width: 72px;
|
|
262
248
|
height: 26px;
|
|
263
249
|
padding: 0px;
|
|
264
|
-
border: 1px solid #
|
|
250
|
+
border: 1px solid #007aff;
|
|
265
251
|
border-radius: 5px;
|
|
266
252
|
}
|
|
267
253
|
}
|
|
268
|
-
|
|
269
254
|
</style>
|
|
@@ -2,38 +2,30 @@
|
|
|
2
2
|
<div class="form-base-wrapper">
|
|
3
3
|
<template v-for="(item, idx) in config">
|
|
4
4
|
<template v-if="Array.isArray(item)">
|
|
5
|
-
<div
|
|
6
|
-
:key="'inlineItem' + idx"
|
|
7
|
-
class="form-group"
|
|
8
|
-
>
|
|
5
|
+
<div :key="'inlineItem' + idx" class="form-group">
|
|
9
6
|
<template v-for="(iItem, index) in item">
|
|
10
7
|
<BaseItem
|
|
11
8
|
v-if="iItem.renderable !== false"
|
|
12
|
-
|
|
13
|
-
:key="iItem.mold + '-' + (iItem.prop ? iItem.prop : (idx + '-' + index))"
|
|
14
|
-
|
|
9
|
+
:key="iItem.mold + '-' + (iItem.prop ? iItem.prop : idx + '-' + index)"
|
|
15
10
|
v-model="value"
|
|
16
11
|
:formData="formData"
|
|
17
|
-
|
|
18
12
|
:class="[
|
|
19
13
|
'form-item',
|
|
20
14
|
`form-item-${iItem.mold}`,
|
|
21
15
|
{
|
|
22
|
-
'form-item-link':
|
|
16
|
+
'form-item-link':
|
|
17
|
+
iItem.link &&
|
|
18
|
+
((Array.isArray(iItem.link) && iItem.link.some((link) => link.mold)) || iItem.link.mold)
|
|
23
19
|
},
|
|
24
20
|
`form-item-${iItem.mold}-${iItem.prop ? iItem.prop : idx + '-' + index}`
|
|
25
21
|
]"
|
|
26
|
-
|
|
27
22
|
:popper-class="popperClass"
|
|
28
|
-
|
|
29
23
|
:item="iItem"
|
|
30
24
|
:resets.sync="resets"
|
|
31
25
|
:disableds="disableds"
|
|
32
|
-
|
|
33
26
|
:loading="loading"
|
|
34
27
|
:show-mode="showMode"
|
|
35
|
-
|
|
36
|
-
@after-leave="val => $emit('after-leave', val)"
|
|
28
|
+
@after-leave="(val) => $emit('after-leave', val)"
|
|
37
29
|
@query-click="$emit('query-click')"
|
|
38
30
|
@add-click="$emit('add-click')"
|
|
39
31
|
@other-click="$emit('other-click')"
|
|
@@ -47,33 +39,26 @@
|
|
|
47
39
|
<template v-else>
|
|
48
40
|
<BaseItem
|
|
49
41
|
v-if="item.renderable !== false"
|
|
50
|
-
|
|
51
42
|
:key="item.mold + '-' + (item.prop ? item.prop : idx)"
|
|
52
|
-
|
|
53
43
|
v-model="value"
|
|
54
44
|
:formData="formData"
|
|
55
|
-
|
|
56
45
|
:class="[
|
|
57
46
|
'form-item',
|
|
58
47
|
`form-item-${item.mold}`,
|
|
59
48
|
{
|
|
60
|
-
'form-item-link':
|
|
49
|
+
'form-item-link':
|
|
50
|
+
item.link && ((Array.isArray(item.link) && item.link.some((link) => link.mold)) || item.link.mold)
|
|
61
51
|
},
|
|
62
52
|
`form-item-${item.mold}-${item.prop ? item.prop : idx}`
|
|
63
53
|
]"
|
|
64
|
-
|
|
65
54
|
:popper-class="popperClass"
|
|
66
|
-
|
|
67
55
|
:item="item"
|
|
68
56
|
:resets.sync="resets"
|
|
69
57
|
:disableds="disableds"
|
|
70
|
-
|
|
71
58
|
:loading="loading"
|
|
72
|
-
|
|
73
59
|
:from="from"
|
|
74
60
|
:show-mode="showMode"
|
|
75
|
-
|
|
76
|
-
@after-leave="val => $emit('after-leave', val)"
|
|
61
|
+
@after-leave="(val) => $emit('after-leave', val)"
|
|
77
62
|
@query-click="$emit('query-click')"
|
|
78
63
|
@add-click="$emit('add-click')"
|
|
79
64
|
@other-click="$emit('other-click')"
|
|
@@ -86,7 +71,6 @@
|
|
|
86
71
|
</template>
|
|
87
72
|
|
|
88
73
|
<script>
|
|
89
|
-
|
|
90
74
|
import BaseItem from './Item'
|
|
91
75
|
|
|
92
76
|
export default {
|
|
@@ -105,11 +89,11 @@ export default {
|
|
|
105
89
|
},
|
|
106
90
|
from: {
|
|
107
91
|
type: String,
|
|
108
|
-
default: null
|
|
92
|
+
default: null
|
|
109
93
|
},
|
|
110
94
|
config: {
|
|
111
95
|
type: Array,
|
|
112
|
-
default: () =>
|
|
96
|
+
default: () => []
|
|
113
97
|
},
|
|
114
98
|
|
|
115
99
|
loading: {
|
|
@@ -141,6 +125,6 @@ export default {
|
|
|
141
125
|
type: String,
|
|
142
126
|
default: ''
|
|
143
127
|
}
|
|
144
|
-
}
|
|
128
|
+
}
|
|
145
129
|
}
|
|
146
130
|
</script>
|