Forráskód Böngészése

门户养老地图

sunkuosheng 2 éve
szülő
commit
af60679f7d

+ 12 - 0
ruoyi-web/index.html

@@ -7,6 +7,11 @@
   <!--<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">-->
   <title>Vite App</title>
   <!--<script type="text/javascript" src="/flexible.js"></script>-->
+  <script>
+    window._AMapSecurityConfig = {
+      securityJsCode: '8235942dbbc745f954849a61332fa3bc'
+    };
+  </script>
   <style type="text/css">
     /*html {*/
       /*font-size: 37.5px;*/
@@ -20,6 +25,13 @@
       margin: 0;
       padding: 0;
     }
+    .amap-logo{
+      display: none;
+      opacity:0 !important;
+    }
+    .amap-copyright {
+      opacity:0;
+    }
   </style>
 </head>
 <body>

+ 33 - 0
ruoyi-web/src/api/home.js

@@ -106,3 +106,36 @@ export const zcfgList = (query) => {
         params: query
     })
 }
+
+//政策查询详情
+export const mhZcxwXq = (id) => {
+    return request({
+        url: '/portal/mhZcxw/'+id,
+        method: 'get',
+    })
+}
+
+//机构查询详情
+export const jcxxXq = (id) => {
+    return request({
+        url: '/portal/jcxx/'+id,
+        method: 'get',
+    })
+}
+//养老机构地图接口
+export const jcxxMap = (query) => {
+    return request({
+        url: '/portal/jcxx/map/list',
+        method: 'get',
+        params: query
+    })
+}
+//区划接口
+export const CountryDeptList = (query) => {
+    return request({
+        url: '/portal/jlDept/getList',
+        method: 'get',
+        params: query
+    })
+}
+

+ 15 - 0
ruoyi-web/src/assets/css/index.css

@@ -0,0 +1,15 @@
+::-webkit-scrollbar {
+    width: 8px;
+    height: 8px;
+}
+::-webkit-scrollbar-thumb {
+    border-radius: 10px;
+    background: #D80100!important;
+}
+::-webkit-scrollbar-track {
+    border-radius: 6px;
+    /*background: rgba(0, 0, 0, 0.1);*/
+}
+::-webkit-scrollbar-corner{
+    background: rgba(0, 0, 0, 0);
+}

BIN
ruoyi-web/src/assets/images/db.png


BIN
ruoyi-web/src/assets/images/kuan.png


+ 2 - 1
ruoyi-web/src/main.js

@@ -6,7 +6,7 @@ import "../src/assets/css/index.css";
 import ElementPlus from 'element-plus'
 import '../node_modules/element-plus/theme-chalk/index.css'
 import {zhCn} from "../node_modules/element-plus/es/locale";
-import {selectDictLabel, selectDictLabels } from '@/utils/ruoyi'
+import {resetForm,selectDictLabel, selectDictLabels } from '@/utils/ruoyi'
 
 
 import { useDict } from '@/utils/dict'
@@ -24,6 +24,7 @@ for (let iconName in ElIcon){
 app.config.globalProperties.useDict = useDict
 app.config.globalProperties.selectDictLabel = selectDictLabel
 app.config.globalProperties.selectDictLabels = selectDictLabels
+app.config.globalProperties.resetForm = resetForm
 
 app.component('Pagination', Pagination)
 

+ 13 - 1
ruoyi-web/src/router/index.js

@@ -23,6 +23,12 @@ const router = createRouter({
           name: 'ylzc',
           meta: { title: '养老政策'}
         },
+        {
+          path: 'ylzc/:id',
+          component: () => import('../views/zcxq/index.vue'),
+          name: 'zcxq',
+          meta: { title: '政策详情'}
+        },
         {
           path: 'jgcx',
           component: () => import('../views/jgcx/index.vue'),
@@ -34,7 +40,13 @@ const router = createRouter({
           component: () => import('../views/jgxq/index.vue'),
           name: 'jgxq',
           meta: { title: '机构详情'}
-        }
+        },
+        {
+          path: 'yldt',
+          component: () => import('../views/yldt/index.vue'),
+          name: 'yldt',
+          meta: { title: '养老地图'}
+        },
       ],
       meta: {
         index: 1

+ 1 - 1
ruoyi-web/src/utils/request.js

@@ -17,7 +17,7 @@ const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分
   baseURL: import.meta.env.VITE_APP_BASE_API,
   // 超时
-  timeout: 10000
+  timeout: 30000
 })
 
 // request拦截器

+ 2 - 2
ruoyi-web/src/views/home/index.vue

@@ -14,7 +14,7 @@
                 </div>
                 <div class="carousel">
                     <el-carousel height="395px">
-                        <el-carousel-item v-for="(item,index) in srcData" :key="index" lable="2222">
+                        <el-carousel-item v-for="(item,index) in srcData" :key="index">
                             <img :src="item.url" class="topImg"/>
                             <div class="carousel_footer" :title="item.bt">
                                 <div class="carousel_title title_overflow"> {{item.bt}}</div>
@@ -288,7 +288,7 @@
     const xgData = ref([]);
     const jgData = ref([
         {src: new URL('../../assets/images/jg1.png', import.meta.url).href, label: '养老机构'},
-        {src: new URL('../../assets/images/jg7.png', import.meta.url).href, label: '养老机构'},
+        {src: new URL('../../assets/images/jg7.png', import.meta.url).href, label: '社区养老机构'},
         {src: new URL('../../assets/images/jg2.png', import.meta.url).href, label: '长者照护之家'},
         {src: new URL('../../assets/images/jg3.png', import.meta.url).href, label: '日间服务中心'},
         {src: new URL('../../assets/images/jg4.png', import.meta.url).href, label: '社区养老组织'},

+ 12 - 8
ruoyi-web/src/views/index.vue

@@ -39,10 +39,11 @@
 
 <script setup>
     import {Search} from '@element-plus/icons-vue'
-    import {useRouter} from 'vue-router'
-    import {ref, onMounted} from 'vue'
+    import {useRoute,useRouter} from 'vue-router'
+    import {ref, onMounted ,watch} from 'vue'
 
     const router = useRouter();
+    const route = useRoute();
     const input3 = ref('');
     let indexMent = ref(0);
     const mentData = ref([
@@ -51,7 +52,7 @@
         {label: '机构查询', path: '/jgcx'},
         {label: '在线申请'},
         {label: '养老顾问'},
-        {label: '养老地图'},
+        {label: '养老地图', path: '/yldt'},
         {label: '养老护理员'},
         {label: '相关链接'}
     ]);
@@ -64,11 +65,11 @@
             return 'outer1'
         }
         return ''
-    }
-    onMounted(() => {
-        let path = router.currentRoute.value.path;
+    };
+    watch(() =>router.currentRoute.value.path,(newValue,oldValue)=> {
         //特殊处理多路径和路径传参
-        let pathArray = path.split('/');
+        let path =newValue;
+        let pathArray = newValue.split('/');
         if (pathArray.length > 2) {
             path = '/' + pathArray[1]
         }
@@ -76,7 +77,10 @@
             if (item.path === path) {
                 indexMent.value = index;
             }
-        })
+        });
+    },{ immediate: true });
+
+    onMounted(() => {
     })
 
 

+ 0 - 10
ruoyi-web/src/views/jgcx/index.vue

@@ -174,14 +174,6 @@
     };
     const changDict = getCurrentInstance().appContext.config.globalProperties.selectDictLabel;
     const selectList = computed(() => {
-        // selectDictLabel
-        // if()
-        //      isChxddjg:'',长护险定点 CZ035
-        //         pddj:'',机构等级 CZ015
-        //         cwzs:'',有空余床位 CZ035
-        //         state:'',类型 XZ093
-        //         szxzqh:''区域 XZ096
-        // console.log(getCurrentInstance().appContext.config.globalProperties);
         let data = [];
         let quer = queryParams.value;
         if (quer.state) {
@@ -224,7 +216,6 @@
     function getList() {
         loading.value = true;
         jcxxList(queryParams.value).then(response => {
-            console.log(response, 'response');
             jgData.value = response.rows.map(item => {
                 return {...item, dj: parseInt(item.pddj),url:item.jgUrl?item.jgUrl.split(',')[0]:''}
             });
@@ -244,7 +235,6 @@
     }
     //机构详情
     function jgXq(id){
-        console.log(id,'id');
         router.push({
                 //传递参数使用query的话,指定path或者name都行,但使用params的话,只能使用name指定
                 path:'/jgcx/'+id,

+ 121 - 155
ruoyi-web/src/views/jgxq/index.vue

@@ -5,7 +5,7 @@
                 <div class="gray">您现在所在位置:</div>
                 <el-breadcrumb separator=">>">
                     <el-breadcrumb-item :to="{ path: '/home' }"><span class="gray">首页</span></el-breadcrumb-item>
-                    <el-breadcrumb-item><span class="red">养老政策查询</span></el-breadcrumb-item>
+                    <el-breadcrumb-item><span class="red">机构详情</span></el-breadcrumb-item>
                 </el-breadcrumb>
             </div>
         </div>
@@ -21,98 +21,31 @@
                             :modules="modules"
                             ref="swiperTop"
                             class="mySwiper2">
-                        <swiper-slide>
-                            <img src="https://swiperjs.com/demos/images/nature-1.jpg"/>
+                        <swiper-slide v-for="item in form.urlData">
+                            <img :src="item"/>
                         </swiper-slide>
-                        <swiper-slide>
-                            <img src="https://swiperjs.com/demos/images/nature-2.jpg"/>
-                        </swiper-slide>
-                        <swiper-slide>
-                            <img src="https://swiperjs.com/demos/images/nature-3.jpg"/>
-                        </swiper-slide>
-                        <swiper-slide>
-                            <img src="https://swiperjs.com/demos/images/nature-4.jpg"/>
-                        </swiper-slide>
-                        <swiper-slide>
-                            <img src="https://swiperjs.com/demos/images/nature-5.jpg"/>
-                        </swiper-slide>
-                        <swiper-slide>
-                            <img src="https://swiperjs.com/demos/images/nature-6.jpg"/>
-                        </swiper-slide
-                        >
-                        <swiper-slide
-                        ><img
-                                src="https://swiperjs.com/demos/images/nature-7.jpg"/></swiper-slide
-                        >
-                        <swiper-slide
-                        ><img
-                                src="https://swiperjs.com/demos/images/nature-8.jpg"/></swiper-slide
-                        >
-                        <swiper-slide
-                        ><img
-                                src="https://swiperjs.com/demos/images/nature-9.jpg"/></swiper-slide
-                        >
-                        <swiper-slide
-                        ><img src="https://swiperjs.com/demos/images/nature-10.jpg"
-                        /></swiper-slide>
                     </swiper>
                     <swiper
                             @swiper="setThumbsSwiper"
                             :loop="true"
                             :spaceBetween="10"
-                            :slidesPerView="4"
+                            :slidesPerView="6"
                             :freeMode="true"
                             :watchSlidesProgress="true"
                             :modules="modules"
                             class="mySwiper"
                             ref="swiperThumbs"
                     >
-                        <swiper-slide
-                        ><img
-                                src="https://swiperjs.com/demos/images/nature-1.jpg"/></swiper-slide
-                        >
-                        <swiper-slide
-                        ><img
-                                src="https://swiperjs.com/demos/images/nature-2.jpg"/></swiper-slide
-                        >
-                        <swiper-slide
-                        ><img
-                                src="https://swiperjs.com/demos/images/nature-3.jpg"/></swiper-slide
-                        >
-                        <swiper-slide
-                        ><img
-                                src="https://swiperjs.com/demos/images/nature-4.jpg"/></swiper-slide
-                        >
-                        <swiper-slide
-                        ><img
-                                src="https://swiperjs.com/demos/images/nature-5.jpg"/></swiper-slide
-                        >
-                        <swiper-slide
-                        ><img
-                                src="https://swiperjs.com/demos/images/nature-6.jpg"/></swiper-slide
-                        >
-                        <swiper-slide
-                        ><img
-                                src="https://swiperjs.com/demos/images/nature-7.jpg"/></swiper-slide
-                        >
-                        <swiper-slide
-                        ><img
-                                src="https://swiperjs.com/demos/images/nature-8.jpg"/></swiper-slide
-                        >
-                        <swiper-slide
-                        ><img
-                                src="https://swiperjs.com/demos/images/nature-9.jpg"/></swiper-slide
-                        >
-                        <swiper-slide
-                        ><img src="https://swiperjs.com/demos/images/nature-10.jpg"
-                        /></swiper-slide>
+                        <swiper-slide v-for="item in form.urlData">
+                            <img :src="item"/>
+                        </swiper-slide>
                     </swiper>
                 </div>
             </div>
             <div class="right_box flex_center">
                 <div class="conten">
                     <div class="title">
-                        吉林顾村和平养老院
+                        {{form.jgmc}}
                     </div>
                     <div class="font_style1 align_center mt35">
                         <el-tooltip placement="top" effect="light">
@@ -141,8 +74,8 @@
                         ({{selectDictLabel(CZ015,form.pddj)}})
                     </div>
                     <div class="flex mt24 font_style1">
-                        <div class="title_box font_style1">成立时间:2016-03-09</div>
-                        <div class="title_box font_style1">建筑面积:6800</div>
+                        <div class="title_box font_style1">成立时间:{{changDate(form.czsj)}}</div>
+                        <div class="title_box font_style1">建筑面积:{{form.zdmj}}㎡</div>
                     </div>
                     <div class="hr">
 
@@ -151,28 +84,28 @@
                         <div class="tb1">
                         </div>
                         <div>
-                            机构地址:长春市朝阳区XXX路155号
+                            机构地址:{{form.txdz}}
                         </div>
                     </div>
                     <div class="align_center font_style1 mt24">
                         <div class="tb2">
                         </div>
                         <div>
-                            咨询电话:0431-88669933
+                            咨询电话:{{form.frlxfs}}
                         </div>
                     </div>
                     <div class="kz_box mt24">
                         <div class="flex">
-                            <div class="title_box font_style1">床位总数: 188张</div>
-                            <div class="title_box font_style1">可用床位: <span class="color1">10</span>张</div>
+                            <div class="title_box font_style1">床位总数: {{form.cwCount}}张</div>
+                            <div class="title_box font_style1">可用床位: <span class="color1">{{form.cwCount}}</span>张</div>
                         </div>
                         <div class="font_style1 mt24">
-                            参考价格:<span class="font_style2">2250-7000</span>元/月 (床位费和护理费)
+                            参考价格:<span class="font_style2">{{form.zd}}-{{form.zg}}</span>元/月 (床位费和护理费)
                         </div>
 
                     </div>
                     <div class="font_style3 mt15">
-                        *  以上信息由机构提供 <span class="mr">更新时间: 2021-10-13</span> *    信息监督: 宝山区民政局
+                        * 以上信息由机构提供 <span class="mr">更新时间: {{changDate(form.gxsj)}}</span> * 信息监督: {{form.xxjd}}
                     </div>
                 </div>
             </div>
@@ -180,14 +113,16 @@
 
         <div class="hr"></div>
         <div class="bt_box">
-           <div class="map_top">
-               <div class="align_center">
-                   <div class="block"></div>
-                   地理位置
-               </div>
-               <div class="align_center">
-                <div class="tb3"></div>   在养老地图查看</div>
-           </div>
+            <div class="map_top">
+                <div class="align_center">
+                    <div class="block"></div>
+                    地理位置
+                </div>
+                <div class="align_center">
+                    <div class="tb3"></div>
+                    在养老地图查看
+                </div>
+            </div>
         </div>
         <div class="mt15" id="container" style="height: 385px;width: 100%"></div>
 
@@ -197,19 +132,22 @@
 <script setup>
     import {Swiper, SwiperSlide} from 'swiper/vue';
     import AMapLoader from '@amap/amap-jsapi-loader';
-    import { shallowRef } from '@vue/reactivity'
-    window._AMapSecurityConfig = {
-        securityJsCode: '8235942dbbc745f954849a61332fa3bc'
-    };
-        // Import Swiper styles
+    import {jcxxXq} from '@/api/home'
+    import {shallowRef} from '@vue/reactivity'
+    import {useRoute} from 'vue-router'
+    // window._AMapSecurityConfig = {
+    //     securityJsCode: '8235942dbbc745f954849a61332fa3bc'
+    // };
+    // Import Swiper styles
     import 'swiper/css';
     import "swiper/css/free-mode"
     import "swiper/css/navigation"
     import "swiper/css/thumbs"
     import {FreeMode, Navigation, Thumbs} from 'swiper';
-    import {createApp, getCurrentInstance, onMounted, nextTick,onUnmounted} from 'vue';
+    import {createApp, getCurrentInstance, onMounted, nextTick, onUnmounted} from 'vue';
+
     const {proxy} = getCurrentInstance();
-    const {XZ093, XZ096, CZ015, CZ035} = proxy.useDict('XZ093', 'XZ096', 'CZ015', 'CZ035');
+    const {CZ015} = proxy.useDict('CZ015');
 
     createApp({
         components: {
@@ -217,14 +155,12 @@
             SwiperSlide,
         },
     });
+
+    let router = useRoute();
     let thumbsSwiper = null;
     let modules = [FreeMode, Navigation, Thumbs];
     const data = reactive({
         form: {
-            dj: 3,
-            pddj: '01',
-            txdz: 'xxxxxx',
-            frlxfs: 'xxx'
         },
     });
     const {form} = toRefs(data);
@@ -234,49 +170,71 @@
     };
     //首先需要引入 Vue3 的 shallowRef 方法(使用 shallowRef 进行非深度监听,因为在 Vue3 所使用的 Proxy 拦截操作会改变 JSAPI 原生对象,所以此处需要区别 Vue2 使用方式对地图对象行非深度监听,否则会出现问题,建议 JS API 相关对象采用非响应式的普通对象来存储)。
     const map = shallowRef(null);
-    const initMap=()=>{
+    const initMap = () => {
         {
             AMapLoader.load({
-                key:'6c087d703e652767650a6b3208f76c40',  //设置您的key
-                version:"2.0",
-                plugins:['AMap.ToolBar','AMap.Driving'],
-                AMapUI:{
-                    version:"1.1",
-                    plugins:[],
+                key: '6c087d703e652767650a6b3208f76c40',  //设置您的key
+                version: "2.0",
+                plugins: ['AMap.ToolBar', 'AMap.Driving'],
+                AMapUI: {
+                    version: "1.1",
+                    plugins: [],
 
                 },
-                Loca:{
-                    version:"2.0.0"
+                Loca: {
+                    version: "2.0.0"
                 },
-            }).then((AMap)=>{
-                map.value = new AMap.Map("container",{
-                    zoom:13,
-                    center:[105.602725,37.076636],
+            }).then((AMap) => {
+                let data=[ form.value.lat ,form.value.lng];
+                map.value = new AMap.Map("container", {
+                    zoom: 13,
+                    center: data,
                 });
                 let marker = new AMap.Marker({
-                    position:[105.602725,37.076636],
+                    position: data,
                     icon: new AMap.Icon({// eslint-disable-line
                         // 引入小红车图片位置
-                        image:new URL('../../assets/images/dw.png', import.meta.url).href,
-                        size: new AMap.Size(17, 16) // eslint-disable-line
+                        image: new URL('../../assets/images/db.png', import.meta.url).href,
+                        size: new AMap.Size(26, 30) // eslint-disable-line
                     }),
                     // offset: new AMap.Pixel(-25, -25), // eslint-disable-line
                 });
                 marker.setLabel({
-                    offset: new AMap.Pixel(0, -5),  //设置文本标注偏移量
-                    content: "<div class='info'>我是 marker 的 l1111abel 标签</div>", //设置文本标注内容
+                    offset: new AMap.Pixel(0, 0),  //设置文本标注偏移量
+                    content: "<div class='info'>"+form.value.jgmc+"</div>", //设置文本标注内容
                     direction: 'top' //设置文本标注方位
                 });
                 map.value.add(marker);
 
-            }).catch(e=>{
+            }).catch(e => {
                 console.log(e);
             })
         }
     };
     const dd = getCurrentInstance();
+    function getList(){
+        jcxxXq(router.params.id).then(response=>{
+            form.value=response.data;
+            form.value.dj=parseInt(response.data.pddj);
+            form.value.zg=response.data.cwfZg>response.data.hlfZg?response.data.cwfZg:response.data.hlfZg;
+            form.value.zd=response.data.cwfZd>response.data.hlfZd?response.data.hlfZd:response.data.cwfZd;
+            form.value.urlData=response.data.jgUrl?response.data.jgUrl.split(','):[];
+            initMap();
+        })
+    }
+    function changDate(data) {
+        if (!data)
+        {
+            return false;
+        }
+        if(data.length<7)
+        {
+            return false
+        }
+        return data.slice(0,4) + '-' + data.slice(4, 6) + '-' + data.slice(6,8)
+    }
     onMounted(() => {
-        initMap();
+        getList();
         // console.log(dd.ctx.$refs.swiperTop,'this.$refs');
         // const swiperTop=dd.ctx.$refs.swiperTop.$swiper;
         // const swiperThumbs=dd.ctx.$refs.swiperThumbs.$swiper;
@@ -292,8 +250,8 @@
         //     swiperThumbs.controller = swiperTop.controller;
         // })
     });
-    onUnmounted(()=>{
-         //离开前要进行地图销毁,防止占有资源
+    onUnmounted(() => {
+        //离开前要进行地图销毁,防止占有资源
         map.value && map.value.destroy();
         console.log('销毁了')
     })
@@ -305,7 +263,7 @@
         height: 100%;
     }
 
-    .swiper-slide {
+    :deep(.swiper-slide) {
         text-align: center;
         font-size: 18px;
         background: #fff;
@@ -325,21 +283,14 @@
         align-items: center;
     }
 
-    .swiper-slide img {
+    :deep(.swiper-slide img) {
         display: block;
         width: 100%;
         height: 100%;
         object-fit: cover;
     }
 
-    .swiper {
-        width: 100%;
-        height: 300px;
-        margin-left: auto;
-        margin-right: auto;
-    }
-
-    .swiper-slide {
+    :deep(.swiper-slide) {
         background-size: cover;
         background-position: center;
     }
@@ -355,22 +306,23 @@
         padding: 10px 0;
     }
 
-    .mySwiper .swiper-slide {
-        width: 25%;
-        height: 100%;
-        opacity: 0.4;
-    }
+    /*:deep(.mySwiper .swiper-slide) {*/
+        /*width: 25%;*/
+        /*height: 100%;*/
+        /*opacity: 0.4;*/
+    /*}*/
 
-    .mySwiper .swiper-slide-thumb-active {
-        opacity: 1;
-    }
+    /*:deep(.mySwiper .swiper-slide-thumb-active) {*/
+        /*opacity: 1;*/
+    /*}*/
+
+    /*:deep(.swiper-slide img) {*/
+        /*display: block;*/
+        /*width: 100%;*/
+        /*height: 100%;*/
+        /*object-fit: cover;*/
+    /*}*/
 
-    .swiper-slide img {
-        display: block;
-        width: 100%;
-        height: 100%;
-        object-fit: cover;
-    }
 
     .main_box2 {
         background: #FFFFFF;
@@ -460,7 +412,7 @@
         margin: 0 5px;
     }
 
-    .font_style3{
+    .font_style3 {
         font-size: 14px;
         font-weight: bold;
         color: #FF706F;
@@ -477,6 +429,7 @@
     .mt24 {
         margin-top: 23px;
     }
+
     .mt15 {
         margin-top: 15px;
     }
@@ -530,26 +483,39 @@
     .color1 {
         color: #FF4900;
     }
-    .mr{
+
+    .mr {
         margin: 0 10px;
     }
-    .bt_box{
+
+    .bt_box {
         margin-left: 34px;
         margin-top: 27px;
         margin-right: 34px;
     }
-    .map_top{
+
+    .map_top {
         display: flex;
         justify-content: space-between;
     }
-    .block{
+
+    .block {
         width: 6px;
         height: 20px;
         background: #D80100;
         border-radius: 3px;
         margin-right: 10px;
     }
-    :deep(.info){
-
+     /*地图图标上的文本样式*/
+    :deep(.amap-marker-label) {
+        background: url("../../assets/images/kuan.png") no-repeat;
+        height: 31px;
+        line-height: 23px;
+        padding: 5px 10px;
+        font-size: 18px;
+        font-weight: bold;
+        text-align: center;
+        background-size: 100% 100%;
+        border: none;
     }
 </style>

+ 467 - 0
ruoyi-web/src/views/yldt/index.vue

@@ -0,0 +1,467 @@
+<template>
+    <div class="main_box2">
+        <div class="bread">
+            <div class="bread_left">
+                <div class="gray">您现在所在位置:</div>
+                <el-breadcrumb separator=">>">
+                    <el-breadcrumb-item :to="{ path: '/' }" target="_top"><span class="gray">首页</span></el-breadcrumb-item>
+                    <el-breadcrumb-item><span class="red">养老地图</span></el-breadcrumb-item>
+                </el-breadcrumb>
+            </div>
+        </div>
+        <div>
+            <el-from :model="formLabelAlign" ref="queryRef"  class="flex">
+                <el-form-item label="机构名称" prop="jgmc">
+                    <el-input v-model="formLabelAlign.jgmc" clearable placeholder="请输入机构名称"/>
+                </el-form-item>
+                <el-form-item label="行政区划" prop="xzqhId">
+                    <el-cascader v-model="formLabelAlign.xzqhId" clearable :props="props"/>
+                </el-form-item>
+                <el-form-item label="机构类型" prop="state">
+                    <el-select v-model="formLabelAlign.state" clearable placeholder="请选择机构类型">
+                        <el-option v-for="item in XZ093" :label="item.label" :value="item.value"/>
+                    </el-select>
+                </el-form-item>
+                <el-form-item>
+                    <el-button type="danger" @click="handleQuery">搜索</el-button>
+                    <el-button @click="resetQuery()">重置</el-button>
+                </el-form-item>
+            </el-from>
+        </div>
+        <div class="flex" v-loading="loading">
+            <div class="mt15" id="container" style="height: 646px;width: 70%;position: relative">
+                <div class="jg_button">
+                    <!--<el-checkbox-group v-model="checkboxGroup1">-->
+                        <!--<el-checkbox-button v-for="(city,index) in XZ093" :key="city.value" :label="city.value" class="button_style">-->
+                                <!--<img :src="jgData[index].src" style="width: 24px;height: 24px;margin-right: 5px">{{ city.label}}-->
+                        <!--</el-checkbox-button>-->
+                    <!--</el-checkbox-group>-->
+                    <div class="button_style" v-for="(city,index) in XZ093" :key="city.value" >
+                        <img :src="jgData[index].src" style="width: 24px;height: 24px;margin-right: 5px">{{ city.label}}
+                    </div>
+                </div>
+            </div>
+            <div class="jg_box">
+
+                <div class="affix-container" v-show="isShow">
+                    机构列表
+                </div>
+                <div class="jg_main" v-show="isShow">
+                <div class="jg_list" v-for="(item) in jgList">
+                    <div class="flex">
+                        <img :src="item.id&&item.id==='1'?jgData[1].src:jgData[0].src" class="tb">
+                        <div class="fontStyle title_overflow pointer" :title="item.jgmc" @click="handXq(item)">
+                            机构名称:{{item.jgmc}}
+                        </div>
+                    </div>
+                    <div class="fontStyle2 title_overflow ml35" :title="item.txdz">
+                        地址:{{item.txdz}}
+                    </div>
+
+                </div>
+                </div>
+
+                <div class="fh_box" v-show="!isShow">
+                   <div class="fontStyle3" @click="goBack">
+                       {{'<'}} <div class="ml24">返回</div>
+                   </div>
+                </div>
+                <div class="xq_main" v-show="!isShow">
+                    <div class="xq_box">
+                        <img :src="formXq.id&&formXq.id==='1'?jgData[1].src:jgData[0].src" class="tb">
+                        <div class="fontStyle title_overflow" :title="formXq.jgmc">
+                        机构名称:{{formXq.jgmc}}
+                        </div>
+                    </div>
+                    <div class="xq_box">
+                        <div class="fontStyle2 title_overflow " :title="formXq.txdz">
+                            地址:{{formXq.txdz}}
+                        </div>
+                    </div>
+                    <div class="xq_box">
+                        <div class="fontStyle2 title_overflow ">
+                            电话:{{formXq.frlxfs}}
+                        </div>
+                    </div>
+                    <el-carousel height="202px" style="width: 98%;margin: 11px auto;">
+                        <el-carousel-item v-for="(item,index) in formXq.jg_url" :key="index">
+                            <img :src="item" class="topImg"/>
+                        </el-carousel-item>
+                    </el-carousel>
+                    <div class="xq_box">
+                        <div class="fontStyle2 title_overflow ">
+                            成立时间:{{changDate(formXq.jlrq)}}
+                        </div>
+                    </div>
+                    <div class="xq_box">
+                        <div class="fontStyle2 title_overflow ">
+                            床位总数:{{formXq.cwzs}}
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+    import {ref, reactive, toRefs, onMounted, onUnmounted} from 'vue';
+    import {jcxxMap, CountryDeptList} from '@/api/home'
+    import AMapLoader from '@amap/amap-jsapi-loader';
+    import {shallowRef} from '@vue/reactivity'
+
+    const {proxy} = getCurrentInstance();
+    const {XZ093} = proxy.useDict("XZ093");
+    const props = {
+        lazy: true,
+        checkStrictly: true,
+        lazyLoad: async (node, resolve) => {
+            const {level} = node;
+            let params = level === 0 ? '' : {parentId: node.data.nodeData.id};
+            let response = await CountryDeptList(params);
+            let code = response.code;
+            let data = response.data || response.rows;
+            if (code !== 200) {
+                this.$message.error('获取行政区划数据失败!');
+                resolve([]);
+                return;
+            }
+            let res = data.map(item => {
+                let value = String(item['code']);
+                return {
+                    label: item.name,
+                    value,
+                    leaf: level >= 4,
+                    nodeData: item
+                }
+            });
+            resolve(res);
+        },
+    };
+    const jgList=ref([]);
+    const loading=ref(false);
+    const marker=ref('');
+    const checkboxGroup1=ref([]);
+
+    const jgData = ref([
+        {src: new URL('../../assets/images/jg1.png', import.meta.url).href, label: '养老机构'},
+        {src: new URL('../../assets/images/jg7.png', import.meta.url).href, label: '社区养老机构'},
+        {src: new URL('../../assets/images/jg2.png', import.meta.url).href, label: '长者照护之家'},
+        {src: new URL('../../assets/images/jg3.png', import.meta.url).href, label: '日间服务中心'},
+        {src: new URL('../../assets/images/jg4.png', import.meta.url).href, label: '社区养老组织'},
+        {src: new URL('../../assets/images/jg5.png', import.meta.url).href, label: '助餐服务点'},
+        {src: new URL('../../assets/images/jg6.png', import.meta.url).href, label: '护理院/站'},
+    ]);
+    const formLabelAlign = reactive({
+        jgmc: '',
+        xzqhId: '',
+        state: ''
+    });
+    const  formXq=ref({});
+    const  isShow=ref(true);
+    function handXq(item) {
+        console.log(item,'item');
+        isShow.value=!isShow.value;
+        formXq.value={};
+        formXq.value=item;
+        formXq.jg_url=item.jg_url?item.jg_url.split(','):[];
+        setMarker(item);
+        console.log(formXq,'formXq');
+    }
+    function resetQuery() {
+        formLabelAlign.jgmc = '';
+        formLabelAlign.xzqhId = '';
+        formLabelAlign.state = '';
+        console.log(formLabelAlign.xzqhId, 'formLabelAlign');
+        // proxy.resetForm("queryRef");
+        getList();
+    }
+
+    function handleQuery() {
+        getList();
+    }
+
+
+    function getList() {
+        loading.value=true;
+        jcxxMap({
+            ...formLabelAlign,
+            xzqhId: formLabelAlign.xzqhId ? formLabelAlign.xzqhId[formLabelAlign.xzqhId.length - 1] : ''
+        }).then(response => {
+            isShow.value=true;
+            jgList.value=response.data;
+            // console.log(response,'response')
+            addMarker(response.data);
+            console.log(map.value,'map.value');
+            loading.value=false;
+        })
+    }
+
+    function markerClick(e) {
+        if (e.target._originOpts.extData) {
+            setMarker(e.target._originOpts.extData);
+            handXq(e.target._originOpts.extData);
+        }
+    }
+    function goBack() {
+        isShow.value=true;
+        if(marker.value)
+        {
+            marker.value.setMap(null)
+        }
+    }
+    function setMarker(item) {
+        if(marker.value)
+        {
+            marker.value.setMap(null)
+        }
+         marker.value = new AMap.Marker({
+            map:map.value,
+            position: [item.lat + '', item.lng + ''],
+            icon: new AMap.Icon({
+                // 引入小红车图片位置
+                image: new URL('../../assets/images/db.png', import.meta.url).href,
+                size: new AMap.Size(26, 30)
+            }),
+            extData: item
+        });
+    }
+    function addMarker(data) {
+        if(map.value) {
+            map.value.clearMap();
+        }
+        map.value = new AMap.Map("container", {
+            resizeEnable: true,
+            center: [105, 34],
+            zoom: 4
+        });
+        data.forEach(item => {
+            if(item.lat&&item.lng) {
+                let marker = new AMap.Marker({
+                    position: [item.lat + '', item.lng + ''],
+                    icon: new AMap.Icon({
+                        // 引入小红车图片位置
+                        image: item&&item.id==='1'?new URL('../../assets/images/jg7.png', import.meta.url).href:new URL('../../assets/images/jg1.png', import.meta.url).href,
+                        size: new AMap.Size(33, 31)
+                    }),
+                    extData: item
+                });
+                marker.on("click", markerClick);
+                map.value.add(marker);
+            }
+        })
+    }
+
+    function changDate(data) {
+        if (!data)
+        {
+            return false;
+        }
+        if(data.length<7)
+        {
+            return false
+        }
+        return data.slice(0,4) + '-' + data.slice(4, 6) + '-' + data.slice(6,8)
+    }
+    //首先需要引入 Vue3 的 shallowRef 方法(使用 shallowRef 进行非深度监听,因为在 Vue3 所使用的 Proxy 拦截操作会改变 JSAPI 原生对象,所以此处需要区别 Vue2 使用方式对地图对象行非深度监听,否则会出现问题,建议 JS API 相关对象采用非响应式的普通对象来存储)。
+    const map = shallowRef(null);
+    const initMap = () => {
+        {
+            AMapLoader.load({
+                key: '6c087d703e652767650a6b3208f76c40',  //设置您的key
+                version: "2.0",
+                plugins: ['AMap.ToolBar', 'AMap.Driving'],
+                AMapUI: {
+                    version: "1.1",
+                    plugins: [],
+
+                },
+                Loca: {
+                    version: "2.0.0"
+                },
+            }).then((AMap) => {
+                getList();
+            }).catch(e => {
+                console.log(e);
+            })
+        }
+    };
+    onMounted(() => {
+        initMap();
+    });
+    onUnmounted(() => {
+        //离开前要进行地图销毁,防止占有资源
+        map.value && map.value.destroy();
+        console.log('销毁了')
+    })
+</script>
+
+
+<style scoped>
+    .main_box2 {
+        background: #FFFFFF;
+        border: 1px solid #DEDEDE;
+    }
+
+    .bread {
+        height: 58px;
+        border-bottom: 1px solid #DEDEDE;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+    }
+
+    .bread_left {
+        display: flex;
+        margin-left: 34px;
+
+    }
+
+    .gray {
+        font-size: 16px;
+        font-weight: bold;
+        color: #666666;
+    }
+
+    :deep(.el-breadcrumb) {
+        font-size: 16px;
+        line-height: unset;
+    }
+
+    .red {
+        font-size: 16px;
+        font-weight: bold;
+        color: #B80100;
+    }
+
+    .flex {
+        display: flex;
+        margin-top: 24px;
+
+    }
+
+    .el-form-item {
+        margin-left: 34px;
+    }
+
+    .jg_box {
+        height: 646px;
+        background: #FFFFFF;
+        border: 1px solid #DEDEDE;
+        border-radius: 10px;
+        /*overflow-y: auto;*/
+    }
+    .jg_main{
+        height: 580px;
+        overflow-y: auto;
+    }
+    .jg_list {
+        height: 78px;
+        width: 90%;
+        margin: auto;
+        display: flex;
+        flex-direction: column;
+        border-bottom: 1px solid #DEDEDE;
+    }
+
+    .tb {
+        width: 24px;
+        height: 24px;
+        margin-right: 10px;
+    }
+
+    .title_overflow {
+        width: 244px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
+
+    .fontStyle {
+        font-size: 16px;
+        font-weight: bold;
+        color: #333333;
+    }
+    .fontStyle2 {
+        font-size: 14px;
+        font-weight: bold;
+        color: #999999;
+    }
+    .ml35{
+        margin-left: 35px;
+    }
+
+    .affix-container {
+        width: 317px;
+        height: 48px;
+        background: #BF242A;
+        border-radius: 10px;
+        text-align: center;
+        line-height: 48px;
+        font-size: 16px;
+        font-weight: bold;
+        color: #FFFFFF;
+    }
+
+    .fh_box{
+        width: 317px;
+        height: 48px;
+        background: #BF242A;
+        border-radius: 10px;
+        display: flex;
+    }
+    .fontStyle3{
+        display: flex;
+        align-items: center;
+        font-size: 16px;
+        font-weight: bold;
+        color: #FFFFFF;
+        margin-left: 14px;
+        cursor: pointer;
+    }
+    .ml24{
+        margin-left: 14px;
+    }
+    .xq_main{
+        margin: 0 14px;
+    }
+    .xq_box{
+        height: 48px;
+        display: flex;
+        align-items: center;
+        border-bottom: 1px solid #DEDEDE;
+        padding: 5px 10px;
+    }
+    .pointer{
+        cursor: pointer;
+    }
+    .topImg {
+        width: 100%;
+        height: 100%;
+    }
+    .jg_button{
+        position: absolute;
+        bottom: 20px;
+        left: 20px;
+        /*border: red solid 1px;*/
+        z-index: 99999;
+        /*width: 500px;*/
+        display: flex;
+        background: #FFFFFF;
+        padding: 10px;
+        /*height: 73px;*/
+    }
+
+    .button_style{
+        font-size: 16px;
+        font-weight: 600;
+        color: #333333;
+        margin-right: 20px;
+        display: flex;
+        align-items: center;
+    }
+    .mt15{
+        margin-left: 20px;
+    }
+
+</style>

+ 1 - 3
ruoyi-web/src/views/ylzc/index.vue

@@ -72,7 +72,7 @@
             <div v-loading="loading" v-if="tableData.length>0">
                 <div class="table-box" v-for="(item,index) in tableData" :key="index">
                     <div class="box_left">
-                        <div class="box_title"> {{item.bt}}</div>
+                        <div class="box_title"> <el-link :href="'/ylzc/'+item.id">{{item.bt}}</el-link> </div>
                         <div class="box_title2">
                             <div class="title_lx">文章来源:{{item.bm}}</div>
                             发文字号:{{item.issZh}}
@@ -175,7 +175,6 @@
     function getList() {
         loading.value = true;
         let qur = {};
-        console.log(input.value, 'input.value');
         if (input.value) {
             qur[select.value] = input.value;
         }
@@ -226,7 +225,6 @@
         if (name !== 'first') {
             queryParams.value.ffl = name
         }
-        console.log(queryParams, 'queryParams');
         getList();
     }
 

+ 76 - 0
ruoyi-web/src/views/zcxq/index.vue

@@ -0,0 +1,76 @@
+<template>
+    <div class="main_box2">
+        <div class="bread">
+            <div class="bread_left">
+                <div class="gray">您现在所在位置:</div>
+                <el-breadcrumb separator=">>">
+                    <el-breadcrumb-item :to="{ path: '/home' }"><span class="gray">首页</span></el-breadcrumb-item>
+                    <el-breadcrumb-item><span class="red">政策详细</span></el-breadcrumb-item>
+                </el-breadcrumb>
+            </div>
+        </div>
+        <div class="content" v-html="nr">
+
+        </div>
+    </div>
+</template>
+
+<script setup>
+
+    import {onMounted} from 'vue'
+    import {useRoute} from 'vue-router'
+    import {mhZcxwXq} from '@/api/home'
+    let router = useRoute();
+    const nr=ref('');
+    function getList(){
+        mhZcxwXq(router.params.id).then(response=>{
+            console.log(response,'response');
+            nr.value=response.data.nr;
+        })
+    }
+    onMounted(()=>{
+        getList();
+        // console.log(router.params.id,'router.params')
+    })
+</script>
+
+<style scoped>
+    .main_box2 {
+        background: #FFFFFF;
+        border: 1px solid #DEDEDE;
+    }
+
+    .bread {
+        height: 58px;
+        border-bottom: 1px solid #DEDEDE;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+    }
+
+    .bread_left {
+        display: flex;
+        margin-left: 34px;
+    }
+
+    .gray {
+        font-size: 16px;
+        font-weight: bold;
+        color: #666666;
+    }
+
+    :deep(.el-breadcrumb) {
+        font-size: 16px;
+        line-height: unset;
+    }
+
+    .red {
+        font-size: 16px;
+        font-weight: bold;
+        color: #B80100;
+    }
+    .content{
+        margin: 0 34px;
+    }
+
+</style>