basicinfo.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <div class="container normal-panel normal-margin panel" style="display:flex">
  3. <div>
  4. <el-descriptions>
  5. <el-descriptions-item label="企业名称">{{enterprise.enterprisename?enterprise.enterprisename:'--'}}</el-descriptions-item>
  6. <el-descriptions-item label="企业简称">{{enterprise.abbreviation}}</el-descriptions-item>
  7. <el-descriptions-item label="法人">{{enterprise.contact}}</el-descriptions-item>
  8. <el-descriptions-item label="电话">{{enterprise.phonenumber}}</el-descriptions-item>
  9. <!-- <el-descriptions-item label="企业互联ID">苏州市</el-descriptions-item> -->
  10. </el-descriptions>
  11. <el-descriptions direction="vertical">
  12. <el-descriptions-item label="企业操作页LOGO">
  13. <div class="image-panel" style="margin-left:10px">
  14. <img v-show="img.usetype === 'actionlogo'" v-for="img in siteinfo.attinfos" :key="img.index" style="width:100%" :src="img.url" alt="">
  15. </div>
  16. </el-descriptions-item>
  17. <!-- <el-descriptions-item label="企业登录页LOGO">
  18. <br><div>
  19. <el-image src="">
  20. <div slot="error" class="image-slot">
  21. <i class="el-icon-picture-outline"></i>
  22. </div>
  23. </el-image>
  24. </div>
  25. </el-descriptions-item> -->
  26. <!-- <el-descriptions-item label="登录背景">
  27. </el-descriptions-item> -->
  28. </el-descriptions>
  29. </div>
  30. <el-button :disabled="!tool.checkAuth($route.name,'update')" icon="el-icon-edit" size="small" type="primary" style="width:120px;height: 30px"
  31. @click="onShowDtail">编 辑</el-button>
  32. </div>
  33. </template>
  34. <script>
  35. import {mapGetters} from 'vuex'
  36. import edit from './edit.vue'
  37. export default {
  38. data () {
  39. return {
  40. enterprise:{},
  41. drawer:false,
  42. sys_enterpriseid:''
  43. }
  44. },
  45. components:{edit},
  46. computed:{
  47. ...mapGetters({
  48. siteinfo:'siteinfo',
  49. closeDrawerTemp:'closeDrawerTemp',
  50. }),
  51. show () {
  52. console.log(this.siteinfo);
  53. if (this.siteinfo.attinfos.some(item=>item.usetype === 'actionlogo')) {
  54. return false
  55. } else {
  56. return true
  57. }
  58. }
  59. },
  60. methods:{
  61. onShowDtail () {
  62. this.$store.dispatch('changeDetailDrawer',true),this.$router.push({path:'/enterpriseDetail',query:{basicInfo:this.siteinfo,id:this.sys_enterpriseid}})
  63. },
  64. async enterpriseData(){
  65. const res = await this.$api.requested({
  66. "id": 20221022165203,
  67. "content": {
  68. }
  69. })
  70. console.log(res,"企业信息")
  71. this.enterprise = res.data
  72. this.sys_enterpriseid = res.data.sys_enterpriseid
  73. },
  74. siteInfos () {
  75. this.$store.dispatch('querySiteInfo',{
  76. "classname": "webmanage.site.site",
  77. "method": "querySite",
  78. "content": {}
  79. })
  80. },
  81. closeDrawer () {
  82. this.drawer = false
  83. },
  84. },
  85. mounted () {
  86. this.enterpriseData()
  87. },
  88. watch:{
  89. closeDrawerTemp (val) {
  90. /* !val?this.enterpriseData() this.queryImg():""*/
  91. if (!val){
  92. this.enterpriseData()
  93. /*this.queryImg()*/
  94. this.siteInfos()
  95. }
  96. }
  97. }
  98. }
  99. </script>
  100. <style scoped>
  101. /deep/.el-descriptions:last-child .el-descriptions-row {
  102. display: inline-block;
  103. }
  104. </style>