优化
This commit is contained in:
parent
c486ebc5a0
commit
11e8fad286
@ -12,8 +12,8 @@ module.exports = {
|
||||
assetsPublicPath: '/',
|
||||
proxyTable: {
|
||||
'/lz_management': {
|
||||
// target: `https://tlzmanagement.ldxinyong.com`,
|
||||
target: `http://192.168.4.12:8080`,
|
||||
target: `https://tlzmanagement.ldxinyong.com`,
|
||||
// target: `http://192.168.4.12:8080`,
|
||||
changeOrigin: true,
|
||||
// secure: false ,
|
||||
// pathRewrite: {
|
||||
|
||||
@ -60,7 +60,6 @@
|
||||
|
||||
<script>
|
||||
import bbb from './a'
|
||||
console.log('bbb: ', bbb)
|
||||
export default {
|
||||
props: {
|
||||
showDataList: {
|
||||
|
||||
@ -66,9 +66,12 @@
|
||||
|
||||
<script>
|
||||
import bbb from './a'
|
||||
console.log('bbb: ', bbb)
|
||||
export default {
|
||||
props: {
|
||||
isShow: {
|
||||
TYPE: Boolean,
|
||||
default: () => false
|
||||
},
|
||||
showDataList: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
@ -105,7 +108,7 @@ export default {
|
||||
},
|
||||
beforeMount () {},
|
||||
mounted () {
|
||||
this.tags = this.showDataList.list || []
|
||||
this.tags = this.showDataList.list.concat([]) || []
|
||||
this.showData = this.data.length > -1 ? this.data : []
|
||||
},
|
||||
methods: {
|
||||
@ -205,8 +208,10 @@ export default {
|
||||
},
|
||||
// 关闭弹窗
|
||||
close () {
|
||||
this.show = true
|
||||
this.$emit('update:isShow', false)
|
||||
// console.log('isShow: ', this.isShow)
|
||||
// this.show = true
|
||||
// this.$emit('update:isShow', false)
|
||||
// this.$forceUpdate()
|
||||
},
|
||||
// 关闭弹窗
|
||||
centerDialogVisible () {
|
||||
@ -237,6 +242,8 @@ export default {
|
||||
},
|
||||
handleCancel () {
|
||||
this.$emit('update:isShow', false)
|
||||
this.$forceUpdate()
|
||||
console.log('isShow: ', this.isShow)
|
||||
},
|
||||
xcq1 () {
|
||||
console.log(this.a)
|
||||
|
||||
@ -45,7 +45,6 @@ export function personlGetForm (arr = []) {
|
||||
if (i < 1) { params.title = params.title + (i === '0' ? '' : ',') + arr[i].name }
|
||||
params.value += arr[i][key] + (i < arr.length - 1 ? ',' : '')
|
||||
}
|
||||
console.log('params: ', params)
|
||||
return params
|
||||
}
|
||||
|
||||
@ -72,6 +71,5 @@ export function departGetForm (arr = []) {
|
||||
}
|
||||
params.value += arr[i][key] + (i < arr.length - 1 ? ',' : '')
|
||||
}
|
||||
console.log('params: ', params)
|
||||
return params
|
||||
}
|
||||
|
||||
@ -1,43 +1,80 @@
|
||||
<!-- -->
|
||||
<!-- 目标确认 -->
|
||||
<template>
|
||||
<div class="Approval">
|
||||
<div class="Approval-title commonFont">
|
||||
<span>启用:</span>
|
||||
<el-switch
|
||||
v-model="value"
|
||||
active-color="#3ba1ff"
|
||||
inactive-color="#dcdfe6">
|
||||
</el-switch>
|
||||
<div class="confirm">
|
||||
<div class="confirm-top">
|
||||
<div class="commonFont" style="padding:0 0 20px 0">启用:<el-switch v-model="form.chartDetails.status" :disabled='info.status===0' active-color="#3ba1ff" :active-value='1' :inactive-value='0' inactive-color="#dcdfe6"></el-switch></div>
|
||||
<div v-show="isShow" class="confirm-top-queren">
|
||||
<ApprovalList :isShow='!!form.chartDetails.status' :roleDtos.sync='form.roleDtos' :info.sync='form.chartDetails.recordSimpleDtos'/>
|
||||
</div>
|
||||
<!-- <ConfirmList :info.sync='xcq'/> -->
|
||||
</div>
|
||||
<ApprovalList />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ApprovalList from './ApprovalList'
|
||||
import ApprovalList from './ConfirmList'
|
||||
export default {
|
||||
props: ['info'],
|
||||
data () {
|
||||
return {
|
||||
value: ''
|
||||
xcq: [],
|
||||
value: false,
|
||||
form: {
|
||||
chartDetails: {
|
||||
recordSimpleDtos: [],
|
||||
status: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ApprovalList
|
||||
},
|
||||
computed: {},
|
||||
computed: {
|
||||
isShow () {
|
||||
return this.info.chartDetails.status === 1
|
||||
}
|
||||
},
|
||||
beforeMount () {},
|
||||
mounted () {},
|
||||
mounted () {
|
||||
this.form = this.info
|
||||
console.log('info: ', this.info)
|
||||
},
|
||||
methods: {},
|
||||
watch: {}
|
||||
watch: {
|
||||
form: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
console.log('n: ', n)
|
||||
this.$emit('update:info', Object.assign({}, this.info, this.form, {label: n.chartDetails.status ? '' : '已禁用'}))
|
||||
// console.log('info: ', this.info)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
'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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang='less' scoped>
|
||||
.Approval{
|
||||
&-title{
|
||||
padding: 10px 0;
|
||||
.confirm{
|
||||
&-top{
|
||||
padding: 20px 0;
|
||||
&-queren{
|
||||
// padding: 20px 0 ;
|
||||
// border-bottom: 1px solid @borderColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -2,32 +2,33 @@
|
||||
<template>
|
||||
<div class="ProcessList">
|
||||
<div class="ProcessList-top">
|
||||
<div class="ProcessList-top-item" v-for="(i,index) in list" :key="i.id">
|
||||
<div v-if="i.id !==9999" @click="activeId=i.id" class="ProcessList-top-item-contant commonFont" :class="{active:i.id===activeId}">
|
||||
<div class="ProcessList-top-item" v-for="(i,index) in handleGetList(list)" :key="i.id">
|
||||
<div class="itemH">
|
||||
<div v-if="i.id !==9999" @click="handleClick(i)" class="ProcessList-top-item-contant commonFont" :class="{active:i.isCick}">
|
||||
<span>{{i.name}}</span>
|
||||
<span>{{i.label}}</span>
|
||||
<i @click.stop="handleDelete(i)" class="el-icon-close close"></i>
|
||||
</div>
|
||||
<div v-if="index+1 !==list.length" class="process-title-item-img">
|
||||
<div v-if="index+1!==list.length && list.length!==0" class="process-title-item-img">
|
||||
<img src="./imgs/right.png" alt="">
|
||||
</div>
|
||||
<div v-if="i.id ===9999">
|
||||
</div>
|
||||
</div>
|
||||
<div class='addP'>
|
||||
<i @click="handleAdd" class="el-icon-circle-plus-outline add"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ProcessList-center">
|
||||
<!-- v-if="JSON.stringify(itemInfo) !== '{}'" -->
|
||||
<div v-if="JSON.stringify(itemInfo) !== '{}'" class="ProcessList-center">
|
||||
<div class="ProcessList-center-zhixingren commonFont">
|
||||
<span>执行人:</span>
|
||||
<el-radio-group v-model="form.radio">
|
||||
<el-radio :label="3">主管(指定一级)</el-radio>
|
||||
<el-radio :label="6">指定成员</el-radio>
|
||||
<el-radio :label="7">被考核人</el-radio>
|
||||
<el-radio-group v-model="itemInfo.isActive">
|
||||
<el-radio :label="1">主管(指定一级)</el-radio>
|
||||
<el-radio :label="0">指定成员</el-radio>
|
||||
</el-radio-group>
|
||||
<div v-if="form.radio===3" style="padding:30px 0 0 20px;">
|
||||
<div v-if="itemInfo.isActive!==0 && itemInfo.isActive!==-1" style="padding:30px 0 0 20px;">
|
||||
<span>被考评人的</span>
|
||||
<el-select size="mini" style="width:100px;" v-model="form.value" placeholder="请选择">
|
||||
<el-select size="mini" style="width:100px;" v-model="itemInfo.optType" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
@ -36,96 +37,192 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div v-if="form.radio===6" style="padding:30px 0 0 20px;">
|
||||
<el-button size="mini" plain>选择成员</el-button>
|
||||
<span style="font-size:14px;padding:0 0 0 10px;">未指定成员</span>
|
||||
<div v-if="itemInfo.isActive===0" style="padding:30px 0 0 20px;">
|
||||
<el-button size="mini" @click="itemInfo.isShow=true" plain>选择成员</el-button>
|
||||
<span style="font-size:14px;padding:0 0 0 10px;">{{itemInfo.name}}</span>
|
||||
</div>
|
||||
<getpersonl v-if="itemInfo.isShow" :value.sync='itemInfo.optIds' :isShow.sync='itemInfo.isShow' :showDataList.sync='itemInfo.list'/>
|
||||
<div style="padding:20px 0 0 0 ">
|
||||
<span>当执行人为多人时的处理方式:</span>
|
||||
<div style="padding:10px 0 0 20px">
|
||||
<el-radio-group v-model="form.radio1">
|
||||
<el-radio :label="3">依次审批</el-radio>
|
||||
<el-radio :label="6">会签(需所有同意)</el-radio>
|
||||
<el-radio :label="9">或签(一名审批人同意或拒绝)</el-radio>
|
||||
<el-radio-group v-model="itemInfo.stepType">
|
||||
<el-radio :label="0">依次确认</el-radio>
|
||||
<el-radio :label="1">或签(一名审批人同意或拒绝即可)</el-radio>
|
||||
<el-radio :label="2">会签(所有人同时收到消息,需所有人都同意 )</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div style="padding:20px 0 0 0 ">
|
||||
<el-checkbox v-model="form.checked">若该级评分人空缺,由其在通讯录中的上级主管代评分</el-checkbox>
|
||||
</div> -->
|
||||
<div style="padding:20px 0 0 0 ">
|
||||
<el-checkbox v-model="form.checked1">允许转交</el-checkbox>
|
||||
<div style="padding:20px 0 0 0 " v-for="i in itemInfo.roleDtos" :key="i.id">
|
||||
<el-checkbox v-if="i.type !== 1" @change="handleChang(i)" v-model="i.checked">{{i.roleName}}</el-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import getpersonl from '@/components/getPersonnel'
|
||||
export default {
|
||||
props: {
|
||||
info: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
roleDtos: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
isShow: {
|
||||
type: Boolean,
|
||||
default: () => false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
getpersonl
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
itemInfo: {},
|
||||
form: {
|
||||
radio: 3
|
||||
},
|
||||
options: [
|
||||
{
|
||||
id: 1,
|
||||
name: '一级'
|
||||
name: '1级主管'
|
||||
}, {
|
||||
id: 2,
|
||||
name: '二级'
|
||||
name: '2级主管'
|
||||
}, {
|
||||
id: 3,
|
||||
name: '三级'
|
||||
name: '3级主管'
|
||||
}, {
|
||||
id: 4,
|
||||
name: '4级主管'
|
||||
}, {
|
||||
id: 5,
|
||||
name: '5级主管'
|
||||
}, {
|
||||
id: 6,
|
||||
name: '6级主管'
|
||||
}, {
|
||||
id: 7,
|
||||
name: '7级主管'
|
||||
}
|
||||
],
|
||||
activeId: 0,
|
||||
list: [{
|
||||
id: 0,
|
||||
name: '指定成员1',
|
||||
label: '熊成强等3人'
|
||||
}, {
|
||||
name: '指定成员2',
|
||||
label: ''
|
||||
}, {
|
||||
id: 2,
|
||||
name: '指定成员3',
|
||||
label: ''
|
||||
}, {
|
||||
id: 3,
|
||||
name: '指定成员4',
|
||||
label: ''
|
||||
}, {
|
||||
id: 4,
|
||||
name: '指定成员5',
|
||||
label: ''
|
||||
}, {
|
||||
list: [],
|
||||
arr: [{
|
||||
id: 9999
|
||||
}]
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
beforeMount () {},
|
||||
mounted () {},
|
||||
mounted () {
|
||||
this.list = this.info
|
||||
console.log('info: ', this.info)
|
||||
},
|
||||
methods: {
|
||||
handleTitle (item) {
|
||||
return item.list.length > 0 ? (item.title + '等' + item.list.length + '人') : '指定成员'
|
||||
// itemInfo.list.list.length===0?(itemInfo.list.title + '等' + itemInfo.list.list.length + '人' ):"未指定成员"
|
||||
},
|
||||
handleChang (item) {
|
||||
console.log('item: ', item)
|
||||
},
|
||||
handleChoose (item) {
|
||||
console.log('item: ', item)
|
||||
this.itemInfo.isShow = true
|
||||
this.$forceUpdate()
|
||||
},
|
||||
handleGetList (list = this.list) {
|
||||
return list.concat(this.arr).filter(i => i.isDelete !== 1)
|
||||
},
|
||||
handleClick (item) {
|
||||
this.list.map(i => {
|
||||
i.isCick = false
|
||||
})
|
||||
item.isCick = true
|
||||
this.itemInfo = item
|
||||
console.log('this.itemInfo: ', this.itemInfo)
|
||||
this.$forceUpdate()
|
||||
},
|
||||
// 添加流程
|
||||
handleAdd () {
|
||||
this.list.splice(this.list.length - 1, 0, {
|
||||
id: 9,
|
||||
name: 'xcq',
|
||||
label: '89'
|
||||
})
|
||||
const isC = this.list.some(i => i.isCick)
|
||||
const params = {
|
||||
optType: 1,
|
||||
name: this.options[0].name,
|
||||
stepType: 0,
|
||||
isActive: 1,
|
||||
isCick: !isC,
|
||||
isShow: false,
|
||||
roleDtos: JSON.parse(JSON.stringify(this.roleDtos.map(i => {
|
||||
if (i.type !== 1) i.checked = true
|
||||
return i
|
||||
})))
|
||||
}
|
||||
this.list.push(params)
|
||||
if (this.handleGetList().length === 2) {
|
||||
this.itemInfo = params
|
||||
}
|
||||
this.$forceUpdate()
|
||||
console.log('this.itemInfo: ', this.itemInfo)
|
||||
console.log('this.list: ', this.list)
|
||||
},
|
||||
handleDelete (item) {
|
||||
this.list = this.list.filter(i => i.id !== item.id)
|
||||
if (!this.list.some(i => i.id === this.activeId)) {
|
||||
this.activeId = this.list[0] ? this.list[0].id : null
|
||||
if (item.id) {
|
||||
item.isDelete = 1
|
||||
} else {
|
||||
this.list = this.list.filter(i => i !== item)
|
||||
}
|
||||
if (this.handleGetList().length === 1) {
|
||||
this.itemInfo = {}
|
||||
}
|
||||
if (!this.list.some(i => i.isCick && !i.isDelete)) {
|
||||
if (this.list[0]) {
|
||||
this.list[0].isCick = true
|
||||
this.itemInfo = this.list[0]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
watch: {
|
||||
isShow (n, o) {
|
||||
if (n && this.handleGetList().length === 1) this.handleAdd()
|
||||
},
|
||||
list: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
console.log('n: ', n)
|
||||
this.$emit('update:info', this.list)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
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
|
||||
} else {
|
||||
if (n.list) {
|
||||
n.name = this.handleTitle(n.list)
|
||||
} else {
|
||||
n.name = '未指定成员'
|
||||
}
|
||||
}
|
||||
// n.roleIds = ''
|
||||
// n.roleDtos.map(i => {
|
||||
// n.roleIds += ''
|
||||
// })
|
||||
// n.roleIds = n.roleIds.substring(0, n.roleIds.length - 1)
|
||||
// this.$forceUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -133,18 +230,30 @@ export default {
|
||||
|
||||
<style lang='less' scoped>
|
||||
.ProcessList{
|
||||
.addP{
|
||||
padding-bottom: 20px;
|
||||
.center()
|
||||
}
|
||||
&-top{
|
||||
padding: 20px 0;
|
||||
padding: 20px 0 0 0;
|
||||
border-bottom: 1px solid @borderColor;
|
||||
display: flex;
|
||||
&-item{
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
.itemH{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.add{
|
||||
font-size: 30px;
|
||||
color: #c5c5c5;
|
||||
margin:0 4px ;
|
||||
}
|
||||
&-item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-bottom: 20px;
|
||||
|
||||
&-contant{
|
||||
position: relative;
|
||||
width: 136px;
|
||||
|
||||
@ -2,11 +2,12 @@
|
||||
<template>
|
||||
<div class="confirm">
|
||||
<div class="confirm-top">
|
||||
<div class="commonFont" style="padding:0 0 20px 0">启用:<el-switch v-model="value" active-color="#3ba1ff" inactive-color="#dcdfe6"></el-switch></div>
|
||||
<div class="commonFont">由谁确认:</div>
|
||||
<div class="confirm-top-queren">
|
||||
<ConfirmList />
|
||||
<div class="commonFont" style="padding:0 0 20px 0">启用:<el-switch v-model="form.chartDetails.status" :disabled='info.status===0' active-color="#3ba1ff" :active-value='1' :inactive-value='0' inactive-color="#dcdfe6"></el-switch></div>
|
||||
<div v-show="isShow" class="commonFont">由谁确认:</div>
|
||||
<div v-show="isShow" class="confirm-top-queren">
|
||||
<ConfirmList :roleDtos.sync='form.roleDtos' :isShow='!!form.chartDetails.status' :info.sync='form.chartDetails.recordSimpleDtos'/>
|
||||
</div>
|
||||
<!-- <ConfirmList :info.sync='xcq'/> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -14,19 +15,54 @@
|
||||
<script>
|
||||
import ConfirmList from './ConfirmList'
|
||||
export default {
|
||||
props: ['info'],
|
||||
data () {
|
||||
return {
|
||||
value: false
|
||||
xcq: [],
|
||||
value: false,
|
||||
form: {
|
||||
chartDetails: {
|
||||
recordSimpleDtos: [],
|
||||
status: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ConfirmList
|
||||
},
|
||||
computed: {},
|
||||
computed: {
|
||||
isShow () {
|
||||
return this.info.chartDetails.status === 1
|
||||
}
|
||||
},
|
||||
beforeMount () {},
|
||||
mounted () {},
|
||||
mounted () {
|
||||
this.form = this.info
|
||||
console.log('info: ', this.info)
|
||||
},
|
||||
methods: {},
|
||||
watch: {}
|
||||
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()
|
||||
}
|
||||
},
|
||||
'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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -2,31 +2,33 @@
|
||||
<template>
|
||||
<div class="ProcessList">
|
||||
<div class="ProcessList-top">
|
||||
<div class="ProcessList-top-item" v-for="(i,index) in list" :key="i.id">
|
||||
<div v-if="i.id !==9999" @click="activeId=i.id" class="ProcessList-top-item-contant commonFont" :class="{active:i.id===activeId}">
|
||||
<div class="ProcessList-top-item" v-for="(i,index) in handleGetList(list)" :key="i.id">
|
||||
<div class="itemH">
|
||||
<div v-if="i.id !==9999" @click="handleClick(i)" class="ProcessList-top-item-contant commonFont" :class="{active:i.isCick}">
|
||||
<span>{{i.name}}</span>
|
||||
<span>{{i.label}}</span>
|
||||
<i @click.stop="handleDelete(i)" class="el-icon-close close"></i>
|
||||
</div>
|
||||
<div v-if="index+1 !==list.length" class="process-title-item-img">
|
||||
<div v-if="index+1!==list.length && list.length!==0" class="process-title-item-img">
|
||||
<img src="./imgs/right.png" alt="">
|
||||
</div>
|
||||
<div v-if="i.id ===9999">
|
||||
</div>
|
||||
</div>
|
||||
<div class='addP'>
|
||||
<i @click="handleAdd" class="el-icon-circle-plus-outline add"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ProcessList-center">
|
||||
<!-- v-if="JSON.stringify(itemInfo) !== '{}'" -->
|
||||
<div v-if="JSON.stringify(itemInfo) !== '{}'" class="ProcessList-center">
|
||||
<div class="ProcessList-center-zhixingren commonFont">
|
||||
<span>执行人:</span>
|
||||
<el-radio-group v-model="form.radio">
|
||||
<el-radio :label="3">主管(指定一级)</el-radio>
|
||||
<el-radio :label="6">指定成员</el-radio>
|
||||
<el-radio-group v-model="itemInfo.isActive">
|
||||
<el-radio :label="1">主管(指定一级)</el-radio>
|
||||
<el-radio :label="0">指定成员</el-radio>
|
||||
</el-radio-group>
|
||||
<div v-if="form.radio===3" style="padding:30px 0 0 20px;">
|
||||
<div v-if="itemInfo.isActive!==0 && itemInfo.isActive!==-1" style="padding:30px 0 0 20px;">
|
||||
<span>被考评人的</span>
|
||||
<el-select size="mini" style="width:100px;" v-model="form.value" placeholder="请选择">
|
||||
<el-select size="mini" style="width:100px;" v-model="itemInfo.optType" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
@ -35,96 +37,192 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div v-if="form.radio===6" style="padding:30px 0 0 20px;">
|
||||
<el-button size="mini" plain>选择成员</el-button>
|
||||
<span style="font-size:14px;padding:0 0 0 10px;">未指定成员</span>
|
||||
<div v-if="itemInfo.isActive===0" style="padding:30px 0 0 20px;">
|
||||
<el-button size="mini" @click="itemInfo.isShow=true" plain>选择成员</el-button>
|
||||
<span style="font-size:14px;padding:0 0 0 10px;">{{itemInfo.name}}</span>
|
||||
</div>
|
||||
<getpersonl v-if="itemInfo.isShow" :value.sync='itemInfo.optIds' :isShow.sync='itemInfo.isShow' :showDataList.sync='itemInfo.list'/>
|
||||
<div style="padding:20px 0 0 0 ">
|
||||
<span>当执行人为多人时的处理方式:</span>
|
||||
<div style="padding:10px 0 0 20px">
|
||||
<el-radio-group v-model="form.radio1">
|
||||
<el-radio :label="3">依次确认</el-radio>
|
||||
<el-radio :label="6">或签(一名审批人同意或拒绝即可)</el-radio>
|
||||
<el-radio :label="3">会签(所有人同时收到消息,需所有人都同意)</el-radio>
|
||||
<el-radio-group v-model="itemInfo.stepType">
|
||||
<el-radio :label="0">依次确认</el-radio>
|
||||
<el-radio :label="1">或签(一名审批人同意或拒绝即可)</el-radio>
|
||||
<el-radio :label="2">会签(所有人同时收到消息,需所有人都同意 )</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:20px 0 0 0 ">
|
||||
<el-checkbox v-model="form.checked">允许修改目标</el-checkbox>
|
||||
</div>
|
||||
<div style="padding:20px 0 0 0 ">
|
||||
<el-checkbox v-model="form.checked1">允许转交</el-checkbox>
|
||||
<div style="padding:20px 0 0 0 " v-for="i in itemInfo.roleDtos" :key="i.id">
|
||||
<el-checkbox v-if="i.type !== 1" @change="handleChang(i)" v-model="i.checked">{{i.roleName}}</el-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import getpersonl from '@/components/getPersonnel'
|
||||
export default {
|
||||
props: {
|
||||
info: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
roleDtos: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
isShow: {
|
||||
type: Boolean,
|
||||
default: () => false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
getpersonl
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
itemInfo: {},
|
||||
form: {
|
||||
radio: 3
|
||||
},
|
||||
options: [
|
||||
{
|
||||
id: 1,
|
||||
name: '一级'
|
||||
name: '1级主管'
|
||||
}, {
|
||||
id: 2,
|
||||
name: '二级'
|
||||
name: '2级主管'
|
||||
}, {
|
||||
id: 3,
|
||||
name: '三级'
|
||||
name: '3级主管'
|
||||
}, {
|
||||
id: 4,
|
||||
name: '4级主管'
|
||||
}, {
|
||||
id: 5,
|
||||
name: '5级主管'
|
||||
}, {
|
||||
id: 6,
|
||||
name: '6级主管'
|
||||
}, {
|
||||
id: 7,
|
||||
name: '7级主管'
|
||||
}
|
||||
],
|
||||
activeId: 0,
|
||||
list: [{
|
||||
id: 0,
|
||||
name: '指定成员1',
|
||||
label: '熊成强等3人'
|
||||
}, {
|
||||
name: '指定成员2',
|
||||
label: ''
|
||||
}, {
|
||||
id: 2,
|
||||
name: '指定成员3',
|
||||
label: ''
|
||||
}, {
|
||||
id: 3,
|
||||
name: '指定成员4',
|
||||
label: ''
|
||||
}, {
|
||||
id: 4,
|
||||
name: '指定成员5',
|
||||
label: ''
|
||||
}, {
|
||||
list: [],
|
||||
arr: [{
|
||||
id: 9999
|
||||
}]
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
beforeMount () {},
|
||||
mounted () {},
|
||||
mounted () {
|
||||
this.list = this.info
|
||||
console.log('info: ', this.info)
|
||||
},
|
||||
methods: {
|
||||
handleTitle (item) {
|
||||
return item.list.length > 0 ? (item.title + '等' + item.list.length + '人') : '指定成员'
|
||||
// itemInfo.list.list.length===0?(itemInfo.list.title + '等' + itemInfo.list.list.length + '人' ):"未指定成员"
|
||||
},
|
||||
handleChang (item) {
|
||||
console.log('item: ', item)
|
||||
},
|
||||
handleChoose (item) {
|
||||
console.log('item: ', item)
|
||||
this.itemInfo.isShow = true
|
||||
this.$forceUpdate()
|
||||
},
|
||||
handleGetList (list = this.list) {
|
||||
return list.concat(this.arr).filter(i => i.isDelete !== 1)
|
||||
},
|
||||
handleClick (item) {
|
||||
this.list.map(i => {
|
||||
i.isCick = false
|
||||
})
|
||||
item.isCick = true
|
||||
this.itemInfo = item
|
||||
console.log('this.itemInfo: ', this.itemInfo)
|
||||
this.$forceUpdate()
|
||||
},
|
||||
// 添加流程
|
||||
handleAdd () {
|
||||
this.list.splice(this.list.length - 1, 0, {
|
||||
id: 9,
|
||||
name: 'xcq',
|
||||
label: '89'
|
||||
})
|
||||
const isC = this.list.some(i => i.isCick)
|
||||
const params = {
|
||||
optType: 1,
|
||||
name: this.options[0].name,
|
||||
stepType: 0,
|
||||
isActive: 1,
|
||||
isCick: !isC,
|
||||
isShow: false,
|
||||
roleDtos: JSON.parse(JSON.stringify(this.roleDtos.map(i => {
|
||||
if (i.type !== 1) i.checked = true
|
||||
return i
|
||||
})))
|
||||
}
|
||||
this.list.push(params)
|
||||
if (this.handleGetList().length === 2) {
|
||||
this.itemInfo = params
|
||||
}
|
||||
this.$forceUpdate()
|
||||
console.log('this.itemInfo: ', this.itemInfo)
|
||||
console.log('this.list: ', this.list)
|
||||
},
|
||||
handleDelete (item) {
|
||||
this.list = this.list.filter(i => i.id !== item.id)
|
||||
if (!this.list.some(i => i.id === this.activeId)) {
|
||||
this.activeId = this.list[0] ? this.list[0].id : null
|
||||
if (item.id) {
|
||||
item.isDelete = 1
|
||||
} else {
|
||||
this.list = this.list.filter(i => i !== item)
|
||||
}
|
||||
if (this.handleGetList().length === 1) {
|
||||
this.itemInfo = {}
|
||||
}
|
||||
if (!this.list.some(i => i.isCick && !i.isDelete)) {
|
||||
if (this.list[0]) {
|
||||
this.list[0].isCick = true
|
||||
this.itemInfo = this.list[0]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
watch: {
|
||||
isShow (n, o) {
|
||||
if (n && this.handleGetList().length === 1) this.handleAdd()
|
||||
},
|
||||
list: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
console.log('n: ', n)
|
||||
this.$emit('update:info', this.list)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
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
|
||||
} else {
|
||||
if (n.list) {
|
||||
n.name = this.handleTitle(n.list)
|
||||
} else {
|
||||
n.name = '未指定成员'
|
||||
}
|
||||
}
|
||||
// n.roleIds = ''
|
||||
// n.roleDtos.map(i => {
|
||||
// n.roleIds += ''
|
||||
// })
|
||||
// n.roleIds = n.roleIds.substring(0, n.roleIds.length - 1)
|
||||
// this.$forceUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -132,18 +230,30 @@ export default {
|
||||
|
||||
<style lang='less' scoped>
|
||||
.ProcessList{
|
||||
.addP{
|
||||
padding-bottom: 20px;
|
||||
.center()
|
||||
}
|
||||
&-top{
|
||||
padding: 20px 0;
|
||||
padding: 20px 0 0 0;
|
||||
border-bottom: 1px solid @borderColor;
|
||||
display: flex;
|
||||
&-item{
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
.itemH{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.add{
|
||||
font-size: 30px;
|
||||
color: #c5c5c5;
|
||||
margin:0 4px ;
|
||||
}
|
||||
&-item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-bottom: 20px;
|
||||
|
||||
&-contant{
|
||||
position: relative;
|
||||
width: 136px;
|
||||
|
||||
@ -4,33 +4,53 @@
|
||||
<div class="commonFont" style="padding:20px 0;">
|
||||
<span>启用:</span>
|
||||
<el-switch
|
||||
v-model="form.value"
|
||||
active-color="#3ba1ff"
|
||||
inactive-color="#dcdfe6">
|
||||
v-model="form.chartDetails.status" :disabled='info.status===0' active-color="#3ba1ff" :active-value='1' :inactive-value='0' inactive-color="#dcdfe6">
|
||||
</el-switch>
|
||||
</div>
|
||||
<div class="commonFont" style="padding:20px 0;">由谁录入</div>
|
||||
<div class="commonFont" style="padding:20px 0;">
|
||||
<div v-if="form.chartDetails.status" class="commonFont" style="padding:20px 0;">由谁录入</div>
|
||||
<div v-if="form.chartDetails.status" class="commonFont" style="padding:20px 0;">
|
||||
<span>执行人:</span>
|
||||
<el-radio v-model="form.radio" label="1">被考核人</el-radio>
|
||||
<el-radio v-model="form.chartDetails.recordSimpleDtos[0].optType" :label="-1">被考核人</el-radio>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['info'],
|
||||
data () {
|
||||
return {
|
||||
form: {
|
||||
radio: '1'
|
||||
chartDetails: {
|
||||
status: '',
|
||||
recordSimpleDtos: [
|
||||
{
|
||||
optType: -1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
beforeMount () {},
|
||||
mounted () {},
|
||||
mounted () {
|
||||
this.form = Object.assign({}, this.info, this.form)
|
||||
console.log('his.info: ', this.info)
|
||||
console.log('this.form: ', this.form)
|
||||
},
|
||||
methods: {},
|
||||
watch: {}
|
||||
watch: {
|
||||
form: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
this.$emit('update:info', Object.assign({}, this.info, this.form, {label: n.chartDetails.status ? '' : '已禁用'}))
|
||||
console.log('info: ', this.info)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,46 +1,86 @@
|
||||
<!-- 评分 -->
|
||||
<!-- 目标确认 -->
|
||||
<template>
|
||||
<div class="score">
|
||||
<div class="score-title">
|
||||
<span style="font-weight: 600;">上级评分设置</span>
|
||||
<div style="padding:10px 0;">
|
||||
<span>启用:</span>
|
||||
<el-switch
|
||||
v-model="form.value"
|
||||
active-color="#3ba1ff"
|
||||
inactive-color="#dcdfe6">
|
||||
</el-switch>
|
||||
<div class="confirm">
|
||||
<div class="confirm-top">
|
||||
<div style="padding:0 0 10px 0;" class='commonFont'>互评配置</div>
|
||||
<div class="commonFont" style="padding:0 0 20px 0">启用:<el-switch v-model="form.chartDetails.status" :disabled='info.status===0' active-color="#3ba1ff" :active-value='1' :inactive-value='0' inactive-color="#dcdfe6"></el-switch></div>
|
||||
<div v-show="isShow" class="commonFont">由谁确认:</div>
|
||||
<div v-show="isShow" class="confirm-top-queren">
|
||||
<ScoreList :isShow='!!form.chartDetails.status' :roleDtos.sync='form.roleDtos' :info.sync='form.chartDetails.recordSimpleDtos'/>
|
||||
</div>
|
||||
<!-- <ConfirmList :info.sync='xcq'/> -->
|
||||
</div>
|
||||
<div style="padding:10px 0;" class="commonFont">上级评分设置</div>
|
||||
<ScoreList />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ScoreList from './ScoreList'
|
||||
export default {
|
||||
props: ['info'],
|
||||
data () {
|
||||
return {
|
||||
form: {}
|
||||
xcq: [],
|
||||
value: false,
|
||||
form: {
|
||||
chartDetails: {
|
||||
recordSimpleDtos: [],
|
||||
status: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ScoreList
|
||||
},
|
||||
computed: {},
|
||||
computed: {
|
||||
isShow () {
|
||||
return this.info.chartDetails.status === 1
|
||||
}
|
||||
},
|
||||
beforeMount () {},
|
||||
mounted () {},
|
||||
mounted () {
|
||||
this.form = this.info
|
||||
console.log('info: ', this.info)
|
||||
},
|
||||
methods: {},
|
||||
watch: {}
|
||||
watch: {
|
||||
form: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
console.log('n: ', n)
|
||||
let weight = 0
|
||||
n.chartDetails.recordSimpleDtos.map(i => {
|
||||
weight = weight + Number(i.weight)
|
||||
})
|
||||
this.$emit('update:info', Object.assign({}, this.info, this.form, {label: n.chartDetails.status ? '权重评分:' + weight + '%' : '已禁用'}))
|
||||
// console.log('info: ', this.info)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
'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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang='less' scoped>
|
||||
.score{
|
||||
.confirm{
|
||||
&-top{
|
||||
padding: 20px 0;
|
||||
|
||||
&-queren{
|
||||
// padding: 20px 0 ;
|
||||
// border-bottom: 1px solid @borderColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -2,31 +2,33 @@
|
||||
<template>
|
||||
<div class="ProcessList">
|
||||
<div class="ProcessList-top">
|
||||
<div class="ProcessList-top-item" v-for="(i,index) in list" :key="i.id">
|
||||
<div v-if="i.id !==9999" @click="activeId=i.id" class="ProcessList-top-item-contant commonFont" :class="{active:i.id===activeId}">
|
||||
<div class="ProcessList-top-item" v-for="(i,index) in handleGetList(list)" :key="i.id">
|
||||
<div class="itemH">
|
||||
<div v-if="i.id !==9999" @click="handleClick(i)" class="ProcessList-top-item-contant commonFont" :class="{active:i.isCick}">
|
||||
<span>{{i.name}}</span>
|
||||
<span>{{i.label}}</span>
|
||||
<span style="font-size:12px;">{{i.label}}</span>
|
||||
<i @click.stop="handleDelete(i)" class="el-icon-close close"></i>
|
||||
</div>
|
||||
<div v-if="index+1 !==list.length" class="process-title-item-img">
|
||||
<div v-if="index+1!==list.length && list.length!==0" class="process-title-item-img">
|
||||
<img src="./imgs/right.png" alt="">
|
||||
</div>
|
||||
<div v-if="i.id ===9999">
|
||||
</div>
|
||||
</div>
|
||||
<div class='addP'>
|
||||
<i @click="handleAdd" class="el-icon-circle-plus-outline add"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ProcessList-center">
|
||||
<!-- v-if="JSON.stringify(itemInfo) !== '{}'" -->
|
||||
<div v-if="JSON.stringify(itemInfo) !== '{}'" class="ProcessList-center">
|
||||
<div class="ProcessList-center-zhixingren commonFont">
|
||||
<span>执行人:</span>
|
||||
<el-radio-group v-model="form.radio">
|
||||
<el-radio :label="3">主管(指定一级)</el-radio>
|
||||
<el-radio :label="6">指定成员</el-radio>
|
||||
<el-radio-group v-model="itemInfo.isActive">
|
||||
<el-radio :label="1">主管(指定一级)</el-radio>
|
||||
<el-radio :label="0">指定成员</el-radio>
|
||||
</el-radio-group>
|
||||
<div v-if="form.radio===3" style="padding:30px 0 0 20px;">
|
||||
<div v-if="itemInfo.isActive!==0 && itemInfo.isActive!==-1" style="padding:30px 0 0 20px;">
|
||||
<span>被考评人的</span>
|
||||
<el-select size="mini" style="width:100px;" v-model="form.value" placeholder="请选择">
|
||||
<el-select size="mini" style="width:100px;" v-model="itemInfo.optType" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
@ -35,101 +37,201 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div v-if="form.radio===6" style="padding:30px 0 0 20px;">
|
||||
<el-button size="mini" plain>选择成员</el-button>
|
||||
<span style="font-size:14px;padding:0 0 0 10px;">未指定成员</span>
|
||||
<div v-if="itemInfo.isActive===0" style="padding:30px 0 0 20px;">
|
||||
<el-button size="mini" @click="itemInfo.isShow=true" plain>选择成员</el-button>
|
||||
<span style="font-size:14px;padding:0 0 0 10px;">{{itemInfo.name}}</span>
|
||||
</div>
|
||||
<getpersonl v-if="itemInfo.isShow" :value.sync='itemInfo.optIds' :isShow.sync='itemInfo.isShow' :showDataList.sync='itemInfo.list'/>
|
||||
<div style="padding:20px 0 0 0 ">
|
||||
<span>评分权重:</span>
|
||||
<el-input size="mini" style="width:150px" placeholder="请输入评分权重" v-model="input2">
|
||||
<div style="padding:10px 0 0 20px">
|
||||
<el-input style="width:200px;" size="small" clearable v-model="itemInfo.weight">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:20px 0 0 0 ">
|
||||
<span>当执行人为多人时的处理方式:</span>
|
||||
<div style="padding:10px 0 0 20px">
|
||||
<el-radio-group v-model="form.radio1">
|
||||
<el-radio :label="3">依次评分(计算时求和)</el-radio>
|
||||
<el-radio :label="6">各自评分(计算时求和)</el-radio>
|
||||
<el-radio-group v-model="itemInfo.stepType">
|
||||
<el-radio :label="0">依次评分(计算时求和)</el-radio>
|
||||
<!-- <el-radio :label="1">各自评分(计算时求和)</el-radio> -->
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div style="padding:20px 0 0 0 ">
|
||||
<el-checkbox v-model="form.checked">若该级评分人空缺,由其在通讯录中的上级主管代评分</el-checkbox>
|
||||
</div> -->
|
||||
<div style="padding:20px 0 0 0 ">
|
||||
<el-checkbox v-model="form.checked1">允许转交</el-checkbox>
|
||||
<div style="padding:20px 0 0 0 " v-for="i in itemInfo.roleDtos" :key="i.id">
|
||||
<el-checkbox v-if="i.type !== 1" @change="handleChang(i)" v-model="i.checked">{{i.roleName}}</el-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import getpersonl from '@/components/getPersonnel'
|
||||
export default {
|
||||
props: {
|
||||
info: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
roleDtos: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
isShow: {
|
||||
type: Boolean,
|
||||
default: () => false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
getpersonl
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
itemInfo: {},
|
||||
form: {
|
||||
radio: 3
|
||||
},
|
||||
options: [
|
||||
{
|
||||
id: 1,
|
||||
name: '一级'
|
||||
name: '1级主管'
|
||||
}, {
|
||||
id: 2,
|
||||
name: '二级'
|
||||
name: '2级主管'
|
||||
}, {
|
||||
id: 3,
|
||||
name: '三级'
|
||||
name: '3级主管'
|
||||
}, {
|
||||
id: 4,
|
||||
name: '4级主管'
|
||||
}, {
|
||||
id: 5,
|
||||
name: '5级主管'
|
||||
}, {
|
||||
id: 6,
|
||||
name: '6级主管'
|
||||
}, {
|
||||
id: 7,
|
||||
name: '7级主管'
|
||||
}
|
||||
],
|
||||
activeId: 0,
|
||||
list: [{
|
||||
id: 0,
|
||||
name: '指定成员1',
|
||||
label: '熊成强等3人'
|
||||
}, {
|
||||
name: '指定成员2',
|
||||
label: ''
|
||||
}, {
|
||||
id: 2,
|
||||
name: '指定成员3',
|
||||
label: ''
|
||||
}, {
|
||||
id: 3,
|
||||
name: '指定成员4',
|
||||
label: ''
|
||||
}, {
|
||||
id: 4,
|
||||
name: '指定成员5',
|
||||
label: ''
|
||||
}, {
|
||||
list: [],
|
||||
arr: [{
|
||||
id: 9999
|
||||
}]
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
beforeMount () {},
|
||||
mounted () {},
|
||||
mounted () {
|
||||
this.list = this.info
|
||||
console.log('info: ', this.info)
|
||||
},
|
||||
methods: {
|
||||
handleTitle (item) {
|
||||
return item.list.length > 0 ? (item.title + '等' + item.list.length + '人') : '指定成员'
|
||||
// itemInfo.list.list.length===0?(itemInfo.list.title + '等' + itemInfo.list.list.length + '人' ):"未指定成员"
|
||||
},
|
||||
handleChang (item) {
|
||||
console.log('item: ', item)
|
||||
},
|
||||
handleChoose (item) {
|
||||
console.log('item: ', item)
|
||||
this.itemInfo.isShow = true
|
||||
this.$forceUpdate()
|
||||
},
|
||||
handleGetList (list = this.list) {
|
||||
return list.concat(this.arr).filter(i => i.isDelete !== 1)
|
||||
},
|
||||
handleClick (item) {
|
||||
this.list.map(i => {
|
||||
i.isCick = false
|
||||
})
|
||||
item.isCick = true
|
||||
this.itemInfo = item
|
||||
console.log('this.itemInfo: ', this.itemInfo)
|
||||
this.$forceUpdate()
|
||||
},
|
||||
// 添加流程
|
||||
handleAdd () {
|
||||
this.list.splice(this.list.length - 1, 0, {
|
||||
id: 9,
|
||||
name: 'xcq',
|
||||
label: '89'
|
||||
})
|
||||
const isC = this.list.some(i => i.isCick)
|
||||
const params = {
|
||||
optType: 1,
|
||||
name: this.options[0].name,
|
||||
stepType: 0,
|
||||
isActive: 1,
|
||||
isCick: !isC,
|
||||
isShow: false,
|
||||
label: '权重评分:0%',
|
||||
weight: 0,
|
||||
roleDtos: JSON.parse(JSON.stringify(this.roleDtos.map(i => {
|
||||
if (i.type !== 1) i.checked = true
|
||||
return i
|
||||
})))
|
||||
}
|
||||
this.list.push(params)
|
||||
if (this.handleGetList().length === 2) {
|
||||
this.itemInfo = params
|
||||
}
|
||||
this.$forceUpdate()
|
||||
console.log('this.itemInfo: ', this.itemInfo)
|
||||
console.log('this.list: ', this.list)
|
||||
},
|
||||
handleDelete (item) {
|
||||
this.list = this.list.filter(i => i.id !== item.id)
|
||||
if (!this.list.some(i => i.id === this.activeId)) {
|
||||
this.activeId = this.list[0] ? this.list[0].id : null
|
||||
if (item.id) {
|
||||
item.isDelete = 1
|
||||
} else {
|
||||
this.list = this.list.filter(i => i !== item)
|
||||
}
|
||||
if (this.handleGetList().length === 1) {
|
||||
this.itemInfo = {}
|
||||
}
|
||||
if (!this.list.some(i => i.isCick && !i.isDelete)) {
|
||||
if (this.list[0]) {
|
||||
this.list[0].isCick = true
|
||||
this.itemInfo = this.list[0]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
watch: {
|
||||
isShow (n, o) {
|
||||
if (n && this.handleGetList().length === 1) this.handleAdd()
|
||||
},
|
||||
list: {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
this.$emit('update:info', this.list)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
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
|
||||
}
|
||||
if (n.weight >= 0) {
|
||||
n.label = '权重评分:' + n.weight + '%'
|
||||
} else {
|
||||
n.label = ''
|
||||
}
|
||||
console.log('n777: ', n)
|
||||
this.$forceUpdate()
|
||||
// n.roleIds = ''
|
||||
// n.roleDtos.map(i => {
|
||||
// n.roleIds += ''
|
||||
// })
|
||||
// n.roleIds = n.roleIds.substring(0, n.roleIds.length - 1)
|
||||
// this.$forceUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -137,18 +239,30 @@ export default {
|
||||
|
||||
<style lang='less' scoped>
|
||||
.ProcessList{
|
||||
.addP{
|
||||
padding-bottom: 20px;
|
||||
.center()
|
||||
}
|
||||
&-top{
|
||||
padding: 20px 0;
|
||||
padding: 20px 0 0 0;
|
||||
border-bottom: 1px solid @borderColor;
|
||||
display: flex;
|
||||
&-item{
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
.itemH{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.add{
|
||||
font-size: 30px;
|
||||
color: #c5c5c5;
|
||||
margin:0 4px ;
|
||||
}
|
||||
&-item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-bottom: 20px;
|
||||
|
||||
&-contant{
|
||||
position: relative;
|
||||
width: 136px;
|
||||
|
||||
@ -2,22 +2,32 @@
|
||||
<template>
|
||||
<div class="ToDevelop">
|
||||
<div class="ToDevelop-title commonFont">由谁制定:</div>
|
||||
<div class="commonFont">执行人:<el-radio v-model="radio" label="1">被考核人</el-radio></div>
|
||||
<div class="commonFont">执行人:<el-radio v-model="form.optType" :label="-1">被考核人</el-radio></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
prop: ['info'],
|
||||
data () {
|
||||
return {
|
||||
radio: '1'
|
||||
form: {
|
||||
optType: -1
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
beforeMount () {},
|
||||
mounted () {},
|
||||
mounted () {
|
||||
this.$emit('update:info', Object.assign({}, this.info, {
|
||||
chartDetails: {
|
||||
recordSimpleDtos: [this.form]
|
||||
}
|
||||
}))
|
||||
},
|
||||
methods: {},
|
||||
watch: {}
|
||||
watch: {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -6,17 +6,24 @@
|
||||
</div>
|
||||
<div class="process-title">
|
||||
<div class="process-title-item" v-for="(i,index) in processLsit" :key="i.id">
|
||||
<div @click="handleChangleTitle(i)" class="process-title-item-contant commonFont" :class="{active:componentId===i.componment}">
|
||||
<div @click="handleChangleTitle(i)" class="process-title-item-contant commonFont" :class="{active:isActive===i.name}">
|
||||
<span>{{i.name}}</span>
|
||||
<span>{{i.label}}</span>
|
||||
<span>{{i.label||''}}</span>
|
||||
</div>
|
||||
<div v-if="index+1 !==processLsit.length" class="process-title-item-img">
|
||||
<img src="./imgs/right.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process-content">
|
||||
<component :is="componentId"></component>
|
||||
<div v-if="noInfo" class="process-content">
|
||||
<!-- {{isActive}} -->
|
||||
<ToDevelop v-show="isActive==='目标制定'" :info.sync='info.ToDevelopInfo'/>
|
||||
<Confirm v-show="isActive==='目标确认'" :info.sync='info.ConfirmInfo'/>
|
||||
<Perform v-show="isActive==='执行中'" :info.sync='info.PerformInfo'/>
|
||||
<Entry v-show="isActive==='结果录入'" :info.sync='info.EntryInfo'/>
|
||||
<Score v-show="isActive==='评分'" :info.sync='info.ScoreInfo'/>
|
||||
<Approval v-show="isActive==='审批节点'" :info.sync='info.ApprovalInfo'/>
|
||||
<!-- <component :is="componentId" :info.sync='isActive'></component> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -32,64 +39,101 @@ import Approval from './Approval'
|
||||
import {getByFlowManagerId, saveDetailProcs} from '@/api/workbench'
|
||||
console.log('saveDetailProcs: ', saveDetailProcs)
|
||||
export default {
|
||||
props: ['processInfo'],
|
||||
data () {
|
||||
return {
|
||||
componentId: 'Approval',
|
||||
noInfo: false,
|
||||
isActive: {},
|
||||
// componentId: 'Approval',
|
||||
radio: '1',
|
||||
processLsit: [{
|
||||
id: 1,
|
||||
info: {
|
||||
ToDevelopInfo: {},
|
||||
ConfirmInfo: {
|
||||
status: 0,
|
||||
roleDtos: [],
|
||||
chartDetails: {
|
||||
status: 0
|
||||
}
|
||||
},
|
||||
PerformInfo: {},
|
||||
EntryInfo: {},
|
||||
ScoreInfo: {},
|
||||
ApprovalInfo: {}
|
||||
},
|
||||
processLsit: [],
|
||||
processLsitCopy: [{
|
||||
name: '目标制定',
|
||||
label: '被考核人',
|
||||
componment: 'ToDevelop'
|
||||
}, {
|
||||
id: 2,
|
||||
name: '目标确认',
|
||||
label: '',
|
||||
componment: 'Confirm'
|
||||
}, {
|
||||
id: 3,
|
||||
name: '执行中',
|
||||
label: '',
|
||||
componment: 'Perform'
|
||||
}, {
|
||||
id: 4,
|
||||
name: '结果录入',
|
||||
label: '',
|
||||
componment: 'Entry'
|
||||
}, {
|
||||
id: 5,
|
||||
name: '评分:上级评分',
|
||||
label: '评分权重:100%',
|
||||
name: '评分',
|
||||
componment: 'Score'
|
||||
}, {
|
||||
id: 6,
|
||||
name: '审批节点',
|
||||
label: '已禁用',
|
||||
componment: 'Approval'
|
||||
} ]
|
||||
} ],
|
||||
dataObject: {}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
PopupRight, ToDevelop, Confirm, Perform, Entry, Score, Approval
|
||||
},
|
||||
computed: {},
|
||||
computed: {
|
||||
// componentId () {
|
||||
// if (!this.isActive.name) return ''
|
||||
// return this.processLsitCopy.filter(i => i.name === this.isActive.name)[0].componment
|
||||
// }
|
||||
},
|
||||
beforeMount () {},
|
||||
mounted () {
|
||||
// this.handleGetByFlowManagerId()
|
||||
this.handleGetByFlowManagerId()
|
||||
},
|
||||
methods: {
|
||||
// 获取流程大节点
|
||||
async handleGetByFlowManagerId (id = 1) {
|
||||
const res = await getByFlowManagerId({id})
|
||||
try {
|
||||
const res = await getByFlowManagerId({
|
||||
id: 1,
|
||||
groupId: 24
|
||||
})
|
||||
|
||||
this.processLsit = res
|
||||
console.log('res: ', res)
|
||||
},
|
||||
handleChangleTitle (i) {
|
||||
this.isActive = i.id
|
||||
this.componentId = i.componment
|
||||
this.processLsitCopy.map(i => {
|
||||
this.info[i.componment + 'Info'] = this.processLsit.filter(j => j.name === i.name)[0]
|
||||
})
|
||||
this.isActive = this.processLsit[0].name
|
||||
this.noInfo = true
|
||||
} catch (error) {
|
||||
console.log('error: ', error)
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
handleChangleTitle (i) {
|
||||
this.isActive = i.name
|
||||
// this.componentId = i.componment
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
info: {
|
||||
handler (n, o) {
|
||||
this.processLsit.map(j => {
|
||||
for (let i in n) {
|
||||
if (j.id === n[i].id) j.label = n[i].label
|
||||
}
|
||||
})
|
||||
this.$emit('update:processInfo', n)
|
||||
this.$forceUpdate()
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<div class="eidt-content boderAndRadius">
|
||||
<basis :basisForm.sync='basisForm' v-show="active===1"/>
|
||||
<template-set :templateForm.sync='templateForm' v-show="active===2"/>
|
||||
<process v-show="active===3"/>
|
||||
<process :processInfo.sync='processInfo' v-show="active===3"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -26,7 +26,7 @@ import {saveBaseSet, saveTemSet} from '@/api/workbench'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
active: 1,
|
||||
active: 3,
|
||||
// 基础
|
||||
basisForm: {
|
||||
// id: 8,
|
||||
@ -37,6 +37,7 @@ export default {
|
||||
staffIds: '', // 参与考核员工staff_id,逗号隔开.
|
||||
name: ''
|
||||
},
|
||||
processInfo: {},
|
||||
templateForm: {
|
||||
calculateId: 1,
|
||||
modelItems: []
|
||||
@ -60,24 +61,24 @@ export default {
|
||||
},
|
||||
|
||||
async handSaveBasisc () {
|
||||
console.log('this.templateForm: ', this.templateForm)
|
||||
console.log('this.basisForm: ', this.basisForm)
|
||||
try {
|
||||
let res = await saveBaseSet(this.basisForm)
|
||||
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)
|
||||
console.log('this.processInfo: ', this.processInfo)
|
||||
// console.log('this.basisForm: ', this.basisForm)
|
||||
// try {
|
||||
// let res = await saveBaseSet(this.basisForm)
|
||||
// this.basisForm = res
|
||||
console.log('res: ', res)
|
||||
} catch (error) {
|
||||
this.$message.error(error.msg)
|
||||
}
|
||||
// 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)
|
||||
// }
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@click="handleDelete(scope.row.id)"
|
||||
@click="handlePush(scope.row.id)"
|
||||
type="text"
|
||||
size="small">
|
||||
编 辑
|
||||
@ -85,6 +85,9 @@ export default {
|
||||
this.handleGetData()
|
||||
},
|
||||
methods: {
|
||||
handlePush (id) {
|
||||
this.$router.push({name: 'workbench-edit-group', query: {id}})
|
||||
},
|
||||
handleChange (value) {
|
||||
this.params = {
|
||||
'currPage': 1,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user