Browse Source

删除role1.0

lwx_v8
liwenxuan 2 years ago
parent
commit
160afee4fd
  1. 1
      src/components/DesignForm/assembly/index.ts
  2. 23
      src/components/DesignForm/formControlAttr.vue

1
src/components/DesignForm/assembly/index.ts

@ -609,6 +609,7 @@ const selectOption: any = [
{
leftValue:'',
rightValue:'',
id:'',
}
],
},

23
src/components/DesignForm/formControlAttr.vue

@ -1567,6 +1567,8 @@
element.imgId = onlyNumber;
}
});
}else if(controlData.value.type==='associatedForms'){
controlData.value.control.fillRoles[0].id = uuidv4().replaceAll('-','').toString();
}
})
//
@ -2128,15 +2130,22 @@ watch(()=>store.activeKey, () => {
function addFillRole(){
let onlyNumber = uuidv4().replaceAll('-','').toString(); //
controlData.value.control.fillRoles.push({
leftValue:'',
rightValue:'',
id:onlyNumber,
})
}
function delRole(val:number){
controlData.value.control.fillRoles.splice(val, 1);
console.log(controlData.value.control.fillRoles)
function delRole(id:String){
const delRoleData:any = controlData.value.control.fillRoles
for (var i = 0; i < delRoleData.length; i++) {
if(delRoleData[i].id===id){
delRoleData.splice(i, 1);
i--; //
}
}
}
@ -3554,7 +3563,7 @@ const loadNextPage = () => {
<el-dialog v-model="associatedFormsFillRolesDialogFlag" title="数据填充规则" top="150px" :close-on-click-modal="false" :show-close="false" style="margin-top:70px ;min-height: 500px" width="50%" >
<el-dialog v-model="associatedFormsFillRolesDialogFlag" title="数据填充规则" top="150px" :close-on-click-modal="false" :show-close="false" style="margin-top:70px ;min-height: 500px" width="40%" >
<template v-if="controlData.type=='associatedForms'">
<el-divider style="margin-top: 0px;" />
@ -3563,8 +3572,8 @@ const loadNextPage = () => {
<el-divider />
<div style="height:300px;border:1px solid white;overflow-y:auto">
<template v-for="(item, index) in controlData.control.fillRoles" :key="index">
<AssociatedFormsFillRole v-model:left-value="controlData.control.fillRoles[index].leftValue" v-model:right-value="controlData.control.fillRoles[index].rightValue" :left-tree-source = "asfasfFieldTree[0].children" :right-tree-source = "associatedFormsCurrentFormFieldTree[0].children" :current-key="index" @del-Role = "delRole" ></AssociatedFormsFillRole>
<template v-for="(item, index) in controlData.control.fillRoles" :key="controlData.control.fillRoles[index].id">
<AssociatedFormsFillRole v-model:left-value="controlData.control.fillRoles[index].leftValue" v-model:right-value="controlData.control.fillRoles[index].rightValue" :left-tree-source = "asfasfFieldTree[0].children" :right-tree-source = "associatedFormsCurrentFormFieldTree[0].children" :current-key="controlData.control.fillRoles[index].id" @del-Role = "delRole" ></AssociatedFormsFillRole>
</template>
@ -3572,7 +3581,7 @@ const loadNextPage = () => {
</template>
<template #footer>
<div class="dialog-footer">
<el-button @click="asfhTextCancelFillRoles">取消</el-button>
<!-- <el-button @click="asfhTextCancelFillRoles">取消</el-button> -->
<el-button type="primary" @click="handleDetermineFillRoles">
确定
</el-button>

Loading…
Cancel
Save