This commit is contained in:
shijing 2022-07-18 16:50:04 +08:00
commit cbb1920724
1 changed files with 21 additions and 28 deletions

View File

@ -8,6 +8,7 @@
<el-button
type="primary"
icon="el-icon-plus"
v-auth="area.create"
@click="handleForm('add')"
></el-button>
</div>
@ -32,12 +33,10 @@
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
@resetQuery="resetQuery"
@row-click="rowClick"
@row-click="rowClick"
>
<el-table-column
label="序号"
type="index"
@ -126,6 +125,7 @@
text
type="primary"
size="small"
v-auth="area.bind_rail"
@click="handleRail(scope.row)"
>围栏</el-button
>
@ -133,6 +133,7 @@
text
type="warning"
size="small"
v-auth="area.update"
@click="handleForm('edit', scope.row)"
>编辑</el-button
>
@ -141,7 +142,7 @@
@confirm="handleDel(scope.row, scope.$index)"
>
<template #reference>
<el-button text type="danger" size="small"
<el-button text type="danger" size="small" v-auth="area.delete"
>删除</el-button
>
</template>
@ -159,6 +160,7 @@
<el-button
type="primary"
icon="el-icon-plus"
v-auth="access.create"
@click="handleFormaccess('add')"
></el-button>
</div>
@ -183,19 +185,17 @@
ref="accesstable"
:data="apiaccessObj"
row-key="id"
stripe
@resetQuery="resetQuery"
>
<el-table-column
label="序号"
type="index"
fixed="left"
fixed="left"
width="50"
></el-table-column>
<el-table-column label="准入类型" fixed="left" min-width="100">
<el-table-column label="准入类型" fixed="left" min-width="100">
<template #default="scope">
<span v-if="scope.row.type == 10">准入</span>
<span v-else>禁入</span>
@ -204,13 +204,14 @@
<el-table-column
label="对象类型"
fixed="left"
fixed="left"
prop="obj_cate"
min-width="100"
>
<template #default="scope">{{
cate_[scope.row.obj_cate]
}}</template></el-table-column>
<template #default="scope">{{
cate_[scope.row.obj_cate]
}}</template></el-table-column
>
<el-table-column
label="最短停留时间(分)"
prop="stay_minute_min"
@ -249,13 +250,12 @@
>
<template #default="scope">
<el-button-group>
<el-popconfirm
title="确定删除吗?"
@confirm="handleDelaccess(scope.row, scope.$index)"
>
<template #reference>
<el-button text type="danger" size="small"
<el-button text type="danger" size="small" v-auth="access.delete"
>删除</el-button
>
</template>
@ -331,15 +331,10 @@ export default {
apiaccessObj: [],
areaId: null,
areaName: "",
cate_:
{ post: "岗位" ,
org: "单位" ,
people: "人员"
},
cate_: { post: "岗位", org: "单位", people: "人员" },
};
},
mounted() {
mounted() {
this.getAccessList();
},
methods: {
@ -365,14 +360,12 @@ export default {
}
});
},
//
rowClick(row) {
this.$API.am.access.list.req({ area:row.id, page: 0 }).then((res) => {
//
rowClick(row) {
this.$API.am.access.list.req({ area: row.id, page: 0 }).then((res) => {
this.apiaccessObj = res;
});
this.area = row.id;
this.area = row.id;
},
//
handleRail(row) {
@ -391,7 +384,7 @@ export default {
}
});
},
//
//
getAccessList() {
this.$API.am.access.list.req({ page: 0 }).then((res) => {
this.apiaccessObj = res;