解决新增工作项的问题
parent
07438fc947
commit
aae647ae90
|
@ -4,6 +4,44 @@
|
||||||
<div style="margin: 0 40px 0 40px;
|
<div style="margin: 0 40px 0 40px;
|
||||||
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-popover
|
||||||
|
placement="bottom-end"
|
||||||
|
:width="100"
|
||||||
|
trigger="click"
|
||||||
|
>
|
||||||
|
<div style="display: flex;flex-direction: column">
|
||||||
|
<el-button
|
||||||
|
style="padding: 4px;margin-left: 5px" text @click.native="onAddClick({taskId: 0}, '需求')">
|
||||||
|
<div style="width: 24px;display: flex;justify-content: center">
|
||||||
|
<svg-icon style="width: 24px;height: 24px;"
|
||||||
|
icon-class="demand"></svg-icon>
|
||||||
|
</div>
|
||||||
|
<span style="margin-left: 5px">需求</span>
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
style="padding: 4px;margin-left: 5px" text @click.native="onAddClick({taskId: 0}, '任务')">
|
||||||
|
<div style="width: 24px;display: flex;justify-content: center">
|
||||||
|
<svg-icon style="width: 20px;height: 20px;"
|
||||||
|
icon-class="assignment"></svg-icon>
|
||||||
|
</div>
|
||||||
|
<span style="margin-left: 5px">任务</span>
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
style="padding: 4px;margin-left: 5px" text @click.native="onAddClick({taskId: 0}, '缺陷')">
|
||||||
|
<div style="width: 24px;display: flex;justify-content: center">
|
||||||
|
<svg-icon style="width: 20px;height: 20px;"
|
||||||
|
icon-class="defect"></svg-icon>
|
||||||
|
</div>
|
||||||
|
<span style="margin-left: 5px">缺陷</span>
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<template #reference>
|
||||||
|
<el-button :style="{'visibility': ( projectAccessLevel < 3)?'unset':'hidden'}" type="primary" >新增工作项</el-button>
|
||||||
|
</template>
|
||||||
|
</el-popover>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1; margin: 30px 30px 10px 30px; background-color: white; border-radius: 10px;padding: 20px;
|
<div style="flex: 1; margin: 30px 30px 10px 30px; 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">
|
||||||
|
@ -56,7 +94,7 @@
|
||||||
<el-table-column prop="taskStartTime" label="开始时间" min-width="10%" :formatter="dateFormatter"/>
|
<el-table-column prop="taskStartTime" label="开始时间" min-width="10%" :formatter="dateFormatter"/>
|
||||||
<el-table-column prop="taskEndTime" label="截止时间" min-width="10%" :formatter="dateFormatter"/>
|
<el-table-column prop="taskEndTime" label="截止时间" min-width="10%" :formatter="dateFormatter"/>
|
||||||
<el-table-column prop="taskPriority" label="优先级" min-width="7%" :formatter="priorityFormatter"/>
|
<el-table-column prop="taskPriority" label="优先级" min-width="7%" :formatter="priorityFormatter"/>
|
||||||
<el-table-column min-width="5%">
|
<el-table-column prop="operations" min-width="5%">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div style="width: 100%;display: flex;justify-content: flex-end">
|
<div style="width: 100%;display: flex;justify-content: flex-end">
|
||||||
<el-button v-show="scope.row.editable" style="padding: 4px" text @click.native="onEditClick(scope.row)">
|
<el-button v-show="scope.row.editable" style="padding: 4px" text @click.native="onEditClick(scope.row)">
|
||||||
|
@ -109,7 +147,7 @@
|
||||||
(this.$store.state.staff&&scope.row.taskHolderId===this.$store.state.staff.staffId)))?
|
(this.$store.state.staff&&scope.row.taskHolderId===this.$store.state.staff.staffId)))?
|
||||||
'unset':'hidden'}"
|
'unset':'hidden'}"
|
||||||
text>
|
text>
|
||||||
<svg-icon style="width: 20px;height: 20px;" icon-class="add"></svg-icon>
|
<svg-icon style="width: 20px;height: 20px;" icon-class="add" ></svg-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
@ -133,12 +171,12 @@
|
||||||
>
|
>
|
||||||
<el-form :model="form" label-position="top" label-width="120px" >
|
<el-form :model="form" label-position="top" label-width="120px" >
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="form.add?24:12">
|
<el-col :span="form.operation==='add'?24:12">
|
||||||
<el-form-item label="标题" >
|
<el-form-item label="标题" >
|
||||||
<el-input v-model="form.taskName" :disabled="form.disabled"/>
|
<el-input v-model="form.taskName" :disabled="form.disabled"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-show="!form.add" :disabled="form.disabled">
|
<el-col :span="12" v-show="form.operation!=='add'" :disabled="form.disabled">
|
||||||
<el-form-item label="状态">
|
<el-form-item label="状态">
|
||||||
<el-select style="width: 100%" v-model="form.taskStatus" :disabled="form.statusDisabled">
|
<el-select style="width: 100%" v-model="form.taskStatus" :disabled="form.statusDisabled">
|
||||||
<el-option value="待进行" :disabled="form.taskStatus!=='待进行'"/>
|
<el-option value="待进行" :disabled="form.taskStatus!=='待进行'"/>
|
||||||
|
@ -305,6 +343,8 @@ export default {
|
||||||
(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) {
|
||||||
|
if(column.property==="operations")
|
||||||
|
return
|
||||||
this.form = {
|
this.form = {
|
||||||
disabled: !row.editable,
|
disabled: !row.editable,
|
||||||
statusDisabled: this.statusDisabled(row),
|
statusDisabled: this.statusDisabled(row),
|
||||||
|
|
Loading…
Reference in New Issue