This commit is contained in:
熊成强 2020-10-23 17:48:00 +08:00
parent c8095228d8
commit 83c54f0843
7 changed files with 44 additions and 16 deletions

View File

@ -67,7 +67,7 @@ export function getByFlowManagerId (query) {
export function saveDetailProcs (query) { export function saveDetailProcs (query) {
return request({ return request({
url: '/lz_management/flowChart/saveDetailProcs', url: '/lz_management/flowChart/saveDetailProcs',
method: 'get', method: 'post',
params: query data: query
}) })
} }

View File

@ -196,6 +196,13 @@ export default {
list: { list: {
deep: true, deep: true,
handler (n, o) { 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) console.log('n: ', n)
this.$emit('update:info', this.list) this.$emit('update:info', this.list)
this.$forceUpdate() this.$forceUpdate()

View File

@ -39,14 +39,12 @@ export default {
beforeMount () {}, beforeMount () {},
mounted () { mounted () {
this.form = this.info this.form = this.info
console.log('info: ', this.info)
}, },
methods: {}, methods: {},
watch: { watch: {
form: { form: {
deep: true, deep: true,
handler (n, o) { handler (n, o) {
console.log('n3333: ', n)
this.$emit('update:info', Object.assign({}, this.info, this.form, {label: n.chartDetails.status ? '' : '已禁用'})) this.$emit('update:info', Object.assign({}, this.info, this.form, {label: n.chartDetails.status ? '' : '已禁用'}))
// console.log('info: ', this.info) // console.log('info: ', this.info)
this.$forceUpdate() this.$forceUpdate()
@ -55,10 +53,6 @@ export default {
'info': { 'info': {
deep: true, deep: true,
handler (n, o) { 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() this.$forceUpdate()
} }
} }

View File

@ -196,6 +196,13 @@ export default {
list: { list: {
deep: true, deep: true,
handler (n, o) { 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) console.log('n: ', n)
this.$emit('update:info', this.list) this.$emit('update:info', this.list)
this.$forceUpdate() this.$forceUpdate()

View File

@ -48,11 +48,11 @@ export default {
deep: true, deep: true,
handler (n, o) { handler (n, o) {
console.log('n: ', n) console.log('n: ', n)
let weight = 0 let weight1 = 0
n.chartDetails.recordSimpleDtos.map(i => { 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) // console.log('info: ', this.info)
this.$forceUpdate() this.$forceUpdate()
} }

View File

@ -45,7 +45,7 @@
<div style="padding:20px 0 0 0 "> <div style="padding:20px 0 0 0 ">
<span>评分权重</span> <span>评分权重</span>
<div style="padding:10px 0 0 20px"> <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> <template slot="append">%</template>
</el-input> </el-input>
</div> </div>
@ -167,7 +167,7 @@ export default {
isCick: !isC, isCick: !isC,
isShow: false, isShow: false,
label: '权重评分:0%', label: '权重评分:0%',
weight: 0, weight1: 0,
roleDtos: JSON.parse(JSON.stringify(this.roleDtos.map(i => { roleDtos: JSON.parse(JSON.stringify(this.roleDtos.map(i => {
if (i.type !== 1) i.checked = true if (i.type !== 1) i.checked = true
return i return i
@ -205,6 +205,14 @@ export default {
list: { list: {
deep: true, deep: true,
handler (n, o) { 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.$emit('update:info', this.list)
this.$forceUpdate() this.$forceUpdate()
} }
@ -216,8 +224,9 @@ export default {
if (n.isActive !== 0) { if (n.isActive !== 0) {
n.name = this.options.filter(i => i.id === n.optType)[0].name n.name = this.options.filter(i => i.id === n.optType)[0].name
} }
if (n.weight >= 0) { n.weight = n.weight1 / 100
n.label = '权重评分:' + n.weight + '%' if (n.weight1 >= 0) {
n.label = '权重评分:' + n.weight1 + '%'
} else { } else {
n.label = '' n.label = ''
} }

View File

@ -21,7 +21,8 @@
import basis from './components/basis' import basis from './components/basis'
import process from './components/process' import process from './components/process'
import templateSet from './components/templateSet' import templateSet from './components/templateSet'
import {saveBaseSet, saveTemSet} from '@/api/workbench' import {saveBaseSet, saveTemSet, saveDetailProcs} from '@/api/workbench'
console.log('saveDetailProcs: ', saveDetailProcs)
export default { export default {
data () { data () {
@ -62,6 +63,16 @@ export default {
async handSaveBasisc () { async handSaveBasisc () {
console.log('this.processInfo: ', this.processInfo) 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) // console.log('this.basisForm: ', this.basisForm)
// try { // try {
// let res = await saveBaseSet(this.basisForm) // let res = await saveBaseSet(this.basisForm)