Commit 28cfdb95 authored by “yiyousong”'s avatar “yiyousong”

pref:修改可以一个区域添加多个站点

parent 8331223a
......@@ -27,7 +27,7 @@
<a-button type="primary" @click="editSiteInfo(item)"
>编辑</a-button
>
<a-button type="danger" @click="deleteSite(item.id)"
<a-button type="danger" @click="deleteSite(item.id, index)"
>删除</a-button
>
</div>
......@@ -200,31 +200,32 @@
</div>
<div v-else class="empty-show">
<a-empty description="暂无站点" />
<div class="btn_box" v-if="!siteData.length">
</div>
<!-- 切换站点 -->
<div class="cut-btn flex aic jcb">
<div>
<a-icon
type="vertical-right"
v-if="active > 0"
@click="changePage(-1)"
/>
</div>
<div class="btn_box">
<div style="width: 200px">
<a-button block size="large" @click="addSiteAll"
>新增站点</a-button
>
</div>
</div>
<div>
<a-icon
type="vertical-left"
v-if="siteData.length > 1 && active < siteData.length - 1"
@click="changePage(1)"
/>
</div>
</div>
<!-- 切换站点 -->
<!-- <div class="cut-btn">
<div>
<a-icon
type="vertical-right"
v-if="active > 0"
@click="changePage(-1)"
/>
</div>
<div>
<a-icon
type="vertical-left"
v-if="siteData.length > 1 && active < siteData.length - 1"
@click="changePage(1)"
/>
</div>
</div> -->
</div>
</a-spin>
</div>
......@@ -323,7 +324,7 @@ export default {
},
// 删除
deleteSite(val) {
deleteSite(val, index) {
let _this = this;
this.$confirm({
title: "系统提示",
......@@ -339,7 +340,11 @@ export default {
let { code, msg } = res.data;
if (code === 1) {
_this.$message.success(msg);
_this.getSiteList({ areaID: _this.areaID });
_this.siteData.splice(index, 1);
if (index > 0) {
_this.active -= 1;
}
// _this.getSiteList({ areaID: _this.areaID });
}
},
onCancel() {
......@@ -431,6 +436,7 @@ export default {
height: 100%;
padding-left: 20px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.rigth-content {
......@@ -438,6 +444,7 @@ export default {
height: 100%;
}
.cut-btn {
width: 100%;
margin-top: 30px;
display: flex;
justify-content: space-between;
......
......@@ -363,6 +363,6 @@ module.exports = {
blackapp: {
list: `${BASE_URL}/base/device/blackapp/list`,
save: `${BASE_URL}/base/device/blackapp/save`,
delete: `${BASE_URL}/device/blackapp/delete`,
delete: `${BASE_URL}/base/device/blackapp/delete`,
},
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment