优化
This commit is contained in:
parent
cba97c61ff
commit
8a079a19a2
@ -1,73 +0,0 @@
|
|||||||
const elTransition = '0.3s height ease-in-out, 0.3s padding-top ease-in-out, 0.3s padding-bottom ease-in-out'
|
|
||||||
const Transition = {
|
|
||||||
'before-enter' (el) {
|
|
||||||
el.style.transition = elTransition
|
|
||||||
if (!el.dataset) el.dataset = {}
|
|
||||||
|
|
||||||
el.dataset.oldPaddingTop = el.style.paddingTop
|
|
||||||
el.dataset.oldPaddingBottom = el.style.paddingBottom
|
|
||||||
|
|
||||||
el.style.height = 0
|
|
||||||
el.style.paddingTop = 0
|
|
||||||
el.style.paddingBottom = 0
|
|
||||||
},
|
|
||||||
|
|
||||||
'enter' (el) {
|
|
||||||
el.dataset.oldOverflow = el.style.overflow
|
|
||||||
if (el.scrollHeight !== 0) {
|
|
||||||
el.style.height = el.scrollHeight + 'px'
|
|
||||||
el.style.paddingTop = el.dataset.oldPaddingTop
|
|
||||||
el.style.paddingBottom = el.dataset.oldPaddingBottom
|
|
||||||
} else {
|
|
||||||
el.style.height = ''
|
|
||||||
el.style.paddingTop = el.dataset.oldPaddingTop
|
|
||||||
el.style.paddingBottom = el.dataset.oldPaddingBottom
|
|
||||||
}
|
|
||||||
|
|
||||||
el.style.overflow = 'hidden'
|
|
||||||
},
|
|
||||||
|
|
||||||
'after-enter' (el) {
|
|
||||||
el.style.transition = ''
|
|
||||||
el.style.height = ''
|
|
||||||
el.style.overflow = el.dataset.oldOverflow
|
|
||||||
},
|
|
||||||
|
|
||||||
'before-leave' (el) {
|
|
||||||
if (!el.dataset) el.dataset = {}
|
|
||||||
el.dataset.oldPaddingTop = el.style.paddingTop
|
|
||||||
el.dataset.oldPaddingBottom = el.style.paddingBottom
|
|
||||||
el.dataset.oldOverflow = el.style.overflow
|
|
||||||
|
|
||||||
el.style.height = el.scrollHeight + 'px'
|
|
||||||
el.style.overflow = 'hidden'
|
|
||||||
},
|
|
||||||
|
|
||||||
'leave' (el) {
|
|
||||||
if (el.scrollHeight !== 0) {
|
|
||||||
el.style.transition = elTransition
|
|
||||||
el.style.height = 0
|
|
||||||
el.style.paddingTop = 0
|
|
||||||
el.style.paddingBottom = 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
'after-leave' (el) {
|
|
||||||
el.style.transition = ''
|
|
||||||
el.style.height = ''
|
|
||||||
el.style.overflow = el.dataset.oldOverflow
|
|
||||||
el.style.paddingTop = el.dataset.oldPaddingTop
|
|
||||||
el.style.paddingBottom = el.dataset.oldPaddingBottom
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'collapseTransition',
|
|
||||||
functional: true,
|
|
||||||
render (h, { children }) {
|
|
||||||
const data = {
|
|
||||||
on: Transition
|
|
||||||
}
|
|
||||||
return h('transition', data, children)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -18,12 +18,11 @@
|
|||||||
:name="String(i.id)">
|
:name="String(i.id)">
|
||||||
<div class="goals-content-tabbar-table">
|
<div class="goals-content-tabbar-table">
|
||||||
<div class="goals-content-tabbar-table-header commonFont">
|
<div class="goals-content-tabbar-table-header commonFont">
|
||||||
<span style="width:20%">指标名称</span>
|
<span style="flex:1 0 auto;">指标名称</span>
|
||||||
<span class="kaohe"
|
<span class="kaohe"
|
||||||
style="width:30%">考核标准</span>
|
style="flex:1 0 auto;">考核标准</span>
|
||||||
<span style="width:20%">进度</span>
|
<span style="flex:1 0 auto;">权重</span>
|
||||||
<span style="width:10%">权重</span>
|
<span style="width:240px;">操作</span>
|
||||||
<span style="width:20%">操作</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div style="justify-content:center;"
|
<div style="justify-content:center;"
|
||||||
v-if="handleFilter(i.detailDtos).length===0"
|
v-if="handleFilter(i.detailDtos).length===0"
|
||||||
@ -36,25 +35,19 @@
|
|||||||
v-for="(j,indexJ) in handleFilter(i.detailDtos)"
|
v-for="(j,indexJ) in handleFilter(i.detailDtos)"
|
||||||
:key="indexJ">
|
:key="indexJ">
|
||||||
<div class="goals-content-tabbar-table-content-top">
|
<div class="goals-content-tabbar-table-content-top">
|
||||||
<div style="width:20%"
|
<div style="flex:1 0 auto;"
|
||||||
class="my-handle"><img style="width:20px;height:20px;"
|
class="my-handle"><img style="width:20px;height:20px;"
|
||||||
src="@/assets/img/yidong.png"
|
src="@/assets/img/yidong.png"
|
||||||
alt="">{{j.target}}</div>
|
alt="">{{j.target}}</div>
|
||||||
<div style="width:30%"
|
<div style="flex:1 0 auto;"
|
||||||
class="kaohe">
|
class="kaohe">
|
||||||
<pre>{{j.keyResult}}</pre>
|
<pre>{{j.keyResult}}</pre>
|
||||||
</div>
|
</div>
|
||||||
<div style="width:20%">
|
<div style="flex:1 0 auto;">{{ Math.round((j.checkWeight * 100)*1000)/1000}}%</div>
|
||||||
<el-progress type="circle"
|
<div style="width:240px;">
|
||||||
:width='40'
|
|
||||||
:stroke-width='4'
|
|
||||||
:percentage="handleGetProgress(j,j.taskDtos)"></el-progress>
|
|
||||||
</div>
|
|
||||||
<div style="width:10%">{{ Math.round((j.checkWeight * 100)*1000)/1000}}%</div>
|
|
||||||
<div style="width:20%">
|
|
||||||
<el-button @click="hanidleAddTask(j,0)"
|
<el-button @click="hanidleAddTask(j,0)"
|
||||||
type="text"
|
type="primary" plain
|
||||||
size="small">
|
size="mini">
|
||||||
添加任务
|
添加任务
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="hanidleEdit(j,indexJ,index)"
|
<el-button @click="hanidleEdit(j,indexJ,index)"
|
||||||
@ -62,7 +55,7 @@
|
|||||||
size="small">
|
size="small">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="handleDelateWeidu(j,indexJ,index)"
|
<el-button style="color:#F56C6C;" @click="handleDelateWeidu(j,indexJ,index)"
|
||||||
type="text"
|
type="text"
|
||||||
size="small">
|
size="small">
|
||||||
删除
|
删除
|
||||||
@ -72,14 +65,20 @@
|
|||||||
<div v-for="(kitem,indexK) in handleFilter(j.taskDtos)"
|
<div v-for="(kitem,indexK) in handleFilter(j.taskDtos)"
|
||||||
:key="indexK"
|
:key="indexK"
|
||||||
class="goals-content-tabbar-table-content-bottom">
|
class="goals-content-tabbar-table-content-bottom">
|
||||||
<div>{{kitem.name}}({{Math.round((kitem.processRate * 100)*1000)/1000|| 0}}%)</div>
|
<div>任务{{indexK+1}}:{{kitem.name.length>16?kitem.name.substring(0,12):kitem.name}}(当前进度:{{Math.round((kitem.processRate * 100)*1000)/1000|| 0}}%)</div>
|
||||||
<div style="width:10%">
|
<div style="width:240px;padding: 0 0 0 20px;">
|
||||||
|
<el-button style="visibility:hidden;"
|
||||||
|
type="primary" plain
|
||||||
|
size="mini">
|
||||||
|
添加任务
|
||||||
|
</el-button>
|
||||||
<el-button type="text"
|
<el-button type="text"
|
||||||
@click="hanidleAddTask(j,1,kitem)"
|
@click="hanidleAddTask(j,1,kitem)"
|
||||||
size="small">
|
size="small">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="text"
|
<el-button type="text"
|
||||||
|
style="color:#F56C6C;"
|
||||||
@click="handleDeleteTask(j,kitem)"
|
@click="handleDeleteTask(j,kitem)"
|
||||||
size="small">
|
size="small">
|
||||||
删除
|
删除
|
||||||
@ -94,7 +93,7 @@
|
|||||||
业务指标权重:{{handleGetWeight(i)}}% <span v-if="i.weight !== null">/{{Math.round((i.weight * 100)*1000)/1000}}%</span>
|
业务指标权重:{{handleGetWeight(i)}}% <span v-if="i.weight !== null">/{{Math.round((i.weight * 100)*1000)/1000}}%</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
所有指标总权重: {{ handleGetWeight1()}}%
|
所有指标总权重: <span style="color:#EE6723;">{{ handleGetWeight1()}}%</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style=" padding: 10px;">
|
<div style=" padding: 10px;">
|
||||||
@ -139,6 +138,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
<el-button slot="footer"
|
||||||
|
@click="handleSubmitTask(1)"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
>确定并继续添加</el-button>
|
||||||
</popup-right>
|
</popup-right>
|
||||||
<popup-right v-if="showIndicators"
|
<popup-right v-if="showIndicators"
|
||||||
@cancel='handleCancelZhibiao'
|
@cancel='handleCancelZhibiao'
|
||||||
@ -298,7 +302,7 @@ export default {
|
|||||||
this.showTask = false
|
this.showTask = false
|
||||||
},
|
},
|
||||||
// 提交添加任务
|
// 提交添加任务
|
||||||
handleSubmitTask () {
|
handleSubmitTask (type) {
|
||||||
this.$refs.formTask.validate((v) => {
|
this.$refs.formTask.validate((v) => {
|
||||||
if (v) {
|
if (v) {
|
||||||
this.formTask.processRate = Number(this.formTask.processRate) / 100
|
this.formTask.processRate = Number(this.formTask.processRate) / 100
|
||||||
@ -310,7 +314,11 @@ export default {
|
|||||||
this.editItem.processRate = this.formTask.processRate || '0'
|
this.editItem.processRate = this.formTask.processRate || '0'
|
||||||
}
|
}
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
this.handleCancelTask()
|
if (!type) this.handleCancelTask()
|
||||||
|
this.formTask = {
|
||||||
|
name: '',
|
||||||
|
processRate: '0'
|
||||||
|
}
|
||||||
console.log(this.formTask)
|
console.log(this.formTask)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -520,6 +528,9 @@ export default {
|
|||||||
|
|
||||||
<style lang='less' scoped>
|
<style lang='less' scoped>
|
||||||
.goals {
|
.goals {
|
||||||
|
span,div{
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
.kaohe {
|
.kaohe {
|
||||||
flex: none;
|
flex: none;
|
||||||
width: 500px;
|
width: 500px;
|
||||||
@ -601,6 +612,7 @@ export default {
|
|||||||
&-content {
|
&-content {
|
||||||
// align-items: center;
|
// align-items: center;
|
||||||
// height: 60px;
|
// height: 60px;
|
||||||
|
border-bottom: 1px solid @borderColor;
|
||||||
&-top {
|
&-top {
|
||||||
border-bottom: 1px solid @borderColor;
|
border-bottom: 1px solid @borderColor;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -612,9 +624,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-bottom {
|
&-bottom {
|
||||||
padding: 10px 20px 10px 0;
|
font-size: 10px;
|
||||||
border-bottom: 1px solid @borderColor;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
color:#999999;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin: 0 0 0 20px;
|
margin: 0 0 0 20px;
|
||||||
|
|||||||
@ -39,17 +39,17 @@
|
|||||||
</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"
|
||||||
@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">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input> -->
|
</el-input>
|
||||||
<br />
|
<!-- <br />
|
||||||
<el-slider
|
<el-slider
|
||||||
v-model="form.processRate"
|
v-model="form.processRate"
|
||||||
:step="10">
|
:step="10">
|
||||||
</el-slider>
|
</el-slider> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer"
|
<div slot="footer"
|
||||||
|
|||||||
@ -53,7 +53,7 @@
|
|||||||
查看任务
|
查看任务
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="kaohe pre">
|
<div class="kaohe pre" style="justify-content: flex-start;">
|
||||||
<pre>
|
<pre>
|
||||||
{{i.keyResult}}
|
{{i.keyResult}}
|
||||||
</pre>
|
</pre>
|
||||||
@ -312,6 +312,7 @@ export default {
|
|||||||
return '总分:' + (this.scoreList.filter(i => i.minScore <= result && i.maxScore > result).length > 0 ? this.scoreList.filter(i => i.minScore <= result && i.maxScore > result)[0].name : '--')
|
return '总分:' + (this.scoreList.filter(i => i.minScore <= result && i.maxScore > result).length > 0 ? this.scoreList.filter(i => i.minScore <= result && i.maxScore > result)[0].name : '--')
|
||||||
},
|
},
|
||||||
handleGetScorlList (list) {
|
handleGetScorlList (list) {
|
||||||
|
if (!list) list = []
|
||||||
console.log('list: ', list)
|
console.log('list: ', list)
|
||||||
console.log('userInfo: ', this.userInfo.userId)
|
console.log('userInfo: ', this.userInfo.userId)
|
||||||
return list.filter(i => i.acquireScore !== null || (i.approvalId === this.userInfo.userId && this.tableInfo.score))
|
return list.filter(i => i.acquireScore !== null || (i.approvalId === this.userInfo.userId && this.tableInfo.score))
|
||||||
@ -394,6 +395,7 @@ export default {
|
|||||||
padding: 10px !important;
|
padding: 10px !important;
|
||||||
display: block;
|
display: block;
|
||||||
.center();
|
.center();
|
||||||
|
justify-content: center;
|
||||||
pre {
|
pre {
|
||||||
white-space: pre-line;
|
white-space: pre-line;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user