askbot-dragon 0.7.97 → 0.8.11
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
|
@@ -1633,6 +1633,7 @@ export default {
|
|
|
1633
1633
|
"cascadeDown":{
|
|
1634
1634
|
"options":[
|
|
1635
1635
|
{
|
|
1636
|
+
checked:true,
|
|
1636
1637
|
"_default":false,
|
|
1637
1638
|
"optionStruct":{
|
|
1638
1639
|
"d63aeeef437e4186af4a2efcd7a6a31b":[
|
|
@@ -1662,6 +1663,7 @@ export default {
|
|
|
1662
1663
|
},
|
|
1663
1664
|
"children":[
|
|
1664
1665
|
{
|
|
1666
|
+
checked:true,
|
|
1665
1667
|
"_default":false,
|
|
1666
1668
|
"optionStruct":{
|
|
1667
1669
|
"d63aeeef437e4186af4a2efcd7a6a31b":[
|
|
@@ -1691,6 +1693,7 @@ export default {
|
|
|
1691
1693
|
},
|
|
1692
1694
|
"children":[
|
|
1693
1695
|
{
|
|
1696
|
+
checked:true,
|
|
1694
1697
|
"_default":false,
|
|
1695
1698
|
"optionStruct":{
|
|
1696
1699
|
"d63aeeef437e4186af4a2efcd7a6a31b":[
|
|
@@ -1742,6 +1745,7 @@ export default {
|
|
|
1742
1745
|
]
|
|
1743
1746
|
},
|
|
1744
1747
|
{
|
|
1748
|
+
checked:true,
|
|
1745
1749
|
"_default":false,
|
|
1746
1750
|
"optionStruct":{
|
|
1747
1751
|
"d63aeeef437e4186af4a2efcd7a6a31b":[
|
|
@@ -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">
|
|
@@ -48,7 +55,7 @@
|
|
|
48
55
|
<ckeditor
|
|
49
56
|
:editor="ckeditor.editor"
|
|
50
57
|
v-model="item.value"
|
|
51
|
-
:config="ckeditor.editorConfig"
|
|
58
|
+
:config="{...ckeditor.editorConfig,placeholder:item.formField.extInfo && item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'}"
|
|
52
59
|
v-else-if="item.fieldId==='workorder_description'"
|
|
53
60
|
></ckeditor>
|
|
54
61
|
<el-date-picker
|
|
@@ -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">
|
|
@@ -269,7 +279,7 @@
|
|
|
269
279
|
:editor="ckeditor.editor"
|
|
270
280
|
v-model="item.value"
|
|
271
281
|
@onReady="onReady"
|
|
272
|
-
:config="ckeditor.editorConfig"
|
|
282
|
+
:config="{...ckeditor.editorConfig,placeholder:item.formField.extInfo && item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'}"
|
|
273
283
|
></ckeditor>
|
|
274
284
|
</div>
|
|
275
285
|
</div>
|
|
@@ -441,7 +451,7 @@
|
|
|
441
451
|
:required="item.required || isRequiredFn(item.formField)"
|
|
442
452
|
:disabled="disableds"
|
|
443
453
|
@click-right-icon.stop="SelectClear(item.fieldId)"
|
|
444
|
-
:right-icon="item.value
|
|
454
|
+
:right-icon="item.value && item.value.length? 'close' : 'van-icon van-icon-arrow van-cell__right-icon'"
|
|
445
455
|
/>
|
|
446
456
|
<van-popup v-model="selectPicker" position="bottom" :style="{ height: '300px' }">
|
|
447
457
|
<select-popup
|
|
@@ -463,7 +473,7 @@
|
|
|
463
473
|
<van-field
|
|
464
474
|
readonly
|
|
465
475
|
clickable
|
|
466
|
-
:value="Array.isArray(extInfoFieldValue[item.fieldId])?extInfoFieldValue[item.fieldId].join(','):extInfoFieldValue[item.fieldId]"
|
|
476
|
+
:value="Array.isArray(extInfoFieldValue[item.fieldId])?extInfoFieldValue[item.fieldId].map(v=>v.name).join(','):(extInfoFieldValue[item.fieldId] && extInfoFieldValue[item.fieldId].name?extInfoFieldValue[item.fieldId].name:'')"
|
|
467
477
|
:label="item.formField.name"
|
|
468
478
|
name="picker"
|
|
469
479
|
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
|
|
@@ -471,7 +481,7 @@
|
|
|
471
481
|
@click-right-icon.stop="SelectClear(item.fieldId)"
|
|
472
482
|
:required="item.required || isRequiredFn(item.formField)"
|
|
473
483
|
:disabled="disableds"
|
|
474
|
-
:right-icon="extInfoFieldValue[item.fieldId]? 'close' : 'van-icon van-icon-arrow van-cell__right-icon'"
|
|
484
|
+
:right-icon="extInfoFieldValue[item.fieldId] && extInfoFieldValue[item.fieldId].length? 'close' : 'van-icon van-icon-arrow van-cell__right-icon'"
|
|
475
485
|
/>
|
|
476
486
|
<van-popup v-model="refShowPicker" position="bottom" :style="{ height: '300px' }">
|
|
477
487
|
<select-popup
|
|
@@ -1204,7 +1214,7 @@ export default {
|
|
|
1204
1214
|
if (!this.formList.form.formFieldRelation[i].formField.extInfo.mold ||
|
|
1205
1215
|
this.formList.form.formFieldRelation[i].formField.extInfo.mold == 'TIME' ||
|
|
1206
1216
|
this.getMoldTime(this.formList.form.formFieldRelation[i].formField.formField) == 'TIME'){
|
|
1207
|
-
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId]=dateTime
|
|
1217
|
+
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId]= dateTime
|
|
1208
1218
|
}
|
|
1209
1219
|
else if (this.formList.form.formFieldRelation[i].formField.extInfo.mold == 'DATA_TIME' ||
|
|
1210
1220
|
this.formList.form.formFieldRelation[i].formField.extInfo.mold == 'DATE_TIME' ||
|
|
@@ -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
|
},
|
|
@@ -1892,7 +1903,7 @@ export default {
|
|
|
1892
1903
|
let fields = field.formField.type === 'REF' ? field.formField.extInfo.ref.field : field.formField.extInfo.ref.vars
|
|
1893
1904
|
if (visible) {
|
|
1894
1905
|
if (
|
|
1895
|
-
!this.
|
|
1906
|
+
!this.refNextPage[field.fieldId] || this.refNextPage[field.fieldId].hasNextPage
|
|
1896
1907
|
) {
|
|
1897
1908
|
this.$set(this.refTemplateList, field.fieldId, [])
|
|
1898
1909
|
!this.dataQuery[field.fieldId] && this.$set(this.dataQuery,field.fieldId, {
|
|
@@ -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,28 +2077,33 @@ 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
|
|
2007
2088
|
},
|
|
2008
2089
|
//保存ref类型值
|
|
2009
2090
|
confirmRefSelect(option, list){
|
|
2010
|
-
console.debug('options',option,list)
|
|
2091
|
+
console.debug('options',option,list,this.selectDetail)
|
|
2011
2092
|
if (!option || !list){
|
|
2012
2093
|
this.refShowPicker = false;
|
|
2013
2094
|
return
|
|
2014
2095
|
}
|
|
2015
|
-
this.
|
|
2096
|
+
this.selectDetail.value = list;
|
|
2016
2097
|
let val = ''
|
|
2017
2098
|
if (Array.isArray(option)){
|
|
2018
2099
|
val = option.map(item=>{
|
|
2019
2100
|
return item.id
|
|
2020
2101
|
})
|
|
2021
|
-
this.extInfoFieldValue[this.
|
|
2102
|
+
this.extInfoFieldValue[this.selectDetail.fieldId] = option
|
|
2022
2103
|
}
|
|
2023
2104
|
else {
|
|
2024
2105
|
val = option.id
|
|
2025
|
-
this.extInfoFieldValue[this.
|
|
2106
|
+
this.extInfoFieldValue[this.selectDetail.fieldId] = [option]
|
|
2026
2107
|
}
|
|
2027
2108
|
this.refShowPicker = false;
|
|
2028
2109
|
},
|