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