askbot-dragon 0.8.17 → 0.8.20
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.
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
v-if="item.fieldId==='workorder_clientId' || item.fieldId === 'workorder_statusId' || item.fieldId === 'workorder_priority'"
|
|
128
128
|
>
|
|
129
129
|
<el-option
|
|
130
|
-
v-for="(items,index) in item.formField
|
|
130
|
+
v-for="(items,index) in selectOptions(item.formField)"
|
|
131
131
|
:key="index"
|
|
132
132
|
:label="items.label"
|
|
133
133
|
:value="items.value">
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
:multiple="item.formField.extInfo && item.formField.extInfo.selectType == '多选'"
|
|
143
143
|
>
|
|
144
144
|
<el-option
|
|
145
|
-
v-for="(items,index) in item.formField
|
|
145
|
+
v-for="(items,index) in selectOptions(item.formField)"
|
|
146
146
|
:key="index"
|
|
147
147
|
:label="items.label"
|
|
148
148
|
:value="items.value">
|
|
@@ -475,7 +475,7 @@
|
|
|
475
475
|
/>
|
|
476
476
|
<van-popup v-model="selectPicker" position="bottom" :style="{ height: '300px' }">
|
|
477
477
|
<select-popup
|
|
478
|
-
:options="item.formField
|
|
478
|
+
:options="selectOptions(item.formField)"
|
|
479
479
|
:defaultValue="defaultValue"
|
|
480
480
|
@onConfim="confirmSelect"
|
|
481
481
|
@onclose= "selectPicker = false"
|
|
@@ -874,6 +874,19 @@ export default {
|
|
|
874
874
|
that.defaultClick()
|
|
875
875
|
},
|
|
876
876
|
methods: {
|
|
877
|
+
selectOptions(field){
|
|
878
|
+
let options = []
|
|
879
|
+
if (!field.extInfo){
|
|
880
|
+
return []
|
|
881
|
+
}
|
|
882
|
+
if (field.extInfo.option){
|
|
883
|
+
options = field.extInfo.option
|
|
884
|
+
}
|
|
885
|
+
else if (field.extInfo.options){
|
|
886
|
+
options = field.extInfo.options
|
|
887
|
+
}
|
|
888
|
+
return options
|
|
889
|
+
},
|
|
877
890
|
getMoldTime(){
|
|
878
891
|
let otherTime = {}
|
|
879
892
|
this.formList.form && this.formList.form.formFieldRelation.forEach(item=>{
|
|
@@ -1484,18 +1497,19 @@ export default {
|
|
|
1484
1497
|
(this.formShow.form.formFieldRelation[i].required || this.isRequiredFn(this.formShow.form.formFieldRelation[i].formField)) &&
|
|
1485
1498
|
this.formShow.form.formFieldRelation[i].fieldId!=='workorder_name'&&
|
|
1486
1499
|
this.formShow.form.formFieldRelation[i].formField.type !== 'EXPLANATION') {
|
|
1487
|
-
console.debug('formFieldRelation',this.formShow.form.formFieldRelation[i].value)
|
|
1488
1500
|
let value = "";
|
|
1489
|
-
let bool =
|
|
1501
|
+
let bool = {}
|
|
1502
|
+
bool[this.formShow.form.formFieldRelation[i].fieldId] = false
|
|
1490
1503
|
if (this.formShow.form.formFieldRelation[i].formField.type === 'INPUT' || this.formShow.form.formFieldRelation[i].formField.type === 'TEXTAREA'){
|
|
1491
|
-
value = this.formShow.form.formFieldRelation[i].value && this.formShow.form.formFieldRelation[i].value.
|
|
1504
|
+
value = this.formShow.form.formFieldRelation[i].value && this.formShow.form.formFieldRelation[i].value.includes('\n')?this.formShow.form.formFieldRelation[i].value:'';
|
|
1492
1505
|
let strVal = '';
|
|
1493
1506
|
if(value){
|
|
1494
1507
|
strVal = value.replace(/\n/g,'');
|
|
1495
1508
|
}
|
|
1496
|
-
bool = this.formShow.form.formFieldRelation[i].value && this.formShow.form.formFieldRelation[i].value.
|
|
1509
|
+
bool[this.formShow.form.formFieldRelation[i].fieldId] = this.formShow.form.formFieldRelation[i].value && this.formShow.form.formFieldRelation[i].value.includes('\n') && !strVal
|
|
1497
1510
|
}
|
|
1498
|
-
|
|
1511
|
+
console.debug('formFieldRelation',this.formShow.form.formFieldRelation[i].value,bool[this.formShow.form.formFieldRelation[i]],Array.isArray(this.formShow.form.formFieldRelation[i].value) && !this.formShow.form.formFieldRelation[i].value.length)
|
|
1512
|
+
if(!this.formShow.form.formFieldRelation[i].value || bool[this.formShow.form.formFieldRelation[i].fieldId] || (Array.isArray(this.formShow.form.formFieldRelation[i].value) && !this.formShow.form.formFieldRelation[i].value.length)) {
|
|
1499
1513
|
this.$message.error('请完善'+ this.formShow.form.formFieldRelation[i].formField.name)
|
|
1500
1514
|
return
|
|
1501
1515
|
}
|
|
@@ -1555,7 +1569,8 @@ export default {
|
|
|
1555
1569
|
if(this.formShow.form.formFieldRelation[i].formField.type==='SELECT' || this.formShow.form.formFieldRelation[i].formField.type==='OPTION')
|
|
1556
1570
|
{
|
|
1557
1571
|
if (this.formShow.form.formFieldRelation[i].fieldId === id) {
|
|
1558
|
-
|
|
1572
|
+
console.debug('11')
|
|
1573
|
+
selectOption = this.selectOptions(this.formShow.form.formFieldRelation[i].formField)
|
|
1559
1574
|
for (let j = 0; j < selectOption.length; j++) {
|
|
1560
1575
|
this.selectValue[j] = selectOption[j].label
|
|
1561
1576
|
}
|