1.4.5.2
This commit is contained in:
5
EdgeAdmin/web/views/@default/ns/plans/createPopup.css
Normal file
5
EdgeAdmin/web/views/@default/ns/plans/createPopup.css
Normal file
@@ -0,0 +1,5 @@
|
||||
.feature-boxes .checkbox {
|
||||
margin-right: 1em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
/*# sourceMappingURL=createPopup.css.map */
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["createPopup.less"],"names":[],"mappings":"AAAA,cACC;EACC,iBAAA;EACA,oBAAA","file":"createPopup.css"}
|
||||
97
EdgeAdmin/web/views/@default/ns/plans/createPopup.html
Normal file
97
EdgeAdmin/web/views/@default/ns/plans/createPopup.html
Normal file
@@ -0,0 +1,97 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>创建套餐</h3>
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">套餐名称 *</td>
|
||||
<td>
|
||||
<input type="text" name="name" ref="focus" maxlength="100"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>按月价格 *</td>
|
||||
<td>
|
||||
<div class="ui right labeled input">
|
||||
<input type="text" name="monthlyPrice" style="width: 6em"/>
|
||||
<span class="ui label">元/月</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>按年价格 *</td>
|
||||
<td>
|
||||
<div class="ui right labeled input">
|
||||
<input type="text" name="yearlyPrice" style="width: 6em"/>
|
||||
<span class="ui label">元/年</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h4>功能配置</h4>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">支持线路</td>
|
||||
<td>
|
||||
<div class="feature-boxes">
|
||||
<checkbox name="supportCountryRoutes">支持全球线路</checkbox>
|
||||
<checkbox name="supportChinaProvinceRoutes">支持国内省份线路</checkbox>
|
||||
<checkbox name="supportISPRoutes">支持ISP运营商线路</checkbox>
|
||||
<checkbox name="supportAgentRoutes">支持搜索引擎线路</checkbox>
|
||||
<checkbox name="supportPublicRoutes">支持官方公用线路<tip-icon content="官方公用线路即当前系统管理员创建的公用的线路。"></tip-icon></checkbox>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支持健康检查</td>
|
||||
<td>
|
||||
<checkbox name="supportHealthCheck"></checkbox>
|
||||
<p class="comment">支持对A/AAAA记录设置健康检查。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>最小TTL</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" name="minTTL" maxlength="6" style="width: 5em"/>
|
||||
<span class="ui label">秒</span>
|
||||
</div>
|
||||
<p class="comment">0表示不限制。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>域名数量限制</td>
|
||||
<td>
|
||||
<input type="text" name="maxDomains" maxlength="6"/>
|
||||
<p class="comment">0表示不限制。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单域名记录数量限制</td>
|
||||
<td>
|
||||
<input type="text" name="maxRecordsPerDomain" maxlength="6"/>
|
||||
<p class="comment">0表示不限制。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单记录负载均衡条数限制</td>
|
||||
<td>
|
||||
<input type="text" name="maxLoadBalanceRecordsPerRecord" maxlength="6"/>
|
||||
<p class="comment">0表示不限制。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>自定义线路数量限制</td>
|
||||
<td>
|
||||
<input type="text" name="maxCustomRoutes" value="" maxlength="6"/>
|
||||
<p class="comment">0表示不限制。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
6
EdgeAdmin/web/views/@default/ns/plans/createPopup.less
Normal file
6
EdgeAdmin/web/views/@default/ns/plans/createPopup.less
Normal file
@@ -0,0 +1,6 @@
|
||||
.feature-boxes {
|
||||
.checkbox {
|
||||
margin-right: 1em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
}
|
||||
79
EdgeAdmin/web/views/@default/ns/plans/index.html
Normal file
79
EdgeAdmin/web/views/@default/ns/plans/index.html
Normal file
@@ -0,0 +1,79 @@
|
||||
{$layout}
|
||||
|
||||
<first-menu>
|
||||
<menu-item @click.prevent="createPlan">[创建套餐]</menu-item>
|
||||
<span class="disabled item">|</span>
|
||||
<menu-item href="/ns/settings/user">无套餐用户设置 <i class="icon external small"></i></menu-item>
|
||||
</first-menu>
|
||||
|
||||
<not-found-box v-if="plans.length == 0">暂时还没有套餐。</not-found-box>
|
||||
|
||||
<table class="ui table selectable celled" v-if="plans.length > 0" id="sortable-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:3em"></th>
|
||||
<th>套餐名称</th>
|
||||
<th>价格</th>
|
||||
<th>最小TTL</th>
|
||||
<th>域名数量</th>
|
||||
<th>单域名记录数</th>
|
||||
<th>负载均衡条数</th>
|
||||
<th>自定义线路数</th>
|
||||
<th>内置线路</th>
|
||||
<th>健康检查</th>
|
||||
<th class="width6">状态</th>
|
||||
<th class="two op">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody v-for="plan in plans" :v-id="plan.id">
|
||||
<tr>
|
||||
<td style="text-align: center;"><i class="icon bars handle grey"></i> </td>
|
||||
<td><a href="" @click.prevent="updatePlan(plan.id)">{{plan.name}}
|
||||
<i class="icon expand small"></i></a>
|
||||
</td>
|
||||
<td>
|
||||
{{plan.monthlyPriceFormat}}元/月<br/>
|
||||
{{plan.yearlyPriceFormat}}元/年
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="plan.config.minTTL > 0">{{plan.config.minTTL}}</span>
|
||||
<span v-else class="grey">不限</span>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="plan.config.maxDomains > 0">{{plan.config.maxDomains}}</span>
|
||||
<span v-else class="grey">不限</span>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="plan.config.maxRecordsPerDomain > 0">{{plan.config.maxRecordsPerDomain}}</span>
|
||||
<span v-else class="grey">不限</span>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="plan.config.maxLoadBalanceRecordsPerRecord > 0">{{plan.config.maxLoadBalanceRecordsPerRecord}}</span>
|
||||
<span v-else class="grey">不限</span>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="plan.config.maxCustomRoutes > 0">{{plan.config.maxCustomRoutes}}</span>
|
||||
<span v-else class="grey">不限</span>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="plan.config.supportCountryRoutes">全球<br/></span>
|
||||
<span v-if="plan.config.supportChinaProvinceRoutes">国内省份<br/></span>
|
||||
<span v-if="plan.config.supportISPRoutes">ISP<br/></span>
|
||||
<span v-if="plan.config.supportAgentRoutes">搜索引擎<br/></span>
|
||||
<span v-if="plan.config.supportPublicRoutes">公用线路</span>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="plan.config.supportHealthCheck" class="green">Y</span>
|
||||
<span v-else class="disabled">N</span>
|
||||
</td>
|
||||
<td>
|
||||
<label-on :v-is-on="plan.isOn"></label-on>
|
||||
</td>
|
||||
<td>
|
||||
<a href="" @click.prevent="updatePlan(plan.id)">修改</a> <a href="" @click.prevent="deletePlan(plan.id)">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p v-if="plans.length > 0" class="comment">可以拖动左侧的<i class="icon bars"></i>排序。</p>
|
||||
51
EdgeAdmin/web/views/@default/ns/plans/index.js
Normal file
51
EdgeAdmin/web/views/@default/ns/plans/index.js
Normal file
@@ -0,0 +1,51 @@
|
||||
Tea.context(function () {
|
||||
this.$delay(function () {
|
||||
this.sortTable()
|
||||
})
|
||||
|
||||
this.createPlan = function () {
|
||||
teaweb.popup("/ns/plans/createPopup", {
|
||||
width: "42em",
|
||||
height: "30em",
|
||||
callback: function () {
|
||||
teaweb.successRefresh("保存成功")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.updatePlan = function (planId) {
|
||||
teaweb.popup("/ns/plans/plan/updatePopup?planId=" + planId, {
|
||||
width: "42em",
|
||||
height: "30em",
|
||||
callback: function () {
|
||||
teaweb.successRefresh("保存成功")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.deletePlan = function (planId) {
|
||||
let that = this
|
||||
teaweb.confirm("确定要删除此套餐吗?", function () {
|
||||
that.$post("/ns/plans/plan/delete")
|
||||
.params({
|
||||
planId: planId
|
||||
})
|
||||
.success(function () {
|
||||
teaweb.successRefresh("删除成功")
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
this.sortTable = function () {
|
||||
let that = this
|
||||
sortTable(function (ids) {
|
||||
that.$post("/ns/plans/sort")
|
||||
.params({
|
||||
ids: ids
|
||||
})
|
||||
.success(function () {
|
||||
teaweb.successToast("保存成功", 1000)
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,5 @@
|
||||
.feature-boxes .checkbox {
|
||||
margin-right: 1em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
/*# sourceMappingURL=updatePopup.css.map */
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["updatePopup.less"],"names":[],"mappings":"AAAA,cACC;EACC,iBAAA;EACA,oBAAA","file":"updatePopup.css"}
|
||||
104
EdgeAdmin/web/views/@default/ns/plans/plan/updatePopup.html
Normal file
104
EdgeAdmin/web/views/@default/ns/plans/plan/updatePopup.html
Normal file
@@ -0,0 +1,104 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>修改套餐</h3>
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<input type="hidden" name="planId" :value="plan.id"/>
|
||||
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">套餐名称 *</td>
|
||||
<td>
|
||||
<input type="text" name="name" ref="focus" maxlength="100" v-model="plan.name"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>按月价格 *</td>
|
||||
<td>
|
||||
<div class="ui right labeled input">
|
||||
<input type="text" name="monthlyPrice" style="width: 6em" v-model="plan.monthlyPrice"/>
|
||||
<span class="ui label">元/月</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>按年价格 *</td>
|
||||
<td>
|
||||
<div class="ui right labeled input">
|
||||
<input type="text" name="yearlyPrice" style="width: 6em" v-model="plan.yearlyPrice"/>
|
||||
<span class="ui label">元/年</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>启用当前套餐</td>
|
||||
<td>
|
||||
<checkbox name="isOn" v-model="plan.isOn"></checkbox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h4>功能配置</h4>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">支持线路</td>
|
||||
<td>
|
||||
<div class="feature-boxes">
|
||||
<checkbox name="supportCountryRoutes" v-model="plan.config.supportCountryRoutes">支持全球线路</checkbox>
|
||||
<checkbox name="supportChinaProvinceRoutes" v-model="plan.config.supportChinaProvinceRoutes">支持国内省份线路</checkbox>
|
||||
<checkbox name="supportISPRoutes" v-model="plan.config.supportISPRoutes">支持ISP运营商线路</checkbox>
|
||||
<checkbox name="supportAgentRoutes" v-model="plan.config.supportAgentRoutes">支持搜索引擎线路</checkbox>
|
||||
<checkbox name="supportPublicRoutes" v-model="plan.config.supportPublicRoutes">支持官方公用线路<tip-icon content="官方公用线路即当前系统管理员创建的公用的线路。"></tip-icon></checkbox>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支持健康检查</td>
|
||||
<td>
|
||||
<checkbox name="supportHealthCheck" v-model="plan.config.supportHealthCheck"></checkbox>
|
||||
<p class="comment">支持对A/AAAA记录设置健康检查。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>最小TTL</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" name="minTTL" maxlength="6" style="width: 5em" v-model="plan.config.minTTL"/>
|
||||
<span class="ui label">秒</span>
|
||||
</div>
|
||||
<p class="comment">0表示不限制。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>域名数量限制</td>
|
||||
<td>
|
||||
<input type="text" name="maxDomains" maxlength="6" v-model="plan.config.maxDomains"/>
|
||||
<p class="comment">0表示不限制。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单域名记录数量限制</td>
|
||||
<td>
|
||||
<input type="text" name="maxRecordsPerDomain" maxlength="6" v-model="plan.config.maxRecordsPerDomain"/>
|
||||
<p class="comment">0表示不限制。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单记录负载均衡条数限制</td>
|
||||
<td>
|
||||
<input type="text" name="maxLoadBalanceRecordsPerRecord" maxlength="6" v-model="plan.config.maxLoadBalanceRecordsPerRecord"/>
|
||||
<p class="comment">0表示不限制。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>自定义线路数量限制</td>
|
||||
<td>
|
||||
<input type="text" name="maxCustomRoutes" value="" maxlength="6" v-model="plan.config.maxCustomRoutes"/>
|
||||
<p class="comment">0表示不限制。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
@@ -0,0 +1,6 @@
|
||||
.feature-boxes {
|
||||
.checkbox {
|
||||
margin-right: 1em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user