|
@@ -35,6 +35,24 @@
|
|
|
</el-radio-button>
|
|
</el-radio-button>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item prop="priority">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="queryParams.priority"
|
|
|
|
|
+ @change="getList"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ placeholder="优先级"
|
|
|
|
|
+ style="width: 85px">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="dict in dict.type.task_priority"
|
|
|
|
|
+ :key="dict.value"
|
|
|
|
|
+ :label="dict.label"
|
|
|
|
|
+ :value="dict.value">
|
|
|
|
|
+ <el-tag :color="priorityColorMap[dict.value]" effect="dark" :hit="false">
|
|
|
|
|
+ {{ dict.label }}
|
|
|
|
|
+ </el-tag>
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="2">
|
|
<el-col :span="2">
|
|
|
<el-button
|
|
<el-button
|
|
@@ -52,6 +70,7 @@
|
|
|
|
|
|
|
|
<el-table
|
|
<el-table
|
|
|
class="view-table"
|
|
class="view-table"
|
|
|
|
|
+ v-loading="loading"
|
|
|
:data="tableData"
|
|
:data="tableData"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
@cell-mouse-enter="cellMouseEnter"
|
|
@cell-mouse-enter="cellMouseEnter"
|
|
@@ -72,18 +91,11 @@
|
|
|
</el-tag>
|
|
</el-tag>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column fixed prop="" label="优先级" align="center" width="100">
|
|
|
|
|
|
|
+ <el-table-column fixed prop="" label="优先级" align="center" width="60">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-tag v-if="scope.row.priority==='1'" color="#fa8888" effect="dark" :hit="false">
|
|
|
|
|
- {{ getTaskPriority(scope.row.priority) }}
|
|
|
|
|
- </el-tag>
|
|
|
|
|
- <el-tag v-else-if="scope.row.priority==='2'" color="#fb7fb7" effect="dark" :hit="false">
|
|
|
|
|
- {{ getTaskPriority(scope.row.priority) }}
|
|
|
|
|
- </el-tag>
|
|
|
|
|
- <el-tag v-else-if="scope.row.priority==='3'" color="#40e0c3" effect="dark" :hit="false">
|
|
|
|
|
|
|
+ <el-tag :color="priorityColorMap[scope.row.priority]" effect="dark" :hit="false">
|
|
|
{{ getTaskPriority(scope.row.priority) }}
|
|
{{ getTaskPriority(scope.row.priority) }}
|
|
|
</el-tag>
|
|
</el-tag>
|
|
|
- <el-tag v-else color="#5dcfff" effect="dark" :hit="false">{{ getTaskPriority(scope.row.priority) }}</el-tag>
|
|
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" v-for="header in tableHeaders" :key="header.day" :prop="header.day" width="42">
|
|
<el-table-column align="center" v-for="header in tableHeaders" :key="header.day" :prop="header.day" width="42">
|
|
@@ -97,65 +109,64 @@
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row[header.day].comment" class="comment-badge"></span>
|
|
<span v-if="scope.row[header.day].comment" class="comment-badge"></span>
|
|
|
<span v-if="scope.row[header.day].audit" class="audit-badge"></span>
|
|
<span v-if="scope.row[header.day].audit" class="audit-badge"></span>
|
|
|
- <el-popover
|
|
|
|
|
- v-if="scope.row[header.day].value!=''"
|
|
|
|
|
- placement="top"
|
|
|
|
|
- width="680"
|
|
|
|
|
- trigger="click">
|
|
|
|
|
- <el-table :data="feedbacks" border size="mini">
|
|
|
|
|
- <el-table-column width="75" label="反馈状态">
|
|
|
|
|
- <template slot-scope="temp">
|
|
|
|
|
- <div>{{ getFeedbackTypeName(temp.row.feedbackType) }}</div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column width="60" property="userName" label="反馈人"></el-table-column>
|
|
|
|
|
- <el-table-column width="55" label="完成度">
|
|
|
|
|
- <template slot-scope="temp">
|
|
|
|
|
- <div>{{ temp.row.feedbackType === '4' ? '' : temp.row.value + '%' }}</div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column width="110" property="createTime" label="反馈时间">
|
|
|
|
|
- <template slot-scope="temp">
|
|
|
|
|
- <div>{{ parseTime(temp.row.createTime) }}</div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column label="反馈备注">
|
|
|
|
|
- <template slot-scope="temp">
|
|
|
|
|
- <div>
|
|
|
|
|
- <span>{{ temp.row.description }}</span>
|
|
|
|
|
- <span v-for="(file,index) in temp.row.fileList">
|
|
|
|
|
- <a :href="file.url" style="color: darkgreen">
|
|
|
|
|
- <span style="margin-left: 5px">{{ file.name }}</span>
|
|
|
|
|
- </a>
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column label="反馈详情" width="90px">
|
|
|
|
|
- <template slot-scope="temp">
|
|
|
|
|
- <el-popover
|
|
|
|
|
- v-if="temp.row.descriptionDetail&&temp.row.descriptionDetail.length>0"
|
|
|
|
|
- placement="top"
|
|
|
|
|
- width="600"
|
|
|
|
|
- trigger="hover">
|
|
|
|
|
- <div v-html="temp.row.descriptionDetail"></div>
|
|
|
|
|
- <el-button slot="reference" type="text">详情</el-button>
|
|
|
|
|
- </el-popover>
|
|
|
|
|
- <span
|
|
|
|
|
- v-if="(temp.row.feedbackType === '4'||temp.row.feedbackType === '5')&& scope.row.executor===userId && temp.row.commentConfirm!='1'"
|
|
|
|
|
- style="margin-left: 10px">
|
|
|
|
|
- <el-button type="text" icon="el-icon-thumb" size="mini"
|
|
|
|
|
- @click="confirmComment(temp.row)">确认</el-button>
|
|
|
|
|
- </span>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- <div slot="reference" style="font-size: 10px;cursor: pointer">{{ scope.row[header.day].value }}</div>
|
|
|
|
|
- </el-popover>
|
|
|
|
|
|
|
+ <div v-popover:popover style="font-size: 10px;cursor: pointer">{{ scope.row[header.day].value }}</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
+ <el-popover
|
|
|
|
|
+ ref="popover"
|
|
|
|
|
+ placement="top"
|
|
|
|
|
+ width="700"
|
|
|
|
|
+ v-model="popoverVisible"
|
|
|
|
|
+ trigger="manual">
|
|
|
|
|
+ <el-table :data="feedbacks" border size="mini">
|
|
|
|
|
+ <el-table-column width="75" label="反馈状态">
|
|
|
|
|
+ <template slot-scope="temp">
|
|
|
|
|
+ <div>{{ getFeedbackTypeName(temp.row.feedbackType) }}</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column width="60" property="userName" label="反馈人"></el-table-column>
|
|
|
|
|
+ <el-table-column width="55" label="完成度">
|
|
|
|
|
+ <template slot-scope="temp">
|
|
|
|
|
+ <div>{{ temp.row.feedbackType === '4' ? '' : temp.row.value + '%' }}</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column width="60" prop="hours" label="工时(h)"></el-table-column>
|
|
|
|
|
+ <el-table-column width="110" property="createTime" label="反馈时间">
|
|
|
|
|
+ <template slot-scope="temp">
|
|
|
|
|
+ <div>{{ parseTime(temp.row.createTime) }}</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="反馈备注">
|
|
|
|
|
+ <template slot-scope="temp">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <span style="margin-right: 5px">{{ temp.row.description }}</span>
|
|
|
|
|
+ <span v-for="(file,index) in temp.row.fileList">
|
|
|
|
|
+ <a :href="file.url" style="color: darkgreen">
|
|
|
|
|
+ <span style="margin-left: 5px">{{ file.name }}</span>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="反馈详情" width="80px">
|
|
|
|
|
+ <template slot-scope="temp">
|
|
|
|
|
+ <el-popover
|
|
|
|
|
+ v-if="temp.row.descriptionDetail&&temp.row.descriptionDetail.length>0"
|
|
|
|
|
+ placement="top"
|
|
|
|
|
+ width="600"
|
|
|
|
|
+ trigger="hover">
|
|
|
|
|
+ <div v-html="temp.row.descriptionDetail"></div>
|
|
|
|
|
+ <el-button slot="reference"
|
|
|
|
|
+ type="text">详情
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </el-popover>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </el-popover>
|
|
|
|
|
+
|
|
|
<el-dialog title="反馈任务" :visible.sync="open" width="680px" class="feed-dialog" append-to-body @close="cancel">
|
|
<el-dialog title="反馈任务" :visible.sync="open" width="680px" class="feed-dialog" append-to-body @close="cancel">
|
|
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
|
|
<el-form-item label="任务名称">
|
|
<el-form-item label="任务名称">
|
|
@@ -176,7 +187,8 @@
|
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="计划工时" prop="planHours">
|
|
<el-form-item label="计划工时" prop="planHours">
|
|
|
- <el-input-number v-model="form.planHours" @change="hoursChange" :min="1" :step-strictly="true"
|
|
|
|
|
|
|
+ <el-input-number v-model="form.planHours" @change="hoursChange" :min="0.1" :step="0.1"
|
|
|
|
|
+ :step-strictly="true"
|
|
|
:controls="false"></el-input-number>
|
|
:controls="false"></el-input-number>
|
|
|
<span style="margin-left: 5px">小时</span>
|
|
<span style="margin-left: 5px">小时</span>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -189,23 +201,10 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
|
- <!-- <el-col :span="12">-->
|
|
|
|
|
- <!-- <el-form-item label="反馈类型" prop="feedbackType">-->
|
|
|
|
|
- <!-- <el-radio-group v-model="form.feedbackType" @input="feedbackTypeChange">-->
|
|
|
|
|
- <!-- <el-radio-->
|
|
|
|
|
- <!-- v-for="dict in dict.type.feedback_type"-->
|
|
|
|
|
- <!-- :key="dict.value"-->
|
|
|
|
|
- <!-- :label="dict.value"-->
|
|
|
|
|
- <!-- v-if="dict.value<3"-->
|
|
|
|
|
- <!-- >{{ dict.label }}-->
|
|
|
|
|
- <!-- </el-radio>-->
|
|
|
|
|
- <!-- </el-radio-group>-->
|
|
|
|
|
- <!-- </el-form-item>-->
|
|
|
|
|
- <!-- </el-col>-->
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="工作时长" prop="hours">
|
|
<el-form-item label="工作时长" prop="hours">
|
|
|
- <el-input-number v-model="form.hours" @change="hoursChange" :min="0.5" :step="0.5" :step-strictly="true"
|
|
|
|
|
- :controls="false"></el-input-number>
|
|
|
|
|
|
|
+ <el-input-number v-model="form.hours" @change="hoursChange" :min="0.1" :max="24" :step="0.1"
|
|
|
|
|
+ :step-strictly="true" :controls="false"></el-input-number>
|
|
|
<!-- <el-input v-model="form.hours" style="width: 130px"></el-input>-->
|
|
<!-- <el-input v-model="form.hours" style="width: 130px"></el-input>-->
|
|
|
<span style="margin-left: 5px">小时</span>
|
|
<span style="margin-left: 5px">小时</span>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -243,7 +242,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
- <el-dialog title="任务详情" :visible.sync="openDetail" width="70%" class="feed-dialog" append-to-body>
|
|
|
|
|
|
|
+ <el-dialog title="任务详情" :visible.sync="openDetail" width="70%" class="feed-dialog" :close-on-click-modal="true"
|
|
|
|
|
+ append-to-body>
|
|
|
<task-detail :detailForm="detailForm"></task-detail>
|
|
<task-detail :detailForm="detailForm"></task-detail>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
@@ -359,9 +359,9 @@ export default {
|
|
|
return callback();
|
|
return callback();
|
|
|
};
|
|
};
|
|
|
let validateHours = (rule, value, callback) => {
|
|
let validateHours = (rule, value, callback) => {
|
|
|
- const regex = /^(?:[0-1]?\d|2[0-4])(\.5)?$/;
|
|
|
|
|
- if (!regex.test(value) || value < 0 || value > 24) {
|
|
|
|
|
- return callback(new Error('工时必须为0到24的数,最小维度为0.5小时'));
|
|
|
|
|
|
|
+ // const regex = /^(?:[0-1]?\d|2[0-4])(\.\d)?$/;
|
|
|
|
|
+ if (value < 0 || value > 24) {
|
|
|
|
|
+ return callback(new Error('工时必须为0到24的数,最小维度为0.1小时'));
|
|
|
}
|
|
}
|
|
|
if (!value) {
|
|
if (!value) {
|
|
|
return callback(new Error('工时不能为空'));
|
|
return callback(new Error('工时不能为空'));
|
|
@@ -384,11 +384,15 @@ export default {
|
|
|
startDate: undefined,
|
|
startDate: undefined,
|
|
|
endDate: undefined,
|
|
endDate: undefined,
|
|
|
status: '0',
|
|
status: '0',
|
|
|
|
|
+ priority: undefined,
|
|
|
userId: undefined
|
|
userId: undefined
|
|
|
},
|
|
},
|
|
|
|
|
+ loading: true,
|
|
|
projectTree: [],
|
|
projectTree: [],
|
|
|
tableHeaders: [],
|
|
tableHeaders: [],
|
|
|
tableData: [],
|
|
tableData: [],
|
|
|
|
|
+ popoverVisible: false,
|
|
|
|
|
+
|
|
|
open: false,
|
|
open: false,
|
|
|
form: {},
|
|
form: {},
|
|
|
feedbacks: [],
|
|
feedbacks: [],
|
|
@@ -453,24 +457,10 @@ export default {
|
|
|
listView(this.queryParams).then(res => {
|
|
listView(this.queryParams).then(res => {
|
|
|
this.tableHeaders = res.data.headers
|
|
this.tableHeaders = res.data.headers
|
|
|
this.tableData = res.data.data
|
|
this.tableData = res.data.data
|
|
|
|
|
+ this.loading = false
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- cellMouseEnter(row, column, cell, event) {
|
|
|
|
|
- if (column.property != 'taskName') {
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- cell.style.color = '#306FB1';
|
|
|
|
|
- cell.style.cursor = 'pointer';
|
|
|
|
|
- cell.style.textDecoration = 'underline';
|
|
|
|
|
- },
|
|
|
|
|
- cellMouseLeave(row, column, cell, event) {
|
|
|
|
|
- if (column.property != 'taskName') {
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- cell.style.color = '#606266';
|
|
|
|
|
- cell.style.textDecoration = 'none';
|
|
|
|
|
- },
|
|
|
|
|
cellStyle({row, column, rowIndex, columnIndex}) {
|
|
cellStyle({row, column, rowIndex, columnIndex}) {
|
|
|
let style = {
|
|
let style = {
|
|
|
// fontSize: '12px',
|
|
// fontSize: '12px',
|
|
@@ -483,21 +473,33 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
cellClick(row, column, cell, event) {
|
|
cellClick(row, column, cell, event) {
|
|
|
- if (!row[column.property].value || row[column.property].value === '') {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- let date = row[column.property].date
|
|
|
|
|
- if (DateUtil.unix(date) > DateUtil.unix()) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- getFeedbackList(row.id, date).then(res => {
|
|
|
|
|
- this.feedbacks = res.data.map(item => {
|
|
|
|
|
- item['executor'] = row.executor
|
|
|
|
|
- return item
|
|
|
|
|
|
|
+ this.popoverVisible = false;
|
|
|
|
|
+ clearTimeout(this.clickTimer);
|
|
|
|
|
+ this.clickTimer = setTimeout(() => {
|
|
|
|
|
+ if (!row[column.property].value || row[column.property].value === '') {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ let date = row[column.property].date
|
|
|
|
|
+ if (DateUtil.unix(date) > DateUtil.unix()) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ getFeedbackList(row.id, date).then(res => {
|
|
|
|
|
+ this.feedbacks = res.data.map(item => {
|
|
|
|
|
+ item['executor'] = row.executor
|
|
|
|
|
+ return item
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
- })
|
|
|
|
|
|
|
+ this.$refs.popover.doDestroy(true);
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$refs.popover.referenceElm = event.target;
|
|
|
|
|
+ this.popoverVisible = true;
|
|
|
|
|
+ });
|
|
|
|
|
+ }, 300)
|
|
|
},
|
|
},
|
|
|
cellDbClick(row, column, cell, event) {
|
|
cellDbClick(row, column, cell, event) {
|
|
|
|
|
+ clearTimeout(this.clickTimer);
|
|
|
|
|
+ this.popoverVisible = false;
|
|
|
|
|
+ this.$refs.popover.doDestroy(true);
|
|
|
let feedbackDate = DateUtil.getFeedBackDate(this.queryParams.startDate, this.queryParams.endDate, column.property)
|
|
let feedbackDate = DateUtil.getFeedBackDate(this.queryParams.startDate, this.queryParams.endDate, column.property)
|
|
|
if (DateUtil.unix(feedbackDate) > DateUtil.unix()) {
|
|
if (DateUtil.unix(feedbackDate) > DateUtil.unix()) {
|
|
|
this.$message.warning("反馈时间不能超过:" + DateUtil.day())
|
|
this.$message.warning("反馈时间不能超过:" + DateUtil.day())
|
|
@@ -617,7 +619,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
hoursChange() {
|
|
hoursChange() {
|
|
|
- let planHours = Number.parseInt(this.form.planHours)
|
|
|
|
|
|
|
+ let planHours = Number.parseFloat(this.form.planHours)
|
|
|
let hours = Number.parseFloat(this.form.hours)
|
|
let hours = Number.parseFloat(this.form.hours)
|
|
|
if (planHours && hours) {
|
|
if (planHours && hours) {
|
|
|
let feedbackHours = Number.parseFloat(this.form.feedbackHours)
|
|
let feedbackHours = Number.parseFloat(this.form.feedbackHours)
|