This commit is contained in:
熊成强 2020-11-06 11:20:52 +08:00
parent 4eadfb7e3f
commit 0587cd89a9
7 changed files with 79 additions and 20 deletions

View File

@ -1,6 +1,10 @@
<template> <template>
<div id="app"> <div id="app">
<router-view class="main"/> <router-view class="main"/>
<!-- <Loading :active.sync="active"
:can-cancel="true"
:on-cancel="onCancel"
:is-full-page="fullPage"></Loading> -->
</div> </div>
</template> </template>
@ -8,13 +12,20 @@
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 } from '@/api/login'
// import Loading from 'vue-loading-overlay'
// Import stylesheet
// import 'vue-loading-overlay/dist/vue-loading.css'
export default { export default {
name: 'App', name: 'App',
data () { data () {
return { return {
active: true,
fullPage: true
} }
}, },
components: {
// Loading
},
computed: { computed: {
...mapState(['user']) ...mapState(['user'])
}, },
@ -22,6 +33,9 @@ export default {
this.GET_DEPLIST() this.GET_DEPLIST()
}, },
methods: { methods: {
onCancel () {
},
...mapActions(['GET_DEPLIST']), ...mapActions(['GET_DEPLIST']),
// //
handleGetDingtalkCode () { handleGetDingtalkCode () {

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 } 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,7 +20,6 @@ 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
@ -28,6 +28,8 @@ 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

@ -83,3 +83,10 @@ 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'
})
}

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 )}}%

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>
@ -203,13 +203,38 @@ export default {
async handleList () { async handleList () {
let res = await apiResultRecordDetail({ resultRecordId: this.$route.query.id }) let res = await apiResultRecordDetail({ resultRecordId: this.$route.query.id })
if (res.code !== 200) return if (res.code !== 200) return
console.log('res.data.flowRecordList: ', res.data.flowRecordList)
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 // if (res.data.flowRecordList[i].status === 1) {
} // res.data.flowRecordList[i].isGou = true
// arr.shift()
// } else {
// if (!arr.some(j => j.status === 1)) {
// res.data.flowRecordList[i === '0' ? i : (Number(i) - 1)].isActive = true
// break
// } else {
// res.data.flowRecordList[ i ].isGou = true
// arr.shift()
// debugger
// }
// }
} }
// for (let i in res.data.flowRecordList) {
// if (res.data.flowRecordList[i].status === 4 && res.data.flowRecordList[Number(i) + 1].status === 0) {
// console.log('i: ', i)
// debugger
// break
// }
// res.data.flowRecordList[i === '0' ? i : (Number(i) - 1)].isGou = true
// if (res.data.flowRecordList[i].status === 0) {
// res.data.flowRecordList[i === '0' ? i : (Number(i) - 1)].isActive = true
// break
// }
// }
this.formList = res.data this.formList = res.data
} }
}, },

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

View File

@ -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) {
@ -76,12 +75,11 @@ export default {
methods: { methods: {
handleGetList () { handleGetList () {
apiGetWaitList(this.pageProcessedInfo).then(res => { apiGetWaitList(this.pageProcessedInfo).then(res => {
console.log('res: ', res)
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 || []
} }
}) })
}, },