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

View File

@ -8,7 +8,10 @@
class="taskDetailRight-contant" class="taskDetailRight-contant"
@click.stop="aa" @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"> <div class="taskDetailRight-contant-content">
<slot name="content"></slot> <slot name="content"></slot>
</div> </div>
@ -123,6 +126,14 @@ export default {
&-title { &-title {
border-bottom: 1px solid @borderColor; border-bottom: 1px solid @borderColor;
padding: 10px 20px; padding: 10px 20px;
display: flex;
height: 60px;
align-items: center;
justify-content: space-between;
i{
font-size: 22px;
cursor: pointer;
}
} }
&-content { &-content {
width: 480px; width: 480px;

View File

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

View File

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

View File

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

View File

@ -83,3 +83,26 @@ export function handleInput (form) {
const a = Number(value) > 100 ? 0 : value.replace(/[^.\d]/g, '') const a = Number(value) > 100 ? 0 : value.replace(/[^.\d]/g, '')
this[form.split('.')[0]][form.split('.')[1]] = String(a) 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 timeout: 1500000
}) })
const options = { // const options = {
fullscreen: true, // fullscreen: true,
target: document.querySelector('.appamin'), // target: document.querySelector('.appamin'),
background: 'rgba(255, 255, 255, 0.8)', // background: 'rgba(255, 255, 255, 0.8)',
spinner: 'el-icon-loading', // spinner: 'el-icon-loading',
text: '数据加载中'} // text: '数据加载中'}
// request拦截器 // request拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
Loading.service(options) // Loading.service(options)
// 是否需要设置 token // 是否需要设置 token
// const isToken = (config.headers || {}).isToken === false // const isToken = (config.headers || {}).isToken === false
// if (getToken() && !isToken) { // if (getToken() && !isToken) {
@ -47,20 +47,20 @@ service.interceptors.request.use(config => {
// 响应拦截器 // 响应拦截器
service.interceptors.response.use(res => { service.interceptors.response.use(res => {
const id = setTimeout(() => { // const id = setTimeout(() => {
Loading.service(options).close() // Loading.service(options).close()
clearTimeout(id) // clearTimeout(id)
}, 300) // }, 300)
if (res.config.responseType === 'blob') { if (res.config.responseType === 'blob') {
return res return res
} }
return res.data return res.data
}, },
error => { error => {
const id = setTimeout(() => { // const id = setTimeout(() => {
Loading.service(options).close() // Loading.service(options).close()
clearTimeout(id) // clearTimeout(id)
}, 300) // }, 300)
console.log('err' + error) console.log('err' + error)
let { message } = error let { message } = error
if (message === 'Network Error') { if (message === 'Network Error') {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -20,7 +20,8 @@
</template> </template>
<script> <script>
import { apiLogin, apiSendSMS } from '@/api/data' import { apiLogin, apiSendSMS, apiUserInfo } from '@/api/data'
import { mapMutations } from 'vuex'
let hostList = 'lzmanagement.ldxinyong.com' let hostList = 'lzmanagement.ldxinyong.com'
let thostList = 'tlzmanagement.ldxinyong.com' let thostList = 'tlzmanagement.ldxinyong.com'
const islzmanagement = window.location.host.indexOf('hostList') > -1 && window.location.host.indexOf('hostList') < 0 const islzmanagement = window.location.host.indexOf('hostList') > -1 && window.location.host.indexOf('hostList') < 0
@ -38,6 +39,7 @@ export default {
beforeMount () {}, beforeMount () {},
mounted () {}, mounted () {},
methods: { methods: {
...mapMutations(['SET_USER_INFO']),
handleClick () { handleClick () {
this.isShow = !this.isShow this.isShow = !this.isShow
}, },
@ -53,6 +55,11 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.token = res.token this.token = res.token
this.$cookies.set('token', res.token, res.expire) 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() 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['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') para['endTime'] = this.$format(this.formData.rangDate[1], 'yyyy-MM-dd hh:mm:ss')
} }
this.$loadingStart()
apiInitiateAssessmentInfo(para).then(res => { apiInitiateAssessmentInfo(para).then(res => {
this.$loadingEnd()
this.dialogSendVisible = false this.dialogSendVisible = false
if (res.code !== 200) { if (res.code !== 200) {
this.$message.error(res.msg) this.$message.error(res.msg)

View File

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