From 2293a1b58a3227a4870466e3699b6baf0af29303 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期一, 11 八月 2025 17:19:53 +0800
Subject: [PATCH] -

---
 src/views/system/aboutItem/utils/hook.tsx |  192 +++++++++--------------------------------------
 1 files changed, 38 insertions(+), 154 deletions(-)

diff --git a/src/views/system/aboutItem/utils/hook.tsx b/src/views/system/aboutItem/utils/hook.tsx
index 0608031..d451e05 100644
--- a/src/views/system/aboutItem/utils/hook.tsx
+++ b/src/views/system/aboutItem/utils/hook.tsx
@@ -1,36 +1,14 @@
-import dayjs from "dayjs";
+// import dayjs from "dayjs";
 import editForm from "../form.vue";
 import { handleTree } from "@/utils/tree";
 import { message } from "@/utils/message";
-import { zhaobiaoPageOrder } from "@/api/item/index";
-
-import {
-  getCaigoufangshiList,
-  getHangyepingmuList,
-  getOrderStatusList,
-  getRegionList,
-  getDaimaleixingList,
-  caigourenAdd,
-  caigourenUpdate,
-  caigourenDelete,
-  caigourenBatchDelete
-} from "@/api/item/index";
-import { usePublicHooks } from "../../hooks";
+import { pageCollection } from "@/api/item/aboutitem";
 import { addDialog } from "@/components/ReDialog";
 import { type Ref, reactive, ref, onMounted, h, computed } from "vue";
 import type { FormItemProps } from "./types";
-import {
-  cloneDeep,
-  isAllEmpty,
-  deviceDetection,
-  getKeyList
-} from "@pureadmin/utils";
-import { useUserStoreHook } from "@/store/modules/user";
+import { cloneDeep, deviceDetection, getKeyList } from "@pureadmin/utils";
 import type { PaginationProps } from "@pureadmin/table";
 
-const nowRole = computed(() => {
-  return useUserStoreHook().nowRole;
-});
 const selectedNum = ref(0);
 
 export function useDept(tableRef: Ref) {
@@ -70,39 +48,38 @@
     currentPage: 1,
     background: true
   });
-  //鑾峰彇閲囪喘鏂瑰紡
-  const getCaigoufangshiListFun = async () => {
-    const res = await getCaigoufangshiList();
-    state.caigoufangshiList = res.result;
-  };
+  // //鑾峰彇閲囪喘鏂瑰紡
+  // const getCaigoufangshiListFun = async () => {
+  //   const res = await getCaigoufangshiList();
+  //   state.caigoufangshiList = res.result;
+  // };
 
-  //鑾峰彇琛屼笟鍝佺洰
-  const getHangyepingmuListFun = async () => {
-    const res = await getHangyepingmuList();
-    state.hangyepingmuList = res.result;
-  };
+  // //鑾峰彇琛屼笟鍝佺洰
+  // const getHangyepingmuListFun = async () => {
+  //   const res = await getHangyepingmuList();
+  //   state.hangyepingmuList = res.result;
+  // };
 
-  //鑾峰彇椤圭洰杩涘害
-  const getOrderStatusListFun = async () => {
-    const res = await getOrderStatusList();
-    state.orderStatusList = res.result;
-  };
+  // //鑾峰彇椤圭洰杩涘害
+  // const getOrderStatusListFun = async () => {
+  //   const res = await getOrderStatusList();
+  //   state.orderStatusList = res.result;
+  // };
 
-  // 鑾峰彇鍖哄煙
-  const getRegionListFun = async () => {
-    const res = await getRegionList();
-    state.regionList = res.result;
-  };
+  // // 鑾峰彇鍖哄煙
+  // const getRegionListFun = async () => {
+  //   const res = await getRegionList();
+  //   state.regionList = res.result;
+  // };
 
-  // 鑾峰彇浠g爜绫诲瀷
-  const getDaimaleixingListFun = async () => {
-    const res = await getDaimaleixingList();
-    state.daimaleixingList = res.result;
-  };
+  // // 鑾峰彇浠g爜绫诲瀷
+  // const getDaimaleixingListFun = async () => {
+  //   const res = await getDaimaleixingList();
+  //   state.daimaleixingList = res.result;
+  // };
   const formRef = ref();
   const dataList = ref([]);
   const loading = ref(true);
-  const { tagStyle } = usePublicHooks();
   const getOrderStatus = row => {
     const res = state.orderStatusList.find(item => {
       return row.orderStatus == item.status;
@@ -117,128 +94,36 @@
       reserveSelection: true // 鏁版嵁鍒锋柊鍚庝繚鐣欓�夐」
     },
     {
-      label: "閲囪喘浜�",
+      label: "鎶ュ悕鎴鏃堕棿",
       prop: "caigourenmingcheng",
       minWidth: 70
     },
     {
-      label: "椤圭洰鍚嶇О",
+      label: "鍖哄煙",
       prop: "projectName",
       width: 180,
       align: "left"
     },
     {
-      label: "椤圭洰杩涘害",
-      prop: "orderStatus",
+      label: "椤圭洰鍚嶇О",
+      prop: "projectName",
       minWidth: 70,
       cellRenderer: ({ row, props }) => getOrderStatus(row)
     },
     {
-      label: "鎶ュ悕璐�",
+      label: "椤圭洰缂栧彿",
       prop: "baomingfei",
       minWidth: 70
-    },
-    {
-      label: "鎶曟爣淇濊瘉閲�",
-      prop: "toubiaobaozhengjin",
-      minWidth: 70
-    },
-    {
-      label: "涓爣渚涘簲鍟�",
-      prop: "zhongbiaoName",
-      minWidth: 180
-    },
-    {
-      label: "璇勫涓撳",
-      prop: "zhuanjiaName",
-      minWidth: 70
-    },
-    {
-      label: "璐ㄧ枒",
-      prop: "zhiyi",
-      minWidth: 100,
-      cellRenderer: ({ row, props }) => (
-        <span>{row.status === 1 ? "鏈�" : "鏃�"}</span>
-      )
-    },
-    {
-      label: "鎶曡瘔",
-      prop: "tousu",
-      minWidth: 100,
-      cellRenderer: ({ row, props }) => (
-        // <el-tag size={props.size} style={tagStyle.value(row.status)}>
-        <span>{row.status === 1 ? "鏈�" : "鏃�"}</span>
-        // </el-tag>
-      )
-    },
-    {
-      label: "鎿嶄綔",
-      fixed: "right",
-      width: 80,
-      slot: "operation"
-    }
-  ];
-  const CGRcolumns: TableColumnList = [
-    {
-      label: "鍕鹃�夊垪", // 濡傛灉闇�瑕佽〃鏍煎閫夛紝姝ゅlabel蹇呴』璁剧疆
-      type: "selection",
-      fixed: "left",
-      reserveSelection: true // 鏁版嵁鍒锋柊鍚庝繚鐣欓�夐」
     },
     {
       label: "浠g悊鏈烘瀯",
-      prop: "dailijigoumingcheng",
-      minWidth: 70
-    },
-    {
-      label: "椤圭洰鍚嶇О",
-      prop: "projectName",
-      width: 180,
-      align: "left"
-    },
-    {
-      label: "椤圭洰杩涘害",
-      prop: "orderStatus",
-      minWidth: 70,
-      cellRenderer: ({ row, props }) => getOrderStatus(row)
-    },
-    {
-      label: "鎶ュ悕璐�",
-      prop: "baomingfei",
-      minWidth: 70
-    },
-    {
-      label: "鎶曟爣淇濊瘉閲�",
       prop: "toubiaobaozhengjin",
       minWidth: 70
     },
     {
-      label: "涓爣渚涘簲鍟�",
+      label: "寮�鏍囨椂闂�",
       prop: "zhongbiaoName",
       minWidth: 180
-    },
-    {
-      label: "璇勫涓撳",
-      prop: "zhuanjiaName",
-      minWidth: 70
-    },
-    {
-      label: "璐ㄧ枒",
-      prop: "zhiyi",
-      minWidth: 100,
-      cellRenderer: ({ row, props }) => (
-        <span>{row.status === 1 ? "鏈�" : "鏃�"}</span>
-      )
-    },
-    {
-      label: "鎶曡瘔",
-      prop: "tousu",
-      minWidth: 100,
-      cellRenderer: ({ row, props }) => (
-        // <el-tag size={props.size} style={tagStyle.value(row.status)}>
-        <span>{row.status === 1 ? "鏈�" : "鏃�"}</span>
-        // </el-tag>
-      )
     },
     {
       label: "鎿嶄綔",
@@ -306,11 +191,11 @@
   };
   async function onSearch() {
     const obj = cloneDeep(form);
-    obj.tousu = obj.tousu.join("");
-    obj.zhiyi = obj.zhiyi.join("");
-    obj.xingzhengquyu = obj.xingzhengquyu ? obj.xingzhengquyu.join("") : "";
+    // obj.tousu = obj.tousu.join("");
+    // obj.zhiyi = obj.zhiyi.join("");
+    // obj.xingzhengquyu = obj.xingzhengquyu ? obj.xingzhengquyu.join("") : "";
     loading.value = true;
-    const { result } = await zhaobiaoPageOrder(obj); // 杩欓噷鏄繑鍥炰竴缁存暟缁勭粨鏋勶紝鍓嶇鑷澶勭悊鎴愭爲缁撴瀯锛岃繑鍥炴牸寮忚姹傦細鍞竴id鍔犵埗鑺傜偣parentId锛宲arentId鍙栫埗鑺傜偣id
+    const { result } = await pageCollection(obj); // 杩欓噷鏄繑鍥炰竴缁存暟缁勭粨鏋勶紝鍓嶇鑷澶勭悊鎴愭爲缁撴瀯锛岃繑鍥炴牸寮忚姹傦細鍞竴id鍔犵埗鑺傜偣parentId锛宲arentId鍙栫埗鑺傜偣id
     const newData = result.items;
     loading.value = false;
     pagination.total = result.total;
@@ -467,7 +352,6 @@
     state,
     loading,
     columns,
-    CGRcolumns,
     dataList,
     selectedNum,
     /** 鎼滅储 */

--
Gitblit v1.9.1