Files

71 lines
2.3 KiB
HTML

{include file="../application/admin/view/inc/head.html" /}
<el-breadcrumb separator="/">
<el-breadcrumb-item><i class="el-icon-s-home"></i><a href="/okadmin">系统首页</a></el-breadcrumb-item>
<el-breadcrumb-item>{$pagemodel}</el-breadcrumb-item>
</el-breadcrumb>
<div class="clearfix pdtb10">
<div class="fl">
<el-button type="success" icon="el-icon-plus" size="mini" @click="edit(-1)">添加模板</el-button>
</div>
<div class="fr">共{{total}}个模板</div>
</div>
<table>
<thead>
<tr>
<th width="80">ID</th><th>模板名称</th><th>描述</th><th width="120">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="(items,index) in lists">
<td>{{items.id}}</td>
<td>{{items.name}}</td>
<td>{{items.dec}}</td>
<td>
<el-button type="text" @click="yulan(index)">预览</el-button>
<el-button type="text" @click="del(index)">删除</el-button>
</td>
</tr>
</tbody>
</table>
<div class="listtip" style="display:none;" v-show="isloading || lists.length<1">{{datatxt}}</div>
<el-dialog
:title="ac.type=='add'?'添加模板':'修改模板'"
:visible.sync="iseditshow"
width="800px"
:show-close="false"
:close-on-press-escape="false"
:close-on-click-modal="false"
>
<div>
<el-form ref="one" :model="one" :rules="oneRulue" label-width="80px">
<el-form-item label="名称" prop="name">
<el-input v-model="one.name"></el-input>
</el-form-item>
<el-form-item label="模板" prop="file">
<el-input v-model="one.file" id="onefile" readonly placeholder="点击上传模板" @click="fileClick"></el-input>
<el-upload
class="upload-demo"
action="/okadmin/templateupload"
:on-success="upok"
:before-upload="beforeAvatarUpload"
:show-file-list="false">
<el-button size="small" type="primary">点击上传HTML文件</el-button>
</el-upload>
</el-form-item>
<el-form-item label="描述" prop="dec">
<el-input type="textarea" rows="4" v-model="one.dec"></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="iseditshow = false" size="small">取 消</el-button>
<el-button type="primary" @click="editSub('one')" size="small">确 定</el-button>
</span>
</el-dialog>
{include file="../application/admin/view/inc/foot.html" /}
<script src="/model/admin/templates.js"></script>
</body>
</html>