From 03c275439949875a857538df89a41696642c42b3 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期一, 01 九月 2025 17:15:39 +0800
Subject: [PATCH] '首页公告与详情'

---
 src/router/modules/remaining.ts            |   10 
 src/router/modules/item.ts                 |   42 +-
 .env                                       |    2 
 src/views/home/utils/hook.tsx              |  115 ++++++++
 src/views/home/component/myHeader.vue      |   12 
 src/views/system/aboutItem/form.vue        |    8 
 src/views/home/index.vue                   |  155 ++++------
 src/views/mine/index.vue                   |   12 
 src/views/newregister/index.vue            |    7 
 src/router/modules/home.ts                 |    3 
 src/views/home/detail.vue                  |  193 +++++++++++++
 src/views/newregister/utils/hook.tsx       |    7 
 src/router/index.ts                        |    8 
 src/views/system/dept/form.vue             |   25 +
 src/router/utils.ts                        |    2 
 src/views/system/component/pdfPreview2.vue |   89 ++++++
 src/api/item/shouye.ts                     |  110 +++++++
 src/views/system/aboutItem/utils/hook.tsx  |    2 
 18 files changed, 667 insertions(+), 135 deletions(-)

diff --git a/.env b/.env
index 09344c1..a5f8b9a 100644
--- a/.env
+++ b/.env
@@ -2,4 +2,4 @@
 VITE_PORT = 8848
 
 # 鏄惁闅愯棌棣栭〉 闅愯棌 true 涓嶉殣钘� false 锛堝嬁鍒犻櫎锛孷ITE_HIDE_HOME鍙渶鍦�.env鏂囦欢閰嶇疆锛�
-VITE_HIDE_HOME = false
+VITE_HIDE_HOME = true
diff --git a/src/api/item/shouye.ts b/src/api/item/shouye.ts
new file mode 100644
index 0000000..1939c7f
--- /dev/null
+++ b/src/api/item/shouye.ts
@@ -0,0 +1,110 @@
+/**棣栭〉鎺ュ彛 */
+import { http } from "@/utils/http";
+import { baseUrlApi } from "../util";
+import type { Result } from "../types";
+
+// 鑾峰彇鍐呭鍙戝竷璇︽儏
+export const neirongfabuDetail = params => {
+  return http.request<Result>(
+    "get",
+    baseUrlApi("/api/shouyeGonggao/neirongfabuDetail"),
+    {
+      params
+    }
+  );
+};
+
+// 鑾峰彇闈炴斂搴滆鍗曞鐞嗚鎯�
+export const feizhengfuDetail = params => {
+  return http.request<Result>("get", baseUrlApi("/api/shouyeGonggao/detail"), {
+    params
+  });
+};
+
+// 棣栭〉鏌ヨ闈炴斂搴滆鍗曞鐞�
+export const shouyeOrder = (data?: object) => {
+  return http.request<Result>(
+    "post",
+    baseUrlApi("/api/shouyeGonggao/shouyeOrder"),
+    {
+      data
+    }
+  );
+};
+
+// 棣栭〉鍙樻洿鍏憡
+export const shouyeChangeOrder = (data?: object) => {
+  return http.request<Result>(
+    "post",
+    baseUrlApi("/api/shouyeGonggao/shouyeChangeOrder"),
+    {
+      data
+    }
+  );
+};
+
+// 棣栭〉涓爣鍏憡
+export const shouyeZhongbiaoOrder = (data?: object) => {
+  return http.request<Result>(
+    "post",
+    baseUrlApi("/api/shouyeGonggao/shouyeZhongbiaoOrder"),
+    {
+      data
+    }
+  );
+};
+
+// 棣栭〉鍏憡淇℃伅-鎷涢噰鍏憡
+export const pageGonggao = (data?: object) => {
+  return http.request<Result>(
+    "post",
+    baseUrlApi("/api/shouyeGonggao/pageGonggao"),
+    {
+      data
+    }
+  );
+};
+
+// 棣栭〉鍏憡淇℃伅-鏇存鍏憡
+export const pageGengzgeng = (data?: object) => {
+  return http.request<Result>(
+    "post",
+    baseUrlApi("/api/shouyeGonggao/pageGengzgeng"),
+    {
+      data
+    }
+  );
+};
+
+// 棣栭〉鍏憡淇℃伅-涓爣鍏憡
+export const pageZhongbiaoGonggao = (data?: object) => {
+  return http.request<Result>(
+    "post",
+    baseUrlApi("/api/shouyeGonggao/pageZhongbiaoGonggao"),
+    {
+      data
+    }
+  );
+};
+
+// 棣栭〉鍐呭鍙戝竷
+export const shouyeNeirongfabu = (data?: object) => {
+  return http.request<Result>(
+    "post",
+    baseUrlApi("/api/shouyeGonggao/shouyeNeirongfabu"),
+    {
+      data
+    }
+  );
+};
+
+// 棣栭〉鍜ㄨ涓績-鍐呭鍙戝竷
+export const pageNeirongfabu = (data?: object) => {
+  return http.request<Result>(
+    "post",
+    baseUrlApi("/api/shouyeGonggao/pageNeirongfabu"),
+    {
+      data
+    }
+  );
+};
diff --git a/src/router/index.ts b/src/router/index.ts
index 5b3f172..2513d48 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -107,7 +107,13 @@
 
 /** 璺敱鐧藉悕鍗� */
 const whiteList = ["/login"];
-const noLoginList = ["/index", "/register", "/registernav", "/registersucess"];
+const noLoginList = [
+  "/index",
+  "/register",
+  "/registernav",
+  "/registersucess",
+  "/gonggaoDetail"
+];
 // const whiteList = [];
 
 const { VITE_HIDE_HOME } = import.meta.env;
diff --git a/src/router/modules/home.ts b/src/router/modules/home.ts
index 1cc1a4f..fd848f0 100644
--- a/src/router/modules/home.ts
+++ b/src/router/modules/home.ts
@@ -9,7 +9,8 @@
   meta: {
     icon: "ep/home-filled",
     title: "棣栭〉",
-    rank: 0
+    rank: 0,
+    showLink: false
   },
   children: [
     {
diff --git a/src/router/modules/item.ts b/src/router/modules/item.ts
index e79575d..e5370e0 100644
--- a/src/router/modules/item.ts
+++ b/src/router/modules/item.ts
@@ -39,26 +39,26 @@
         }
       }
     ]
-  },
-  {
-    path: "/aboutItem",
-    meta: {
-      title: "鍏虫敞椤圭洰",
-      icon: "pajamas:work-item-new"
-    },
-    children: [
-      {
-        // path闅忎究鍐欙紝浣嗗墠闈㈠繀椤绘湁涓� `/`
-        path: "/aboutItem",
-        // component瀵瑰簲鐨勫�煎墠涓嶉渶瑕佸姞 / 鍊煎搴旂殑鏄疄闄呬笟鍔� `.vue` 鎴� `.tsx` 浠g爜璺緞
-        component: () => import("@/views/system/aboutItem/index.vue"),
-        name: "aboutItem",
-        meta: {
-          title: "鍏虫敞椤圭洰",
-          roles: ["GYS"]
-          // showLink:false
-        }
-      }
-    ]
   }
+  // {
+  //   path: "/aboutItem",
+  //   meta: {
+  //     title: "鍏虫敞椤圭洰",
+  //     icon: "pajamas:work-item-new"
+  //   },
+  //   children: [
+  //     {
+  //       // path闅忎究鍐欙紝浣嗗墠闈㈠繀椤绘湁涓� `/`
+  //       path: "/aboutItem",
+  //       // component瀵瑰簲鐨勫�煎墠涓嶉渶瑕佸姞 / 鍊煎搴旂殑鏄疄闄呬笟鍔� `.vue` 鎴� `.tsx` 浠g爜璺緞
+  //       component: () => import("@/views/system/aboutItem/index.vue"),
+  //       name: "aboutItem",
+  //       meta: {
+  //         title: "鍏虫敞椤圭洰",
+  //         roles: ["GYS"]
+  //         // showLink:false
+  //       }
+  //     }
+  //   ]
+  // }
 ] satisfies Array<RouteConfigsTable>;
diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts
index a16cf52..56d2518 100644
--- a/src/router/modules/remaining.ts
+++ b/src/router/modules/remaining.ts
@@ -22,6 +22,16 @@
     }
   },
   {
+    path: "/gonggaoDetail",
+    name: "gonggaoDetail",
+    component: () => import("@/views/home/detail.vue"),
+    meta: {
+      title: "鍏憡璇︽儏",
+      showLink: false,
+      rank: 101
+    }
+  },
+  {
     path: "/login",
     name: "Login",
     component: () => import("@/views/login/index.vue"),
diff --git a/src/router/utils.ts b/src/router/utils.ts
index 8052c47..f074f76 100644
--- a/src/router/utils.ts
+++ b/src/router/utils.ts
@@ -29,7 +29,7 @@
 const quanxianList = ["/item"];
 const managerList = ["/user"];
 
-const userInfo = storageLocal().getItem<DataInfo<number>>(userKey);
+// const userInfo = storageLocal().getItem<DataInfo<number>>(userKey);
 // 鍔ㄦ�佽矾鐢�
 import { getAsyncRoutes } from "@/api/routes";
 
diff --git a/src/views/home/component/myHeader.vue b/src/views/home/component/myHeader.vue
index 7a63ed1..da8f022 100644
--- a/src/views/home/component/myHeader.vue
+++ b/src/views/home/component/myHeader.vue
@@ -24,6 +24,9 @@
       </div>
     </div>
   </div>
+  <div class="banner">
+    <!-- <img width="100%" height="306px" src="@/assets/home/banner.png" alt="" /> -->
+  </div>
 </template>
 
 <style lang="scss" scoped>
@@ -60,4 +63,13 @@
     }
   }
 }
+.banner {
+  //   left: -3.76px;
+  //   top: 80px;
+  //   position: absolute;
+  background: url("@/assets/home/banner.png") no-repeat left center;
+  background-size: cover;
+  width: 100%;
+  height: 306px;
+}
 </style>
diff --git a/src/views/home/detail.vue b/src/views/home/detail.vue
new file mode 100644
index 0000000..e288f0c
--- /dev/null
+++ b/src/views/home/detail.vue
@@ -0,0 +1,193 @@
+<script setup lang="ts">
+import { onMounted, reactive, ref, h } from "vue";
+import MyHeader from "./component/myHeader.vue";
+import MyFooter from "./component/myFooter.vue";
+import { useIndex } from "../home/utils/hook";
+import { message } from "@/utils/message";
+import pdfPreview from "@/views/system/component/pdfPreview.vue";
+import { deviceDetection } from "@pureadmin/utils";
+import { addDialog } from "@/components/ReDialog";
+
+const { getNeirongfabuDetail, route, router, getFeizhengfuDetail, stateHook } =
+  useIndex();
+import { ArrowRight } from "@element-plus/icons-vue";
+import MaterialIconThemePdf from "~icons/material-icon-theme/pdf";
+import MaterialIconThemeImage from "~icons/material-icon-theme/image";
+import MaterialIconThemeWord from "~icons/material-icon-theme/word";
+import MaterialIconThemeTable from "~icons/material-icon-theme/table";
+import MaterialIconThemeZip from "~icons/material-icon-theme/zip";
+const previewPdf = pdfUrl => {
+  switch (pdfUrl.fileType) {
+    case "png":
+      showImg(pdfUrl.filePath);
+      break;
+    case "jepg":
+      showImg(pdfUrl.filePath);
+      break;
+    case "pdf":
+      addDialog({
+        title: `棰勮pdf`,
+        props: {},
+        width: "60%",
+        draggable: true,
+        fullscreen: deviceDetection(),
+        fullscreenIcon: true,
+        sureBtnLoading: true,
+        closeOnClickModal: false,
+        contentRenderer: () => h(pdfPreview, { fileInfo: pdfUrl })
+        // jsx 璇硶 锛堟敞鎰忓湪.vue鏂囦欢鍚敤jsx璇硶锛岄渶瑕佸湪script寮�鍚痩ang="tsx"锛�
+      });
+      break;
+    default:
+      window.location.href = pdfUrl.filePath;
+      message("姝e湪涓嬭浇锛�");
+      break;
+  }
+};
+const showPreview = ref(false);
+const state = reactive({
+  srcList: []
+});
+const showImg = (name: string | number) => {
+  showPreview.value = true;
+  state.srcList = [name];
+};
+onMounted(() => {
+  console.log(route);
+
+  const value = route.query;
+  getFeizhengfuDetail(value);
+});
+defineOptions({
+  name: "gonggaoDetail"
+});
+</script>
+
+<template>
+  <div class="bg-[#f5f5f5] min-h-[100%]">
+    <my-header />
+    <div class="w-[80%] m-auto p-5">
+      <div class="h=[52px] w-[100%] bg-white p-2 pl-4 flex items-center">
+        <span class="text-sm">鎮ㄧ殑褰撳墠浣嶇疆锛�</span>
+        <el-breadcrumb :separator-icon="ArrowRight">
+          <el-breadcrumb-item :to="{ path: '/index' }" replace>
+            棣栭〉
+          </el-breadcrumb-item>
+          <el-breadcrumb-item>{{ route.meta.title }}</el-breadcrumb-item>
+        </el-breadcrumb>
+      </div>
+      <div class="bg-white w-[100%] p-4 mt-7">
+        <h3 class="text-center p-4 text-2xl">
+          {{ stateHook.gonggaoDetail.projectName }}
+        </h3>
+        <div class="w-[95%] m-auto pt-1 pb-1">
+          <div class="bg-[#edf1f4] w-[100%] m-auto text-center pt-1 pb-1">
+            銆愪俊鎭彂甯冧富浣擄細
+            {{ stateHook.gonggaoDetail.caigourenmingcheng }}
+            銆� 銆愬彂甯冩椂闂达細<span class="text-red-500">{{
+              stateHook.gonggaoDetail.createTime
+            }}</span
+            >銆�
+          </div>
+          <div class="mt-3">
+            <span class="text-xl">涓�銆侀」鐩熀鏈儏鍐�</span>
+            <div>
+              <p>椤圭洰缂栧彿锛歿{ stateHook.gonggaoDetail.projectCode }}</p>
+              <p>閲囪喘鏂瑰紡锛歿{ stateHook.gonggaoDetail.caigoufangshiName }}</p>
+              <p>棰勭畻閲戦锛歿{ stateHook.gonggaoDetail.caigouyusuan }}鍏�</p>
+              <p>鑱斿悎浣撴姇鏍囷細{{ stateHook.gonggaoDetail.lianhetitoubiao }}</p>
+              <p>
+                鎶曟爣鎶ュ悕寮�濮嬫椂闂达細{{ stateHook.gonggaoDetail.toubiaoStartDate }}
+              </p>
+              <p>
+                鎶曟爣鎶ュ悕鎴鏃堕棿锛歿{ stateHook.gonggaoDetail.toubiaoEndDate }}
+              </p>
+              <p>寮�鏍囨椂闂达細{{ stateHook.gonggaoDetail.kaibiaoDate }}</p>
+              <p
+                class="flex items-center cursor-pointer"
+                @click="
+                  previewPdf({
+                    name: stateHook.gonggaoDetail.zhaobiaowenjianName,
+                    filePath: stateHook.gonggaoDetail.zhaobiaowenjian,
+                    fileType: 'pdf'
+                  })
+                "
+              >
+                鎷涙爣鏂囦欢锛�<MaterialIconThemePdf style="font-size: 1.5em" />{{
+                  stateHook.gonggaoDetail.zhaobiaowenjianName
+                }}
+              </p>
+              <div v-if="stateHook.gonggaoDetail.fujian" class="flex">
+                闄勪欢锛�
+                <div>
+                  <p
+                    v-for="item in stateHook.gonggaoDetail.fujianList"
+                    :key="item.src"
+                    class="flex items-center cursor-pointer"
+                    @click="previewPdf(item)"
+                  >
+                    <MaterialIconThemeImage
+                      v-if="item.fileType == 'png' || item.fileType == 'jepg'"
+                      style="font-size: 1.5em"
+                    />
+                    <MaterialIconThemePdf
+                      v-else-if="item.fileType == 'pdf'"
+                      style="font-size: 1.5em"
+                    />
+                    <MaterialIconThemeTable
+                      v-else-if="item.fileType == 'xlsx'"
+                      style="font-size: 1.5em"
+                    />
+                    <MaterialIconThemeWord
+                      v-else-if="
+                        item.fileType == 'doc' || item.fileType == 'docx'
+                      "
+                      style="font-size: 1.5em"
+                    />
+                    <MaterialIconThemeZip v-else style="font-size: 1.5em" />
+                    {{ item.name }}
+                  </p>
+                </div>
+              </div>
+            </div>
+          </div>
+          <div v-if="stateHook.gonggaoDetail?.changeOrder" class="mt-3">
+            <span class="text-xl">浜屻�佸彉鏇村叕鍛�</span>
+            <div>
+              <p>
+                鍙樻洿鍚嶇О锛歿{ stateHook.gonggaoDetail.changeOrder?.projectName }}
+              </p>
+              <p
+                v-if="stateHook.gonggaoDetail?.changeOrder"
+                class="flex items-center cursor-pointer"
+                @click="
+                  previewPdf({
+                    name: stateHook.gonggaoDetail.changeOrder
+                      .biangengwenjianName,
+                    filePath:
+                      stateHook.gonggaoDetail.changeOrder.biangengwenjian,
+                    fileType: 'pdf'
+                  })
+                "
+              >
+                鍙樻洿鍏憡锛�
+                <MaterialIconThemePdf style="font-size: 1.5em" />
+                {{ stateHook.gonggaoDetail.changeOrder.biangengwenjianName }}
+              </p>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <my-footer />
+  </div>
+  <el-image-viewer
+    v-if="showPreview"
+    :url-list="state.srcList"
+    show-progress
+    @close="showPreview = false"
+  />
+</template>
+
+<style lang="scss" scoped></style>
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 897cbb0..87a030d 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -1,88 +1,43 @@
-el
 <template>
   <my-header />
-  <div class="banner">
-    <!-- <img width="100%" height="306px" src="@/assets/home/banner.png" alt="" /> -->
-  </div>
   <div class="notice">
     <div class="left">
-      <div class="item item1">
-        <img src="@/assets/home/notice1.png" alt="" />
-        <div>鎷涢噰鍏憡</div>
-      </div>
-      <div class="item">
-        <img src="@/assets/home/notice.png" alt="" />
-        <div>鏇存鍏憡</div>
-      </div>
-      <div class="item">
-        <img src="@/assets/home/notice.png" alt="" />
-        <div>缁撴灉鍏憡</div>
-      </div>
-      <div class="item">
-        <img src="@/assets/home/notice.png" alt="" />
-        <div>鍏朵粬鍏憡</div>
+      <div
+        v-for="(item, index) in state.gonggaoList"
+        :key="index"
+        :class="['item', stateHook.active == index ? 'item1' : '']"
+        @click="getShouyeOrder(index)"
+      >
+        <img
+          v-if="stateHook.active == index"
+          src="@/assets/home/notice1.png"
+          alt=""
+        />
+        <img v-else src="@/assets/home/notice.png" alt="" />
+        <div>{{ item.name }}</div>
       </div>
     </div>
     <div class="right">
       <!-- <el-tabs v-model="activeName" class="demo-tabs">
         <el-tab-pane label="鎰忓悜鍏紑" name="first">
           鎰忓悜鍏紑 -->
-      <div class="item">
-        <span
-          ><span style="color: #145ccd; font-weight: 600">路</span
-          >銆愬洓宸濈渷鎴愰兘甯傘��2024骞寸煶鐩樿閬撲粯瀹剁鏉戠伯娌逛骇涓氬洯鍖哄強閰嶅鍩虹璁炬柦寤鸿椤圭洰纾嬪晢鍏憡</span
-        >
-        <span>2024-04-15 18:10</span>
+      <div
+        v-for="item in stateHook.shouyeOrderList"
+        :key="item.id"
+        class="item"
+        @click="goDetail(item.tenderId ?? item.id)"
+      >
+        <span>
+          <span style="color: #145ccd; font-weight: 600">路</span>
+          {{
+            item.xingzhengquyuName &&
+            `銆�${item.xingzhengquyuName.match(/^.*?甯�/)}銆慲
+          }}
+          {{ item.projectName }}
+        </span>
+        <span>{{ item.createTime }}</span>
       </div>
-      <div class="item">
-        <span
-          ><span style="color: #145ccd; font-weight: 600">路</span
-          >銆愬洓宸濈渷鎴愰兘甯傘�戠唺鐚胺娓稿涓績灞�閮ㄦ敼閫犻」鐩鍟嗗叕鍛�</span
-        >
-        <span>2024-04-15 18:10</span>
-      </div>
-      <div class="item">
-        <span
-          ><span style="color: #145ccd; font-weight: 600">路</span
-          >銆愬洓宸濈渷鎴愰兘甯傘�戜腹鏅閬撴皯婀栫ぞ鍖虹孩鐧藉枩浜嬫湇鍔″満鎵�纾嬪晢鍏憡</span
-        >
-        <span>2024-04-15 18:10</span>
-      </div>
-      <div class="item">
-        <span
-          ><span style="color: #145ccd; font-weight: 600">路</span
-          >銆愬洓宸濈渷鎴愰兘甯傘�戞垚閮戒笢閮ㄦ柊鍖轰笁宀旀箹楂樼骇涓浣撹壓涓績鍓嶄复鏃跺仠杞﹀尯鍜屾鏍¢棬涓や晶闂ㄥ崼瀹ら棿鍖哄煙榛戝寲鍙婃帓姘存彁鍗囪В闄ゅ唴娑濋」鐩鍟嗗叕鍛�</span
-        >
-        <span>2024-04-15 18:10</span>
-      </div>
-      <div class="item">
-        <span
-          ><span style="color: #145ccd; font-weight: 600">路</span
-          >銆愬洓宸濈渷鎴愰兘甯傘�戝洓宸濈渷鎴愰兘鎴掓瘨搴峰鎵�鐥呮畫鎴掓瘨浜哄憳搴峰娲诲姩涓績缁翠慨鏀归�犻」鐩浜屾纾嬪晢鍏憡</span
-        >
-        <span>2024-04-15 18:10</span>
-      </div>
-      <div class="item">
-        <span
-          ><span style="color: #145ccd; font-weight: 600">路</span
-          >銆愬洓宸濈渷鎴愰兘甯傘�戣�佸共閮ㄦ椿鍔ㄤ腑蹇冭淇敼閫犻」鐩鍟嗗叕鍛�</span
-        >
-        <span>2024-04-15 18:10</span>
-      </div>
-      <div class="item">
-        <span
-          ><span style="color: #145ccd; font-weight: 600">路</span
-          >銆愬洓宸濈渷鎴愰兘甯傘�戦噾鐗涘尯鎶㈤櫓鏁戠伨宸ョ▼椤圭洰宸ョ▼闃熶紞鍌ㄥ搴擄紙鎴垮缓銆佸競鏀跨被锛夋嫑鏍囧叕鍛�</span
-        >
-        <span>2024-04-15 18:10</span>
-      </div>
-      <div class="item">
-        <span
-          ><span style="color: #145ccd; font-weight: 600">路</span
-          >銆愬洓宸濈渷鎴愰兘甯傘�戦噾鐗涘尯鎶㈤櫓鏁戠伨宸ョ▼椤圭洰宸ョ▼闃熶紞鍌ㄥ搴擄紙鎴垮缓銆佸競鏀跨被锛夋嫑鏍囧叕鍛�</span
-        >
-        <span>2024-04-15 18:10</span>
-      </div>
+
       <!-- </el-tab-pane>
         <el-tab-pane label="宸ョ▼鎷涙爣" name="second">宸ョ▼鎷涙爣</el-tab-pane>
         <el-tab-pane label="璐х墿鎷涙爣" name="third">璐х墿鎷涙爣</el-tab-pane>
@@ -386,6 +341,7 @@
 import { exRole } from "@/api/register/index";
 import { storageLocal, isString, isIncludeAllChildren } from "@pureadmin/utils";
 import { initRouter, getTopMenu } from "@/router/utils";
+import { useIndex } from "../home/utils/hook";
 
 import { getToken } from "@/utils/auth";
 import { useRoute, useRouter } from "vue-router";
@@ -398,6 +354,7 @@
 import type { RoleItem } from "@/api/types";
 
 const userStore = useUserStore();
+const { stateHook, getShouyeOrder, goDetail } = useIndex();
 
 // 璁块棶 state 灞炴��
 // console.log(userStore.roles,'-'); // 鐩存帴鑾峰彇鍊�
@@ -416,12 +373,19 @@
   roleList: [],
   rolesCode: [],
   userInfo: {} as userType,
-  accessToken: ""
+  accessToken: "",
+  gonggaoList: [
+    { name: "鎷涢噰鍏憡" },
+    { name: "鏇存鍏憡" },
+    { name: "缁撴灉鍏憡" }
+    // { name: "鍏朵粬鍏憡" }
+  ]
 });
 onMounted(() => {
   // exRole().then(res => {
   //   state.roleList = res.result;
   // });
+  getShouyeOrder(0);
   state.roleList = useUserStoreHook().rolesList;
   getUseRoles();
   state.accessToken = getToken()?.accessToken;
@@ -441,7 +405,7 @@
   addDialog({
     width: "20%",
     title: "纭淇℃伅",
-    contentRenderer: () => <p>鏄惁鐢宠涓簕item.name}锛�</p>, // jsx 璇硶 锛堟敞鎰忓湪.vue鏂囦欢鍚敤jsx璇硶锛岄渶瑕佸湪script寮�鍚痩ang="tsx"锛�
+    contentRenderer: () => <p>鏄惁鐢宠涓簕item.name}锛�</p>, // jsx 璇硶 锛堟敞鎰忓湪.vue鏂囦欢鍚敤jsx璇硶,闇�瑕佸湪script寮�鍚痩ang="tsx"锛�
     closeCallBack: ({ options, args }) => {
       if (args?.command === "cancel") {
         // 鎮ㄧ偣鍑讳簡鍙栨秷鎸夐挳
@@ -463,14 +427,17 @@
 const toWelcome = async item => {
   // if (useUserStoreHook().nowRole.code !== item.code) {
   // 鑾峰彇鍚庣璺敱
-  initRouter().then(() => {
-    console.log("hhhh");
-
-    useUserStoreHook().changeLogoInExRule({
+  useUserStoreHook()
+    .changeLogoInExRule({
       ruleCode: item.code
+    })
+    .then(res => {
+      initRouter().then(() => {
+        let path = getTopMenu(true);
+        router.push({ name: path.name });
+      });
     });
-    router.push({ name: "Welcome" });
-  });
+
   // }
 };
 // 鍘荤櫥褰�
@@ -480,32 +447,26 @@
 </script>
 
 <style lang="scss" scoped>
-.banner {
-  //   left: -3.76px;
-  //   top: 80px;
-  //   position: absolute;
-  background: url("@/assets/home/banner.png") no-repeat left center;
-  background-size: cover;
-  width: 100%;
-  height: 306px;
-}
 .notice {
   box-sizing: border-box;
   display: flex;
   justify-content: space-between;
   width: 72%;
-  height: 518px;
+  height: 400px;
   padding: 15px;
   margin: 20px auto;
   background: rgb(254, 254, 254);
   border-radius: 8px;
-  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
+  box-shadow:
+    rgba(149, 157, 165, 0.15) 0px -6px 18px,
+    rgba(149, 157, 165, 0.2) 0px 8px 24px;
   .left {
     width: 10%;
-    height: 483px;
+    height: 100%;
     display: flex;
     flex-wrap: wrap;
-    justify-content: space-between;
+    justify-content: space-around;
+    align-content: space-between;
     .item {
       width: 137px;
       height: 111px;
@@ -548,12 +509,12 @@
       padding: 0 10px;
     }
     /* 鍋舵暟琛岃儗鏅壊 */
-    .item:nth-child(even) {
+    .item:nth-child(odd) {
       background: rgb(244, 244, 244);
       border-radius: 4px;
     }
     /* 濂囨暟琛岃儗鏅壊 */
-    .item:nth-child(odd) {
+    .item:nth-child(even) {
       padding: 8px;
       background-color: #fff;
     }
diff --git a/src/views/home/utils/hook.tsx b/src/views/home/utils/hook.tsx
new file mode 100644
index 0000000..dd2df48
--- /dev/null
+++ b/src/views/home/utils/hook.tsx
@@ -0,0 +1,115 @@
+import { onMounted, reactive } from "vue";
+import { useRoute, useRouter } from "vue-router";
+import {
+  pageGonggao,
+  pageGengzgeng,
+  shouyeZhongbiaoOrder,
+  neirongfabuDetail,
+  shouyeOrder,
+  shouyeChangeOrder,
+  feizhengfuDetail
+} from "@/api/item/shouye";
+const convertFujianToObjects = (fujianStr, fujianNameStr) => {
+  // 鍒嗗壊瀛楃涓蹭负鏁扮粍骞惰繃婊ょ┖鍊�
+  const srcArray = fujianStr.split(",").filter(Boolean);
+  const nameArray = fujianNameStr.split(",").filter(Boolean);
+
+  // 鎻愬彇鏂囦欢鍚庣紑浣滀负valu
+  const getFileExtension = fileName => {
+    const lastDotIndex = fileName.lastIndexOf(".");
+    // 濡傛灉娌℃湁鍚庣紑鎴栨枃浠跺悕浠ョ偣缁撳熬锛岃繑鍥炵┖瀛楃涓�
+    if (lastDotIndex === -1 || lastDotIndex === fileName.length - 1) {
+      return "";
+    }
+    return fileName.slice(lastDotIndex + 1).toLowerCase();
+  };
+
+  // 鏄犲皠涓虹洰鏍囧璞℃暟缁�
+  return srcArray.map((src, index) => {
+    // 纭繚鍚嶇О鏁扮粍鏈夊搴旂储寮曠殑鍏冪礌
+    const name = nameArray[index]?.trim() || `鏈煡鏂囦欢${index + 1}`;
+
+    return {
+      name: name,
+      filePath: src.trim(),
+      fileType: getFileExtension(name)
+    };
+  });
+};
+export function useIndex() {
+  const route = useRoute();
+  const router = useRouter();
+  const stateHook = reactive({
+    pageGonggaoList: [],
+    shouyeZhongbiaoOrderList: [],
+    shouyeOrderList: [],
+    active: 0,
+    gonggaoDetail: {}
+  });
+  async function getPageGonggao() {
+    const res = await pageGonggao();
+    stateHook.pageGonggaoList = res.result;
+  }
+  async function getPageGengzgeng() {
+    const res = await pageGengzgeng();
+    stateHook.pageGonggaoList = res.result;
+  }
+  async function getShouyeZhongbiaoOrder() {
+    const res = await shouyeZhongbiaoOrder();
+    stateHook.shouyeZhongbiaoOrderList = res.result;
+  }
+  async function getNeirongfabuDetail(data) {
+    const res = await neirongfabuDetail(data);
+    stateHook.pageGonggaoList = res.result;
+  }
+  async function getFeizhengfuDetail(params) {
+    const res = await feizhengfuDetail(params);
+    stateHook.gonggaoDetail = res.result;
+    stateHook.gonggaoDetail.fujianList = convertFujianToObjects(
+      stateHook.gonggaoDetail.fujian,
+      stateHook.gonggaoDetail.fujianName
+    );
+  }
+  async function getShouyeOrder(active) {
+    let res;
+    stateHook.active = active;
+    switch (active) {
+      case 0:
+        res = await shouyeOrder();
+        stateHook.shouyeOrderList = res.result;
+        break;
+      case 1:
+        res = await getShouyeChangeOrder();
+        stateHook.shouyeOrderList = res.result;
+        break;
+      case 2:
+        res = await shouyeZhongbiaoOrder();
+        stateHook.shouyeOrderList = res.result;
+        break;
+    }
+  }
+  async function getShouyeChangeOrder() {
+    const res = await shouyeChangeOrder();
+    stateHook.shouyeOrderList = res.result;
+  }
+  function goDetail(id) {
+    router.push({ name: "gonggaoDetail", query: { id } });
+  }
+  onMounted(() => {
+    console.log("---");
+    // getNeirongfabuDetail();
+    // getPageGonggao();
+    // getPageGengzgeng();
+    // getShouyeZhongbiaoOrder();
+  });
+  return {
+    stateHook,
+    getPageGonggao,
+    getShouyeOrder,
+    getNeirongfabuDetail,
+    goDetail,
+    route,
+    router,
+    getFeizhengfuDetail
+  };
+}
diff --git a/src/views/mine/index.vue b/src/views/mine/index.vue
index 0bb79f7..f2fa258 100644
--- a/src/views/mine/index.vue
+++ b/src/views/mine/index.vue
@@ -180,13 +180,13 @@
         message: "璇疯緭鍏ユ纭殑鎵嬫満鍙风爜",
         trigger: "blur"
       }
-    ],
-    bankName: [
-      { required: true, message: "璇疯緭鍏ヤ紒涓氬紑鎴疯", trigger: "blur" }
-    ],
-    bankAccount: [
-      { required: true, message: "璇疯緭鍏ヤ紒涓氶摱琛岃处鍙�", trigger: "blur" }
     ]
+    // bankName: [
+    //   { required: true, message: "璇疯緭鍏ヤ紒涓氬紑鎴疯", trigger: "blur" }
+    // ],
+    // bankAccount: [
+    //   { required: true, message: "璇疯緭鍏ヤ紒涓氶摱琛岃处鍙�", trigger: "blur" }
+    // ]
   },
   loading: {
     signIn: false
diff --git a/src/views/newregister/index.vue b/src/views/newregister/index.vue
index 89ec5e5..8ef42b7 100644
--- a/src/views/newregister/index.vue
+++ b/src/views/newregister/index.vue
@@ -412,7 +412,9 @@
             </el-form-item>
             <el-form-item label=" ">
               <span>宸叉湁璐﹀彿锛�</span>
-              <el-link type="primary" :underline="false">绔嬪嵆鐧诲綍</el-link>
+              <el-link type="primary" :underline="false" @click="toLogin"
+                >绔嬪嵆鐧诲綍</el-link
+              >
             </el-form-item>
           </el-form>
         </div>
@@ -441,7 +443,8 @@
   handlebankAccountIMG,
   isLoading,
   uploadSFZ,
-  openAgreement
+  openAgreement,
+  toLogin
 } = useRegister();
 
 defineOptions({
diff --git a/src/views/newregister/utils/hook.tsx b/src/views/newregister/utils/hook.tsx
index ba79b67..2b1f74d 100644
--- a/src/views/newregister/utils/hook.tsx
+++ b/src/views/newregister/utils/hook.tsx
@@ -533,6 +533,10 @@
       }
     });
   }
+  // 鍘荤櫥褰�
+  function toLogin() {
+    router.push({ name: "Login" });
+  }
   return {
     state,
     resetForm,
@@ -549,6 +553,7 @@
     handleAvatarSuccess,
     loadNode,
     handlebankAccountIMG,
-    openAgreement
+    openAgreement,
+    toLogin
   };
 }
diff --git a/src/views/system/aboutItem/form.vue b/src/views/system/aboutItem/form.vue
index 2e6011c..7ae9e8b 100644
--- a/src/views/system/aboutItem/form.vue
+++ b/src/views/system/aboutItem/form.vue
@@ -9,6 +9,7 @@
 import { getCaigoufangshiList } from "@/api/item/index";
 
 const { state } = useDept();
+let cascaderRef = ref();
 const props = withDefaults(defineProps<FormProps>(), {
   formInline: () => ({
     id: "",
@@ -54,7 +55,11 @@
   return ruleFormRef.value;
 }
 const handleChange = value => {
-  console.log(value);
+  console.log(
+    value,
+    cascaderRef.value.getCheckedNodes()[0].pathLabels.join(" / "),
+    123
+  );
 };
 defineExpose({ getRef });
 onMounted(async () => {});
@@ -229,6 +234,7 @@
       <re-col :value="6" :xs="24" :sm="24">
         <el-form-item label="琛屾斂鍖哄煙" prop="xingzhengquyu">
           <el-cascader
+            :ref="cascaderRef"
             v-model="newFormInline.xingzhengquyu"
             class="w-full"
             :options="state.regionList"
diff --git a/src/views/system/aboutItem/utils/hook.tsx b/src/views/system/aboutItem/utils/hook.tsx
index d451e05..062ca14 100644
--- a/src/views/system/aboutItem/utils/hook.tsx
+++ b/src/views/system/aboutItem/utils/hook.tsx
@@ -11,7 +11,7 @@
 
 const selectedNum = ref(0);
 
-export function useDept(tableRef: Ref) {
+export function useDept(tableRef?: Ref) {
   const form = reactive({
     // 鏂板鏃ユ湡鑼冨洿锛屽彲涓� null锛岀被鍨嬩负鏁扮粍
     createDateRange: null,
diff --git a/src/views/system/component/pdfPreview2.vue b/src/views/system/component/pdfPreview2.vue
new file mode 100644
index 0000000..1cf44e0
--- /dev/null
+++ b/src/views/system/component/pdfPreview2.vue
@@ -0,0 +1,89 @@
+<template>
+  <div v-loading="loading" class="wrap">
+    <vue-office-docx
+      v-if="fileInfo.fileType === 'docx' || fileInfo.fileType === 'doc'"
+      :src="fileInfo.filePath"
+      style="height: 100%"
+      @rendered="rendered"
+      @error="HandlError"
+    />
+
+    <vue-office-pdf
+      v-if="fileInfo.fileType === 'pdf'"
+      :src="fileInfo.filePath"
+      style="height: 100%"
+      @rendered="rendered"
+      @error="HandlError"
+    />
+
+    <vue-office-excel
+      v-if="fileInfo.fileType === 'xlsx'"
+      :src="fileInfo.filePath"
+      style="height: 78vh"
+      @rendered="rendered"
+      @error="HandlError"
+    />
+
+    <el-image
+      v-if="fileInfo.fileType === 'image'"
+      :src="fileInfo.filePath"
+      alt="Preview"
+      @load="rendered"
+      @error="HandlError"
+    />
+
+    <video
+      v-if="fileInfo.fileType === 'video' && fileInfo.filePath"
+      width="100%"
+      controls
+      controlslist="nodownload"
+    >
+      <!-- /** controlslist="nodownload" 闅愯棌涓嬭浇鎸夐挳 */ -->
+      <source :src="fileInfo.filePath" />
+      Download the
+      <a :href="fileInfo.filePath">MP4</a>
+    </video>
+
+    <audio
+      v-if="fileInfo.fileType === 'audio' && fileInfo.filePath"
+      controls
+      controlsList="nodownload"
+      style="width: 100%"
+    >
+      <source :src="fileInfo.filePath" type="audio/mp3" />
+      鎮ㄧ殑娴忚鍣ㄤ笉鏀寔audio鏍囩銆�
+    </audio>
+  </div>
+</template>
+<script setup>
+import { onMounted, ref } from "vue";
+//寮曞叆VueOfficeDocx缁勪欢 鐩稿叧鏍峰紡
+// import VueOfficeDocx from "@vue-office/docx/lib/v3/vue-office-docx.mjs";
+// import VueOfficeExcel from "@vue-office/excel/lib/v3/vue-office-excel.mjs";
+// import VueOfficePdf from "@vue-office/pdf/lib/v3/vue-office-pdf.mjs";
+//寮曞叆鐩稿叧鏍峰紡
+// import "@vue-office/docx/lib/v3/index.css";
+// import "@vue-office/excel/lib/v3/index.css";
+
+const props = defineProps({
+  fileInfo: {
+    type: Object,
+    required: true
+  }
+});
+
+const loading = ref(true);
+/** rendered锛氭覆鏌撳畬鎴愬悗璋冪敤 */
+const rendered = () => {
+  loading.value = false;
+};
+/** HandlError 锛氭覆鏌撳け璐ュ悗璋冪敤 */
+const HandlError = errorInfo => {
+  // 鍋囪浣犲凡缁忛厤缃簡鍏ㄥ眬鐨� toast
+  alert("璇ユ枃浠舵殏涓嶆敮鎸佸湪绾块瑙�");
+  loading.value = false;
+};
+onMounted(() => {
+  console.log(props.fileInfo);
+});
+</script>
diff --git a/src/views/system/dept/form.vue b/src/views/system/dept/form.vue
index 86db301..aebf30d 100644
--- a/src/views/system/dept/form.vue
+++ b/src/views/system/dept/form.vue
@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { onMounted, ref, reactive } from "vue";
+import { onMounted, ref, reactive, computed } from "vue";
 import ReCol from "@/components/ReCol";
 import { formRules } from "./utils/rule";
 import { FormProps } from "./utils/types";
@@ -9,6 +9,27 @@
 import { getCaigoufangshiList } from "@/api/item/index";
 
 const { state, nowRole } = useDept(ref({}));
+// 閫掑綊鏌ユ壘label鐨勫嚱鏁�
+const findLabelsByValues = (values, options, currentLabels = []) => {
+  if (!values.length || !options) return currentLabels;
+
+  const [firstValue, ...restValues] = values;
+  const matched = options.find(item => item.code === firstValue);
+
+  if (matched) {
+    currentLabels.push(matched.name);
+    // 缁х画鏌ユ壘涓嬩竴绾�
+    return findLabelsByValues(restValues, matched.regions, currentLabels);
+  }
+  return currentLabels;
+};
+// 璁$畻灞炴�э細鏍规嵁selectedValue鍔ㄦ�佽幏鍙杔abel
+const selectedLabels = computed(() => {
+  return findLabelsByValues(
+    newFormInline.value.xingzhengquyu,
+    state.regionList
+  ).join("");
+});
 const props = withDefaults(defineProps<FormProps>(), {
   formInline: () => ({
     id: "",
@@ -55,7 +76,7 @@
   return ruleFormRef.value;
 }
 const handleChange = value => {
-  console.log(value);
+  newFormInline.value.xingzhengquyuName = selectedLabels.value;
 };
 const selectChange = value => {
   let obj = state.caigoufangshiList.find(item => {

--
Gitblit v1.9.1