This commit is contained in:
xiongchengqiang 2020-12-15 17:09:03 +08:00
parent 3bb130eac1
commit 4b59f3956e
2 changed files with 35 additions and 13 deletions

View File

@ -22,7 +22,7 @@
#</span></div> #</span></div>
<div v-if="!isJilu" style="font-size:12px;">{{i.gmtCreate}}</div> <div v-if="!isJilu" style="font-size:12px;">{{i.gmtCreate}}</div>
</div> </div>
<div class="pinglunTem-right-content pre"> <div class="pinglunTem-right-content pre" :style="{background:(background&&(i.useType !== 0 && i.taskName))?background:'#cfe5fc'}">
<div v-if="i.useType !== 0 && i.taskName" class="content-top"> <div v-if="i.useType !== 0 && i.taskName" class="content-top">
评论 {{i.taskName}} 评论 {{i.taskName}}
</div> </div>
@ -46,6 +46,10 @@ export default {
isJilu: { isJilu: {
type: Boolean, type: Boolean,
default: false default: false
},
background: {
type: String,
default: '#cfe5fc'
} }
}, },
// 12 3 // 12 3
@ -71,6 +75,8 @@ export default {
<style lang='less' scoped> <style lang='less' scoped>
.pinglunTem { .pinglunTem {
max-height: 300px;
overflow: auto;
.pingcontent:first-child{ .pingcontent:first-child{
margin-top: 10px; margin-top: 10px;
} }
@ -121,13 +127,12 @@ export default {
margin-bottom: 10px; margin-bottom: 10px;
} }
&-content { &-content {
border: 1px solid #bdd7f4; border: 1px solid #eff4fa;
background: #cfe5fc;
border-radius: 0 6px 6px 6px; border-radius: 0 6px 6px 6px;
color: #313841; color: #313841;
font-size: 12px; font-size: 12px;
max-width: 400px; max-width: 400px;
padding: 4px 6px; padding: 8px 6px;
} }
.beizhu { .beizhu {
margin-left: 10px; margin-left: 10px;
@ -137,6 +142,7 @@ export default {
} }
.content-top{ .content-top{
padding: 4px 0; padding: 4px 0;
margin-bottom: 6px;
border-bottom: 1px solid rgba(200, 200, 200,0.6); border-bottom: 1px solid rgba(200, 200, 200,0.6);
} }
.position{ .position{

View File

@ -9,7 +9,7 @@
<div class="drawer-content-left"> <div class="drawer-content-left">
<div class="drawer-content-left-jiaoyi"> <div class="drawer-content-left-jiaoyi">
<div class="title"> <div class="title">
<span>名称{{(taskInfo.target && taskInfo.target.length>10)?(taskInfo.target.substring(0,8)+'...'):taskInfo.target}}</span> <span>名称: {{(taskInfo.target && taskInfo.target.length>10)?(taskInfo.target.substring(0,8)+'...'):taskInfo.target}}</span>
</div> </div>
<div class="process"> <div class="process">
<span> <span>
@ -30,17 +30,21 @@
<div style="padding:20px;"> <div style="padding:20px;">
<el-form :model="form" <el-form :model="form"
ref="form" ref="form"
label-width="80px"
:rules="formRules"> :rules="formRules">
<el-form-item prop="name" <el-form-item prop="name"
label='任务名称'> label='任务名称'>
<el-input clearable <el-input clearable
type="textarea"
:row='2'
size="small" size="small"
placeholder="请输入任务名称" placeholder="请输入任务名称"
v-model="form.name"></el-input> v-model="form.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="任务进度:" <el-form-item label="任务进度"
prop="weight"> prop="weight">
<el-input size="small" <el-input size="small"
style="width:200px;"
@blur="$handleBlur('form.processRate')" @blur="$handleBlur('form.processRate')"
@input.native="$handleInputInt('form.processRate')" @input.native="$handleInputInt('form.processRate')"
v-model="form.processRate"> v-model="form.processRate">
@ -66,14 +70,16 @@
<div v-for="(i,index) in handleFilter(taskInfo.resultTasks)" <div v-for="(i,index) in handleFilter(taskInfo.resultTasks)"
:key="i.id" :key="i.id"
class="boderAndRadius drawer-content-left-content"> class="boderAndRadius drawer-content-left-content">
<div :style="{border:!(!i.updateProcess && i.label)?'none':''}" <div :style="{border:!(!i.showTask)?'none':''}"
class="drawer-content-left-content-top"> class="drawer-content-left-content-top">
<div class="drawer-content-left-content-top-process"> <div class="drawer-content-left-content-top-process">
<div>
<el-progress type="circle" <el-progress type="circle"
:width='50' :width='50'
:stroke-width='4' :stroke-width='4'
:percentage="Math.round((i.processRate * 100)*1000)/1000 "></el-progress> :percentage="Math.round((i.processRate * 100)*1000)/1000 "></el-progress>
<div style="margin-left:10px;"> </div>
<div style="margin:0 30px 0 10px;">
<span v-if="!i.editProcess">KR{{index+1}} : {{i.name}}</span> <span v-if="!i.editProcess">KR{{index+1}} : {{i.name}}</span>
<el-input v-if="i.editProcess" <el-input v-if="i.editProcess"
size="small" size="small"
@ -152,6 +158,7 @@
</div> </div>
</div> </div>
<pinglun v-if="i.showTask" <pinglun v-if="i.showTask"
background='#fff'
:pinglunList='i.taskList' /> :pinglunList='i.taskList' />
</div> </div>
<div v-if="i.updateProcess" <div v-if="i.updateProcess"
@ -166,6 +173,7 @@
:step="10"> :step="10">
</el-slider> --> </el-slider> -->
<el-input size="small" <el-input size="small"
style="width:200px;"
@blur="$handleBlur('form.processRate')" @blur="$handleBlur('form.processRate')"
@input.native="$handleInputInt('form.processRate')" @input.native="$handleInputInt('form.processRate')"
v-model="form.processRate"> v-model="form.processRate">
@ -420,6 +428,7 @@ export default {
this.$forceUpdate() this.$forceUpdate()
return return
} }
const params = { const params = {
currPage: 1, currPage: 1,
taskId: i.id, taskId: i.id,
@ -431,6 +440,11 @@ export default {
this.$message.error(res.msg) this.$message.error(res.msg)
return return
} }
this.taskInfo.resultTasks.map(j => {
j.updateProcess = false
j.editProcess = false
j.showTask = false
})
i.showTask = true i.showTask = true
i.taskList = res.data.list i.taskList = res.data.list
this.$forceUpdate() this.$forceUpdate()
@ -626,20 +640,22 @@ export default {
box-shadow: 0 1px 6px 0 rgba(0,0,0,.12), 0 1px 6px 0 rgba(0,0,0,.12); box-shadow: 0 1px 6px 0 rgba(0,0,0,.12), 0 1px 6px 0 rgba(0,0,0,.12);
&-top { &-top {
display: flex; display: flex;
align-content: center; // align-content: center;
justify-content: space-between; justify-content: space-between;
border-bottom: 1px solid @borderColor; border-bottom: 1px solid @borderColor;
margin: 20px 20px 0; margin: 20px 20px 0;
padding-bottom: 12px; padding-bottom: 12px;
&-process { &-process {
display: flex; display: flex;
align-content: center; // align-content: center;
> div { > div {
.center();
// .center();
} }
} }
.right { .right {
.center(); // .center();
font-size: 16px;
&-item { &-item {
cursor: pointer; cursor: pointer;
border: 1px solid @borderColor; border: 1px solid @borderColor;