yaozc
2023-02-23 b88a47906420551dbbd3b4c3059151e120d02099
BUG改修
2 files modified
48 ■■■■■ changed files
eladmin-web-master/src/api/task/taskDaliy.js 10 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/task/taskDaliy/index.vue 38 ●●●●● patch | view | raw | blame | history
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 }
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
      })
    }
  }
}