Bladeren bron

功能优化

songxy 1 jaar geleden
bovenliggende
commit
4b26f1d7e5

+ 8 - 2
client/src/views/OaSystem/home/components/BarList.vue

@@ -1,18 +1,24 @@
 <script setup lang="ts">
 import { toRefs } from 'vue'
 const props = defineProps<{
-  list: { name: string; value: string }[]
+  list: { name: string; value: number }[]
   unit: string
 }>()
 
 const { list, unit } = toRefs(props)
+
+const total = computed(() => {
+  return list.value.reduce((a, b) => {
+    return a + b['value']
+  }, 0)
+})
 </script>
 <template>
   <div class="unit-person">单位:{{ unit }}</div>
   <ul>
     <li v-for="(item, index) in list" :key="index">
       <span>{{ item.value }}</span>
-      <span><i style="height: 20%"></i></span>
+      <span><i :style="{ height: ((item['value'] / total) * 100).toFixed(2) + '%' }"></i></span>
       <span>{{ item.name }}</span>
     </li>
   </ul>

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

@@ -118,6 +118,7 @@ const clickHandle = (index: number): void => {
 }
 const switchListData = (): void => {
   barList.value = currentIndex.value === 0 ? degreeStatistic.list : staffStatistic.list
+  console.log(barList.value)
 }
 </script>
 <template>

+ 8 - 4
client/src/views/OaSystem/home/components/TimeChart.vue

@@ -115,14 +115,18 @@ const switchReportWorkloadStatistics = (index: number) => {
 <style lang="scss" scoped>
 .time-list {
   display: flex;
+  flex-direction: column;
   place-items: center center;
   flex-wrap: wrap;
   padding-right: 20px;
-
+  height: 100%;
+  flex-grow: 1;
+  overflow-y: auto;
+  margin-top: 30px;
   li {
     width: 100%;
-    line-height: 40px;
-
+    flex: 1;
+    display: flex;
     span {
       font-family: 'Microsoft YaHei';
       font-size: 14px;
@@ -130,11 +134,11 @@ const switchReportWorkloadStatistics = (index: number) => {
       color: #000000;
       &.title {
         display: inline-block;
-        width: 160px;
         overflow: hidden;
         text-overflow: ellipsis;
         white-space: nowrap;
         margin-right: 10px;
+        flex: 1;
       }
       i {
         display: inline-block;

+ 8 - 3
client/src/views/OaSystem/home/components/weekly/index.vue

@@ -159,6 +159,9 @@ const goToWeeklyPage = (item: any) => {
 <style scoped lang="scss">
 .log-list {
   padding: 10px 10px;
+  display: flex;
+  flex-direction: column;
+  height: 100%;
   .title {
     height: 48px;
     line-height: 48px;
@@ -182,10 +185,12 @@ const goToWeeklyPage = (item: any) => {
     }
   }
   .content {
+    display: flex;
+    flex-direction: column;
     margin-top: 20px;
-    height: 280px;
-    overflow-y: scroll;
-
+    overflow-y: auto;
+    height: 0px;
+    flex-grow: 1;
     .week-item {
       height: 50px;
       line-height: 50px;

+ 21 - 18
client/src/views/OaSystem/home/homeStaff.vue

@@ -12,11 +12,11 @@
     </div>
     <div class="bottomBox">
       <div class="card-item-common" style="display: flex; width: 100%">
-        <div style="width: 60%" class="panel-list-l">
+        <div style="width: 50%" class="panel-list-l">
           <dl v-for="(item, index) in panelList" :key="index">
             <dt>{{ item.shortLabel }}</dt>
             <dd>
-              <span>{{ item.label }}</span>
+              <span class="title">{{ item.label }}</span>
               <div
                 ><span v-for="(c, n) in item.children" :key="n"
                   >{{ c.label }}<b :style="`color:${c['color'] ?? '#121518'} ;`">{{ c.number }}</b
@@ -26,7 +26,7 @@
             </dd>
           </dl>
         </div>
-        <div style="width: 40%; height: 100%">
+        <div style="width: 50%; height: 100%">
           <ProjectTimeChart />
         </div>
       </div>
@@ -130,17 +130,17 @@ const panelList = reactive([
       }
     ]
   },
-  {
-    label: '我的年假',
-    shortLabel: '假',
-    unit: '天',
-    children: [
-      {
-        label: '剩余',
-        number: ''
-      }
-    ]
-  },
+  // {
+  //   label: '我的年假',
+  //   shortLabel: '假',
+  //   unit: '天',
+  //   children: [
+  //     {
+  //       label: '剩余',
+  //       number: ''
+  //     }
+  //   ]
+  // },
   {
     label: '我的档案',
     shortLabel: '勤',
@@ -249,13 +249,12 @@ queryAttendanceSheetListMine()
 <style lang="scss" scoped>
 .panel-list-l {
   display: flex;
-  flex-wrap: wrap;
-
+  flex-direction: column;
+  padding-left: 20px;
   dl {
     display: block;
     display: flex;
-    width: 50%;
-
+    flex: 1;
     &:nth-child(3),
     &:nth-child(4) {
       dt {
@@ -291,6 +290,10 @@ queryAttendanceSheetListMine()
 
       span {
         line-height: 1;
+        &.title {
+          font-weight: bold;
+          font-size: 17px;
+        }
       }
 
       > div {

+ 30 - 16
client/src/views/OaSystem/projectCenter/projectDetail/components/xmht/index.vue

@@ -151,6 +151,7 @@
                   v-model="mContractDetail.signTime"
                   type="date"
                   value-format="YYYY-MM-DD"
+                  :clearable="false"
                   placeholder="请选择签订时间"
                 />
               </td>
@@ -164,6 +165,7 @@
                   v-model="mContractDetail.dueTime"
                   type="date"
                   value-format="YYYY-MM-DD"
+                  :clearable="false"
                   placeholder="请选择履约到期时间"
                 />
               </td>
@@ -179,6 +181,7 @@
                   v-model="mContractDetail.contractOn"
                   type="date"
                   value-format="YYYY-MM-DD"
+                  :clearable="false"
                   placeholder="请选择合同拿出时间"
                 />
               </td>
@@ -192,6 +195,7 @@
                   v-model="mContractDetail.contractOff"
                   type="date"
                   value-format="YYYY-MM-DD"
+                  :clearable="false"
                   placeholder="请选择合同拿回时间"
                 />
               </td>
@@ -413,8 +417,6 @@
       <template v-else>
         <div class="titleBox">
           <h2>{{ cContractDetail?.name ?? '' }} </h2>
-          <span class="tag">已签</span>
-          <span class="tag">未付清</span>
         </div>
         <div class="tableBox tableBox—first">
           <h4 class="td_title"><i class="icon"></i>基本信息</h4>
@@ -438,12 +440,6 @@
             </li>
           </ul>
           <table v-if="cContractDetail?.contractType == 1">
-            <tr>
-              <td class="th">分包理由:</td>
-              <td colspan="3">
-                <el-input v-model="cContractDetail.reason" :disabled="!editor" />
-              </td>
-            </tr>
             <tr>
               <td class="th">分包金额(元):</td>
               <td>
@@ -473,7 +469,9 @@
                   :disabled="!editor"
                   v-model="cContractDetail.contractOn"
                   type="date"
+                  value-format="YYYY-MM-DD"
                   @change="($evt) => (cContractDetail.contractOn = $evt)"
+                  :clearable="false"
                   placeholder="请选择合同拿出时间"
                 />
               </td>
@@ -484,7 +482,9 @@
                   :disabled="!editor"
                   v-model="cContractDetail.contractOff"
                   type="date"
+                  value-format="YYYY-MM-DD"
                   @change="($evt) => (cContractDetail.contractOff = $evt)"
+                  :clearable="false"
                   placeholder="请选择合同拿回时间"
                 />
               </td>
@@ -497,7 +497,9 @@
                   :disabled="!editor"
                   v-model="cContractDetail.planSignDate"
                   type="date"
+                  value-format="YYYY-MM-DD"
                   @change="($evt) => (cContractDetail.planSignDate = $evt)"
+                  :clearable="false"
                   placeholder="请选择合签订时间"
                 />
               </td>
@@ -514,6 +516,12 @@
                 </el-select>
               </td>
             </tr>
+            <tr>
+              <td class="th">分包理由:</td>
+              <td colspan="3">
+                <el-input v-model="cContractDetail.reason" :disabled="!editor" />
+              </td>
+            </tr>
             <tr>
               <td class="th">付款条件:</td>
               <td colspan="3">
@@ -538,12 +546,6 @@
             </tr>
           </table>
           <table v-else>
-            <tr>
-              <td class="th">外包包理由:</td>
-              <td colspan="3">
-                <el-input v-model="cContractDetail.reason" :disabled="!editor" />
-              </td>
-            </tr>
             <tr>
               <td class="th">外包金额(元):</td>
               <td>
@@ -574,8 +576,10 @@
                   style="width: 100%"
                   :disabled="!editor"
                   v-model="cContractDetail.contractOn"
+                  @change="($evt) => (cContractDetail.contractOn = $evt)"
                   type="date"
                   value-format="YYYY-MM-DD"
+                  :clearable="false"
                   placeholder="请选择合同拿出时间"
                 />
               </td>
@@ -587,8 +591,10 @@
                   style="width: 100%"
                   :disabled="!editor"
                   v-model="cContractDetail.contractOff"
+                  @change="($evt) => (cContractDetail.contractOff = $evt)"
                   type="date"
                   value-format="YYYY-MM-DD"
+                  :clearable="false"
                   placeholder="请选择合同拿回时间"
                 />
               </td>
@@ -602,14 +608,22 @@
                   style="width: 100%"
                   :disabled="!editor"
                   v-model="cContractDetail.planSignDate"
+                  @change="($evt) => (cContractDetail.planSignDate = $evt)"
                   type="date"
                   value-format="YYYY-MM-DD"
+                  :clearable="false"
                   placeholder="请选择签订时间"
                 />
               </td>
               <td class="th"></td>
               <td> </td>
             </tr>
+            <tr>
+              <td class="th">外包理由:</td>
+              <td colspan="3">
+                <el-input v-model="cContractDetail.reason" :disabled="!editor" />
+              </td>
+            </tr>
             <tr>
               <td class="th">付款条件:</td>
               <td colspan="3">
@@ -799,7 +813,7 @@ const saveContractHandle = () => {
 /**
  * 编辑保存主合同信息
  * **/
-const { mutate: saveContractSub } = useMutation(putContract, {
+const { mutate: saveContract } = useMutation(putContract, {
   onMutate: () => {
     editor.value = false
   },
@@ -814,7 +828,7 @@ const { mutate: saveContractSub } = useMutation(putContract, {
 /**
  * 编辑保存分包/外包合同信息
  * **/
-const { mutate: saveContract } = useMutation(putContractSub, {
+const { mutate: saveContractSub } = useMutation(putContractSub, {
   onMutate: () => {
     editor.value = false
   },

+ 1 - 1
client/src/views/OaSystem/projectCenter/projectDetail/components/xmxx/ProjectMileStone.vue

@@ -145,7 +145,7 @@ const confirmHandle = (id: string, index: number) => {
 
         <el-table-column label="项目进度" width="200">
           <template #default="scope">
-            <span v-if="!scope.row.is_edit">{{ scope.row.process }}%</span>
+            <span v-if="!scope.row.is_edit">{{ scope.row.process }}</span>
             <el-input v-else v-model="scope.row.process" />
           </template>
         </el-table-column>

+ 1 - 1
client_h5/.env.dev

@@ -1,4 +1,4 @@
-VITE_BASE_URL='http://10.10.10.7:18080/'
+VITE_BASE_URL='http://oa.zjugis.com:28080/'
 # VITE_BASE_URL='http://localhost:6090/'
 
 

+ 2 - 1
client_h5/src/App.vue

@@ -16,7 +16,8 @@ const initUserInfoHandler = async () => {
         if (userResult && userResult?.data) { 
             const userInfo: UserInterface = {
                 id: userResult?.data.user.id,
-                nickname: userResult?.data.user.nickname
+                nickname: userResult?.data.user.nickname,
+                signatureUrl: userResult?.data.user.signatureUrl
             }
             userStore.setUser(userInfo)
             localStorage.setItem("_userInfo", JSON.stringify(userInfo))

+ 25 - 25
client_h5/src/components/flowForm.vue

@@ -20,7 +20,6 @@
                         autosize
                         label=""
                         type="textarea"
-                        :disabled="!item['isEditor']"
                         maxlength="50"
                         placeholder="请输入留言"
                       />
@@ -32,7 +31,7 @@
                         autosize
                         label=""
                         type="textarea"
-                        :disabled="!item['isEditor']"
+                        :disabled="true"
                         maxlength="50"
                         placeholder="请输入留言"
                       />
@@ -41,19 +40,26 @@
                     <div class="footer">
                       <p>
                         <span>办理人:</span>
-                        <span v-if="!item['sign']">
-                          {{ currentUserName }}
-                        </span>
-                        <span v-else-if="item['sign'].indexOf('http') !== -1">
-                          <img class="signImg" :src="item['sign']" />
+                        <span v-if="item['isEditor']">
+                          <template v-if="currentOpinion['sign'] && currentOpinion['sign'].indexOf('http') !== -1">
+                            <img class="signImg" :src="currentOpinion['sign']" />
+                          </template>
+                          <template v-else>
+                            {{ currentOpinion['sign'] }}
+                          </template>
                         </span>
                         <span v-else>
-                          {{item['sign']}}
+                          <template v-if="item['sign'] && item['sign'].indexOf('http') !== -1">
+                            <img class="signImg" :src="item['sign']" />
+                          </template>
+                          <template v-else>
+                            {{ item['sign'] }}
+                          </template>
                         </span>
                       </p>
                       <p>
                         <span>办理时间:</span>
-                        <span>{{currentOpinion['opinionTime']}}</span>
+                        <span>{{ item['isEditor'] ? currentOpinion['opinionTime'] : item['opinionTime']}}</span>
                       </p>
                     </div>
                   </div>
@@ -114,7 +120,8 @@ defineOptions({
 const isSubmitVisabled = ref<boolean>(true)
 const isSubmitDisabled = ref<boolean>(false)
 const userInfo = JSON.parse(localStorage.getItem('_userInfo') as string);
-const currentUserName = userInfo ? userInfo['nickname'] ?? '' : ''
+const signatureUrl: string = userInfo ? userInfo['signatureUrl'] ?? '' : ''
+const currentUserName: string = userInfo ? userInfo['nickname'] ?? '' : ''
 defineProps<{
   data: any
 }>();
@@ -139,7 +146,8 @@ if (_o && _o == 'v') {
 const currentOpinion = ref({
   id: '',
   opinionContent: '',
-  opinionTime: ''
+  opinionTime: '',
+  sign: ''
 })
 const templateOpinions = ref<any[]>([]);
 getTemplateOpinionListByFlowInstanceId(flowInstanceId).then((tResult) => {
@@ -155,29 +163,20 @@ getTemplateOpinionListByFlowInstanceId(flowInstanceId).then((tResult) => {
           continue;
         }
         tItem['opinions'] = []
+
         for (let j = 0; j < oList.length; j++) { 
           const oItem = oList[j]
           if (tItem['id'] === oItem['flowOpinionId']) {
-            if (oItem['activityInstanceId'] === activityInstanceId) {
+            if (_o !== 'v' && oItem['activityInstanceId'] === activityInstanceId) {
               oItem['isEditor'] = true;
               currentOpinion.value.id = oItem['id']
               currentOpinion.value.opinionContent = oItem['opinionContent'] ?? '同意'
               currentOpinion.value.opinionTime = formatDate(new Date())
-              if (oItem['sign']) {
-                currentOpinion.value.sign = oItem['sign']
-              }
-            } else {
-              if (!oItem['opinionContent'] && tItem['iHideNonFilledComment'] === 1) {
-                tList.splice(i, 1)
-                i--;
-                continue;
-              }
+              currentOpinion.value.sign = signatureUrl ? signatureUrl : currentUserName;
             }
             tItem['opinions'].push(oItem);
-            oList.splice(j, 1)
-            j--;
           } else {
-            if (j === oList.length - 1) {
+            if (_o !== 'v' && j === (oList.length - 1) && tItem['iHideNonFilledComment'] == 1) {
               tList.splice(i, 1)
               i--;
               continue;
@@ -186,6 +185,7 @@ getTemplateOpinionListByFlowInstanceId(flowInstanceId).then((tResult) => {
         }
       }
     }
+    console.log(tList)
     templateOpinions.value = tList
   })
 })
@@ -296,7 +296,7 @@ const submitHandle = async (): Promise<any> => {
             }
           }
           .signImg {
-            height: 40px;
+            height: 30px;
             vertical-align: middle;
           }
         }

+ 3 - 1
client_h5/src/stores/modules/user.ts

@@ -3,12 +3,14 @@ import { defineStore } from "pinia";
 export interface UserInterface {
     id: string  //用户ID
     nickname: string    //用户昵称
+    signatureUrl: string  //用户前面
 }
 const UserStore = defineStore("UserStore", {
     state: () => ({
         userInfo: {
             id: "",
-            nickname: ""
+            nickname: "",
+            signatureUrl: ""
         } as UserInterface
     }),
     actions: {