轮播图
This commit is contained in:
		| @@ -2,15 +2,13 @@ | ||||
|   <div class="appcarousel"> | ||||
|     <ai-list> | ||||
|       <template slot="title"> | ||||
|         <ai-title title="轮播图片" :isShowBottomBorder="false" :isShowArea="false"></ai-title> | ||||
|         <ai-title title="轮播图片" isShowBottomBorder></ai-title> | ||||
|       </template> | ||||
|  | ||||
|       <template slot="content"> | ||||
|         <ai-search-bar> | ||||
|           <template slot="left"> | ||||
|             <el-button type="primary" icon="iconfont iconAdd" size="small" @click="add">添加</el-button> | ||||
|           </template> | ||||
|  | ||||
|           <template slot="right"> | ||||
|             <el-input v-model="search.title" size="small" placeholder="搜索标题" clearable | ||||
|                       @keyup.enter.native=";(page.current = 1), getList()" | ||||
| @@ -28,14 +26,15 @@ | ||||
|           </el-table-column> | ||||
|  | ||||
|           <!-- 操作 --> | ||||
|           <el-table-column label="操作" align="center" width="300" slot="option"> | ||||
|           <el-table-column label="操作" align="center" width="220" slot="option"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <el-button type="text" @click="release(row)" v-if="row.status == 1">取消发布</el-button> | ||||
|               <el-button type="text" @click="release(row)" v-else>发布</el-button> | ||||
|  | ||||
|               <el-button type="text" @click="detail(row)">详情</el-button> | ||||
|               <el-button type="text" @click="edit(row)">编辑</el-button> | ||||
|               <el-button type="text" @click="remove(row.id)">删除</el-button> | ||||
|               <div class="table-options"> | ||||
|                 <el-button type="text" @click="release(row)" v-if="row.status == 1">取消发布</el-button> | ||||
|                 <el-button type="text" @click="release(row)" v-else>发布</el-button> | ||||
|                 <el-button type="text" @click="detail(row)">详情</el-button> | ||||
|                 <el-button type="text" @click="edit(row)">编辑</el-button> | ||||
|                 <el-button type="text" @click="remove(row.id)">删除</el-button> | ||||
|               </div> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
| @@ -57,12 +56,16 @@ | ||||
|         <!-- 连接类型 --> | ||||
|         <el-form-item label="链接类型" prop="type"> | ||||
|           <ai-select v-model="dialogInfo.type" placeholder="请选择链接类型" | ||||
|                      :selectList="$dict.getDict('bannerType')"></ai-select> | ||||
|                      :selectList="dict.getDict('bannerType')"></ai-select> | ||||
|         </el-form-item> | ||||
|         <!-- 链接 --> | ||||
|         <el-form-item label="链接" prop="linkUrl"> | ||||
|           <el-input placeholder="请输入链接" v-model="dialogInfo.linkUrl"></el-input> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="位置" prop="position"> | ||||
|           <ai-select v-model="dialogInfo.position" placeholder="请选择链接类型" | ||||
|                      :selectList="dict.getDict('bannerPosition')"></ai-select> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|     </ai-dialog> | ||||
|  | ||||
| @@ -83,6 +86,9 @@ | ||||
|           <ai-info-item label="链接:"> | ||||
|             <span>{{ dialogInfo.linkUrl }}</span> | ||||
|           </ai-info-item> | ||||
|           <ai-info-item label="位置:"> | ||||
|             <span>{{ this.dict.getLabel('bannerPosition', dialogInfo.position) }}</span> | ||||
|           </ai-info-item> | ||||
|         </ai-wrapper> | ||||
|       </el-form> | ||||
|  | ||||
| @@ -131,6 +137,7 @@ export default { | ||||
|         imgUrl: [], | ||||
|         type: '', | ||||
|         linkUrl: '', | ||||
|         position: '' | ||||
|       }, | ||||
|       // fileList: '', | ||||
|       formRules: { | ||||
| @@ -175,7 +182,7 @@ export default { | ||||
|   watch: {}, | ||||
|   // 实例创建后 | ||||
|   created() { | ||||
|     this.dict.load('bannerType', 'bannerSstatus').then(() => { | ||||
|     this.dict.load('bannerType', 'bannerSstatus', 'bannerPosition').then(() => { | ||||
|       this.getList() | ||||
|     }) | ||||
|     // this.getList() | ||||
| @@ -231,6 +238,7 @@ export default { | ||||
|         title: this.dialogInfo.title, | ||||
|         type: this.dialogInfo.type, | ||||
|         id: this.dialogInfo.id, | ||||
|         position: this.dialogInfo.position | ||||
|       }) | ||||
|       .then(res => { | ||||
|         if (res?.code == 0) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user