youhua
This commit is contained in:
parent
2766389dc1
commit
07fe51032d
@ -12,7 +12,9 @@
|
||||
font-size: 14px;
|
||||
color: #52575b;
|
||||
}
|
||||
|
||||
.add{
|
||||
cursor: pointer;
|
||||
}
|
||||
.pre{
|
||||
pre{
|
||||
white-space:pre-line;
|
||||
|
||||
@ -1,9 +1,12 @@
|
||||
<!-- -->
|
||||
<template>
|
||||
<div>
|
||||
<div style="display:inline-block;margin:0 4px;" v-for="(i,index) in authList" :key="index">
|
||||
<div
|
||||
style="display:inline-block;margin:0 4px;"
|
||||
v-for="(i,index) in authList.filter(i=>i.info)"
|
||||
:key="index">
|
||||
<el-button size="mini"
|
||||
v-if="i.info && formList.auth[[i.permis]]"
|
||||
v-if="info?info[i.permis]:formList.auth[i.permis]"
|
||||
:disabled='formList[i.permis]===1'
|
||||
@click="i.click"
|
||||
:plain='i.plain'
|
||||
@ -75,43 +78,43 @@ export default {
|
||||
authList: [
|
||||
{
|
||||
name: '催办',
|
||||
info: !this.info,
|
||||
plain: true,
|
||||
type: 'primary',
|
||||
info: !this.info,
|
||||
permis: 'toFast',
|
||||
click: this.handleCuiban
|
||||
},
|
||||
{
|
||||
name: '结果值录入',
|
||||
info: !this.info,
|
||||
type: 'primary',
|
||||
info: !this.info,
|
||||
permis: 'resultInput',
|
||||
click: this.handleJieguo
|
||||
},
|
||||
{
|
||||
name: '开始评分',
|
||||
info: !this.info,
|
||||
type: 'primary',
|
||||
info: !this.info,
|
||||
permis: 'editScore',
|
||||
click: this.handlePingfen
|
||||
},
|
||||
{
|
||||
name: '制定目标',
|
||||
info: !this.info,
|
||||
type: 'primary',
|
||||
info: !this.info,
|
||||
permis: 'keyInput',
|
||||
click: this.handleZhiding
|
||||
},
|
||||
{
|
||||
name: '同 意',
|
||||
info: !this.info,
|
||||
type: 'primary',
|
||||
info: !this.info,
|
||||
permis: 'keyCheck',
|
||||
click: this.handleTongyi
|
||||
}, {
|
||||
name: '驳 回',
|
||||
info: !this.info,
|
||||
type: 'primary',
|
||||
info: !this.info,
|
||||
permis: 'reject',
|
||||
click: this.handleBohui
|
||||
}, {
|
||||
@ -127,6 +130,13 @@ export default {
|
||||
type: 'primary',
|
||||
permis: 'tiaozhuang',
|
||||
click: this.handleZhuanjiao
|
||||
}, {
|
||||
name: '转 交',
|
||||
plain: true,
|
||||
info: !this.info,
|
||||
type: 'primary',
|
||||
permis: 'tiaozhuang',
|
||||
click: this.handleZhuanjiao
|
||||
}
|
||||
],
|
||||
dialogFormVisible: false,
|
||||
|
||||
@ -129,13 +129,14 @@ export default {
|
||||
methods: {
|
||||
// 将传入的数值复现
|
||||
handleListFor (list) {
|
||||
console.log('list: ', 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 || i.optType === -1) ? i.optType : 1
|
||||
i.roleDtos = JSON.parse(JSON.stringify(this.roleDtos)).map(j => {
|
||||
j.checked = i.roleIds ? i.roleIds.includes(String(j.id)) : false
|
||||
j.checked = i.roleIds ? i.roleIds.includes(String(j.roleId)) : false
|
||||
return j
|
||||
})
|
||||
return i
|
||||
@ -192,9 +193,17 @@ export default {
|
||||
},
|
||||
// 添加流程
|
||||
handleAdd () {
|
||||
const a = this.handleGetList(this.list)
|
||||
let index = -1
|
||||
for (let i in [1, 2, 3, 4, 5, 6, 7]) {
|
||||
if (!a.some(j => j.optType === [1, 2, 3, 4, 5, 6, 7][i])) {
|
||||
index = [1, 2, 3, 4, 5, 6, 7][i]
|
||||
break
|
||||
}
|
||||
}
|
||||
const isC = this.list.some(i => i.isCick)
|
||||
const params = {
|
||||
optType: 1,
|
||||
optType: index === -1 ? 7 : index,
|
||||
name: this.options[0].name,
|
||||
stepType: 0,
|
||||
isActive: 1,
|
||||
@ -213,6 +222,11 @@ export default {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
handleDelete (item) {
|
||||
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (item.id) {
|
||||
item.isDelete = 1
|
||||
} else {
|
||||
@ -227,6 +241,12 @@ export default {
|
||||
this.itemInfo = this.list[0]
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleIsEmit (n) {
|
||||
n.map(i => {
|
||||
@ -248,12 +268,14 @@ export default {
|
||||
list: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
console.log('n22: ', n)
|
||||
this.handleIsEmit(JSON.parse(JSON.stringify(n)))
|
||||
}
|
||||
},
|
||||
itemInfo: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
console.log('(n: ', (n))
|
||||
const arr = n
|
||||
if (arr.isActive !== 0 && arr.isActive !== -1) {
|
||||
if (arr.optType < 1) arr.optType = 1
|
||||
|
||||
@ -141,7 +141,7 @@ export default {
|
||||
console.log('i: ', i)
|
||||
i.isActive = (i.optType === 0 || i.optType === -1) ? i.optType : 1
|
||||
i.roleDtos = JSON.parse(JSON.stringify(this.roleDtos)).map(j => {
|
||||
j.checked = i.roleIds ? i.roleIds.includes(String(j.id)) : false
|
||||
j.checked = i.roleIds ? i.roleIds.includes(String(j.roleId)) : false
|
||||
return j
|
||||
})
|
||||
return i
|
||||
@ -199,9 +199,17 @@ export default {
|
||||
},
|
||||
// 添加流程
|
||||
handleAdd () {
|
||||
const a = this.handleGetList(this.list)
|
||||
let index = -1
|
||||
for (let i in [1, 2, 3, 4, 5, 6, 7]) {
|
||||
if (!a.some(j => j.optType === [1, 2, 3, 4, 5, 6, 7][i])) {
|
||||
index = [1, 2, 3, 4, 5, 6, 7][i]
|
||||
break
|
||||
}
|
||||
}
|
||||
const isC = this.list.some(i => i.isCick)
|
||||
const params = {
|
||||
optType: 1,
|
||||
optType: index === -1 ? 7 : index,
|
||||
name: this.options[0].name,
|
||||
stepType: 0,
|
||||
isActive: 1,
|
||||
@ -222,6 +230,11 @@ export default {
|
||||
console.log('this.list: ', this.list)
|
||||
},
|
||||
handleDelete (item) {
|
||||
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (item.id) {
|
||||
item.isDelete = 1
|
||||
} else {
|
||||
@ -236,6 +249,12 @@ export default {
|
||||
this.itemInfo = this.list[0]
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleIsEmit (n) {
|
||||
let arr = JSON.parse(JSON.stringify(n))
|
||||
|
||||
@ -53,7 +53,9 @@ export default {
|
||||
console.log('n: ', n)
|
||||
let weight1 = 0
|
||||
n.chartDetails.recordSimpleDtos.map(i => {
|
||||
if (i.isDelete !== 1) {
|
||||
weight1 = weight1 + Number(i.weight1)
|
||||
}
|
||||
})
|
||||
this.$emit('update:info', Object.assign({}, this.info, this.form, {label: n.chartDetails.status ? '权重评分:' + weight1 + '%' : '已禁用'}))
|
||||
// console.log('info: ', this.info)
|
||||
|
||||
@ -140,7 +140,7 @@ export default {
|
||||
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
|
||||
j.checked = i.roleIds ? i.roleIds.includes(String(j.roleId)) : false
|
||||
return j
|
||||
})
|
||||
return i
|
||||
@ -195,9 +195,17 @@ export default {
|
||||
},
|
||||
// 添加流程
|
||||
handleAdd () {
|
||||
const a = this.handleGetList(this.list)
|
||||
let index = -1
|
||||
for (let i in [1, 2, 3, 4, 5, 6, 7]) {
|
||||
if (!a.some(j => j.optType === [1, 2, 3, 4, 5, 6, 7][i])) {
|
||||
index = [1, 2, 3, 4, 5, 6, 7][i]
|
||||
break
|
||||
}
|
||||
}
|
||||
const isC = this.list.some(i => i.isCick)
|
||||
const params = {
|
||||
optType: 1,
|
||||
optType: index === -1 ? 7 : index,
|
||||
name: this.options[0].name,
|
||||
stepType: 0,
|
||||
isActive: 1,
|
||||
@ -218,6 +226,11 @@ export default {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
handleDelete (item) {
|
||||
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (item.id) {
|
||||
item.isDelete = 1
|
||||
} else {
|
||||
@ -232,6 +245,12 @@ export default {
|
||||
this.itemInfo = this.list[0]
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleIsEmit (n) {
|
||||
n.map(i => {
|
||||
@ -241,8 +260,9 @@ export default {
|
||||
})
|
||||
i.roleIds = i.roleIds.substring(0, i.roleIds.length - 1)
|
||||
i.label = '权重评分:' + i.weight1 + '%'
|
||||
return i
|
||||
})
|
||||
this.$emit('update:info', this.list)
|
||||
this.$emit('update:info', n)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user