|
|
@ -45,7 +45,8 @@ const formData = computed({ |
|
|
emits('update:formData', val) |
|
|
emits('update:formData', val) |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
const isLookAll = ref(false) |
|
|
|
|
|
const isEditAll = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//当前节点操作权限 |
|
|
//当前节点操作权限 |
|
|
@ -88,9 +89,12 @@ const savePromoter = () => { |
|
|
}) |
|
|
}) |
|
|
let powerAry = []; |
|
|
let powerAry = []; |
|
|
if(powerUnitAry.value.recUnitAry.masterUnitList && powerUnitAry.value.recUnitAry.masterUnitList.length > 0){ |
|
|
if(powerUnitAry.value.recUnitAry.masterUnitList && powerUnitAry.value.recUnitAry.masterUnitList.length > 0){ |
|
|
|
|
|
|
|
|
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item:any)=>{ |
|
|
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item:any)=>{ |
|
|
|
|
|
|
|
|
powerAry.push(item) |
|
|
powerAry.push(item) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
if(powerUnitAry.value.recUnitAry.sunUnitList && powerUnitAry.value.recUnitAry.sunUnitList.length > 0){ |
|
|
if(powerUnitAry.value.recUnitAry.sunUnitList && powerUnitAry.value.recUnitAry.sunUnitList.length > 0){ |
|
|
powerUnitAry.value.recUnitAry.sunUnitList.forEach((item:any)=>{ |
|
|
powerUnitAry.value.recUnitAry.sunUnitList.forEach((item:any)=>{ |
|
|
@ -168,6 +172,29 @@ const jieForm = () => { |
|
|
.then((data)=>{ |
|
|
.then((data)=>{ |
|
|
if(data.code == 0){ |
|
|
if(data.code == 0){ |
|
|
powerUnitAry.value = data.data |
|
|
powerUnitAry.value = data.data |
|
|
|
|
|
|
|
|
|
|
|
if(powerUnitAry.value.recUnitAry.masterUnitList && powerUnitAry.value.recUnitAry.masterUnitList.length > 0){ |
|
|
|
|
|
let allToal = powerUnitAry.value.recUnitAry.masterUnitList.length |
|
|
|
|
|
let isAll = 0 |
|
|
|
|
|
let editAll = 0 |
|
|
|
|
|
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item:any)=>{ |
|
|
|
|
|
if(item.isLook){ |
|
|
|
|
|
isAll++ |
|
|
|
|
|
} |
|
|
|
|
|
if(item.isEdit){ |
|
|
|
|
|
editAll++ |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
if(isAll == allToal){ |
|
|
|
|
|
isLookAll.value = true |
|
|
|
|
|
} |
|
|
|
|
|
if(editAll == allToal){ |
|
|
|
|
|
isEditAll.value = true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
@ -179,6 +206,76 @@ watch(()=>visible.value,(val:boolean)=>{ |
|
|
}) |
|
|
}) |
|
|
const nodeSetUp = ref("first") |
|
|
const nodeSetUp = ref("first") |
|
|
const contentpage = ref("") |
|
|
const contentpage = ref("") |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
@ 作者: 秦东 |
|
|
|
|
|
@ 时间: 2024-07-25 15:43:09 |
|
|
|
|
|
@ 功能: 选择情况 |
|
|
|
|
|
*/ |
|
|
|
|
|
const editOpenOrClose = (val: any) => { |
|
|
|
|
|
if(powerUnitAry.value.recUnitAry.masterUnitList){ |
|
|
|
|
|
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item:any)=>{ |
|
|
|
|
|
item.isEdit = val |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
const lookOpenOrClose = (val: boolean) => { |
|
|
|
|
|
if(powerUnitAry.value.recUnitAry.masterUnitList){ |
|
|
|
|
|
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item:any)=>{ |
|
|
|
|
|
item.isLook = val |
|
|
|
|
|
if(!val){ |
|
|
|
|
|
item.isEdit = val |
|
|
|
|
|
isEditAll.value = val |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
/** |
|
|
|
|
|
@ 作者: 秦东 |
|
|
|
|
|
@ 时间: 2024-07-25 16:09:18 |
|
|
|
|
|
@ 功能: 操作单一可见 |
|
|
|
|
|
*/ |
|
|
|
|
|
const oneLookSet = (val: any) => { |
|
|
|
|
|
if(!val.isLook){ |
|
|
|
|
|
val.isEdit = val |
|
|
|
|
|
isEditAll.value = val |
|
|
|
|
|
} |
|
|
|
|
|
if(powerUnitAry.value.recUnitAry.masterUnitList){ |
|
|
|
|
|
let lookAll = 0 |
|
|
|
|
|
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item:any)=>{ |
|
|
|
|
|
if(item.isLook){ |
|
|
|
|
|
lookAll++ |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
if(lookAll != powerUnitAry.value.recUnitAry.masterUnitList.length){ |
|
|
|
|
|
isLookAll.value = false |
|
|
|
|
|
}else{ |
|
|
|
|
|
isLookAll.value = true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
/** |
|
|
|
|
|
@ 作者: 秦东 |
|
|
|
|
|
@ 时间: 2024-07-25 16:17:32 |
|
|
|
|
|
@ 功能: 操作单一可编辑 |
|
|
|
|
|
*/ |
|
|
|
|
|
const oneEditSet = (val: any) => { |
|
|
|
|
|
if(powerUnitAry.value.recUnitAry.masterUnitList){ |
|
|
|
|
|
let lookAll = 0 |
|
|
|
|
|
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item:any)=>{ |
|
|
|
|
|
if(item.isEdit){ |
|
|
|
|
|
lookAll++ |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
if(lookAll != powerUnitAry.value.recUnitAry.masterUnitList.length){ |
|
|
|
|
|
isEditAll.value = false |
|
|
|
|
|
}else{ |
|
|
|
|
|
isEditAll.value = true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
<template> |
|
|
<template> |
|
|
<el-drawer v-model="visible" :append-to-body="true" title="发起人" class="set_promoter" :show-close="false" :size="550" :before-close="closeDrawer"> |
|
|
<el-drawer v-model="visible" :append-to-body="true" title="发起人" class="set_promoter" :show-close="false" :size="550" :before-close="closeDrawer"> |
|
|
@ -204,16 +301,23 @@ const contentpage = ref("") |
|
|
<!-- <el-divider content-position="left">操作权限</el-divider> --> |
|
|
<!-- <el-divider content-position="left">操作权限</el-divider> --> |
|
|
<div class="info_box"> |
|
|
<div class="info_box"> |
|
|
<div class="table_name"><el-text class="mx-1" type="primary">主表</el-text></div> |
|
|
<div class="table_name"><el-text class="mx-1" type="primary">主表</el-text></div> |
|
|
<el-table v-if="powerUnitAry.recUnitAry.masterUnitList" :data="powerUnitAry.recUnitAry.masterUnitList" size="small" style="width: 100%; --el-table-border-color: none;" :header-cell-style="{background:'#eef1f6',color:'#606266'}" class="customer-no-border-table" > |
|
|
<el-table v-if="powerUnitAry.recUnitAry.masterUnitList" :data="powerUnitAry.recUnitAry.masterUnitList" size="small" style="width: 100%; --el-table-border-color: none;" :header-cell-style="{background:'#eef1f6',color:'#606266'}" class="customer-no-border-table" |
|
|
|
|
|
> |
|
|
<el-table-column prop="name" label="字段" /> |
|
|
<el-table-column prop="name" label="字段" /> |
|
|
<el-table-column label="可见" align="center" width="80"> |
|
|
<el-table-column align="center" width="80"> |
|
|
|
|
|
<template #header> |
|
|
|
|
|
<el-checkbox v-model="isLookAll" label="" @change="lookOpenOrClose" />可见 |
|
|
|
|
|
</template> |
|
|
<template #default="scope"> |
|
|
<template #default="scope"> |
|
|
<el-checkbox v-model="scope.row.isLook" label="" /> |
|
|
<el-checkbox v-model="scope.row.isLook" label="" @change="oneLookSet(scope.row)" /> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="可编辑" align="center" width="80"> |
|
|
<el-table-column align="center" width="120"> |
|
|
|
|
|
<template #header> |
|
|
|
|
|
<el-checkbox v-model="isEditAll" label="" @change="editOpenOrClose" />可编辑 |
|
|
|
|
|
</template> |
|
|
<template #default="scope"> |
|
|
<template #default="scope"> |
|
|
<el-checkbox v-model="scope.row.isEdit" label="" /> |
|
|
<el-checkbox v-model="scope.row.isEdit" label="" @change="oneEditSet(scope.row)" /> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
|