Browse Source

Merge branch 'lwx_14'

# Conflicts:
#	src/types/components.d.ts
qin_v11_master
超级管理员 1 year ago
parent
commit
b30c0ebdc4
  1. 1
      src/components/DesignForm/app/formPage.vue
  2. 13
      src/components/DesignForm/formControlAttr.vue
  3. 17
      src/components/DesignForm/formControlPropertiNew.vue
  4. 3
      src/components/DesignForm/public/form/formGroup.vue
  5. 90
      src/widget/associatedforms/associatedForms.vue
  6. 7
      src/widget/associatedforms/index.vue

1
src/components/DesignForm/app/formPage.vue

@ -690,6 +690,7 @@ const appFormSubmit = (params = {}) => {
}
return
}
console.log(params)
validate((valid: boolean, fields: any) => {
if (valid) {
const formatParams = Object.assign({}, fields, params)

13
src/components/DesignForm/formControlAttr.vue

@ -2034,6 +2034,7 @@ function formidChangedOptionsValue3(){
}
const associatedFormsCurrentFormFieldTree = ref<Tree[]>()
const associatedFormsCurrentFormFieldTreeNoTable = ref<Tree[]>()
const associatedFormsCurrentFormFieldTreeForGlxxsz = ref<Tree[]>()
let associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf = ref<Tree[]>()
let resDataForGlxxszExceptself: any[] = []
@ -2047,6 +2048,7 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => {
//alert("cfid")
}else{
let resData = ref(data.children)
let resDataNoTable = JSON.parse(JSON.stringify(data.children))
//let rootid_ = data.value.label
associatedFormsCurrentFormFieldTree.value = [{
id: 'rootid_'+data.label,
@ -2056,6 +2058,15 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => {
treeAttrs: data.treeAttrs,
}]
resDataNoTable = resDataNoTable.filter((item: { type: string | null }) => item.type!="table")
associatedFormsCurrentFormFieldTreeNoTable.value = [{
id: 'rootid_'+data.label,
label: '当前表单-'+data.treeAttrs.show,
children: [...resDataNoTable],
treeAttrs: data.treeAttrs,
}]
let resDataForGlxxsz = ref(data.children.slice(8))
resDataForGlxxszExceptself = JSON.parse(JSON.stringify(resDataForGlxxsz.value));
@ -3477,7 +3488,7 @@ const disabledIstrue = (val:string) => {
multiple
clearable
collapse-tags
:data="associatedFormsCurrentFormFieldTree"
:data="associatedFormsCurrentFormFieldTreeNoTable"
:render-after-expand="false"
style="width: 240px"
/>

17
src/components/DesignForm/formControlPropertiNew.vue

@ -2076,6 +2076,7 @@ function formidChangedOptionsValue3(){
}
const associatedFormsCurrentFormFieldTree = ref<Tree[]>()
const associatedFormsCurrentFormFieldTreeNoTable = ref<Tree[]>()
const associatedFormsCurrentFormFieldTreeForGlxxsz = ref<Tree[]>()
let associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf = ref<Tree[]>()
let resDataForGlxxszExceptself: any[] = []
@ -2089,20 +2090,30 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => {
//alert("cfid")
}else{
let resData = ref(data.children)
let resDataNoTable = JSON.parse(JSON.stringify(data.children))
//let rootid_ = data.value.label
associatedFormsCurrentFormFieldTree.value = [{
id: 'rootid_'+data.label,
//label: '',
label: '当前表单-'+data.treeAttrs.show,
children: [...resData.value],
treeAttrs: data.treeAttrs,
}]
resDataNoTable = resDataNoTable.filter((item: { type: string | null }) => item.type!="table")
associatedFormsCurrentFormFieldTreeNoTable.value = [{
id: 'rootid_'+data.label,
label: '当前表单-'+data.treeAttrs.show,
children: [...resDataNoTable],
treeAttrs: data.treeAttrs,
}]
let resDataForGlxxsz = ref(data.children.slice(8))
resDataForGlxxszExceptself = JSON.parse(JSON.stringify(resDataForGlxxsz.value));
// console.log(resDataForGlxxszExceptself)
@ -3526,7 +3537,7 @@ const disabledIstrue = (val:string) => {
multiple
clearable
collapse-tags
:data="associatedFormsCurrentFormFieldTree"
:data="associatedFormsCurrentFormFieldTreeNoTable"
:render-after-expand="false"
style="width: 240px"
/>

3
src/components/DesignForm/public/form/formGroup.vue

@ -353,6 +353,7 @@ const linksIf = (obj: FormList) => {
//
const injectBtnEvent:any = inject(constFormBtnEvent)
const clickBtn = (control: any) => {
console.log(control)
// 0: '',
// 1: '',
// 2: '',
@ -576,7 +577,7 @@ function optionsValue3Get1(data: any,fieldName: string){
<AssociatedForms v-else-if="element.type === 'associatedForms'" :data="element" />
<AssociatedForms v-else-if="element.type === 'associatedForms'" :data="element" :form-props="formProps" :tablekey="props.tableinfo" />
<LowcodeImage v-else-if="element.type === 'lowcodeImage'" :data="element" />
<LowcodeTransfer v-else-if="element.type === 'lowcodeTransfer'" :data="element" />

90
src/widget/associatedforms/associatedForms.vue

@ -2,51 +2,81 @@
<!-- <el-input v-model="input" style="width: 240px" placeholder="" /> -->
<el-select v-model="value1" placeholder="请选择" style="width: 240px">
<el-select v-model="value1" placeholder="请选择" style="width: 240px" @change="asfValueChanged">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</template>
<script setup>
<script lang='ts' setup>
import request from '@/utils/request';
import { formProps } from 'element-plus';
const props = defineProps({
import { FormItem, FormList } from '@/api/DesignForm/types'
/* const props = defineProps({
// eslint-disable-next-line vue/require-default-prop
data: {
type: Object,
}
})
const value1 = ref('')
const options = [
{
value: 'Option1',
label: 'Option1',
},
{
value: 'Option2',
label: 'Option2',
},
{
value: 'Option3',
label: 'Option3',
},
{
value: 'Option4',
label: 'Option4',
formProps:{
type: Object,
},
{
value: 'Option5',
label: 'Option5',
tableKey:{
type: Object,
},
]
}) */
const props = withDefaults(
defineProps<{
data: FormList
formProps:Object
tablekey: any
}>(),
{}
)
const emits = defineEmits(["valueChanged"]);
const value1 = ref('')
const options = ref([])
onMounted(()=>{
console.log(props.data.control.hideConditionHtml)
console.log(props.data.control.dataRangeConditionHtml)
console.log(props.data.control)
if(props.data.control.formid!=null&&props.data.control.formid!=""){
getAsfDataTitles().then(({ data }) => {
//console.log(data)
options.value = data
});
}
})
function asfValueChanged(){
emits("valueChanged",value1.value)
}
function getAsfDataTitles() {
let dataTitle = ''
if(props.tablekey.dataTitle!=null&&props.tablekey.dataTitle.length>0){
for(let i = 0;i<props.tablekey.dataTitle.length;i++){
dataTitle = dataTitle+props.tablekey.dataTitle[i]+"###"
}
}
return request({
url: '/javasys/lowCode/AssociatedForms/getAsfDataTitles',
method: 'post',
data: {
formId:props.data.control.formid,
dataTitle:dataTitle,
rangeFormula:props.data.control.dataRangeGongShi.mathsFormula,
rangeString:props.data.control.dataRangeGongShi.mathsString,
hideFormula:props.data.control.hideGongShi.mathsFormula,
hideString:props.data.control.hideGongShi.mathsString,
},
});
}
</script>
<style></style>

7
src/widget/associatedforms/index.vue

@ -14,7 +14,7 @@
<input v-model="value" type="hidden" >
</el-form-item>
<AssociatedForms :data="props.data"></AssociatedForms>
<AssociatedForms :data="props.data" :form-props="formProps" :tablekey="props.tablekey" @value-changed="valueChanged"></AssociatedForms>
</template>
<script lang='ts' setup>
import AssociatedForms from './associatedForms.vue';
@ -154,7 +154,12 @@ const formatCustomRules = () => {
const valueChanged = (val:any) =>{
console.log("关联表单选择--->",val)
value.value = val
}

Loading…
Cancel
Save