Merge branch 'v_porcess' of http://gitlab.ldxinyong.com/enterpriseManagement/digitization-ui into v_porcess
This commit is contained in:
commit
afcfdc55be
30
READMEDETAIL.md
Normal file
30
READMEDETAIL.md
Normal file
@ -0,0 +1,30 @@
|
||||
项目描述
|
||||
1.该项目是一个kpi绩效管理系统以及绩效的一个过程管理,使用vue2.0以及element-ui搭建。项目上线后使用钉钉pc端打开即可获取用户权限以及用户信息。
|
||||
2.项目地址:http://gitlab.ldxinyong.com/enterpriseManagement/digitization-ui
|
||||
a)分支v_1.0.0 基本功能
|
||||
b)分支v_1.1.0 在上个分支的基础上新增多人评分功能
|
||||
c)分支v_porcess 在上个分支上新增kpi过程管理
|
||||
项目细节
|
||||
1. config文件夹主要是对webpack的配置以及代理配置
|
||||
2. src文件夹包含了项目的主要结构
|
||||
a)api文件是对接口地址统一分装
|
||||
b)Assets主要存在静态文件(图片)
|
||||
c)Compinents 主要是对项目重复组件进行分装存放
|
||||
d)icons存放项目icon组件
|
||||
e)minxinx存放全局变量,主要是权限的控制,本项目的权限使用前端控制,后端不返回路由表
|
||||
f)router存放项目的路由表
|
||||
g)store存放项目的全局变量,主要是个人的登录信息
|
||||
h)style存放一些全局样式
|
||||
i)utils存放公共js文件
|
||||
j)views存放页面文件以及页面的专属组件(不可复用组件)
|
||||
3.该项目kpi文件全部用于存放kpi系统的页面组件,该项目的主路由为工作台-考核管理-绩效报表-设置
|
||||
a)工作台:工作台所有员工都有的页面,其主要文件存放于src-views-kpi-workbench 下面,其中assessmentGroup文件是考评组模块,home是首页模块,initiateAssessment发起考核模块,todo是代办模块
|
||||
b)考核管理:主要存放在src-views-kpi-assessment下面,其中goals是制定目标页面,homeList考核管理的主页面,performance绩效详情,stepList考评组详情。
|
||||
c)绩效报表,主要存放在src-views-kpi-report下面,home是主页面组件,detail是点击详情跳转的界面
|
||||
d)设置,存放在src-views-kpi-set文件夹下
|
||||
4.项目部分文件详解(下列文件都是存放于src下的文件)
|
||||
a)mixins全局混入,该项目只用了一次是用于权限按钮的控制,其实现原理是一个data数据对象,通过读取key进去控制。
|
||||
b)router文件夹,kpi_route.js是kpi系统的所有路由,后面有其他项目接入,只需要新建一份router的js文件并在index中引入即可加入路由。
|
||||
c)style全局样式,其中common.less 是全局公共样式文件,public是重置样式文件,index是引入文件
|
||||
d)utils是公共类文件,其中common.js封装一些对数据处理的方法,elementConfig按需引入element组件,permission控制获取用户信息,主要是钉钉的免登接口调用
|
||||
5.该项目引入了loadsh类,主要用来处理数组对象的方法以及防抖节流等函数。
|
||||
@ -3,7 +3,9 @@
|
||||
<div v-if="!dd.pc && !dd.other" class="pc commonFont">
|
||||
请移步PC端操作
|
||||
</div>
|
||||
<router-view v-else class="main"/>
|
||||
<keep-alive>
|
||||
<router-view class="main"/>
|
||||
</keep-alive>
|
||||
<div @dblclick="handleShowVcnsole" class="baaa" style="width:20px;height:20px;"></div>
|
||||
</div>
|
||||
</template>
|
||||
@ -13,7 +15,6 @@ import { mapState, mapActions, mapMutations } from 'vuex'
|
||||
import * as dd from 'dingtalk-jsapi'
|
||||
|
||||
import VConsole from 'vconsole'
|
||||
console.log('ddApp: ', dd)
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
@ -49,6 +50,7 @@ export default {
|
||||
this.dd = dd
|
||||
},
|
||||
methods: {
|
||||
// 在钉钉环境双击显示 vconsole
|
||||
handleShowVcnsole () {
|
||||
var vConsole = new VConsole({
|
||||
vConsole_switch_x: 0,
|
||||
|
||||
@ -1,4 +1,13 @@
|
||||
<!-- -->
|
||||
/**
|
||||
* 组件名称
|
||||
* @desc 项目的头像组件
|
||||
* @obj {Object} [src] - 头像地址
|
||||
* @obj {Object} [name] - 用户名称
|
||||
* @obj {Object} [departmentName] - 用户所在部门
|
||||
* @isShow {Boolean} [] - 是否只显示用户头像
|
||||
* @example 调用示例
|
||||
* <InfoHeader :isShow='false' :obj="{src:'图片地址',name:'用户姓名',departmentName:'技术部门'}" />
|
||||
*/
|
||||
<template>
|
||||
<div class="header-title">
|
||||
<div class="header-title-img">
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
<template>
|
||||
<svg :class="svgClass" aria-hidden="true">
|
||||
<use :xlink:href="iconName"/>
|
||||
|
||||
@ -1,4 +1,16 @@
|
||||
<!-- -->
|
||||
/**
|
||||
* 组件名称
|
||||
* @desc 获取公司部门
|
||||
* @title 组件的标题
|
||||
* @value 绑定 form 表单的字段
|
||||
* @isShow 控制组件的显示隐藏
|
||||
* @showDataList 确认按钮后的数据更新
|
||||
* @cb 确认后的回调 添加@cb 后 动态绑定 showDataList 不会进行更新
|
||||
|
||||
* @example 调用示例
|
||||
* <getDepart v-if="isSshowOutIds" :value.sync='form.outIds' :isShow.sync='isSshowOutIds' :showDataList.sync='outIdsLsit'/>
|
||||
* <getDepart @cb='handleCheckStaffIds' v-if="isShowPersonnel" :value.sync='form.staffIds' :isShow.sync='isShowPersonnel' :showDataList.sync='personnelList'/>
|
||||
*/
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
|
||||
@ -1,4 +1,16 @@
|
||||
<!-- -->
|
||||
/**
|
||||
* 组件名称
|
||||
* @desc 获取公司人员的组件
|
||||
* @title 组件的标题
|
||||
* @value 绑定 form 表单的字段
|
||||
* @isShow 控制组件的显示隐藏
|
||||
* @showDataList 确认按钮后的数据更新
|
||||
* @cb 确认后的回调 添加@cb 后 动态绑定 showDataList 不会进行更新
|
||||
|
||||
* @example 调用示例
|
||||
* <getPersonnel v-if="isSshowOutIds" :value.sync='form.outIds' :isShow.sync='isSshowOutIds' :showDataList.sync='outIdsLsit'/>
|
||||
* <getPersonnel @cb='handleCheckStaffIds' v-if="isShowPersonnel" :value.sync='form.staffIds' :isShow.sync='isShowPersonnel' :showDataList.sync='personnelList'/>
|
||||
*/
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<!-- -->
|
||||
<!--该组件是页面顶部带返回功能的头部 -->
|
||||
<template>
|
||||
<div>
|
||||
<div class="noNav">
|
||||
|
||||
@ -5,6 +5,7 @@ let mixin = {
|
||||
return {}
|
||||
},
|
||||
computed: {
|
||||
// auth全局权限 在登录成功后获取
|
||||
...mapGetters(['auth'])
|
||||
},
|
||||
methods: {
|
||||
|
||||
@ -102,7 +102,8 @@ export default [{
|
||||
import('@/views/kpi/assessment/stepList/index.vue'),
|
||||
meta: {
|
||||
title: '考核管理',
|
||||
isNav: true
|
||||
isNav: true,
|
||||
keepAlive: true
|
||||
}
|
||||
}, {
|
||||
path: 'addPerson',
|
||||
|
||||
@ -12,12 +12,10 @@ const user = {
|
||||
SET_USER_INFO: (state, info) => {
|
||||
dd.other && localStorage.setItem('info', JSON.stringify(info))
|
||||
state.info = info
|
||||
console.log('state.info: ', state.info)
|
||||
},
|
||||
SET_USER_AUTH: (state, auth) => {
|
||||
dd.other && localStorage.setItem('auth', JSON.stringify(auth))
|
||||
state.auth = auth
|
||||
console.log('state.auth: ', state.auth)
|
||||
},
|
||||
SET_DEPLIST: (state, list = []) => {
|
||||
state.deplist = list
|
||||
@ -27,7 +25,6 @@ const user = {
|
||||
actions: {
|
||||
GET_USERINFO: async ({ commit }) => {
|
||||
let res = await apiUserInfo()
|
||||
console.log('GET_USERINFO: ', res)
|
||||
if (res.code === 200) {
|
||||
commit('SET_USER_INFO', res.user)
|
||||
commit('SET_USER_AUTH', res.data)
|
||||
|
||||
@ -26,6 +26,11 @@ export function debounce (func, wait, immediate) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc 处理后端选择人员后 list进行处理成接口需要的格式
|
||||
* @param func 函数
|
||||
* @param arr 部门数组
|
||||
*/
|
||||
export function personlGetForm (arr = []) {
|
||||
const params = {
|
||||
list: [],
|
||||
@ -43,12 +48,18 @@ export function personlGetForm (arr = []) {
|
||||
arr = arr.sort((a, b) => a[key] - b[key])
|
||||
params.list = arr
|
||||
for (let i in arr) {
|
||||
// 将数组的 id 进行拼接成后端所需格式,通过对象返回
|
||||
if (i < 1) { params.title = params.title + (i === '0' ? '' : ',') + arr[i].name }
|
||||
params.value += arr[i][key] + (i < arr.length - 1 ? ',' : '')
|
||||
}
|
||||
return params
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc 处理后端选择人员后 list进行处理成接口需要的格式
|
||||
* @param func 函数
|
||||
* @param arr 部门数组
|
||||
*/
|
||||
export function departGetForm (arr = []) {
|
||||
const params = {
|
||||
list: [],
|
||||
@ -69,6 +80,7 @@ export function departGetForm (arr = []) {
|
||||
params.list = arr
|
||||
for (let i in arr) {
|
||||
if (i < 1) {
|
||||
// 将数组的 id 进行拼接成后端所需格式,通过对象返回
|
||||
params.title = params.title + (i === '0' ? '' : ',') + arr[i][key1]
|
||||
}
|
||||
params.value += arr[i][key] + (i < arr.length - 1 ? ',' : '')
|
||||
@ -76,6 +88,7 @@ export function departGetForm (arr = []) {
|
||||
return params
|
||||
}
|
||||
|
||||
// input 输入框只输入数字0-100处理,主要处理权重
|
||||
export function handleInput (form) {
|
||||
let value = this[form.split('.')[0]][form.split('.')[1]]
|
||||
console.log('value: ', typeof value)
|
||||
@ -101,16 +114,17 @@ const opt = {
|
||||
background: 'rgba(255, 255, 255, 0.8)',
|
||||
spinner: 'el-icon-loading',
|
||||
text: '数据加载中'}
|
||||
// loading开启
|
||||
export function loading (options = opt) {
|
||||
this.$loading.service(options)
|
||||
}
|
||||
|
||||
// loading 关闭
|
||||
export function loadingClose () {
|
||||
setTimeout(() => {
|
||||
this.$loading.service(opt).close()
|
||||
}, 100)
|
||||
}
|
||||
|
||||
// 通过 url 获取参数
|
||||
export function getUrlParams () {
|
||||
var query = decodeURI(window.location.search.substring(1))
|
||||
console.log('query: ', query)
|
||||
|
||||
@ -40,9 +40,9 @@ import {
|
||||
Progress,
|
||||
Drawer,
|
||||
Slider,
|
||||
ButtonGroup
|
||||
ButtonGroup, Notification
|
||||
} from 'element-ui'
|
||||
|
||||
Vue.prototype.$notify = Notification
|
||||
Vue.prototype.$loading = Loading
|
||||
Vue.prototype.$message = Message
|
||||
Vue.prototype.$confirm = MessageBox.confirm
|
||||
|
||||
@ -7,9 +7,7 @@ import VueCookie from 'vue-cookies'
|
||||
// 钉钉免登录
|
||||
async function handleDingtalkLogin (val) {
|
||||
const res = await apiDingtalkLogin(val)
|
||||
console.log('钉钉免登录res: ', res)
|
||||
if (res && res.code === 200) {
|
||||
console.log('res.token: ', res.token)
|
||||
VueCookie.set('token', res.token)
|
||||
return 1
|
||||
// window.open(window.location.protocol + '//' + window.location.host + '/digitization/kpi/workbench/home?code=' + this.dingCode.code)
|
||||
@ -25,27 +23,20 @@ function handleGetDingtalkCode () {
|
||||
dd.runtime.permission.requestAuthCode({
|
||||
corpId: 'ding267474e759bbca1c35c2f4657eb6378f',
|
||||
async onSuccess (res) {
|
||||
console.log('result===', res)
|
||||
let result = await handleDingtalkLogin(res)
|
||||
console.log('result: ', result)
|
||||
resolve(result)
|
||||
},
|
||||
onFail (err) {
|
||||
console.log('err: ', err)
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
console.log('dd---: ', dd)
|
||||
if (!store.getters.userInfo.userNo && !dd.other) {
|
||||
let res = await handleGetDingtalkCode()
|
||||
console.log('res: ', res)
|
||||
if (res === 1) {
|
||||
console.log('res: ', res)
|
||||
let res1 = await store.dispatch('GET_USERINFO')
|
||||
console.log('res1: ', res1)
|
||||
if (res1 === 1) next()
|
||||
} else {
|
||||
Message.error('网络错误')
|
||||
@ -57,7 +48,5 @@ router.beforeEach(async (to, from, next) => {
|
||||
})
|
||||
|
||||
router.afterEach(async () => {
|
||||
console.log('afterEach: ')
|
||||
|
||||
await store.dispatch('GET_DEPLIST')
|
||||
})
|
||||
|
||||
@ -56,7 +56,6 @@ service.interceptors.response.use(res => {
|
||||
}
|
||||
if (res.data.code === 401) {
|
||||
const resaa = Object.assign({}, res.data, {msg: '登陆失效,请刷新重试'})
|
||||
console.log('resaa: ', resaa)
|
||||
return resaa
|
||||
}
|
||||
return res.data
|
||||
|
||||
@ -292,7 +292,6 @@ export default {
|
||||
computed: {},
|
||||
beforeMount () { },
|
||||
mounted () {
|
||||
console.log('auth', this.auth)
|
||||
this.handleGetDimensions()
|
||||
this.handleGetTbale()
|
||||
},
|
||||
@ -344,7 +343,6 @@ export default {
|
||||
processRate: '0',
|
||||
isNew: true
|
||||
}
|
||||
console.log(this.formTask)
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -379,7 +377,6 @@ export default {
|
||||
// }
|
||||
this.formItem = j
|
||||
this.showTask = true
|
||||
console.log(this.formTask)
|
||||
},
|
||||
handleNumber (item) {
|
||||
return item.detailDtos ? item.detailDtos.filter(i => !i.isDelete).length : 0
|
||||
@ -535,7 +532,6 @@ export default {
|
||||
this.showIndicators = false
|
||||
},
|
||||
handleSubmitZhibiao () {
|
||||
console.log(this.formIndicators)
|
||||
const arr = this.obj.recortModelDtos[this.formIndicators.dazhibiaoIndex].detailDtos
|
||||
this.$refs.formIndicators.validate((v) => {
|
||||
if (v) {
|
||||
@ -557,7 +553,6 @@ export default {
|
||||
this.showIndicators = false
|
||||
}
|
||||
})
|
||||
console.log(' this.obj', this.obj)
|
||||
},
|
||||
// 编辑
|
||||
hanidleEdit (item, index, type) {
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
<!-- -->
|
||||
<template>
|
||||
<div>
|
||||
<router-view></router-view>
|
||||
<keep-alive >
|
||||
<router-view v-if="$route.meta.keepAlive"></router-view>
|
||||
</keep-alive >
|
||||
<router-view v-if="!$route.meta.keepAlive"></router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@ -152,6 +152,7 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
authList: [
|
||||
// 下面这个是按钮组 目前支持两个按钮挨着一起
|
||||
{
|
||||
info: !this.info,
|
||||
ground: true,
|
||||
@ -272,8 +273,6 @@ export default {
|
||||
computed: {},
|
||||
beforeMount () { },
|
||||
mounted () {
|
||||
console.log(this.resultRecordId)
|
||||
console.log('🚀 ~ file: index.vue ~ line 308 ~ handleGetNext ~ this.obj', this.obj)
|
||||
},
|
||||
methods: {
|
||||
async handleResetData (resultRecordId) {
|
||||
@ -284,7 +283,6 @@ export default {
|
||||
},
|
||||
// 重置确定
|
||||
handleAgreeChongZhi () {
|
||||
console.log(this.form)
|
||||
this.$refs.formChongZhi.validate(async v => {
|
||||
if (v) {
|
||||
const params = Object.assign({}, this.form, { resultRecordId: this.resultRecordId || '' }, { status: 9, menuName: '重置了流程' })
|
||||
@ -304,7 +302,6 @@ export default {
|
||||
},
|
||||
// 重置
|
||||
async handleChongZhi () {
|
||||
console.log(123)
|
||||
this.form = {
|
||||
resetFlag: 0,
|
||||
clearFlag: 1
|
||||
@ -381,12 +378,61 @@ export default {
|
||||
this.$message.error(res.msg || '出错了 ')
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
// this.$message({
|
||||
// message: res.msg,
|
||||
// type: 'success',
|
||||
// duration: 1000,
|
||||
// onClose: () => {
|
||||
// this.nextProcess(res)
|
||||
// }
|
||||
// })
|
||||
this.dialogFormVisible = false
|
||||
|
||||
if (res.resultRecordId) {
|
||||
this.nextProcess(res)
|
||||
} else {
|
||||
history.go(0)
|
||||
}
|
||||
},
|
||||
// 根据后端返回是否需要进入下一个待办
|
||||
nextProcess (res) {
|
||||
if (!res.resultRecordId) return
|
||||
if (res.sure) {
|
||||
this.$confirm('是否进去下一个待办?', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(() => {
|
||||
this.$router.replace({
|
||||
name: 'assessment-performance',
|
||||
query: {id: res.resultRecordId
|
||||
}
|
||||
})
|
||||
history.go(0)
|
||||
}).catch(() => {
|
||||
history.go(0)
|
||||
})
|
||||
} else {
|
||||
let time = res.waitTime
|
||||
let a = this.$message({
|
||||
message: `提交成功,${time}S 后将自动打开下一条待办`,
|
||||
type: 'success',
|
||||
duration: 5000
|
||||
})
|
||||
const timer = setInterval(() => {
|
||||
if (time > 0) {
|
||||
time--
|
||||
a.message = `提交成功,${time}S 后将自动打开下一条待办`
|
||||
} else {
|
||||
clearInterval(timer)
|
||||
this.$router.replace({
|
||||
name: 'assessment-performance',
|
||||
query: {id: res.resultRecordId
|
||||
}
|
||||
})
|
||||
history.go(0)
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
// 驳回
|
||||
handleBohui () {
|
||||
@ -508,11 +554,19 @@ export default {
|
||||
this.form = {}
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.nextProcess(res)
|
||||
}
|
||||
})
|
||||
if (res.resultRecordId) {
|
||||
resolve(0)
|
||||
} else {
|
||||
history.go(0)
|
||||
resolve(0)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@ -358,7 +358,6 @@ export default {
|
||||
this.taskInfo = Object.assign({}, this.taskObj)
|
||||
this.handleGetChangeTaskList()
|
||||
this.handleGetPingLunList()
|
||||
console.log(this.taskInfo)
|
||||
},
|
||||
methods: {
|
||||
handleAtSomeOne () {
|
||||
@ -539,7 +538,6 @@ export default {
|
||||
this.form = {}
|
||||
}
|
||||
i.updateProcess = type
|
||||
console.log(this.form)
|
||||
this.$forceUpdate()
|
||||
},
|
||||
// 编辑/取消编辑进度
|
||||
|
||||
@ -1,532 +0,0 @@
|
||||
<template>
|
||||
<div class='table'>
|
||||
<div v-if="obj.recortModelDtos.length !== 0"
|
||||
class="table-list">
|
||||
<div class="table-header">
|
||||
<div class="table-left name">维度</div>
|
||||
<div class="table-content-right-item"
|
||||
style="flex:1;">
|
||||
<div class="table-header-flex names ">名称</div>
|
||||
<div class="table-header-flex pre kaohe">考核标准</div>
|
||||
<div class="table-header-flex jieguo"
|
||||
v-if="tableInfo.result || tableAuth.showResult">结果值</div>
|
||||
<div class="table-header-flex quanzhomng"
|
||||
style="flex:none;">权重({{Math.round((obj.weight * 100)*1000)/1000}}%)</div>
|
||||
<div class="table-header-flex pingfen"
|
||||
v-if="tableInfo.score || tableAuth.showScore">上级评分</div>
|
||||
<div class="table-header-flex defen"
|
||||
style="flex:none;"
|
||||
v-if="tableInfo.score || tableAuth.showScore">得分</div>
|
||||
<div class="table-header-flex pingfen"
|
||||
v-if="tableInfo.score || tableAuth.showScore">评分说明</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-for="(item,index) in ((tableInfo.score || tableAuth.showScore)?obj.recortModelDtos:obj.recortModelDtos.slice(0,obj.recortModelDtos.length-1))"
|
||||
:key="index"
|
||||
class="table-content">
|
||||
<div class="table-content-left table-left name">
|
||||
<div v-for="(i,indexs) in item.name"
|
||||
:key="indexs">
|
||||
{{i}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-content-right">
|
||||
<div v-for="(child) in item.detailDtos"
|
||||
:key="child.id"
|
||||
class="table-content-right-item">
|
||||
<div class="names">
|
||||
<span> {{child.target || ''}}</span>
|
||||
</div>
|
||||
<div class="kaohe pre">
|
||||
<pre>
|
||||
{{child.keyResult || ''}}
|
||||
</pre>
|
||||
</div>
|
||||
<div class='pre jieguo'
|
||||
v-if="tableInfo.result || tableAuth.showResult">
|
||||
<el-input v-if="tableInfo.result"
|
||||
type="textarea"
|
||||
:rows="12"
|
||||
size="mini"
|
||||
placeholder="请输入内容"
|
||||
v-model="child.checkResult"
|
||||
clearable></el-input>
|
||||
<pre v-else>{{child.checkResult || '--'}}</pre>
|
||||
</div>
|
||||
<div class="quanzhomng"
|
||||
style="flex:none;">
|
||||
{{( Math.round((child.checkWeight * 100) * 1000) / 1000 )}}%
|
||||
</div>
|
||||
<div v-if="tableInfo.score || tableAuth.showScore"
|
||||
class="pingfen">
|
||||
<!-- gradeGroupId=== 1 下拉 -->
|
||||
<el-select v-if="tableInfo.score && obj.gradeGroupId===1"
|
||||
style="width:115px;"
|
||||
size="mini"
|
||||
v-model="child.scoreDtos[child.scoreDtos.length-1].acquireScore">
|
||||
<el-option v-for="item in scoreList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.score">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-input v-if="tableInfo.score && obj.gradeGroupId===2"
|
||||
style="width:115px;"
|
||||
size="mini"
|
||||
placeholder="请输入评分值"
|
||||
v-model="child.scoreDtos[child.scoreDtos.length-1].acquireScore"
|
||||
clearable></el-input>
|
||||
<span v-if="!tableInfo.score">{{handleScore(child.scoreDtos[child.scoreDtos.length-1].acquireScore)}}</span>
|
||||
</div>
|
||||
<div class="defen"
|
||||
style="flex:none;"
|
||||
v-if="tableInfo.score || tableAuth.showScore">
|
||||
<span>{{child.scoreDtos[child.scoreDtos.length-1].acquireScore || '--'}}</span>
|
||||
</div>
|
||||
<div class='pre pingfen'
|
||||
v-if="tableInfo.score || tableAuth.showScore">
|
||||
<el-input v-if="tableInfo.score"
|
||||
style="width:200px;"
|
||||
:rows="12"
|
||||
size="mini"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"
|
||||
v-model="child.scoreComment"
|
||||
clearable></el-input>
|
||||
<span v-else>{{child.scoreComment || '--'}}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="item.detailDtos.length ===0 && item.name !=='总分'"
|
||||
class="table-content-right-item">
|
||||
<div class="names">
|
||||
</div>
|
||||
<div class="kaohe pre">
|
||||
</div>
|
||||
<div class='jieguo'
|
||||
v-if="tableInfo.result || tableAuth.showResult">
|
||||
</div>
|
||||
<div class="quanzhomng "
|
||||
style="flex:none;">
|
||||
</div>
|
||||
<div class='pingfen'
|
||||
v-if="tableInfo.score || tableAuth.showScore">
|
||||
|
||||
</div>
|
||||
<div class="defen"
|
||||
style="flex:none;"
|
||||
v-if="tableInfo.score || tableAuth.showScore">
|
||||
|
||||
</div>
|
||||
<div class='pingfen'
|
||||
v-if="tableInfo.score || tableAuth.showScore">
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="item.name==='总分'"
|
||||
class="table-content-right-item">
|
||||
<div class="names">
|
||||
</div>
|
||||
<div class="kaohe pre">
|
||||
</div>
|
||||
<div class='jieguo'
|
||||
v-if="tableInfo.result || tableAuth.showResult">
|
||||
</div>
|
||||
<div class="quanzhomng pingfen"
|
||||
style="flex:none;">
|
||||
</div>
|
||||
<div class="pingfen"
|
||||
v-if="tableInfo.score || tableAuth.showScore">
|
||||
{{score.scoreLevel}}
|
||||
</div>
|
||||
<div class="defen"
|
||||
style="flex:none;"
|
||||
v-if="tableInfo.score || tableAuth.showScore">
|
||||
{{score.lastScore}}
|
||||
</div>
|
||||
<div class="pingfen"
|
||||
v-if="tableInfo.score || tableAuth.showScore">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else
|
||||
class='nojixiao'>
|
||||
<img src="./imgs/nojixiao.png"
|
||||
alt="">
|
||||
<div class="commonFont">
|
||||
未制定绩效目标,暂无数据
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="tableInfo.result || tableInfo.score"
|
||||
class="table-bottom">
|
||||
<div class="table-bottom-content">
|
||||
<el-button size='small'
|
||||
@click="handleCancelResult"
|
||||
plain>取消</el-button>
|
||||
<el-button size='small'
|
||||
:loading='loadingZan'
|
||||
@click="handleSaveDetail()"
|
||||
plain>暂存</el-button>
|
||||
<el-button size='small'
|
||||
:loading='loadingTi'
|
||||
@click="handleGetNext"
|
||||
type="primary">{{tableInfo.result?'提交结果值':'提交评分'}}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { apiSaveDetail, apiGet375, apiSaveapproval } from '@/api/assessment'
|
||||
export default {
|
||||
name: 'columnsTbale',
|
||||
props: {
|
||||
resultRecordId: {
|
||||
type: String,
|
||||
default: () => ''
|
||||
},
|
||||
obj: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
recortModelDtos: []
|
||||
}
|
||||
}
|
||||
},
|
||||
tableInfo: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
result: false,
|
||||
score: false
|
||||
}
|
||||
}
|
||||
},
|
||||
tableAuth: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
loadingTi: false,
|
||||
loadingZan: false,
|
||||
input: '',
|
||||
scoreList: []
|
||||
// score: {
|
||||
// lastScore: '',
|
||||
// scoreLevel: ''
|
||||
// }
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
score () {
|
||||
const result = this.obj.recortModelDtos && this.obj.recortModelDtos.reduce((result, i) => {
|
||||
i.detailDtos && i.detailDtos.map(j => {
|
||||
j.scoreDtos && j.scoreDtos.map(k => {
|
||||
const str = j.calculate.replace(/{\w+}/g, (i) => {
|
||||
i = i.replace(/{|}/g, '')
|
||||
return k[i]
|
||||
})
|
||||
// eslint-disable-next-line no-eval
|
||||
let a = eval(str)
|
||||
result += a
|
||||
})
|
||||
})
|
||||
return result
|
||||
}, 0)
|
||||
const arr = this.scoreList.filter(i => i.minScore <= result && i.maxScore > result)
|
||||
return {
|
||||
lastScore: result.toFixed(3),
|
||||
scoreLevel: arr.length > 0 ? arr[0].name : ''
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.handleGrt375()
|
||||
},
|
||||
methods: {
|
||||
handleScore (item) {
|
||||
return this.scoreList.filter(i => i.score === item).length > 0 ? this.scoreList.filter(i => i.score === item)[0].name : 0
|
||||
},
|
||||
async handleGetNext () {
|
||||
this.loadingTi = true
|
||||
let paramsObj = this.obj
|
||||
if ((this.tableInfo.score || this.tableAuth.showScore)) {
|
||||
paramsObj = Object.assign({}, paramsObj, this.score)
|
||||
}
|
||||
let res1 = await apiSaveDetail(paramsObj)
|
||||
if (res1.code !== 200) {
|
||||
this.loadingTi = false
|
||||
this.$message.error(res1.msg)
|
||||
return
|
||||
}
|
||||
const obj = { status: 1, menuName: this.tableInfo.result ? '提交了结果值' : '提交了评分' }
|
||||
const params = Object.assign({}, { resultRecordId: this.$route.query.id || this.resultRecordId || '' }, obj)
|
||||
let res = await apiSaveapproval(params)
|
||||
this.loadingTi = false
|
||||
if (res.code !== 200) {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
history.go(0)
|
||||
},
|
||||
handleCancelResult () {
|
||||
this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, { result: false, score: false }))
|
||||
},
|
||||
async handleGrt375 () {
|
||||
let res = await apiGet375()
|
||||
if (res.code !== 200) return
|
||||
this.scoreList = res.data
|
||||
},
|
||||
async handleSaveDetail (params = this.obj) {
|
||||
this.loadingZan = true
|
||||
let paramsObj = params
|
||||
if ((this.tableInfo.score || this.tableAuth.showScore)) {
|
||||
paramsObj = Object.assign({}, paramsObj, this.score)
|
||||
}
|
||||
let res = await apiSaveDetail(paramsObj)
|
||||
this.loadingZan = false
|
||||
if (res.code !== 200) {
|
||||
this.$message.error(res.msg)
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='less' scoped>
|
||||
.pingfen {
|
||||
width: 120px;
|
||||
.center();
|
||||
}
|
||||
.names {
|
||||
line-height: 20px;
|
||||
width: 200px !important;
|
||||
flex: none !important;
|
||||
.center();
|
||||
}
|
||||
.jieguo {
|
||||
width: 260px !important;
|
||||
flex: none !important;
|
||||
.center();
|
||||
}
|
||||
.name {
|
||||
.center();
|
||||
flex: none !important;
|
||||
width: 60px !important;
|
||||
}
|
||||
.kaohe {
|
||||
width: 260px !important;
|
||||
display: block;
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// flex: none;
|
||||
}
|
||||
.nojixiao {
|
||||
text-align: center;
|
||||
}
|
||||
.listNone {
|
||||
height: 100px;
|
||||
text-align: center;
|
||||
line-height: 100px;
|
||||
border-bottom: 1px solid @borderColor;
|
||||
}
|
||||
.table-list {
|
||||
overflow: auto;
|
||||
color: #52575b;
|
||||
font-size: 12px;
|
||||
border: 1px solid @borderColor;
|
||||
border-bottom: none;
|
||||
}
|
||||
.table-header {
|
||||
display: flex;
|
||||
|
||||
// justify-content: space-between;
|
||||
|
||||
// border: 1px solid @borderColor;
|
||||
> div {
|
||||
background: #f5f5f5;
|
||||
// padding: 10px;
|
||||
border-bottom: 1px solid @borderColor;
|
||||
border-right: 1px solid @borderColor;
|
||||
}
|
||||
> div:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
&-flex {
|
||||
// flex: 1;
|
||||
.center();
|
||||
}
|
||||
}
|
||||
.table-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
> div {
|
||||
padding: 10px;
|
||||
border-right: 1px solid @borderColor;
|
||||
}
|
||||
> div:last-child {
|
||||
border-right: none;
|
||||
padding: 0px;
|
||||
}
|
||||
&-left {
|
||||
border-bottom: 1px solid @borderColor;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
> div {
|
||||
.center();
|
||||
}
|
||||
}
|
||||
&-right {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
// justify-content: space-between;
|
||||
// align-items: center;
|
||||
> div {
|
||||
flex: 1 1 auto;
|
||||
flex-shrink: 0;
|
||||
// height: 100%;
|
||||
border-bottom: 1px solid @borderColor;
|
||||
}
|
||||
> div:last-child {
|
||||
// border-bottom: none;
|
||||
}
|
||||
&-item:hover {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
&-item {
|
||||
> div {
|
||||
border-right: 1px solid @borderColor;
|
||||
padding: 10px;
|
||||
}
|
||||
> div:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
// flex: 1;
|
||||
display: flex;
|
||||
> div {
|
||||
// flex: 1;
|
||||
// .center();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.table-left {
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
.defen {
|
||||
width: 50px !important;
|
||||
.center();
|
||||
text-align: center;
|
||||
}
|
||||
.quanzhomng {
|
||||
width: 86px !important;
|
||||
.center();
|
||||
text-align: center;
|
||||
}
|
||||
.table {
|
||||
position: relative;
|
||||
&-bottoms {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
z-index: 1000000;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: transparent;
|
||||
position: fixed;
|
||||
display: flex;
|
||||
// align-items: center;
|
||||
justify-content: center;
|
||||
&-contenct {
|
||||
height: 40px;
|
||||
display: flex;
|
||||
background: #fff;
|
||||
justify-content: space-between;
|
||||
border-radius: 40px;
|
||||
box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.12),
|
||||
0 1px 6px 0 rgba(0, 0, 0, 0.12);
|
||||
&-left {
|
||||
line-height: 40px;
|
||||
font-size: 14px;
|
||||
padding: 0 16px;
|
||||
i {
|
||||
margin: 0 6px;
|
||||
font-weight: 800;
|
||||
}
|
||||
cursor: pointer;
|
||||
color: @fontBlue;
|
||||
}
|
||||
&-center {
|
||||
.center();
|
||||
font-size: 14px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
&-right {
|
||||
line-height: 40px;
|
||||
font-size: 14px;
|
||||
padding: 0 16px;
|
||||
i {
|
||||
margin: 0 6px;
|
||||
font-weight: 800;
|
||||
}
|
||||
cursor: pointer;
|
||||
color: @fontBlue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.table-bottom {
|
||||
height: 60px;
|
||||
position: fixed;
|
||||
padding: 0 80px;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border-top: 1px solid @borderColor;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
&-content {
|
||||
width: 1360px;
|
||||
margin: 0 auto;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
table {
|
||||
margin-top: 15px;
|
||||
width: 100%;
|
||||
border: 1px solid #e9eaec;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th {
|
||||
background-color: #f8f8f9;
|
||||
}
|
||||
th,
|
||||
td {
|
||||
padding: 5px;
|
||||
border: 1px solid #e9eaec;
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
line-height: 30px;
|
||||
}
|
||||
td {
|
||||
}
|
||||
</style>
|
||||
@ -412,7 +412,6 @@ export default {
|
||||
result += Number(item.Score)
|
||||
return result
|
||||
}, 0)
|
||||
console.log('this.scoreList: ', this.scoreList)
|
||||
return {
|
||||
score: result.toFixed(3),
|
||||
a: this.handleGetDengJi(result)
|
||||
|
||||
@ -282,7 +282,6 @@ export default {
|
||||
methods: {
|
||||
handleShow (item) {
|
||||
item.isShow = !item.isShow
|
||||
console.log(item)
|
||||
this.$forceUpdate()
|
||||
},
|
||||
async handleChange (item) {
|
||||
|
||||
@ -100,6 +100,7 @@ export default {
|
||||
this.list = list
|
||||
this.form.staffIds = list.value
|
||||
this.$loadingEnd()
|
||||
history.go(-1)
|
||||
}
|
||||
},
|
||||
async handleSumitForResult (parmas = {}) {
|
||||
|
||||
@ -232,6 +232,7 @@ import { apiManagerDetail, apiChartList, apiAssessManagerToScore, apiManagerUrgi
|
||||
import { getStartsData } from '@/api/report'
|
||||
let id = 0
|
||||
export default {
|
||||
name: 'assessment-stepList',
|
||||
data () {
|
||||
return {
|
||||
options: {
|
||||
@ -295,11 +296,51 @@ export default {
|
||||
}
|
||||
},
|
||||
beforeMount () { },
|
||||
created () {
|
||||
},
|
||||
beforeRouteEnter (to, from, next) {
|
||||
if (from.name === 'assessment-homeList') {
|
||||
next(async vm => {
|
||||
vm.params = {
|
||||
'currPage': 1,
|
||||
'evaluationIds': '',
|
||||
'flowProcess': null,
|
||||
'pageSize': 10,
|
||||
'staffIds': '',
|
||||
'staffName': '',
|
||||
'startId': 10
|
||||
}
|
||||
vm.options = {
|
||||
startId: vm.$route.query.id || ''
|
||||
}
|
||||
vm.form = {
|
||||
isShowPersonnel: false,
|
||||
personnelList: {
|
||||
list: []
|
||||
}
|
||||
}
|
||||
vm.tableData = []
|
||||
vm.titleList = []
|
||||
await vm.initData()
|
||||
})
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
// ...
|
||||
},
|
||||
beforeRouteLeave (to, from, next) {
|
||||
// ...
|
||||
// this.$route.meta.kppeAlive = to.name === 'assessment-performance'
|
||||
next(...to)
|
||||
},
|
||||
async mounted () {
|
||||
await this.initData()
|
||||
},
|
||||
methods: {
|
||||
async initData () {
|
||||
this.params.startId = Number(this.$route.query.id)
|
||||
await this.handleStartsReq()
|
||||
},
|
||||
methods: {
|
||||
async handleAddCuiBan () {
|
||||
const obj = this.titleList.find(i => i.active)
|
||||
if (obj.num === 0) return this.$message.info('暂无可催办人员!')
|
||||
@ -320,7 +361,6 @@ export default {
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
console.log('params: ', params)
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
@ -418,7 +458,7 @@ export default {
|
||||
this.params.startId = item[1]
|
||||
this.$router.replace({
|
||||
name: 'assessment-stepList',
|
||||
query: {
|
||||
query: {...this.$route.query,
|
||||
id: item[1]
|
||||
}
|
||||
})
|
||||
@ -457,7 +497,6 @@ export default {
|
||||
}))
|
||||
if (res.code !== 200) return
|
||||
this.titleList = res.data
|
||||
console.log('String(this.$route.query.step): ', String(this.$route.query.step))
|
||||
if (String(this.$route.query.step) && String(this.$route.query.step) !== 'undefined') {
|
||||
this.titleList = this.titleList.map(i => {
|
||||
if (String(i.flowProcess) === String(this.$route.query.step)) {
|
||||
|
||||
@ -97,7 +97,6 @@ export default {
|
||||
this.showDialogDepart = false
|
||||
},
|
||||
handlePush (item) {
|
||||
console.log('item: ', item.recordId)
|
||||
this.$router.push({
|
||||
name: 'assessment-performance',
|
||||
query: {
|
||||
|
||||
@ -309,7 +309,6 @@ export default {
|
||||
// 头部数据
|
||||
this.statisticals = val.statisticals
|
||||
if (!this.defaultId) this.defaultId = val.defaultId
|
||||
console.log('this.defaultId : ', this.defaultId)
|
||||
} else if (val.type === 1) {
|
||||
// 等级分布数据
|
||||
this.tableData = val.statisticals
|
||||
|
||||
@ -527,7 +527,6 @@ export default {
|
||||
let msg = '是否将智能绩效主管理员变更为' + val.title
|
||||
this.$confirm(msg, '提示')
|
||||
.then(_ => {
|
||||
console.log('this.mainData: ', this)
|
||||
let dicPara = {
|
||||
id: this.mainData.masterFirst.id || '',
|
||||
departmentLevel: 'MASTER_PM',
|
||||
|
||||
@ -63,7 +63,6 @@ export default {
|
||||
j.checked = this.form.chartDetails.recordSimpleDtos[0].roleIds ? this.form.chartDetails.recordSimpleDtos[0].roleIds.includes(String(j.roleId)) : false
|
||||
return j
|
||||
})))
|
||||
console.log(this.form.roleDtos)
|
||||
},
|
||||
methods: {
|
||||
handleIsEmit (n) {
|
||||
|
||||
@ -178,7 +178,6 @@ export default {
|
||||
title: '',
|
||||
managerIds: ''
|
||||
}
|
||||
console.log('this.GroundList1: ', this.GroundList1)
|
||||
params.list = this.GroundList1.filter(i => i.isSelect === 1)
|
||||
params.list.map((i, index) => {
|
||||
params.managerIds += i.staffId + ','
|
||||
|
||||
@ -208,7 +208,6 @@ import PopupRight from '@/components/PopupRight'
|
||||
import draggable from 'vuedraggable'
|
||||
import {getDimensions} from '@/api/data'
|
||||
import { getByGroupId } from '@/api/workbench'
|
||||
// console.log('Sortable: ', Sortable)
|
||||
// const info =
|
||||
export default {
|
||||
props: ['templateForm'],
|
||||
@ -330,7 +329,6 @@ export default {
|
||||
async handleGetDimensions () {
|
||||
try {
|
||||
let res = await getDimensions()
|
||||
console.log('res: ', res)
|
||||
if (res.code !== 200) {
|
||||
this.dimensionsList = []
|
||||
return
|
||||
@ -400,9 +398,7 @@ export default {
|
||||
if (type === -1) {
|
||||
this.weiduTitle = '编辑维度'
|
||||
this.form = Object.assign({}, item, {index, index2: type, isEdit: true})
|
||||
console.log(' this.form: ', this.form)
|
||||
this.form.weight = this.form.weight * 100
|
||||
console.log('this.form: ', this.form)
|
||||
this.show = true
|
||||
} else {
|
||||
this.zhibiaoTitle = '编辑指标'
|
||||
@ -439,7 +435,6 @@ export default {
|
||||
},
|
||||
handleSubmitZhibiao () {
|
||||
this.$refs.formIndicators.validate((v) => {
|
||||
console.log('v: ', v)
|
||||
if (v) {
|
||||
this.formIndicators.weight = this.formIndicators.weight / 100 > 1 ? 1 : this.formIndicators.weight / 100
|
||||
if (this.formIndicators.isEdit) {
|
||||
|
||||
@ -50,7 +50,6 @@ export default {
|
||||
this.token = res.token
|
||||
this.$cookies.set('token', res.token, res.expire)
|
||||
let xcq = await this.$store.dispatch('GET_USERINFO')
|
||||
console.log('xcq: ', xcq)
|
||||
// let ress = await apiUserInfo()
|
||||
// if (ress.code === 200) {
|
||||
// this.SET_USER_INFO(ress.user)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user