指定目标

考核模板
添加选择指标项
This commit is contained in:
zhujida 2021-01-22 16:57:03 +08:00
parent 654de5b250
commit 449613c13e
8 changed files with 997 additions and 551 deletions

View File

@ -9,36 +9,60 @@
subumitText="确定" subumitText="确定"
class="popup commonFont" class="popup commonFont"
> >
<div slot="content"> <div
<div class="search-header"> slot="content"
class="popup-choose-target"
>
<div class="popup-choose-target-header">
<el-button <el-button
@click="handleFiltrate" @click="isShowPopupFiltrate = true"
type="primary" type="primary"
plain plain
size="small" size="small"
>筛选</el-button> >筛选</el-button>
<el-input <el-input
@change="handleSearch" @change="handleSearch"
v-model="searchInputValue" v-model="queryData.name"
placeholder="请输入内容" placeholder="请输入内容"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
size="small" size="small"
clearable clearable
></el-input> ></el-input>
</div> </div>
<!-- <div
class="popup-choose-target-tags"
v-if="this.selectedTargetType"
>筛选条件<el-tag
@close="handleFilterTagClose"
type="warning"
closable
size="small"
>{{this.selectedTargetType.name}}</el-tag>共筛选出<span class="target-main-header-tags-sum">{{this.tableData.length}}</span>个指标</div> -->
<el-table <el-table
data="tableData" :data="tableData"
selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<div
slot="empty"
class="comonPromptFont"
>{{$isStringEmpty(this.queryData.name)?'暂无数据':'未找到关于'+this.queryData.name+'的结果'}}</div>
<el-table-column
type="selection"
width="40"
>
</el-table-column>
<el-table-column <el-table-column
label="全选" label="全选"
prop="name" prop="name"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
align="right"
label="" label=""
prop="quanzhong" prop="weight"
width="60px" width="100px"
></el-table-column> :formatter="(row,column,cellValue,index)=> cellValue*100+'%'"
>
</el-table-column>
</el-table> </el-table>
<div class="comonPromptFont filtrate-prompt">没有更多了</div> <div class="comonPromptFont filtrate-prompt">没有更多了</div>
<div <div
@ -50,48 +74,104 @@
</popup-right> </popup-right>
<target-filtrate <target-filtrate
:isShowTargetFiltrate.sync="isShowPopupFiltrate" :isShowTargetFiltrate.sync="isShowPopupFiltrate"
@cb="handelTargetFilter" :indicatorType.sync="queryData.indicatorType"
@cd="handelTargetFilterSubmit"
:isClasseType="true"
/> />
</div> </div>
</template> </template>
<script> <script>
import PopupRight from '@/components/PopupRight' import PopupRight from '@/components/PopupRight'
import TargetFiltrate from '@/components/TargetFiltrate' import TargetFiltrate from '@/components/TargetFiltrate'
import { apiGetIndicatorLibraryList } from '@/api/target'
export default { export default {
methods: { methods: {
handleFiltrate () {
console.log('筛选-标签类别')
},
handleSearch (val) { handleSearch (val) {
console.log('搜索-----') this.handleGetTargetList(this.queryData.indicatorType, this.queryData.name)
console.log(val)
}, },
handleSelectionChange (val) { handleSelectionChange (val) {
// //
this.selectedList = val this.selectedList = val
console.log('选中------')
console.log(val)
}, },
handelTargetFilter (list) { handelTargetFilterSubmit (val) {
// //
this.isShowPopupFiltrate = true this.selectedTargetType = val
console.log(list) this.queryData.indicatorType = val ? val.id : -1
this.handleGetTargetList(this.queryData.indicatorType, this.queryData.name)
},
handleFilterTagClose () {
//
this.selectedTargetType = null
this.queryData.type = -1
this.handleGetTargetList(this.queryData.indicatorType, this.queryData.name)
}, },
hundlePopupHide () { hundlePopupHide () {
this.$emit('update:isShowPopup', false) this.$emit('update:isShowPopup', false)
}, },
handleSubmitPopup () { handleSubmitPopup () {
this.$emit('cd', this.selectedList) this.$emit('cd', this.selectedList)
// this.$emit('update:isShowPopup', false) console.log('选中')
console.dir(this.selectedList)
this.$emit('update:isShowPopup', false)
},
//
handleGetTargetList (indicatorType = -1, name = '') {
this.selectedList = []
this.queryData.name = name
this.queryData.indicatorType = indicatorType
let para = {
currPage: 1,
pageSize: 2000,
name: name
}
if (indicatorType !== -1) {
para['indicatorType'] = indicatorType
}
if (this.dimensionTypeId !== -1) {
para['type'] = this.dimensionTypeId
}
apiGetIndicatorLibraryList(para).then(res => {
if (res.code === 200) {
let data = res.data
let nowDataList = data.list.filter(item => {
let nowItem = this.filtersList.filter(filter => {
return item.name === filter.name
})
return nowItem.length === 0
})
this.$nextTick(res => {
this.tableData = nowDataList
})
}
})
} }
}, },
data () { data () {
return { return {
isShowPopupFiltrate: false, isShowPopupFiltrate: false,
searchInputValue: '', selectedTargetType: null,
queryData: {
name: '',
indicatorType: -1 //
},
tableData: [], tableData: [],
selectedList: [] selectedList: []
} }
}, },
watch: {
isShowPopup (now) {
if (now) {
this.handleGetTargetList()
} else {
this.queryData.indicatorType = -1
this.queryData.name = ''
this.tableData = []
}
}
},
components: { components: {
PopupRight, PopupRight,
TargetFiltrate TargetFiltrate
@ -101,17 +181,42 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
dataList: { //
filtersList: {
type: Array, type: Array,
default: () => { default: () => {
return [{ id: 1, name: '全部指标' }, { id: 2, name: '全部指标' }] return []
} }
},
// ID
dimensionTypeId: {
type: Number,
default: -1
} }
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.popup { .popup {
&-choose-target {
&-header {
display: flex;
margin-bottom: 10px;
.el-button {
margin-right: 10px;
}
}
}
&-tags {
padding: 10px 0px;
.el-tag {
margin-right: 10px;
}
&-sum {
color: @fontBlue;
font-size: 14px;
}
}
.filtrate-prompt { .filtrate-prompt {
text-align: center; text-align: center;
padding: 15px; padding: 15px;

View File

@ -42,6 +42,7 @@ export default {
apiGetIndicatorType({ type: 0 }).then(res => { apiGetIndicatorType({ type: 0 }).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.tableData = res.data.list this.tableData = res.data.list
this.tableData.push({ id: 0, name: '未分类指标' })
} }
}) })
} }
@ -67,6 +68,9 @@ export default {
isShowPopupRadio (now) { isShowPopupRadio (now) {
if (now) { if (now) {
this.handleGetClasseList() this.handleGetClasseList()
} else {
this.radioSelectedId = ''
this.tableData = []
} }
} }
}, },

View File

@ -33,6 +33,8 @@
<script> <script>
import PopupRight from '@/components/PopupRight' import PopupRight from '@/components/PopupRight'
import { apiGetIndicatorType } from '@/api/target' import { apiGetIndicatorType } from '@/api/target'
import { getDimensions } from '@/api/data'
export default { export default {
methods: { methods: {
hundlePopupHide () { hundlePopupHide () {
@ -53,21 +55,36 @@ export default {
this.areaSelectedDic = val.id === -1 ? null : val this.areaSelectedDic = val.id === -1 ? null : val
}, },
handleGetTargetTypelist () { handleGetTargetTypelist () {
// //
let para = { if (this.isClasseType) {
currPage: 1, let para = {
pageSize: 200, currPage: 1,
type: 1 pageSize: 200,
} type: 0
apiGetIndicatorType(para).then(res => {
if (res.code === 200) {
let data = res.data
this.$nextTick(() => {
this.listData[0].list = [{ id: -1, name: '全部' }].concat(data.list)
console.log(this.listData)
})
} }
}) apiGetIndicatorType(para).then(res => {
if (res.code === 200) {
let data = res.data
this.$nextTick(() => {
this.listData[0].list = [{ id: -1, name: '全部' }].concat(data.list)
console.log(this.listData)
})
}
})
} else {
//
//
getDimensions().then(res => {
this.$nextTick(() => {
if (res.code !== 200) {
this.listData[0].list = []
this.$message.error(res.msg)
return
}
this.listData[0].list = [{ id: -1, name: '全部' }].concat(res.data)
})
})
}
} }
}, },
data () { data () {
@ -81,9 +98,9 @@ export default {
radioTage: 1, radioTage: 1,
listData: [ listData: [
{ {
title: '类型', title: this.isClasseType ? '分类' : '类型',
id: 'id', id: 'id',
selectedId: -1, selectedId: this.indicatorType,
btnDef: 'area-content-item btn-def', btnDef: 'area-content-item btn-def',
btnSelected: 'area-content-item btn-def btn-def-selected', btnSelected: 'area-content-item btn-def btn-def-selected',
list: [] list: []
@ -104,12 +121,11 @@ export default {
}, },
watch: { watch: {
isShowTargetFiltrate (now, old) { isShowTargetFiltrate (now, old) {
console.log('old:' + old)
console.log('now:' + now)
if (now) { if (now) {
this.handleGetTargetTypelist() this.handleGetTargetTypelist()
} }
} }
}, },
props: { props: {
isShowTargetFiltrate: { isShowTargetFiltrate: {
@ -119,6 +135,14 @@ export default {
popupRightTitle: { popupRightTitle: {
default: '筛选', default: '筛选',
type: String type: String
},
isClasseType: {
type: Boolean,
default: false // FALSE true
},
indicatorType: {
default: -1,
type: Number
} }
}, },
components: { components: {

View File

@ -135,7 +135,7 @@
</div> </div>
<div style=" padding: 10px;"> <div style=" padding: 10px;">
<el-button <el-button
@click="handelChooseTarger(i,index)" @click="handelChooseTarger(i,-1,index)"
icon="el-icon-finished" icon="el-icon-finished"
type="primary" type="primary"
size="small" size="small"
@ -299,6 +299,12 @@
>提交</el-button> >提交</el-button>
</div> </div>
</div> </div>
<!-- 选择指标项 -->
<ChooseTarget
:isShowPopup.sync="popupChooseTargetModel.isShow"
:dimensionTypeId.sync="popupChooseTargetModel.dimensionTypeId"
@cd="handleChooseTargetSubmit"
/>
</div> </div>
</template> </template>
@ -306,81 +312,13 @@
import SmallNav from '@/components/kpi-layout/SmallNav' import SmallNav from '@/components/kpi-layout/SmallNav'
import InfoHeader from '@/components/InfoHeader' import InfoHeader from '@/components/InfoHeader'
import PopupRight from '@/components/PopupRight' import PopupRight from '@/components/PopupRight'
import ChooseTarget from '@/components/ChooseTarget'
import draggable from 'vuedraggable' import draggable from 'vuedraggable'
import { getDimensions } from '@/api/data' import { getDimensions } from '@/api/data'
import { apiResultGetDetail, apiSaveDetail, apiSaveapproval } from '@/api/assessment' import { apiResultGetDetail, apiSaveDetail, apiSaveapproval } from '@/api/assessment'
import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete' import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete'
export default { export default {
data () {
return {
showTask: false,
taskTitle: '添加任务',
formItem: {},
editItem: {},
formTask: {
name: '',
processRate: '0'
},
zhibiaoTitle: '添加指标',
showIndicators: false,
dimensionsList: [],
formIndicators: {},
ruleIndicators: {
name: [{
required: true,
message: '请输入任务名称',
trigger: 'blur'
}
],
target: [{
required: true,
message: '请输入指标名称',
trigger: 'blur'
}
],
keyResult: [{
required: true,
message: '请输入考核标准',
trigger: 'blur'
}
],
checkWeight: [{
required: true,
message: '请输入权重大小',
trigger: 'blur'
}
]
},
activeId: null,
obj: {
recortModelDto: []
},
options1: {
group: 'names',
draggable: '.items',
handle: '.my-handle',
scroll: true,
sort: true, //
delay: 0, //
touchStartThreshold: 0, // px,?
disabled: false, // sortable
store: null, // @see Store
animation: 150 // ms, ' 0 ' -
}
}
},
components: {
SmallNav,
InfoHeader,
draggable,
PopupRight
},
computed: {},
beforeMount () { },
mounted () {
this.handleGetDimensions()
this.handleGetTbale()
},
methods: { methods: {
// //
handleDeleteTask (parent, item) { handleDeleteTask (parent, item) {
@ -622,6 +560,7 @@ export default {
this.$refs.formIndicators.validate((v) => { this.$refs.formIndicators.validate((v) => {
if (v) { if (v) {
if (this.formIndicators.index === -1) { if (this.formIndicators.index === -1) {
let sssf = Object.assign({}, this.formIndicators, { checkWeight: this.formIndicators.checkWeight / 100 })
arr.push(Object.assign({}, this.formIndicators, { checkWeight: this.formIndicators.checkWeight / 100 })) arr.push(Object.assign({}, this.formIndicators, { checkWeight: this.formIndicators.checkWeight / 100 }))
} else { } else {
let _index = 0 let _index = 0
@ -640,11 +579,33 @@ export default {
} }
}) })
}, },
handelChooseTarger (item, index) { handelChooseTarger (item, index, type) {
// //
console.log('选择指标项-------') if (item.maxCount !== null) {
console.dir(item) const len = this.handleNumber(item)
console.log(index) if (item.maxCount <= len) {
this.$message.info('指标数量不能大于' + item.maxCount)
return
}
}
this.popupChooseTargetModel.dimensionTypeId = item.type
this.popupChooseTargetModel.dazhibiaoIndex = type
this.$forceUpdate()
this.popupChooseTargetModel.isShow = true
},
handleChooseTargetSubmit (list) {
if (list.length <= 0) {
return
}
//
const index = this.popupChooseTargetModel.dazhibiaoIndex
const arr = this.obj.recortModelDtos[index].detailDtos
let nowList = list.map(item => {
return { isDelete: 0, checkWeight: item.weight * 100 / 100, target: item.name, keyResult: item.keyResult, type: item.type }
})
this.obj.recortModelDtos[index].detailDtos = arr.concat(nowList)
}, },
// //
hanidleEdit (item, index, type) { hanidleEdit (item, index, type) {
@ -697,7 +658,83 @@ export default {
this.activeId = String(res.data.recortModelDtos[0].id) this.activeId = String(res.data.recortModelDtos[0].id)
} }
}, },
watch: {} watch: {},
data () {
return {
showTask: false,
taskTitle: '添加任务',
formItem: {},
editItem: {},
formTask: {
name: '',
processRate: '0'
},
zhibiaoTitle: '添加指标',
showIndicators: false,
dimensionsList: [],
formIndicators: {},
ruleIndicators: {
name: [{
required: true,
message: '请输入任务名称',
trigger: 'blur'
}
],
target: [{
required: true,
message: '请输入指标名称',
trigger: 'blur'
}
],
keyResult: [{
required: true,
message: '请输入考核标准',
trigger: 'blur'
}
],
checkWeight: [{
required: true,
message: '请输入权重大小',
trigger: 'blur'
}
]
},
activeId: null,
obj: {
recortModelDto: []
},
options1: {
group: 'names',
draggable: '.items',
handle: '.my-handle',
scroll: true,
sort: true, //
delay: 0, //
touchStartThreshold: 0, // px,?
disabled: false, // sortable
store: null, // @see Store
animation: 150 // ms, ' 0 ' -
},
popupChooseTargetModel: {
isShow: false, //
dimensionTypeId: -1, //
dazhibiaoIndex: 0 //
}
}
},
components: {
SmallNav,
InfoHeader,
draggable,
PopupRight,
ChooseTarget
},
computed: {},
beforeMount () { },
mounted () {
this.handleGetDimensions()
this.handleGetTbale()
}
} }

View File

@ -76,8 +76,8 @@
v-model="formData.weight" v-model="formData.weight"
placeholder="请输入指标名称" placeholder="请输入指标名称"
clearable clearable
oninput="value=value.replace(/^\.+|[^\d.]/g,'')" @blur="$handleBlur('formData.weight')"
@change="handleWeightChange" @input.native="$handleInputInt('formData.weight')"
> >
<el-button slot="append">%</el-button> <el-button slot="append">%</el-button>
</el-input> </el-input>
@ -96,78 +96,97 @@
</template> </template>
<script> <script>
import { apiGetIndicatorType, apiGetIndicatorLibraryEdit } from '@/api/target' import { apiGetIndicatorType, apiGetIndicatorLibraryEdit } from '@/api/target'
import { getDimensions } from '@/api/data'
export default { export default {
methods: { methods: {
handleWeightChange (val) { // handleWeightChange (val) {
if (val) { // if (val) {
if (val.length > 0) { // if (val.length > 0) {
let weight = parseFloat(this.formData.weight) // let weight = parseFloat(this.formData.weight)
this.formData.weight = weight // this.formData.weight = weight
} // }
console.log(this.formData.weight) // console.log(this.formData.weight)
// if (val.length > 0) { // // if (val.length > 0) {
// let weightTwo = weight.toFixed(2).toString() // // let weightTwo = weight.toFixed(2).toString()
// let arr = weightTwo.split('.') // // let arr = weightTwo.split('.')
// if (arr.length === 2) { // // if (arr.length === 2) {
// /* eslint-disable */ // // /* eslint-disable */
// for (let index = weightTwo.length - 1;index < weightTwo.length;index--) { // // for (let index = weightTwo.length - 1;index < weightTwo.length;index--) {
// let sub = weightTwo.substring(index, 1) // // let sub = weightTwo.substring(index, 1)
// if (sub !== '0' && sub !== '.') { // // if (sub !== '0' && sub !== '.') {
// weightTwo = weightTwo.substring(0, index) // // weightTwo = weightTwo.substring(0, index)
// break // // break
// } // // }
// } // // }
// console.log(weightTwo) // // console.log(weightTwo)
// } // // }
// } // // }
} // }
}, // },
handleSaveSet () { handleSaveSet () {
// //
this.$refs.formTarget.validate((valid) => { this.$refs.formTarget.validate((valid) => {
if (valid) { if (valid) {
apiGetIndicatorLibraryEdit(this.formData).then(res => { let weight = this.formData.weight
if (weight) {
weight = this.formData.weight / 100 > 1 ? 1 : this.formData.weight / 100
}
let para = {
indicatorType: this.formData.indicatorType,
type: this.formData.type,
name: this.formData.name,
keyResult: this.formData.keyResult,
weight: weight
}
if (this.formData.id) {
para['id'] = this.formData.id
}
apiGetIndicatorLibraryEdit(para).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success(res.msg) this.$message.success(res.msg)
this.$router.go(-1) this.$router.go(-1)
} }
}) })
} else { } else {
console.log('error submit!!')
return false return false
} }
}) })
}, },
handleGetIndicatorType (type = 0) { handleGetIndicatorType () {
let para = { let para = {
currPage: 1, currPage: 1,
type: type, type: 0,
pageSize: 40 pageSize: 40
} }
apiGetIndicatorType(para).then(res => { apiGetIndicatorType(para).then(res => {
if (res.code === 200) { if (res.code === 200) {
let data = res.data let data = res.data
if (type === 0) { //
// this.calsseDataList = data.list
this.calsseDataList = data.list this.calsseDataList.push({ id: 0, name: '未分类指标' })
this.calsseDataList.push({ id: 0, name: '未分类指标' }) if (this.calsseDataList.length > 0 && this.changeTargetId === -1) {
if (this.calsseDataList.length > 0 && this.changeTargetId === -1) { let item = data.list[0]
let item = data.list[0] this.formData.indicatorType = item.id
this.formData.indicatorType = item.id
}
} else {
//
this.targetTypeList = data.list
if (this.targetTypeList.length > 0 && this.changeTargetId === -1) {
let item = data.list[0]
this.formData.type = item.id
}
} }
} else { } else {
if (type === 0) { this.$message.error(res.msg)
this.formData.indicatorType = 0 }
} })
},
handleGetDimensionsList () {
//
getDimensions().then(res => {
if (res.code !== 200) {
this.targetTypeList = []
this.$message.error(res.msg)
return
}
this.targetTypeList = res.data
if (this.targetTypeList.length > 0 && this.changeTargetId === -1) {
let item = res.data[0]
this.formData.type = item.id
} }
}) })
} }
@ -180,14 +199,14 @@ export default {
this.formData = this.$route.query this.formData = this.$route.query
} }
// //
this.handleGetIndicatorType(0) this.handleGetIndicatorType()
this.handleGetIndicatorType(1) this.handleGetDimensionsList()
}, },
data () { data () {
return { return {
changeTargetId: -1, // id changeTargetId: -1, // id
// indicatorType: 0, type: 0, name: '', keyResult: '', weight: '' // indicatorType: 0, type: 0, name: '', keyResult: '', weight: ''
formData: {}, formData: { indicatorType: 0, type: 0, name: '', keyResult: '', weight: '' },
formRules: { formRules: {
indicatorType: [{ required: true, message: '请选择指标分类', trigger: 'blur' }], indicatorType: [{ required: true, message: '请选择指标分类', trigger: 'blur' }],
name: [{ required: true, message: '请选择指标名称', trigger: 'blur' }] name: [{ required: true, message: '请选择指标名称', trigger: 'blur' }]

View File

@ -132,7 +132,7 @@
<el-table-column <el-table-column
label="指标类型" label="指标类型"
sortable sortable
prop="type" prop="typeName"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="考核标准" label="考核标准"
@ -142,10 +142,8 @@
label="权重" label="权重"
sortable sortable
prop="weight" prop="weight"
:formatter="(row, column, cellValue, index)=>cellValue*100+'%'"
> >
<template slot-scope="scope">
{{scope.row.weight}}%
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
@ -348,10 +346,12 @@ export default {
id: val.id, id: val.id,
name: val.name, name: val.name,
keyResult: val.keyResult, keyResult: val.keyResult,
weight: val.weight, weight: val.weight * 100,
type: val.type, type: val.type,
indicatorType: val.indicatorType indicatorType: val.indicatorType
} }
console.log('跳转')
console.dir(val)
this.$router.push({ name: 'workbench-target-add', query: changeVal }) this.$router.push({ name: 'workbench-target-add', query: changeVal })
}, },
handleSelectionChange (val) { handleSelectionChange (val) {

View File

@ -1,20 +1,45 @@
<!-- --> <!-- -->
<template> <template>
<div class="eidt"> <div class="eidt">
<div class="eidt-header"> <div class="eidt-header">
<div @click="handleChangle(1)" :class="{active:active===1}" class="a commonFont" ><span class="eidt-header-circle">1</span>基础设置</div> <div
<div @click="handleChangle(2)" :class="{active:active===2}" class="a commonFont"><span class="eidt-header-circle">2</span>模板设计</div> @click="handleChangle(1)"
<div @click="handleChangle(3)" :class="{active:active===3}" class="a commonFont"><span class="eidt-header-circle">3</span>流程设计</div> :class="{active:active===1}"
</div> class="a commonFont"
<div class="eidt-right"> ><span class="eidt-header-circle">1</span>基础设置</div>
<el-button :loading='loadings' type="primary" @click="handSaveBasisc"> </el-button> <div
</div> @click="handleChangle(2)"
<div class="eidt-content boderAndRadius"> :class="{active:active===2}"
<basis :basisForm.sync='basisForm' v-show="active===1"/> class="a commonFont"
<template-set :templateForm.sync='templateForm' v-show="active===2"/> ><span class="eidt-header-circle">2</span>模板设计</div>
<process :processInfo.sync='processInfo' v-show="active===3"/> <div
</div> @click="handleChangle(3)"
:class="{active:active===3}"
class="a commonFont"
><span class="eidt-header-circle">3</span>流程设计</div>
</div> </div>
<div class="eidt-right">
<el-button
:loading='loadings'
type="primary"
@click="handSaveBasisc"
> </el-button>
</div>
<div class="eidt-content boderAndRadius">
<basis
:basisForm.sync='basisForm'
v-show="active===1"
/>
<template-set
:templateForm.sync='templateForm'
v-show="active===2"
/>
<process
:processInfo.sync='processInfo'
v-show="active===3"
/>
</div>
</div>
</template> </template>
<script> <script>
@ -51,7 +76,7 @@ export default {
templateSet templateSet
}, },
computed: {}, computed: {},
beforeMount () {}, beforeMount () { },
created () { created () {
const id = this.$route.query.id const id = this.$route.query.id
this.$route.meta.title = !id ? '新增考评组' : '编辑考评组' this.$route.meta.title = !id ? '新增考评组' : '编辑考评组'
@ -106,7 +131,7 @@ export default {
this.loadings = true this.loadings = true
try { try {
this.$loadingStart() this.$loadingStart()
let res12 = await apiCheckStaff(Object.assign({}, this.basisForm, {confirm: 1})) let res12 = await apiCheckStaff(Object.assign({}, this.basisForm, { confirm: 1 }))
let res = await saveBaseSet(this.basisForm) let res = await saveBaseSet(this.basisForm)
if (res.code !== 200) { if (res.code !== 200) {
this.loadings = false this.loadings = false
@ -132,7 +157,7 @@ export default {
return i return i
}) })
} }
let res1 = await saveDetailProcs(Object.assign({}, this.processInfo[i].chartDetails, {evaluationGroupId: this.basisForm.id})) let res1 = await saveDetailProcs(Object.assign({}, this.processInfo[i].chartDetails, { evaluationGroupId: this.basisForm.id }))
if (res1.code !== 200) { if (res1.code !== 200) {
this.loadings = false this.loadings = false
this.$loadingEnd() this.$loadingEnd()
@ -176,7 +201,7 @@ export default {
type: 'success', type: 'success',
duration: 1000, duration: 1000,
onClose: () => { onClose: () => {
this.$router.replace({name: 'workbench-group'}) this.$router.replace({ name: 'workbench-group' })
} }
}) })
} }
@ -188,23 +213,23 @@ export default {
</script> </script>
<style lang='less' scoped> <style lang='less' scoped>
.eidt{ .eidt {
position: relative; position: relative;
&-right{ &-right {
position: absolute; position: absolute;
z-index: 50; z-index: 50;
top: -(@headerHeight+30px); top: -(@headerHeight+30px);
right: 0; right: 0;
height: @headerHeight; height: @headerHeight;
.center() .center();
} }
&-content{ &-content {
min-height: 600px; min-height: 600px;
background: #fff; background: #fff;
padding: 40px 28px; padding: 40px 28px;
overflow: auto; overflow: auto;
} }
&-header{ &-header {
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
z-index: 50; z-index: 50;
@ -216,18 +241,18 @@ export default {
margin: auto; margin: auto;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
>div{ > div {
flex:1; flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
letter-spacing:1px letter-spacing: 1px;
} }
.active{ .active {
background: @fontBlue; background: @fontBlue;
color: #fff; color: #fff;
} }
&-circle{ &-circle {
margin: 0 4px; margin: 0 4px;
display: inline-block; display: inline-block;
border: 1px solid #eeeeee; border: 1px solid #eeeeee;