normal.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <div class="basic__layout__panel">
  3. <div style="padding:16px 16px 0 16px;" class="flex-align-center flex-between" >
  4. <div class="flex-align-center ">
  5. <div class="inline-16" v-if="activeApp" style="font-size:26px;font-weight:300">{{customTitle ? customTitle : activeApp.meta.title}}&nbsp;
  6. <div v-if="!customTitle" style="display:inline">
  7. <img width="20" v-if="showAppCollection()" src="@/assets/icons/incoll.svg" alt="">
  8. <img width="20" v-else src="@/assets/icons/uncoll.svg" @click="addToAsideBar" alt="">
  9. </div>
  10. </div>
  11. <slot name="titleRight"></slot>
  12. </div>
  13. <div>
  14. <slot name="refresh"></slot>
  15. </div>
  16. </div>
  17. <slot name="content"></slot>
  18. <drawer></drawer>
  19. </div>
  20. </template>
  21. <script>
  22. import {mapGetters} from 'vuex'
  23. export default {
  24. props:['tableName','idName','tableData','apiId','formPath','oldFormPath','options','autoQuery','detailPath','customTitle','hidePagination'],
  25. components:{
  26. drawer:() => import('./drawerDetail/drawer'),
  27. },
  28. computed:{
  29. ...mapGetters({
  30. activeApp:'activeApp',
  31. searchValue:'searchValue',
  32. menuApp:'menuApp',
  33. })
  34. },
  35. data () {
  36. return {
  37. }
  38. },
  39. methods:{
  40. // 创建快捷应用
  41. async addToAsideBar () {
  42. const res = await this.$api.requested({
  43. "classname": "sysmanage.develop.userauthforweb.userauth",
  44. "method": "create_usershortcuts",
  45. "content": {
  46. "systemappid":this.activeApp.systemappid
  47. }
  48. })
  49. this.$store.dispatch('setAppMenu')
  50. },
  51. showAppCollection () {
  52. let _isSame = this.menuApp.some(m=>this.activeApp.name === m.systemapp)
  53. return _isSame
  54. },
  55. refresh () {
  56. this.$emit('onRefresh')
  57. }
  58. },
  59. mounted () {
  60. },
  61. created () {
  62. }
  63. }
  64. </script>
  65. <style>
  66. .layout-header-panel .el-input-group__append, .el-input-group__prepend{
  67. background-color: #fff !important;
  68. color: #999 !important;
  69. border: 1px solid #dcdfe6 !important;
  70. cursor: pointer;
  71. }
  72. </style>
  73. <style scoped>
  74. /* .basic__layout__panel{
  75. padding: 16px 0;
  76. } */
  77. .card__list{
  78. display: flex;
  79. }
  80. .collection{
  81. color: orange !important;
  82. }
  83. </style>