This commit is contained in:
Leo_Ding 2025-10-20 14:36:08 +08:00
parent ce2d1cfb9a
commit 4f548f2f9b

View File

@ -32,7 +32,7 @@
<span>南通市通州区互联网+智慧养老居家上门服务项目</span> <span>南通市通州区互联网+智慧养老居家上门服务项目</span>
</span> </span>
</div> </div>
<div class="paltform_list"> <div class="paltform_list" v-if="currentPlatForm !== 'yunying'">
<div value="CALL_CENTER" class="paltform_icon" @click="handleSelect('hujiao')"> <div value="CALL_CENTER" class="paltform_icon" @click="handleSelect('hujiao')">
<div class="paltform_icon_1"> <div class="paltform_icon_1">
<img :src="tel" alt="" srcset="" width="76" height="76" class="img"> <img :src="tel" alt="" srcset="" width="76" height="76" class="img">
@ -52,6 +52,20 @@
<p>运营平台</p> <p>运营平台</p>
</div> </div>
</div> </div>
<div class="orgManage" v-else>
<a-card style="width: 600px;margin:0 auto;height: 300px;">
<div style="margin: 10px 0;color:#1677ff;cursor: pointer;">
<span @click="currentPlatForm = 'jianguan'">{{ '< 返回' }}</span>
</div>
<h3>请选择您的管理组织</h3>
<a-select ref="select" v-model:value="currentOrg" style="width: 100%"
@change="handleChange" :defaultOpen="true">
<a-select-option v-for="value in stationList" :value="value.id">{{
value.name
}}</a-select-option>
</a-select>
</a-card>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -69,6 +83,7 @@ import yunying from '@/assets/imgs/yunying.png'
import { useAppStore, useRouterStore, useUserStore } from '@/store' import { useAppStore, useRouterStore, useUserStore } from '@/store'
import { template } from 'lodash-es' import { template } from 'lodash-es'
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import apis from '@/apis'
import storage from '@/utils/storage' import storage from '@/utils/storage'
defineOptions({ defineOptions({
name: 'PlatForm', name: 'PlatForm',
@ -76,19 +91,35 @@ defineOptions({
const appStore = useAppStore() const appStore = useAppStore()
const routerStore = useRouterStore() const routerStore = useRouterStore()
const router = useRouter() const router = useRouter()
const stationList = ref([])
const currentPlatForm = ref('jianguan')
const currentOrg = ref()
// body // body
onBeforeMount(() => { onBeforeMount(() => {
document.body.className = 'body-bg' document.body.className = 'body-bg'
}) })
async function handleSelect(type) { async function handleSelect(type) {
storage.local.setItem('platform', type) if (type === 'yunying') {
// currentPlatForm.value = 'yunying'
if (appStore.complete) { try {
goIndex() const { data, success } = await apis.serviceMenu.getServiceSiteList({ pageSize: 100, current: 1 })
if (success) {
stationList.value = data.map(item => ({ id: item.id, name: item.name }))
}
} catch (error) {
}
} else { } else {
await appStore.init({ platform: type }) storage.local.setItem('platform', type)
goIndex() //
if (appStore.complete) {
goIndex()
} else {
await appStore.init({ platform: type })
goIndex()
}
} }
} }
async function goIndex() { async function goIndex() {
console.log('goIndex') console.log('goIndex')
@ -96,7 +127,7 @@ async function goIndex() {
console.log(indexRoute) console.log(indexRoute)
if (!indexRoute) return if (!indexRoute) return
router.push(indexRoute) router.push(indexRoute)
} }
/** /**
* 获取首页路由 * 获取首页路由
@ -115,6 +146,17 @@ function getFirstValidRoute() {
} }
return indexRoute return indexRoute
} }
async function handleChange(e) {
storage.local.setItem('platform', 'yunying')
storage.local.setItem('stationId', e)
//
if (appStore.complete) {
goIndex()
} else {
await appStore.init({ platform: 'yunying' })
goIndex()
}
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.body-bg { .body-bg {