前后端模板
这篇文章分享iview加python项目的基本模板。
前端代码
<div class="home-page" id="first124466">
<div>
<span>业务名称:</span>
<i-select v-model="searchmodel.bizid" style="width:150px">
<i-option v-for="item in bussinesslistall" :value="item.bk_biz_id">{
{
item.bk_biz_name }}</i-option>
</i-select>
<span>主机列表</span>
<i-select v-model="searchmodel.iplist" multiple style="width:300px">
<i-option v-for="item in hostlist"
:value="item.bk_host_innerip">{
{
item.bk_host_innerip }}</i-option>
</i-select>
<span>模板名称:</span>
<i-input placeholder="" v-model="searchmodel.name" style="width:200px"></i-input>
<span>开始时间:</span>
<Date-picker type="datetime" placeholder="结束日期和时间" style="width: 200px" format="yyyy-MM-dd HH:mm:ss"
v-model="searchmodel.starttime"></Date-picker>
<i-button type="primary" @click="addone" style="float:right;">新增</i-button>
<i-button type="primary" @click="searchlist" style="float:right;margin-right: 10px;">查询</i-button>
</div>
<div style="margin-top:10px;">
<i-table :columns="columns" :data="tablelist"></i-table>
</div>
<div>
<Modal
v-model="modal"
title="新建巡检模板"
@on-ok="ok"
@on-cancel="cancel">
<div class="thediv">
<span>业务名称</span>
<i-select v-model="createmodel.bizid" style="width:300px">
<i-option v-for="item