|
@@ -58,7 +58,7 @@
|
|
<script setup>
|
|
<script setup>
|
|
import { onMounted, ref, watch } from 'vue'
|
|
import { onMounted, ref, watch } from 'vue'
|
|
//import tasksFlowApi from '~api/tasks/flow'
|
|
//import tasksFlowApi from '~api/tasks/flow'
|
|
-import { ApprovalApi, queryFixedFlow, queryFixedFlow1 } from '~api/other'
|
|
|
|
|
|
+import { ApprovalApi, queryFixedFlow, queryFixedFlow1, queryFixedFlow3 } from '~api/other'
|
|
import { arrIndex, arrToId, formValidate, getArrValue } from 'js-fast-way'
|
|
import { arrIndex, arrToId, formValidate, getArrValue } from 'js-fast-way'
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -233,15 +233,17 @@ const processDefaultData = [{ id: 0, fixedFlowName: '自定义流程', disabled:
|
|
const getProcessDatasApi = () => {
|
|
const getProcessDatasApi = () => {
|
|
if (isShow.value) {
|
|
if (isShow.value) {
|
|
const type = isTypes.value
|
|
const type = isTypes.value
|
|
- if (type === 'first' || type === 'log' || type === 'wbs') {
|
|
|
|
|
|
+ if (type === 'first' || type === 'wbs') {
|
|
queryFixedFlowApi(type, typeDatas.value)
|
|
queryFixedFlowApi(type, typeDatas.value)
|
|
} else if (type === 'query') {
|
|
} else if (type === 'query') {
|
|
getProcessData(type, typeDatas.value)
|
|
getProcessData(type, typeDatas.value)
|
|
|
|
+ } else if (type === 'log') {
|
|
|
|
+ queryFixedFlowApi3(type, typeDatas.value)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-//获取流程数据
|
|
|
|
|
|
+//获取资料查询获取流程数据
|
|
const infoIds = ref('')
|
|
const infoIds = ref('')
|
|
const linkUserJoinString = ref('')
|
|
const linkUserJoinString = ref('')
|
|
const getProcessData = async (type, datas) => {
|
|
const getProcessData = async (type, datas) => {
|
|
@@ -301,7 +303,33 @@ const queryFixedFlowApi = async (type, datas) => {
|
|
processData.value = processDefaultData
|
|
processData.value = processDefaultData
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+//日志填报获取流程数据
|
|
|
|
+const queryFixedFlowApi3 = async (type, datas) => {
|
|
|
|
+ let flowJson = {}
|
|
|
|
+ if (type === 'first') {
|
|
|
|
+ flowJson['firstId'] = datas
|
|
|
|
+ } else if (type === 'log') {
|
|
|
|
+ flowJson['theLogPrimaryKeyId'] = datas
|
|
|
|
+ } else if (type === 'wbs') {
|
|
|
|
+ flowJson['privatePKeyId'] = datas
|
|
|
|
+ }
|
|
|
|
+ //请求数据
|
|
|
|
+ linkUserJoinString.value = ''
|
|
|
|
+ const { error, code, data } = await queryFixedFlow3({
|
|
|
|
+ projectId: projectId.value,
|
|
|
|
+ contractId: contractId.value,
|
|
|
|
+ ...flowJson,
|
|
|
|
+ nodeId:formModel.value.ids,
|
|
|
|
+ classifyType:classifyType.value,
|
|
|
|
+ tableOwner:tableOwner.value,
|
|
|
|
+ })
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ const arr = getArrValue(data['records'])
|
|
|
|
+ processData.value = [...processDefaultData, ...arr]
|
|
|
|
+ } else {
|
|
|
|
+ processData.value = processDefaultData
|
|
|
|
+ }
|
|
|
|
+}
|
|
//流程数据切换
|
|
//流程数据切换
|
|
const diyProcessUser = ref(false)
|
|
const diyProcessUser = ref(false)
|
|
const handleProcessValue = (val) => {
|
|
const handleProcessValue = (val) => {
|