Browse Source

Merge branch 'lwx_v21'

lwx_v22
herenshan112 8 months ago
parent
commit
6bf247e512
  1. 67
      src/components/DesignForm/formControlPropertiNew.vue
  2. 2
      src/components/DesignForm/public/form/formItem.vue
  3. 4
      src/widget/associatedforms/associatedForms.vue

67
src/components/DesignForm/formControlPropertiNew.vue

@ -804,15 +804,15 @@ const attrList = computed(() => {
vIf: state.isSearch, vIf: state.isSearch,
vShow: ["videoUpAndPlay"], vShow: ["videoUpAndPlay"],
}, },
/* { {
label: '上传图片', label: '默认图片',
value: config.lowcodeImage, value: config.lowcodeImage,
path: 'config.lowcodeImage', path: 'config.lowcodeImage',
type: 'lowcodeImage_url', type: 'lowcodeImage_url',
vIf: state.isSearch, vIf: state.isSearch,
vShow: ['lowcodeImage'] vShow: ['lowcodeImage']
}, },
{ /*{
label: '尺寸', label: '尺寸',
value: config.lowcodeImage, value: config.lowcodeImage,
path: 'config.lowcodeImage', path: 'config.lowcodeImage',
@ -2356,7 +2356,12 @@ function formidChanged() {
(obj: { type: string }) => obj.type !== "table" (obj: { type: string }) => obj.type !== "table"
); );
//console.log(dataExceptChild) //console.log(dataExceptChild)
dataExceptChild = removeFirstNumElements(dataExceptChild, 8); //dataExceptChild = removeFirstNumElements(dataExceptChild, 8);
dataExceptChild.splice(0, 2);
dataExceptChild.splice(2, 4);
dataOnlyChild = dataOnlyChild.filter( dataOnlyChild = dataOnlyChild.filter(
(obj: { type: string }) => obj.type == "table" (obj: { type: string }) => obj.type == "table"
); );
@ -2556,6 +2561,31 @@ function getAssociatedFormsCurrentFieldTree1() {
}, },
]; ];
//liwenxuan bug start 250409
let resDataHasTableButNoTableChild = JSON.parse(JSON.stringify(data.children));
resDataHasTableButNoTableChild.splice(0,2);
resDataHasTableButNoTableChild.splice(2,4);
resDataHasTableButNoTableChild.forEach((element: any) => {
if(element.type&&element.type=="table"){
element.children = []
element.disabled = false
}
let currentIdArr = element.id.split(":")
//console.log(currentIdArr)
let currentId = currentIdArr[currentIdArr.length-1]
//console.log(currentId)
if(currentId==controlData.value.name){
/* alert(currentId)
console.log(currentId) */
element.disabled = true
}
});
//liwenxuan bug end 250409
resDataNoTable = resDataNoTable.filter( resDataNoTable = resDataNoTable.filter(
(item: { type: string | null }) => item.type != "table" (item: { type: string | null }) => item.type != "table"
); );
@ -2574,11 +2604,16 @@ function getAssociatedFormsCurrentFieldTree1() {
treeAttrs: data.treeAttrs, treeAttrs: data.treeAttrs,
}, },
]; ];
//console.log(resDataNoTable)
associatedFormsCurrentFormFieldTreeNoTable1.value = [...resDataNoTable]; associatedFormsCurrentFormFieldTreeNoTable1.value = [...resDataNoTable];
//liwenxuan ,bug start 250409
let resDataForGlxxsz = ref(data.children.slice(8)); /* let r1 = JSON.parse(JSON.stringify(data.children));
r1.splice(0,2);
r1.splice(2,4); */
//let resDataForGlxxsz = ref(data.children.slice(8));
let resDataForGlxxsz = ref(resDataHasTableButNoTableChild);
//liwenxuan ,bug end 250409
resDataForGlxxszExceptself = JSON.parse(JSON.stringify(resDataForGlxxsz.value)); resDataForGlxxszExceptself = JSON.parse(JSON.stringify(resDataForGlxxsz.value));
associatedFormsCurrentFormFieldTreeForGlxxsz.value = [ associatedFormsCurrentFormFieldTreeForGlxxsz.value = [
@ -2751,6 +2786,7 @@ function handleRoleTreeContextmenuRange(
} }
import { ElTree } from "element-plus"; import { ElTree } from "element-plus";
import { forEach } from "jszip";
const fieldTreeFilterText = ref(""); const fieldTreeFilterText = ref("");
const orgTreeFilterText = ref(""); const orgTreeFilterText = ref("");
@ -3284,6 +3320,8 @@ watch(
) )
); );
} else { } else {
console.log(changedOptions)
console.log(controlData.value.control.glxxsz)
for (var i = 0; i < changedOptions.length; i++) { for (var i = 0; i < changedOptions.length; i++) {
if (controlData.value.control.glxxsz[i] === undefined) { if (controlData.value.control.glxxsz[i] === undefined) {
//option //option
@ -4127,6 +4165,17 @@ const updataBase = (val: any) => {
</el-input> </el-input>
</div> </div>
</el-row> </el-row>
<el-row v-else-if="item.type === 'lowcodeImage_url'">
<el-upload
:action="uploadUrl" :before-remove="beforeRemove"
:on-success="lowcodeImageUploadSuccess"
:on-error="videoUploadErr"
:limit="1"
accept=".jpg,.jpeg,.png,.tif,.tga,.bmp,.dds,.svg,.eps,.pdf,.hdr,.raw,.exr,.psd,.afphoto,.afdesign">
<el-button v-if="!controlData.control.uploadFlag" type="primary">默认图片</el-button>
<el-button v-if="controlData.control.uploadFlag" type="primary">已上传默认图片,点击修改</el-button>
</el-upload>
</el-row>
<!-- <el-row v-else-if="item.type === 'lowcodeImage_radius'"> <!-- <el-row v-else-if="item.type === 'lowcodeImage_radius'">
<el-switch v-model="controlData.control.radius" style="margin-right: 15px;"/> <el-switch v-model="controlData.control.radius" style="margin-right: 15px;"/>
<el-popover <el-popover
@ -5795,7 +5844,7 @@ const updataBase = (val: any) => {
@del-role="delRole" @del-role="delRole"
@child-role-right-changed="childRoleRightChanged" @child-role-right-changed="childRoleRightChanged"
> >
</AssociatedFormsFillRole> </AssociatedFormsFillRole><!-- -->
</template> </template>
</div> </div>
</div> </div>

2
src/components/DesignForm/public/form/formItem.vue

@ -1051,7 +1051,7 @@ const diGuiJilian = (val: any, options: any[]) => {
/> />
<!--关联表单--> <!--关联表单-->
<AssociatedForms <AssociatedForms
v-else-if="judgeIsShow(data.name) && data.type === 'associatedForms' && type != 4" v-else-if="judgeIsShow(data.name) && data.type === 'associatedForms'"
:data="data" :data="data"
:form-props="formProps" :form-props="formProps"
:tablekey="props.tablekey" :tablekey="props.tablekey"

4
src/widget/associatedforms/associatedForms.vue

@ -3,10 +3,10 @@
<div class="container"> <div class="container">
<!-- <span style="font-size: 14px; margin-right: 12px;padding-top: 4px;" class="small-span" >{{ props.data.item?props.data.item.label:"关联表单" }}</span> --> <!-- <span style="font-size: 14px; margin-right: 12px;padding-top: 4px;" class="small-span" >{{ props.data.item?props.data.item.label:"关联表单" }}</span> -->
<el-select v-if="!tableFlag" v-model="value1" placeholder="请选择" class="big-span" @change="asfValueChanged"> <el-select v-if="!tableFlag" v-model="value1" :placeholder="data.config.help" class="big-span" @change="asfValueChanged">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
<el-select v-if="tableFlag" v-model="value2" placeholder="请选择" class="big-span" @change="asfValueChangedTable"> <el-select v-if="tableFlag" v-model="value2" :placeholder="data.config.help" class="big-span" @change="asfValueChangedTable">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</div> </div>

Loading…
Cancel
Save