处理结项后的情况
parent
26e43ae624
commit
9c77e67531
|
@ -15,8 +15,14 @@ export default {
|
|||
chartData: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initEcharts();
|
||||
props: {
|
||||
enable: false,
|
||||
},
|
||||
watch: {
|
||||
enable: function (val) {
|
||||
if(val)
|
||||
this.initEcharts();
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
getTotalNumber() {
|
||||
|
|
|
@ -74,9 +74,9 @@ const tableHeight = ref();
|
|||
const {proxy, ctx} = getCurrentInstance()
|
||||
onMounted(() => {
|
||||
// 设置表格初始高度为innerHeight-offsetTop-表格底部与浏览器底部距离110
|
||||
tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 400;
|
||||
tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 300;
|
||||
window.onresize = () => {
|
||||
tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 400;
|
||||
tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 300;
|
||||
};
|
||||
});
|
||||
const router = useRouter()
|
||||
|
@ -185,17 +185,19 @@ export default {
|
|||
staffId: Number
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
computed: {
|
||||
canCreateProject() {
|
||||
if (this.$store && this.$store.state.staff)
|
||||
return this.$store.state.staff.staffGlobalLevel < 3
|
||||
else
|
||||
return false
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
canCreateProject() {
|
||||
if (this.$store && this.$store.state.staff)
|
||||
return this.$store.state.staff.staffGlobalLevel > 3
|
||||
else
|
||||
return false
|
||||
},
|
||||
|
||||
showCloseProjectButton(row) {
|
||||
return this.$store.state.staff === null ? false : (this.$store.state.staff.staffId === row.projectCreator)
|
||||
},
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
</el-header>
|
||||
<el-main style="overflow: unset">
|
||||
<router-view
|
||||
:project="project"
|
||||
:projectAccessLevel="projectAccessLevel"
|
||||
:projectGroup="projectGroup"
|
||||
@groupChanged="groupChanged"
|
||||
|
@ -88,6 +89,7 @@ export default {
|
|||
projectStaffPosition: '',
|
||||
projectAccessLevel: 3,
|
||||
menuDefaultActive: '1',
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<div style="margin: 0 10px 0 10px;display: flex;flex-direction: row;justify-content: space-between"
|
||||
ref="left_title_Ref">
|
||||
<p style="text-align:center; 'Segoe UI',sans-serif;font-size: 20px;font-weight: bold;color: #606266">项目团队</p>
|
||||
<el-button type="primary" @click="onCreatePerson">新增成员</el-button>
|
||||
<el-button v-if="!project.completed" type="primary" @click="onCreatePerson">新增成员</el-button>
|
||||
</div>
|
||||
<div style="flex: 1; margin: 30px 0 0 0; background-color: white; border-radius: 10px;padding: 20px;
|
||||
display: flex;flex-direction: column;justify-content: space-between">
|
||||
|
@ -18,7 +18,7 @@
|
|||
<el-table-column prop="projectStaffPosition" label="职位" min-width="40%" :formatter="jobFormatter"/>
|
||||
<el-table-column align="right" min-width="35%">
|
||||
<template #default="scope">
|
||||
<div v-if="getOperationsVisible(scope.row)"
|
||||
<div v-if="!project.completed&&getOperationsVisible(scope.row)"
|
||||
style="width: 100%;display: flex;flex-direction: row;justify-content: flex-end">
|
||||
<el-button
|
||||
@click.native="onEditClick(scope.row)"
|
||||
|
@ -149,6 +149,7 @@ export default {
|
|||
},
|
||||
emits: ['groupChanged'],
|
||||
props: {
|
||||
project: {completed:true},
|
||||
projectAccessLevel: Number,
|
||||
projectGroup: Array
|
||||
},
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<div style="margin: 0 10px 0 10px;
|
||||
display: flex;flex-direction: row;justify-content: space-between">
|
||||
<p style="font-family: 'Segoe UI',sans-serif;font-size: 20px;font-weight: bold;color: #606266">详细信息</p>
|
||||
<el-button v-if="projectAccessLevel===1" type="primary" @click.native="onEditProjectClick">编辑</el-button>
|
||||
<el-button v-if="!project.completed&&projectAccessLevel===1" type="primary" @click.native="onEditProjectClick">编辑</el-button>
|
||||
</div>
|
||||
<div style="flex:1;margin-top: 30px;padding: 20px;
|
||||
display: flex;flex-direction: column; justify-content: space-between;background-color: white; border-radius: 10px; ">
|
||||
|
@ -215,13 +215,13 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div style="height: 500px;margin: 0 30px 30px 30px;
|
||||
<div v-if="!project.completed" style="height: 500px;margin: 0 30px 30px 30px;
|
||||
display: flex;flex-direction: row;justify-content: space-between">
|
||||
<div style="flex: 1;height: 100%;display: flex;flex-direction: column">
|
||||
<p class="p-title" style="margin-left: 10px">工作项完成趋势</p>
|
||||
<div style="flex:1;margin-top: 30px;padding: 20px;
|
||||
display: flex;flex-direction: column; justify-content: space-between;background-color: white; border-radius: 10px;align-items: stretch">
|
||||
<TendencyChart style="flex: 1;"></TendencyChart>
|
||||
<TendencyChart :enable="!project.completed" style="flex: 1;"></TendencyChart>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -288,27 +288,6 @@ export default {
|
|||
components: {EditProjectDialog, TendencyChart, EchartsBar},
|
||||
data() {
|
||||
return {
|
||||
project: {
|
||||
projectName: '',
|
||||
projectAbbreviation: '',
|
||||
projectClassId: '',
|
||||
projectSubclassId: '',
|
||||
projectImportance: '',
|
||||
contractAmount: '',
|
||||
expectedCompletion: '',
|
||||
projectManMonth: '',
|
||||
projectStartDate: Number,
|
||||
projectOnlineDate: Number,
|
||||
projectFirstTestDate: Number,
|
||||
projectFinalTestDate: Number,
|
||||
projectEndDate: Number,
|
||||
financialCode: '',
|
||||
projectDepartment: '',
|
||||
projectArea: '',
|
||||
projectCompany: '',
|
||||
projectDescription: '',
|
||||
completed: '',
|
||||
},
|
||||
|
||||
completeNum: 0,
|
||||
totalNum: 0,
|
||||
|
@ -348,6 +327,27 @@ export default {
|
|||
}
|
||||
},
|
||||
props: {
|
||||
project: {
|
||||
projectName: '',
|
||||
projectAbbreviation: '',
|
||||
projectClassId: '',
|
||||
projectSubclassId: '',
|
||||
projectImportance: '',
|
||||
contractAmount: '',
|
||||
expectedCompletion: '',
|
||||
projectManMonth: '',
|
||||
projectStartDate: Number,
|
||||
projectOnlineDate: Number,
|
||||
projectFirstTestDate: Number,
|
||||
projectFinalTestDate: Number,
|
||||
projectEndDate: Number,
|
||||
financialCode: '',
|
||||
projectDepartment: '',
|
||||
projectArea: '',
|
||||
projectCompany: '',
|
||||
projectDescription: '',
|
||||
completed: '',
|
||||
},
|
||||
projectAccessLevel: Number,
|
||||
projectGroup: Array
|
||||
},
|
||||
|
@ -397,16 +397,16 @@ export default {
|
|||
|
||||
},
|
||||
project: function (val) {
|
||||
|
||||
this.getProjectStats();
|
||||
this.getProjectClass();
|
||||
this.getannouncementList();
|
||||
this.getTaskStats();
|
||||
this.getselfTaskStats();
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getProjectInfo();
|
||||
this.getProjectStats();
|
||||
this.getProjectClass();
|
||||
this.getannouncementList();
|
||||
this.getTaskStats();
|
||||
this.getselfTaskStats();
|
||||
//this.getProjectInfo();
|
||||
|
||||
},
|
||||
mounted() {
|
||||
const that = this
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
|
||||
<template #reference>
|
||||
<el-button :style="{'visibility': ( projectAccessLevel < 3&&!mine)?'unset':'hidden'}" type="primary">新增工作项
|
||||
<el-button :style="{'visibility': ( !project.completed&&projectAccessLevel < 3&&!mine)?'unset':'hidden'}" type="primary">新增工作项
|
||||
</el-button>
|
||||
</template>
|
||||
</el-popover>
|
||||
|
@ -157,7 +157,7 @@
|
|||
<template #reference>
|
||||
<el-button
|
||||
:style="{'padding':'4px','margin-left': '5px','visibility':
|
||||
(scope.row.taskType!=='缺陷'&&
|
||||
(!project.completed&&scope.row.taskType!=='缺陷'&&
|
||||
!statusDisabled(scope.row))?
|
||||
'unset':'hidden'}"
|
||||
text>
|
||||
|
@ -350,6 +350,7 @@ import router from "../router";
|
|||
export default {
|
||||
name: "ProjectWorkitem",
|
||||
props: {
|
||||
project: {completed: true},
|
||||
projectAccessLevel: Number,
|
||||
projectGroup: Array
|
||||
},
|
||||
|
@ -418,7 +419,7 @@ export default {
|
|||
|
||||
|
||||
statusDisabled(row) {
|
||||
return row.taskStatus === '已完成' || row.taskStatus === '关闭' || !(row.editable ||
|
||||
return this.project.completed||row.taskStatus === '已完成' || row.taskStatus === '关闭' || !(row.editable ||
|
||||
(this.$store.state.staff && row.taskHolderId === this.$store.state.staff.staffId))
|
||||
},
|
||||
onRowClick(row, column, event) {
|
||||
|
@ -721,7 +722,7 @@ export default {
|
|||
//console.log(response.data.records)
|
||||
that.workitems = response.data.data.records
|
||||
for (let workitem of that.workitems) {
|
||||
workitem['editable'] = that.projectAccessLevel < 3
|
||||
workitem['editable'] = !that.project.completed&& that.projectAccessLevel < 3
|
||||
workitem['hasChildren'] = workitem.childrenCount !== 0
|
||||
workitem['isRoot'] = true
|
||||
//console.log(workitem)
|
||||
|
@ -745,7 +746,7 @@ export default {
|
|||
let records = response.data.data.records
|
||||
|
||||
|
||||
const editable = row.editable || row.taskHolderId === that.$store.state.staff.staffId
|
||||
const editable = !that.project.completed&&( row.editable || row.taskHolderId === that.$store.state.staff.staffId)
|
||||
for (let workitem of records) {
|
||||
workitem['editable'] = editable
|
||||
workitem['hasChildren'] = workitem.childrenCount !== 0
|
||||
|
@ -770,7 +771,7 @@ export default {
|
|||
}).then(response => {
|
||||
if (response.data.code === 200) {
|
||||
let records = response.data.data.records
|
||||
const editable = row.editable || row.taskHolderId === this.$store.state.staff.staffId
|
||||
const editable = !that.project.completed&&(row.editable || row.taskHolderId === this.$store.state.staff.staffId)
|
||||
for (let workitem of records) {
|
||||
workitem['editable'] = editable
|
||||
workitem['hasChildren'] = workitem.childrenCount !== 0
|
||||
|
|
Loading…
Reference in New Issue