|
@@ -116,9 +116,9 @@
|
|
|
</template>
|
|
|
<ul v-else class="menu_lists" style="width:100%">
|
|
|
<li v-for="item in authList" :key="item.ClassifyName" class="menu_item">
|
|
|
- <el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" :disabled="($route.path=='/updateCustom'&&item.ClassifyName === '宏观经济') || item.disabled" @change="handleCheckAll(item)" style="marginRight:30px;fontWeight:bold;minWidth:90px;">{{item.ClassifyName+':'}}</el-checkbox>
|
|
|
+ <el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" :disabled="setSelectPerDisabled(item)" @change="handleCheckAll(item,'auth')" style="marginRight:30px;fontWeight:bold;minWidth:90px;">{{item.ClassifyName+':'}}</el-checkbox>
|
|
|
<el-checkbox-group v-model="item.CheckList" @change="handleChecked(item)">
|
|
|
- <el-checkbox v-for="list in item.Items" :label="list.ChartPermissionId" :key="list.ChartPermissionId" class="list_item" :disabled="list.disabled||($route.path=='/updateCustom'&&list.ChartPermissionId==1)">{{list.PermissionName}}</el-checkbox>
|
|
|
+ <el-checkbox v-for="list in item.Items" :label="list.ChartPermissionId" :key="list.ChartPermissionId" class="list_item" :disabled="list.disabled||($route.path=='/updateCustom'&&list.IsPublic==1)">{{list.PermissionName}}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -523,6 +523,8 @@ export default {
|
|
|
})
|
|
|
}else {
|
|
|
res.Data.List.length&&res.Data.List.forEach(item => {
|
|
|
+ item.Items=item.Items||[]
|
|
|
+ const temarr=item.Items?item.Items.filter(_e=>_e.IsPublic==1):[]
|
|
|
item.Items=item.Items.map(item2=>{
|
|
|
return{
|
|
|
...item2,
|
|
@@ -530,8 +532,8 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
let obj = {
|
|
|
- checkAll:false,
|
|
|
- isIndeterminate:item.ClassifyName === '宏观经济'?true:false,
|
|
|
+ checkAll:item.Items.length>0?temarr.length==item.Items.length:false,
|
|
|
+ isIndeterminate:item.Items.length>0?temarr.length==item.Items.length?false:item.Items.some(_e=>_e.IsPublic==1):false,
|
|
|
...item,
|
|
|
}
|
|
|
newArr.push(obj)
|
|
@@ -541,6 +543,11 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ setSelectPerDisabled(data){
|
|
|
+ const arr=data.Items?data.Items.filter(_e=>_e.IsPublic==1):[]
|
|
|
+ return (this.$route.path=='/updateCustom'&&arr.length==data.Items.length) || data.disabled
|
|
|
+ //($route.path=='/updateCustom'&&item.IsPublic==1) || item.disabled
|
|
|
+ },
|
|
|
/* 获取历史签约 */
|
|
|
getDealList() {
|
|
|
customInterence.historydeal({
|
|
@@ -757,7 +764,22 @@ export default {
|
|
|
this.$router.push({path:`/${this.$route.meta.pathFrom}`})
|
|
|
},
|
|
|
/* 选择全选或取消全选 */
|
|
|
- handleCheckAll(item) {
|
|
|
+ handleCheckAll(item,type) {
|
|
|
+ if(type=='auth'){
|
|
|
+ //获取公有的id合集
|
|
|
+ let publicIds=[]
|
|
|
+
|
|
|
+
|
|
|
+ let ids = item.Items.map(item =>{
|
|
|
+ if(item.IsPublic==1){
|
|
|
+ publicIds.push(item.ChartPermissionId)
|
|
|
+ }
|
|
|
+ return item.ChartPermissionId
|
|
|
+ })
|
|
|
+ item.CheckList = item.checkAll ? ids : publicIds;
|
|
|
+ item.isIndeterminate = publicIds.length>0&&!item.checkAll?true:false;
|
|
|
+ return
|
|
|
+ }
|
|
|
// 取到所有的子菜单id
|
|
|
let ids = item.Items.map(item =>{
|
|
|
return item.ChartPermissionId
|