|
@@ -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()
|