|
|
@@ -426,16 +426,15 @@ function formatDict(dict) {
|
|
|
//数据选择器
|
|
|
function formatCheckbox(elem){
|
|
|
let dict = elem.typeDetail.enum
|
|
|
- elem['checkBox'] = true
|
|
|
+ // elem['checkBox'] = ''
|
|
|
return dict.map((item, index) => ({
|
|
|
text: item.enumVname,
|
|
|
value: item.enumVname
|
|
|
}));
|
|
|
}
|
|
|
-const testValue=ref('')
|
|
|
+
|
|
|
function changeDataCheckBox(e,elem){
|
|
|
- // elem.checkBox=e.detail.value.join(",")
|
|
|
- testValue.value=e.detail.value.join(",")
|
|
|
+ elem['checkBox']=e.detail.value.join(",")
|
|
|
}
|
|
|
|
|
|
// 新增重复表表单
|
|
|
@@ -710,13 +709,11 @@ function submitProcess() { // 提交表单
|
|
|
|
|
|
formElements.value.forEach(({ checkBox, tableField, defaultValue }) => {
|
|
|
if (checkBox) {
|
|
|
- if (testValue.value) {
|
|
|
- const items = testValue.value.split(",").filter(item => item.trim() !== '');
|
|
|
- items.forEach(item => {
|
|
|
- formArray.push({ name: `${tableField}_showfxx`, value: item.trim() });
|
|
|
- });
|
|
|
- }
|
|
|
- formArray.push({ name: tableField, value: testValue.value });
|
|
|
+ const items = checkBox.split(",").filter(item => item.trim() !== '');
|
|
|
+ items.forEach(item => {
|
|
|
+ formArray.push({ name: `${tableField}_showfxx`, value: item.trim() });
|
|
|
+ });
|
|
|
+ formArray.push({ name: tableField, value: checkBox });
|
|
|
} else {
|
|
|
formArray.push({ name: tableField, value: defaultValue });
|
|
|
}
|