index.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <div>
  3. <basicLayout
  4. ref="basicLayout"
  5. :oldFormPath="{
  6. add:'bgj/ServiceMaterialClass/modules',
  7. }"
  8. tableName="brandTable"
  9. idName="sa_brandid"
  10. :apiId="{query:20220922085104,del:20220922085203}"
  11. :options="options"
  12. >
  13. <div slot="custom">
  14. </div>
  15. <div slot="titleRight" style="display:flex;margin-left:10px">
  16. <add v-if="tool.checkAuth($route.name,'create')" @onSuccess="$refs.basicLayout.listData()"></add>
  17. </div>
  18. <template v-slot:tbList="scope">
  19. <div v-if="scope.data.column.columnname === 'brandLoge'">
  20. <previewImage v-if="scope.data.column.data.attinfos && scope.data.column.data.attinfos[0]" style="height:40px;width:40px;" :image="scope.data.column.data.attinfos[0]" :list="scope.data.column.data.attinfos" :deletebtn="false"></previewImage>
  21. </div>
  22. <div v-else>
  23. {{$t(scope.data.column.data[[scope.data.column.columnname]])}}
  24. </div>
  25. </template>
  26. <template v-slot:tbOpreation="scope">
  27. <edit v-if="tool.checkAuth($route.name,'update')" :data="scope.data.data" @onSuccess="$refs.basicLayout.listData()" :type="'text'"></edit>
  28. <brand_del v-if="tool.checkAuth($route.name,'onDelete')" :data="scope.data.data" @onSuccess="$refs.basicLayout.listData()" :type="'text'"></brand_del>
  29. </template>
  30. </basicLayout>
  31. </div>
  32. </template>
  33. <script>
  34. import edit from './modules/edit'
  35. import brand_del from './modules/delete'
  36. import add from './modules/add'
  37. import previewImage from '@/components/previewImage/index'
  38. export default {
  39. components:{
  40. edit,
  41. brand_del,
  42. add,
  43. previewImage
  44. },
  45. data () {
  46. return {
  47. options:[
  48. ],
  49. search: {}
  50. }
  51. },
  52. computed:{
  53. },
  54. methods:{
  55. }
  56. }
  57. </script>
  58. <style>
  59. </style>