mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-28 21:46:36 +08:00
[节点]可以设置节点区域
This commit is contained in:
23
web/views/@default/clusters/regions/selectPopup.html
Normal file
23
web/views/@default/clusters/regions/selectPopup.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>选择分组</h3>
|
||||
|
||||
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<input type="hidden" name="regionId" :value="regionId"/>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">选择区域</td>
|
||||
<td>
|
||||
<div v-if="regions.length > 0">
|
||||
<a href="" class="ui label small basic" v-for="region in regions" :class="{blue:region.id == regionId}" style="margin-bottom:0.5em" @click.prevent="selectRegion(region)">{{region.name}}</a>
|
||||
<p class="comment">点击可已选中要使用的区域。</p>
|
||||
</div>
|
||||
<div v-else>
|
||||
<p class="comment">暂时还没有可以使用的区域。</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn>确定</submit-btn>
|
||||
</form>
|
||||
8
web/views/@default/clusters/regions/selectPopup.js
Normal file
8
web/views/@default/clusters/regions/selectPopup.js
Normal file
@@ -0,0 +1,8 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifyPopup
|
||||
this.regionId = 0
|
||||
|
||||
this.selectRegion = function (region) {
|
||||
this.regionId = region.id
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user