special_list.vue 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <div>
  3. <el-button type="primary" @click="$router.push({path:'/main/special_add', query:{id:0}})" style="margin-top: 15px;margin-right: 30px;float: left">添加专题</el-button>
  4. <el-button type="primary" @click="special_list_seo_dialog_show" style="margin-top: 15px;margin-right: 30px;float: left">专题列表SEO配置</el-button>
  5. <div style="clear: both;"></div>
  6. <div style="margin-bottom: 15px"></div>
  7. <div>
  8. <el-table :data="list" border style="width: 100%" >
  9. <el-table-column prop="title" label="标题"></el-table-column>
  10. <el-table-column prop="order" label="排序" ></el-table-column>
  11. <el-table-column prop="status" label="状态" >
  12. <template slot-scope="scope">
  13. <span v-if="scope.row.status == 1">已启用</span>
  14. <span v-if="scope.row.status == 2" style="color:red">已禁用</span>
  15. </template>
  16. </el-table-column>
  17. <el-table-column prop="addtime" label="添加时间" ></el-table-column>
  18. <el-table-column prop="ctrontorl" label="操作" width="320px">
  19. <template slot-scope="scope">
  20. <el-button type="text" @click="del(scope.row.id)">删除</el-button>
  21. <el-button type="text" @click="$router.push({path:'/main/special_add', query:{id:scope.row.id}})">编辑</el-button>
  22. <el-button type="text" v-if="scope.row.status == 1" @click="status(scope.row.id,2)">下架</el-button>
  23. <el-button type="text" v-if="scope.row.status == 2" @click="status(scope.row.id,1)">上架</el-button>
  24. </template>
  25. </el-table-column>
  26. </el-table>
  27. </div>
  28. <el-dialog title="列表SEO配置" :visible.sync="special_list_seo_dialog" width="500px">
  29. <el-form :model="special_list_seo" label-width="70px">
  30. <el-form-item label="标题">
  31. <el-input v-model="special_list_seo.seo_title" autocomplete="off"></el-input>
  32. </el-form-item>
  33. <el-form-item label="关键字">
  34. <el-input v-model="special_list_seo.seo_keywords" autocomplete="off"></el-input>
  35. </el-form-item>
  36. <el-form-item label="描述">
  37. <el-input v-model="special_list_seo.seo_desc" autocomplete="off"></el-input>
  38. </el-form-item>
  39. </el-form>
  40. <div slot="footer" class="dialog-footer">
  41. <el-button size="medium" @click="special_list_seo_dialog = false">取消</el-button>
  42. <el-button size="medium" type="primary" @click="set_config">确定</el-button>
  43. </div>
  44. </el-dialog>
  45. </div>
  46. </template>
  47. <script src="./js/special_list.js"></script>