duy 1 год назад
Родитель
Сommit
c200f08328

+ 16 - 4
src/global/components/hc-report-modal/index.vue

@@ -34,7 +34,7 @@
             <el-form-item v-if="diyProcessUser" label="任务人" prop="userTasks">
                 <HcTasksUser
                     :contract-id="contractId" :project-id="projectId" :type="type" :type-data="typeData"
-                    ui="w-full" :classify-type="classifyType" :table-owner="tableOwner" :node-id="formModel.ids" @change="diyProcessUserChange"
+                    ui="w-full" :classify-type="classifyType" :table-owner="tableOwner" :node-id="formModel.ids ? formModel.ids : nodeId " :info-ids="infoIds" @change="diyProcessUserChange"
                 />
             </el-form-item>
             <el-form-item v-else label="任务人">
@@ -66,7 +66,7 @@
 import { onMounted, ref, watch } from 'vue'
 import tasksFlowApi from '~api/tasks/flow'
 import { ApprovalApi, queryFixedFlow, queryFixedFlow1 } from '~api/other'
-import { arrIndex, formValidate, getArrValue } from 'js-fast-way'
+import { arrIndex, arrToId, formValidate, getArrValue } from 'js-fast-way'
 
 const props = defineProps({
     show: {
@@ -129,6 +129,11 @@ const props = defineProps({
         type: [String, Number],
         default: '',
     },
+    nodeId:{
+        type: [String, Number],
+        default: '',
+    },
+ 
 })
 
 const emit = defineEmits(['hide', 'finish', 'tagClose'])
@@ -142,6 +147,7 @@ const ApiUrl = ref(props.url)
 const isTypes = ref(props.type)
 const typeDatas = ref(props.typeData)
 const reportDatas = ref(props.datas)
+const nodeId = ref(props.nodeId)
 
 //表单
 const formRef = ref(null)
@@ -192,13 +198,15 @@ watch(() => [
     props.typeData,
     props.datas,
     props.trialSelfInspectionRecordId,
-], ([val, pid, cid, cla, tab, name, ids, url, addition, type, typeData, datas, trialSelfInspectionRecordId]) => {
+    props.nodeId,
+], ([val, pid, cid, cla, tab, name, ids, url, addition, type, typeData, datas, trialSelfInspectionRecordId, nodeid]) => {
     isShow.value = val
     projectId.value = pid
     contractId.value = cid
     classifyType.value = cla
     tableOwner.value = tab
     ApiUrl.value = url
+    nodeId.value = nodeid
     //更新到表单数据
     formModel.value = {
         projectId: pid,
@@ -238,6 +246,7 @@ const getProcessDatasApi = () => {
 }
 
 //获取流程数据
+const infoIds = ref('')
 const linkUserJoinString = ref('')
 const getProcessData = async (type, datas) => {
     linkUserJoinString.value = ''
@@ -249,12 +258,15 @@ const getProcessData = async (type, datas) => {
     } else if (type === 'wbs' || type === 'query') {
         flowJson['privatePKeyId'] = datas
     }
+ 
+    infoIds.value = arrToId(reportDatas.value)
     const { error, code, data } = await queryFixedFlow1({
         projectId: projectId.value,
         contractId: contractId.value,
-        nodeId:formModel.value.ids,
+        nodeId:nodeId.value,
         classifyType:classifyType.value,
         tableOwner:tableOwner.value,
+        infoIds:infoIds.value,
         ...flowJson,
        
     })

+ 11 - 2
src/global/components/hc-tasks-user/index.vue

@@ -190,7 +190,11 @@ const props = defineProps({
     },
     nodeId: {
         type: [String, Number],
-        default: '',
+        default: '', //选中节点nodeid
+    },
+    infoIds:{
+        type: [String, Number],
+        default: '', //上报任务ID
     },
 
 })
@@ -209,6 +213,7 @@ const typeDatas = ref(props.typeData)
 const classifyType = ref(props.classifyType)
 const tableOwner = ref(props.tableOwner)
 const nodeId = ref(props.nodeId)
+const infoIds = ref(props.infoIds)
 
 //树数据
 const ElTreeProps = { children: 'childRoleList', label: 'roleName' }
@@ -229,7 +234,8 @@ watch(() => [
     props.classifyType,
     props.tableOwner,
     props.nodeId,
-], ([users, pid, cid, type, data, cla, tab, noid]) => {
+    props.infoIds,
+], ([users, pid, cid, type, data, cla, tab, noid, infoid]) => {
     projectId.value = pid
     contractId.value = cid
     isTypes.value = type
@@ -238,6 +244,7 @@ watch(() => [
     classifyType.value = cla
     tableOwner.value = tab
     nodeId.value = noid
+    infoIds.value = infoid
 })
 
 //渲染完成
@@ -391,6 +398,7 @@ const getCheckCustomFlowUserIsEVisaPermissions = async (flowJson, newUser, newUs
         ...flowJson,
         classifyType:classifyType.value,
         tableOwner:tableOwner.value,
+        nodeId:nodeId.value,
 
     })
     //处理数据
@@ -412,6 +420,7 @@ const getCheckCustomFlowUserIsEVisaPermissionsquery = async (flowJson, newUser,
         nodeId:nodeId.value,
         classifyType:classifyType.value,
         tableOwner:tableOwner.value,
+        infoIds:infoIds.value,
     })
     //处理数据
     sureSignUserLoading.value = false

+ 9 - 1
src/views/data-fill/query.vue

@@ -234,15 +234,16 @@
 
         <!-- 批量上报审批 -->
         <HcReportModal
+            :node-id="primaryKeyId"
             :table-owner="contractTypeTabKey"
             :classify-type="classType"
             :contract-id="contractId"
             :datas="reportDatas"
-            :ids="reportIds"
             :project-id="projectId"
             :show="showReportModal"
             :task-name="reportTaskName"
             :type-data="reportTypeData"
+            :report-arr="reportArr"
             type="query"
             is-datas
             title="批量上报审批"
@@ -605,6 +606,7 @@ const reportDatas = ref([])
 const reportTypeData = ref([])
 const showReportModal = ref(false)
 const reportLoading = ref(false)
+const reportArr = ref([])
 const reportModalClick = async () => {
     const rows = tableCheckedKeys.value
     //判断是否满足条件
@@ -617,6 +619,12 @@ const reportModalClick = async () => {
         newArr.push(rows[i]['wbsId'])
     }
     reportTypeData.value = newArr
+
+    let newArr1 = []
+    for (let i = 0; i < rows.length; i++) {
+        newArr1.push(rows[i]['id'])
+    }
+    reportArr.value = newArr1
     //判断状态
     if (result) {
         reportLoading.value = true