club-detail.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. <template>
  2. <div class="club-detail page">
  3. <div class="page-top"></div>
  4. <div class="page-content">
  5. <div class="title">机构认证信息</div>
  6. <div class="updated" v-if="isAuth">
  7. <el-button type="text" size="default" @click="editData">{{ status ? '修改' : '保存' }}</el-button>
  8. </div>
  9. <template v-if="!isAuth">
  10. <div class="tip">抱歉,您暂未认证机构</div>
  11. <div class="btn" @click="toAuth">去认证</div>
  12. </template>
  13. <template v-else>
  14. <div v-if="status">
  15. <div class="row">
  16. <div class="col label">机构名称:</div>
  17. <div class="col content">{{ clubInfo.authParty }}</div>
  18. </div>
  19. <div class="row">
  20. <div class="col label">联系电话:</div>
  21. <div class="col content">{{ clubInfo.mobile }}</div>
  22. </div>
  23. <div class="row">
  24. <div class="col label">运营联系人:</div>
  25. <div class="col content">{{ clubInfo.linkMan }}</div>
  26. </div>
  27. <div class="row">
  28. <div class="col label">运营联系人手机号:</div>
  29. <div class="col content">{{ clubInfo.linkMobile }}</div>
  30. </div>
  31. <div class="row">
  32. <div class="col label">所在地区:</div>
  33. <div class="col content">{{ clubInfo.area }}</div>
  34. </div>
  35. <div class="row">
  36. <div class="col label">详细地址:</div>
  37. <div class="col content">{{ clubInfo.address }}</div>
  38. </div>
  39. <div class="row">
  40. <div class="col label">所在位置:</div>
  41. <div class="col content">
  42. <div class="postion-btn" @click="initMap">查看定位</div>
  43. </div>
  44. </div>
  45. <div class="row block">
  46. <div class="col label">logo:</div>
  47. <div class="col content">
  48. <el-image :src="clubInfo.logo" v-if="clubInfo.logo"></el-image>
  49. </div>
  50. </div>
  51. <div class="row block">
  52. <div class="col label">门头照:</div>
  53. <div class="col content">
  54. <template v-for="(image, index) in clubInfo.bannerList">
  55. <el-image :src="image" :key="index"></el-image>
  56. </template>
  57. </div>
  58. </div>
  59. <div class="row">
  60. <div class="col label">机构类型:</div>
  61. <div class="col content">{{ firstClubTypeName }}</div>
  62. </div>
  63. <div class="row">
  64. <div class="col label">医美类型:</div>
  65. <div class="col content">{{ secondClubTypeName }}</div>
  66. </div>
  67. <div class="row block">
  68. <div class="col label">医疗许可证:</div>
  69. <div class="col content">
  70. <el-image :src="clubInfo.medicalLicenseImage" v-if="clubInfo.medicalLicenseImage"></el-image>
  71. </div>
  72. </div>
  73. <div class="row">
  74. <div class="col label">员工人数:</div>
  75. <div class="col content">{{ clubInfo.empNum }}</div>
  76. </div></div>
  77. <div v-else>
  78. <FormClubInfo ref="clubInfoForm" @step="onClubInfoFormStep" :clubInfo="clubInfo" /></div>
  79. <!-- <div class="row">
  80. <div class="col label">机构名称:</div>
  81. <div class="col content">{{ clubInfo.authParty }}</div>
  82. </div>
  83. <div class="row">
  84. <div class="col label">联系电话:</div>
  85. <div class="col content">{{ clubInfo.mobile }}</div>
  86. </div>
  87. <div class="row">
  88. <div class="col label">运营联系人:</div>
  89. <div class="col content">{{ clubInfo.linkMan }}</div>
  90. </div>
  91. <div class="row">
  92. <div class="col label">运营联系人手机号:</div>
  93. <div class="col content">{{ clubInfo.linkMobile }}</div>
  94. </div>
  95. <div class="row">
  96. <div class="col label">所在地区:</div>
  97. <div class="col content">{{ clubInfo.area }}</div>
  98. </div>
  99. <div class="row">
  100. <div class="col label">详细地址:</div>
  101. <div class="col content">{{ clubInfo.address }}</div>
  102. </div>
  103. <div class="row">
  104. <div class="col label">所在位置:</div>
  105. <div class="col content">
  106. <div class="postion-btn" @click="initMap">查看定位</div>
  107. </div>
  108. </div>
  109. <div class="row block">
  110. <div class="col label">logo:</div>
  111. <div class="col content">
  112. <el-image :src="clubInfo.logo" v-if="clubInfo.logo"></el-image>
  113. </div>
  114. </div>
  115. <div class="row block">
  116. <div class="col label">门头照:</div>
  117. <div class="col content">
  118. <template v-for="(image, index) in clubInfo.bannerList">
  119. <el-image :src="image" :key="index"></el-image>
  120. </template>
  121. </div>
  122. </div>
  123. <div class="row">
  124. <div class="col label">机构类型:</div>
  125. <div class="col content">{{ firstClubTypeName }}</div>
  126. </div>
  127. <div class="row">
  128. <div class="col label">医美类型:</div>
  129. <div class="col content">{{ secondClubTypeName }}</div>
  130. </div>
  131. <div class="row block">
  132. <div class="col label">医疗许可证:</div>
  133. <div class="col content">
  134. <el-image :src="clubInfo.medicalLicenseImage" v-if="clubInfo.medicalLicenseImage"></el-image>
  135. </div>
  136. </div>
  137. <div class="row">
  138. <div class="col label">员工人数:</div>
  139. <div class="col content">{{ clubInfo.empNum }}</div>
  140. </div> -->
  141. </template>
  142. </div>
  143. <div class="position-select" v-if="mapVisiable">
  144. <div class="position-select-container">
  145. <SimpleAMap ref="aMap" :lnglat="lnglat" />
  146. <div class="position-select-footer">
  147. <div class="lnglat">当前经纬度:{{ clubInfo.lngAndLat }}</div>
  148. <div class="position-confirm postion-control" @click="mapVisiable = false">确定</div>
  149. </div>
  150. </div>
  151. </div>
  152. </div>
  153. </template>
  154. <script>
  155. import { mapGetters } from 'vuex'
  156. import FormClubInfo from '../form/components/form-club-edit.vue'
  157. export default {
  158. layout: 'app-hyt',
  159. data() {
  160. return {
  161. mapVisiable: false,
  162. clubInfo: {},
  163. status: true,
  164. clubData: {},
  165. }
  166. },
  167. components: { FormClubInfo },
  168. computed: {
  169. ...mapGetters(['userInfo', 'routePrefix']),
  170. isAuth() {
  171. return this.clubInfo.auditStatus === 1
  172. },
  173. firstClubTypeName() {
  174. if (!this.clubInfo.firstClubType) return '其他'
  175. return ['医美', '生美', '项目公司', '个人', '其他'][this.clubInfo.firstClubType - 1]
  176. },
  177. secondClubTypeName() {
  178. if (!this.clubInfo.secondClubType) return '其他'
  179. return ['诊所', '门诊', '医院', '其他', '美容院', '养生馆', '其他'][this.clubInfo.secondClubType - 1]
  180. },
  181. lnglat() {
  182. return this.clubInfo.lngAndLat ? this.clubInfo.lngAndLat.split(',') : null
  183. },
  184. },
  185. created() {
  186. this.fetchClubDetail()
  187. },
  188. methods: {
  189. // 获取机构详情
  190. async fetchClubDetail() {
  191. try {
  192. const authId = this.userInfo.authId
  193. if (!authId) return
  194. const res = await this.$http.api.fetchClubAuthInfoData({ authId })
  195. this.clubInfo = res.data
  196. } catch (error) {
  197. console.log(error)
  198. }
  199. },
  200. // 去认证
  201. toAuth() {
  202. this.$router.push(`${this.routePrefix}/form/club-register`)
  203. },
  204. // 地图定位
  205. initMap() {
  206. this.mapVisiable = true
  207. this.$nextTick(() => {
  208. this.$refs.aMap.init()
  209. })
  210. },
  211. // 修该数据
  212. editData() {
  213. if (!this.status) {
  214. this.$refs.clubInfoForm.validate().then(() => {
  215. return this.status = true
  216. }).catch(() => {
  217. return this.status = false
  218. })
  219. }
  220. this.status = false
  221. },
  222. async onClubInfoFormStep(authdata) {
  223. console.log(authdata)
  224. this.$toast.loading({
  225. message: '正在保存请稍后...',
  226. duration: 0,
  227. })
  228. try {
  229. await this.$http.api.authClubSave1(authdata)
  230. this.$toast.loading({
  231. message: '保存成功',
  232. duration: 1000,
  233. })
  234. } catch (e) {
  235. console.log(e)
  236. }
  237. },
  238. },
  239. }
  240. </script>
  241. <style lang="scss" scoped>
  242. @media screen and (min-width: 768px) {
  243. .page {
  244. display: flex;
  245. justify-content: center;
  246. background: #fff;
  247. position: relative;
  248. }
  249. .position-select {
  250. width: 100vw;
  251. height: 100vh;
  252. background: rgba(0, 0, 0, 0.39);
  253. position: fixed;
  254. top: 0;
  255. left: 0;
  256. z-index: 999;
  257. display: flex;
  258. justify-content: center;
  259. align-items: center;
  260. .position-select-container {
  261. background: #fff;
  262. width: 60%;
  263. box-sizing: border-box;
  264. padding: 24px;
  265. .position-select-footer {
  266. position: relative;
  267. display: flex;
  268. justify-content: flex-end;
  269. align-items: center;
  270. padding-top: 24px;
  271. .lnglat {
  272. position: absolute;
  273. font-size: 14px;
  274. color: #666;
  275. left: 0;
  276. top: 50%;
  277. transform: translateY(-50%);
  278. }
  279. }
  280. .postion-control {
  281. width: 120px;
  282. height: 40px;
  283. font-size: 14px;
  284. border-radius: 4px;
  285. display: flex;
  286. justify-content: center;
  287. align-items: center;
  288. cursor: pointer;
  289. margin-left: 16px;
  290. &.position-confirm {
  291. background: #f56c6c;
  292. color: #fff;
  293. }
  294. &.position-cancel {
  295. background: #b1b1b1;
  296. color: #fff;
  297. }
  298. }
  299. }
  300. }
  301. .page-content {
  302. max-width: 800px;
  303. padding-bottom: 120px;
  304. .updated {
  305. position: absolute;
  306. top: 50px;
  307. right: 200px;
  308. display: flex;
  309. justify-content: center;
  310. align-items: center;
  311. ::v-deep .el-button--text {
  312. color: blue;
  313. font-size: 24px;
  314. }
  315. }
  316. .title {
  317. font-size: 24px;
  318. color: #282828;
  319. font-weight: bold;
  320. text-align: center;
  321. padding: 60px 0;
  322. }
  323. .tip {
  324. font-size: 16px;
  325. color: #b2b2b2;
  326. margin-top: 200px;
  327. margin-bottom: 24px;
  328. text-align: center;
  329. }
  330. .btn {
  331. width: 98px;
  332. height: 36px;
  333. background: #bc1724;
  334. border-radius: 4px;
  335. text-align: center;
  336. line-height: 36px;
  337. color: #fff;
  338. font-size: 16px;
  339. margin: 0 auto;
  340. cursor: pointer;
  341. }
  342. .row {
  343. display: flex;
  344. align-items: flex-start;
  345. margin: 32px 0;
  346. .col {
  347. font-size: 16px;
  348. }
  349. .label {
  350. color: #666666;
  351. min-width: 100px;
  352. }
  353. .content {
  354. color: #282828;
  355. .el-image {
  356. width: 106px;
  357. height: 106px;
  358. border: 1px solid #dcdcdc;
  359. margin-right: 4px;
  360. &:last-child {
  361. margin-right: 0;
  362. }
  363. }
  364. .postion-btn {
  365. height: 28px;
  366. line-height: 28px;
  367. font-size: 14px;
  368. color: #fff;
  369. background: #1890ff;
  370. display: flex;
  371. justify-content: center;
  372. align-items: center;
  373. cursor: pointer;
  374. border-radius: 4px;
  375. padding: 0 8px;
  376. &::before {
  377. content: '';
  378. display: inline-block;
  379. width: 16px;
  380. height: 16px;
  381. background: url(~assets/theme-images/common/icon-position.png) no-repeat center;
  382. background-size: 16px 16px;
  383. }
  384. }
  385. }
  386. }
  387. }
  388. }
  389. @media screen and (max-width: 768px) {
  390. .page {
  391. display: flex;
  392. justify-content: center;
  393. position: relative;
  394. }
  395. .position-select {
  396. width: 100vw;
  397. height: 100vh;
  398. background: rgba(0, 0, 0, 0.39);
  399. position: fixed;
  400. top: 0;
  401. left: 0;
  402. z-index: 999;
  403. display: flex;
  404. justify-content: center;
  405. align-items: center;
  406. .position-select-container {
  407. background: #fff;
  408. width: 80%;
  409. box-sizing: border-box;
  410. padding: 3.2vw;
  411. .position-select-footer {
  412. padding-top: 10vw;
  413. position: relative;
  414. display: flex;
  415. justify-content: flex-end;
  416. align-items: center;
  417. .lnglat {
  418. position: absolute;
  419. font-size: 3.2vw;
  420. color: #666;
  421. left: 0;
  422. top: 5vw;
  423. transform: translateY(-50%);
  424. }
  425. }
  426. .postion-control {
  427. width: 16vw;
  428. height: 7vw;
  429. font-size: 3.4vw;
  430. border-radius: 0.4vw;
  431. display: flex;
  432. justify-content: center;
  433. align-items: center;
  434. cursor: pointer;
  435. margin-left: 3.6vw;
  436. &.position-confirm {
  437. background: #f56c6c;
  438. color: #fff;
  439. }
  440. &.position-cancel {
  441. background: #b1b1b1;
  442. color: #fff;
  443. }
  444. }
  445. }
  446. }
  447. .page-content {
  448. padding: 0 4vw;
  449. .updated {
  450. position: absolute;
  451. top: 6.5vw;
  452. right: 4vw;
  453. display: flex;
  454. justify-content: center;
  455. align-items: center;
  456. ::v-deep .el-button--text {
  457. color: blue;
  458. font-size: 4.2vw;
  459. }
  460. }
  461. .title {
  462. font-size: 4.2vw;
  463. color: #282828;
  464. font-weight: bold;
  465. text-align: center;
  466. padding: 8vw 0;
  467. }
  468. .tip {
  469. font-size: 3vw;
  470. color: #b2b2b2;
  471. margin-top: 60vw;
  472. margin-bottom: 4.8vw;
  473. text-align: center;
  474. }
  475. .btn {
  476. width: 36vw;
  477. height: 8.8vw;
  478. background: #bc1724;
  479. border-radius: 0.4vw;
  480. text-align: center;
  481. line-height: 8.8vw;
  482. color: #fff;
  483. font-size: 3.4vw;
  484. margin: 0 auto;
  485. }
  486. .row {
  487. display: flex;
  488. align-items: flex-start;
  489. margin: 5.6vw 0;
  490. &.block {
  491. display: block;
  492. .label {
  493. margin-bottom: 2.4vw;
  494. }
  495. }
  496. .col {
  497. font-size: 3.4vw;
  498. }
  499. .label {
  500. color: #666666;
  501. min-width: 20.4vw;
  502. }
  503. .content {
  504. color: #282828;
  505. .el-image {
  506. width: 26vw;
  507. height: 26vw;
  508. border: 0.1vw solid #dcdcdc;
  509. margin-right: 0.6vw;
  510. &:last-child {
  511. margin-right: 0;
  512. }
  513. }
  514. .postion-btn {
  515. height: 6.8vw;
  516. line-height: 6.8vw;
  517. font-size: 3.2vw;
  518. color: #fff;
  519. background: #1890ff;
  520. display: flex;
  521. justify-content: center;
  522. align-items: center;
  523. cursor: pointer;
  524. border-radius: 0.4vw;
  525. padding: 0 1.2vw;
  526. &::before {
  527. content: '';
  528. display: inline-block;
  529. width: 3.58vw;
  530. height: 3.58vw;
  531. background: url(~assets/theme-images/common/icon-position.png) no-repeat center;
  532. background-size: 3.58vw;
  533. }
  534. }
  535. }
  536. }
  537. }
  538. }
  539. </style>