Commit 1a1ee394 authored by “yiyousong”'s avatar “yiyousong”

pref:修改站点树形展示

parent 84747426
......@@ -65,12 +65,17 @@
position: absolute;
top: 1px;
left: -16px;
background-color: rgba(5, 149, 253, 1);
background-color: #1890ff;
}
}
.ant-input{
resize: none;
}
.ant-btn-primary{
background: linear-gradient(90deg,#5ab6ff,#2e9aff)!important;
border:none !important;
border-color: transparent !important;
}
.ant-form-explain{
position:absolute
......
......@@ -5,6 +5,7 @@
<a-tree
:load-data="onLoadData"
:tree-data="treeData"
:expandedKeys.sync="expandedKeys"
:replaceFields="{ title: 'label', key: 'id' }"
@select="onSelect"
>
......@@ -26,6 +27,7 @@ export default {
return {
treeData: [], //树结构
id: "",
expandedKeys: [],
};
},
......@@ -40,6 +42,13 @@ export default {
const { data, code } = res.data;
if (code === 1) {
this.treeData = data.data;
// let obj = {
// dataRef: {
// id: data.data[0].id,
// },
// };
// this.onLoadData(obj);
this.expandedKeys = [data.data[0].id];
}
},
......
......@@ -29,14 +29,12 @@
>
</div>
<div class="site-btn">
<a-button
type="primary"
style="margin-right: 10px"
@click="onSucessSite"
:disabled="isSite"
<a-button style="margin-right: 10px" @click="visible = false"
>取消</a-button
>
<a-button type="primary" @click="onSucessSite" :disabled="isSite"
>确定</a-button
>
<a-button @click="visible = false">取消</a-button>
</div>
</div>
</template>
......
......@@ -786,20 +786,7 @@ export default {
height: 100px;
object-fit: cover;
}
.color_title {
margin-left: 15px;
position: relative;
margin-bottom: 15px;
&::before {
content: "";
width: 4px;
height: 20px;
position: absolute;
top: 1px;
left: -16px;
background-color: rgba(5, 149, 253, 1);
}
}
.building,
.level {
position: relative;
......
......@@ -18,18 +18,20 @@
<div class="site_box">
<div class="site_message">站点信息</div>
<div class="btn-box">
<a-button
v-permission="[1]"
type="primary"
@click="handleSync(item.id)"
>同步数据</a-button
>
<a-button type="primary" @click="editSiteInfo(item)"
>编辑</a-button
>
<a-button type="danger" @click="deleteSite(item.id, index)"
>删除</a-button
>
<a-space size="middle">
<a-button
v-permission="[1]"
type="primary"
@click="handleSync(item.id)"
>同步数据</a-button
>
<a-button type="primary" @click="editSiteInfo(item)"
>编辑</a-button
>
<a-button type="danger" @click="deleteSite(item.id, index)"
>删除</a-button
>
</a-space>
</div>
</div>
......@@ -468,17 +470,17 @@ export default {
.site_message {
font-weight: 600;
}
.ant-btn-primary {
background-color: rgba(4, 202, 143, 1);
border-color: rgba(4, 202, 143, 1);
padding-left: 20px;
padding-right: 20px;
margin-right: 30px;
}
.ant-btn-danger {
padding-left: 20px;
padding-right: 20px;
}
// .ant-btn-primary {
// background-color: rgba(4, 202, 143, 1);
// border-color: rgba(4, 202, 143, 1);
// padding-left: 20px;
// padding-right: 20px;
// margin-right: 30px;
// }
// .ant-btn-danger {
// padding-left: 20px;
// padding-right: 20px;
// }
.btn-box {
margin-right: 20px;
}
......@@ -531,11 +533,13 @@ export default {
display: flex;
flex-wrap: wrap;
.item {
width: 120px;
background-color: rgba(30, 159, 255, 0.2);
margin-right: 10px;
margin-bottom: 10px;
padding: 6px 16px;
padding: 6px;
border-radius: 5px;
text-align: center;
}
}
}
......@@ -547,20 +551,6 @@ export default {
}
}
}
.color_title {
margin-left: 15px;
position: relative;
margin-bottom: 15px;
&::before {
content: "";
width: 4px;
height: 20px;
position: absolute;
top: 1px;
left: -16px;
background-color: rgba(5, 149, 253, 1);
}
}
.model_base {
/deep/.ant-col-3 {
......
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