* 'v_1.0.0' of http://gitlab.ldxinyong.com/enterpriseManagement/digitization-ui:
  优化
  优化
  优化
  优化
  优化
  优化
  优化
  youhua
  优化
  优化
  优化
  优化
  优化

# Conflicts:
#	src/views/kpi/assessment/stepList/addPerson.vue
This commit is contained in:
leave 2020-11-06 17:29:07 +08:00
commit ab6799ea31
25 changed files with 323 additions and 152 deletions

View File

@ -7,51 +7,74 @@
<script>
import { mapState, mapActions } from 'vuex'
import * as dd from 'dingtalk-jsapi'
import { apiDingtalkLogin } from '@/api/login'
import { apiDingtalkLogin, apiUserInfo } from '@/api/login'
export default {
name: 'App',
data () {
return {
active: true,
fullPage: true,
dingCode: ''
}
},
components: {
},
computed: {
...mapState(['user'])
},
async mounted () {
console.log('dd: ', dd)
if (!dd.other) {
await this.handleGetDingtalkCode()
await this.handleDingtalkLogin()
}
this.GET_DEPLIST()
},
methods: {
...mapActions(['GET_DEPLIST']),
onCancel () {
},
...mapActions(['GET_DEPLIST', 'SET_USER_INFO']),
//
handleGetDingtalkCode () {
let _this = this
dd.runtime.permission.requestAuthCode({
corpId: 'ding267474e759bbca1c35c2f4657eb6378f',
onSuccess (res) {
console.log('result===', res)
_this.handleDingtalkLogin(res)
_this.dingCode = res
},
onFail (err) {
console.log('err===', err)
_this.dingCode = err
}
return new Promise((resolve, reject) => {
let _this = this
dd.runtime.permission.requestAuthCode({
corpId: 'ding267474e759bbca1c35c2f4657eb6378f',
onSuccess (res) {
console.log('result===', res)
_this.dingCode = res
resolve()
},
onFail (err) {
console.log('err===', err)
_this.dingCode = err
resolve()
}
})
})
},
//
handleDingtalkLogin (val) {
apiDingtalkLogin(val).then(res => {
if (res && res.code === 0) {
this.$cookies.set('token', res.token)
this.dataForm.verify = '登录成功,跳转中...'
window.open(window.location.protocol + '//' + window.location.host + '/digitization/kpi/workbench/home?code=' + this.dingCode.code)
} else {
this.dataForm.verify = '身份验证失败' + res.msg
this.$message.error(this.dataForm.verify)
this.$router.replace({ name: 'dingTalkLogin' })
}
})
async handleDingtalkLogin (val = this.dingCode) {
const res = await apiDingtalkLogin(val)
if (res && res.code === 0) {
this.$cookies.set('token', res.token)
await this.handleInfo()
this.dataForm.verify = '登录成功,跳转中...'
window.open(window.location.protocol + '//' + window.location.host + '/digitization/kpi/workbench/home?code=' + this.dingCode.code)
} else {
this.dataForm.verify = '身份验证失败' + res.msg
this.$message.error(this.dataForm.verify)
this.$router.replace({ name: 'dingTalkLogin' })
}
},
//
async handleInfo () {
let res = await apiUserInfo()
if (res.code === 200) {
this.SET_USER_INFO(res.user)
}
}
}
}

View File

@ -34,3 +34,12 @@ export function apiSendSMS (query = {}) {
data: query
})
}
// 获取用户信息
export function apiUserInfo (query = {}) {
return request({
url: '/lz_management/sys/user/info',
method: 'get',
query: query
})
}

View File

@ -8,3 +8,12 @@ export function apiDingtalkLogin (query) {
data: query
})
}
// 获取用户信息
export function apiUserInfo (query = {}) {
return request({
url: '/lz_management/sys/user/info',
method: 'get',
query: query
})
}

View File

@ -139,7 +139,11 @@ export default {
},
methods: {
checkSelectable (row, index) {
return !this.nOSec && row.score === 0
if (!this.nOSec) {
return true
} else {
return row.score === 0
}
},
handlePopupCreat () {
this.$emit('update:showChooseList', false)

View File

@ -8,7 +8,10 @@
class="taskDetailRight-contant"
@click.stop="aa"
>
<div class="taskDetailRight-contant-title commonFont">{{title}}</div>
<div class="taskDetailRight-contant-title commonFont">
<div style="flex:1;">{{title}}</div>
<i v-if="!footer" @click="$emit('cancel')" class="el-icon-close"></i>
</div>
<div class="taskDetailRight-contant-content">
<slot name="content"></slot>
</div>
@ -123,6 +126,14 @@ export default {
&-title {
border-bottom: 1px solid @borderColor;
padding: 10px 20px;
display: flex;
height: 60px;
align-items: center;
justify-content: space-between;
i{
font-size: 22px;
cursor: pointer;
}
}
&-content {
width: 480px;

View File

@ -20,7 +20,8 @@
</div> -->
</transition>
<div class="navBar-right" v-if="isNav">
<img onerror="javascript:this.src='/static/default.jpg';" :src="this.src" alt="">
<span>{{this.info.realName}}</span>
<img onerror="javascript:this.src='/static/default.jpg';" :src="this.info.avatar || ''" alt="">
</div>
</div>
</template>
@ -42,7 +43,7 @@ export default {
NavHeader
},
computed: {
...mapState({src: state => state.user.info.src}),
...mapState({ info: state => state.user.info }),
isNav () {
return !!this.$route.meta.isNav
},
@ -91,6 +92,11 @@ export default {
padding: 0 40px;
box-shadow: 0 1px 6px 0 rgba(0,0,0,.12), 0 1px 6px 0 rgba(0,0,0,.12);
&-right{
display: flex;
align-items: center;
span{
margin: 0 10px;
}
img{
width: 40px;
height: 40px;

View File

@ -10,8 +10,9 @@ import './style/index.less'
import '@/icons'
import VConsole from 'vconsole'
import VueCookie from 'vue-cookies'
import {debounce, departGetForm, personlGetForm, handleInput} from '@/utils/common'
import { debounce, departGetForm, personlGetForm, handleInput, messageSuccess, loading, loadingClose } from '@/utils/common'
import { format } from '@/utils/dateFormat'
// }
// let hostList = ['lzmanagement.ldxinyong.com']
// if (!hostList.includes(window.location.host)) {
@ -19,15 +20,18 @@ var vConsole = new VConsole({
vConsole_switch_x: 0,
vConsole_switch_y: 0
})
// }
Vue.use(VueCookie)
Vue.config.productionTip = false
Vue.prototype.$loadingStart = loading
Vue.prototype.$loadingEnd = loadingClose
Vue.prototype.$format = format
Vue.prototype.debounce = debounce
Vue.prototype.$personlGetForm = personlGetForm
Vue.prototype.$departGetForm = departGetForm
Vue.prototype.$handleInputInt = handleInput
Vue.prototype.$msg = messageSuccess
/* eslint-disable no-new */
new Vue({
el: '#app',

View File

@ -2,11 +2,14 @@ import { getDepList } from '@/api/report'
const user = {
state: {
deplist: [],
info: {
src: ''
}
info: JSON.parse(localStorage.getItem('info')) || {}
},
mutations: {
SET_USER_INFO: (state, info) => {
localStorage.setItem('info', JSON.stringify(info))
state.info = info
},
SET_DEPLIST: (state, list = []) => {
state.deplist = list
}

View File

@ -83,3 +83,26 @@ export function handleInput (form) {
const a = Number(value) > 100 ? 0 : value.replace(/[^.\d]/g, '')
this[form.split('.')[0]][form.split('.')[1]] = String(a)
}
export function messageSuccess (params) {
this.$message({
message: params.msg,
type: 'success'
})
}
let id = ''
export function loading (options = {
fullscreen: true,
target: document.querySelector('.appamin'),
background: 'rgba(255, 255, 255, 0.8)',
spinner: 'el-icon-loading',
text: '数据加载中'}) {
id = this.$loading.service(options)
}
export function loadingClose () {
setTimeout(() => {
id.close()
}, 300)
}

View File

@ -23,16 +23,16 @@ const service = axios.create({
timeout: 1500000
})
const options = {
fullscreen: true,
target: document.querySelector('.appamin'),
background: 'rgba(255, 255, 255, 0.8)',
spinner: 'el-icon-loading',
text: '数据加载中'}
// const options = {
// fullscreen: true,
// target: document.querySelector('.appamin'),
// background: 'rgba(255, 255, 255, 0.8)',
// spinner: 'el-icon-loading',
// text: '数据加载中'}
// request拦截器
service.interceptors.request.use(config => {
Loading.service(options)
// Loading.service(options)
// 是否需要设置 token
// const isToken = (config.headers || {}).isToken === false
// if (getToken() && !isToken) {
@ -47,20 +47,20 @@ service.interceptors.request.use(config => {
// 响应拦截器
service.interceptors.response.use(res => {
const id = setTimeout(() => {
Loading.service(options).close()
clearTimeout(id)
}, 300)
// const id = setTimeout(() => {
// Loading.service(options).close()
// clearTimeout(id)
// }, 300)
if (res.config.responseType === 'blob') {
return res
}
return res.data
},
error => {
const id = setTimeout(() => {
Loading.service(options).close()
clearTimeout(id)
}, 300)
// const id = setTimeout(() => {
// Loading.service(options).close()
// clearTimeout(id)
// }, 300)
console.log('err' + error)
let { message } = error
if (message === 'Network Error') {

View File

@ -44,8 +44,8 @@
v-for="(j,indexJ) in handleFilter(i.detailDtos)"
:key="indexJ"
>
<div style="width:30%"><i style="margin-right:6px;" class="my-handle el-icon-s-operation"></i>{{j.target}}</div>
<pre style="width:30%">{{j.keyResult}}</pre>
<div style="width:30%" class="my-handle"><i style="margin-right:6px;" class=" el-icon-s-operation"></i>{{j.target}}</div>
<div style="width:30%"><pre >{{j.keyResult}}</pre></div>
<div style="width:30%">{{ Math.round((j.checkWeight * 100)*1000)/1000}}%</div>
<div style="width:10%">
<el-button
@ -381,8 +381,9 @@ export default {
}
&-content{
display: flex;
align-items: center;
height: 60px;
padding: 20px 0;
// align-items: center;
// height: 60px;
border-bottom: 1px solid @borderColor;
justify-content: space-between;
div{

View File

@ -153,7 +153,9 @@ export default {
},
async handleGetData (parmas = this.params) {
try {
this.$loadingStart()
let res = await apiGetAssessList(parmas)
this.$loadingEnd()
res = res.data
this.tableData = res.list
this.params.totalCount = res.totalCount

View File

@ -24,7 +24,7 @@
@cancel='handleCancel'
@submit="handleSubmit"
:footer='true'
title="驳回评分"
title="驳回"
>
<div
slot="content"
@ -166,7 +166,9 @@ export default {
this.dialogFormVisible = true
},
async handleAgree () {
this.$loadingStart()
let res = await this.handlApiSaveapproval({status: 1, menuName: '同意了'})
this.$loadingEnd()
this.dialogFormVisible = !!res
},
//
@ -186,7 +188,9 @@ export default {
const obj = {status: 3, menuName: '催办了'}
if (this.info) obj.flowRecordId = this.info.flowRecordId
const params = Object.assign({}, this.form, {resultRecordId: this.$route.query.id || ''}, obj)
this.$loadingStart()
let res = await apiSaveapproval(params)
this.$loadingEnd()
if (res.code !== 200) {
this.$message.error(res.msg)
return
@ -216,7 +220,9 @@ export default {
const obj = {status: 4, menuName: '跳过了'}
if (this.info) obj.flowRecordId = this.info.flowRecordId
const params = Object.assign({}, this.form, {resultRecordId: this.$route.query.id || ''}, obj)
this.$loadingStart()
let res = await apiSaveapproval(params)
this.$loadingEnd()
if (res.code !== 200) {
this.$message.error(res.msg)
return
@ -248,7 +254,9 @@ export default {
})
},
async handleSubmit () {
this.$loadingStart()
let res = await this.handlApiSaveapproval({status: 5, menuName: '驳回了'})
this.$loadingEnd()
console.log('!!res: ', !!res)
this.bohui = !!res
},

View File

@ -33,8 +33,8 @@
</pre>
</div>
<div v-if="tableInfo.result || auth.showResult">
<el-input v-if="tableInfo.result" style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.checkResult" clearable></el-input>
<span v-else>{{child.checkResult || '--'}}</span>
<el-input v-if="tableInfo.result" type="textarea" style="width:120px;" 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 )}}%
@ -84,8 +84,8 @@
<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' @click="handleSaveDetail()" plain>暂存</el-button>
<el-button size='small' @click="handleGetNext" type="primary" >{{tableInfo.result?'提交结果值':'提交评分'}}</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 v-else class="table-bottoms">
@ -128,6 +128,8 @@ export default {
},
data () {
return {
loadingTi: false,
loadingZan: false,
input: '',
scoreList: []
}
@ -138,14 +140,17 @@ export default {
},
methods: {
async handleGetNext () {
this.loadingTi = true
let res1 = await apiSaveDetail(this.obj)
if (res1.code !== 200) {
this.$message.error(res1.msg)
this.loadingTi = false
return
}
const obj = {status: 1, menuName: this.tableInfo.result ? '提交了结果值' : '提交了评分'}
const params = Object.assign({}, {resultRecordId: this.$route.query.id || ''}, obj)
let res = await apiSaveapproval(params)
this.this.loadingTi = false
if (res.code !== 200) {
this.$message.error(res.msg)
return
@ -166,7 +171,9 @@ export default {
console.log('resssss: ', res)
},
async handleSaveDetail (params = this.obj) {
this.loadingZan = true
let res = await apiSaveDetail(params)
this.loadingZan = false
if (res.code !== 200) {
this.$message.error(res.msg)
return

View File

@ -55,7 +55,7 @@
<div slot="content">执行中是员工在目标确认后努力达成目标的一个过程直到管理员发起评分<br />管理员如何发起评分返回上级页面&lt;考核详情&gt;点击"开始评分"按钮发起</div>
<div>
{{index+1}}.{{i.flowName}}<i class="el-icon-warning-outline" />:{{i.staffName}} <i
v-if="i.status ===1 && !i.isActive"
v-if="i.isGou && !i.isActive"
style="color:#3ba1ff;margin:0 0 0 4px;font-weight:800;"
class="el-icon-check"
></i>
@ -99,6 +99,9 @@
<span>{{i.staffName}}</span><span class="mubiao">#{{i.optDesc}}#</span>
</div>
</div>
<div class="comment" v-if="i.comment">
<pre>{{i.comment}}</pre>
</div>
</div>
</div>
</div>
@ -106,7 +109,7 @@
v-if="right.showRight"
@cancel='handleCancel'
@submit="handleSubmit"
:footer='true'
:footer='false'
:title="form.item.flowName"
>
<div
@ -124,9 +127,9 @@
departmentName:i.departName
}"/>
<div class="chooseManage-item-center">
<el-tag size="mini" type="warning">未确认</el-tag>
<!-- <el-tag>已跳过</el-tag>
<el-tag type="success">已确认</el-tag> -->
<el-tag v-if='i.status===0' size="mini" type="warning">未确认</el-tag>
<el-tag v-if='i.status===4' size="mini" >已跳过</el-tag>
<el-tag v-if='i.status===1' size="mini" type="success">已确认</el-tag>
</div>
<div>
<UseButton :info='i' :formList='formList' :tableInfo.sync='tableInfo'/>
@ -175,19 +178,18 @@ export default {
},
computed: {},
beforeMount () { },
mounted () {
this.handleList()
this.handleGetTbale()
async mounted () {
await this.handleList()
},
methods: {
async handleGetTbale (id = this.$route.query.id) {
this.$loadingStart()
let res = await apiResultGetDetail({ id })
if (res.code !== 200) return
this.$loadingEnd()
if (res.code !== 200) return this.$message.error(res.msg)
this.obj = res.data
console.log('res: ', res)
},
handleRight (item) {
console.log('item: ', item)
this.form.item = item
this.right.showRight = true
},
@ -199,13 +201,13 @@ export default {
},
async handleList () {
let res = await apiResultRecordDetail({ resultRecordId: this.$route.query.id })
this.handleGetTbale()
if (res.code !== 200) return
const arr = res.data.flowRecordList.concat([])
for (let i in res.data.flowRecordList) {
res.data.flowRecordList[i === '0' ? i : (i - 1)].isGou = true
if (res.data.flowRecordList[i].status === 0) {
res.data.flowRecordList[i === '0' ? i : (i - 1)].isActive = true
break
}
arr.shift()
res.data.flowRecordList[i][arr.some(j => j.status === 1) ? 'isGou' : 'isActive'] = true
if (!arr.some(j => j.status === 1)) break
}
this.formList = res.data
}
@ -231,6 +233,19 @@ export default {
}
}
&-content {
.comment{
width: 200px;
margin: 0 0 0 50px;
padding: 10px;
background: rgb(240, 240, 240);
border-radius: 4px;
pre{
white-space: pre;
white-space: pre-wrap!important;
word-wrap: break-word!important;
*white-space:normal!important;
}
}
padding: 28px;
margin: 10px 0 50px;
// height: 700px;

View File

@ -1,56 +1,30 @@
<!-- -->
<template>
<div class="addPerson">
<small-nav />
<div class="addPerson-content">
<el-form
ref="form"
:model="form"
label-width="160px"
>
<el-form-item label="考评员工:">
<div v-if="list.list.length>0">
<el-input
@focus="handleChoose"
style="width:300px;cursor: pointer;"
size="small"
:value="list.title + '等' + list.list.length + '个人'"
readonly
>
<i
slot="suffix"
class="el-input__icon el-icon-edit"
></i>
</el-input>
<i
@click="list.list=[]"
style="margin-left:10px;cursor: pointer;"
class="el-icon-delete"
></i>
</div>
<el-button
size="small"
icon="el-icon-plus"
plain
@click="handleChoose"
>选人员</el-button>
</el-form-item>
<el-form-item>
<el-button
size="small"
type="primary"
@click="handleOnSubmit"
>确定</el-button>
</el-form-item>
</el-form>
<div class="addPerson">
<small-nav />
<div class="addPerson-content">
<el-form ref="form" :model="form" label-width="160px">
<el-form-item label="考评员工:">
<div v-if="list.list.length>0">
<el-input
@focus="handleChoose"
style="width:300px;cursor: pointer;"
size="small"
:value ="list.title + '等' + list.list.length + '个人'"
readonly>
<i slot="suffix" class="el-input__icon el-icon-edit"></i>
</el-input>
<i @click="list.list=[]" style="margin-left:10px;cursor: pointer;" class="el-icon-delete"></i>
</div>
<el-button size="small" icon="el-icon-plus" plain @click="handleChoose">选人员</el-button>
</el-form-item>
<el-form-item>
<el-button size="small" :loading='isLoading' type="primary" @click="handleOnSubmit">确定</el-button>
</el-form-item>
</el-form>
</div>
<getPersonnel v-if="isSshow" :value.sync='form.staffIds' :isShow.sync='isSshow' :showDataList.sync='list'/>
</div>
<getPersonnel
v-if="isSshow"
:value.sync='form.staffIds'
:isShow.sync='isSshow'
:showDataList.sync='list'
/>
</div>
</template>
<script>
@ -60,6 +34,7 @@ import { apiAssessManagerChange } from '@/api/assessment'
export default {
data () {
return {
isLoading: false,
isSshow: false,
list: {
list: []
@ -72,8 +47,8 @@ export default {
getPersonnel
},
computed: {},
beforeMount () { },
mounted () { },
beforeMount () {},
mounted () {},
methods: {
handleChoose () {
this.isSshow = true
@ -85,7 +60,10 @@ export default {
confirm: 0,
changeType: 0
}
this.isLoading = false
this.$loadingStart()
let res = await apiAssessManagerChange(parmas)
this.isLoading = true
if (res.code === 503) {
this.$confirm(res.msg, '提示', {
confirmButtonText: '确定',
@ -94,6 +72,7 @@ export default {
}).then(async () => {
parmas.confirm = 1
let res1 = await apiAssessManagerChange(parmas)
this.$loadingEnd()
if (res1.code !== 200) return this.$message.error(res1.msg)
history.go(-1)
}).catch(() => {
@ -112,8 +91,8 @@ export default {
</script>
<style lang='less' scoped>
.addPerson {
&-content {
.addPerson{
&-content{
margin: 30px 0 10px 0;
padding: 28px;
min-height: 400px;

View File

@ -272,12 +272,25 @@ export default {
methods: {
async handleCallBackChoose (item) {
if (!item.value) return this.$message.info('请选择考评组!')
const params = {
evaluationIds: item.value,
startId: this.$route.query.id
}
let res = await apiAssessManagerToScore(params)
if (res.code !== 200) return this.$message.error(res.msg)
this.$confirm('所选考评组员工的绩效考核将自动进入评分流程,确认开始评分?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const params = {
evaluationIds: item.value,
startId: this.$route.query.id
}
let res = await apiAssessManagerToScore(params)
if (res.code !== 200) return this.$message.error(res.msg)
this.$msg(res)
this.showChooseList = false
}).catch(() => {
this.$message({
type: 'info',
message: '已取消评分'
})
})
},
submitClick (item) {
this.params.evaluationIds = item.value
@ -307,8 +320,9 @@ export default {
this.handleGetListContent()
},
async handleGetListContent (params = this.params) {
console.log('params: ', params)
this.$loadingStart()
let res = await apiManagerDetail(params)
this.$loadingEnd()
if (res.code !== 200) return
this.tableData = res.data.list
this.params.totalCount = res.data.totalCount

View File

@ -282,7 +282,9 @@ export default {
startId: startId
}
try {
this.$loadingStart()
const result = await getChartData(params)
this.$loadingEnd()
// startIdstartId
if (typeof startId === 'undefined') {
this.defaultStartId[0] = result.data[0].type

View File

@ -147,7 +147,9 @@ export default {
showData: {
list: []
}, //
form: {},
form: {
name: ''
},
rules: {
name: [
{ required: true, message: '请输入考评组', trigger: 'blur' }
@ -181,12 +183,14 @@ export default {
},
beforeMount () {},
async mounted () {
this.$loadingStart()
this.handleGetGround()
const id = this.$route.query.id || ''
this.id = id
if (id) {
this.handleGetByIdForBasis(id)
await this.handleGetByIdForBasis(id)
}
this.$loadingEnd()
this.form = this.basisForm
},
methods: {
@ -241,19 +245,28 @@ export default {
i.isSelect = 1
return i
})
const a = this.$personlGetForm(res.staffs)
const c = this.$departGetForm(res.deps)
const obj = {
staffIds: a.value,
depIds: c.value,
id: this.$route.query.copy ? '' : res.id,
name: this.$route.query.copy ? '' : res.name
}
if (res.deps.length !== 0) {
const b = this.$personlGetForm(res.outs)
this.outIdsLsit = b
this.form.outIds = b.value
obj.outIds = b.value
}
const a = this.$personlGetForm(res.staffs)
const c = this.$departGetForm(res.deps)
this.form.staffIds = a.value
this.form.depIds = c.value
// this.form.staffIds = a.value
// this.form.depIds = c.value
this.personnelList = a
this.showData = c
this.form.id = this.$route.query.copy ? '' : res.id
this.form.name = this.$route.query.copy ? '' : res.name
this.form = obj
// this.form.id = this.$route.query.copy ? '' : res.id
// this.form.name = this.$route.query.copy ? '' : res.name
console.log('this.form: ', this.form)
} catch (error) {
this.$message.error(error.msg)
}
@ -288,6 +301,7 @@ export default {
form: {
deep: true,
handler (n, o) {
console.log('n: ', n)
this.$emit('update:basisForm', n)
}
}

View File

@ -74,6 +74,7 @@ export default {
if (!this.basisForm.name) {
return this.$message.error('请输入考评组名称')
}
console.log('!this.basisForm: ', this.basisForm)
if (!this.basisForm.depIds && !this.basisForm.staffIds) {
return this.$message.error('请选择被考核人员')
}
@ -90,16 +91,37 @@ export default {
return this.$message.error('权重评分总和不得大于100')
}
}
if (this.$route.query.copy) {
this.templateForm.modelItems = this.templateForm.modelItems.map(i => {
i.tagetLibItems = i.tagetLibItems.map(j => {
delete j.id
return j
})
delete i.id
return i
})
}
this.loadings = true
try {
this.$loadingStart()
let res1 = await apiCheckStaff(Object.assign({}, this.basisForm, {confirm: 1}))
console.log('res1: ', res1)
let res = await saveBaseSet(this.basisForm)
if (res.code !== 200) {
this.$loadingEnd()
return this.$message.error(res.msg)
}
res = res.data
this.basisForm = res
this.templateForm.evaluationGroupId = res.id
for (let i in this.processInfo) {
try {
if (this.$route.query.copy) {
this.processInfo[i].chartDetails.recordSimpleDtos = this.processInfo[i].chartDetails.recordSimpleDtos.map(i => {
delete i.id
return i
})
}
let res1 = await saveDetailProcs(Object.assign({}, this.processInfo[i].chartDetails, {evaluationGroupId: res.id}))
console.log('res: ', res1)
} catch (error) {
@ -113,6 +135,7 @@ export default {
console.log('this.templateForm: ', JSON.stringify(this.templateForm))
try {
let res = await saveTemSet(this.templateForm)
this.$loadingEnd()
res = res.data
// this.basisForm = res
console.log('res: ', res)

View File

@ -158,7 +158,9 @@ export default {
},
async handleGetData (parmas = Object.assign({}, this.params)) {
try {
this.$loadingStart()
let res = await getWorkList(parmas)
this.$loadingEnd()
if (res.code !== 200) return
res = res.data
console.log('res: ', res)

View File

@ -20,7 +20,7 @@
<div class="boderAndRadius commonFont noSelect" @click="handleGetMoreToDo('assessment')">考核管理</div>
<div class="boderAndRadius commonFont noSelect" @click="handleGetMoreToDo('workbench-group')" >考评组</div>
<div class="boderAndRadius commonFont noSelect" @click="handleGetMoreToDo('initiate')">发起考核</div>
<div class="boderAndRadius commonFont noSelect">指标库</div>
<div class="boderAndRadius commonFont noSelect" @click="handleGetMoreToDo('1')">指标库</div>
</div>
</div>
</div>
@ -58,7 +58,6 @@ export default {
beforeMount () {},
mounted () {
let search = window.location.search
console.log('search: ', search)
if (search) {
const item = this.list.filter(i => '?' + i.tag === search.split('=')[0])
if (item.length > 0) {
@ -75,17 +74,21 @@ export default {
},
methods: {
handleGetList () {
this.$loadingStart()
apiGetWaitList(this.pageProcessedInfo).then(res => {
console.log('res: ', res)
this.$loadingEnd()
if (res.code === 200) {
this.pageProcessedInfo.currPage = res.data.currPage
this.pageProcessedInfo.totalCount = res.data.totalCount
this.pageProcessedInfo.totalPage = res.data.totalPage
this.selectedTableList = res.data.list
this.selectedTableList = res.data.list || []
}
})
},
handleGetMoreToDo (name) {
if (name === '1') {
return this.$message.info('开发中。。。')
}
const params = {
name
}

View File

@ -20,7 +20,8 @@
</template>
<script>
import { apiLogin, apiSendSMS } from '@/api/data'
import { apiLogin, apiSendSMS, apiUserInfo } from '@/api/data'
import { mapMutations } from 'vuex'
let hostList = 'lzmanagement.ldxinyong.com'
let thostList = 'tlzmanagement.ldxinyong.com'
const islzmanagement = window.location.host.indexOf('hostList') > -1 && window.location.host.indexOf('hostList') < 0
@ -38,6 +39,7 @@ export default {
beforeMount () {},
mounted () {},
methods: {
...mapMutations(['SET_USER_INFO']),
handleClick () {
this.isShow = !this.isShow
},
@ -53,6 +55,11 @@ export default {
if (res.code === 200) {
this.token = res.token
this.$cookies.set('token', res.token, res.expire)
let ress = await apiUserInfo()
if (ress.code === 200) {
this.SET_USER_INFO(ress.user)
}
console.log('ress: ', ress)
location.reload()
}
}

View File

@ -201,7 +201,9 @@ 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')
}
this.$loadingStart()
apiInitiateAssessmentInfo(para).then(res => {
this.$loadingEnd()
this.dialogSendVisible = false
if (res.code !== 200) {
this.$message.error(res.msg)

View File

@ -93,7 +93,7 @@ export default {
//
this.waitCount = res.data.totalCount
}
this.selectedTableList = res.data.list
this.selectedTableList = res.data.list || []
console.log('待处理', res)
})
},