From 7af09e42b49cd18f160c19297f47c4622b1eedc3 Mon Sep 17 00:00:00 2001 From: liyj <1003249715@qq.com> Date: Wed, 24 Jun 2020 17:14:37 +0800 Subject: [PATCH] ... --- src/components/oa/merits/meritsDetail/index.jsx | 55 +++++++++++++----- src/components/oa/merits/meritsExamine/index.jsx | 4 src/components/oa/merits/meritsOverview/index.jsx | 7 ++ src/api/httpurl.js | 2 src/components/common/TopListTableView/tagList.js | 74 +++++++++++++----------- 5 files changed, 91 insertions(+), 51 deletions(-) diff --git a/src/api/httpurl.js b/src/api/httpurl.js index 640d96e..9e1f0dc 100644 --- a/src/api/httpurl.js +++ b/src/api/httpurl.js @@ -1,6 +1,6 @@ //内网测试地址 // let StagingUrl = 'http://192.168.3.12:9072'; -let StagingUrl = "http://120.79.193.119:9072"; +let StagingUrl = "http://localhost:9072"; // let StagingUrl = "http://120.79.193.119:9075"; //mock地址 diff --git a/src/components/common/TopListTableView/tagList.js b/src/components/common/TopListTableView/tagList.js index 3c19a47..d34b5c1 100644 --- a/src/components/common/TopListTableView/tagList.js +++ b/src/components/common/TopListTableView/tagList.js @@ -18,11 +18,11 @@ dataIndex: 'userName', key: 'userName', }, - { - title: '部门', - dataIndex: 'userDeptName', - key: 'userDeptName', - }, + // { + // title: '部门', + // dataIndex: 'userDeptName', + // key: 'userDeptName', + // }, { title: '绩效得分', dataIndex: 'meritsGrade', @@ -51,11 +51,11 @@ dataIndex: 'userName', key: 'userName', }, - { - title: '部门', - dataIndex: 'userDeptName', - key: 'userDeptName', - }, + // { + // title: '部门', + // dataIndex: 'userDeptName', + // key: 'userDeptName', + // }, { title: '缺陷数', dataIndex: 'defectNumber', @@ -84,12 +84,12 @@ dataIndex: 'userName', key: 'userName', }, - { - title: '部门', - dataIndex: 'userDeptName', - key: 'userDeptName', - width: '25%', - }, + // { + // title: '部门', + // dataIndex: 'userDeptName', + // key: 'userDeptName', + // width: '25%', + // }, { title: '次数', dataIndex: 'lateTimes', @@ -126,25 +126,33 @@ dataIndex: 'userName', key: 'userName', }, + // { + // title: '部门', + // dataIndex: 'userDeptName', + // key: 'userDeptName', + // width: '25%', + // }, + // { + // title: '打卡时间', + // dataIndex: 'onDutyUserCheckTime', + // key: 'onDutyUserCheckTime', + // className: 'fontSize12', + // width: '25%', + // render: (item, cur) => { + // return ( + // item && + // // <div style={{ fontSize: 12 }}> + // moment(item).format('MM/DD HH:mm') + // // </div> + // ); + // }, + // }, { - title: '部门', - dataIndex: 'userDeptName', - key: 'userDeptName', - width: '25%', - }, - { - title: '打卡时间', - dataIndex: 'onDutyUserCheckTime', - key: 'onDutyUserCheckTime', - className: 'fontSize12', - width: '25%', + title: '次数', + dataIndex: 'earlyTimes', + key: 'earlyTimes', render: (item, cur) => { - return ( - item && - // <div style={{ fontSize: 12 }}> - moment(item).format('MM/DD HH:mm') - // </div> - ); + return item + '次'; }, }, { diff --git a/src/components/oa/merits/meritsDetail/index.jsx b/src/components/oa/merits/meritsDetail/index.jsx index a8eab23..67c9fbb 100644 --- a/src/components/oa/merits/meritsDetail/index.jsx +++ b/src/components/oa/merits/meritsDetail/index.jsx @@ -7,7 +7,7 @@ /** 绩效详情 */ import React, { ReactNode, ReactEventHandler, Component } from 'react'; import TableView from '../../../common/TableView'; -import { Row, Col, Button, InputNumber, message, DatePicker } from 'antd'; +import { Row, Col, Button, InputNumber, message, DatePicker, Input } from 'antd'; import { createHashHistory } from 'history'; import './index.scss'; const history = createHashHistory(); @@ -15,7 +15,7 @@ import fetch from '../../../../api/request'; import moment from 'moment'; const { MonthPicker } = DatePicker; - +const { TextArea } = Input; export default class MeritsDetail extends Component { constructor(props) { @@ -71,12 +71,14 @@ // 保存操作 onSave = (item) => { console.log('item', item); - let { meritsAssessId, meritsGrade } = item; + let { meritsAssessId, meritsGrade, meritsContent } = item; fetch({ url: `api/merits/assess/modifyGrade`, - params: { + method: 'POST', + data: { id : meritsAssessId, - meritsGrade + meritsGrade : meritsGrade, + meritsContent : meritsContent } }).then(res => { if (res) { @@ -95,7 +97,7 @@ var cols = [ { title: '编号', dataIndex: 'id', width: '3%' }, { title: '评分项目', dataIndex: 'scoreItems', width: '6%' }, - { title: '评分目标', dataIndex: 'scoreTarget', width: '10%' }, + // { title: '评分目标', dataIndex: 'scoreTarget', width: '10%' }, { title: '定义与标准', dataIndex: 'standard', width: '25%', render: (cur, item) => { return <div dangerouslySetInnerHTML={{ @@ -110,21 +112,40 @@ }}></div> } }, - { title: '数据来源', dataIndex: 'dataSources', width: '8%' }, - { title: '取值范围', dataIndex: 'valueRange', width: '5%' }, + // { title: '数据来源', dataIndex: 'dataSources', width: '8%' }, { - title: '计算方式', dataIndex: 'countMethod', width: '8%', render: (cur, item) => { + title: '权重(%)', dataIndex: 'weight', width: '5%' + }, + { + title: '取值范围', dataIndex: 'valueRange', width: '5%' + }, + { + title: '计算方式', dataIndex: 'countMethod', width: '10%', render: (cur, item) => { return <div dangerouslySetInnerHTML={{ __html: cur.replace(/\n/g, "<br/>") }}></div> } }, - { - title: '权重(%)', dataIndex: 'weight', width: '6%' + { + title: '计算结果', dataIndex: 'alculation', width: '10%' }, + this.props.match.params.boolean == 'true'? + { + title: '评分意见', dataIndex: 'meritsContent', width: '13%', render: (cur, item, index) => { + return <TextArea autoSize={{ minRows: 3, maxRows: 10 }} onChange={(value) => { + item['meritsContent'] = value; + this.refs['table-view'].onSetDataSource({ index, data: item }) + }} /> + } + } + : { - title: '配分(分)', dataIndex: 'allotment', width: '6%' + title: '评分意见', dataIndex: 'meritsContent', width: '13%' }, + // { + // title: '配分(分)', dataIndex: 'allotment', width: '6%' + // }, + this.props.match.params.boolean == 'true'? { title: '考评得分(分)', dataIndex: 'meritsGrade', width: '6%', render: (cur, item, index) => { return <InputNumber size="small" min={0} @@ -133,13 +154,17 @@ this.refs['table-view'].onSetDataSource({ index, data: item }) }} /> } + } + : + { + title: '考评得分(分)', dataIndex: 'meritsGrade', width: '6%' }, - ]; - if (this.props.match.params.boolean) { + if (this.props.match.params.boolean == 'true') { + console.log(this.props.match.params.boolean); return cols.concat({ title: '操作', dataIndex: 'operation', width: '10%', render: (cur, item) => { - return <a onClick={() => { this.onSave(item) }}>保存</a> + return <a onClick={() => { this.onSave(item) }}>评分</a> } }) } else { diff --git a/src/components/oa/merits/meritsExamine/index.jsx b/src/components/oa/merits/meritsExamine/index.jsx index 09e234c..5edfa98 100644 --- a/src/components/oa/merits/meritsExamine/index.jsx +++ b/src/components/oa/merits/meritsExamine/index.jsx @@ -42,10 +42,10 @@ return [ { title: '序号', dataIndex: 'index' }, { title: '评分项目', dataIndex: 'name' }, - { title: '评分目标', dataIndex: 'bumen' }, + // { title: '评分目标', dataIndex: 'bumen' }, { title: '定义与标准', dataIndex: 'gangwei' }, { title: '系统取数指标', dataIndex: 'month' }, - { title: '数据来源', dataIndex: 'renwu' }, + // { title: '数据来源', dataIndex: 'renwu' }, { title: '取值范围', dataIndex: 'quexian' }, { title: '计算方式', dataIndex: 'score' }, { diff --git a/src/components/oa/merits/meritsOverview/index.jsx b/src/components/oa/merits/meritsOverview/index.jsx index 71d92c0..a5bed18 100644 --- a/src/components/oa/merits/meritsOverview/index.jsx +++ b/src/components/oa/merits/meritsOverview/index.jsx @@ -56,6 +56,11 @@ linkDetail = (item) => { let { userId, countMonth } = item; + history.push(`/merits/meritsOverview/meritsDetail/${userId}/false/${countMonth}`) + } + + linkScore = (item) => { + let { userId, countMonth } = item; history.push(`/merits/meritsOverview/meritsDetail/${userId}/true/${countMonth}`) } @@ -73,6 +78,8 @@ title: '操作', dataIndex: 'operation', render: (cur, item) => { return <Row> <a onClick={() => this.linkDetail(item)}>详情</a> + <span> | </span> + <a onClick={() => this.linkScore(item)}>评分</a> </Row> } }, -- Gitblit v1.8.0