<template>
|
<div class="container" v-loading="loading">
|
<el-table size="small" show-summary :data="projectStatistics" stripe style="width: 100%">
|
<el-table-column
|
v-for="column in projectStatisticsCloums"
|
:key="column.prop"
|
:prop="column.prop"
|
:label="column.label"
|
>
|
</el-table-column>
|
</el-table>
|
</div>
|
</template>
|
|
<script>
|
import logModel from 'lin/model/log'
|
import projectInfo from '@/model/projectInfo'
|
|
import { ref, reactive, onMounted } from 'vue'
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
|
export default {
|
props: {
|
editId: {
|
type: String,
|
default: null,
|
},
|
},
|
setup(props, context) {
|
const form = ref(null)
|
const project = ref({})
|
const projectStatistics = ref([])
|
const finished = ref(false)
|
const relationId = ref('')
|
const projectStatisticsCloums = ref([
|
{ label: '姓名', prop: 'create_user_name' },
|
{ label: '计划工时', prop: 'estimated_hours' },
|
{ label: '实际工时', prop: 'actual_hours' },
|
{ label: '实际工时百分比', prop: 'actual_hours_percent' },
|
])
|
|
onMounted(() => {
|
loadDictDitems()
|
getProjectStatistics()
|
getProjectInfo()
|
})
|
|
// 根据字典类型查询字典
|
const loadDictDitems = async () => {
|
if (props.editId) {
|
relationId.value = props.editId
|
}
|
}
|
|
const getProjectInfo = async () => {
|
if (props.editId) {
|
project.value = await projectInfo.getProjectInfoDetail(props.editId)
|
}
|
}
|
|
// 根据字典类型查询字典
|
const getProjectStatistics = async () => {
|
projectStatistics.value = []
|
const searchParam = { project_Id: props.editId }
|
// const res = await projectInfo.getProjectStatistics(searchParam)
|
const res = await projectInfo.getProjectStatisticsUnconfirm(searchParam)
|
projectStatistics.value = res
|
}
|
|
// 重置表单
|
const resetForm = () => {
|
form.value.resetFields()
|
}
|
|
const back = () => {
|
context.emit('editClose')
|
}
|
|
return {
|
back,
|
projectStatisticsCloums,
|
projectStatistics,
|
finished,
|
form,
|
resetForm,
|
project,
|
}
|
},
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.container {
|
.title {
|
height: 59px;
|
line-height: 59px;
|
color: $parent-title-color;
|
font-size: 16px;
|
font-weight: 500;
|
text-indent: 40px;
|
border-bottom: 1px solid #dae1ec;
|
|
.back {
|
float: right;
|
margin-right: 40px;
|
cursor: pointer;
|
}
|
}
|
|
.content {
|
padding: 10px;
|
}
|
|
.wrap {
|
padding: 20px;
|
}
|
|
.submit {
|
float: left;
|
}
|
.projectInfo {
|
margin: 10px;
|
}
|
}
|
|
.things {
|
font-size: 14px;
|
color: #45526b;
|
margin-bottom: 15px;
|
margin-top: 5px;
|
}
|
|
.more {
|
height: 40px;
|
line-height: 40px;
|
color: $theme;
|
font-size: 14px;
|
margin-left: 28px;
|
cursor: pointer;
|
&.nothing {
|
cursor: text;
|
}
|
|
.icon-gengduo {
|
display: inline;
|
margin-left: 6px;
|
}
|
|
.icon-loading {
|
&:before {
|
display: inline-block;
|
animation: spin 1s linear infinite;
|
}
|
}
|
}
|
|
.nothing {
|
color: #45526b;
|
font-size: 14px;
|
}
|
</style>
|