123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529 |
- <template>
- <div class="club-detail page">
- <div class="page-top"></div>
- <div class="page-content">
- <div class="title">机构认证信息</div>
- <div class="updated" v-if="isAuth">
- <el-button type="warning" size="default" plain @click="editData">{{ status ? '修改' : '保存' }}</el-button>
- </div>
- <template v-if="!isAuth">
- <div class="tip">抱歉,您暂未认证机构</div>
- <div class="btn" @click="toAuth">去认证</div>
- </template>
- <template v-else>
- <div v-if="status">
- <div class="row">
- <div class="col label">机构名称:</div>
- <div class="col content">{{ clubInfo.authParty }}</div>
- </div>
- <div class="row">
- <div class="col label">联系电话:</div>
- <div class="col content">{{ clubInfo.mobile }}</div>
- </div>
- <div class="row">
- <div class="col label">运营联系人:</div>
- <div class="col content">{{ clubInfo.linkMan }}</div>
- </div>
- <div class="row">
- <div class="col label">运营联系人手机号:</div>
- <div class="col content">{{ clubInfo.linkMobile }}</div>
- </div>
- <div class="row">
- <div class="col label">所在地区:</div>
- <div class="col content">{{ clubInfo.area }}</div>
- </div>
- <div class="row">
- <div class="col label">详细地址:</div>
- <div class="col content">{{ clubInfo.address }}</div>
- </div>
- <div class="row">
- <div class="col label">所在位置:</div>
- <div class="col content">
- <div class="postion-btn" @click="initMap">查看定位</div>
- </div>
- </div>
- <div class="row block">
- <div class="col label">logo:</div>
- <div class="col content">
- <el-image :src="clubInfo.logo" v-if="clubInfo.logo"></el-image>
- </div>
- </div>
- <div class="row block">
- <div class="col label">门头照:</div>
- <div class="col content">
- <template v-for="(image, index) in clubInfo.bannerList">
- <el-image :src="image" :key="index"></el-image>
- </template>
- </div>
- </div>
- <div class="row">
- <div class="col label">机构类型:</div>
- <div class="col content">{{ firstClubTypeName }}</div>
- </div>
- <div class="row">
- <div class="col label">医美类型:</div>
- <div class="col content">{{ secondClubTypeName }}</div>
- </div>
- <div class="row block">
- <div class="col label">医疗许可证:</div>
- <div class="col content">
- <el-image :src="clubInfo.medicalLicenseImage" v-if="clubInfo.medicalLicenseImage"></el-image>
- </div>
- </div>
- <div class="row">
- <div class="col label">员工人数:</div>
- <div class="col content">{{ clubInfo.empNum }}</div>
- </div>
- </div>
- <div v-else>
- <FormClubInfo ref="clubInfoForm" @step="onClubInfoFormStep" :clubInfo="clubInfo" />
- </div>
- </template>
- </div>
- <div class="position-select" v-if="mapVisiable">
- <div class="position-select-container">
- <SimpleAMap ref="aMap" :lnglat="lnglat" />
- <div class="position-select-footer">
- <div class="lnglat">当前经纬度:{{ clubInfo.lngAndLat }}</div>
- <div class="position-confirm postion-control" @click="mapVisiable = false">确定</div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { mapGetters } from 'vuex'
- import FormClubInfo from '../form/components/form-club-edit.vue'
- export default {
- layout: 'app-ph',
- data() {
- return {
- mapVisiable: false,
- clubInfo: {},
- status: true,
- clubData: {},
- }
- },
- components: { FormClubInfo },
- computed: {
- ...mapGetters(['userInfo', 'routePrefix']),
- isAuth() {
- return this.clubInfo.auditStatus === 1
- },
- firstClubTypeName() {
- if (!this.clubInfo.firstClubType) return '其他'
- return ['医美', '生美', '项目公司', '个人', '其他'][this.clubInfo.firstClubType - 1]
- },
- secondClubTypeName() {
- if (!this.clubInfo.secondClubType) return '其他'
- return ['诊所', '门诊', '医院', '其他', '美容院', '养生馆', '其他'][this.clubInfo.secondClubType - 1]
- },
- lnglat() {
- return this.clubInfo.lngAndLat ? this.clubInfo.lngAndLat.split(',') : null
- },
- },
- created() {
- this.fetchClubDetail()
- },
- methods: {
- // 获取机构详情
- async fetchClubDetail() {
- try {
- const authId = this.userInfo.authId
- if (!authId) return
- const res = await this.$http.api.fetchClubAuthInfoData({ authId })
- this.clubInfo = res.data
- } catch (error) {
- console.log(error)
- }
- },
- // 去认证
- toAuth() {
- this.$router.push(`${this.routePrefix}/form/club-register`)
- },
- // 地图定位
- initMap() {
- this.mapVisiable = true
- this.$nextTick(() => {
- this.$refs.aMap.init()
- })
- },
- // 修该数据
- editData() {
- if (!this.status) {
- this.$refs.clubInfoForm.validate().then(() => {
- return this.status = true
- }).catch(() => {
- return this.status = false
- })
- }
- this.status = false
- },
- async onClubInfoFormStep(authdata) {
- console.log(authdata)
- this.$toast.loading({
- message: '正在保存请稍后...',
- duration: 0,
- })
- try {
- await this.$http.api.authClubSave1(authdata)
- await this.fetchClubDetail()
- this.$toast.loading({
- message: '保存成功',
- duration: 1000,
- })
- } catch (e) {
- console.log(e)
- }
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- @media screen and (min-width: 768px) {
- .page {
- display: flex;
- justify-content: center;
- position: relative;
- }
- .position-select {
- width: 100vw;
- height: 100vh;
- background: rgba(0, 0, 0, 0.39);
- position: fixed;
- top: 0;
- left: 0;
- z-index: 999;
- display: flex;
- justify-content: center;
- align-items: center;
- .position-select-container {
- background: #fff;
- width: 60%;
- box-sizing: border-box;
- padding: 24px;
- .position-select-footer {
- position: relative;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- padding-top: 24px;
- .lnglat {
- position: absolute;
- font-size: 14px;
- color: #666;
- left: 0;
- top: 50%;
- transform: translateY(-50%);
- }
- }
- .postion-control {
- width: 120px;
- height: 40px;
- font-size: 14px;
- border-radius: 4px;
- display: flex;
- justify-content: center;
- align-items: center;
- cursor: pointer;
- margin-left: 16px;
- &.position-confirm {
- background: #f56c6c;
- color: #fff;
- }
- &.position-cancel {
- background: #b1b1b1;
- color: #fff;
- }
- }
- }
- }
- .page-content {
- max-width: 760px;
- padding-bottom: 167px;
- .updated {
- position: absolute;
- top: 50px;
- right: 200px;
- display: flex;
- justify-content: center;
- align-items: center;
- ::v-deep .el-button {
- font-size: 24px;
- }
- ::v-deep .el-button--warning {
- color: #f3920d;
- background: #fff;
- border-color: #f3920d;
- }
- }
- .title {
- font-size: 24px;
- color: #282828;
- font-weight: bold;
- text-align: center;
- padding: 60px 0;
- }
- .tip {
- font-size: 16px;
- color: #b2b2b2;
- margin-top: 200px;
- margin-bottom: 24px;
- text-align: center;
- }
- .btn {
- width: 98px;
- height: 36px;
- background: #bc1724;
- border-radius: 4px;
- text-align: center;
- line-height: 36px;
- color: #fff;
- font-size: 16px;
- margin: 0 auto;
- cursor: pointer;
- }
- .row {
- display: flex;
- align-items: flex-start;
- margin: 32px 0;
- .col {
- font-size: 16px;
- }
- .label {
- color: #666666;
- min-width: 100px;
- }
- .content {
- color: #282828;
- .el-image {
- width: 106px;
- height: 106px;
- border: 1px solid #dcdcdc;
- margin-right: 4px;
- &:last-child {
- margin-right: 0;
- }
- }
- .postion-btn {
- height: 28px;
- line-height: 28px;
- font-size: 14px;
- color: #fff;
- background: #1890ff;
- display: flex;
- justify-content: center;
- align-items: center;
- cursor: pointer;
- border-radius: 4px;
- padding: 0 8px;
- &::before {
- content: '';
- display: inline-block;
- width: 16px;
- height: 16px;
- background: url(~assets/theme-images/common/icon-position.png) no-repeat center;
- background-size: 16px 16px;
- }
- }
- }
- }
- }
- }
- @media screen and (max-width: 768px) {
- .page {
- display: flex;
- justify-content: center;
- position: relative;
- }
- .position-select {
- width: 100vw;
- height: 100vh;
- background: rgba(0, 0, 0, 0.39);
- position: fixed;
- top: 0;
- left: 0;
- z-index: 999;
- display: flex;
- justify-content: center;
- align-items: center;
- .position-select-container {
- background: #fff;
- width: 80%;
- box-sizing: border-box;
- padding: 3.2vw;
- .position-select-footer {
- padding-top: 10vw;
- position: relative;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- .lnglat {
- position: absolute;
- font-size: 3.2vw;
- color: #666;
- left: 0;
- top: 5vw;
- transform: translateY(-50%);
- }
- }
- .postion-control {
- width: 16vw;
- height: 7vw;
- font-size: 3.4vw;
- border-radius: 0.4vw;
- display: flex;
- justify-content: center;
- align-items: center;
- cursor: pointer;
- margin-left: 3.6vw;
- &.position-confirm {
- background: #f56c6c;
- color: #fff;
- }
- &.position-cancel {
- background: #b1b1b1;
- color: #fff;
- }
- }
- }
- }
- .page-content {
- padding: 0 4vw;
- .updated {
- position: absolute;
- top: 6.5vw;
- right: 4vw;
- display: flex;
- justify-content: center;
- align-items: center;
- ::v-deep .el-button {
- font-size: 3.4vw;
- }
- ::v-deep .el-button--warning {
- color: #f3920d;
- background: #fff;
- border-color: #f3920d;
- }
- }
- .title {
- font-size: 4.2vw;
- color: #282828;
- font-weight: bold;
- text-align: center;
- padding: 8vw 0;
- }
- .tip {
- font-size: 3vw;
- color: #b2b2b2;
- margin-top: 60vw;
- margin-bottom: 4.8vw;
- text-align: center;
- }
- .btn {
- width: 36vw;
- height: 8.8vw;
- background: #bc1724;
- border-radius: 0.4vw;
- text-align: center;
- line-height: 8.8vw;
- color: #fff;
- font-size: 3.4vw;
- margin: 0 auto;
- }
- .row {
- display: flex;
- align-items: flex-start;
- margin: 5.6vw 0;
- &.block {
- display: block;
- .label {
- margin-bottom: 2.4vw;
- }
- }
- .col {
- font-size: 3.4vw;
- }
- .label {
- color: #666666;
- min-width: 20.4vw;
- }
- .content {
- color: #282828;
- .el-image {
- width: 26vw;
- height: 26vw;
- border: 0.1vw solid #dcdcdc;
- margin-right: 0.6vw;
- &:last-child {
- margin-right: 0;
- }
- }
- .postion-btn {
- height: 6.8vw;
- line-height: 6.8vw;
- font-size: 3.2vw;
- color: #fff;
- background: #1890ff;
- display: flex;
- justify-content: center;
- align-items: center;
- cursor: pointer;
- border-radius: 0.4vw;
- padding: 0 1.2vw;
- &::before {
- content: '';
- display: inline-block;
- width: 3.58vw;
- height: 3.58vw;
- background: url(~assets/theme-images/common/icon-position.png) no-repeat center;
- background-size: 3.58vw;
- }
- }
- }
- }
- }
- }
- </style>
|