detail.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. <template>
  2. <div class="page">
  3. <div class="page-top flex flex-col justify-center items-center">
  4. <!-- <img class="logo" :src="supplierInfo.logo" /> -->
  5. <div class="name mt-2" v-text="supplierInfo.shopName + '认证记录'"></div>
  6. </div>
  7. <div class="page-content">
  8. <template v-if="clubInfo">
  9. <div class="page-title">机构认证</div>
  10. <div class="row">
  11. <div class="col">机构名称:</div>
  12. <div class="col">{{ clubInfo.authParty }}</div>
  13. </div>
  14. <div class="row">
  15. <div class="col">联系电话:</div>
  16. <div class="col">{{ clubInfo.mobile }}</div>
  17. </div>
  18. <div class="row">
  19. <div class="col">所在地区:</div>
  20. <div class="col">{{ clubInfo.area }}</div>
  21. </div>
  22. <div class="row">
  23. <div class="col">所在位置:</div>
  24. <div class="col">{{ clubInfo.address }}</div>
  25. </div>
  26. <div class="row">
  27. <div class="col max-width">logo:</div>
  28. <div class="col">
  29. <el-image
  30. v-if="clubInfo.logo"
  31. :src="clubInfo.logo"
  32. :preview-src-list="[clubInfo.logo]"
  33. >
  34. </el-image>
  35. <span v-else>暂无图片</span>
  36. </div>
  37. </div>
  38. <div class="row">
  39. <div class="col max-width">门头照:</div>
  40. <div class="col">
  41. <template
  42. v-if="clubInfo.bannerList && clubInfo.bannerList.length > 0"
  43. >
  44. <template v-for="(image, index) in clubInfo.bannerList">
  45. <el-image
  46. :key="index"
  47. :src="image"
  48. :preview-src-list="clubInfo.bannerList"
  49. />
  50. </template>
  51. </template>
  52. <span v-else>暂无图片</span>
  53. </div>
  54. </div>
  55. <div class="row">
  56. <div class="col">机构类型:</div>
  57. <div class="col">
  58. {{
  59. ['医美', '生美', '项目公司', '个人', '其他'][
  60. clubInfo.firstClubType - 1
  61. ]
  62. }}
  63. </div>
  64. </div>
  65. <div
  66. class="row"
  67. v-if="clubInfo.firstClubType === 1 || clubInfo.firstClubType === 2"
  68. >
  69. <div class="col">医美类型:</div>
  70. <div class="col">
  71. {{
  72. ['诊所', '门诊', '医院', '其他', '美容院', '养生馆', '其他'][
  73. clubInfo.secondClubType - 1
  74. ]
  75. }}
  76. </div>
  77. </div>
  78. <div class="row" v-if="clubInfo.firstClubType === 1">
  79. <div class="col max-width">医疗许可证:</div>
  80. <div class="col">
  81. <el-image
  82. v-if="clubInfo.medicalLicenseImage"
  83. :src="clubInfo.medicalLicenseImage"
  84. :preview-src-list="[clubInfo.medicalLicenseImage]"
  85. />
  86. <span v-else>暂无图片</span>
  87. </div>
  88. </div>
  89. <div class="row">
  90. <div class="col">员工人数:</div>
  91. <div class="col">{{ clubInfo.empNum }}</div>
  92. </div>
  93. <div class="row">
  94. <div class="col">状态:</div>
  95. <div class="col">
  96. <div class="status">
  97. <span class="success" v-if="clubInfo.auditStatus === 1"
  98. >认证成功</span
  99. >
  100. <span class="warning" v-else-if="clubInfo.auditStatus === 2"
  101. >认证中</span
  102. >
  103. <span class="danger" v-else>认证失败</span>
  104. </div>
  105. </div>
  106. </div>
  107. <div class="row" v-if="clubInfo.auditStatus === 0">
  108. <div class="col">原因:</div>
  109. <div class="col">
  110. {{ clubInfo.invalidReason ? clubInfo.invalidReason : '暂无' }}
  111. </div>
  112. </div>
  113. <div class="control flex flex-col items-center">
  114. <div
  115. class="button edit flex justify-center items-center mb-2"
  116. @click="onEdit"
  117. v-if="clubInfo.auditStatus === 0"
  118. >
  119. 编辑
  120. </div>
  121. <div
  122. class="button search flex justify-center items-center"
  123. @click="onToDeviceList"
  124. >
  125. 查看认证设备
  126. </div>
  127. </div>
  128. </template>
  129. <template v-else>
  130. <SimpleEmpty name="icon-empty-club.png" description="暂无机构认证~" />
  131. </template>
  132. </div>
  133. </div>
  134. </template>
  135. <script>
  136. import SimpleEmpty from '@/components/SimpleEmpty'
  137. import { mapGetters } from 'vuex'
  138. export default {
  139. layout: 'app',
  140. components: {
  141. SimpleEmpty,
  142. },
  143. data() {
  144. return {
  145. clubInfo: null,
  146. authId: ''
  147. }
  148. },
  149. computed: {
  150. ...mapGetters(['supplierInfo', 'routePrefix', 'clubUserId', 'userInfo']),
  151. },
  152. created() {
  153. this.fetchAuthDetail()
  154. },
  155. methods: {
  156. // 获取认证机构信息
  157. async fetchAuthDetail() {
  158. try {
  159. const result = await this.$http.api.fetchClubAuthInfo({
  160. clubUserId: this.clubUserId,
  161. })
  162. if(!result.data.auth) return
  163. this.authId = result.data.auth.authId
  164. const res = await this.$http.api.fetchClubAuthInfoData({
  165. authId: result.data.auth.authId,
  166. })
  167. this.clubInfo = res.data
  168. } catch (error) {
  169. console.log(error)
  170. }
  171. },
  172. onToDeviceList() {
  173. this.$router.push(`${this.routePrefix}/record/device?authId=${this.authId}`)
  174. },
  175. onEdit() {
  176. this.$router.push(`${this.routePrefix}/record/club/edit`)
  177. },
  178. },
  179. }
  180. </script>
  181. <style lang="scss" scoped>
  182. @media screen and (min-width: 768px) {
  183. .page {
  184. background: #fff;
  185. }
  186. .page-top {
  187. height: 360px;
  188. @include themify($themes) {
  189. background: themed('pc-banner-record-club');
  190. background-size: auto 360px;
  191. }
  192. .logo {
  193. display: block;
  194. width: 120px;
  195. height: 120px;
  196. border-radius: 50%;
  197. background: #fff;
  198. }
  199. .name {
  200. font-size: 30px;
  201. color: #fff;
  202. }
  203. }
  204. .page-content {
  205. width: 600px;
  206. margin: 0 auto;
  207. overflow: hidden;
  208. min-height: calc(100vh - 80px - 80px - 360px);
  209. box-sizing: border-box;
  210. padding-bottom: 40px;
  211. .page-title {
  212. font-size: 24px;
  213. font-weight: bold;
  214. text-align: center;
  215. padding: 40px 0;
  216. }
  217. .row {
  218. display: flex;
  219. justify-content: flex-start;
  220. align-items: flex-start;
  221. font-size: 18px;
  222. margin: 24px 0;
  223. .status {
  224. .success {
  225. color: #f3920d !important;
  226. }
  227. .warning {
  228. color: #1890ff !important;
  229. }
  230. .danger {
  231. color: #f94b4b !important;
  232. }
  233. }
  234. .col {
  235. &:first-child {
  236. white-space: nowrap;
  237. width: 110px;
  238. color: #666;
  239. text-align: right;
  240. flex-shrink: 0;
  241. }
  242. &:last-child {
  243. color: #282828;
  244. }
  245. }
  246. .el-image {
  247. width: 120px;
  248. height: 120px;
  249. margin-right: 12px;
  250. }
  251. }
  252. .control {
  253. margin-top: 62px;
  254. .button {
  255. width: 295px;
  256. height: 50px;
  257. cursor: pointer;
  258. &.edit {
  259. @include themify($themes) {
  260. border: 1px solid themed('color');
  261. color: themed('color');
  262. }
  263. }
  264. &.search {
  265. @include themify($themes) {
  266. background-color: themed('color');
  267. color: #fff;
  268. }
  269. }
  270. }
  271. }
  272. }
  273. }
  274. @media screen and (max-width: 768px) {
  275. .page {
  276. background: #fff;
  277. }
  278. .page-top {
  279. height: 46vw;
  280. @include themify($themes) {
  281. background: themed('h5-banner-record-club');
  282. background-size: auto 46vw;
  283. }
  284. .logo {
  285. display: block;
  286. width: 14.8vw;
  287. height: 14.8vw;
  288. border-radius: 50%;
  289. background: #fff;
  290. }
  291. .name {
  292. font-size: 4vw;
  293. color: #fff;
  294. }
  295. }
  296. .page-content {
  297. box-sizing: border-box;
  298. padding: 8vw 7.2vw;
  299. .page-title {
  300. font-size: 4.2vw;
  301. font-weight: bold;
  302. text-align: center;
  303. margin-bottom: 8vw;
  304. color: #282828;
  305. }
  306. .row {
  307. display: flex;
  308. justify-content: flex-start;
  309. align-items: flex-start;
  310. font-size: 3.4vw;
  311. margin-bottom: 5.6vw;
  312. flex-wrap: wrap;
  313. .status {
  314. .success {
  315. color: #f3920d !important;
  316. }
  317. .warning {
  318. color: #1890ff !important;
  319. }
  320. .danger {
  321. color: #f94b4b !important;
  322. }
  323. }
  324. .col {
  325. &:first-child {
  326. width: 17vw;
  327. color: #666;
  328. // text-align: right;
  329. &.max-width {
  330. width: 100% !important;
  331. margin-bottom: 2.6vw;
  332. }
  333. }
  334. &:last-child {
  335. color: #282828;
  336. }
  337. }
  338. .el-image {
  339. width: 25.6vw;
  340. height: 25.6vw;
  341. }
  342. }
  343. .control {
  344. margin-top: 22.8vw;
  345. .button {
  346. width: 100%;
  347. height: 12vw;
  348. cursor: pointer;
  349. &.edit {
  350. @include themify($themes) {
  351. border: 1px solid themed('color');
  352. color: themed('color');
  353. }
  354. }
  355. &.search {
  356. @include themify($themes) {
  357. background-color: themed('color');
  358. color: #fff;
  359. }
  360. }
  361. }
  362. }
  363. }
  364. }
  365. </style>