details.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <view class="content">
  3. <view class="tabBox">
  4. <u-subsection :list="list" :current="queryData.type" @change="sectionChange"></u-subsection>
  5. </view>
  6. <u-form :model="pageData" ref="uForm" label-align="right">
  7. <u-form-item label="企业名称" label-width="150px">
  8. <u-input readonly v-model="pageData.enterpriseName" type="text" />
  9. </u-form-item>
  10. <u-form-item label="统一社会信用代码" label-width="150px">
  11. <u-input readonly v-model="pageData.creditCode" type="text" />
  12. </u-form-item>
  13. <u-form-item label="成立时间" label-width="150px">
  14. <u-input readonly v-model="pageData.establishmentTime" type="text" />
  15. </u-form-item>
  16. <u-form-item label="法人姓名" label-width="150px">
  17. <u-input readonly v-model="pageData.legalRepresentative" type="text" />
  18. </u-form-item>
  19. <u-form-item label="法人联系方式" label-width="150px">
  20. <u-input readonly v-model="pageData.legalContact" type="text" />
  21. </u-form-item>
  22. <u-form-item label="所属市州" label-width="150px">
  23. <u-input readonly v-model="pageData.cityState" type="text" />
  24. </u-form-item>
  25. <u-form-item label="企业性质" label-width="150px">
  26. <u-input readonly v-model="pageData.enterpriseNature" type="text" />
  27. </u-form-item>
  28. <u-form-item label="企业类型" label-width="150px">
  29. <u-input readonly v-model="pageData.enterpriseType" type="text" />
  30. </u-form-item>
  31. <u-form-item label="生产状态" label-width="150px">
  32. <u-input readonly v-model="pageData.productionText" type="text" />
  33. </u-form-item>
  34. <u-form-item label="应急级别" label-width="150px">
  35. <u-input readonly v-model="pageData.emergencyLevel" type="text" />
  36. </u-form-item>
  37. <u-form-item label="归口管理地区" label-width="150px">
  38. <u-input readonly v-model="pageData.region" type="text" />
  39. </u-form-item>
  40. <u-form-item label="实际经营地址" label-width="150px">
  41. <u-input readonly v-model="pageData.actualBusinessAddress" type="text" />
  42. </u-form-item>
  43. <u-form-item label="经度" label-width="150px">
  44. <u-input readonly v-model="pageData.longitude" type="text" />
  45. </u-form-item>
  46. <u-form-item label="纬度" label-width="150px">
  47. <u-input readonly v-model="pageData.latitude" type="text" />
  48. </u-form-item>
  49. </u-form>
  50. <view class="bottomBox">
  51. <view class="detailsBox">
  52. <emergencyBranch :pageData="pageData" v-show="queryData.type == 0" />
  53. <processingEnterprise :pageData="pageData" v-show="queryData.type == 1" />
  54. <distributionEnterprise :pageData="pageData" v-show="queryData.type == 2" />
  55. <storageEnterprise :pageData="pageData" v-show="queryData.type == 3" />
  56. </view>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. import * as api from "@/api/statisticalQuery.js"
  62. import emergencyBranch from "./emergencyBranch.vue"
  63. import storageEnterprise from "./storageEnterprise.vue"
  64. import processingEnterprise from "./processingEnterprise.vue"
  65. import distributionEnterprise from "./distributionEnterprise.vue"
  66. export default {
  67. components: {
  68. emergencyBranch,
  69. storageEnterprise,
  70. processingEnterprise,
  71. distributionEnterprise
  72. },
  73. data() {
  74. return {
  75. queryData: {
  76. id: '',
  77. type: 0,
  78. current: 1,
  79. size: 1000,
  80. },
  81. pageData: {},
  82. list: [{
  83. name: '应急网点'
  84. },
  85. {
  86. name: '应急加工企业'
  87. },
  88. {
  89. name: '应急配送企业'
  90. },
  91. {
  92. name: '应急仓储企业'
  93. }
  94. ],
  95. }
  96. },
  97. onLoad(option) {
  98. this.queryData.id = option.id
  99. this.queryData.enterpriseName = option.name
  100. this.getDrtails()
  101. },
  102. methods: {
  103. getDrtails() {
  104. let obj = Object.assign({}, this.queryData)
  105. obj.type = obj.type + 1;
  106. api.getEsNetworkEntryDetails(obj).then(res => {
  107. if (this.queryData.type == 0) { // 应急供应网点
  108. this.pageData = res.data.esNetworkEntry || {}
  109. } else if (this.queryData.type == 1) { // 应急加工企业
  110. this.pageData = res.data.esProcessEnterprise || {}
  111. } else if (this.queryData.type == 2) { // 应急配送企业
  112. this.pageData = res.data.esDeliveryEnterprise || {}
  113. } else { // 应急仓储企业
  114. this.pageData = res.data.esStorageEnterprise || {}
  115. }
  116. this.pageData.region = this.pageData.actualAddressProvinceName + this.pageData
  117. .actualAddressCityName + this.pageData.actualAddressCountyName || ''
  118. this.pageData.productionText = this.pageData.productionStatus == 0 ? '停产' : '生产'
  119. this.pageData.emergencyLevel = this.returnEmergencyLevel(this.pageData)
  120. })
  121. },
  122. // 返回应急级别文字
  123. returnEmergencyLevel(data) {
  124. let str = ''
  125. if (data.isNationalLevel || data.isNational) {
  126. str = '国家级、'
  127. }
  128. if (data.isProvincialLevel || data.isProvincial) {
  129. str = str + '省级、'
  130. }
  131. if (data.isCityLevel || data.isCity) {
  132. str = str + '市级、'
  133. }
  134. if (data.isCountyLevel || data.isCounty) {
  135. str = str + '县级'
  136. }
  137. if (str.endsWith('、')) {
  138. return str.slice(0, -1);
  139. }
  140. return str;
  141. },
  142. sectionChange(data) {
  143. this.queryData.type = data
  144. this.getDrtails()
  145. }
  146. }
  147. }
  148. </script>
  149. <style scoped lang="scss">
  150. .content {
  151. margin: 10px 20px;
  152. .tabBox {
  153. margin: 10px 0 30px 0;
  154. .u-subsection__bar {
  155. width: 25%;
  156. }
  157. }
  158. .u-form {
  159. overflow: hidden;
  160. .u-form-item {
  161. float: left;
  162. margin-right: 10px;
  163. width: calc(100%/ 2 - 10px);
  164. }
  165. }
  166. }
  167. </style>