detail.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  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="true">
  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-club-empty.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: {},
  146. }
  147. },
  148. computed: {
  149. ...mapGetters(['supplierInfo', 'routePrefix', 'clubUserId']),
  150. },
  151. created() {
  152. this.fetchAuthDetail()
  153. },
  154. methods: {
  155. // 获取认证机构信息
  156. async fetchAuthDetail() {
  157. try {
  158. const result = await this.$http.api.fetchClubAuthInfo({
  159. clubUserId: this.clubUserId,
  160. })
  161. const res = await this.$http.api.fetchClubAuthInfoData({
  162. authId: result.data.auth.authId,
  163. })
  164. this.clubInfo = res.data
  165. console.log(res)
  166. } catch (error) {}
  167. },
  168. onToDeviceList() {
  169. this.$router.push(`${this.routePrefix}/record/device`)
  170. },
  171. onEdit() {
  172. this.$router.push(`${this.routePrefix}/record/club/edit`)
  173. },
  174. },
  175. }
  176. </script>
  177. <style lang="scss" scoped>
  178. @media screen and (min-width: 768px) {
  179. .page {
  180. background: #fff;
  181. }
  182. .page-top {
  183. height: 360px;
  184. @include themify($themes) {
  185. background: themed('banner-club-register');
  186. background-size: auto 360px;
  187. }
  188. .logo {
  189. display: block;
  190. width: 120px;
  191. height: 120px;
  192. border-radius: 50%;
  193. background: #fff;
  194. }
  195. .name {
  196. font-size: 30px;
  197. color: #fff;
  198. }
  199. }
  200. .page-content {
  201. width: 600px;
  202. margin: 0 auto;
  203. overflow: hidden;
  204. min-height: calc(100vh - 80px - 80px - 360px);
  205. box-sizing: border-box;
  206. padding-bottom: 40px;
  207. .page-title {
  208. font-size: 24px;
  209. font-weight: bold;
  210. text-align: center;
  211. padding: 40px 0;
  212. }
  213. .row {
  214. display: flex;
  215. justify-content: flex-start;
  216. align-items: flex-start;
  217. font-size: 18px;
  218. margin: 24px 0;
  219. .status {
  220. .success {
  221. color: #f3920d !important;
  222. }
  223. .warning {
  224. color: #1890ff !important;
  225. }
  226. .danger {
  227. color: #f94b4b !important;
  228. }
  229. }
  230. .col {
  231. &:first-child {
  232. white-space: nowrap;
  233. width: 110px;
  234. color: #666;
  235. text-align: right;
  236. flex-shrink: 0;
  237. }
  238. &:last-child {
  239. color: #282828;
  240. }
  241. }
  242. .el-image {
  243. width: 120px;
  244. height: 120px;
  245. margin-right: 12px;
  246. }
  247. }
  248. .control {
  249. margin-top: 62px;
  250. .button {
  251. width: 295px;
  252. height: 50px;
  253. cursor: pointer;
  254. &.edit {
  255. @include themify($themes) {
  256. border: 1px solid themed('color');
  257. color: themed('color');
  258. }
  259. }
  260. &.search {
  261. @include themify($themes) {
  262. background-color: themed('color');
  263. color: #fff;
  264. }
  265. }
  266. }
  267. }
  268. }
  269. }
  270. @media screen and (max-width: 768px) {
  271. .page {
  272. background: #fff;
  273. }
  274. .page-top {
  275. height: 46vw;
  276. @include themify($themes) {
  277. background: themed('banner-home-h5');
  278. background-size: auto 46vw;
  279. }
  280. .logo {
  281. display: block;
  282. width: 14.8vw;
  283. height: 14.8vw;
  284. border-radius: 50%;
  285. background: #fff;
  286. }
  287. .name {
  288. font-size: 4vw;
  289. color: #fff;
  290. }
  291. }
  292. .page-content {
  293. box-sizing: border-box;
  294. padding: 8vw 7.2vw;
  295. .page-title {
  296. font-size: 4.2vw;
  297. font-weight: bold;
  298. text-align: center;
  299. margin-bottom: 8vw;
  300. color: #282828;
  301. }
  302. .row {
  303. display: flex;
  304. justify-content: flex-start;
  305. align-items: flex-start;
  306. font-size: 3.4vw;
  307. margin-bottom: 5.6vw;
  308. flex-wrap: wrap;
  309. .status {
  310. .success {
  311. color: #f3920d !important;
  312. }
  313. .warning {
  314. color: #1890ff !important;
  315. }
  316. .danger {
  317. color: #f94b4b !important;
  318. }
  319. }
  320. .col {
  321. &:first-child {
  322. width: 17vw;
  323. color: #666;
  324. // text-align: right;
  325. &.max-width {
  326. width: 100% !important;
  327. margin-bottom: 2.6vw;
  328. }
  329. }
  330. &:last-child {
  331. color: #282828;
  332. }
  333. }
  334. .el-image {
  335. width: 25.6vw;
  336. height: 25.6vw;
  337. }
  338. }
  339. .control {
  340. margin-top: 22.8vw;
  341. .button {
  342. width: 100%;
  343. height: 12vw;
  344. cursor: pointer;
  345. &.edit {
  346. @include themify($themes) {
  347. border: 1px solid themed('color');
  348. color: themed('color');
  349. }
  350. }
  351. &.search {
  352. @include themify($themes) {
  353. background-color: themed('color');
  354. color: #fff;
  355. }
  356. }
  357. }
  358. }
  359. }
  360. }
  361. </style>