lrf vor 4 Monaten
Ursprung
Commit
494f0a6c34

+ 1 - 1
.env.development

@@ -3,4 +3,4 @@ NODE_ENV=production
 # 请求路径
 VITE_REQUEST_BASE='/warter/front/v2/api'
 
-VITE_BASE_URL="shuitou"
+VITE_BASE_URL="shuitou"

+ 2 - 1
.env.production

@@ -4,4 +4,5 @@ NODE_ENV=production
 # 请求路径
 VITE_REQUEST_BASE='/warter/front/v2/api'
 
-VITE_BASE_URL="shuitou"
+VITE_BASE_URL="shuitou"
+

BIN
public/zxzx.jpg


+ 5 - 1
src/api/api.ts

@@ -101,6 +101,10 @@ const xxgk = async (type: string) => {
   const res = await axios.$get(`/xxgk/${type}`)
   return res;
 }
+const xxgkDetail = async (content_id: string) => {
+  const res = await axios.$get(`/xxgk/detail/${content_id}`)
+  return res;
+};
 /**民意征集模块 */
 const myzj = {
   rdhy: async (query: any = {}) => {
@@ -165,4 +169,4 @@ const zjsw = {
   }
 }
 
-export { common, index, jtjs, jtxw, xxgk, myzj, gsxx, zjsw }
+export { common, index, jtjs, jtxw, xxgk, xxgkDetail, myzj, gsxx, zjsw }

+ 8 - 0
src/router/modules/winRouter.ts

@@ -47,6 +47,14 @@ export const winRouter = [
       title: '信息公开',
     },
   },
+  {
+    path: '/messDetailSec',
+    component: () => import('../../views/win/messDetailSec.vue'),
+    name: 'messDetailSec',
+    meta: {
+      title: '信息公开',
+    },
+  },
   {
     path: '/popularwillIndex',
     component: () => import('../../views/win/popularwillIndex.vue'),

+ 7 - 0
src/utils/timeFormat.ts

@@ -0,0 +1,7 @@
+import dayjs from 'dayjs'
+
+const tf = (time: string, formatPartten = 'YYYY-MM-DD HH:mm:ss') => {
+  return dayjs(time).format(formatPartten)
+}
+
+export { tf }

+ 8 - 6
src/views/win/introduceParts/combriefIndex.vue

@@ -17,9 +17,9 @@
           </el-col>
         </el-col>
         <el-col :span="17" class="right">
-          <el-col :span="24" class="title">
+          <!-- <el-col :span="24" class="title">
             {{ info.title }}
-          </el-col>
+          </el-col> -->
           <el-col :span="24" class="brief" v-html="info.txt"> </el-col>
           <el-col :span="24" class="btns">
             <el-button type="primary" size="default" @click="toOpen()">查看详情</el-button>
@@ -80,13 +80,15 @@ onMounted(() => {
 const init = async () => {
   const result = await jtjs.gsjs()
   if (result.errcode == 0) {
-    // if (result.data && result.data.length > 0) list.value = result.data
+    list.value = get(result, 'data', [])
   }
 }
 const toOpen = () => {
-  const path = get(info, 'value.path')
-  if (!path) return
-  window.open(`/${import.meta.env.VITE_BASE_URL}${path}`)
+  const channel_id = get(info, 'channel_id', get(info, 'id'))
+  if (!channel_id) return
+  window.open(
+    `/${import.meta.env.VITE_BASE_URL}/introduceDetail?channel_id=${channel_id}&type=gsjs`,
+  )
 }
 </script>
 <style scoped lang="scss">

Datei-Diff unterdrückt, da er zu groß ist
+ 102 - 97
src/views/win/introduceParts/companyIndex.vue


+ 1 - 1
src/views/win/introduceParts/gsjsDetail.vue

@@ -78,7 +78,7 @@ const viewData = ref({
 const toSearch = async () => {
   const result = await jtjs.gsjsDetail(viewChannel.value)
   if (result.errcode == 0) {
-    const data = get(result, 'data.data', {})
+    const data = get(result, 'data', {})
     if (Object.keys(data).length > 1) {
       // 因为默认会带上channel_id,所以只有key大于2的时候才是有数据
       viewData.value = data

+ 1 - 1
src/views/win/introduceParts/scfmDetail.vue

@@ -74,7 +74,7 @@ const viewData = ref({
 const toSearch = async () => {
   const result = await jtjs.gsjsDetail(viewChannel.value)
   if (result.errcode == 0) {
-    const data = get(result, 'data.data', {})
+    const data = get(result, 'data', {})
     if (Object.keys(data).length > 1) {
       // 因为默认会带上channel_id,所以只有key大于2的时候才是有数据
       viewData.value = data

+ 1 - 1
src/views/win/inwaterParts/detail.vue

@@ -83,7 +83,7 @@ const toSearch = async () => {
   const type = get(tab, 'type')
   const result = await zjsw.fetch(type)
   if (result.errcode == 0) {
-    const data = get(result, 'data.data', {})
+    const data = get(result, 'data', {})
     if (Object.keys(data).length > 1) {
       // 因为默认会带上channel_id,所以只有key大于2的时候才是有数据
       viewData.value = data

+ 71 - 0
src/views/win/messDetailSec.vue

@@ -0,0 +1,71 @@
+<template>
+  <el-row class="mess">
+    <el-col :span="24" class="bigImage"></el-col>
+    <el-col :span="24" class="info">
+      <el-col :span="24" class="menus">
+        <menusIndex />
+      </el-col>
+      <el-col :span="24" class="bottom">
+        <el-col :span="24" class="zero top">
+          <top-index :info="info" />
+        </el-col>
+        <el-col :span="24" class="zero">
+          <detail></detail>
+        </el-col>
+        <el-col :span="24" class="foot">
+          <foot-index />
+        </el-col>
+      </el-col>
+    </el-col>
+  </el-row>
+</template>
+<script setup lang="ts">
+/* 菜单 */
+import menusIndex from '../../components/windows/menusIndex.vue'
+/* 底部信息 */
+import footIndex from '../../components/windows/footIndex.vue'
+import detail from './messParts/detail.vue'
+import { ref } from 'vue'
+const info = ref({ title: '用水发展', enTitle: 'DEVELOP' })
+</script>
+
+<style scoped lang="scss">
+.mess {
+  position: relative;
+
+  .bigImage {
+    height: 480px;
+    overflow: hidden;
+    background-image: url('/water1.png');
+    background-repeat: no-repeat;
+    background-size: 100% 100%;
+  }
+
+  .info {
+    position: absolute;
+    top: 0;
+    width: 100%;
+    height: 100vh;
+    overflow: hidden;
+
+    .menus {
+      height: 66px;
+      overflow: hidden;
+    }
+
+    .bottom {
+      height: calc(100vh - 66px);
+      overflow-y: auto;
+      margin: 0 auto;
+
+      .zero {
+        margin: 0 0 40px 0;
+      }
+
+      .top {
+        padding: 0 17%;
+      }
+    }
+  }
+}
+</style>

Datei-Diff unterdrückt, da er zu groß ist
+ 87 - 0
src/views/win/messParts/detail.vue


+ 35 - 0
src/views/win/messParts/detail/khfw.vue

@@ -0,0 +1,35 @@
+<template>
+  <div id="khfw">
+    <el-row>
+      <el-col :span="24">客户服务</el-col>
+      <el-col :span="24" v-for="i in list">
+        <el-link type="primary" @click="toOpen(i)">{{ i.title }}</el-link>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { get } from 'lodash-es'
+import { ref } from 'vue'
+const list = ref([
+  { title: '1、投诉处理流程', content_id: 6072 },
+  { title: '2、服务网点', url: '/messDetail?tag=2&type=service' },
+  { title: '3、来访接待文明用语', content_id: 6071 },
+  { title: '4、服务行为准则', url: '/messDetail?tag=2&type=service' },
+  { title: '5、服务承诺', url: '/messDetail?tag=2&type=service' },
+  { title: '6、便民措施', content_id: 6070 },
+  { title: '7、服务标准', url: '/messDetail?tag=2&type=service' },
+  { title: '8、供水服务保障措施', url: '/messDetail?tag=6&type=service' },
+])
+const toOpen = (data: object) => {
+  const content_id = get(data, 'content_id')
+  const url = get(data, 'url')
+  if(content_id) {
+    window.open(`/${import.meta.env.VITE_BASE_URL}/messDetailSec?content_id=${content_id}`)
+  } else {
+    window.open(`/${import.meta.env.VITE_BASE_URL}${url}`)
+  }
+}
+</script>
+<style scoped></style>

+ 135 - 0
src/views/win/messParts/detail/list.vue

@@ -0,0 +1,135 @@
+<template>
+  <el-row class="main animate__animated animate__backInLeft">
+    <el-col :span="24" class="infoList">
+      <el-col
+        :span="24"
+        class="list"
+        v-for="(item, index) in list"
+        :key="index"
+        @click="toDetail(item)"
+      >
+        <el-row class="list_1">
+          <el-col :span="20" class="title textOver">
+            {{ item.title }}
+          </el-col>
+          <el-col :span="4" class="date">
+            {{ tf(item.date) }}
+          </el-col>
+        </el-row>
+      </el-col>
+    </el-col>
+    <el-col :span="24" class="pages">
+      <pages-index :total="total" @search="toSearch" />
+    </el-col>
+  </el-row>
+</template>
+
+<script setup lang="ts">
+import { ref, onMounted } from 'vue'
+import { tf } from '@/utils/timeFormat'
+const props = defineProps({
+  code: { type: String },
+})
+/* 分页 */
+import pagesIndex from '@/components/windows/pagesIndex.vue'
+import { get } from 'lodash-es'
+const list = ref<any[]>([
+  {
+    id: '1',
+    title: '集团召开2021年度安全生产委员会第一次全体(扩大)视频会议',
+    date: '2024-12-24',
+  },
+  {
+    id: '2',
+    title: '集团召开2021年度安全生产委员会第一次全体(扩大)视频会议',
+    date: '2024-12-24',
+  },
+  {
+    id: '3',
+    title: '集团召开2021年度安全生产委员会第一次全体(扩大)视频会议',
+    date: '2024-12-24',
+  },
+  {
+    id: '4',
+    title: '集团召开2021年度安全生产委员会第一次全体(扩大)视频会议',
+    date: '2024-12-24',
+  },
+])
+const total = ref(40)
+
+import { xxgk } from '@/api/api'
+/* 查询 */
+const toSearch = async ({ skip = 0, limit = 10, ...info } = {}) => {
+  const type = props.code as string
+  const result = await xxgk(type)
+  if (result.errcode == 0) {
+    const data = get(result, 'data.data', [])
+    const total = get(result, 'data.total', 0)
+    list.value = data
+    total.value = total
+  }
+}
+import { useRoute } from 'vue-router'
+const route = useRoute()
+/* 初始化 */
+onMounted(() => {
+  toSearch()
+})
+const toDetail = (data: any) => {
+  const content_id = get(data, 'content_id')
+  window.open(`/${import.meta.env.VITE_BASE_URL}/messDetailSec?content_id=${content_id}`)
+}
+</script>
+<style scoped lang="scss">
+.main {
+  padding: 0 17%;
+
+  .infoList {
+    .list {
+      border-bottom: 1px solid rgb(217, 217, 217);
+      padding: 30px 0;
+      .list_1 {
+        display: flex;
+        .title {
+          color: rgb(25, 25, 26);
+          font-family: '黑体';
+          font-size: 24px;
+          font-weight: 500;
+          line-height: 35px;
+          letter-spacing: 0px;
+          text-align: left;
+        }
+
+        .date {
+          color: rgb(25, 25, 26);
+          font-family: '黑体';
+          font-size: 20px;
+          font-weight: 500;
+          line-height: 32px;
+          letter-spacing: 0px;
+          text-align: right;
+        }
+      }
+      .list_2 {
+        margin: 20px 0 0 0;
+        color: rgb(102, 102, 102);
+        font-family: '黑体';
+        font-size: 20px;
+        font-weight: 400;
+        line-height: 29px;
+        letter-spacing: 0px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        -webkit-line-clamp: 2;
+        word-break: break-all;
+        display: -webkit-box;
+        -webkit-box-orient: vertical;
+      }
+    }
+
+    .list:last-child {
+      border-bottom: none;
+    }
+  }
+}
+</style>

+ 41 - 0
src/views/win/messParts/detail/zhfw.vue

@@ -0,0 +1,41 @@
+<template>
+  <div id="zhfw">
+    <el-row>
+      <el-col :span="24">智慧服务(互联网+供水服务)</el-col>
+      <el-col :span="24" v-for="i in list">
+        <el-link type="primary" @click="toOpen(i)">{{ i.title }}</el-link>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { get } from 'lodash-es'
+import { ref } from 'vue'
+const list = ref([
+  { title: '1、长春水务集团践行最多跑一次 区块链 民生缴费全国首创', content_id: 6063 },
+  { title: '2、最多跑一次操作流程', content_id: 6053 },
+  { title: '3、供水服务系统标准化业务办理', content_id: 6062 },
+  { title: '4、服务收费', url: '/messDetail?tag=4&type=service' },
+  { title: '5、电子发票', content_id: 6061 },
+  { title: '6、短信平台', content_id: 6060 },
+  { title: '7、微信公众号', content_id: 6059 },
+  { title: '8、各供水分公司及网点地址及办公电话', url: '/messDetail?tag=2&type=service' },
+  { title: '9、支付宝代扣', content_id: 6054 },
+  { title: '10、微信缴费', content_id: 6055 },
+  { title: '11、支付宝缴费', content_id: 6056 },
+  { title: '12、缴费方式一次性告知书', url: '/u/cms/www/202403/08100748jhaz.png' },
+  { title: '13、长春水投集团全国行业首推用户自抄表服务', content_id: 6057 },
+  { title: '14、智慧水务简介', content_id: 6064 },
+])
+const toOpen = (data: object) => {
+  const content_id = get(data, 'content_id')
+  const url = get(data, 'url')
+  if(content_id) {
+    window.open(`/${import.meta.env.VITE_BASE_URL}/messDetailSec?content_id=${content_id}`)
+  } else {
+    window.open(`/${import.meta.env.VITE_BASE_URL}${url}`)
+  }
+}
+</script>
+<style scoped></style>

+ 2 - 5
src/views/win/messParts/infoDetail.vue

@@ -92,11 +92,8 @@ const toSearch = async () => {
   const type = get(tab, 'type')
   const result = await xxgk(type)
   if (result.errcode == 0) {
-    const data = get(result, 'data.data', {})
-    if (Object.keys(data).length > 1) {
-      // 因为默认会带上channel_id,所以只有key大于2的时候才是有数据
-      viewData.value = data
-    }
+    const data = get(result, 'data', {})
+    viewData.value = data
   }
 }
 

+ 1 - 1
src/views/win/messParts/serviceDetail.vue

@@ -141,7 +141,7 @@ const toSearch = async () => {
   const type = get(tab, 'type')
   const result = await xxgk(type)
   if (result.errcode == 0) {
-    const data = get(result, 'data.data', {})
+    const data = get(result, 'data', {})
     if (Object.keys(data).length > 1) {
       // 因为默认会带上channel_id,所以只有key大于2的时候才是有数据
       viewData.value = data

+ 27 - 8
src/views/win/messParts/waterDetail.vue

@@ -12,14 +12,26 @@
           {{ item.title }}
         </el-col>
       </el-col>
-      <el-col :span="24" class="infoList">
-        <p>{{ viewData.title }}</p>
+      <el-col :span="24" class="infoList" v-if="tabActive === '1'">
         <span v-html="viewData.txt"></span>
       </el-col>
+      <el-col :span="24" v-else-if="tabActive === '2'">
+        <zhfw></zhfw>
+      </el-col>
+      <el-col :span="24" v-else-if="tabActive === '3'">
+        <khfw></khfw>
+      </el-col>
+      <!-- 4,5 -->
+      <el-col :span="24" v-else :key="tk">
+        <list :code="viewType"></list>
+      </el-col>
     </el-col>
   </el-row>
 </template>
 <script setup lang="ts">
+import zhfw from './detail/zhfw.vue'
+import khfw from './detail/khfw.vue'
+import list from './detail/list.vue'
 import { ref, onMounted } from 'vue'
 import { get } from 'lodash-es'
 const tabList = ref([
@@ -28,6 +40,7 @@ const tabList = ref([
     title: '获得用水',
     type: 'hdysz',
   },
+  // 智慧服务和客户服务是写死的,能查出来数据,但是还有查不出来的
   {
     id: '2',
     title: '智慧服务',
@@ -51,10 +64,19 @@ const tabList = ref([
   },
 ])
 const tabActive = ref('1')
+const viewType = ref('')
+const tk = ref(0)
 /* 选择 */
 const tabChange = (event: { id: string }) => {
   tabActive.value = event.id
-  toSearch()
+  const nd = new Date()
+  tk.value = nd.getTime()
+  if (event.id === '1') toSearch()
+  else if (event.id === '4' || event.id === '5') {
+    const tab = tabList.value.find((f) => f.id == event.id)
+    const type = get(tab, 'type')
+    if (type) viewType.value = type
+  }
 }
 import { xxgk } from '@/api/api'
 const viewData = ref({
@@ -69,11 +91,8 @@ const toSearch = async () => {
   const type = get(tab, 'type')
   const result = await xxgk(type)
   if (result.errcode == 0) {
-    const data = get(result, 'data.data', {})
-    if (Object.keys(data).length > 1) {
-      // 因为默认会带上channel_id,所以只有key大于2的时候才是有数据
-      viewData.value = data
-    }
+    const data = get(result, 'data', {})
+    viewData.value = data
   }
 }
 import { useRoute } from 'vue-router'

+ 10 - 9
src/views/win/newsParts/detail.vue

@@ -7,13 +7,13 @@
             <p class="title">{{ viewData.title }}</p>
           </el-col>
           <el-col :span="24" class="time">
-            <span>发布时间: {{ viewData.time }} </span>
+            <span>发布时间: {{ tf(viewData.release_date) }} </span>
             <span>作者: {{ viewData.author }} </span>
-            <span> 来源: {{ viewData.source }}</span>
+            <span> 来源: {{ viewData.source || '本站原创' }}</span>
             <span> 浏览次数: {{ viewData.views }}</span>
           </el-col>
         </el-row>
-        <span v-html="viewData.txt"></span>
+        <span v-html="getProp(viewData, 'txt.txt')"></span>
       </el-col>
     </el-col>
   </el-row>
@@ -22,10 +22,11 @@
 <script setup lang="ts">
 import { ref, onMounted } from 'vue'
 import { get } from 'lodash-es'
+import { tf } from '@/utils/timeFormat'
 const viewData = ref({
   channel_id: '',
   title: '集团召开2021年度安全生产委员会第一次全体(扩大)视频会议',
-  time: '2024-12-01 12:00:00',
+  release_date: '2024-12-01 12:00:00',
   author: '长春水务集团',
   source: '本站原创',
   views: 200,
@@ -46,13 +47,13 @@ import { jtxw } from '@/api/api'
 const toSearch = async (id: any) => {
   const result = await jtxw.fetch(id)
   if (result.errcode == 0) {
-    const data = get(result, 'data.data', {})
-    if (Object.keys(data).length > 1) {
-      // 因为默认会带上channel_id,所以只有key大于2的时候才是有数据
-      viewData.value = data
-    }
+    const data = get(result, 'data', {})
+    viewData.value = data
   }
 }
+const getProp = (data: object, path: string) => {
+  return get(data, path)
+}
 </script>
 <style scoped lang="scss">
 .main {

+ 2 - 2
src/views/win/newsParts/listIndex.vue

@@ -32,8 +32,8 @@
             <el-col :span="24" class="title">
               {{ item.title }}
             </el-col>
-            <el-col :span="24" class="brief">
-              {{ item.brief }}
+            <el-col :span="24" class="brief" v-html="item.brief">
+              <!-- {{ item.brief }} -->
             </el-col>
           </el-col>
           <el-col :span="6" class="imgs">

+ 71 - 0
src/views/win/popularwillDetail.vue

@@ -0,0 +1,71 @@
+<template>
+  <el-row class="mess">
+    <el-col :span="24" class="bigImage"></el-col>
+    <el-col :span="24" class="info">
+      <el-col :span="24" class="menus">
+        <menusIndex />
+      </el-col>
+      <el-col :span="24" class="bottom">
+        <el-col :span="24" class="zero top">
+          <top-index :info="info" />
+        </el-col>
+        <el-col :span="24" class="zero">
+          <detail></detail>
+        </el-col>
+        <el-col :span="24" class="foot">
+          <foot-index />
+        </el-col>
+      </el-col>
+    </el-col>
+  </el-row>
+</template>
+<script setup lang="ts">
+/* 菜单 */
+import menusIndex from '../../components/windows/menusIndex.vue'
+/* 底部信息 */
+import footIndex from '../../components/windows/footIndex.vue'
+import detail from './popularwillParts/detail.vue'
+import { ref } from 'vue'
+const info = ref({ title: '民意征集', enTitle: 'POLL' })
+</script>
+
+<style scoped lang="scss">
+.mess {
+  position: relative;
+
+  .bigImage {
+    height: 480px;
+    overflow: hidden;
+    background-image: url('/water1.png');
+    background-repeat: no-repeat;
+    background-size: 100% 100%;
+  }
+
+  .info {
+    position: absolute;
+    top: 0;
+    width: 100%;
+    height: 100vh;
+    overflow: hidden;
+
+    .menus {
+      height: 66px;
+      overflow: hidden;
+    }
+
+    .bottom {
+      height: calc(100vh - 66px);
+      overflow-y: auto;
+      margin: 0 auto;
+
+      .zero {
+        margin: 0 0 40px 0;
+      }
+
+      .top {
+        padding: 0 17%;
+      }
+    }
+  }
+}
+</style>

+ 48 - 53
src/views/win/popularwillIndex.vue

@@ -1,24 +1,23 @@
 <template>
-      <el-row class="inwater">
-            <el-col :span="24" class="bigImage"></el-col>
-            <el-col :span="24" class="info">
-                  <el-col :span="24" class="menus">
-                        <menusIndex />
-                  </el-col>
-                  <el-col :span="24" class="bottom">
-                        <el-col :span="24" class="zero top">
-                              <top-index :info="{ title: '民意征集', enTitle: 'poll' }" />
-                        </el-col>
-                        <el-col :span="24" class="zero">
-                              <form-index />
-                        </el-col>
-                        <el-col :span="24" class="foot">
-                              <foot-index />
-                        </el-col>
-                  </el-col>
-            </el-col>
-      </el-row>
-
+  <el-row class="inwater">
+    <el-col :span="24" class="bigImage"></el-col>
+    <el-col :span="24" class="info">
+      <el-col :span="24" class="menus">
+        <menusIndex />
+      </el-col>
+      <el-col :span="24" class="bottom">
+        <el-col :span="24" class="zero top">
+          <top-index :info="{ title: '民意征集', enTitle: 'poll' }" />
+        </el-col>
+        <el-col :span="24" class="zero">
+          <form-index />
+        </el-col>
+        <el-col :span="24" class="foot">
+          <foot-index />
+        </el-col>
+      </el-col>
+    </el-col>
+  </el-row>
 </template>
 
 <script setup lang="ts">
@@ -37,45 +36,41 @@ import footIndex from '../../components/windows/footIndex.vue'
 </script>
 <style scoped lang="scss">
 .inwater {
-      position: relative;
-
-      .bigImage {
-            height: 480px;
-            overflow: hidden;
-            background-image: url('/popu1.png');
-            background-repeat: no-repeat;
-            background-size: 100% 100%;
-      }
-
-      .info {
-            position: absolute;
-            top: 0;
-            width: 100%;
-            height: 100vh;
-            overflow: hidden;
+  position: relative;
 
-            .menus {
-                  height: 66px;
-                  overflow: hidden;
-            }
+  .bigImage {
+    height: 480px;
+    overflow: hidden;
+    background-image: url('/popu1.png');
+    background-repeat: no-repeat;
+    background-size: 100% 100%;
+  }
 
-            .bottom {
-                  height: calc(100vh - 66px);
-                  overflow-y: auto;
-                  margin: 0 auto;
+  .info {
+    position: absolute;
+    top: 0;
+    width: 100%;
+    height: 100vh;
+    overflow: hidden;
 
+    .menus {
+      height: 66px;
+      overflow: hidden;
+    }
 
-                  .zero {
-                        margin: 0 0 40px 0;
+    .bottom {
+      height: calc(100vh - 66px);
+      overflow-y: auto;
+      margin: 0 auto;
 
-                  }
-
-                  .top {
-                        padding: 0 17%;
-                  }
-
-            }
+      .zero {
+        margin: 0 0 40px 0;
       }
 
+      .top {
+        padding: 0 17%;
+      }
+    }
+  }
 }
 </style>

Datei-Diff unterdrückt, da er zu groß ist
+ 87 - 0
src/views/win/popularwillParts/detail.vue


+ 38 - 23
src/views/win/popularwillParts/respondIndex.vue

@@ -1,7 +1,13 @@
 <template>
   <el-col :span="24" class="info">
     <el-col :span="24" class="infoList">
-      <el-row :gutter="40" class="list" v-for="(item, index) in list" :key="index">
+      <el-row
+        :gutter="40"
+        class="list"
+        v-for="(item, index) in list"
+        :key="index"
+        @click="toDetail(item)"
+      >
         <el-col :span="8" class="imgs">
           <el-image class="images" :src="item.url" />
         </el-col>
@@ -9,22 +15,25 @@
           <el-col :span="24" class="title">
             {{ item.title }}
           </el-col>
-          <el-col :span="24" class="brief">
+          <!-- <el-col :span="24" class="brief">
             {{ item.brief }}
-          </el-col>
+          </el-col> -->
           <el-col :span="24" class="other">
-            <span
-              >发布时间:<span>{{ item.pubilcDate }}</span></span
-            >
-            <span
-              >作者:<span>{{ item.person }}</span></span
-            >
-            <span
-              >来源:<span>{{ item.orgin }}</span></span
-            >
-            <span
-              >浏览次数:<span>{{ item.showNum }}</span></span
-            >
+            <span>
+              发布时间:
+              <span>{{ item.release_date }}</span>
+            </span>
+            <span>
+              作者:
+              <span>{{ item.person || '水务集团' }}</span>
+            </span>
+            <span>
+              来源:
+              <span>{{ item.orgin || '本站原创' }}</span>
+            </span>
+            <span>
+              浏览次数:<span>{{ item.views }}</span>
+            </span>
           </el-col>
         </el-col>
       </el-row>
@@ -47,10 +56,10 @@ const list = ref([
     title: '为什么停水?',
     brief:
       '停水会影响用户正常的生产生活,是广大用户十分关切的问题。那么哪些原因会造成停水呢? 水从水源地到用户终端,除了要经过取水泵站、水厂净化处理、区域加压站加压、 二次供水泵站加压等过程,还要经过源水管线、 市政供水管网、二次供水管网等不同尺寸的管道长距离',
-    pubilcDate: '2024-12-12 12:12:12',
+    release_date: '2024-12-12 12:12:12',
     person: '作者',
     orgin: '本站编辑',
-    showNum: '2',
+    views: '2',
     url: 'poll1.png',
   },
   {
@@ -58,23 +67,25 @@ const list = ref([
     title: '为什么停水?',
     brief:
       '停水会影响用户正常的生产生活,是广大用户十分关切的问题。那么哪些原因会造成停水呢? 水从水源地到用户终端,除了要经过取水泵站、水厂净化处理、区域加压站加压、 二次供水泵站加压等过程,还要经过源水管线、 市政供水管网、二次供水管网等不同尺寸的管道长距离',
-    pubilcDate: '2024-12-12 12:12:12',
+    release_date: '2024-12-12 12:12:12',
     person: '作者',
     orgin: '本站编辑',
-    showNum: '2',
+    views: '2',
     url: 'poll1.png',
   },
 ])
 const total = ref(0)
 import { myzj } from '@/api/api'
-import { get } from 'lodash-es';
+import { get } from 'lodash-es'
+import { onMounted } from 'vue'
+onMounted(() => {
+  toSearch()
+})
 /* 查询列表 */
 const toSearch = async ({ skip = 0, limit = 10, ...info } = {}) => {
-  console.log(skip, limit)
-  console.log(info)
   const result = await myzj.rdhy({ skip, limit, ...info })
   if (result.errcode == 0) {
-    const resultList = get(result, 'data.data', [])
+    const resultList = get(result, 'data', [])
     const resultTotal = get(result, 'data.total', 0)
     if (resultList.length > 0) {
       list.value = resultList
@@ -82,6 +93,10 @@ const toSearch = async ({ skip = 0, limit = 10, ...info } = {}) => {
     }
   }
 }
+const toDetail = (data: object) => {
+  const content_id = get(data, 'content_id')
+  window.open(`/${import.meta.env.VITE_BASE_URL}/popularwillDetail?content_id=${content_id}`)
+}
 </script>
 <style scoped lang="scss">
 .info {

+ 1 - 1
src/views/win/watersupplyParts/detail.vue

@@ -46,7 +46,7 @@ import { gsxx } from '@/api/api'
 const toSearch = async (id: any) => {
   const result = await gsxx.fetch(id)
   if (result.errcode == 0) {
-    const data = get(result, 'data.data', {})
+    const data = get(result, 'data', {})
     if (Object.keys(data).length > 1) {
       viewData.value = data
     }

+ 1 - 1
src/views/winParts/introduceIndex.vue

@@ -46,7 +46,7 @@ onMounted(() => {
 const init = async () => {
   const result = await index.jtjs()
   if (result.errcode == 0) {
-    if (get(result, 'data')) left2Data.value = get(result, 'data')
+    if (get(result, 'data')) left2Data.value = get(result, 'data.txt')
   }
 }
 const toOpen = () => {

+ 28 - 10
src/views/winParts/newsIndex.vue

@@ -19,13 +19,17 @@
                 @click="toDetail(item)"
               >
                 <el-col :span="6" class="imgs">
-                  <el-image class="images" :src="getProp(item, 'url')"></el-image>
+                  <el-image class="images" :src="getProp(item, 'url')">
+                    <template #placeholder>
+                      <el-image class="images" src="zxzx.jpg" />
+                    </template>
+                  </el-image>
                 </el-col>
                 <el-col :span="18" class="mess">
                   <!-- item.ext.title -->
                   <el-col :span="24" class="title textOver">{{ getProp(item, 'title') }}</el-col>
                   <!-- item.txt.txt -->
-                  <el-col :span="24" class="brief">{{ getProp(item, 'brief') }}</el-col>
+                  <!-- <el-col :span="24" class="brief" v-html="getProp(item, 'brief')"></el-col> -->
                   <!-- item.ext.release_date -->
                   <el-col :span="24" class="date">{{ getProp(item, 'date') }}</el-col>
                 </el-col>
@@ -42,11 +46,15 @@
                 @click="toDetail(item)"
               >
                 <el-col :span="6" class="imgs">
-                  <el-image class="images" :src="getProp(item, 'url')"></el-image>
+                  <el-image class="images" :src="getProp(item, 'url')">
+                    <template #placeholder>
+                      <el-image class="images" src="zxzx.jpg" />
+                    </template>
+                  </el-image>
                 </el-col>
                 <el-col :span="18" class="mess">
                   <el-col :span="24" class="title textOver">{{ getProp(item, 'title') }}</el-col>
-                  <el-col :span="24" class="brief">{{ getProp(item, 'brief') }}</el-col>
+                  <!-- <el-col :span="24" class="brief" v-html="getProp(item, 'brief')"></el-col> -->
                   <el-col :span="24" class="date">{{ getProp(item, 'date') }}</el-col>
                 </el-col>
               </el-col>
@@ -62,11 +70,15 @@
                 @click="toDetail(item)"
               >
                 <el-col :span="6" class="imgs">
-                  <el-image class="images" :src="getProp(item, 'url')"></el-image>
+                  <el-image class="images" :src="getProp(item, 'url')">
+                    <template #placeholder>
+                      <el-image class="images" src="zxzx.jpg" />
+                    </template>
+                  </el-image>
                 </el-col>
                 <el-col :span="18" class="mess">
                   <el-col :span="24" class="title textOver">{{ getProp(item, 'title') }}</el-col>
-                  <el-col :span="24" class="brief">{{ getProp(item, 'brief') }}</el-col>
+                  <!-- <el-col :span="24" class="brief" v-html="getProp(item, 'brief')"></el-col> -->
                   <el-col :span="24" class="date">{{ getProp(item, 'date') }}</el-col>
                 </el-col>
               </el-col>
@@ -82,11 +94,15 @@
                 @click="toDetail(item)"
               >
                 <el-col :span="6" class="imgs">
-                  <el-image class="images" :src="getProp(item, 'url')"></el-image>
+                  <el-image class="images" :src="getProp(item, 'url')">
+                    <template #placeholder>
+                      <el-image class="images" src="zxzx.jpg" />
+                    </template>
+                  </el-image>
                 </el-col>
                 <el-col :span="18" class="mess">
                   <el-col :span="24" class="title textOver">{{ getProp(item, 'title') }}</el-col>
-                  <el-col :span="24" class="brief">{{ getProp(item, 'brief') }}</el-col>
+                  <!-- <el-col :span="24" class="brief" v-html="getProp(item, 'brief')"></el-col> -->
                   <el-col :span="24" class="date">{{ getProp(item, 'date') }}</el-col>
                 </el-col>
               </el-col>
@@ -107,6 +123,7 @@ import { index } from '@/api/api'
 
 import dividerIndex from '../../components/windows/dividerIndex.vue'
 import { get } from 'lodash-es'
+import { tf } from '@/utils/timeFormat'
 
 const leftUrl = ref('news1.png')
 
@@ -116,7 +133,7 @@ const list = ref([
   {
     title:
       '集团召开2021年度安全生产委员会第一次全体(扩大)视频会议集团召开2021年度安全生产委员会第一次全体(扩大)视频会议',
-    url: 'news2.png',
+    url: null,
     brief:
       '1月29日,集团召开2021年度安全生产委员会第一次全体(扩大)视频会议,会议由集团总经理王爽主持。会上,集团副总经理于懿通1月29日,集团召开2021年度安全生产委员会第一次全体(扩大)视频会议,会议由集团总经理王爽主持。会上,集团副总经理于懿通',
     date: '2024-12-22',
@@ -169,7 +186,8 @@ const init = async () => {
   }
 }
 const getProp = (item: object, path: string) => {
-  return get(item, path)
+  if (path.includes('date')) return tf(get(item, path))
+  else return get(item, path)
 }
 const toDetail = (data: any) => {
   const content_id = get(data, 'content_id')