|
@@ -65,7 +65,7 @@
|
|
|
<script setup>
|
|
|
import { onMounted, ref, watch } from 'vue'
|
|
|
import tasksFlowApi from '~api/tasks/flow'
|
|
|
-import { ApprovalApi, queryFixedFlow } from '~api/other'
|
|
|
+import { ApprovalApi, queryFixedFlow, queryFixedFlow1 } from '~api/other'
|
|
|
import { arrIndex, formValidate, getArrValue } from 'js-fast-way'
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -217,20 +217,29 @@ const getProcessDatasApi = () => {
|
|
|
const type = isTypes.value
|
|
|
if (type === 'first' || type === 'log' || type === 'wbs') {
|
|
|
queryFixedFlowApi(type, typeDatas.value)
|
|
|
- } else {
|
|
|
- getProcessData()
|
|
|
+ } else if (type === 'query') {
|
|
|
+ getProcessData(type, typeDatas.value)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//获取流程数据
|
|
|
const linkUserJoinString = ref('')
|
|
|
-const getProcessData = async () => {
|
|
|
+const getProcessData = async (type, datas) => {
|
|
|
linkUserJoinString.value = ''
|
|
|
- const { error, code, data } = await tasksFlowApi.getPageData({
|
|
|
+ let flowJson = {}
|
|
|
+ if (type === 'first') {
|
|
|
+ flowJson['firstId'] = datas
|
|
|
+ } else if (type === 'log') {
|
|
|
+ flowJson['theLogPrimaryKeyId'] = datas
|
|
|
+ } else if (type === 'wbs' || type === 'query') {
|
|
|
+ flowJson['privatePKeyId'] = datas
|
|
|
+ }
|
|
|
+ const { error, code, data } = await queryFixedFlow1({
|
|
|
projectId: projectId.value,
|
|
|
contractId: contractId.value,
|
|
|
- current: 1, size: 100,
|
|
|
+ ...flowJson,
|
|
|
+
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
const arr = getArrValue(data['records'])
|