Bladeren bron

功能优化

songxy 1 jaar geleden
bovenliggende
commit
37077edf83

+ 1 - 0
client/src/App.vue

@@ -25,6 +25,7 @@ eKeys.forEach((eKey) => {
     })
   })
 })
+alert(import.meta.env.VITE_API_URL)
 </script>
 <template>
   <ConfigGlobal :size="currentSize">

+ 2 - 2
client/src/api/oa/kpgl/index.ts

@@ -6,8 +6,8 @@ export const queryContractInvoicePage = (data) => {
 }
 
 // 获得开票统计
-export const getStatics = (params) => {
-  return request.get({ url: '/contractInvoice/getStatics', params }, '/business')
+export const getStatics = (data) => {
+  return request.post({ url: '/contractInvoice/getStatics', data }, '/business')
 }
 // 发起开票流程
 export const processContractInvoice = (params) => {

+ 19 - 4
client/src/views/OaSystem/marketCenter/contractSubOut/signIndex.vue

@@ -166,9 +166,9 @@ const infoList: any = ref([
 const tableData = ref<Array<any>>([])
 const total = ref<number>()
 const searchHandle: () => void = () => {
-  queryProjectListAjax()
+  queryContractSubPage()
 }
-const queryProjectListAjax = async (): Promise<void> => {
+const queryContractSubPage = async (): Promise<void> => {
   const urlApi = `/contractSub/page`
   const sendData: {
     applyType: number | null
@@ -182,11 +182,26 @@ const queryProjectListAjax = async (): Promise<void> => {
   tableData.value = result['records']
   total.value = result['total']
 }
-queryProjectListAjax()
+queryContractSubPage()
 
+const queryContractSubStatistic = async (): Promise<void> => {
+  const urlApi = `/contractSub/list/statistic`
+  const sendData: {
+    applyType: number | null
+  } = {
+    ...queryParams
+  }
+  if (queryParams.applyType === -1) {
+    sendData['applyType'] = null
+  }
+  const result = await request.post({ url: urlApi, data: sendData }, '/business')
+  console.log('result------------')
+  console.log(result)
+}
+queryContractSubStatistic()
 const handleCurrentChange = (pageNo: number) => {
   queryParams.pageNo = pageNo
-  queryProjectListAjax()
+  queryContractSubPage()
 }
 /**
  * 发起签订流程

+ 3 - 1
client/src/views/OaSystem/projectCenter/projectBook/deptProject.vue

@@ -120,7 +120,9 @@
           <el-table-column prop="lxsj" label="立项时间" width="120" />
           <el-table-column prop="yssj" label="验收时间" width="120" />
           <el-table-column prop="contractAmount" align="center" label="合同额" width="120">
-            <template #default="scope">{{ scope.row.contractAmount ?? 0 }}</template>
+            <template #default="scope">{{
+              scope.row.virtualAmount ?? scope.row.contractAmount ?? 0
+            }}</template>
           </el-table-column>
           <el-table-column prop="xmzt" label="项目状态" width="120">
             <template #default="scope">

+ 3 - 1
client/src/views/OaSystem/projectCenter/projectBook/myProject.vue

@@ -120,7 +120,9 @@
           <el-table-column prop="lxsj" label="立项时间" width="120" />
           <el-table-column prop="yssj" label="验收时间" width="120" />
           <el-table-column prop="contractAmount" align="center" label="合同额" width="120">
-            <template #default="scope">{{ scope.row.contractAmount ?? 0 }}</template>
+            <template #default="scope">{{
+              scope.row.virtualAmount ?? scope.row.contractAmount ?? 0
+            }}</template>
           </el-table-column>
           <el-table-column prop="xmzt" label="项目状态" width="120">
             <template #default="scope">

+ 4 - 2
client/src/views/OaSystem/projectCenter/projectBook/projectBook.vue

@@ -78,7 +78,9 @@
           <el-table-column prop="zrbm" label="责任部门" width="200" />
           <el-table-column prop="xmjl" label="项目经理" width="120" />
           <el-table-column prop="contractAmount" align="center" label="合同额" width="120">
-            <template #default="scope">{{ scope.row.contractAmount ?? 0 }}</template>
+            <template #default="scope">{{
+              scope.row.virtualAmount ?? scope.row.contractAmount ?? 0
+            }}</template>
           </el-table-column>
           <el-table-column prop="receivableAmount" align="center" label="应收款" width="120">
             <template #default="scope">{{ scope.row.receivableAmount ?? 0 }}</template>
@@ -176,7 +178,7 @@ const queryProjectCalculate = async (): Promise<void> => {
   if (result) {
     infoList[0]['num'] = result.output ?? 0
     infoList[1]['num'] = result.cost ?? 0
-    infoList[2]['num'] = infoList[1]['num'] - infoList[0]['num']
+    infoList[2]['num'] = infoList[0]['num'] - infoList[1]['num']
   }
 }
 queryProjectCalculate()

+ 6 - 0
client_h5/.env.base

@@ -0,0 +1,6 @@
+VITE_BASE_URL='http://localhost:6090/'
+
+# File上传路径
+VITE_FILE_BASE_URI='/infra/file'
+
+VITE_AUTHORIZATION='test83e06d0d-af60-4419-9437-c9a68bf1b669'

+ 1 - 1
client_h5/.env.dev

@@ -5,4 +5,4 @@ VITE_BASE_URL='http://10.10.10.7:18080/'
 # File上传路径
 VITE_FILE_BASE_URI='/admin-api/infra/file'
 
-VITE_AUTHORIZATION='test83e06d0d-af60-4419-9437-c9a68bf1b669'
+# VITE_AUTHORIZATION='test83e06d0d-af60-4419-9437-c9a68bf1b669'

+ 1 - 1
client_h5/index.html

@@ -6,7 +6,7 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1">
     <script src='https://cdn.bootcss.com/vConsole/3.3.2/vconsole.min.js'></script>
     <script type="text/javascript">
-      // window.vConsole = new window.VConsole()
+      window.vConsole = new window.VConsole()
     </script>
     <title></title>
   </head>

+ 3 - 3
client_h5/package.json

@@ -5,11 +5,11 @@
   "type": "module",
   "scripts": {
     "start": "npm run dev",
-    "local": "vite --mode local",
+    "local": "vite --mode base",
     "dev": "vite --mode dev",
     "pro": "vite --mode pro",
-    "build": "npm run build:dev",
-    "build:local": "vue-tsc && vite build --mode local",
+    "build": "vite build --mode dev",
+    "build:local": "vue-tsc && vite build --mode base",
     "build:dev": "vue-tsc && vite build --mode dev",
     "build:prod": "vue-tsc && vite build --mode pro",
     "preview": "vite preview"

+ 3 - 3
client_h5/src/App.vue

@@ -5,13 +5,13 @@ import reqest from "@/utils/request";
 import { useDictStoreWithOut } from '@/utils/dict';
 
 const userStore = useUserStoreWithOut();
-const dictStore = useDictStoreWithOut()
+
 const initUserInfoHandler = async () => {
     const code: string = await getDDAuthCode() as string
     const userIdResult = await getUserIdByDD({code})
-    if (userIdResult && userIdResult?.data) {
+  if (userIdResult && userIdResult?.data) {
+        useDictStoreWithOut()
         localStorage.setItem("ACCESS_TOKEN", userIdResult?.data.accessToken)
-        console.log(localStorage.getItem("ACCESS_TOKEN"))
         const userResult = await getUserInfoById()
         if (userResult && userResult?.data) { 
             const userInfo: UserInterface = {

+ 1 - 1
client_h5/src/components/UserSelect/index.vue

@@ -67,7 +67,7 @@
   </van-popup>
 </template>
 
-<script setup>
+<script setup lang="ts">
 /**
  * @description 用户选择组件
  * @author chinyan

+ 1 - 1
client_h5/src/components/UserSelect/tree.vue

@@ -56,7 +56,7 @@
     </div>
   </div>
 </template>
-<script setup>
+<script setup lang="ts">
 import { reactive, watch } from "vue";
 import tree from "./tree.vue";
 const emits = defineEmits(["change", "confirm"]);

+ 6 - 4
client_h5/src/pages/home/index.vue

@@ -16,7 +16,7 @@ const navMenus: MenuItem[] = [
   {
     title: "办件中心",
     corner: 1,
-    path: "http://10.10.10.7:18080/workflow/HandlerCaseCenter/mobileIndex",
+    path: "/handleCenter",
     icon: "../assets/images/bjzx_icon.png",
   },
   {
@@ -84,16 +84,18 @@ const personMenus: MenuItem[] = [
     icon: "../assets/images/tzgg_icon.png",
   },
 ];
+const router = useRouter();
 const toPageHandle = (path: string) => {
-  window.location.href = path;
+  router.push({
+    path
+  })
 };
 const toProcessHandle = (item: ProcessMenuItem): void => {
   createProcessByModalId({
     templateId: item.instanceId,
   }).then((result: any) => {
-    debugger;
     if (typeof result === "string") {
-      toPageHandle(result);
+      location.href=result
     }
   });
 };

+ 4 - 4
client_h5/src/service/flow.ts

@@ -10,7 +10,7 @@ export interface FlowCreateDTO {
 }
 /** 获取办件中心列表 */
 export const getHandlerCaseCenterList = async (data: any) => {
-  return await request.post(`/HandlerCaseCenter/list`, data, {
+  return await request.post(`/workflow/HandlerCaseCenter/list`, data, {
     headers: {
       'Content-Type': 'application/x-www-form-urlencoded'
     }
@@ -18,7 +18,7 @@ export const getHandlerCaseCenterList = async (data: any) => {
 }
 /** 获取办件中心汇总 */
  export const getHandlerCaseCenterCount = async (data: any) => {
-  return await request.post(`/HandlerCaseCenter/count`, data, {
+  return await request.post(`/workflow/HandlerCaseCenter/count`, data, {
     headers: {
       'Content-Type': 'application/x-www-form-urlencoded'
     }
@@ -26,7 +26,7 @@ export const getHandlerCaseCenterList = async (data: any) => {
 }
 /** 办件中心流程跳转或办理 */
 export const saveAndGetMobileUrl = async (data: any) => {
-  return await request.post(`/HandlerCaseCenter/saveAndGetMobileUrl`, data, {
+  return await request.post(`/workflow/HandlerCaseCenter/saveAndGetMobileUrl`, data, {
     headers: {
       'Content-Type': 'application/x-www-form-urlencoded'
     }
@@ -34,7 +34,7 @@ export const saveAndGetMobileUrl = async (data: any) => {
 }
 /** 获取流程目录 */
 export const getFlowTemplateTreeDataByUser = async (data: any) => {
-  return await request.post(`/TFlowTemplate/GetFlowTemplateTreeDataByUser`, data, {
+  return await request.post(`/workflow/TFlowTemplate/GetFlowTemplateTreeDataByUser`, data, {
     headers: {
       'Content-Type': 'application/x-www-form-urlencoded'
     }

+ 2 - 2
client_h5/src/utils/dict.ts

@@ -11,13 +11,13 @@ export const useDictStoreWithOut = () => {
     return result.data;
   }
   const dictObj = getStoreObject(DICT_NAME);
-  // if (!dictObj) {
+  if (!dictObj) {
     listSimpleDictData().then((resultData) => { 
       if (resultData && resultData?.length > 0) {
         setStoreObject(DICT_NAME, resultData);
       }
     });
-  // }
+  }
 }
 
 /**

+ 3 - 3
client_h5/src/utils/request.ts

@@ -9,10 +9,10 @@ const instance = axios.create(Object.assign({}, defaultConfig));
  
 instance.interceptors.request.use(
   (config) => {
-      ('isAuth' in config.headers) ? null : config.headers.isAuth = true
+    ('isAuth' in config.headers) ? null : config.headers.isAuth = true;
         if (config.headers.isAuth) {
-            config.headers.Authorization = `Bearer ${import.meta.env.VITE_AUTHORIZATION}`;
-      }
+            config.headers.Authorization = `Bearer ${import.meta.env.VITE_AUTHORIZATION ?? localStorage.getItem('ACCESS_TOKEN')}`;
+        }
         const data = config.data || false
         if (
           config.method?.toUpperCase() === 'POST' &&