askbot-dragon 0.7.97 → 0.7.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -22,6 +22,13 @@
|
|
|
22
22
|
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'"
|
|
23
23
|
:maxlength="item.formField.extInfo&&item.formField.extInfo.maxNum?item.formField.extInfo.maxNum*1:1000"
|
|
24
24
|
v-if="item.formField.type==='INPUT'&&item.fieldId!=='workorder_name'"
|
|
25
|
+
:type="item.formField.extInfo.inputType==='NUMBER'||
|
|
26
|
+
item.formField.extInfo.inputType==='RATE'? 'number':'text'"
|
|
27
|
+
@blur="typeCheck(item.formField,item)"
|
|
28
|
+
:min="item.formField.extInfo.inputType==='NUMBER'||
|
|
29
|
+
item.formField.extInfo.inputType==='RATE'?Number(item.formField.extInfo.range.start):''"
|
|
30
|
+
:max="item.formField.extInfo.inputType==='NUMBER'||
|
|
31
|
+
item.formField.extInfo.inputType==='RATE'?Number(item.formField.extInfo.range.end):''"
|
|
25
32
|
></el-input>
|
|
26
33
|
<template v-else-if="item.formField.type==='EXPLANATION'">
|
|
27
34
|
<div class="explanation">
|
|
@@ -235,6 +242,9 @@
|
|
|
235
242
|
:disabled="disableds"
|
|
236
243
|
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'"
|
|
237
244
|
:maxlength="item.formField.extInfo&&item.formField.extInfo.maxNum?item.formField.extInfo.maxNum*1:1000"
|
|
245
|
+
@blur="typeCheck(item.formField,item)"
|
|
246
|
+
:type="item.formField.extInfo.inputType==='NUMBER'||
|
|
247
|
+
item.formField.extInfo.inputType==='RATE'? 'number':'text'"
|
|
238
248
|
/>
|
|
239
249
|
</div>
|
|
240
250
|
<div v-else-if="item.formField.type==='EXPLANATION'||item.formField.type==='EXPLAIN'" class="explan-ation">
|
|
@@ -1509,7 +1519,7 @@ export default {
|
|
|
1509
1519
|
return
|
|
1510
1520
|
}
|
|
1511
1521
|
this.selectDetail = item;
|
|
1512
|
-
this.defaultValue =
|
|
1522
|
+
this.defaultValue = []
|
|
1513
1523
|
if(type == 'client') {
|
|
1514
1524
|
let selectOption
|
|
1515
1525
|
this.selectValue=[]
|
|
@@ -1544,6 +1554,7 @@ export default {
|
|
|
1544
1554
|
this.selectValues[this.formShow.form.formFieldRelation[i].fieldId] = '';
|
|
1545
1555
|
this.formShow.form.formFieldRelation[i].value = "";
|
|
1546
1556
|
this.extInfoFieldValue[this.formShow.form.formFieldRelation[i].fieldId] = ""
|
|
1557
|
+
this.defaultValue = []
|
|
1547
1558
|
this.$forceUpdate()
|
|
1548
1559
|
}
|
|
1549
1560
|
},
|
|
@@ -1947,6 +1958,71 @@ export default {
|
|
|
1947
1958
|
this.dataQuery[item.fieldId].pageInfo.pageNo += 1
|
|
1948
1959
|
this.refTemplateVisibleChange(true,item)
|
|
1949
1960
|
},
|
|
1961
|
+
//校验输入框
|
|
1962
|
+
typeCheck(field,item){
|
|
1963
|
+
if (!item.value){
|
|
1964
|
+
return
|
|
1965
|
+
}
|
|
1966
|
+
console.debug('typeCheck',field)
|
|
1967
|
+
if (field.extInfo.inputType==='MOBILE'){
|
|
1968
|
+
const phone = /^[1][3,4,5,7,8][0-9]{9}$/
|
|
1969
|
+
if (!phone.test(item.value)) {
|
|
1970
|
+
this.$message({
|
|
1971
|
+
message: "请输入有效的手机号",
|
|
1972
|
+
duration: 2000,
|
|
1973
|
+
type: "warning",
|
|
1974
|
+
});
|
|
1975
|
+
item.value = ''
|
|
1976
|
+
return
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
else if (field.extInfo.inputType ==='MAIL'){
|
|
1980
|
+
const reg =
|
|
1981
|
+
/^([a-z0-9A-Z]+[-|_|\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\.)+[a-zA-Z]{2,4}$/;
|
|
1982
|
+
if (!reg.test(item.value)) {
|
|
1983
|
+
this.$message({
|
|
1984
|
+
message: "请输入有效的邮箱",
|
|
1985
|
+
duration: 2000,
|
|
1986
|
+
type: "warning",
|
|
1987
|
+
});
|
|
1988
|
+
item.value = ''
|
|
1989
|
+
return
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
}
|
|
1993
|
+
else if (field.extInfo.inputType === 'ID_CARD'){
|
|
1994
|
+
const reg = /^(([1-9][0-9]{5}(19|20)[0-9]{2}((0[1-9])|(1[0-2]))([0-2][1-9]|10|20|30|31)[0-9]{3}([0-9]|X|x))|([1-9][0-9]{5}[0-9]{2}((0[1-9])|(1[0-2]))([0-2][1-9]|10|20|30|31)[0-9]{3}))$/
|
|
1995
|
+
if (!reg.test(item.value)) {
|
|
1996
|
+
this.$message({
|
|
1997
|
+
message: "请输入有效的身份证号",
|
|
1998
|
+
duration: 2000,
|
|
1999
|
+
type: "warning",
|
|
2000
|
+
});
|
|
2001
|
+
item.value = ''
|
|
2002
|
+
return
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
else if (field.extInfo.inputType ==='LINK'){
|
|
2006
|
+
const reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])/;
|
|
2007
|
+
if (!reg.test(item.value)) {
|
|
2008
|
+
this.$message({
|
|
2009
|
+
message: "请输入合法的链接地址",
|
|
2010
|
+
duration: 2000,
|
|
2011
|
+
type: "warning",
|
|
2012
|
+
});
|
|
2013
|
+
item.value = ''
|
|
2014
|
+
return
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
else if (field.extInfo.inputType ==='NUMBER'||field.extInfo.inputType ==='RATE'){
|
|
2018
|
+
if ( item.value < Number(field.extInfo.range.start)){
|
|
2019
|
+
item.value = Number(field.extInfo.range.start)
|
|
2020
|
+
}
|
|
2021
|
+
else if (item.value > Number(field.extInfo.range.end)){
|
|
2022
|
+
item.value = Number(field.extInfo.range.end)
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
},
|
|
1950
2026
|
//打开级联/下拉抽屉选择
|
|
1951
2027
|
openDrawer(field,type){
|
|
1952
2028
|
this.detailField = field;
|
|
@@ -2001,6 +2077,11 @@ export default {
|
|
|
2001
2077
|
//保存所选下拉值
|
|
2002
2078
|
confirmSelect(option, list){
|
|
2003
2079
|
console.debug('option',option,list)
|
|
2080
|
+
if (!option || !list){
|
|
2081
|
+
this.selectPopUp = false
|
|
2082
|
+
this.selectPicker = false
|
|
2083
|
+
return
|
|
2084
|
+
}
|
|
2004
2085
|
this.detailField.value = list;
|
|
2005
2086
|
this.selectPopUp = false
|
|
2006
2087
|
this.selectPicker = false
|