|
@@ -52,7 +52,7 @@
|
|
|
<script setup>
|
|
|
import { ref, watch } from 'vue'
|
|
|
import tasksFlowApi from '~api/tasks/flow'
|
|
|
-import { arrIndex, arrToKey, formValidate } from 'js-fast-way'
|
|
|
+import { arrIndex, arrToKey, formValidate, getArrValue } from 'js-fast-way'
|
|
|
import HcTasksUserVue from './hc-tasks-user/index.vue'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
|
|
@@ -137,11 +137,29 @@ const setReportData = (show) => {
|
|
|
//获取流程数据
|
|
|
const processDefaultData = [{ id: 0, fixedFlowName: '自定义流程', disabled: false }]
|
|
|
const processData = ref([])
|
|
|
-const linkUserJoinString = ref('')
|
|
|
+
|
|
|
const getProcessDatasApi = () => {
|
|
|
- processData.value = processDefaultData
|
|
|
+ if (isShow.value) {
|
|
|
+ getProcessData()
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+//获取流程数据
|
|
|
+const linkUserJoinString = ref('')
|
|
|
+const getProcessData = async () => {
|
|
|
+ linkUserJoinString.value = ''
|
|
|
+ const { error, code, data } = await tasksFlowApi.getPageData({
|
|
|
+ projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
+ current: 1, size: 100,
|
|
|
+ })
|
|
|
+ if (!error && code === 200) {
|
|
|
+ const arr = getArrValue(data['records'])
|
|
|
+ processData.value = [...processDefaultData, ...arr]
|
|
|
+ } else {
|
|
|
+ processData.value = processDefaultData
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
//流程数据切换
|
|
|
const diyProcessUser = ref(false)
|