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