Browse Source

功能优化

songxy 1 year ago
parent
commit
2dce074550

+ 1 - 6
client/src/views/OaSystem/home/components/CardItemSeven.vue

@@ -17,18 +17,13 @@
 <script setup lang="ts">
 import request from '@/config/axios'
 import { convertTimeToDate } from '@/utils/formatTime'
-import { useUserStore } from '@/store/modules/user'
 
 const loading = ref<boolean>(false)
 const listData = ref([])
-const userStore = useUserStore()
-const year = 2023
 const queryContractMessageByPage = async (): Promise<void> => {
   loading.value = true
-  const urlApi = `/contract-message/page`
+  const urlApi = `/contract-message/home/page`
   const sendData = {
-    deptId: userStore.getUser.deptId,
-    year: year,
     messageType: 2
     // managerId: userStore.getUser.id
   }

+ 1 - 3
client/src/views/OaSystem/home/components/PersonInfo.vue

@@ -1,11 +1,9 @@
 <script setup lang="ts">
 import request from '@/config/axios'
 import BarList from './BarList.vue'
-import { getUserInfo } from '@/utils/tool'
 /**
  * 板块领导-人员情况
  */
-const userInfo = getUserInfo()
 interface ChartValueType {
   name: string
   value: number
@@ -79,7 +77,7 @@ const staffStatistic = reactive<{
   ]
 })
 const queryStaffStatistic = async (): Promise<void> => {
-  const urlApi = `/adm/staff-records/statistic/get?deptId=${userInfo.deptId ?? ''}`
+  const urlApi = `/adm/staff-records/statistic/get`
   const result = await request.get({ url: urlApi })
   staffNum.value = result.staffNum ?? 0
   if (result.sexStatistic) {

+ 15 - 3
client/src/views/OaSystem/home/homeLeader.vue

@@ -167,9 +167,21 @@ const options = reactive<EChartsOption>({
   ]
 })
 const initData = (result) => {
-  chartData.value[0]['value'] = result.travelCost
-  chartData.value[1]['value'] = result.reimbursementCost
-  chartData.value[2]['value'] = result.paymentCost
+  let isBool = false
+  if (result.travelCost >= 10000) {
+    isBool = true
+  } else if (result.reimbursementCost >= 10000) {
+    isBool = true
+  } else if (result.paymentCost >= 10000) {
+    isBool = true
+  }
+  chartData.value[0]['value'] = isBool ? (result.travelCost / 10000).toFixed(2) : result.travelCost
+  chartData.value[1]['value'] = isBool
+    ? (result.reimbursementCost / 10000).toFixed(2)
+    : result.reimbursementCost
+  chartData.value[2]['value'] = isBool
+    ? (result.paymentCost / 10000).toFixed(2)
+    : result.paymentCost
   // options['series'][0]['data'] = chartData
 }
 </script>

+ 1 - 1
client/src/views/OaSystem/home/index.vue

@@ -39,7 +39,7 @@ const homeStaff = defineAsyncComponent({
 
 const roles = userStore.getRoles
 if (roles) {
-  if (roles.indexOf('test_leader') != -1 || roles.indexOf('test_dept_manager') != -1) {
+  if (roles.indexOf('home_company') != -1) {
     //板块领导||部门经理
     currentIndex.value = '1'
   } else {

+ 2 - 5
client/src/views/OaSystem/marketCenter/contractSubOut/applyIndex.vue

@@ -121,9 +121,7 @@
           </el-table-column>
           <el-table-column label="状态" width="120">
             <template #default="scope">{{
-              scope.row.contractSubFlowStatus === null
-                ? '未签'
-                : getDictLabel(DICT_TYPE.CONTRACT_SIGN_STATUS, scope.row.contractSubFlowStatus)
+              scope.row.contractSubFlowStatus === 90 ? '已签' : '未签'
             }}</template>
           </el-table-column>
           <el-table-column label="操作" fixed="right" align="center" width="200">
@@ -133,7 +131,7 @@
                 <span
                   @click="operateClick(scope.row)"
                   style="margin-left: 10px"
-                  v-if="scope.row.isSign == 1 && scope.row.contractSubFlowStatus == 1"
+                  v-if="scope.row.isSign == 1 && scope.row.contractSubFlowStatus == 90"
                 >
                   查看合同
                 </span>
@@ -162,7 +160,6 @@ import { PageParam } from '@/interface/common'
 import { getAssetURL } from '@/utils/auth'
 import { openFlow, openProcessFlow } from '@/utils/flow'
 import request from '@/config/axios'
-import { DICT_TYPE, getDictLabel } from '@/utils/dict'
 import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
 
 defineOptions({ name: 'ContractSubOut' })

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

@@ -216,7 +216,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()

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

@@ -221,7 +221,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()

+ 4 - 1
client_h5/.env.pro

@@ -1 +1,4 @@
-VITE_BASE_URL='http://oa.zjugis.com:28080/'
+VITE_BASE_URL='http://oa.zjugis.com:28080/'
+
+# File上传路径
+VITE_FILE_BASE_URI='/admin-api/infra/file'

+ 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()
       window.locationBaseUrl = "/html_h5"
     </script>
     <title></title>

+ 1 - 1
client_h5/package.json

@@ -11,7 +11,7 @@
     "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",
+    "build:prod": "vite build --mode pro",
     "preview": "vite preview"
   },
   "dependencies": {

+ 1 - 0
client_h5/src/pages/home/index.vue

@@ -80,6 +80,7 @@ const personMenus: MenuItem[] = [
     title: "通知公告",
     path: 'notice',
     icon: "../assets/images/tzgg_icon.png",
+    corner: 0
   },
 ];
 const router = useRouter();