Merge branch 'v_1.0.0' of http://gitlab.ldxinyong.com/enterpriseManagement/digitization-ui into v_1.0.0
* 'v_1.0.0' of http://gitlab.ldxinyong.com/enterpriseManagement/digitization-ui: 优化 优化 优化 优化
This commit is contained in:
commit
accfe3a6a3
@ -66,8 +66,8 @@ export function getByFlowManagerId (query) {
|
||||
export function saveDetailProcs (query) {
|
||||
return request({
|
||||
url: '/lz_management/flowChart/saveDetailProcs',
|
||||
method: 'get',
|
||||
params: query
|
||||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -209,8 +209,8 @@ export default {
|
||||
// 关闭弹窗
|
||||
close () {
|
||||
// console.log('isShow: ', this.isShow)
|
||||
// this.show = true
|
||||
// this.$emit('update:isShow', false)
|
||||
this.show = true
|
||||
this.$emit('update:isShow', false)
|
||||
// this.$forceUpdate()
|
||||
},
|
||||
// 关闭弹窗
|
||||
|
||||
@ -48,6 +48,7 @@ export default [
|
||||
component: (resolve) => require(['@/views/kpi/workbench/assessmentGroup/edit'], resolve),
|
||||
meta: {
|
||||
title: '编辑考评组',
|
||||
pop: true,
|
||||
isNav: false,
|
||||
hidden: true
|
||||
}
|
||||
|
||||
@ -40,6 +40,7 @@ export function personlGetForm (arr = []) {
|
||||
})
|
||||
}
|
||||
const key = 'staffId'
|
||||
arr = arr.sort((a, b) => a[key] - b[key])
|
||||
params.list = arr
|
||||
for (let i in arr) {
|
||||
if (i < 1) { params.title = params.title + (i === '0' ? '' : ',') + arr[i].name }
|
||||
@ -64,6 +65,8 @@ export function departGetForm (arr = []) {
|
||||
}
|
||||
const key = 'departmentId'
|
||||
const key1 = 'departmentName'
|
||||
arr = arr.sort((a, b) => a[key] - b[key])
|
||||
console.log('arr: ', arr)
|
||||
params.list = arr
|
||||
for (let i in arr) {
|
||||
if (i < 1) {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ApprovalList from './ConfirmList'
|
||||
import ApprovalList from './ApprovalList'
|
||||
export default {
|
||||
props: ['info'],
|
||||
data () {
|
||||
@ -36,9 +36,11 @@ export default {
|
||||
}
|
||||
},
|
||||
beforeMount () {},
|
||||
mounted () {
|
||||
created () {
|
||||
this.form = this.info
|
||||
console.log('info: ', this.info)
|
||||
},
|
||||
mounted () {
|
||||
|
||||
},
|
||||
methods: {},
|
||||
watch: {
|
||||
|
||||
@ -90,7 +90,7 @@ export default {
|
||||
options: [
|
||||
{
|
||||
id: 1,
|
||||
name: '1级主管'
|
||||
name: '直接主管'
|
||||
}, {
|
||||
id: 2,
|
||||
name: '2级主管'
|
||||
@ -120,11 +120,50 @@ export default {
|
||||
},
|
||||
computed: {},
|
||||
beforeMount () {},
|
||||
created () {
|
||||
this.list = this.handleListFor(this.info)
|
||||
},
|
||||
mounted () {
|
||||
this.list = this.info
|
||||
console.log('info: ', this.info)
|
||||
},
|
||||
methods: {
|
||||
// 将传入的数值复现
|
||||
handleListFor (list) {
|
||||
if (list.length === 0) return []
|
||||
list = list.map(i => {
|
||||
i.isShow = false
|
||||
i = Object.assign({}, this.handleOptType(i), i)
|
||||
i.isActive = i.optType === 0 ? 0 : 1
|
||||
i.roleDtos = JSON.parse(JSON.stringify(this.roleDtos)).map(j => {
|
||||
j.checked = i.roleIds ? i.roleIds.includes(String(j.id)) : false
|
||||
return j
|
||||
})
|
||||
return i
|
||||
})
|
||||
const arr = JSON.parse(JSON.stringify(list))
|
||||
arr[0].isCick = true
|
||||
this.itemInfo = arr[0]
|
||||
return arr
|
||||
},
|
||||
handleOptType (i) {
|
||||
console.log('i: ', i)
|
||||
// itemInfo.isActive
|
||||
const obj = {}
|
||||
if (i.optType === 0) {
|
||||
obj.isActive = 0
|
||||
const a = this.$personlGetForm(i.staffs)
|
||||
obj.optIds = a.value
|
||||
obj.list = a
|
||||
obj.name = a.list.length > 0 ? this.handleTitle(a) : '未指定成员'
|
||||
return obj
|
||||
}
|
||||
if (i.optType === -1) {
|
||||
return obj
|
||||
} else {
|
||||
obj.name = this.options.filter(j => j.id === i.optType)[0].name
|
||||
obj.isActive = 1
|
||||
return obj
|
||||
}
|
||||
},
|
||||
handleTitle (item) {
|
||||
return item.list.length > 0 ? (item.title + '等' + item.list.length + '人') : '指定成员'
|
||||
// itemInfo.list.list.length===0?(itemInfo.list.title + '等' + itemInfo.list.list.length + '人' ):"未指定成员"
|
||||
@ -187,6 +226,19 @@ export default {
|
||||
this.itemInfo = this.list[0]
|
||||
}
|
||||
}
|
||||
},
|
||||
handleIsEmit (n) {
|
||||
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)
|
||||
i.optType = i.isActive === 0 ? 0 : i.optType
|
||||
})
|
||||
console.log('n: ', n)
|
||||
this.$emit('update:info', this.list)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -196,9 +248,7 @@ export default {
|
||||
list: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
console.log('n: ', n)
|
||||
this.$emit('update:info', this.list)
|
||||
this.$forceUpdate()
|
||||
this.handleIsEmit(n)
|
||||
}
|
||||
},
|
||||
itemInfo: {
|
||||
@ -206,7 +256,13 @@ export default {
|
||||
handler (n, o) {
|
||||
console.log('nxcq: ', n)
|
||||
if (n.isActive !== 0) {
|
||||
if (n.optType === 0 && n.optType !== -1) {
|
||||
n.name = this.options.filter(i => i.id === n.optType)[0].name
|
||||
n.optType = 1
|
||||
}
|
||||
if (n.optType === -1) {
|
||||
n.name = '考核人员自己'
|
||||
}
|
||||
} else {
|
||||
if (n.list) {
|
||||
n.name = this.handleTitle(n.list)
|
||||
|
||||
@ -37,16 +37,19 @@ export default {
|
||||
}
|
||||
},
|
||||
beforeMount () {},
|
||||
beforeCreate () {
|
||||
},
|
||||
created () {
|
||||
this.form = Object.assign({}, this.info)
|
||||
},
|
||||
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 +58,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()
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,14 +83,16 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
itemInfo: {},
|
||||
itemInfo: {
|
||||
isShow: false
|
||||
},
|
||||
form: {
|
||||
radio: 3
|
||||
},
|
||||
options: [
|
||||
{
|
||||
id: 1,
|
||||
name: '1级主管'
|
||||
name: '直接主管'
|
||||
}, {
|
||||
id: 2,
|
||||
name: '2级主管'
|
||||
@ -119,13 +121,56 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
beforeMount () {},
|
||||
created () {
|
||||
this.list = this.handleListFor(this.info)
|
||||
// console.log(' this.list : ', this.list)
|
||||
},
|
||||
beforeMount () {
|
||||
},
|
||||
mounted () {
|
||||
this.list = this.info
|
||||
console.log('info: ', this.info)
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 将传入的数值复现
|
||||
handleListFor (list) {
|
||||
if (list.length === 0) return []
|
||||
list = list.map(i => {
|
||||
i.isShow = false
|
||||
i = Object.assign({}, this.handleOptType(i), i)
|
||||
i.isActive = i.optType === 0 ? 0 : 1
|
||||
i.roleDtos = JSON.parse(JSON.stringify(this.roleDtos)).map(j => {
|
||||
j.checked = i.roleIds ? i.roleIds.includes(String(j.id)) : false
|
||||
return j
|
||||
})
|
||||
return i
|
||||
})
|
||||
const arr = JSON.parse(JSON.stringify(list))
|
||||
arr[0].isCick = true
|
||||
this.itemInfo = arr[0]
|
||||
return arr
|
||||
},
|
||||
handleOptType (i) {
|
||||
console.log('i: ', i)
|
||||
// itemInfo.isActive
|
||||
const obj = {}
|
||||
if (i.optType === 0) {
|
||||
obj.isActive = 0
|
||||
const a = this.$personlGetForm(i.staffs)
|
||||
obj.optIds = a.value
|
||||
obj.list = a
|
||||
obj.name = a.list.length > 0 ? this.handleTitle(a) : '未指定成员'
|
||||
return obj
|
||||
}
|
||||
if (i.optType === -1) {
|
||||
return obj
|
||||
} else {
|
||||
obj.name = this.options.filter(j => j.id === i.optType)[0].name
|
||||
obj.isActive = 1
|
||||
return obj
|
||||
}
|
||||
},
|
||||
handleTitle (item) {
|
||||
console.log('item: ', item)
|
||||
return item.list.length > 0 ? (item.title + '等' + item.list.length + '人') : '指定成员'
|
||||
// itemInfo.list.list.length===0?(itemInfo.list.title + '等' + itemInfo.list.list.length + '人' ):"未指定成员"
|
||||
},
|
||||
@ -147,7 +192,7 @@ export default {
|
||||
item.isCick = true
|
||||
this.itemInfo = item
|
||||
console.log('this.itemInfo: ', this.itemInfo)
|
||||
this.$forceUpdate()
|
||||
// this.$forceUpdate()
|
||||
},
|
||||
// 添加流程
|
||||
handleAdd () {
|
||||
@ -187,6 +232,23 @@ export default {
|
||||
this.itemInfo = this.list[0]
|
||||
}
|
||||
}
|
||||
},
|
||||
handleIsEmit (n) {
|
||||
let arr = JSON.parse(JSON.stringify(n))
|
||||
if (arr.length !== 0) {
|
||||
arr = arr.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)
|
||||
i.optType = i.isActive === 0 ? 0 : i.optType
|
||||
return i
|
||||
})
|
||||
console.log('arr: ', arr)
|
||||
this.$emit('update:info', arr)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -196,24 +258,25 @@ export default {
|
||||
list: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
console.log('n: ', n)
|
||||
this.$emit('update:info', this.list)
|
||||
this.$forceUpdate()
|
||||
this.handleIsEmit(n)
|
||||
}
|
||||
},
|
||||
itemInfo: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
console.log('nxcq: ', n)
|
||||
if (n.isActive !== 0) {
|
||||
n.name = this.options.filter(i => i.id === n.optType)[0].name
|
||||
const arr = n
|
||||
console.log('arr: ', arr)
|
||||
if (arr.isActive !== 0) {
|
||||
if (arr.optType === 0) arr.optType = 1
|
||||
arr.name = this.options.filter(i => i.id === arr.optType)[0].name
|
||||
} else {
|
||||
if (n.list) {
|
||||
n.name = this.handleTitle(n.list)
|
||||
if (arr.list) {
|
||||
arr.name = this.handleTitle(arr.list)
|
||||
} else {
|
||||
n.name = '未指定成员'
|
||||
arr.name = '未指定成员'
|
||||
}
|
||||
}
|
||||
// this.$emit('update:info', this.list)
|
||||
// n.roleIds = ''
|
||||
// n.roleDtos.map(i => {
|
||||
// n.roleIds += ''
|
||||
|
||||
@ -38,9 +38,12 @@ export default {
|
||||
}
|
||||
},
|
||||
beforeMount () {},
|
||||
mounted () {
|
||||
created () {
|
||||
this.form = this.info
|
||||
console.log('info: ', this.info)
|
||||
},
|
||||
mounted () {
|
||||
|
||||
},
|
||||
methods: {},
|
||||
watch: {
|
||||
@ -48,11 +51,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>
|
||||
@ -97,7 +97,7 @@ export default {
|
||||
options: [
|
||||
{
|
||||
id: 1,
|
||||
name: '1级主管'
|
||||
name: '直接主管'
|
||||
}, {
|
||||
id: 2,
|
||||
name: '2级主管'
|
||||
@ -128,10 +128,48 @@ export default {
|
||||
computed: {},
|
||||
beforeMount () {},
|
||||
mounted () {
|
||||
this.list = this.info
|
||||
this.list = this.handleListFor(this.info)
|
||||
console.log('info: ', this.info)
|
||||
},
|
||||
methods: {
|
||||
// 将传入的数值复现
|
||||
handleListFor (list) {
|
||||
if (list.length === 0) return []
|
||||
list = list.map(i => {
|
||||
i.weight1 = i.weight * 100
|
||||
i.isShow = false
|
||||
i = Object.assign({}, this.handleOptType(i), i)
|
||||
i.isActive = i.optType === 0 ? 0 : 1
|
||||
i.roleDtos = JSON.parse(JSON.stringify(this.roleDtos)).map(j => {
|
||||
j.checked = i.roleIds ? i.roleIds.includes(String(j.id)) : false
|
||||
return j
|
||||
})
|
||||
return i
|
||||
})
|
||||
const arr = JSON.parse(JSON.stringify(list))
|
||||
arr[0].isCick = true
|
||||
this.itemInfo = arr[0]
|
||||
return arr
|
||||
},
|
||||
handleOptType (i) {
|
||||
// itemInfo.isActive
|
||||
const obj = {}
|
||||
if (i.optType === 0) {
|
||||
obj.isActive = 0
|
||||
const a = this.$personlGetForm(i.staffs)
|
||||
obj.optIds = a.value
|
||||
obj.list = a
|
||||
obj.name = a.list.length > 0 ? this.handleTitle(a) : '未指定成员'
|
||||
return obj
|
||||
}
|
||||
if (i.optType === -1) {
|
||||
return obj
|
||||
} else {
|
||||
obj.name = this.options.filter(j => j.id === i.optType)[0].name
|
||||
obj.isActive = 1
|
||||
return obj
|
||||
}
|
||||
},
|
||||
handleTitle (item) {
|
||||
return item.list.length > 0 ? (item.title + '等' + item.list.length + '人') : '指定成员'
|
||||
// itemInfo.list.list.length===0?(itemInfo.list.title + '等' + itemInfo.list.list.length + '人' ):"未指定成员"
|
||||
@ -167,7 +205,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
|
||||
@ -196,6 +234,18 @@ export default {
|
||||
this.itemInfo = this.list[0]
|
||||
}
|
||||
}
|
||||
},
|
||||
handleIsEmit (n) {
|
||||
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()
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -205,19 +255,26 @@ export default {
|
||||
list: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
this.$emit('update:info', this.list)
|
||||
this.$forceUpdate()
|
||||
this.handleIsEmit(n)
|
||||
}
|
||||
},
|
||||
itemInfo: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
console.log('nxcq: ', n)
|
||||
if (n.isActive !== 0) {
|
||||
if (n.optType === 0) n.optType = 1
|
||||
n.name = this.options.filter(i => i.id === n.optType)[0].name
|
||||
} else {
|
||||
// n.name
|
||||
if (n.list) {
|
||||
n.name = this.handleTitle(n.list)
|
||||
} else {
|
||||
n.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 = ''
|
||||
}
|
||||
|
||||
@ -94,20 +94,34 @@ export default {
|
||||
},
|
||||
beforeMount () {},
|
||||
mounted () {
|
||||
this.handleGetByFlowManagerId()
|
||||
const id = this.$route.query.id || ''
|
||||
this.id = id
|
||||
if (id) {
|
||||
this.handleGetByFlowManagerId(id)
|
||||
} else {
|
||||
this.handleGetByFlowManagerId(0)
|
||||
}
|
||||
// this.handleGetByFlowManagerId(24)
|
||||
},
|
||||
methods: {
|
||||
// 获取流程大节点
|
||||
async handleGetByFlowManagerId (id = 1) {
|
||||
async handleGetByFlowManagerId (groupId = 0) {
|
||||
try {
|
||||
const res = await getByFlowManagerId({
|
||||
id: 1,
|
||||
groupId: 24
|
||||
groupId
|
||||
})
|
||||
|
||||
this.processLsit = res
|
||||
this.processLsitCopy.map(i => {
|
||||
this.info[i.componment + 'Info'] = this.processLsit.filter(j => j.name === i.name)[0]
|
||||
if (groupId === 0) {
|
||||
this.info[i.componment + 'Info'].chartDetails = {
|
||||
id: i.id,
|
||||
status: 0,
|
||||
recordSimpleDtos: []
|
||||
}
|
||||
}
|
||||
})
|
||||
this.isActive = this.processLsit[0].name
|
||||
this.noInfo = true
|
||||
|
||||
@ -150,7 +150,7 @@
|
||||
<el-radio label="">不限数量</el-radio>
|
||||
<el-radio label="1">自定义</el-radio>
|
||||
</el-radio-group>
|
||||
<el-input clearable size="small" style="width:160px;'" v-if="maxCount==1" v-model="form.maxCount"></el-input>
|
||||
<el-input clearable size="small" style="width:160px;'" v-if="maxCount" v-model="form.maxCount"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所含指标总权重">
|
||||
<div slot="label">所含指标总权重
|
||||
@ -162,7 +162,7 @@
|
||||
<el-radio :label="0">不限权重</el-radio>
|
||||
<el-radio :label="1">自定义</el-radio>
|
||||
</el-radio-group>
|
||||
<el-input clearable size="small" style="width:160px;'" v-if="weight===1" v-model="form.weight">
|
||||
<el-input clearable size="small" style="width:160px;'" v-if="weight!==0" v-model="form.weight">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -340,13 +340,13 @@ export default {
|
||||
handleSubmit () {
|
||||
this.$refs.form.validate((v) => {
|
||||
if (v) {
|
||||
this.form.weight = this.form.weight / 100 > 1 ? 1 : this.form.weight / 100
|
||||
if (this.form.isEdit) {
|
||||
this.info.modelItems[this.form.index] = Object.assign({}, this.form)
|
||||
this.form = {}
|
||||
this.show = false
|
||||
return
|
||||
}
|
||||
this.form.weight = this.form.weight / 100 > 1 ? 1 : this.form.weight / 100
|
||||
this.info.modelItems.push(Object.assign({}, this.form, {isDelete: 0}))
|
||||
this.form = {}
|
||||
this.show = false
|
||||
@ -355,15 +355,19 @@ export default {
|
||||
},
|
||||
// 编辑
|
||||
hanidleEdit (item, index, type) {
|
||||
this.maxCount = item.maxCount > 0 ? '1' : ''
|
||||
this.weight = item.weight > 0 ? 1 : 0
|
||||
if (type === -1) {
|
||||
this.weiduTitle = '编辑维度'
|
||||
this.form = Object.assign({}, item, {index, index2: type, isEdit: true})
|
||||
console.log(' this.form: ', this.form)
|
||||
this.form.weight = this.form.weight * 100
|
||||
console.log('this.form: ', this.form)
|
||||
this.show = true
|
||||
} else {
|
||||
this.zhibiaoTitle = '编辑指标'
|
||||
this.formIndicators = Object.assign({}, item, {index, index2: type, isEdit: true})
|
||||
this.formIndicators.weight = this.formIndicators.weight * 100
|
||||
this.formIndicators.weight = this.formIndicators.weight
|
||||
this.showIndicators = true
|
||||
}
|
||||
},
|
||||
@ -394,16 +398,17 @@ export default {
|
||||
},
|
||||
handleSubmitZhibiao () {
|
||||
this.$refs.formIndicators.validate((v) => {
|
||||
console.log('v: ', v)
|
||||
if (v) {
|
||||
this.formIndicators.weight = this.formIndicators.weight / 100 > 1 ? 1 : this.formIndicators.weight / 100
|
||||
if (this.formIndicators.isEdit) {
|
||||
this.info.modelItems[this.formIndicators.index].tagetLibItems[this.formIndicators.index2] = Object.assign({}, this.formIndicators)
|
||||
this.showIndicators = false
|
||||
return
|
||||
}
|
||||
if (!this.zanshi.tagetLibItems) this.zanshi.tagetLibItems = []
|
||||
this.formIndicators.weight = this.formIndicators.weight / 100 > 1 ? 1 : this.formIndicators.weight / 100
|
||||
this.zanshi.tagetLibItems.push(Object.assign({}, this.formIndicators, {isDelete: 0}))
|
||||
this.showIndicators = false
|
||||
// this.showIndicators = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -21,12 +21,13 @@
|
||||
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 () {
|
||||
return {
|
||||
active: 3,
|
||||
active: 1,
|
||||
// 基础
|
||||
basisForm: {
|
||||
// id: 8,
|
||||
@ -62,23 +63,39 @@ export default {
|
||||
|
||||
async handSaveBasisc () {
|
||||
console.log('this.processInfo: ', this.processInfo)
|
||||
// console.log('this.basisForm: ', this.basisForm)
|
||||
// try {
|
||||
// let res = await saveBaseSet(this.basisForm)
|
||||
console.log('this.basisForm: ', this.basisForm)
|
||||
try {
|
||||
let res = await saveBaseSet(this.basisForm)
|
||||
this.basisForm = res
|
||||
this.templateForm.evaluationGroupId = res.id
|
||||
for (let i in this.processInfo) {
|
||||
console.log('processInfo: ', i)
|
||||
try {
|
||||
let res1 = await saveDetailProcs(Object.assign({}, this.processInfo[i].chartDetails, {evaluationGroupId: res.id}))
|
||||
console.log('res: ', res1)
|
||||
} catch (error) {
|
||||
console.log('error: ', error)
|
||||
}
|
||||
}
|
||||
console.log('res: ', res)
|
||||
} catch (error) {
|
||||
this.$message.error(error.msg)
|
||||
}
|
||||
console.log('this.templateForm: ', JSON.stringify(this.templateForm))
|
||||
try {
|
||||
let res = await saveTemSet(this.templateForm)
|
||||
// this.basisForm = res
|
||||
// this.templateForm.evaluationGroupId = res.id
|
||||
// console.log('res: ', res)
|
||||
// } catch (error) {
|
||||
// this.$message.error(error.msg)
|
||||
// }
|
||||
// console.log('this.templateForm: ', JSON.stringify(this.templateForm))
|
||||
// try {
|
||||
// let res = await saveTemSet(this.templateForm)
|
||||
// // this.basisForm = res
|
||||
// console.log('res: ', res)
|
||||
// } catch (error) {
|
||||
// this.$message.error(error.msg)
|
||||
// }
|
||||
console.log('res: ', res)
|
||||
} catch (error) {
|
||||
this.$message.error(error.msg)
|
||||
}
|
||||
this.$message({
|
||||
message: '保存成功',
|
||||
type: 'success',
|
||||
onClose: () => {
|
||||
this.$router.replace({name: 'workbench-group'})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user