|
|
|
@ -18,7 +18,7 @@ import { |
|
|
|
} from '@/api/DesignForm/utils' |
|
|
|
import { Md5 } from 'ts-md5'; |
|
|
|
import { jsonParseStringify } from '@/utils/DesignForm' |
|
|
|
|
|
|
|
import request from '@/utils/request'; |
|
|
|
import { AnalysisCss } from '@/components/DesignForm/public/form/calculate/cssInfo.ts' |
|
|
|
|
|
|
|
const props = withDefaults( |
|
|
|
@ -471,6 +471,28 @@ function asfValueChanged(val:any){ |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(val.fillFieldsChild.length>0){ |
|
|
|
/* console.log(val.asfFormId) |
|
|
|
console.log(val.masterOnField) */ |
|
|
|
let fillFieldsChild = JSON.parse(val.fillFieldsChild); |
|
|
|
if (fillFieldsChild && fillFieldsChild.length > 0) { |
|
|
|
fillFieldsChild = fillFieldsChild.filter((element:any)=>{ |
|
|
|
if(containsDangerousWords(element.filterCondition.gongShi.mathsFormula)){ |
|
|
|
//alert("筛选条件非法") |
|
|
|
console.log("筛选条件非法===>"+element.filterCondition.conditionHtml) |
|
|
|
}else{ |
|
|
|
return element |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
//console.log(fillFieldsChild) |
|
|
|
getAsfTableFill(val.asfFormId,val.glbbddbd,val.currentVal,fillFieldsChild).then(({ data }) => { |
|
|
|
console.log(data) |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//emits("asfValueChanged",val) |
|
|
|
if(val.options.length>0){ |
|
|
|
//console.log(val.options) |
|
|
|
@ -508,6 +530,54 @@ function asfValueChanged(val:any){ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
function getAsfTableFill(asfFormId:any,glbbddbd:any,currentVal:any,fillFieldsChild:any){ |
|
|
|
/* console.log(asfFormId) |
|
|
|
console.log(glbbddbd) |
|
|
|
console.log(fillFieldsChild) */ |
|
|
|
/* asfFormId = JSON.stringify(asfFormId) |
|
|
|
glbbddbd = JSON.stringify(glbbddbd) |
|
|
|
currentVal = JSON.stringify(currentVal) */ |
|
|
|
fillFieldsChild = JSON.stringify(fillFieldsChild) |
|
|
|
return request({ |
|
|
|
url: '/javasys/lowCode/AssociatedForms/getAsfTableFill', |
|
|
|
method: 'post', |
|
|
|
data: { |
|
|
|
asfFormId:asfFormId, |
|
|
|
glbbddbd:glbbddbd, |
|
|
|
currentVal:currentVal, |
|
|
|
fillFieldsChild:fillFieldsChild, |
|
|
|
}, |
|
|
|
}); |
|
|
|
} |
|
|
|
function containsDangerousWords(str: string | undefined): boolean { |
|
|
|
if (str === undefined) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
const dangerousWords = new Set<string>([ |
|
|
|
"drop", |
|
|
|
"table", |
|
|
|
"where", |
|
|
|
"select", |
|
|
|
"insert", |
|
|
|
"update", |
|
|
|
"delete", |
|
|
|
"and", |
|
|
|
"or", |
|
|
|
"union", |
|
|
|
"order by", |
|
|
|
"group by", |
|
|
|
"having", |
|
|
|
"exec", |
|
|
|
"execute", |
|
|
|
]); |
|
|
|
const words = str.split(" "); |
|
|
|
for (const word of words) { |
|
|
|
if (dangerousWords.has(word.toLowerCase())) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
function isString(value: any): value is string { |
|
|
|
return typeof value === 'string'; |
|
|
|
} |
|
|
|
|