index.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <div>
  3. <basicLayout
  4. ref="list"
  5. formPath="promotion"
  6. tableName="promotionTable"
  7. idName="sa_promotionid"
  8. :apiId="{query:20221230144803,del:20221230144903}"
  9. :options="options"
  10. :detailPath="{
  11. path:'/promotionDetail'
  12. }">
  13. <div slot="custom">
  14. <div class="label_center">
  15. <p class="search__label">状态:</p>
  16. <el-select @clear="$refs.list.param.content.pageNumber = 1 ;$refs.list.param.content.where.status = '';$refs.list.listData()" v-model="status" clearable style="margin-right:10px" size="small" placeholder="请选择状态" @change="$refs.list.param.content.pageNumber = 1 ;$refs.list.param.content.where.status = status;$refs.list.listData()">
  17. <el-option label="新建" value="新建" />
  18. <el-option label="审核" value="审核" />
  19. <el-option label="发布" value="发布" />
  20. <el-option label="关闭" value="关闭" />
  21. </el-select>
  22. </div>
  23. </div>
  24. <template v-slot:tbList="scope">
  25. <div v-if="scope.data.column.data[[scope.data.column.columnname]]">
  26. <span v-if="scope.data.column.columnname == 'status'">
  27. <span style="color:#333333" v-if="scope.data.column.data[[scope.data.column.columnname]] == '新建'">{{scope.data.column.data[[scope.data.column.columnname]]}}</span>
  28. <span style="color:#3874f6" v-else-if="scope.data.column.data[[scope.data.column.columnname]] == '审核'">{{scope.data.column.data[[scope.data.column.columnname]]}}</span>
  29. <span style="color:#52C41A" v-else-if="scope.data.column.data[[scope.data.column.columnname]] == '发布'">{{scope.data.column.data[[scope.data.column.columnname]]}}</span>
  30. </span>
  31. <span v-else>
  32. {{scope.data.column.data[[scope.data.column.columnname]]}}
  33. </span>
  34. </div>
  35. <div v-if="scope.data.column.columnname != 'operation' && !scope.data.column.data[[scope.data.column.columnname]] && scope.data.column.data[[scope.data.column.columnname]] !== 0">--</div>
  36. </template>
  37. <template v-slot:tbOpreation="scope">
  38. </template>
  39. </basicLayout>
  40. </div>
  41. </template>
  42. <script>
  43. export default {
  44. data () {
  45. return {
  46. options:[],
  47. status:''
  48. }
  49. },
  50. methods:{
  51. }
  52. }
  53. </script>
  54. <style>
  55. </style>