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

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

parent 8331223a
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<a-button type="primary" @click="editSiteInfo(item)" <a-button type="primary" @click="editSiteInfo(item)"
>编辑</a-button >编辑</a-button
> >
<a-button type="danger" @click="deleteSite(item.id)" <a-button type="danger" @click="deleteSite(item.id, index)"
>删除</a-button >删除</a-button
> >
</div> </div>
...@@ -200,16 +200,10 @@ ...@@ -200,16 +200,10 @@
</div> </div>
<div v-else class="empty-show"> <div v-else class="empty-show">
<a-empty description="暂无站点" /> <a-empty description="暂无站点" />
<div class="btn_box" v-if="!siteData.length">
<div style="width: 200px">
<a-button block size="large" @click="addSiteAll"
>新增站点</a-button
>
</div>
</div>
</div> </div>
<!-- 切换站点 --> <!-- 切换站点 -->
<!-- <div class="cut-btn"> <div class="cut-btn flex aic jcb">
<div> <div>
<a-icon <a-icon
type="vertical-right" type="vertical-right"
...@@ -217,6 +211,13 @@ ...@@ -217,6 +211,13 @@
@click="changePage(-1)" @click="changePage(-1)"
/> />
</div> </div>
<div class="btn_box">
<div style="width: 200px">
<a-button block size="large" @click="addSiteAll"
>新增站点</a-button
>
</div>
</div>
<div> <div>
<a-icon <a-icon
type="vertical-left" type="vertical-left"
...@@ -224,7 +225,7 @@ ...@@ -224,7 +225,7 @@
@click="changePage(1)" @click="changePage(1)"
/> />
</div> </div>
</div> --> </div>
</div> </div>
</a-spin> </a-spin>
</div> </div>
...@@ -323,7 +324,7 @@ export default { ...@@ -323,7 +324,7 @@ export default {
}, },
// 删除 // 删除
deleteSite(val) { deleteSite(val, index) {
let _this = this; let _this = this;
this.$confirm({ this.$confirm({
title: "系统提示", title: "系统提示",
...@@ -339,7 +340,11 @@ export default { ...@@ -339,7 +340,11 @@ export default {
let { code, msg } = res.data; let { code, msg } = res.data;
if (code === 1) { if (code === 1) {
_this.$message.success(msg); _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() { onCancel() {
...@@ -431,6 +436,7 @@ export default { ...@@ -431,6 +436,7 @@ export default {
height: 100%; height: 100%;
padding-left: 20px; padding-left: 20px;
display: flex; display: flex;
flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.rigth-content { .rigth-content {
...@@ -438,6 +444,7 @@ export default { ...@@ -438,6 +444,7 @@ export default {
height: 100%; height: 100%;
} }
.cut-btn { .cut-btn {
width: 100%;
margin-top: 30px; margin-top: 30px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
...@@ -363,6 +363,6 @@ module.exports = { ...@@ -363,6 +363,6 @@ module.exports = {
blackapp: { blackapp: {
list: `${BASE_URL}/base/device/blackapp/list`, list: `${BASE_URL}/base/device/blackapp/list`,
save: `${BASE_URL}/base/device/blackapp/save`, 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