Compare commits

...

1 Commits

Author SHA1 Message Date
玉安君 766faf222d fix commit
修复了管理企业的已知bug
2024-03-29 20:24:44 +08:00
1 changed files with 38 additions and 14 deletions

View File

@ -1,14 +1,14 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" size="small"> <el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" size="small">
<!-- <el-form-item label="企业名称" prop="companySign">--> <!-- <el-form-item label="企业名称" prop="companySign">-->
<!-- <treeselect--> <!-- <treeselect-->
<!-- v-model="queryParams.companySign"--> <!-- v-model="queryParams.companySign"-->
<!-- :options="deptOptions"--> <!-- :options="deptOptions"-->
<!-- :show-count="true"--> <!-- :show-count="true"-->
<!-- placeholder="请选择上级部门"--> <!-- placeholder="请选择上级部门"-->
<!-- />--> <!-- />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="名称" prop="deptName"> <el-form-item label="名称" prop="deptName">
<el-input <el-input
v-model="queryParams.deptName" v-model="queryParams.deptName"
@ -77,7 +77,7 @@
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
row-key="deptId" row-key="deptId"
> >
<el-table-column label="部门名称" prop="deptName" width="260"></el-table-column> <el-table-column label="企业/部门名称" prop="deptName" width="260"></el-table-column>
<el-table-column label="企业标识" prop="companySign" width="200"></el-table-column> <el-table-column label="企业标识" prop="companySign" width="200"></el-table-column>
<el-table-column label="状态" prop="status" width="100"> <el-table-column label="状态" prop="status" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
@ -108,7 +108,7 @@
>新增 >新增
</el-button> </el-button>
<el-button <el-button
v-if="scope.row.parentId != 0" v-show="scope.row.parentId !== 0"
v-hasPermi="['system:dept:remove']" v-hasPermi="['system:dept:remove']"
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
@ -116,10 +116,29 @@
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>删除 >删除
</el-button> </el-button>
<!-- 删除入驻企业-->
<el-button
v-show="scope.row.parentId === 0 && scope.row.companySign !== 'ZL'"
v-hasPermi="['system:dept:remove']"
icon="el-icon-delete"
size="mini"
type="text"
@click="handleDelete(scope.row)"
>删除
</el-button>
<!-- <el-button-->
<!-- v-show="scope.row.parentId != 0"-->
<!-- v-hasPermi="['system:dept:remove']"-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- >删除-->
<!-- </el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- {{deptList}}-->
<!-- 企业入驻对话框 --> <!-- 企业入驻对话框 -->
<el-dialog :title="title" :visible.sync="openCompany" append-to-body width="600px"> <el-dialog :title="title" :visible.sync="openCompany" append-to-body width="600px">
@ -271,7 +290,7 @@ export default {
// //
open: false, open: false,
// //
openCompany:false, openCompany: false,
// //
isExpandAll: true, isExpandAll: true,
// //
@ -309,7 +328,8 @@ export default {
trigger: "blur" trigger: "blur"
} }
] ]
} },
myCompanySign: "ZL"
}; };
}, },
created() { created() {
@ -436,7 +456,11 @@ export default {
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => { }).catch(() => {
}); });
} },
// isZLParent(data) {
// console.dir("" + data + (data.companySign !== this.myCompanySign))
// return data.parentId !== 0 || data.companySign === this.companySign
// }
} }
}; };
</script> </script>