|
@@ -23,7 +23,7 @@
|
|
|
</dg-card>
|
|
|
</dg-col>
|
|
|
<!-- 人员列表区域 -->
|
|
|
- <dg-col :span="7" class="property-wapper__center">
|
|
|
+ <dg-col :span="9" class="property-wapper__center">
|
|
|
<dg-card class="box-card" header="人员列表">
|
|
|
<!-- 搜索栏 -->
|
|
|
<el-form :inline="true" class="search-form">
|
|
@@ -52,44 +52,32 @@
|
|
|
>
|
|
|
<dg-table-column type="index" width="70" label="序号"></dg-table-column>
|
|
|
<dg-table-column prop="name" label="姓名"></dg-table-column>
|
|
|
- <dg-table-column prop="idcard" label="身份证"></dg-table-column>
|
|
|
+ <dg-table-column prop="idcard" label="身份证号码"></dg-table-column>
|
|
|
<dg-table-column prop="orgName" label="单位名称"></dg-table-column>
|
|
|
</dg-table>
|
|
|
</dg-card>
|
|
|
</dg-col>
|
|
|
<!-- 权限设置 -->
|
|
|
- <dg-col :span="12" class="property-wapper__right">
|
|
|
+ <dg-col :span="10" class="property-wapper__right">
|
|
|
<dg-card class="box-card" header="权限设置">
|
|
|
- <el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
- <el-tab-pane label="表授权" name="TABLE"></el-tab-pane>
|
|
|
- <el-tab-pane label="列授权" name="COLUMN"></el-tab-pane>
|
|
|
- <dg-scrollbar>
|
|
|
- <div class="auth-group" style="height: calc(100vh - 19rem)">
|
|
|
- <div v-for="(item, index) in sortCodeList" :key="index" class="auth-group__item">
|
|
|
- <p class="auth-group__item-subTitle">{{ item.title }}</p>
|
|
|
- <div v-for="(cItem, cIndex) in item.list" :key="cIndex" class="auth-group__item-list">
|
|
|
- <i class="el-icon-document"></i><span class="list-title">{{ cItem.title }}</span
|
|
|
- ><span class="list-content"
|
|
|
- >(福建省厦门市数据资源表,福建省厦门市数据资源表,福建省厦门市数据资源表,福建省厦门市数据资源表,福建省厦门市数据资源表)</span
|
|
|
- >
|
|
|
- <span class="list-detail" @click="handleViewDetail(cItem)">详情</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </dg-scrollbar>
|
|
|
+ <el-tabs v-model="activeName">
|
|
|
+ <el-tab-pane label="表授权" name="TABLE">
|
|
|
+ <person-view-tree tab="TABLE" :idcard="idcard" :key="key"></person-view-tree>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="列授权" name="COLUMN">
|
|
|
+ <person-view-tree tab="COLUMN" :idcard="idcard" :key="key"></person-view-tree>
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</dg-card>
|
|
|
</dg-col>
|
|
|
</dg-row>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import codeTree from "../../tree.js";
|
|
|
-import detailLayer from "./detail-layer";
|
|
|
import orgTree from "@/pages/common/tree";
|
|
|
import { staffUserPage } from "@/api/role-auth-info";
|
|
|
-import { dataAuthInfoByUserId } from "@/api/data-auth.js"
|
|
|
+import personViewTree from "@/components/data-auth/person-view-tree";
|
|
|
export default {
|
|
|
- components: { orgTree },
|
|
|
+ components: { orgTree, personViewTree },
|
|
|
data() {
|
|
|
return {
|
|
|
// 激活的tab
|
|
@@ -97,23 +85,19 @@ export default {
|
|
|
rowStyle: {
|
|
|
cursor: "pointer"
|
|
|
},
|
|
|
- sortCodeList: codeTree,
|
|
|
// 查询人员姓名
|
|
|
personUrl: staffUserPage,
|
|
|
searchPersonCondition: {
|
|
|
orgId: { value: "", op: "" },
|
|
|
name: { value: "", op: "like" }
|
|
|
},
|
|
|
- clearSelectedNode: false
|
|
|
+ clearSelectedNode: false,
|
|
|
+ idcard: "",
|
|
|
+ key: 0
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
- /**
|
|
|
- * @description: 切换tab
|
|
|
- * @param {*} tab
|
|
|
- */
|
|
|
- handleClick(tab) {},
|
|
|
/**
|
|
|
* @description: 搜索人员列表
|
|
|
*/
|
|
@@ -121,6 +105,8 @@ export default {
|
|
|
this.clearSelectedNode = true;
|
|
|
this.searchPersonCondition.orgId.value = "";
|
|
|
this.$refs.personTable.searchForm();
|
|
|
+ this.idcard = "";
|
|
|
+ this.key++;
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -128,29 +114,9 @@ export default {
|
|
|
* @param {*} row
|
|
|
*/
|
|
|
handleTableRowClick(row) {
|
|
|
- this.getAuthData(row.id);
|
|
|
- },
|
|
|
- /**
|
|
|
- * @description: 点击码表详情,弹框
|
|
|
- * @param {*} item
|
|
|
- */
|
|
|
- handleViewDetail(item) {
|
|
|
- const layer = this.$dgLayer({
|
|
|
- title: "详情",
|
|
|
- content: detailLayer,
|
|
|
- props: {},
|
|
|
- on: {
|
|
|
- success(params) {
|
|
|
- layer.close(layer.dialogIndex);
|
|
|
- }
|
|
|
- },
|
|
|
- cancel: function (index, layero) {
|
|
|
- // 关闭对应弹窗的ID
|
|
|
- layer.close(index);
|
|
|
- return false;
|
|
|
- },
|
|
|
- area: ["880px", "720px"]
|
|
|
- });
|
|
|
+ if (row.idcard == this.idcard) return;
|
|
|
+ this.idcard = row.idcard;
|
|
|
+ this.key++;
|
|
|
},
|
|
|
/**
|
|
|
* @description: 获取机构节点
|
|
@@ -161,6 +127,8 @@ export default {
|
|
|
if (oldValue !== id) {
|
|
|
this.searchPersonCondition.orgId.value = id;
|
|
|
this.$refs.personTable.searchForm();
|
|
|
+ this.idcard = "";
|
|
|
+ this.key++;
|
|
|
}
|
|
|
},
|
|
|
// 默认获取根节点
|
|
@@ -169,21 +137,12 @@ export default {
|
|
|
this.handleGetNode({ id });
|
|
|
});
|
|
|
},
|
|
|
- /**
|
|
|
+ /**
|
|
|
* @description: 设置清除选中节点标志
|
|
|
* @param {*} val
|
|
|
*/
|
|
|
getClearNodesFlag(val) {
|
|
|
this.clearSelectedNode = val;
|
|
|
- },
|
|
|
- getAuthData(userId) {
|
|
|
- const params = {
|
|
|
- authType: "TABLE",
|
|
|
- userId
|
|
|
- }
|
|
|
- dataAuthInfoByUserId(params).then(res => {
|
|
|
-
|
|
|
- })
|
|
|
}
|
|
|
},
|
|
|
created() {},
|
|
@@ -237,32 +196,4 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-@media screen and (max-width: 1365px) {
|
|
|
- .auth-group__item-list {
|
|
|
- .list-content {
|
|
|
- width: 400px;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-@media screen and(max-width: 1560px) and (min-width: 1366px) {
|
|
|
- .auth-group__item-list {
|
|
|
- .list-content {
|
|
|
- width: 450px;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-@media screen and(max-width: 1670px) and (min-width: 1560px) {
|
|
|
- .auth-group__item-list {
|
|
|
- .list-content {
|
|
|
- width: 500px;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-@media screen and (max-width: 1800px) and (min-width: 1671px) {
|
|
|
- .auth-group__item-list {
|
|
|
- .list-content {
|
|
|
- width: 580px;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
</style>
|