This commit is contained in:
sean yu 2020-10-27 16:23:57 +08:00
commit 7222e2e664
18 changed files with 200 additions and 43 deletions

View File

@ -1,6 +1,6 @@
<template>
<div id="app">
<router-view/>
<router-view class="main"/>
</div>
</template>

View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 发起考核
export function apiInitiateAssessmentInfo (query) {
return request({
url: '/lz_management/flowStart/save',
method: 'POST',
data: query
})
}

View File

@ -70,12 +70,3 @@ export function saveDetailProcs (query) {
data: query
})
}
// 发起考核
export function sendAssessmentInfo (query) {
return request({
url: '/lz_management/flowStart/save',
method: 'POST',
data: query
})
}

View File

@ -2,7 +2,7 @@
<template>
<div class="appamin">
<transition name="fade" mode="out-in">
<router-view ></router-view>
<router-view class="mainContent"></router-view>
</transition>
</div>
</template>
@ -31,6 +31,10 @@ export default {
box-sizing: border-box;
padding: 90px 80px 30px;
}
.mainContent{
width: 1360px;
margin: 0 auto;
}
</style>
<style lang="less">

View File

@ -29,6 +29,10 @@ export default {
mounted () {},
methods: {
handleBack () {
const name = this.$route.query.name
if (name) {
return this.$router.replace({name})
}
this.$router.go(-1)
}
},

View File

@ -88,6 +88,15 @@ export default [
title: '员工绩效详情',
isNav: true
}
},
{
path: 'goals',
name: 'assessment-goals',
component: (resolve) => require(['@/views/kpi/assessment/goals/index.vue'], resolve),
meta: {
title: '制定目标',
isNav: true
}
}
]
}, {

View File

@ -28,14 +28,20 @@ import {
Popover,
Pagination,
Cascader,
Tabs,
TabPane,
Menu,
MenuItem
MenuItem,
Loading
} from 'element-ui'
Vue.prototype.$loading = Loading
Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm
Vue.prototype.$alert = MessageBox.alert
Vue.use(Tabs)
Vue.use(TabPane)
Vue.use(Cascader)
Vue.use(Pagination)
Vue.use(Popover)

View File

@ -1,5 +1,12 @@
import axios from 'axios'
import { Message } from 'element-ui'
import { Message, Loading } from 'element-ui'
// const id = Loading.service({
// target: document.querySelector('.appamin'),
// background: 'rgba(255, 255, 255, 0.1)',
// spinner: 'el-icon-loading',
// text: '请求加载中。。。'
// })
// id.close()
// import store from '@/store'
// import { getToken } from '@/utils/auth'
// import errorCode from '@/utils/errorCode'
@ -14,8 +21,17 @@ const service = axios.create({
// 超时
timeout: 1500000
})
const options = {
fullscreen: true,
target: document.querySelector('.appamin'),
background: 'rgba(255, 255, 255, 0.1)',
spinner: 'el-icon-loading',
text: '请求加载中。。。'}
// request拦截器
service.interceptors.request.use(config => {
Loading.service(options)
// 是否需要设置 token
// const isToken = (config.headers || {}).isToken === false
// if (getToken() && !isToken) {
@ -29,6 +45,10 @@ service.interceptors.request.use(config => {
// 响应拦截器
service.interceptors.response.use(res => {
const id = setTimeout(() => {
Loading.service(options).close()
clearTimeout(id)
}, 300)
// 未设置状态码则默认成功状态
const code = res.data.code || 200
if (code !== 200) {
@ -37,10 +57,14 @@ service.interceptors.response.use(res => {
if (res.config.responseType === 'blob') {
return res
}
return res.data.data
return res.data
}
},
error => {
const id = setTimeout(() => {
Loading.service(options).close()
clearTimeout(id)
}, 300)
console.log('err' + error)
let { message } = error
if (message === 'Network Error') {

View File

@ -0,0 +1,81 @@
<!-- -->
<template>
<div class="goals">
<SmallNav />
<div class="goals-content boderAndRadius">
<div class="goals-content-title">
<div class="goals-content-title-img">
<img src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2346299354,1694591848&fm=26&gp=0.jpg" alt="">
</div>
<div class="goals-content-title-right commonFont">
<span style="font-size:14px;">熊成强</span>
<span style="font-size:12px;">技术部门</span>
</div>
</div>
<div class="goals-content-tabbar">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="用户管理" name="first">用户管理</el-tab-pane>
<el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
<el-tab-pane label="角色管理" name="third">角色管理</el-tab-pane>
<el-tab-pane label="定时任务补偿" name="fourth">定时任务补偿</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</template>
<script>
import SmallNav from '@/components/kpi-layout/SmallNav'
export default {
data () {
return {
activeName: 'second'
}
},
components: {
SmallNav
},
computed: {},
beforeMount () {},
mounted () {},
methods: {
handleClick (tab, event) {
console.log(tab, event)
}
},
watch: {}
}
</script>
<style lang='less' scoped>
.goals{
&-content{
padding: 28px;
&-title{
margin: 0 0 10PX 0;
display: flex;
align-items: center;
&-img{
width: 40px;
height: 40px;
border-radius: 50%;
overflow: hidden;
img{
width: 100%;
height: 100%;
}
}
&-right{
margin-left: 20px;
display: flex;
flex-direction: column;
}
}
&-tabbar{
}
}
}
</style>

View File

@ -164,12 +164,12 @@ export default {
this.handleGetData(Object.assign({}, this.form, this.params))
},
handlePush (id) {
this.$router.push({name: 'assessment-stepList', query: {id}})
this.$router.push({name: 'assessment-stepList', query: {id: 10, name: 'workbench-home'}})
},
async handleGetData (parmas = this.params) {
try {
const res = await apiGetAssessList(parmas)
console.log('res: ', res)
let res = await apiGetAssessList(parmas)
res = res.data
this.tableData = res.list
this.params.totalCount = res.totalCount
this.params.currPage = res.currPage

View File

@ -15,7 +15,7 @@
</el-select>
</div>
<div class="performance-content-top-right">
<el-button size="small" plain>沟通管理</el-button>
<el-button size="small" @click="handleChangeTtitle" plain>沟通管理</el-button>
<el-button size="small" plain>管理</el-button>
</div>
</div>
@ -106,7 +106,12 @@ export default {
computed: {},
beforeMount () {},
mounted () {},
methods: {},
methods: {
handleChangeTtitle () {
// this.$route
console.log('this.$route: ', this.$route.meta.title = '123')
}
},
watch: {}
}

View File

@ -22,8 +22,8 @@
<div class="step-content-center-item commonFont" v-for="(i,index) in titleList" :key="i.id">
<span class="hover" style="cursor: pointer;">{{i.name}}({{i.number}})</span>
<div v-if="index<titleList.length-1" class="step-content-center-item-img">
<img v-if="titleList.length>2 && index===0" src="./img/shu.jpg" alt="">
<img v-else src="./img/right.jpg" alt="">
<div v-if="titleList.length>2 && index===0" class='shuxian'></div>
<i v-else class="el-icon-arrow-right"></i>
</div>
</div>
</div>
@ -115,7 +115,9 @@ export default {
}],
props: {
lazy: true,
lazyLoad (node, resolve) {
lazyLoad: (node, resolve) => {
console.log(this)
console.log('node: ', node)
const { level } = node
setTimeout(() => {
const nodes = Array.from({ length: level + 1 })
@ -151,6 +153,7 @@ export default {
margin: 20px 0;
height: 537px;
background: #fff;
width: 100%;
&-top{
display: flex;
align-items: center;
@ -160,8 +163,13 @@ export default {
align-items: center;
}
}
.shuxian{
width: 1px;
height: 16px;
background: #52575b;
}
&-center{
margin: 30px 0;
margin: 30px 0 10px 0;
padding: 0 40px;
min-height: 40px;
background: #f6f6f6;
@ -177,6 +185,7 @@ export default {
}
.center();
&-img{
.center();
height: 20px;
margin: 0 56px;
img{

View File

@ -315,7 +315,8 @@ export default {
pageSize: 999
}
try {
const res = await getStartsData(params)
let res = await getStartsData(params)
res = res.data
handleNode(res)
} catch (error) {
console.log(error)

View File

@ -194,6 +194,7 @@ export default {
async handleGetByIdForBasis (id) {
try {
let res = await getByIdForBasis({id})
res = res.data
console.log('res: ', res)
this.GroundList1 = res.managers.map(i => {
i.staffId = i.id
@ -221,6 +222,7 @@ export default {
async handleGetGround () {
try {
let res = await getGround({groupId: 1})
res = res.data
res = res.map(i => {
i.isDisable = i.isSelect
return i

View File

@ -107,11 +107,11 @@ export default {
//
async handleGetByFlowManagerId (groupId = 0) {
try {
const res = await getByFlowManagerId({
let res = await getByFlowManagerId({
id: 1,
groupId
})
res = res.data
this.processLsit = res
this.processLsitCopy.map(i => {
this.info[i.componment + 'Info'] = this.processLsit.filter(j => j.name === i.name)[0]

View File

@ -7,7 +7,7 @@
<div @click="handleChangle(3)" :class="{active:active===3}" class="a commonFont"><span class="eidt-header-circle">3</span>流程设计</div>
</div>
<div class="eidt-right">
<el-button type="primary" @click="handSaveBasisc"> </el-button>
<el-button :loading='loadings' type="primary" @click="handSaveBasisc"> </el-button>
</div>
<div class="eidt-content boderAndRadius">
<basis :basisForm.sync='basisForm' v-show="active===1"/>
@ -27,6 +27,7 @@ console.log('saveDetailProcs: ', saveDetailProcs)
export default {
data () {
return {
loadings: false,
active: 1,
//
basisForm: {
@ -64,8 +65,17 @@ export default {
async handSaveBasisc () {
console.log('this.processInfo: ', this.processInfo)
console.log('this.basisForm: ', this.basisForm)
if (!this.basisForm.name) {
return this.$message.error('请输入考评组名称')
}
if (!this.basisForm.depIds && !this.basisForm.staffIds) {
return this.$message.error('请选择被考核人员')
}
this.loadings = true
try {
let res = await saveBaseSet(this.basisForm)
res = res.data
this.basisForm = res
this.templateForm.evaluationGroupId = res.id
for (let i in this.processInfo) {
@ -84,11 +94,13 @@ export default {
console.log('this.templateForm: ', JSON.stringify(this.templateForm))
try {
let res = await saveTemSet(this.templateForm)
res = res.data
// this.basisForm = res
console.log('res: ', res)
} catch (error) {
this.$message.error(error.msg)
}
this.loadings = false
this.$message({
message: '保存成功',
type: 'success',

View File

@ -102,7 +102,8 @@ export default {
},
async handleGetData () {
try {
const res = await getWorkList(Object.assign({}, this.params))
let res = await getWorkList(Object.assign({}, this.params))
res = res.data
console.log('res: ', res)
this.tableData = res.list
this.params.totalCount = res.totalCount

View File

@ -122,7 +122,7 @@
:data="popupData.tableList"
@selection-change="handleSelectionChange"
tooltip-effect="dark"
:row-key="getRowKeys"
:row-key="handleGetRowKeys"
>
<el-table-column
type="selection"
@ -190,7 +190,8 @@
</template>
<script>
import PopupRight from '@/components/PopupRight'
import { getWorkList, sendAssessmentInfo } from '@/api/workbench'
import { getWorkList } from '@/api/workbench'
import { apiInitiateAssessmentInfo } from '@/api/initiateAssessment'
export default {
data () {
return {
@ -211,7 +212,6 @@ export default {
rangDate: [{ required: true, message: '请选择时间周期', trigger: 'change' }],
assessmentList: [{ type: 'array', required: true, message: '请选择参与考评组', trigger: 'change' }],
'mergeType.name': [{ required: true, message: '请填写新建考核名称', trigger: 'blur' }]
},
popupData: {
tableList: [],
@ -261,15 +261,13 @@ export default {
}
})
},
getRowKeys (row) {
handleGetRowKeys (row) {
return row.id
},
handleGroupDelete (index, rows) {
console.log('删除----', rows)
rows.splice(index, 1)
},
handleSubmit () {
console.log('提交')
this.$refs['formData'].validate((val) => {
this.dialogSendVisible = val
})
@ -282,6 +280,7 @@ export default {
let para = {
cycleType: this.formData.cycleTimeType,
groupIds: groupIdList.join(),
// groupIds: 24, //
name: this.formData.mergeType.name
}
if (this.formData.cycleTimeType === 0) {
@ -290,24 +289,23 @@ export default {
para['startTime'] = this.$format(this.formData.rangDate[0], 'yyyy-MM-dd hh:mm:ss')
para['endTime'] = this.$format(this.formData.rangDate[1], 'yyyy-MM-dd hh:mm:ss')
}
sendAssessmentInfo(para).then(res => {
apiInitiateAssessmentInfo(para).then(res => {
this.dialogSendVisible = false
// this.$router.push({ name: 'assessment' })
console.log('发起考核成功', res)
this.$router.push({name: 'assessment-stepList', query: {id: res.data.id, name: 'assessment-homeList'}})
this.$message({
message: '发起考核成功',
message: res.msg,
type: 'success'
})
})
},
handlePopupSearchChange (val) {
console.log('搜索' + val)
//
this.handleGainAssessmentGroupList()
},
handleSelectionChange (val) {
//
this.popupData.selectedList = val
console.log('选择发生变化 ', val)
},
handlePopupCreat () {
this.showChooseList = false
@ -331,10 +329,10 @@ export default {
name: this.rqAssessmentParameter.searchName
}
getWorkList(para).then(res => {
this.rqAssessmentParameter.totalPage = res.totalPage
this.rqAssessmentParameter.totalCount = res.totalCount
this.currPage = res.currPage
this.popupData.tableList = res.list
this.rqAssessmentParameter.totalPage = res.data.totalPage
this.rqAssessmentParameter.totalCount = res.data.totalCount
this.currPage = res.data.currPage
this.popupData.tableList = res.data.list
})
}
}