From b88a47906420551dbbd3b4c3059151e120d02099 Mon Sep 17 00:00:00 2001
From: yaozc <unbelievers@yeah.net>
Date: Thu, 23 Feb 2023 08:12:41 +0000
Subject: [PATCH] BUG改修

---
 eladmin-web-master/src/api/task/taskDaliy.js          |   10 +++++++++-
 eladmin-web-master/src/views/task/taskDaliy/index.vue |   38 +++++++++++++++++++++++++++++++++++++-
 2 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/eladmin-web-master/src/api/task/taskDaliy.js b/eladmin-web-master/src/api/task/taskDaliy.js
index e115f6e..9210426 100644
--- a/eladmin-web-master/src/api/task/taskDaliy.js
+++ b/eladmin-web-master/src/api/task/taskDaliy.js
@@ -8,6 +8,14 @@
   })
 }
 
+export function get(params) {
+  return request({
+    url: 'api/taskDaliy',
+    method: 'get',
+    params
+  })
+}
+
 export function add(data) {
   return request({
     url: 'api/taskDaliy',
@@ -56,4 +64,4 @@
   })
 }
 
-export default { getAll, add, edit, del, completedWork, complianceWork, taskTotalConsumedHours }
+export default { get, getAll, add, edit, del, completedWork, complianceWork, taskTotalConsumedHours }
diff --git a/eladmin-web-master/src/views/task/taskDaliy/index.vue b/eladmin-web-master/src/views/task/taskDaliy/index.vue
index 982d028..bda8b4c 100644
--- a/eladmin-web-master/src/views/task/taskDaliy/index.vue
+++ b/eladmin-web-master/src/views/task/taskDaliy/index.vue
@@ -85,6 +85,7 @@
           </el-form-item>
           <el-form-item label="任务进度" prop="taskProgress">
             <el-input v-model="form.taskProgress" style="width: 340px;" :disabled="disabledFlagBySettlement">
+              <template slot="prepend"><i class="i el-icon-search" @click="showInner" /></template>
               <template slot="append">%</template>
             </el-input>
           </el-form-item>
@@ -106,6 +107,26 @@
           <el-button type="text" @click="crud.cancelCU">取消</el-button>
           <el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
         </div>
+        <el-dialog
+          width="30%"
+          title="日报详细"
+          :visible.sync="innerVisible"
+          append-to-body
+        >
+          <el-table ref="tableInner" v-loading="innerLoading" :data="innerData" size="small" style="width: 100%;">
+            <el-table-column :show-overflow-tooltip="true" prop="fillDate" label="填写日期" fixed="left" min-width="100px">
+              <template slot-scope="scope">
+                {{ crud.toDate(scope.row.fillDate) }}
+              </template>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" prop="consumedHours" label="消耗工时" min-width="80px" />
+            <el-table-column :show-overflow-tooltip="true" prop="taskProgress" label="任务进度" min-width="80px">
+              <template slot-scope="scope">
+                {{ scope.row.taskProgress }}%
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-dialog>
       </el-dialog>
       <!--表格渲染-->
       <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
@@ -270,7 +291,13 @@
       // 表单任务列表
       formTasks: [],
       // 表单禁用标记(结算状态)
-      disabledFlagBySettlement: false
+      disabledFlagBySettlement: false,
+      // 内侧弹出框
+      innerVisible: false,
+      // 内侧数据
+      innerData: [],
+      // 内侧数据加载
+      innerLoading: false
     }
   },
   computed: {
@@ -437,6 +464,15 @@
         // 表单赋值
         this.form.taskHours = res[0].taskHours
       })
+    },
+    showInner() {
+      // 显示内部对话框
+      this.innerVisible = true
+      this.innerLoading = true
+      crudTaskDaliy.get({ userId: this.form.userId, projectId: this.form.projectId, taskId: this.form.taskId, page: 0, size: 5, sort: 'fillDate,desc' }).then(res => {
+        this.innerData = res.content
+        this.innerLoading = false
+      })
     }
   }
 }

--
Gitblit v1.9.3