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