优化代码

This commit is contained in:
java110 2022-10-18 19:03:07 +08:00
parent 0de409b14d
commit bd965ac364
2 changed files with 50 additions and 66 deletions

View File

@ -1,5 +1,4 @@
<div id="editReportCustomComponentFooterModel" class="modal fade" tabindex="-1" role="dialog"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div id="editReportCustomComponentFooterModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
@ -16,9 +15,7 @@
</span>
</label>
<div class="col-sm-10">
<input v-model="editReportCustomComponentFooterInfo.name" type="text"
:placeholder="vc.i18n('必填,请填写名称','editReportCustomComponentFooter')"
class="form-control">
<input v-model="editReportCustomComponentFooterInfo.name" type="text" :placeholder="vc.i18n('必填,请填写名称','editReportCustomComponentFooter')" class="form-control">
</div>
</div>
<div class="form-group row">
@ -28,10 +25,9 @@
</span>
</label>
<div class="col-sm-10">
<select class="custom-select"
v-model="editReportCustomComponentFooterInfo.queryModel">
<select class="custom-select" v-model="editReportCustomComponentFooterInfo.queryModel">
<option selected disabled value="">
{{vc.i18n('必填','editReportCustomComponentFooter')}},请选择查询方式
{{vc.i18n('必填,请选择查询方式','editReportCustomComponentFooter')}}
</option>
<option value="1">sql</option>
<option value="2">java</option>
@ -41,18 +37,14 @@
<div class="form-group row" v-if="editReportCustomComponentFooterInfo.queryModel == 1">
<label class="col-sm-2 col-form-label">sql</label>
<div class="col-sm-10">
<textarea v-model="editReportCustomComponentFooterInfo.componentSql" rows="15"
:placeholder="vc.i18n('选填,请填写执行','editReportCustomComponentFooter')sql"
class="form-control">
<textarea v-model="editReportCustomComponentFooterInfo.componentSql" rows="15" :placeholder="vc.i18n('选填请填写执行sql','editReportCustomComponentFooter')" class="form-control">
</textarea>
</div>
</div>
<div class="form-group row" v-if="editReportCustomComponentFooterInfo.queryModel == 2">
<label class="col-sm-2 col-form-label">java</label>
<div class="col-sm-10">
<textarea v-model="editReportCustomComponentFooterInfo.javaScript" rows="15"
:placeholder="vc.i18n('选填,请填写执行','editReportCustomComponentFooter')java脚本代码"
class="form-control">
<textarea v-model="editReportCustomComponentFooterInfo.javaScript" rows="15" :placeholder="vc.i18n('选填请填写执行java脚本代码','editReportCustomComponentFooter')" class="form-control">
</textarea>
</div>
</div>
@ -63,19 +55,15 @@
</span>
</label>
<div class="col-sm-10">
<textarea v-model="editReportCustomComponentFooterInfo.remark" type="text"
:placeholder="vc.i18n('选填,请填写描述','editReportCustomComponentFooter')"
class="form-control">
<textarea v-model="editReportCustomComponentFooterInfo.remark" type="text" :placeholder="vc.i18n('选填,请填写描述','editReportCustomComponentFooter')" class="form-control">
</textarea>
</div>
</div>
<div class="ibox-content">
<button class="btn btn-primary float-right" type="button"
v-on:click="editReportCustomComponentFooter()">
<button class="btn btn-primary float-right" type="button" v-on:click="editReportCustomComponentFooter()">
<i class="fa fa-check"></i>&nbsp;保存
</button>
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
data-dismiss="modal">
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">
<span>
<vc:i18n name="取消" namespace="editReportCustomComponentFooter"></vc:i18n>
</span>
@ -87,4 +75,4 @@
</div>
</div>
</div>
</div>
</div>

View File

@ -7,11 +7,9 @@
<span><vc:i18n name="统计" namespace="reportCustomComponentFooterManage"></vc:i18n></span>
</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-white btn-sm"
v-on:click="_goBack()">返回
<button type="button" class="btn btn-white btn-sm" v-on:click="_goBack()">返回
</button>
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_openAddReportCustomComponentFooterModal()">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddReportCustomComponentFooterModal()">
<i class="fa fa-plus"></i>添加
</button>
</div>
@ -19,58 +17,56 @@
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<span><vc:i18n name="统计" namespace="reportCustomComponentFooterManage"></vc:i18n></span>ID
</th>
<th class="text-center">
<span><vc:i18n name="名称" namespace="reportCustomComponentFooterManage"></vc:i18n></span>
</th>
<th class="text-center">
<span>
<tr>
<th class="text-center">
<span><vc:i18n name="统计" namespace="reportCustomComponentFooterManage"></vc:i18n></span>ID
</th>
<th class="text-center">
<span><vc:i18n name="名称" namespace="reportCustomComponentFooterManage"></vc:i18n></span>
</th>
<th class="text-center">
<span>
<vc:i18n name="查询方式" namespace="reportCustomComponentFooterManage"></vc:i18n>
</span>
</th>
<th class="text-center">
<span><vc:i18n name="描述" namespace="reportCustomComponentFooterManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="操作" namespace="reportCustomComponentFooterManage"></vc:i18n></span>
</th>
</tr>
</th>
<th class="text-center">
<span><vc:i18n name="描述" namespace="reportCustomComponentFooterManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="操作" namespace="reportCustomComponentFooterManage"></vc:i18n></span>
</th>
</tr>
</thead>
<tbody>
<tr v-for="reportCustomComponentFooter in reportCustomComponentFooterManageInfo.reportCustomComponentFooters">
<td class="text-center">{{reportCustomComponentFooter.footerId}}</td>
<td class="text-center">{{reportCustomComponentFooter.name}}</td>
<td class="text-center">{{reportCustomComponentFooter.queryModel}}</td>
<td class="text-center">{{reportCustomComponentFooter.remark}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openEditReportCustomComponentFooterModel(reportCustomComponentFooter)">
<tr v-for="reportCustomComponentFooter in reportCustomComponentFooterManageInfo.reportCustomComponentFooters">
<td class="text-center">{{reportCustomComponentFooter.footerId}}</td>
<td class="text-center">{{reportCustomComponentFooter.name}}</td>
<td class="text-center">{{reportCustomComponentFooter.queryModel}}</td>
<td class="text-center">{{reportCustomComponentFooter.remark}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_openEditReportCustomComponentFooterModel(reportCustomComponentFooter)">
<span>
<vc:i18n name="修改" namespace="reportCustomComponentFooterManage"></vc:i18n>
</span>
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openDeleteReportCustomComponentFooterModel(reportCustomComponentFooter)">
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_openDeleteReportCustomComponentFooterModel(reportCustomComponentFooter)">
<span>
<vc:i18n name="删除" namespace="reportCustomComponentFooterManage"></vc:i18n>
</span>
</button>
</div>
</td>
</tr>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
@ -81,5 +77,5 @@
</div>
<vc:create path="dev/addReportCustomComponentFooter" callBackListener="" callBackFunction=""></vc:create>
<vc:create path="dev/editReportCustomComponentFooter"></vc:create>
<vc:create path="dev/deleteReportCustomComponentFooter"></vc:create>
</div>
<!-- <vc:create path="dev/deleteReportCustomComponentFooter"></vc:create> -->
</div>