diff --git a/src/App.vue b/src/App.vue index e5a4c92..d13f044 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,10 @@ @@ -8,13 +12,20 @@ import { mapState, mapActions } from 'vuex' import * as dd from 'dingtalk-jsapi' import { apiDingtalkLogin } from '@/api/login' +// import Loading from 'vue-loading-overlay' +// Import stylesheet +// import 'vue-loading-overlay/dist/vue-loading.css' export default { name: 'App', data () { return { - + active: true, + fullPage: true } }, + components: { + // Loading + }, computed: { ...mapState(['user']) }, @@ -22,6 +33,9 @@ export default { this.GET_DEPLIST() }, methods: { + onCancel () { + + }, ...mapActions(['GET_DEPLIST']), // 获取钉钉鉴权码 handleGetDingtalkCode () { diff --git a/src/main.js b/src/main.js index 34d93a5..1eace95 100644 --- a/src/main.js +++ b/src/main.js @@ -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 } from '@/utils/common' import { format } from '@/utils/dateFormat' +// } // let hostList = ['lzmanagement.ldxinyong.com'] // if (!hostList.includes(window.location.host)) { @@ -19,7 +20,6 @@ var vConsole = new VConsole({ vConsole_switch_x: 0, vConsole_switch_y: 0 }) -// } Vue.use(VueCookie) Vue.config.productionTip = false @@ -28,6 +28,8 @@ 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', diff --git a/src/utils/common.js b/src/utils/common.js index e5230ea..dc1af5a 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -83,3 +83,10 @@ 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' + }) +} diff --git a/src/views/kpi/assessment/performance/components/table.vue b/src/views/kpi/assessment/performance/components/table.vue index c0c7c64..2bf4cd1 100644 --- a/src/views/kpi/assessment/performance/components/table.vue +++ b/src/views/kpi/assessment/performance/components/table.vue @@ -33,8 +33,8 @@
- - {{child.checkResult || '--'}} + +
{{child.checkResult || '--'}}
{{( Math.round((child.checkWeight * 100) * 1000) / 1000 )}}% diff --git a/src/views/kpi/assessment/performance/index.vue b/src/views/kpi/assessment/performance/index.vue index fa61ceb..f3ccbbc 100644 --- a/src/views/kpi/assessment/performance/index.vue +++ b/src/views/kpi/assessment/performance/index.vue @@ -55,7 +55,7 @@
执行中”是员工在目标确认后,努力达成目标的一个过程,直到管理员发起评分。
管理员如何发起评分:返回上级页面<考核详情>,点击"开始评分"按钮发起。
{{index+1}}.{{i.flowName}}:{{i.staffName}} @@ -203,13 +203,38 @@ export default { async handleList () { let res = await apiResultRecordDetail({ resultRecordId: this.$route.query.id }) 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) { - 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 + // 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 } }, diff --git a/src/views/kpi/assessment/stepList/index.vue b/src/views/kpi/assessment/stepList/index.vue index 15b8dee..1a02404 100644 --- a/src/views/kpi/assessment/stepList/index.vue +++ b/src/views/kpi/assessment/stepList/index.vue @@ -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 diff --git a/src/views/kpi/workbench/home/index.vue b/src/views/kpi/workbench/home/index.vue index c66e2dd..c0d61a3 100644 --- a/src/views/kpi/workbench/home/index.vue +++ b/src/views/kpi/workbench/home/index.vue @@ -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) { @@ -76,12 +75,11 @@ export default { methods: { handleGetList () { apiGetWaitList(this.pageProcessedInfo).then(res => { - console.log('res: ', res) 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 || [] } }) },