Răsfoiți Sursa

出差管理

duy 2 ani în urmă
părinte
comite
6d95afd18e
1 a modificat fișierele cu 20 adăugiri și 1 ștergeri
  1. 20 1
      src/views/attendance/business-trip/info.vue

+ 20 - 1
src/views/attendance/business-trip/info.vue

@@ -174,6 +174,7 @@ import { onActivated, ref, watch } from 'vue'
 import { useRoute, useRouter } from 'vue-router'
 import { getDictInfo, getProjectList, getuserList } from '~api/other'
 import { arrIndex, deepClone, formValidate, getArrValue } from 'js-fast-way'
+import { getApprovesList } from '~api/other'
 import businessApi from '~api/attendance/business-trip.js'
 import { getDiffDay } from '~uti/tools'
 import { useAppStore } from '~src/store'
@@ -194,6 +195,7 @@ onActivated(() => {
   getProjectData()
   getDetailsData()
   getUserDict()
+  getApprovesListData()
 })
 const getDetailsData = async () => {
     if (dataType.value === 'view') {
@@ -465,7 +467,24 @@ const timeLineData = ref([
     { title: '抄送人', section: '总经理' },
   
 ])
-
+const timeData = ref([])
+const getApprovesListData = async ()=>{
+    const { error, code, data } = await getApprovesList()
+    if (!error && code === 200) {
+     timeData.value = data['出差管理流程']
+     let approveArr = timeData.value['审批人']
+     let copyArr = timeData.value['抄送人']
+     timeLineData.value.forEach((ele, index)=>{
+        if (ele.title !== '抄送人') {
+            ele.section = approveArr[index]
+        } else {
+            ele.section = copyArr.join(',')
+        }
+     })
+    } else {
+        timeLineData.value = []
+    }
+}
 //返回
 const goBackClick = () => {
   router.back()