This commit is contained in:
熊成强 2020-11-12 17:07:13 +08:00
parent 07fe51032d
commit 8952f1a97d
2 changed files with 10 additions and 9 deletions

View File

@ -6,7 +6,7 @@
<div class="itemH"> <div class="itemH">
<div v-if="i.id !==9999" @click="handleClick(i)" class="ProcessList-top-item-contant commonFont" :class="{active:i.isCick}"> <div v-if="i.id !==9999" @click="handleClick(i)" class="ProcessList-top-item-contant commonFont" :class="{active:i.isCick}">
<span>{{i.name}}</span> <span>{{i.name}}</span>
<span style="font-size:12px;">{{i.label}}</span> <span style="font-size:12px;">{{i.label || "---"}}</span>
<i @click.stop="handleDelete(i)" class="el-icon-close close"></i> <i @click.stop="handleDelete(i)" class="el-icon-close close"></i>
</div> </div>
<div v-if="index+1!==list.length && list.length!==0" class="process-title-item-img"> <div v-if="index+1!==list.length && list.length!==0" class="process-title-item-img">
@ -128,14 +128,16 @@ export default {
computed: {}, computed: {},
beforeMount () {}, beforeMount () {},
mounted () { mounted () {
this.list = this.handleListFor(this.info) this.list = [].concat(this.handleListFor(this.info))
this.$forceUpdate()
}, },
methods: { methods: {
// //
handleListFor (list) { handleListFor (list) {
if (list.length === 0) return [] if (list.length === 0) return []
list = list.map(i => { list = list.map(i => {
i.weight1 = i.weight * 100 i.weight1 = Math.round((i.weight * 100) * 1000) / 1000
i.label = '权重评分:' + i.weight1 + '%'
i.isShow = false i.isShow = false
i = Object.assign({}, this.handleOptType(i), i) i = Object.assign({}, this.handleOptType(i), i)
i.isActive = i.optType === 0 ? 0 : 1 i.isActive = i.optType === 0 ? 0 : 1
@ -146,6 +148,9 @@ export default {
return i return i
}) })
const arr = JSON.parse(JSON.stringify(list)) const arr = JSON.parse(JSON.stringify(list))
arr.map(i => {
i.isCick = false
})
arr[0].isCick = true arr[0].isCick = true
this.itemInfo = arr[0] this.itemInfo = arr[0]
return arr return arr
@ -174,10 +179,8 @@ export default {
// itemInfo.list.list.length===0?(itemInfo.list.title + '' + itemInfo.list.list.length + '' ):"" // itemInfo.list.list.length===0?(itemInfo.list.title + '' + itemInfo.list.list.length + '' ):""
}, },
handleChang (item) { handleChang (item) {
console.log('item: ', item)
}, },
handleChoose (item) { handleChoose (item) {
console.log('item: ', item)
this.itemInfo.isShow = true this.itemInfo.isShow = true
this.$forceUpdate() this.$forceUpdate()
}, },
@ -190,7 +193,6 @@ export default {
}) })
item.isCick = true item.isCick = true
this.itemInfo = item this.itemInfo = item
console.log('this.itemInfo: ', this.itemInfo)
this.$forceUpdate() this.$forceUpdate()
}, },
// //
@ -297,7 +299,6 @@ export default {
} else { } else {
n.label = '' n.label = ''
} }
console.log('n777: ', n)
this.$forceUpdate() this.$forceUpdate()
// n.roleIds = '' // n.roleIds = ''
// n.roleDtos.map(i => { // n.roleDtos.map(i => {

View File

@ -73,7 +73,7 @@
所含指标数量 {{i.maxCount}} 所含指标数量 {{i.maxCount}}
</div> </div>
<div v-if="i.weight !==0 && i.weight" class="set-content-item-center-item"> <div v-if="i.weight !==0 && i.weight" class="set-content-item-center-item">
所含指标总权重 {{i.weight * 100}}% 所含指标总权重 {{Math.round((i.weight * 100)*1000)/1000}}%
</div> </div>
</div> </div>
<div v-if="handleFilter(i.tagetLibItems).length!==0" class="set-content-item-table"> <div v-if="handleFilter(i.tagetLibItems).length!==0" class="set-content-item-table">