优化
This commit is contained in:
parent
c8095228d8
commit
83c54f0843
@ -67,7 +67,7 @@ export function getByFlowManagerId (query) {
|
||||
export function saveDetailProcs (query) {
|
||||
return request({
|
||||
url: '/lz_management/flowChart/saveDetailProcs',
|
||||
method: 'get',
|
||||
params: query
|
||||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
||||
@ -196,6 +196,13 @@ export default {
|
||||
list: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
n.map(i => {
|
||||
i.roleIds = ''
|
||||
i.roleDtos.map(j => {
|
||||
if (j.type !== 1 && j.checked) i.roleIds += j.id + ','
|
||||
})
|
||||
i.roleIds = i.roleIds.substring(0, i.roleIds.length - 1)
|
||||
})
|
||||
console.log('n: ', n)
|
||||
this.$emit('update:info', this.list)
|
||||
this.$forceUpdate()
|
||||
|
||||
@ -39,14 +39,12 @@ export default {
|
||||
beforeMount () {},
|
||||
mounted () {
|
||||
this.form = this.info
|
||||
console.log('info: ', this.info)
|
||||
},
|
||||
methods: {},
|
||||
watch: {
|
||||
form: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
console.log('n3333: ', n)
|
||||
this.$emit('update:info', Object.assign({}, this.info, this.form, {label: n.chartDetails.status ? '' : '已禁用'}))
|
||||
// console.log('info: ', this.info)
|
||||
this.$forceUpdate()
|
||||
@ -55,10 +53,6 @@ export default {
|
||||
'info': {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
console.log('n222: ', n)
|
||||
// this.form = n
|
||||
// this.$emit('update:info', Object.assign({}, this.info, this.form, {label: n ? '' : '已禁用'}))
|
||||
// console.log('info: ', this.info)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,6 +196,13 @@ export default {
|
||||
list: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
n.map(i => {
|
||||
i.roleIds = ''
|
||||
i.roleDtos.map(j => {
|
||||
if (j.type !== 1 && j.checked) i.roleIds += j.id + ','
|
||||
})
|
||||
i.roleIds = i.roleIds.substring(0, i.roleIds.length - 1)
|
||||
})
|
||||
console.log('n: ', n)
|
||||
this.$emit('update:info', this.list)
|
||||
this.$forceUpdate()
|
||||
|
||||
@ -48,11 +48,11 @@ export default {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
console.log('n: ', n)
|
||||
let weight = 0
|
||||
let weight1 = 0
|
||||
n.chartDetails.recordSimpleDtos.map(i => {
|
||||
weight = weight + Number(i.weight)
|
||||
weight1 = weight1 + Number(i.weight1)
|
||||
})
|
||||
this.$emit('update:info', Object.assign({}, this.info, this.form, {label: n.chartDetails.status ? '权重评分:' + weight + '%' : '已禁用'}))
|
||||
this.$emit('update:info', Object.assign({}, this.info, this.form, {label: n.chartDetails.status ? '权重评分:' + weight1 + '%' : '已禁用'}))
|
||||
// console.log('info: ', this.info)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
<div style="padding:20px 0 0 0 ">
|
||||
<span>评分权重:</span>
|
||||
<div style="padding:10px 0 0 20px">
|
||||
<el-input style="width:200px;" size="small" clearable v-model="itemInfo.weight">
|
||||
<el-input style="width:200px;" size="small" clearable v-model="itemInfo.weight1">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</div>
|
||||
@ -167,7 +167,7 @@ export default {
|
||||
isCick: !isC,
|
||||
isShow: false,
|
||||
label: '权重评分:0%',
|
||||
weight: 0,
|
||||
weight1: 0,
|
||||
roleDtos: JSON.parse(JSON.stringify(this.roleDtos.map(i => {
|
||||
if (i.type !== 1) i.checked = true
|
||||
return i
|
||||
@ -205,6 +205,14 @@ export default {
|
||||
list: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
n.map(i => {
|
||||
i.roleIds = ''
|
||||
i.roleDtos.map(j => {
|
||||
if (j.type !== 1 && j.checked) i.roleIds += j.id + ','
|
||||
})
|
||||
i.roleIds = i.roleIds.substring(0, i.roleIds.length - 1)
|
||||
})
|
||||
console.log('n: ', n)
|
||||
this.$emit('update:info', this.list)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
@ -216,8 +224,9 @@ export default {
|
||||
if (n.isActive !== 0) {
|
||||
n.name = this.options.filter(i => i.id === n.optType)[0].name
|
||||
}
|
||||
if (n.weight >= 0) {
|
||||
n.label = '权重评分:' + n.weight + '%'
|
||||
n.weight = n.weight1 / 100
|
||||
if (n.weight1 >= 0) {
|
||||
n.label = '权重评分:' + n.weight1 + '%'
|
||||
} else {
|
||||
n.label = ''
|
||||
}
|
||||
|
||||
@ -21,7 +21,8 @@
|
||||
import basis from './components/basis'
|
||||
import process from './components/process'
|
||||
import templateSet from './components/templateSet'
|
||||
import {saveBaseSet, saveTemSet} from '@/api/workbench'
|
||||
import {saveBaseSet, saveTemSet, saveDetailProcs} from '@/api/workbench'
|
||||
console.log('saveDetailProcs: ', saveDetailProcs)
|
||||
|
||||
export default {
|
||||
data () {
|
||||
@ -62,6 +63,16 @@ export default {
|
||||
|
||||
async handSaveBasisc () {
|
||||
console.log('this.processInfo: ', this.processInfo)
|
||||
for (let i in this.processInfo) {
|
||||
console.log('processInfo: ', i)
|
||||
try {
|
||||
let res = await saveDetailProcs(this.processInfo[i].chartDetails)
|
||||
console.log('res: ', res)
|
||||
} catch (error) {
|
||||
console.log('error: ', error)
|
||||
}
|
||||
}
|
||||
|
||||
// console.log('this.basisForm: ', this.basisForm)
|
||||
// try {
|
||||
// let res = await saveBaseSet(this.basisForm)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user