|
@@ -58,6 +58,8 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { ref, watch } from 'vue'
|
|
|
+import { getArrValue, getObjValue } from 'js-fast-way'
|
|
|
+import mainApi from '~api/tasks/hc-data'
|
|
|
|
|
|
const props = defineProps({
|
|
|
data: {
|
|
@@ -78,7 +80,7 @@ const isShow = defineModel('modelValue', {
|
|
|
//监听
|
|
|
const dataInfo = ref(props.data)
|
|
|
watch(() => props.data, (data) => {
|
|
|
- dataInfo.value = data
|
|
|
+ dataInfo.value = getObjValue(data)
|
|
|
}, { immediate: true, deep:true })
|
|
|
|
|
|
//监听
|
|
@@ -90,7 +92,21 @@ const rowInfo = ref({})
|
|
|
const flowList = ref([])
|
|
|
const flowListTask = ref([])
|
|
|
const getDataApi = async () => {
|
|
|
-
|
|
|
+ const { taskId } = getObjValue(dataInfo.value)
|
|
|
+ const { data } = await mainApi.getDetail(taskId)
|
|
|
+ const tasks = getArrValue(data.taskProcessInfo)
|
|
|
+ console.log(tasks)
|
|
|
+ flowList.value = tasks
|
|
|
+ /*const list = [...arr]
|
|
|
+ let firstarr = list.slice(0, 1)
|
|
|
+ let taskList = list.slice(1, list.length)
|
|
|
+ taskList.forEach((ele)=>{
|
|
|
+ ele.name = ele.taskBranchName
|
|
|
+ ele.status = ele.taskBranchStatus
|
|
|
+ ele.type = ele.taskBranchType
|
|
|
+ ele.isTask = true
|
|
|
+ })
|
|
|
+ flowListTask.value = arrUnion(firstarr, taskList)*/
|
|
|
}
|
|
|
|
|
|
//查看详情
|