优化
This commit is contained in:
parent
37aec0cb45
commit
f0364f3cbf
@ -18,6 +18,7 @@
|
||||
.pre{
|
||||
line-height: 20px;
|
||||
pre{
|
||||
overflow:hidden;
|
||||
line-height: 20px;
|
||||
// white-space:pre-line;
|
||||
// word-wrap: break-word;
|
||||
|
||||
@ -26,9 +26,8 @@
|
||||
<div v-if="i.useType !== 0 && i.taskName" class="content-top">
|
||||
评论 「{{i.taskName}}」
|
||||
</div>
|
||||
<pre>
|
||||
{{i.label}}
|
||||
</pre>
|
||||
<span v-for="i in _.compact(i.atStaffNames.split(','))" :key="i" style="color:#09f;">@{{i}} </span>
|
||||
<span v-html="remark(i.label)"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -59,7 +58,11 @@ export default {
|
||||
},
|
||||
beforeMount () { },
|
||||
mounted () { },
|
||||
methods: {},
|
||||
methods: {
|
||||
remark (str) {
|
||||
return str.split('\n').join('<br/>')
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<div class="drawer-content-left">
|
||||
<div class="drawer-content-left-jiaoyi">
|
||||
<div class="title">
|
||||
<span>名称:{{taskInfo.target.length>10?(taskInfo.target.substring(0,4)+'...'):taskInfo.target}}</span>
|
||||
<span>名称:{{(taskInfo.target && taskInfo.target.length>10)?(taskInfo.target.substring(0,4)+'...'):taskInfo.target}}</span>
|
||||
</div>
|
||||
<div class="process">
|
||||
<span>
|
||||
@ -174,22 +174,42 @@
|
||||
|
||||
</div>
|
||||
<div class="pinglun-bottom">
|
||||
<div v-if="pinglunForm.id" class="pinglun-bottom-content top">
|
||||
<div>评论KR:「{{pinglunForm.name}}」</div>
|
||||
<i @click="pinglunForm={}" style="font-size:20px;" class="el-icon-circle-close"> </i>
|
||||
<div v-if="staffList.list.length>0" class="pinglun-bottom-content top">
|
||||
<div v-if="staffList.list.length>0">
|
||||
<el-tag
|
||||
size="mini"
|
||||
style="margin:2px 4px;"
|
||||
v-for="tag in staffList.list"
|
||||
:key="tag.staffId"
|
||||
@close="handleCloseItem(tag)"
|
||||
closable>
|
||||
{{tag.name}}
|
||||
</el-tag>
|
||||
</div>
|
||||
<div class="pinglun-bottom-content">
|
||||
<i @click="staffList.list=[]" style="font-size:20px;" class="el-icon-circle-close"> </i>
|
||||
</div>
|
||||
<div v-if="pinglunForm.id" class="pinglun-bottom-content top">
|
||||
<div v-if="pinglunForm.id">评论KR:「{{pinglunForm.name}}」</div>
|
||||
<i @click="handleCloseAll" style="font-size:20px;" class="el-icon-circle-close"> </i>
|
||||
</div>
|
||||
<div class="pinglun-bottom-content" style=" flex-direction: column;">
|
||||
<el-input type="textarea"
|
||||
clearable
|
||||
ref="input"
|
||||
|
||||
placeholder="请输入评论内容。。。"
|
||||
v-model="form.content"></el-input>
|
||||
<div class="button">
|
||||
<div class="left">
|
||||
<span class="at" @click="handleAtSomeOne">@</span>
|
||||
</div>
|
||||
<el-button size="small"
|
||||
@click="handleSendPingLun"
|
||||
type="primary">发送</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="activeName==='2'"
|
||||
class="drawer-content-right-item jilu">
|
||||
<pinglun :isJilu='true' :pinglunList='pinglunList' />
|
||||
@ -227,12 +247,14 @@
|
||||
@click="handleEditTask(3)">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<getPersonnel @cb='handleCheckStaffIds' v-if="isShow" :value.sync='form.ids' :isShow.sync='isShow' :showDataList.sync='staffList'/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import InfoHeader from '@/components/InfoHeader'
|
||||
import pinglun from './pinglun.vue'
|
||||
import getPersonnel from '@/components/getPersonnel'
|
||||
|
||||
import { apiDeleteTask, apiEditTask, apiChangeTaskList, apiTaskCommentList, apiAddTaskComment } from '@/api/assessment'
|
||||
|
||||
@ -245,12 +267,18 @@ export default {
|
||||
taskObj: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
return {
|
||||
target: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
isShow: false,
|
||||
staffList: {
|
||||
list: []
|
||||
},
|
||||
taskInfo: {},
|
||||
activeName: '1',
|
||||
formRules: {
|
||||
@ -273,7 +301,7 @@ export default {
|
||||
defaultImg: 'this.src="' + require('@/assets/img/default.jpg') + '"'
|
||||
}
|
||||
},
|
||||
components: { pinglun, InfoHeader },
|
||||
components: { pinglun, InfoHeader, getPersonnel },
|
||||
computed: {},
|
||||
beforeMount () { },
|
||||
mounted () {
|
||||
@ -283,6 +311,24 @@ export default {
|
||||
console.log(this.taskInfo)
|
||||
},
|
||||
methods: {
|
||||
handleAtSomeOne () {
|
||||
this.isShow = true
|
||||
},
|
||||
handleCloseAll () {
|
||||
this.pinglunForm = {}
|
||||
},
|
||||
handleCheckStaffIds (list) {
|
||||
console.log('🚀 ~ file: process.vue ~ line 321 ~ handleCheckStaffIds ~ list', list)
|
||||
this.staffList = list
|
||||
this.isShow = false
|
||||
this.$nextTick(() => {
|
||||
const pingList = this.$refs.pingList
|
||||
pingList.scrollTop = pingList.scrollHeight
|
||||
})
|
||||
},
|
||||
handleCloseItem (item) {
|
||||
this.staffList.list = this.staffList.list.filter(i => i !== item)
|
||||
},
|
||||
async handleGetPingLunList () {
|
||||
const params = {
|
||||
currPage: 1,
|
||||
@ -290,7 +336,6 @@ export default {
|
||||
pageSize: 2300
|
||||
}
|
||||
let res = await apiTaskCommentList(params)
|
||||
|
||||
if (res.code !== 200) {
|
||||
this.$message.error(res.msg)
|
||||
return
|
||||
@ -303,15 +348,16 @@ export default {
|
||||
},
|
||||
// 发送评论
|
||||
async handleSendPingLun (event) {
|
||||
const str = this.staffList.list.map(i => i.staffId).join(',')
|
||||
let params = {}
|
||||
// debugger
|
||||
if (!this.form.content) return
|
||||
params.content = this.form.content
|
||||
if (str) params.atStaffIds = str
|
||||
params[this.pinglunForm.id ? 'taskId' : 'detailId'] = this.pinglunForm.id ? this.pinglunForm.id : this.taskInfo.detailId
|
||||
let res = await apiAddTaskComment(params)
|
||||
if (res.code !== 200) {
|
||||
this.$message.error(res.msg)
|
||||
return
|
||||
}
|
||||
this.handleGetPingLunList()
|
||||
this.form.content = ''
|
||||
@ -602,12 +648,27 @@ export default {
|
||||
&-content{
|
||||
padding: 6px 8px;
|
||||
display: flex;
|
||||
|
||||
background: #fff;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
i{
|
||||
cursor: pointer;
|
||||
}
|
||||
.button{
|
||||
padding: 6px 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
.left{
|
||||
flex: 1 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.at{
|
||||
padding: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
textarea {
|
||||
resize: none;
|
||||
@ -618,7 +679,7 @@ export default {
|
||||
|
||||
}
|
||||
.el-button--small {
|
||||
height: 46px;
|
||||
height: 30px;
|
||||
margin: 0 0 0 6px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,8 +80,8 @@ export default {
|
||||
if (this.templateForm.modelItems.length === 0) {
|
||||
return this.$message.error('请填写考核维度')
|
||||
}
|
||||
const arr = this.processInfo.ScoreInfo.chartDetails.recordSimpleDtos
|
||||
if (arr.length > 0) {
|
||||
const arr = this.processInfo.ScoreInfo.chartDetails.recordSimpleDtos.filter(i => i.isDelete !== 1)
|
||||
if (arr.length > 0 && this.processInfo.ScoreInfo.chartDetails.status === 1) {
|
||||
if (arr.some(i => Number(i.weight) === 0)) {
|
||||
return this.$message.error('权重设置不能为0!')
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user