wangxia 2 years ago
commit d9ef84ee17

@ -63,11 +63,11 @@
<div>在职人数</div> <div>在职人数</div>
</div> </div>
<div class="table_left"> <div class="table_left">
<span class="fwb">{{totalObj.entryGPA}}</span> <span class="fwb">{{toFixed(totalObj.entryGPA)}}</span>
<div>入职绩点</div> <div>入职绩点</div>
</div> </div>
<div> <div>
<span class="fwb">{{totalObj.finshedGPA}}</span> <span class="fwb">{{toFixed(totalObj.finshedGPA)}}</span>
<div>交付绩点</div> <div>交付绩点</div>
</div> </div>
<!-- </div> --> <!-- </div> -->
@ -117,7 +117,7 @@
<script> <script>
import { dataStatisticsListApi, dataStatisticsTeamDetailApi } from '../../../../api/userinfo' import { dataStatisticsListApi, dataStatisticsTeamDetailApi } from '../../../../api/userinfo'
import moment from 'moment' import moment from 'moment'
import { getDateYMD, formatDateYMD, formatDateYMDHM, getUserApplyOrderStatusById } from '../../../../utils/commonUtil' import { getDateYMD, formatDateYMD, formatDateYMDHM, getUserApplyOrderStatusById ,toFixed} from '../../../../utils/commonUtil'
const rowSelection = { const rowSelection = {
onChange: (selectedRowKeys, selectedRows) => { onChange: (selectedRowKeys, selectedRows) => {
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows) console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
@ -227,11 +227,13 @@ export default {
isspinning: false, isspinning: false,
totalObj: { totalObj: {
// //
arrived: null, arrived: 0,
entry: null, entry: 0,
obJob: null, obJob: 0,
passed: null, passed: 0,
signUps: null, signUps: 0,
entryGPA: 0,
finshedGPA: 0,
}, },
pagination: { pagination: {
hideOnSinglePage: false, hideOnSinglePage: false,
@ -336,9 +338,9 @@ export default {
title: '入职绩点', title: '入职绩点',
dataIndex: 'entryGPA', dataIndex: 'entryGPA',
key: 'entryGPA', key: 'entryGPA',
// customRender: (text, row, index) => { customRender: (text, row, index) => {
// return 32 return toFixed(text)
// }, },
scopedSlots: { customRender: 'entryGPA' }, scopedSlots: { customRender: 'entryGPA' },
ellipsis: true, ellipsis: true,
width: 90, width: 90,
@ -347,9 +349,9 @@ export default {
title: '交付绩点', title: '交付绩点',
dataIndex: 'finshedGPA', dataIndex: 'finshedGPA',
key: 'finshedGPA', key: 'finshedGPA',
// customRender: (text, row, index) => { customRender: (text, row, index) => {
// return 23 return toFixed(text)
// }, },
scopedSlots: { customRender: 'finshedGPA' }, scopedSlots: { customRender: 'finshedGPA' },
ellipsis: true, ellipsis: true,
width: 90, width: 90,
@ -506,7 +508,7 @@ export default {
dataIndex: 'applyUserName', dataIndex: 'applyUserName',
key: 'applyUserName', key: 'applyUserName',
ellipsis: true, ellipsis: true,
width: 120, width: 150,
slots: { title: 'applyUserName' }, slots: { title: 'applyUserName' },
customRender: (text, row, index) => { customRender: (text, row, index) => {
return row.applyUserName return row.applyUserName
@ -520,11 +522,7 @@ export default {
width: 80, width: 80,
slots: { title: 'entryGPA' }, slots: { title: 'entryGPA' },
customRender: (text, row, index) => { customRender: (text, row, index) => {
if (text) { return toFixed(text)
return text
} else {
return 0
}
}, },
}, },
{ {
@ -534,13 +532,9 @@ export default {
ellipsis: true, ellipsis: true,
width: 80, width: 80,
slots: { title: 'finshedGPA' }, slots: { title: 'finshedGPA' },
customRender: (text, row, index) => { customRender: (text, row, index) => {
if (text) { return toFixed(text)
return text },
} else {
return 0
}
},
}, },
] ]
return columns return columns
@ -669,6 +663,9 @@ export default {
this.isspinning = false this.isspinning = false
} }
}, },
toFixed(value){
return toFixed(value)
},
inputpageChange(e) { inputpageChange(e) {
const pagenumcount = this.billPagination.total / this.billPagination.pageSize const pagenumcount = this.billPagination.total / this.billPagination.pageSize
console.log(pagenumcount) console.log(pagenumcount)
@ -818,6 +815,7 @@ export default {
} }
this.isspinning = false this.isspinning = false
}, },
}, },
} }
</script> </script>

@ -19,6 +19,14 @@ export function isEmptyCheck(value) {
export function isNotEmptyCheck(value) { export function isNotEmptyCheck(value) {
return !isEmptyCheck(value); return !isEmptyCheck(value);
} }
export function toFixed(value) {
if(value == 0 || value == '0'){
return 0
}else{
return new Number(value).toFixed(2);
}
}
/** /**
* 根据状态工单类型ID获取名称 * 根据状态工单类型ID获取名称
*/ */

Loading…
Cancel
Save