|
@@ -1,14 +1,14 @@
|
|
/*
|
|
/*
|
|
* @Author: your name
|
|
* @Author: your name
|
|
* @Date: 2021-09-14 10:22:09
|
|
* @Date: 2021-09-14 10:22:09
|
|
- * @LastEditTime: 2021-09-16 17:52:55
|
|
|
|
|
|
+ * @LastEditTime: 2021-09-29 16:45:01
|
|
* @LastEditors: Please set LastEditors
|
|
* @LastEditors: Please set LastEditors
|
|
* @Description: In User Settings Edit
|
|
* @Description: In User Settings Edit
|
|
* @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
|
|
* @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
|
|
-import React, {useRef,useEffect } from 'react'
|
|
|
|
|
|
+import React, { useRef, useEffect, useState } from 'react'
|
|
import MccsPageContainer from '@/components/MccsPageContainer/index'
|
|
import MccsPageContainer from '@/components/MccsPageContainer/index'
|
|
import MccsProCard from '@/components/MccsProCard/index';
|
|
import MccsProCard from '@/components/MccsProCard/index';
|
|
import { useModel } from 'umi';
|
|
import { useModel } from 'umi';
|
|
@@ -18,20 +18,28 @@ import MccsScoreBanner from '@/components/MccsScoreBanner/index';
|
|
import MccsRecordList from '@/components/MccsRecordList/index';
|
|
import MccsRecordList from '@/components/MccsRecordList/index';
|
|
import MccsDrawerForm from '@/components/MccsDrawerForm/index';
|
|
import MccsDrawerForm from '@/components/MccsDrawerForm/index';
|
|
import MccsClickableTabs from '@/components/MccsClickableTabs/index';
|
|
import MccsClickableTabs from '@/components/MccsClickableTabs/index';
|
|
|
|
+import MccsUpload from '@/components/MccsUpload/index';
|
|
|
|
+import { MccsModal } from '@/components/MccsModal';
|
|
|
|
|
|
|
|
|
|
-import { Form, Table, Space, Row, Col, Button } from 'antd'
|
|
|
|
|
|
+
|
|
|
|
+import { Form, Table, Space, Row, Col, Button, Tabs } from 'antd'
|
|
import {
|
|
import {
|
|
ProFormText,
|
|
ProFormText,
|
|
ProFormSelect,
|
|
ProFormSelect,
|
|
- ProFormDependency
|
|
|
|
|
|
+ ProFormDependency,
|
|
} from '@ant-design/pro-form';
|
|
} from '@ant-design/pro-form';
|
|
|
|
|
|
|
|
|
|
import './index.less';
|
|
import './index.less';
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
type ArticleManagementProps = {
|
|
type ArticleManagementProps = {
|
|
|
|
+ //组件配置信息
|
|
|
|
+ columnsFromProps?: {}[],
|
|
|
|
+ headerConcig?: { [key: string]: any }, //配置参考ProPageContainer
|
|
|
|
+ isModeTwo?: boolean
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -39,7 +47,10 @@ type SelectedRowsType = {
|
|
[propsName: string]: any
|
|
[propsName: string]: any
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const { TabPane } = Tabs;
|
|
|
|
+
|
|
const columns = [
|
|
const columns = [
|
|
|
|
+
|
|
{
|
|
{
|
|
key: 'keyword',
|
|
key: 'keyword',
|
|
hideInTable: true,
|
|
hideInTable: true,
|
|
@@ -66,7 +77,8 @@ const columns = [
|
|
title: '条文',
|
|
title: '条文',
|
|
dataIndex: 'name',
|
|
dataIndex: 'name',
|
|
hideInSearch: true,
|
|
hideInSearch: true,
|
|
- width: '35%'
|
|
|
|
|
|
+ width: '35%',
|
|
|
|
+ ellipsis:true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '负责单位',
|
|
title: '负责单位',
|
|
@@ -102,7 +114,7 @@ const columns = [
|
|
|
|
|
|
//条文管理
|
|
//条文管理
|
|
const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
|
|
const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
|
|
-
|
|
|
|
|
|
+ const { columnsFromProps = [], headerConcig, isModeTwo } = props;
|
|
const { articleManagement } = useModel('allModels');
|
|
const { articleManagement } = useModel('allModels');
|
|
const {
|
|
const {
|
|
isLeaf,
|
|
isLeaf,
|
|
@@ -115,21 +127,22 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
|
|
departmentManagers,
|
|
departmentManagers,
|
|
getDepartment,//获取责任单位
|
|
getDepartment,//获取责任单位
|
|
...restModelData
|
|
...restModelData
|
|
- } = articleManagement();
|
|
|
|
|
|
+ } = articleManagement;
|
|
const tableRef = useRef<MccsTable.MccsTableRef>();
|
|
const tableRef = useRef<MccsTable.MccsTableRef>();
|
|
- const btnRef = useRef<HTMLButtonElement>(); //取消批量按钮
|
|
|
|
|
|
+
|
|
|
|
+ const [articleSettingFormInit, setArticleSettingFormInit] = useState<{}>({}); //条文设置表单回显默认值
|
|
|
|
+
|
|
|
|
+ const [uploadLedgerTypeList,setUploadLedgerTypeList] = useState<MccsClickableTabs.TabType[]>([]);
|
|
|
|
|
|
|
|
|
|
const onSelectHandle = (data: MccsFileTree.childTree) => {
|
|
const onSelectHandle = (data: MccsFileTree.childTree) => {
|
|
setCurrentActivedTree(data);
|
|
setCurrentActivedTree(data);
|
|
-
|
|
|
|
//重新获取数据
|
|
//重新获取数据
|
|
tableRef?.current?.getTableRef().current?.reload();
|
|
tableRef?.current?.getTableRef().current?.reload();
|
|
}
|
|
}
|
|
|
|
|
|
- const batchSelfAssessment = (rowkeys:number[]|string[]) => {
|
|
|
|
|
|
+ const batchSelfAssessment = (rowkeys: number[] | string[]) => {
|
|
//批量设置
|
|
//批量设置
|
|
-
|
|
|
|
restModelData.setDrawerFormType('BATCHSETTING');
|
|
restModelData.setDrawerFormType('BATCHSETTING');
|
|
restModelData.setSelectedRowKeys(rowkeys);
|
|
restModelData.setSelectedRowKeys(rowkeys);
|
|
restModelData.setDrawerVisible(true);
|
|
restModelData.setDrawerVisible(true);
|
|
@@ -137,100 +150,233 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
|
|
|
|
|
|
const articleSetBtnHandle = () => {
|
|
const articleSetBtnHandle = () => {
|
|
//条文设置
|
|
//条文设置
|
|
|
|
+ // console.log({ articleSettingFormInit });
|
|
|
|
+ restModelData.setDrawerFormType('ARTICLE_SET');
|
|
restModelData.setDrawerVisible(true);
|
|
restModelData.setDrawerVisible(true);
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
const onVisibleChangeHandle = (visible: boolean) => {
|
|
const onVisibleChangeHandle = (visible: boolean) => {
|
|
|
|
+ //drawer展示控制
|
|
restModelData.setDrawerVisible(visible);
|
|
restModelData.setDrawerVisible(visible);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ const onModalVisibleChange = (visible: boolean) => {
|
|
|
|
+ //表单弹窗
|
|
|
|
+ // console.log('uploadFormInitValue',restModelData.uploadFormInitValue);
|
|
|
|
+ !visible && restModelData.setUploadFormInitValue(undefined);
|
|
|
|
+ restModelData.setModalVisible(visible);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const upLoadFileHandle = (formInitData?: any) => {
|
|
|
|
+ //因为modalForm开启了request+params获取表单默认值,
|
|
|
|
+ //所以必须先设置默认值才能开启弹窗
|
|
|
|
+ if (formInitData) {
|
|
|
|
+ const { fileUrl, recordTypeName, fileName } = formInitData;
|
|
|
|
+ restModelData.setUploadFormInitValue({
|
|
|
|
+ tab:recordTypeName,
|
|
|
|
+ files: [{
|
|
|
|
+ uid: new Date().getTime(),
|
|
|
|
+ name: fileName,
|
|
|
|
+ status: 'done',
|
|
|
|
+ url: fileUrl
|
|
|
|
+ }]
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ restModelData.setUploadFormInitValue({})
|
|
|
|
+ }
|
|
|
|
+ restModelData.getUploadLedgerType().then(data=>{
|
|
|
|
+ //设置上传台账类型
|
|
|
|
+ setUploadLedgerTypeList(data);
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ restModelData.setModalVisible(true);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const actionNodeFunc = (data: any) => {
|
|
|
|
+ //渲染记录列表操作按钮
|
|
|
|
+ // console.log({ data });
|
|
|
|
+ const { fileUrl } = data;
|
|
|
|
+ const reupload = () => {
|
|
|
|
+
|
|
|
|
+ upLoadFileHandle(data);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return isModeTwo ? (
|
|
|
|
+ //台账上传
|
|
|
|
+ <a onClick={reupload}>重新上传</a>
|
|
|
|
+ ) : (
|
|
|
|
+ //条文管理
|
|
|
|
+ <a href={fileUrl}>下载文件</a>
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ const uploadLedgerChangeHandle = (tabData:any)=>{
|
|
|
|
+ //台账上传类型选择回调
|
|
|
|
+ console.log({tabData});
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
-
|
|
|
|
- if(restModelData.reloadRightContent){
|
|
|
|
- //重新获取数据
|
|
|
|
- tableRef?.current?.getTableRef().current?.reload();
|
|
|
|
- tableRef?.current?.getTableRef().current?.clearSelected();
|
|
|
|
|
|
+
|
|
|
|
+ if (restModelData.reloadRightContent) {
|
|
|
|
+ //重新获取数据
|
|
|
|
+ tableRef?.current?.getTableRef().current?.reload();
|
|
|
|
+ tableRef?.current?.getTableRef().current?.clearSelected();
|
|
}
|
|
}
|
|
}, [restModelData]);
|
|
}, [restModelData]);
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ useEffect(() => {
|
|
|
|
+ if (restModelData.leafData) {
|
|
|
|
+ const { responsibilityDepartmentId,responsibilityDepartmentName, responsibilityUserId, targetEvaluation,responsibilityUserName } = restModelData.leafData;
|
|
|
|
+ setArticleSettingFormInit({
|
|
|
|
+ responsibilityDepartment:{label:responsibilityDepartmentName,value:responsibilityDepartmentId},
|
|
|
|
+ responsibilityUser: {label:responsibilityUserName,value:responsibilityUserId},
|
|
|
|
+ targetScores: targetEvaluation,
|
|
|
|
+ articleType: 'A'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }, [restModelData.leafData]);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ useEffect(() => {
|
|
|
|
+ if (isModeTwo) {
|
|
|
|
+ //设置当前模块模式
|
|
|
|
+ restModelData.setModuleMode(isModeTwo);
|
|
|
|
+ } else {
|
|
|
|
+ //设置当前模块模式
|
|
|
|
+ restModelData.setModuleMode(false);
|
|
|
|
+ }
|
|
|
|
+ }, [props]);
|
|
|
|
+
|
|
|
|
+ useEffect(() => {
|
|
|
|
+ restModelData.getArticleTreeData();
|
|
|
|
+ }, [])
|
|
|
|
|
|
return (
|
|
return (
|
|
- <MccsPageContainer>
|
|
|
|
- <MccsDrawerForm
|
|
|
|
- title={restModelData.drawerFormType=='ARTICLE_SET'?'条文设置':'批量设置'}
|
|
|
|
- width={500}
|
|
|
|
- visible={restModelData.drawerVisible}
|
|
|
|
-
|
|
|
|
- onFinish={(values: any) => restModelData.drawerFormType=='ARTICLE_SET'?restModelData.setArticle(values):restModelData.batchSetting(values)}
|
|
|
|
- onVisibleChange={onVisibleChangeHandle}
|
|
|
|
- >
|
|
|
|
- <div className='formItemTitle'>负责人及单位</div>
|
|
|
|
- <Row gutter={16}>
|
|
|
|
- <Col className="gutter-row" span={8}>
|
|
|
|
- <ProFormSelect
|
|
|
|
- name="responsibilityDepartment"
|
|
|
|
- width='sm'
|
|
|
|
- request={getDepartmentRequest}
|
|
|
|
- placeholder="选择单位"
|
|
|
|
- fieldProps={{
|
|
|
|
- labelInValue: true,
|
|
|
|
- onChange: (value, option) => getDepartment(value, option)
|
|
|
|
- }}
|
|
|
|
- rules={[{ required: true, message: '请选择单位!' }]}
|
|
|
|
- />
|
|
|
|
- </Col>
|
|
|
|
-
|
|
|
|
- <Col className="gutter-row" span={8}>
|
|
|
|
- <ProFormDependency name={['responsibilityDepartment']}>
|
|
|
|
- {({ responsibilityDepartment }) => {
|
|
|
|
- return (
|
|
|
|
- <ProFormSelect
|
|
|
|
- name="responsibilityUser"
|
|
|
|
- width='sm'
|
|
|
|
- disabled={!responsibilityDepartment}
|
|
|
|
- options={departmentManagers}
|
|
|
|
- placeholder="选择负责人"
|
|
|
|
- fieldProps={{
|
|
|
|
- labelInValue: true,
|
|
|
|
- // onChange:(value,option)=>getManagers(value,option)
|
|
|
|
- }}
|
|
|
|
- rules={[{ required: true, message: '请选择负责人!' }]}
|
|
|
|
- />
|
|
|
|
- )
|
|
|
|
- }}
|
|
|
|
- </ProFormDependency>
|
|
|
|
- </Col>
|
|
|
|
- </Row>
|
|
|
|
- <div className='formItemTitle'>目标分数</div>
|
|
|
|
- <Row >
|
|
|
|
- <Col span={24}>
|
|
|
|
- <Form.Item name='targetScores'>
|
|
|
|
|
|
+ <MccsPageContainer
|
|
|
|
+ config={headerConcig ? headerConcig : {}}
|
|
|
|
+ >
|
|
|
|
+ {
|
|
|
|
+ restModelData.modalVisible && (
|
|
|
|
+ <MccsModal title='台账上传' visible={restModelData.modalVisible}
|
|
|
|
+ onFinish={(values: any) => restModelData.uploadFile(values)}
|
|
|
|
+ initialValues={restModelData.uploadFormInitValue}
|
|
|
|
+ onVisibleChange={onModalVisibleChange}
|
|
|
|
+ params={restModelData.uploadFormInitValue}
|
|
|
|
+ request={(params: any) => {
|
|
|
|
+ return Promise.resolve(params)
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ <div className='formItemTitle'>选择类型</div>
|
|
|
|
+ <Form.Item name='tab' rules={[
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: '请选择类型!',
|
|
|
|
+ },
|
|
|
|
+ ]}>
|
|
<MccsClickableTabs
|
|
<MccsClickableTabs
|
|
- data={restModelData.targetScores}
|
|
|
|
|
|
+ disabled={(restModelData.uploadFormInitValue && JSON.stringify(restModelData.uploadFormInitValue) != '{}') ? true : false}
|
|
|
|
+ type='multi'
|
|
|
|
+ onChange={uploadLedgerChangeHandle}
|
|
|
|
+ data={uploadLedgerTypeList}
|
|
/>
|
|
/>
|
|
</Form.Item>
|
|
</Form.Item>
|
|
- </Col>
|
|
|
|
- </Row>
|
|
|
|
- {
|
|
|
|
- true && (
|
|
|
|
- <>
|
|
|
|
- <div className='formItemTitle'>条文组别</div>
|
|
|
|
- <Row>
|
|
|
|
- <Col span={24}>
|
|
|
|
- <Form.Item name='articleType'>
|
|
|
|
- <MccsClickableTabs
|
|
|
|
- data={restModelData.ruleTypes}
|
|
|
|
- />
|
|
|
|
- </Form.Item>
|
|
|
|
- </Col>
|
|
|
|
- </Row>
|
|
|
|
- </>
|
|
|
|
- )
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- </MccsDrawerForm>
|
|
|
|
|
|
+ <Form.Item name='files' rules={[
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: '请上传文件!',
|
|
|
|
+ },
|
|
|
|
+ ]}>
|
|
|
|
+ <MccsUpload maxCount={1} />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </MccsModal>
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ {
|
|
|
|
+ //条文设置/表格批量设置drawer弹窗
|
|
|
|
+ restModelData.drawerVisible && (
|
|
|
|
+ <MccsDrawerForm
|
|
|
|
+ title={restModelData.drawerFormType == 'ARTICLE_SET' ? '条文设置' : '批量设置'}
|
|
|
|
+ width={500}
|
|
|
|
+ visible={restModelData.drawerVisible}
|
|
|
|
+ initialValues={restModelData.drawerFormType == 'ARTICLE_SET' ? { ...articleSettingFormInit } : {}}
|
|
|
|
+ onFinish={(values: any) => restModelData.drawerFormType == 'ARTICLE_SET' ? restModelData.setArticle(values) : restModelData.batchSetting(values)}
|
|
|
|
+ onVisibleChange={onVisibleChangeHandle}
|
|
|
|
+ >
|
|
|
|
+ <div className='formItemTitle'>负责人及单位</div>
|
|
|
|
+ <Row gutter={16}>
|
|
|
|
+ <Col className="gutter-row" span={8}>
|
|
|
|
+ <ProFormSelect
|
|
|
|
+ name="responsibilityDepartment"
|
|
|
|
+ width='sm'
|
|
|
|
+ request={getDepartmentRequest}
|
|
|
|
+ placeholder="选择单位"
|
|
|
|
+ fieldProps={{
|
|
|
|
+ labelInValue: true,
|
|
|
|
+ onChange: (value, option) => getDepartment(value, option)
|
|
|
|
+ }}
|
|
|
|
+ rules={[{ required: true, message: '请选择单位!' }]}
|
|
|
|
+ />
|
|
|
|
+ </Col>
|
|
|
|
+
|
|
|
|
+ <Col className="gutter-row" span={8}>
|
|
|
|
+ <ProFormDependency name={['responsibilityDepartment']}>
|
|
|
|
+ {({ responsibilityDepartment }) => {
|
|
|
|
+ return (
|
|
|
|
+ <ProFormSelect
|
|
|
|
+ name="responsibilityUser"
|
|
|
|
+ width='sm'
|
|
|
|
+ disabled={!responsibilityDepartment || JSON.stringify(responsibilityDepartment) == '{}'}
|
|
|
|
+ options={departmentManagers}
|
|
|
|
+ placeholder="选择负责人"
|
|
|
|
+ fieldProps={{
|
|
|
|
+ labelInValue: true,
|
|
|
|
+ // onChange:(value,option)=>getManagers(value,option)
|
|
|
|
+ }}
|
|
|
|
+ rules={[{ required: true, message: '请选择负责人!' }]}
|
|
|
|
+ />
|
|
|
|
+ )
|
|
|
|
+ }}
|
|
|
|
+ </ProFormDependency>
|
|
|
|
+ </Col>
|
|
|
|
+ </Row>
|
|
|
|
+ <div className='formItemTitle'>目标分数</div>
|
|
|
|
+ <Row >
|
|
|
|
+ <Col span={24}>
|
|
|
|
+ <Form.Item name='targetScores'>
|
|
|
|
+ <MccsClickableTabs
|
|
|
|
+ data={restModelData.targetScores}
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Col>
|
|
|
|
+ </Row>
|
|
|
|
+ {
|
|
|
|
+ true && (
|
|
|
|
+ <>
|
|
|
|
+ <div className='formItemTitle'>条文组别</div>
|
|
|
|
+ <Row>
|
|
|
|
+ <Col span={24}>
|
|
|
|
+ <Form.Item name='articleType'>
|
|
|
|
+ <MccsClickableTabs
|
|
|
|
+ data={restModelData.ruleTypes}
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Col>
|
|
|
|
+ </Row>
|
|
|
|
+ </>
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ </MccsDrawerForm>
|
|
|
|
+
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
|
|
<MccsProCard gutter={16} ghost direction='row'>
|
|
<MccsProCard gutter={16} ghost direction='row'>
|
|
<MccsProCard colSpan={6} style={{ height: '78vh' }} bodyStyle={{ padding: '16px' }}>
|
|
<MccsProCard colSpan={6} style={{ height: '78vh' }} bodyStyle={{ padding: '16px' }}>
|
|
@@ -248,19 +394,22 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
|
|
!isLeaf && (
|
|
!isLeaf && (
|
|
<MccsTable
|
|
<MccsTable
|
|
ref={tableRef}
|
|
ref={tableRef}
|
|
- columns={columns}
|
|
|
|
|
|
+ columns={columnsFromProps.length > 0 ? columnsFromProps : columns}
|
|
request={getTableData}
|
|
request={getTableData}
|
|
|
|
+ search={{
|
|
|
|
+ span: 6
|
|
|
|
+ }}
|
|
rowSelection={{
|
|
rowSelection={{
|
|
// 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom
|
|
// 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom
|
|
// 注释该行则默认不显示下拉选项
|
|
// 注释该行则默认不显示下拉选项
|
|
selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT],
|
|
selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT],
|
|
}}
|
|
}}
|
|
rowKey="id"
|
|
rowKey="id"
|
|
- tableAlertOptionRender={({selectedRowKeys, selectedRows,onCleanSelected}:{selectedRowKeys:number[]|string[],selectedRows:SelectedRowsType[],onCleanSelected:()=>void}) => {
|
|
|
|
|
|
+ tableAlertOptionRender={({ selectedRowKeys, selectedRows, onCleanSelected }: { selectedRowKeys: number[] | string[], selectedRows: SelectedRowsType[], onCleanSelected: () => void }) => {
|
|
return (
|
|
return (
|
|
<Space size={16}>
|
|
<Space size={16}>
|
|
<Button type='primary' onClick={() => batchSelfAssessment(selectedRowKeys)}>批量设置</Button>
|
|
<Button type='primary' onClick={() => batchSelfAssessment(selectedRowKeys)}>批量设置</Button>
|
|
- <Button type='ghost' onClick={onCleanSelected}>取消选择</Button>
|
|
|
|
|
|
+ <Button type='ghost' onClick={onCleanSelected}>取消选择</Button>
|
|
</Space>
|
|
</Space>
|
|
);
|
|
);
|
|
}}
|
|
}}
|
|
@@ -275,18 +424,61 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
|
|
<div className='leafContentTitle'>{currentActivedTree ? currentActivedTree.title : ''}</div>
|
|
<div className='leafContentTitle'>{currentActivedTree ? currentActivedTree.title : ''}</div>
|
|
<div className='peopleGroup'>
|
|
<div className='peopleGroup'>
|
|
<span>条文组别:</span>
|
|
<span>条文组别:</span>
|
|
- <span>{restModelData.leafData?.articleType}</span>
|
|
|
|
|
|
+ <span>{restModelData.leafData?.accountType}</span>
|
|
<span>负责单位:</span>
|
|
<span>负责单位:</span>
|
|
<span>{restModelData.leafData?.responsibilityDepartmentName}</span>
|
|
<span>{restModelData.leafData?.responsibilityDepartmentName}</span>
|
|
<span>负责人:</span>
|
|
<span>负责人:</span>
|
|
<span>{restModelData.leafData?.responsibilityUserName}</span>
|
|
<span>{restModelData.leafData?.responsibilityUserName}</span>
|
|
</div>
|
|
</div>
|
|
<MccsScoreBanner list={scoreList} />
|
|
<MccsScoreBanner list={scoreList} />
|
|
- <div className='articleSetBtn'><span onClick={articleSetBtnHandle}>条文设置</span></div>
|
|
|
|
- <MccsRecordList
|
|
|
|
- title='台账记录'
|
|
|
|
- list={[]}
|
|
|
|
- />
|
|
|
|
|
|
+ {
|
|
|
|
+ isModeTwo && (
|
|
|
|
+ <div style={{ marginTop: 5 }}>
|
|
|
|
+ <Tabs defaultActiveKey="1" centered size='large' onChange={(key) => restModelData.setTabKey(key)}>
|
|
|
|
+ <TabPane tab="台账记录" key="1">
|
|
|
|
+ <div className='articleSetBtn'>
|
|
|
|
+ <span onClick={() => upLoadFileHandle()}>上传文件</span>
|
|
|
|
+ </div>
|
|
|
|
+ <MccsRecordList
|
|
|
|
+ title='台账记录'
|
|
|
|
+ list={restModelData.records}
|
|
|
|
+ actionFunc={(data)=>restModelData.delHistoryRecordHandle(data)}
|
|
|
|
+ actionNode={(data) => actionNodeFunc(data)}
|
|
|
|
+ />
|
|
|
|
+ </TabPane>
|
|
|
|
+ <TabPane tab="自评结果" key="2">
|
|
|
|
+ <div className='selfEvolutionArea'>
|
|
|
|
+ <div className='selfEvolutionTitle'>开始自评</div>
|
|
|
|
+ <MccsClickableTabs
|
|
|
|
+ onChange={(value: string| number| null) => restModelData.onSelfEvolutionTabChange(value)}
|
|
|
|
+ data={restModelData.targetScores}
|
|
|
|
+ value={restModelData.selectedSelfEvolution}
|
|
|
|
+ />
|
|
|
|
+ <Button onClick={() => restModelData.commitSelfEvolution()}>提交自评</Button>
|
|
|
|
+ </div>
|
|
|
|
+ <MccsRecordList
|
|
|
|
+ title='自评记录'
|
|
|
|
+ list={restModelData.selfEvaluationRecords}
|
|
|
|
+ />
|
|
|
|
+ </TabPane>
|
|
|
|
+ </Tabs>
|
|
|
|
+ </div>
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ {
|
|
|
|
+ !isModeTwo && (
|
|
|
|
+ <>
|
|
|
|
+ <div className='articleSetBtn'><span onClick={articleSetBtnHandle}>条文设置</span></div>
|
|
|
|
+ <MccsRecordList
|
|
|
|
+ title='台账记录'
|
|
|
|
+ list={restModelData.records}
|
|
|
|
+ actionFunc={(data)=>{console.log({data})}}
|
|
|
|
+ //restModelData.delHistoryRecordHandle(data)
|
|
|
|
+ actionNode={(data) => actionNodeFunc(data)}
|
|
|
|
+ />
|
|
|
|
+ </>
|
|
|
|
+ )
|
|
|
|
+ }
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
}
|
|
}
|