askbot-dragon 0.9.7 → 0.9.9
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.
|
@@ -99,12 +99,12 @@
|
|
|
99
99
|
>
|
|
100
100
|
</el-date-picker>
|
|
101
101
|
<div v-else-if="item.formField.type==='RADIO' &&item.formField.extInfo.options">
|
|
102
|
-
<el-radio-group v-model=item.value style="text-align:left">
|
|
102
|
+
<el-radio-group v-model=item.value style="text-align:left" @change="changeSelect(item)">
|
|
103
103
|
<el-radio v-for="(items,index) in item.formField.extInfo.options" :label=items.value :key="index">{{items.label}}</el-radio>
|
|
104
104
|
</el-radio-group>
|
|
105
105
|
</div>
|
|
106
106
|
<div v-else-if="item.formField.type==='RADIO' &&item.formField.extInfo.option">
|
|
107
|
-
<el-radio-group v-model=item.value style="text-align:left">
|
|
107
|
+
<el-radio-group v-model=item.value style="text-align:left" @change="changeSelect(item)">
|
|
108
108
|
<el-radio v-for="(items,index) in item.formField.extInfo.option" :label=items.value :key="index">{{items.label}}</el-radio>
|
|
109
109
|
</el-radio-group>
|
|
110
110
|
</div>
|
|
@@ -147,6 +147,7 @@
|
|
|
147
147
|
style="width: 100%"
|
|
148
148
|
filterable
|
|
149
149
|
v-else
|
|
150
|
+
@change="changeSelect(item)"
|
|
150
151
|
:multiple="item.formField.extInfo && item.formField.extInfo.selectType == '多选'"
|
|
151
152
|
>
|
|
152
153
|
<el-option
|
|
@@ -460,7 +461,7 @@
|
|
|
460
461
|
</span>
|
|
461
462
|
</template>
|
|
462
463
|
<template #input style="display: flex;align-items: center">
|
|
463
|
-
<van-radio-group v-model=item.value direction="horizontal" :disabled="disableds">
|
|
464
|
+
<van-radio-group v-model=item.value direction="horizontal" :disabled="disableds" @change="changeSelect(item)">
|
|
464
465
|
<van-radio v-for="(items,index) in item.formField.extInfo.option" :name=items.value :key="index">{{items.label}}</van-radio>
|
|
465
466
|
</van-radio-group>
|
|
466
467
|
</template>
|
|
@@ -474,7 +475,7 @@
|
|
|
474
475
|
</span>
|
|
475
476
|
</template>
|
|
476
477
|
<template #input style="display: flex;align-items: center" >
|
|
477
|
-
<van-radio-group v-model=item.value direction="horizontal" :disabled="disableds">
|
|
478
|
+
<van-radio-group v-model=item.value direction="horizontal" :disabled="disableds" @change="changeSelect(item)">
|
|
478
479
|
<van-radio v-for="(items,index) in item.formField.extInfo.options" :name=items.value :key="index">{{items.label}}</van-radio>
|
|
479
480
|
</van-radio-group>
|
|
480
481
|
</template>
|
|
@@ -867,7 +868,9 @@ export default {
|
|
|
867
868
|
fieldValue:{},
|
|
868
869
|
optionsList:{},
|
|
869
870
|
currentEditor:null,
|
|
870
|
-
workOrderDes:""
|
|
871
|
+
workOrderDes:"",
|
|
872
|
+
workOrderDestail:null,
|
|
873
|
+
associatedControlsCopy:[]
|
|
871
874
|
}
|
|
872
875
|
},
|
|
873
876
|
props: {
|
|
@@ -957,6 +960,36 @@ export default {
|
|
|
957
960
|
}
|
|
958
961
|
if (item.fieldId==='workorder_description'){
|
|
959
962
|
this.workOrderDes = item.value;
|
|
963
|
+
this.workOrderDestail = item
|
|
964
|
+
}
|
|
965
|
+
if(this.fieldValue[item.fieldId] && !this.associatedControlsCopy.includes(item.fieldId) && (item.formField.extInfo.selectType == '单选' || item.formField.type == 'RADIO')) {
|
|
966
|
+
let option = null
|
|
967
|
+
if(item.formField.extInfo.options) {
|
|
968
|
+
option = item.formField.extInfo.options.find(ele => { return ele.value == this.fieldValue[item.fieldId]})
|
|
969
|
+
} else if (item.formField.extInfo.cascadeDown) {
|
|
970
|
+
|
|
971
|
+
item.formField.extInfo.cascadeDown.options.forEach(ele => {
|
|
972
|
+
if(this.fieldValue[item.fieldId] && this.fieldValue[item.fieldId].length != 0 && ele.value == this.fieldValue[item.fieldId][this.fieldValue[item.fieldId].length - 1]) {
|
|
973
|
+
option = ele
|
|
974
|
+
}
|
|
975
|
+
ele.children && ele.children.forEach(element =>{
|
|
976
|
+
if(this.fieldValue[item.fieldId] && this.fieldValue[item.fieldId].length != 0 && element.value == this.fieldValue[item.fieldId][this.fieldValue[item.fieldId].length - 1]) {
|
|
977
|
+
option = element
|
|
978
|
+
}
|
|
979
|
+
element.children && element.children.forEach(elements=>{
|
|
980
|
+
if(this.fieldValue[item.fieldId] && this.fieldValue[item.fieldId].length != 0 && elements.value == this.fieldValue[item.fieldId][this.fieldValue[item.fieldId].length - 1]) {
|
|
981
|
+
option = elements
|
|
982
|
+
}
|
|
983
|
+
})
|
|
984
|
+
})
|
|
985
|
+
})
|
|
986
|
+
} else {
|
|
987
|
+
option = this.extInfoFieldValue[item.fieldId] && this.extInfoFieldValue[item.fieldId][0]
|
|
988
|
+
}
|
|
989
|
+
console.debug('option',option)
|
|
990
|
+
if(option && option.setDefaultFieldId) {
|
|
991
|
+
this.setFileDefault(option,item.formField)
|
|
992
|
+
}
|
|
960
993
|
}
|
|
961
994
|
})
|
|
962
995
|
let newArr = arr.filter(item=>item.relationDisplay)
|
|
@@ -1014,6 +1047,40 @@ export default {
|
|
|
1014
1047
|
that.defaultClick()
|
|
1015
1048
|
},
|
|
1016
1049
|
methods: {
|
|
1050
|
+
setFileDefault(option){
|
|
1051
|
+
if (this.formShow.form.formFieldRelation){
|
|
1052
|
+
this.formShow.form.formFieldRelation.forEach(item=>{
|
|
1053
|
+
for (const key in option.setDefaultFieldId) {
|
|
1054
|
+
if (item.fieldId === key && item.relationDisplay){
|
|
1055
|
+
if((this.fieldValue[key]!==null || this.fieldValue[key]!==undefined) && option.setDefaultFieldId[key].fieldValue) {
|
|
1056
|
+
let val = option.setDefaultFieldId[key].fieldValue ? option.setDefaultFieldId[key].fieldValue : ""
|
|
1057
|
+
this.$set(item,'value',val)
|
|
1058
|
+
this.$set(this.fieldValue,key,val)
|
|
1059
|
+
if(option.setDefaultFieldId[key].extInfoFieldValue) {
|
|
1060
|
+
this.$set(this.extInfoFieldValue,key,option.setDefaultFieldId[key].extInfoFieldValue)
|
|
1061
|
+
}
|
|
1062
|
+
/* else if (!option.setDefaultFieldId[key].extInfoFieldValue){
|
|
1063
|
+
this.$set(this.extInfoFieldValue,key,val)
|
|
1064
|
+
}*/
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
if (item.fieldId === key && !item.relationDisplay){
|
|
1068
|
+
this.$set(this.fieldValue,key,"")
|
|
1069
|
+
this.$set(this.extInfoFieldValue,key,"")
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
})
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
},
|
|
1076
|
+
changeSelect(field){
|
|
1077
|
+
if ( field.formField.extInfo.selectType == '多选'){
|
|
1078
|
+
return
|
|
1079
|
+
}
|
|
1080
|
+
let arr = field.formField.extInfo.relationControlsId ? JSON.parse(JSON.stringify(field.formField.extInfo.relationControlsId)) : []
|
|
1081
|
+
this.associatedControlsCopy = [...this.associatedControlsCopy, ...arr];
|
|
1082
|
+
console.debug('associatedControlsCopy',this.associatedControlsCopy,field)
|
|
1083
|
+
},
|
|
1017
1084
|
selectOptions(field){
|
|
1018
1085
|
let options = []
|
|
1019
1086
|
if (!field.extInfo){
|
|
@@ -1615,6 +1682,7 @@ export default {
|
|
|
1615
1682
|
break
|
|
1616
1683
|
}
|
|
1617
1684
|
}
|
|
1685
|
+
this.changeSelect(item);
|
|
1618
1686
|
},
|
|
1619
1687
|
//提交按钮事件
|
|
1620
1688
|
submitClick() {
|
|
@@ -2311,7 +2379,8 @@ export default {
|
|
|
2311
2379
|
this.$set(this.detailField,'value',checkList);
|
|
2312
2380
|
this.extInfoFieldValue[this.detailField.fieldId] = checkDatas;
|
|
2313
2381
|
this.$set(this.detailField.formField.extInfo,'extInfoFieldValue',checkDatas);
|
|
2314
|
-
console.debug('checkDatas',this.detailField.formField.extInfo,checkList)
|
|
2382
|
+
console.debug('checkDatas',this.detailField.formField.extInfo,checkList);
|
|
2383
|
+
this.changeSelect(this.detailField);
|
|
2315
2384
|
this.$forceUpdate();
|
|
2316
2385
|
this.showArea = false;
|
|
2317
2386
|
this.drawer = false;
|
|
@@ -2421,12 +2490,14 @@ export default {
|
|
|
2421
2490
|
let newVal = ''
|
|
2422
2491
|
newVal = val.replace(/ style=".*?"/g, '');
|
|
2423
2492
|
if (this.currentEditor){
|
|
2424
|
-
this.
|
|
2493
|
+
if (this.workOrderDestail){
|
|
2494
|
+
this.workOrderDestail.value = newVal;
|
|
2495
|
+
}
|
|
2425
2496
|
this.currentEditor.model.change( writer => {
|
|
2426
2497
|
writer.setSelection( writer.createPositionAt( this.currentEditor.model.document.getRoot(), 'end' ) );
|
|
2427
2498
|
});
|
|
2428
2499
|
}
|
|
2429
|
-
console.debug('workOrderDes',this.
|
|
2500
|
+
console.debug('workOrderDes',this.workOrderDestail)
|
|
2430
2501
|
},
|
|
2431
2502
|
deep:true,
|
|
2432
2503
|
immediate:true
|