Browse Source

11482-【CR】【投资系统】增加审批流程-项目立项流程页面显示

hxy 3 months ago
parent
commit
5dd6c11026

+ 20 - 94
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ApprovalController.java

@@ -5,9 +5,8 @@ import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.common.enums.FileType;
-import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.uuid.IdUtils;
+
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.flowable.service.IApprovalService;
 import com.ruoyi.invest.domain.*;
 import com.ruoyi.invest.domain.dto.ApprovalDto;
@@ -108,59 +107,6 @@ public class ApprovalController extends BaseController {
        //return approvalService.set
         return approvalService.start(tProjectApproval);
     }
-    /**
-     * 新增项目池
-     */
-    @ApiOperation("新增项目池")
-    @PreAuthorize("@ss.hasPermi('invest:pool:add')")
-    @Log(title = "项目池", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody TProjectPool tProjectPool)
-    {
-        // todo 设置主键及创建人
-        tProjectPool.setCreateBy(getNickName());
-        tProjectPool.setId(IdUtils.fastSimpleUUID());
-        int number = tProjectPoolService.selectTProjectPoolCode(DateUtils.lastTwoDigits()+"-");
-        tProjectPool.setProjectCode(tProjectPool.getProjectGroup() + "-" + DateUtils.lastTwoDigits() + "-" + String.format("%03d",number+1));
-        TProjectCompany tProjectCompany = tProjectPool.gettProjectCompany();
-        tProjectCompany.setCreateBy(getNickName());
-        tProjectCompany.setId(IdUtils.fastSimpleUUID());
-        TProjectContacts tProjectContacts = tProjectPool.gettProjectContacts();
-        tProjectContacts.setCreateBy(getNickName());
-        tProjectContacts.setId(IdUtils.fastSimpleUUID());
-        // todo 设置项目联系人
-        tProjectPool.setProjectContacts(tProjectContacts.getId());
-        // todo 设置公司信息关联关系
-        tProjectCompany.setProjectPoolId(tProjectPool.getId());
-
-        // todo 保存公司附件信息
-        tUnifyFileService.insertTUnifyFileList(tProjectPool.getListFile(),
-                tProjectPool.getId(),
-                tProjectCompany.getId(),
-                String.valueOf(FileType.COMPANY.ordinal()),
-                getNickName());
-
-        // todo 保存BP附件信息
-        tUnifyFileService.insertTUnifyFileList(tProjectPool.getBpFile(),
-                tProjectPool.getId(),
-                tProjectPool.getId(),
-                String.valueOf(FileType.BP.ordinal()),
-                getNickName());
-
-        // todo 保存其他附件信息
-        tUnifyFileService.insertTUnifyFileList(tProjectPool.getOtherFile(),
-                tProjectPool.getId(),
-                tProjectPool.getId(),
-                String.valueOf(FileType.OTHER.ordinal()),
-                getNickName());
-
-        tProjectCompanyService.insertTProjectCompany(tProjectCompany);
-        tProjectContactsService.insertTProjectContacts(tProjectContacts);
-        // todo 增加项目创建记录
-        tProjectCirculationService.insertTProjectCirculation(tProjectPool.getId(),"项目报备",getNickName());
-
-        return toAjax(tProjectPoolService.insertTProjectPool(tProjectPool));
-    }
     @ApiOperation(value = "审批任务")
     @PutMapping(value = "/complete")
     public AjaxResult complete(@RequestBody ApprovalDto dto, HttpServletRequest request) {
@@ -172,45 +118,25 @@ public class ApprovalController extends BaseController {
         return approvalService.complete(tProjectApproval,tProjectMeeting,tProjectScoring,flowBaseInfo,request);
     }
     /**
-     * 修改项目池
+     * 获取通过流程id会议记录详细信息 (会议投决)
      */
-    @ApiOperation("修改项目池")
-    @PreAuthorize("@ss.hasPermi('invest:pool:edit')")
-    @Log(title = "项目池", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody TProjectPool tProjectPool)
-    {
-        tProjectPool.setUpdateBy(getNickName());
-        TProjectCompany tProjectCompany = tProjectPool.gettProjectCompany();
-        tProjectCompany.setUpdateBy(getNickName());
-        TProjectContacts tProjectContacts = tProjectPool.gettProjectContacts();
-        tProjectContacts.setUpdateBy(getNickName());
-        tProjectContacts.setId(tProjectPool.getProjectContacts());
-        // 上传并返回新文件名称
-        // todo 保存公司附件信息
-        tUnifyFileService.insertTUnifyFileList(tProjectPool.getListFile(),
-                tProjectPool.getId(),
-                tProjectCompany.getCompanyId(),
-                String.valueOf(FileType.COMPANY.ordinal()),
-                getNickName());
-
-        // todo 保存BP附件信息
-        tUnifyFileService.insertTUnifyFileList(tProjectPool.getBpFile(),
-                tProjectPool.getId(),
-                tProjectPool.getId(),
-                String.valueOf(FileType.BP.ordinal()),
-                getNickName());
+    @ApiOperation("获取会议记录详细信息")
+    @GetMapping(value = "/getMeetingInfo/{pInstId}")
+    public AjaxResult getMeetingInfo(@PathVariable("pInstId") String pInstId) {
 
-        // todo 保存其他附件信息
-        tUnifyFileService.insertTUnifyFileList(tProjectPool.getOtherFile(),
-                tProjectPool.getId(),
-                tProjectPool.getId(),
-                String.valueOf(FileType.OTHER.ordinal()),
-                getNickName());
-
-        tProjectCompanyService.updateTProjectCompany(tProjectCompany);
-        tProjectContactsService.updateTProjectContacts(tProjectContacts);
-        return toAjax(tProjectPoolService.updateTProjectPool(tProjectPool));
+        return success(approvalService.selectTProjectMeetingByProcInstId(pInstId));
+    }
+    /**
+     * 根据流程Id查询汇总分数和平均分数 (总裁室)
+     */
+    @ApiOperation("根据会议ID查询汇总分数和平均分数")
+    @GetMapping(value = "/getSumScore/{pInstId}")
+    public AjaxResult getSumScore(@PathVariable("pInstId") String pInstId)
+    {
+        if (StringUtils.isEmpty(pInstId))
+        {
+            return error("查询打分数据'" + getNickName() + "'失败,请选择会议!");
+        }
+        return success(approvalService.selectSumScore(pInstId));
     }
-
 }

+ 7 - 0
ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/IApprovalService.java

@@ -32,7 +32,14 @@ public interface IApprovalService
     AjaxResult start(TProjectApproval tProjectApproval);
     AjaxResult complete(TProjectApproval tProjectApproval, TProjectMeeting tProjectMeeting,TProjectScoring tProjectScoring, FlowBaseInfo flow, HttpServletRequest request);
 
+    TProjectMeeting selectTProjectMeetingByProcInstId(String pInstId);
 
+    /**
+     * 根据pInstId查询汇总分数和平均分数
+     * @param pInstId
+     * @return
+     */
+    Map<String,String> selectSumScore(String pInstId);
 
 
 }

+ 29 - 1
ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/ApprovalServiceImpl.java

@@ -18,6 +18,7 @@ import com.ruoyi.invest.domain.*;
 import com.ruoyi.invest.domain.vo.ProjectApprovalVo;
 import com.ruoyi.invest.mapper.ApprovalMapper;
 import com.ruoyi.invest.mapper.TProjectPoolMapper;
+import com.ruoyi.invest.mapper.TProjectScoringMapper;
 import com.ruoyi.invest.service.*;
 import com.ruoyi.system.mapper.SysDeptMapper;
 import com.ruoyi.system.service.ISysUserService;
@@ -78,6 +79,8 @@ public class ApprovalServiceImpl extends FlowServiceFactory implements IApproval
     private ITProjectMeetingService tProjectMeetingService;
     @Autowired
     private ITProjectScoringService tProjectScoringService;
+    @Autowired
+    private TProjectScoringMapper tProjectScoringMapper;
     @Override
     public List<ProjectApprovalVo> getMyTaskList(String userId, TProjectApproval tProjectApproval){
         return approvalMapper.getMyTaskList(userId, tProjectApproval);
@@ -215,7 +218,9 @@ public class ApprovalServiceImpl extends FlowServiceFactory implements IApproval
         formProperties.put("auditPass", tProjectApproval.isFlag());
         //会议投决人
         if("meeting".equals(task.getTaskDefinitionKey())) {
-            List<String> userIds = Arrays.asList(tProjectMeeting.getParticipantsId().split(","));
+            //立项审批人
+            List<String> userIds = Arrays.asList(tProjectApproval.getParticipantsId().split(","));
+            //List<String> userIds = Arrays.asList(tProjectMeeting.getParticipantsId().split(","));//会议人
             formProperties.put("decisionList", userIds);
         }
 
@@ -337,5 +342,28 @@ public class ApprovalServiceImpl extends FlowServiceFactory implements IApproval
         }
         return AjaxResult.success();
     }
+    public TProjectMeeting selectTProjectMeetingByProcInstId(String pInstId){
+        TProjectApproval tProjectApproval=this.selectTProjectApprovalByProcInstId(pInstId);
+        TProjectMeeting tProjectMeeting=null;
+        if(tProjectApproval!=null){
+            tProjectMeeting=tProjectMeetingService.selectTProjectMeetingByProjectPoolId(tProjectApproval.getProjectPoolId());
+        }
+        return tProjectMeeting;
+    }
+    /**
+     * 根据流程Id查询汇总分数和平均分数
+     * @param pInstId
+     * @return
+     */
+    @Override
+    public Map<String, String> selectSumScore(String pInstId) {
+        TProjectApproval tProjectApproval=this.selectTProjectApprovalByProcInstId(pInstId);
+        Map<String, String> sumScore=new HashMap<>();
+        if(tProjectApproval!=null){
+            TProjectMeeting tProjectMeeting=tProjectMeetingService.selectTProjectMeetingByProjectPoolId(tProjectApproval.getProjectPoolId());
+            sumScore=tProjectScoringMapper.selectMeetingId(tProjectMeeting.getId());
+        }
+        return sumScore;
+    }
 
 }

+ 5 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/domain/TProjectApproval.java

@@ -53,7 +53,12 @@ public class TProjectApproval extends BaseEntity
      */
     private List<TUnifyFile> listFile;
 
+    /**
+    * 是否需要立项会议
+    */
+    private String needMeeting;//0否1是
 
+    //表外
     private String procInstId;//流程实例Id
     private String taskName;
     private String taskDefKey;

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/mapper/TProjectMeetingMapper.java

@@ -91,4 +91,6 @@ public interface TProjectMeetingMapper
      */
     Integer selectTProjectMeetingCode(String year);
 
+    TProjectMeeting selectTProjectMeetingByProjectPoolId(@Param("projectPoolId")String projectPoolId);
+
 }

+ 7 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/service/ITProjectMeetingService.java

@@ -90,4 +90,11 @@ public interface ITProjectMeetingService
      * @return
      */
     public Integer selectTProjectMeetingCode(String year);
+    /**
+     * 查询会议记录
+     *
+     * @param projectPoolId 会议记录主键
+     * @return 会议记录
+     */
+    public TProjectMeeting selectTProjectMeetingByProjectPoolId(String projectPoolId);
 }

+ 4 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/service/impl/TProjectMeetingServiceImpl.java

@@ -135,4 +135,8 @@ public class TProjectMeetingServiceImpl implements ITProjectMeetingService
     public Integer selectTProjectMeetingCode(String year) {
         return tProjectMeetingMapper.selectTProjectMeetingCode(year);
     }
+
+    public TProjectMeeting selectTProjectMeetingByProjectPoolId(String projectPoolId){
+        return tProjectMeetingMapper.selectTProjectMeetingByProjectPoolId(projectPoolId);
+    }
 }

+ 3 - 0
ruoyi-system/src/main/resources/mapper/invest/TProjectApprovalMapper.xml

@@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
+            <if test="needMeeting != null">need_meeting,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -69,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
+            <if test="needMeeting != null">#{needMeeting},</if>
          </trim>
     </insert>
 
@@ -86,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="needMeeting != null">need_meeting = #{needMeeting},</if>
         </trim>
         where id = #{id}
     </update>

+ 6 - 0
ruoyi-system/src/main/resources/mapper/invest/TProjectMeetingMapper.xml

@@ -163,4 +163,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where meeting_code like concat('%', #{year}, '%')
     </select>
 
+    <select id="selectTProjectMeetingByProjectPoolId" parameterType="String" resultMap="TProjectMeetingResult">
+        <include refid="selectTProjectMeetingVo"/>
+        where a.project_pool_id = #{projectPoolId} and a.del_flag = 0
+        ORDER BY a.create_time DESC LIMIT 1
+    </select>
+
 </mapper>

+ 15 - 0
ruoyi-ui/src/api/project/approval/pool.js

@@ -59,6 +59,21 @@ export function getApprovalInfo(pInstId) {
     method: 'get'
   })
 }
+//查询会议投决节点  会议详情
+export function getMeetingInfo(pInstId) {
+  return request({
+    url: '/project/approval/getMeetingInfo/' + pInstId,
+    method: 'get',
+  })
+}
+
+// 根据会议ID查询汇总分数和平均分数
+export function getSumScore(pInstId) {
+  return request({
+    url: '/project/approval/getSumScore/' + pInstId,
+    method: 'get',
+  })
+}
 // 新增项目池
 
 

+ 11 - 3
ruoyi-ui/src/views/invest/components/tableForm.vue

@@ -183,6 +183,14 @@
             <th>打分人</th>
             <th>
               <textarea
+                v-if="form.scoringPerson"
+                v-model="form.createBy"
+                class="table-textarea"
+                name=""
+                disabled
+              ></textarea>
+              <textarea
+                v-else
                 v-model="user.nickName"
                 class="table-textarea"
                 name=""
@@ -2137,7 +2145,7 @@
     暂无数据
   </div>
 </template>
- 
+
 <script>
 import {
   getMeeting,
@@ -2423,7 +2431,7 @@ export default {
   },
 };
 </script>
- 
+
 <style lang="scss" scoped>
 .special-el-form {
   margin-top: 20px;
@@ -2534,4 +2542,4 @@ export default {
     margin-top: 0px !important;
   }
 }
-</style>
+</style>

+ 67 - 111
ruoyi-ui/src/views/project/approval/audit.vue

@@ -1170,6 +1170,13 @@
                   {{ formLXApply.participants ? formLXApply.participants : "请选择" }}
                 </div>
               </el-form-item>
+              <el-form-item label="附件" prop="file" class="special-el-form-item">
+                <fileItem
+                  ref="fileItems"
+                  :id="meetingForm.id"
+                  @getFileList="getFileList"
+                ></fileItem>
+              </el-form-item>
               <!-- 关键代码:el-form-item 包裹单选组 -->
               <el-form-item label="是否需要立项会议">
                 <el-radio-group v-model="formLXApply.needMeeting">
@@ -1235,7 +1242,6 @@
             </el-form-item> -->
             <el-form-item label="会议类别" prop="meetingType">
               <el-select
-                v-if="showAllType"
                 v-model="meetingForm.meetingType"
                 placeholder="请选择会议类别"
                 :disabled="
@@ -1249,21 +1255,6 @@
                   :value="dict.value"
                 ></el-option>
               </el-select>
-              <el-select
-                v-else
-                v-model="meetingForm.meetingType"
-                placeholder="请选择会议类别"
-                :disabled="
-              meetingTypeDisabled || (pageType === '1' && meetingType != null)
-            "
-              >
-                <el-option
-                  v-for="dict in meetingTypeList1"
-                  :key="dict.value"
-                  :label="dict.label"
-                  :value="dict.value"
-                ></el-option>
-              </el-select>
             </el-form-item>
 
             <el-form-item label="会议开始时间" prop="startTime">
@@ -1320,13 +1311,6 @@
                 {{ meetingForm.participants ? meetingForm.participants : "请选择会议参与人" }}
               </div>
             </el-form-item>
-            <el-form-item label="附件" prop="file" class="special-el-form-item">
-              <fileItem
-                ref="fileItems"
-                :id="meetingForm.id"
-                @getFileList="getFileList"
-              ></fileItem>
-            </el-form-item>
           </el-form>
           <!--会议信息结束-->
         </div>
@@ -1337,7 +1321,7 @@
     </section>
 
     <section>
-      <flowBase :procInstId="formLXApply.procInstId" v-if="formLXApply.procInstId"></flowBase>
+      <flowBase :procInstId="formLXApply.procInstId" :id="id" v-if="formLXApply.procInstId "></flowBase>
     </section>
     <section>
 
@@ -1408,6 +1392,8 @@ import {
 import{
   approvalComplete,
   getApprovalInfo,
+  getMeetingInfo,
+  getSumScore
 } from "@/api/project/approval/pool"
 
 
@@ -1521,11 +1507,19 @@ export default {
       pageType: null,
       showAllType: false,
       meetingTypeDisabled: false, //会议类别
-      meetingTypeList1: [
+      meetingTypeList: [
         {
           value: "A",
           label: "管理会议",
         },
+        {
+          value: "LX",
+          label: "项目立项会",
+        },
+        {
+          value: "TJ",
+          label: "项目投决会",
+        },
         {
           value: "X",
           label: "临时会议",
@@ -1686,62 +1680,14 @@ export default {
     if (this.$route.query.activeName) {
       this.activeName = this.$route.query.activeName;
     }
-
+    this.openMeetingPage(this.id,'LX');
+    //会议投决节点
+    this.getMeeting();
+    //总裁室
+    this.getSelectMeetingId();
     //this.getSelectMeetingId(this.scoreForm.meetingId);
   },
   methods: {
-    /** 查询列表 */
-    /*changeShowDueApply(showDueApply) {
-      this.showDueApply = showDueApply === "1";
-    },
-    getDueList() {
-      //   this.loading = true;
-      let queryParams = {
-        orderByColumn: "createTime",
-        isAsc: "desc",
-        projectPoolId: this.id,
-      };
-      getInvestigatelist(queryParams).then((response) => {
-        let list = response.rows,
-          showDueApply;
-        // 如果尽调全部完成,才能显示发起尽调;
-        if (list && list.length > 0) {
-          showDueApply = list.every(function (item) {
-            return item.status === "1";
-          });
-        } else {
-          showDueApply = true;
-        }
-        this.showDueApply = showDueApply;
-      });
-    },*/
-    /*getMettingId(type) {
-      let queryParams = {
-        pageNum: 1,
-        pageSize: 10,
-        meetingType: type,
-        orderByColumn: "createTime",
-        isAsc: "desc",
-        projectPoolId: this.id,
-      };
-      listMeeting(queryParams).then((response) => {
-        let meetingList = response.rows;
-        if (meetingList.length > 0) {
-          let meetingId = meetingList[0].id;
-          if (type === "LX") {
-            this.$refs.approvalTableForm.initialize(meetingId);
-          } else if (type === "TJ") {
-            this.$refs.voteTableForm.initialize(meetingId);
-          }
-        } else {
-          if (type === "LX") {
-            this.$refs.approvalTableForm.showNodata();
-          } else if (type === "TJ") {
-            this.$refs.voteTableForm.showNodata();
-          }
-        }
-      });
-    },*/
     handleClick(tab, event) {
       let that = this;
       if (this.activeName === "0") {
@@ -1786,8 +1732,43 @@ export default {
           this.active = parseInt(response.data.projectStage) - 1;
         }
       });
-      //会议详情
-      /*getMeeting(this.id).then((response) => {
+    },
+    //会议详情
+    openMeetingPage(projectId, meetingType) {
+      let that = this;
+      //this.fileList = [];
+      this.showAllType = this.type === "3";
+      this.meetingTypeDisabled = false;
+      this.selectValues = null;
+      this.selectNameValues = null;
+      //this.reset();
+      this.meetingForm.promoter = this.user.nickName;
+      this.meetingForm.promoterId = this.user.userId;
+      if (meetingType) {
+        this.meetingType = meetingType;
+        this.meetingTypeDisabled = true;
+      }
+      if (projectId && typeof projectId === "string") {
+        this.pageType = "1";
+      }
+      // 直接绑定好项目
+      if (this.pageType === "1") {
+        let projectItemMessage = this.$store.getters.projectItemMessage;
+        this.meetingForm.projectPoolId = projectItemMessage.id;
+        this.meetingForm.projectName = projectItemMessage.projectName;
+        this.meetingForm.projectStage = projectItemMessage.projectStage;
+        this.meetingForm.projectGroup = projectItemMessage.projectGroup;
+        this.meetingForm.meetingType = this.meetingType;
+      }
+      /*this.open = true;
+      this.title = "添加会议";*/
+      /*setTimeout(() => {
+        that.$refs.fileItems.fileList = [];
+      }, 200);*/
+    },
+    //会议投决
+    getMeeting(){
+      getMeetingInfo(this.$route.query.pInstId).then((response) => {
         this.form1 = response.data;
         this.form1.projectPoolId = response.data.projectPoolId;
         this.form1.projectName = response.data.tProjectPool.projectName;
@@ -1807,37 +1788,16 @@ export default {
           this.$refs.fileItems.getListFileBusinessId(id);
           this.$refs.fileItems.handleButton();
         }, 300);
-      });*/
+      });
     },
-    //会议的基础信息
-   /* getMeetingInfo(){
-      let projectItemMessage = this.$store.getters.projectItemMessage;
-      /!*!/ 基础判断:存在有效值(非 null/undefined/空字符串等)*!/
-      if (projectItemMessage) {
-        const fields = Object.keys(projectItemMessage);
-        console.log("所有字段名:", fields); // 例如:["id", "name", "createTime", ...]
-        const allFields = this.getAllFields(projectItemMessage);
-        console.log("所有字段(包括嵌套):", allFields);
-        // 有值时的逻辑(此时可安全访问 id)
-        console.log("projectItemMessage 有值,id 为:", projectItemMessage.id);
-      } else {
-        // 无值时的逻辑(如提示或默认处理)
-        console.log("projectItemMessage 无有效值");
-      }
-      console.log(projectItemMessage.id+"-----------");
-      this.meetingForm.projectPoolId = projectItemMessage.id;
-      this.meetingForm.projectName = projectItemMessage.projectName;
-      this.meetingForm.projectStage = projectItemMessage.projectStage;
-      this.meetingForm.projectGroup = projectItemMessage.projectGroup;
-      this.meetingForm.meetingType = this.meetingType;
-    },*/
+    //总裁室
     // 根据会议ID查询汇总分数和平均分数
-    /*getSelectMeetingId(id) {
-      selectMeetingId(id).then((response) => {
+    getSelectMeetingId() {
+      getSumScore(this.$route.query.pInstId).then((response) => {
         this.collectForm = response.data;
-        this.collectForm.investCommissioner = this.meetingForm.investCommissioner;
+        this.collectForm.investCommissioner = this.scoreForm.investCommissioner;
       });
-    },*/
+    },
     /** 加载审批任务弹框 */
     handleComplete(flag) {
       /*this.completeOpen = true;
@@ -1853,10 +1813,6 @@ export default {
         return;
       }
       //会议人
-      /*if (this.formLXApply.taskDefKey=='softwareDept'&&!this.formAssess.context) {
-        this.$modal.msgError("请输入评估意见!");
-        return;
-      }*/
       this.formLXApply.flag=flag;
       const params={
         projectApproval: this.formLXApply,  // 拆分明确字段

+ 1 - 0
ruoyi-ui/src/views/project/approval/myTask.vue

@@ -1004,6 +1004,7 @@ export default {
       const poolId=row.projectPoolId;
       const pInstId=row.procInstId;
       const taskId=row.taskId;
+      this.$store.commit("SET_PROJECTITEMMESSAGE", row);
       this.$router.push({ path: "/project/approval/audit", query: { id:poolId , pInstId: pInstId ,taskId:taskId} });
 
     },

File diff suppressed because it is too large
+ 2537 - 0
ruoyi-ui/src/views/project/approval/tableForm.vue


+ 54 - 3
ruoyi-ui/src/views/project/flowBase.vue

@@ -7,6 +7,7 @@
         <th>审批人</th>
         <th>审批结果</th>
         <th>审批时间</th>
+        <th v-if="procDefId && procDefId.includes('dgt-project')">打分表</th>
       </tr>
       </thead>
       <tbody>
@@ -15,6 +16,10 @@
         <td>{{ item.createBy }}</td>
         <td>{{ item.comment }}</td>
         <td>{{ item.createDate }}</td>
+        <td v-if="procDefId && procDefId.includes('dgt-project')">
+          <el-button v-if="item.taskDefKey==='decision' " class="custom-blue-color" size="mini"
+                     type="text" icon="el-icon-search" @click="handleDetail(item.createBy,scoringList)">查看</el-button>
+        </td>
       </tr>
       </tbody>
     </table>
@@ -24,22 +29,32 @@
 <script>
 import axios from 'axios';
 import {getFlowBaseInfo} from "../../api/project/flowBase";
+import {getScoringListById,
+  listMeeting} from "@/api/invest/meeting";
 
 export default {
   props: {
     procInstId: {
       type: String,
       /*required: true*/
+    },
+    id: {
+      type: String,
+      /*required: true*/
     }
   },
   data() {
     return {
-      approvalData: []
+      approvalData: [],
+      procDefId:null,
+      // 所以人打分列表
+      scoringList: []
     };
   },
   created() {
     // 组件创建时调用接口获取数据
     this.fetchApprovalData();
+    this.getMettingId();
   },
   methods: {
     fetchApprovalData() {
@@ -47,13 +62,49 @@ export default {
       getFlowBaseInfo(this.procInstId)
         .then(response => {
           this.approvalData = response.rows;
+          // 获取第一条数据的某个字段,先判断数组是否有数据
+          if (response.rows && response.rows.length > 0) {
+            this.procDefId = response.rows[0].procDefId;
+          }
           console.log('接收到的 信息:', response.rows);
         })
         .catch(error => {
           console.error('获取审批数据失败:', error);
         });
-    }
-  }
+    },
+    getMettingId() {
+      let queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        meetingType: "LX",
+        orderByColumn: "createTime",
+        isAsc: "desc",
+        projectPoolId: this.id,
+      };
+      listMeeting(queryParams).then((response) => {
+        let meetingList = response.rows;
+        if (meetingList.length > 0) {
+            this.getScoringListById(meetingList[0].id)
+        }
+      });
+    },
+    getScoringListById(meetingId) {
+      getScoringListById(meetingId).then((response) => {
+        this.scoringList = response.rows;
+      });
+    },
+    // 打分详情-弹窗
+    handleDetail(createBy,scoringList) {
+      // 遍历 scoringList,找到 createBy 与 item.createBy 匹配的数据
+      const matchedData = scoringList.find(scoringItem => scoringItem.createBy === createBy);
+      //console.log('筛选出的目标数据2:', createBy);
+      this.$store.commit("SET_TPROJECTSCORING", matchedData);
+      this.$router.push({
+        path: "/invest/meeting/mark",
+        query: { id: matchedData.meetingId, formType: 1, readonly: true },
+      });
+    },
+  },
 };
 </script>