suhp пре 1 месец
родитељ
комит
15861efc9f

+ 28 - 29
src/views/costAudit/auditInfo/auditManage/collectiveMain.vue

@@ -20,7 +20,7 @@
           align="center"
         />
         <el-table-column
-          prop="reviewForm"
+          prop="deliberationForm"
           label="审议形式"
           header-align="center"
           align="center"
@@ -32,7 +32,7 @@
           align="center"
         />
         <el-table-column
-          prop="hostName"
+          prop="hostPerson"
           label="主持人"
           header-align="center"
           align="center"
@@ -100,7 +100,7 @@
           <div class="form-item">
             <label class="form-label required">审议形式</label>
             <el-input
-              v-model="formData.reviewForm"
+              v-model="formData.deliberationForm"
               placeholder="请输入审议形式"
               class="form-input"
             ></el-input>
@@ -150,14 +150,14 @@
           <div class="form-item form-item-compact">
             <label class="form-label required">主持人</label>
             <el-input
-              v-model="formData.hostId"
+              v-model="formData.hostPerson"
               placeholder="请输入参加人员"
               class="form-input"
             ></el-input>
             <label class="required">记录人</label>
             <el-input
-              v-model="formData.recorderId"
-              placeholder="请输入参加人员"
+              v-model="formData.recordPerson"
+              placeholder="请输入记录人"
               class="form-input"
             ></el-input>
           </div>
@@ -306,12 +306,12 @@
         // 表单数据
         formData: {
           id: '',
-          reviewForm: '',
+          deliberationForm: '',
           startDate: '',
           endDate: '',
           location: '',
-          hostId: '',
-          recorderId: '',
+          hostPerson: '',
+          recordPerson: '',
           participants: '',
           reviewProject: '',
           auditedUnit: '',
@@ -433,21 +433,22 @@
       loadRecordList() {
         // 调用API获取集体审议记录列表
         const queryParams = {
-          projectId: this.id, // 使用props传入的id作为项目ID
+          taskId: this.id, // 使用props传入的id作为项目ID
         }
 
         getCollectiveDeliberateList(queryParams)
           .then((res) => {
             if (res && res.state && res.code === 200) {
               // 根据新的接口返回格式,从res.value中获取数据
-              const data = res.value || []
+              const data = res.value.records || []
               // 处理返回的数据,转换为前端表格需要的格式
               this.recordList = Array.isArray(data)
                 ? data.map((item) => ({
                     id: item.id,
-                    reviewForm: item.deliberationForm,
+                    deliberationForm: item.deliberationForm,
                     location: item.location,
-                    hostName: item.hostPerson,
+                    hostPerson: item.hostPerson,
+                    recordPerson: item.recordPerson,
                     reviewTime: item.beginTime,
                     attachments: item.attachmentIds
                       ? item.attachmentIds.split(',').map((attachmentId) => ({
@@ -489,13 +490,13 @@
         // 复制数据到表单
         this.formData = {
           id: row.id,
-          reviewForm: row.reviewForm,
+          deliberationForm: row.deliberationForm,
           location: row.location,
           // 解析时间,实际应该根据API返回格式处理
           startDate: row.reviewTime,
           endDate: row.reviewTime,
-          hostId: this.userList.find((u) => u.name === row.hostName)?.id || '',
-          recorderId: '',
+          hostPerson: row.hostPerson,
+          recordPerson: row.recordPerson,
           participants: '',
           reviewProject: this.formData.reviewProject,
           auditedUnit: this.formData.auditedUnit,
@@ -557,7 +558,7 @@
       // 保存记录
       handleSave() {
         // 表单验证
-        if (!this.formData.reviewForm) {
+        if (!this.formData.deliberationForm) {
           this.$message.error('请输入审议形式')
           return
         }
@@ -569,27 +570,25 @@
           this.$message.error('请选择时间')
           return
         }
-        if (!this.formData.hostId) {
+        if (!this.formData.hostPerson) {
           this.$message.error('请选择主持人')
           return
         }
-        if (!this.formData.recorderId) {
+        if (!this.formData.recordPerson) {
           this.$message.error('请选择记录人')
           return
         }
 
         // 构建保存数据,按照接口要求的参数格式
         const saveData = {
-          deliberationForm: this.formData.reviewForm,
+          id: this.formData.id,
+          taskId: this.id, // 使用props传入的id作为项目ID
+          deliberationForm: this.formData.deliberationForm,
           beginTime: this.formData.startDate,
           endTime: this.formData.endDate,
           location: this.formData.location,
-          hostPerson:
-            this.userList.find((u) => u.id === this.formData.hostId)?.name ||
-            this.formData.hostId,
-          recordPerson:
-            this.userList.find((u) => u.id === this.formData.recorderId)
-              ?.name || this.formData.recorderId,
+          hostPerson: this.formData.hostPerson,
+          recordPerson: this.formData.recordPerson,
           participants: this.formData.participants,
           enterpriseId: '', // 需要从项目信息中获取监审单位id
           deliberationContent: this.formData.reviewSituation,
@@ -646,12 +645,12 @@
       resetForm() {
         this.formData = {
           id: '',
-          reviewForm: '',
+          deliberationForm: '',
           startDate: '',
           endDate: '',
           location: '',
-          hostId: '',
-          recorderId: '',
+          hostPerson: '',
+          recordPerson: '',
           participants: '',
           reviewProject: this.formData.reviewProject, // 保持项目信息不变
           auditedUnit: this.formData.auditedUnit, // 保持单位信息不变

+ 1 - 5
src/views/costAudit/auditInfo/auditManage/index.vue

@@ -90,11 +90,7 @@
               <el-button type="text" @click="handleOpenDetails(scope.row)">
                 任务详情
               </el-button>
-              <el-button
-                v-if="scope.row.currentNode === 'jtsy'"
-                type="text"
-                @click="handleOpenMainDetails(scope.row)"
-              >
+              <el-button type="text" @click="handleOpenMainDetails(scope.row)">
                 任务办理
               </el-button>
               <el-button type="text" @click="handleCheckRecord(scope.row)">