Commit 4f2ba10a authored by 皮倩雯's avatar 皮倩雯

三级模态增加路由

parent 6c891ab0
......@@ -24,6 +24,7 @@ const AddFlowsModal = props => {
useEffect(() => {
console.log(formObj)
getRole()
console.log(obj)
CM_Event_ReloadFlows({ eventTypeId: obj }).then(res => {
......@@ -365,14 +366,13 @@ const AddFlowsModal = props => {
</Form>
<ChangeAddFlows
visible={visible1}
onClose={() => setVisible1(false)}
onCancel={() => setVisible1(false)}
callBackSubmit={onOKk}
newCheckedList={checkedList1}
filed1={filed1}
pickItem={pickItem}
characterValue={characterValue}
formObj={formObj}
placement="right"
/>
</Drawer>
)
......
import React, { useEffect, useState } from 'react';
import { Modal, Form, Input, notification, message, Row, Col, Select, Checkbox, Radio, Button, Dropdown, Menu } from 'antd';
import { Modal, Drawer, Form, Input, notification, message, Space, Row, Col, Select, Checkbox, Radio, Dropdown, Menu, Button } from 'antd';
import { GetCM_Event_LoadEventTypeTable, LoadEventFields, CM_Event_LoadDepartmentAndRoles, CM_Event_EditEventTable, GetCM_Event_QueryEventType, CM_Event_AddEventTable } from '@/services/standingBook/api'
import styles from './incident.less';
import ChangeAdd from './changeAdd'
......@@ -582,23 +582,24 @@ const AddModal = props => {
setIsVisible1(false)
}
const title = <ModalDrag title={type === 'add' ? '添加事件类型' : '编辑事件类型'} />
// const title = <ModalDrag title={type === 'add' ? '添加事件类型' : '编辑事件类型'} />
return (
<Modal
title={title}
maskClosable={false}
<Drawer
title={type === 'add' ? '添加事件类型' : '编辑事件类型'}
width="800px"
destroyOnClose
okText="确认"
mask={false}
cancelText="取消"
{...props}
onOk={() => onSubmit()}
footer={
<Space>
<Button onClick={onSubmit} type="primary" >
确定
</Button>
</Space>
}
// confirmLoading={loading}
forceRender={true}
getContainer={false}
>
<Form form={form} labelCol={{ span: 7 }} style={{ height: '38rem', overflowY: 'scroll' }}>
<Form form={form} labelCol={{ span: 7 }} style={{ overflowY: 'scroll' }}>
<Row>
<Col span={13}>
<Item
......@@ -625,7 +626,7 @@ const AddModal = props => {
},
]}
>
<Input style={{ width: '12rem' }} value={prefixName} placeholder="请输入编码前缀" />
<Input style={{ width: '12.5rem' }} value={prefixName} placeholder="请输入编码前缀" />
</Item>
</Col>
<Col span={23}>
......@@ -676,10 +677,10 @@ const AddModal = props => {
placement='bottomRight'
style={{ width: '20rem' }}
overlay={<Menu>
{treeData.length ? treeData.map((item, index) => { return <Menu.Item onClick={() => { setType1(item); form.setFieldsValue({ BusinessType: item }) }} style={{ width: '580px', marginLeft: '-8px' }} key={index}>{item}</Menu.Item> }) : ''}
{treeData.length ? treeData.map((item, index) => { return <Menu.Item onClick={() => { setType1(item); form.setFieldsValue({ BusinessType: item }) }} style={{ width: '580px', marginLeft:'-8px'}} key={index}>{item}</Menu.Item> }) : ''}
</Menu>} >
<div className={styles.linkDrowp} onClick={e => e.preventDefault()}>
<DownOutlined style={{ fontSize: '12px', color: 'rgba(0, 0, 0, 0.25)' }} />
<div onClick={e => e.preventDefault()} style={{position:'absolute', left:'94%', width: '1rem',top:'0', marginTop:'6px'}}>
<DownOutlined style={{fontSize: '12px', color: 'rgba(0, 0, 0, 0.25)' }} />
</div>
</Dropdown>
</div>
......@@ -966,7 +967,7 @@ const AddModal = props => {
</Form>
<ChangeAdd
visible={isVisible}
onClose={onCancel}
onCancel={onCancel}
callBackSubmit={onOK}
newCheckedList={checkedList1}
isType={types}
......@@ -976,14 +977,13 @@ const AddModal = props => {
pickItem={pickItem}
characterValue={characterValue}
formObj={formObj}
placement="right"
/>
<ChangeImage
visible={isVisible1}
callBackSubmit={oKK}
onCancel={onCancel1}
/>
</Modal>
</Drawer>
);
};
......
import React, { useState, useEffect, useCallback, useRef } from 'react';
import { Form, Drawer, Space, Divider, Radio, Checkbox, Button } from 'antd';
import { Form, Modal, Space, Divider, Radio, Checkbox, Button } from 'antd';
import styles from './incident.less';
import Sortable from 'sortablejs';
const CheckboxGroup = Checkbox.Group;
const ChangeAddFlows = props =>{
const ChangeAddFlows = props => {
const { callBackSubmit = () => { }, pickItem, visible, filed1, characterValue, newCheckedList } = props;
const [loading, setLoading] = useState(false);
const [value, setValue] = useState('');
......@@ -17,7 +17,7 @@ const ChangeAddFlows = props =>{
const [checkAll, setCheckAll] = useState([]);
const [selectData, setSelectData] = useState([])
let objArr = []
const onChangeList1 = (list, index, title) => {
const checkedListArr = [...checkedList]
checkedListArr[index] = list
......@@ -34,7 +34,7 @@ const ChangeAddFlows = props =>{
console.log(selectData.join(","))
console.log(pickItem)
console.log(checkedList)
callBackSubmit({ checkedList, str: selectData.join(","), pickItem, stt:selectData, title:title, filed22:filed1 });
callBackSubmit({ checkedList, str: selectData.join(","), pickItem, stt: selectData, title: title, filed22: filed1 });
}
const onCheckAllChange = e => {
const indeterminateArr = [...indeterminate]
......@@ -60,34 +60,34 @@ const ChangeAddFlows = props =>{
}
useEffect(() => {
console.log(characterValue)
console.log(pickItem)
console.log(filed1)
let arr = Object.keys(filed1)
console.log(arr, 'arr')
setTitle(arr)
let checkArr = []
let indeterminateArr = []
let checkAllArr = []
console.log(newCheckedList);
arr.map((item, index) => {
checkArr[index] = []
newCheckedList.map(checkItem => {
if (filed1[item].includes(checkItem)) {
checkArr[index].push(checkItem)
}
})
indeterminateArr.push(!!checkArr[index].length && checkArr[index].length < filed1[item].length)
checkAllArr.push(checkArr[index].length === filed1[item].length)
console.log(characterValue)
console.log(pickItem)
console.log(filed1)
let arr = Object.keys(filed1)
console.log(arr, 'arr')
setTitle(arr)
let checkArr = []
let indeterminateArr = []
let checkAllArr = []
console.log(newCheckedList);
arr.map((item, index) => {
checkArr[index] = []
newCheckedList.map(checkItem => {
if (filed1[item].includes(checkItem)) {
checkArr[index].push(checkItem)
}
})
console.log(checkArr)
setCheckedList(checkArr)
setIndeterminate(indeterminateArr)
setCheckAll(checkAllArr)
let newArr = characterValue.length ? characterValue.split(",") : []
setSelectData(newArr)
draftSort()
indeterminateArr.push(!!checkArr[index].length && checkArr[index].length < filed1[item].length)
checkAllArr.push(checkArr[index].length === filed1[item].length)
})
console.log(checkArr)
setCheckedList(checkArr)
setIndeterminate(indeterminateArr)
setCheckAll(checkAllArr)
let newArr = characterValue.length ? characterValue.split(",") : []
setSelectData(newArr)
draftSort()
}, [visible]);
......@@ -112,19 +112,18 @@ const ChangeAddFlows = props =>{
return (
<Drawer
<Modal
title='部门或角色'
bodyStyle={{ width: '100%', minHeight: '100px' }}
width="700px"
destroyOnClose
centered={true}
cancelText="取消"
okText="确认"
{...props}
footer={
<Space>
<Button onClick={onSubmit} type="primary" >
确定
</Button>
</Space>
}
onOk={() => onSubmit()}
forceRender={true}
getContainer={false}
>
{visible && (
<div className={styles.listCard}>
......@@ -167,8 +166,8 @@ const ChangeAddFlows = props =>{
)
}
</Drawer>
</Modal>
)
};
export default ChangeAddFlows;
\ No newline at end of file
import React, { useState, useEffect, useCallback, useRef } from 'react';
import { Form, Drawer, Space, Divider, Checkbox, Button } from 'antd';
import { Form, Modal, Divider, Checkbox} from 'antd';
import styles from './incident.less';
import Sortable from 'sortablejs';
......@@ -41,7 +41,7 @@ const AddModal = props => {
};
const onSubmit = () => {
isType === 'rule' ? callBackSubmit(`${value === '无' || value === '' ? '' : value + ','}${checkValue.join(',')}`) : callBackSubmit({ checkedList, str: selectData.join(","), pickItem, stt:selectData, title:title, filed22:filed1, isType:isType });
isType === 'rule' ? callBackSubmit(`${value === '无' || value === '' ? '' : value + ','}${checkValue.join(',')}`) : callBackSubmit({ checkedList, str: selectData.join(","), pickItem, stt: selectData, title: title, filed22: filed1, isType: isType });
}
const onCheckAllChange = e => {
const indeterminateArr = [...indeterminate]
......@@ -143,52 +143,51 @@ const AddModal = props => {
}
if (isType != 'app') {
return (
<Drawer
<Modal
title='字段集选择'
bodyStyle={{ width: '100%', minHeight: '100px' }}
width="700px"
destroyOnClose
{...props}
footer={
<Space>
<Button onClick={onSubmit} type="primary">
确定
</Button>
</Space>
}
destroyOnClose
centered={true}
cancelText="取消"
okText="确认"
{...props}
onOk={() => onSubmit()}
forceRender={true}
getContainer={false}
>
{visible && (
<div className={styles.listCard}>
<div className={styles.cardItem} style={{ borderRight: '1px solid #99bbe8' }}>
<Divider orientation="left" style={{ margin: '0 0 10px 0', backgroundColor: '#dfe8f6' }}>待选字段列表</Divider>
{flag === 0 ?
<>
<div className={styles.cardContent}>
<span style={{color: 'red',fontSize: '1rem', marginLeft: '25px'}}>请先选择事件主表</span>
</div>
</>:
<>
{JSON.stringify(filed) == "{}" ?
<>
<div className={styles.cardContent}>
<span style={{color: 'red',fontSize: '1rem', marginLeft: '25px'}}>表字段缺失请先配置表/字段</span>
</div>
</>
:
<>
<div className={styles.cardContent}>
{title.map((item, index) => {
return <div className={styles.cardItemData} key={index}>
<Divider orientation="left" style={{ margin: '0 0 10px 0', color: '#15428b', borderTopColor: '#99bbe8' }}>{item} <Checkbox indeterminate={indeterminate[index]} onChange={onCheckAllChange} index={index} checkvalue={filed[item]} checked={checkAll[index]}> </Checkbox></Divider>
<CheckboxGroup options={filed[item]} value={checkedList[index]} onChange={(e) => onChangeList(e, index, item)} /></div>
})}
<div className={styles.cardContent}>
<span style={{ color: 'red', fontSize: '1rem', marginLeft: '25px' }}>请先选择事件主表</span>
</div>
</>
}
</> :
<>
{JSON.stringify(filed) == "{}" ?
<>
<div className={styles.cardContent}>
<span style={{ color: 'red', fontSize: '1rem', marginLeft: '25px' }}>表字段缺失请先配置表/字段</span>
</div>
</>
:
<>
<div className={styles.cardContent}>
{title.map((item, index) => {
return <div className={styles.cardItemData} key={index}>
<Divider orientation="left" style={{ margin: '0 0 10px 0', color: '#15428b', borderTopColor: '#99bbe8' }}><Checkbox indeterminate={indeterminate[index]} onChange={onCheckAllChange} index={index} checkvalue={filed[item]} checked={checkAll[index]} style={{ marginRight: '7px' }}></Checkbox>{item}</Divider>
<CheckboxGroup options={filed[item]} value={checkedList[index]} onChange={(e) => onChangeList(e, index, item)} /></div>
})}
</div>
</>
}
</>
}
</div>
......@@ -221,35 +220,35 @@ const AddModal = props => {
)
}
</Drawer>
</Modal>
);
} else if (isType === 'app') {
return (
<Drawer
title= '部门或角色'
<Modal
title='部门或角色'
bodyStyle={{ width: '100%', minHeight: '100px' }}
width="700px"
destroyOnClose
{...props}
footer={
<Space>
<Button onClick={onSubmit} type="primary" >
确定
</Button>
</Space>
}
style={{ top: '10px' }}
destroyOnClose
centered={true}
cancelText="取消"
okText="确认"
{...props}
onOk={() => onSubmit()}
forceRender={true}
getContainer={false}
>
{visible && (
<div className={styles.listCard}>
<div className={styles.cardItem} style={{ borderRight: '1px solid #99bbe8' }}>
<Divider orientation="left" style={{ margin: '0 0 10px 0', backgroundColor: '#dfe8f6' }}>待选字段列表</Divider>
<div className={styles.cardContent}>
{title.map((item, index) => {
return <div className={styles.cardItemData} key={index}>
<Divider orientation="left" style={{ margin: '0 0 10px 0', color: '#15428b', borderTopColor: '#99bbe8' }}>{item} <Checkbox indeterminate={indeterminate[index]} onChange={onCheckAllChange} index={index} checkvalue={filed1[item]} checked={checkAll[index]}> </Checkbox></Divider>
<CheckboxGroup options={filed1[item]} value={checkedList[index]} onChange={(e) => onChangeList1(e, index, item)} /></div>
})}
</div>
<div className={styles.cardContent}>
{title.map((item, index) => {
return <div className={styles.cardItemData} key={index}>
<Divider orientation="left" style={{ margin: '0 0 10px 0', color: '#15428b', borderTopColor: '#99bbe8' }}><Checkbox indeterminate={indeterminate[index]} onChange={onCheckAllChange} index={index} checkvalue={filed1[item]} checked={checkAll[index]} style={{ marginRight: '7px' }}></Checkbox>{item}</Divider>
<CheckboxGroup options={filed1[item]} value={checkedList[index]} onChange={(e) => onChangeList1(e, index, item)} /></div>
})}
</div>
</div>
<div className={styles.cardItem}>
<Divider orientation="left" style={{ margin: '0 0 10px 0', backgroundColor: '#dfe8f6' }}>已选字段列表</Divider>
......@@ -280,7 +279,7 @@ const AddModal = props => {
)
}
</Drawer>
</Modal>
);
}
};
......
import React, { useState, useEffect } from 'react';
import { useHistory } from 'react-router-dom';
import styles from './incident.less';
import {
Form,
......@@ -33,6 +34,7 @@ import ViewModal from './ViewModal'
const incident = () => {
const history = useHistory();
const [treeLoading, setTreeLoading] = useState(false);
const [treeVisible, setTreeVisible] = useState(true); // 左边列表是否可见
const [treeData, setTreeData] = useState([]); // 事件表数据
......@@ -229,13 +231,13 @@ const incident = () => {
</Tooltip>
<Tooltip title="受理流程">
<ApartmentOutlined
onClick={() => process(record)}
onClick={() => process1(record)}
style={{ fontSize: '16px', color: '#1890FF' }}
/>
</Tooltip>
<Tooltip title="辅助视图">
<DesktopOutlined
onClick={() => auxiliaryView(record)}
onClick={() => auxiliaryView1(record)}
style={{ fontSize: '16px', color: '#1890FF' }}
/>
</Tooltip>
......@@ -385,15 +387,28 @@ const incident = () => {
console.log(tableData[pickItem])
setSortData(tableData[pickItem])
}
const process = record => {
setProcessVisible(true);
setFormObj(record);
setTitle1(record.name)
// const process = record => {
// setProcessVisible(true);
// setFormObj(record);
// setTitle1(record.name)
// }
const process1 = record =>{
history.push({
pathname: '/platformCenter/bsmanger/incidentFlow',
state: { formObj:record, title1:record.name },
});
}
const auxiliaryView = record => {
setFormObj(record);
setViewVisible(true)
setTitle2(record.name)
// const auxiliaryView = record => {
// setFormObj(record);
// setViewVisible(true)
// setTitle2(record.name)
// }
const auxiliaryView1 = record => {
history.push({
pathname: '/platformCenter/bsmanger/incidentView',
state: { formObj:record, title2:record.name },
});
}
const onSubmit = () => {
setAddvisible(false)
......@@ -530,19 +545,20 @@ const incident = () => {
formObj={formObj}
rember1={rember1}
maxLength={maxLength}
onCancel={() => setAddvisible(false)}
onClose={() => setAddvisible(false)}
treeData={treeData}
selectData={select}
callBackSubmit={onSubmit}
placement="right"
/>
<ProcessModal
{/* <ProcessModal
visible={processVisible}
formObj={formObj}
title1={title1}
maxLength={maxLength}
onCancel={() => setProcessVisible(false)}
callBackSubmit={onOK1}
/>
/> */}
<SortModal
title="调整顺序"
visible={sortVisible}
......@@ -551,13 +567,13 @@ const incident = () => {
onCancel={() => setSortVisible(false)}
callBackSubmit={onOK}
/>
<ViewModal
{/* <ViewModal
formObj={formObj}
visible={viewVisible}
onCancel={() => setViewVisible(false)}
title2={title2}
callBackSubmit={onOK11}
/>
/> */}
</div>
</div>
......
......@@ -11,7 +11,6 @@
.linkDrowp{
position: absolute;
top: 0;
left: 93.5%;
width: 1rem;
height: 100%;
......@@ -184,7 +183,7 @@
padding: 0.5rem;
}
.cardContent{
// height: 30rem;
height: 30rem;
overflow-y: scroll;
width: 19rem;
}
......@@ -192,6 +191,7 @@
padding: 1rem;
border: 1px solid #b5b8c8;
margin-bottom: 1rem;
overflow-x: hidden;
}
}
.doctorTable {
......@@ -221,4 +221,42 @@
.ant-drawer-footer {
display:flex;
justify-content: flex-end;
}
.config{
display: flex;
padding: 1rem 0 0.5rem 0.5rem;
justify-content: space-between;
width: calc(100% - 10px);
.title{
font-size: 18px;
color: rgba(0, 114, 255, 1);
font-weight: bold;
}
.btn{
display: flex;
justify-content: space-around;
width: 20rem;
}
.ant-btn{
display: flex;
align-items: center;
}
}
.containerBox {
width: 100vm;
height: calc(100vh - 90px) ;
background: #ffffff;
.ant-table.ant-table-small .ant-table-tbody .ant-table-wrapper:only-child .ant-table{
margin-left: 0;
}
.ant-table.ant-table-bordered > .ant-table-container{
border: none;
}
.clickRowStyle{
background: #cfe7fd;
}
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
}
}
\ No newline at end of file
import React, { useEffect, useState } from 'react';
import { Modal, Table, Tooltip, notification, Space, Popconfirm, Spin, Button } from 'antd';
import {
PlusSquareFilled,
EditTwoTone,
DeleteOutlined,
PlusSquareOutlined,
RollbackOutlined
} from '@ant-design/icons';
import { useHistory } from 'react-router-dom';
import styles from './incident.less';
import { GetCM_Event_LoadEvenFlows, CM_Event_RemoveEvenFlow } from '@/services/standingBook/api';
import AddFlowsModal from './AddFlowsModal'
const incidentFlow = (props) => {
const [tableData, setTableData] = useState([])
const history = useHistory();
const [addVisible, setAddVisible] = useState(false)
const [treeLoading, setTreeLoading] = useState(false);
const [isType, setIsType] = useState(''); // 弹窗类型
const [record1, setRecord1] = useState('')
const [obj, setObj] = useState('')
const [flag, setFlag] = useState(0)
const columns = [
{
title: () => (<span style={{ fontWeight: 'bold' }}>流程名称</span>),
dataIndex: 'FlowName',
key: 'FlowName',
width: 250,
ellipsis: true,
}
,
{
title: () => (<span style={{ fontWeight: 'bold' }}>受理权限</span>),
dataIndex: 'FlowRoles',
key: 'FlowRoles',
ellipsis: true,
},
{
title: () => (<span style={{ fontWeight: 'bold' }}>操作</span>),
key: 'action',
width: 150,
aligin: 'center',
render: record => (
<Space size="middle">
<Tooltip title="编辑用户">
<EditTwoTone
onClick={() => editEventType(record)}
style={{ fontSize: '16px' }}
/>
</Tooltip>
<Tooltip title="删除">
<Popconfirm
placement="bottomRight"
title={
<p>
即将删除事件流程,是否确认删除?
</p>
}
okText="确认"
cancelText="取消"
onConfirm={() => deleteEventType(record)}
>
<DeleteOutlined style={{ fontSize: '16px', color: '#e86060' }} />
</Popconfirm>
</Tooltip>
</Space>
)
}
]
useEffect(() => {
console.log(props)
console.log(props.location.state.title1)
setTreeLoading(true);
GetCM_Event_LoadEvenFlows({ eventTypeId: props.location.state.formObj.ID }).then(res => {
setTreeLoading(false);
if (res.msg === 'Ok') {
console.log(res.data)
setTableData(res.data)
}
})
}, [flag])
const addIncident = () => {
console.log(props.location.state.formObj.ID)
setObj(props.location.state.formObj.ID)
setAddVisible(true)
setIsType('add')
}
const editEventType = record => {
setObj(props.location.state.formObj.ID)
setRecord1(record)
setIsType('edit');
setAddVisible(true)
}
const back = () => {
let formObj = props.location.state.formObj;
history.push({
pathname: '/platformCenter/bsmanger/incident',
state: { formObj },
});
};
const deleteEventType = record => {
console.log(record)
CM_Event_RemoveEvenFlow({ eventFlowIds: record.ID }).then(res => {
if (res.msg === '') {
notification.success({
message: '提示',
duration: 3,
description: '删除成功',
});
setFlag(flag + 1)
} else {
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
}
})
}
const onOK = () => {
setAddVisible(false)
GetCM_Event_LoadEvenFlows({ eventTypeId: props.location.state.formObj.ID }).then(res => {
if (res.msg === 'Ok') {
console.log(res.data)
setTableData(res.data)
}
})
}
return (
<>
<Spin tip="loading..." spinning={treeLoading}>
<div className={styles.containerBox}>
<div className={styles.config}>
<div className={styles.title}>{`${props.location.state.title1}受理流程和权限`}</div>
<div className={styles.btn}>
<Button
type="primary"
icon={<PlusSquareOutlined />}
onClick={() => addIncident()}
>
新增
</Button>
<Button type="primary" icon={<RollbackOutlined />} onClick={()=>back()}>
返回
</Button>
</div>
</div>
<Table
size="small"
rowKey='ID'
bordered
style={{ overflowY: 'scroll'}}
onRow={record => {
return {
onDoubleClick: event => { event.stopPropagation(); editEventType(record); }, //双击
};
}}
columns={columns}
dataSource={tableData}
pagination={false} />
</div>
</Spin>
<AddFlowsModal
visible={addVisible}
obj={obj}
formObj={props.location.state.formObj}
type={isType}
record={record1}
// maxLength={maxLength}
onClose={() => setAddVisible(false)}
callBackSubmit={onOK}
placement="right"
/>
</>
)
}
export default incidentFlow;
\ No newline at end of file
import React, { useEffect, useState } from 'react';
import { Form, Modal, Table, Input, Select, Tooltip, Button, notification, Spin, Image, Menu, Dropdown, Space, Popconfirm } from 'antd';
import { CM_Event_ReloadEventExtendPages, CM_Event_RemoveEventExtendPage } from '@/services/standingBook/api';
import {
PlusSquareFilled,
EditTwoTone,
DeleteOutlined,
PlusSquareOutlined,
RollbackOutlined
} from '@ant-design/icons';
import AddViewModal from './AddViewModal'
import { useHistory } from 'react-router-dom';
import { set } from 'immutable';
import styles from './incident.less';
const incidentView = props => {
const history = useHistory();
const [tableData, setTableData] = useState([])
const [addViewVisible, setAddViewVisible] = useState(false)
const [treeLoading, setTreeLoading] = useState(false)
const [flag,setFlag] = useState(0)
const [obj,setObj] = useState('')
const [type,setType] = useState('')
const columns = [
{
title: () => (<span style={{fontWeight:'bold'}}>视图标签</span>),
dataIndex: 'WebLabel',
key: 'WebLabel',
width: 150,
ellipsis: true,
render: item => (
<div
ref={r => {
if (r) {
r.innerHTML = item;
}
}}
/>
)
}
,
{
title: () => (<span style={{fontWeight:'bold'}}>视图模块</span>),
dataIndex: 'WebPage',
key: 'WebPage',
width: 150,
ellipsis: true,
render: item => (
<div
ref={r => {
if (r) {
r.innerHTML = item;
}
}}
/>
)
},
{
title: () => (<span style={{fontWeight:'bold'}}>视图参数</span>),
dataIndex: 'WebParam',
key: 'WebParam',
width: 150,
ellipsis: true,
render: item => (
<div
ref={r => {
if (r) {
r.innerHTML = item;
}
}}
/>
)
},
,
{
title: () => (<span style={{fontWeight:'bold'}}>手持视图标签</span>),
dataIndex: 'MobileLabel',
key: 'MobileLabel',
width: 150,
ellipsis: true,
render: item => (
<div
ref={r => {
if (r) {
r.innerHTML = item;
}
}}
/>
)
},
{
title: () => (<span style={{fontWeight:'bold'}}>手持视图模块</span>),
dataIndex: 'MobilePage',
key: 'MobilePage',
width: 150,
ellipsis: true,
render: item => (
<div
ref={r => {
if (r) {
r.innerHTML = item;
}
}}
/>
)
},
,
{
title: () => (<span style={{fontWeight:'bold'}}>手持视图参数</span>),
dataIndex: 'MobileParam',
key: 'MobileParam',
width: 150,
ellipsis: true,
render: item => (
<div
ref={r => {
if (r) {
r.innerHTML = item;
}
}}
/>
)
},
{
title: () => (<span style={{fontWeight:'bold'}}>操作</span>),
key: 'action',
aligin: 'center',
width: 50,
render: record => (
<Space size="middle">
<Tooltip title="编辑用户">
<EditTwoTone
onClick={() => editView(record)}
style={{ fontSize: '16px' }}
/>
</Tooltip>
<Tooltip title="删除">
<Popconfirm
placement="bottomRight"
title={
<p>
即将删除事件处理流程,是否确认删除?
</p>
}
okText="确认"
cancelText="取消"
onConfirm={() => deleteView(record)}
>
<DeleteOutlined style={{ fontSize: '16px', color: '#e86060' }} />
</Popconfirm>
</Tooltip>
</Space>
)
}
]
useEffect(()=>{
setTreeLoading(true);
CM_Event_ReloadEventExtendPages({eventName:props.location.state.formObj.name}).then(res=>{
setTreeLoading(false);
if (res.msg === 'Ok'||res.msg==='') {
console.log(res.data)
setTableData(res.data)
}
})
},[flag])
const onSumbit =()=>{
callBackSubmit()
}
const addView=()=>{
setType('add')
setAddViewVisible(true)
}
const editView = record =>{
setType('edit')
setAddViewVisible(true)
setObj(record.ID)
}
const deleteView= record =>{
console.log(record)
CM_Event_RemoveEventExtendPage({eventExtendId:record.ID}).then(res=>{
if (res.msg === '') {
notification.success({
message: '提示',
duration: 3,
description: '删除成功',
});
setFlag(flag + 1);
} else {
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
}
})
}
const okk =()=>{
setAddViewVisible(false)
setFlag(flag+1)
}
const back = () => {
let formObj = props.location.state.formObj;
history.push({
pathname: '/platformCenter/bsmanger/incident',
state: { formObj },
});
};
return(
<>
<Spin tip="loading..." spinning={treeLoading}>
<div className={styles.containerBox}>
<div className={styles.config}>
<div className={styles.title}>{`${props.location.state.title2}受理流程和权限`}</div>
<div className={styles.btn}>
<Button
type="primary"
icon={<PlusSquareOutlined />}
onClick={() => addView()}
>
新增
</Button>
<Button type="primary" icon={<RollbackOutlined />} onClick={()=>back()}>
返回
</Button>
</div>
</div>
<Table
size="small"
rowKey='ID'
bordered
onRow={record => {
return {
onDoubleClick: event => {event.stopPropagation(); editView(record)}, //双击
};
}}
columns={columns}
style={{ height: '15rem', overflowY: 'scroll', marginLeft: '25px', marginRight: '25px' }}
dataSource={tableData}
pagination={false}
scroll={{ x: 'max-content'}}
/>
</div>
</Spin>
<AddViewModal
visible={addViewVisible}
title="事件辅助视图配置"
onClose={()=>setAddViewVisible(false)}
title2={props.location.state.title2}
callBackSubmit={okk}
obj={obj}
type={type}
placement="right"
/>
</>
)
}
export default incidentView;
\ No newline at end of file
......@@ -358,7 +358,8 @@ const AddModal = props => {
};
// 返回上一级
const back = () => {
let template = props.history.location.state.template;
console.log(props)
let template = props.location.state.template;
history.push({
pathname: '/platformCenter/bsmanger/tablemanger',
state: { template },
......
......@@ -51,6 +51,8 @@ import TableManager from '@/pages/platformCenter/bsmanager/tablemanager';
import StandingBook from '@/pages/platformCenter/standingBook/standingBook';
import FiledConfig from '@/pages/platformCenter/filedConfig/filedConfig';
import Incident from '@/pages/platformCenter/bsmanager/workOrder/incident';
import IncidentFlow from '@/pages/platformCenter/bsmanager/workOrder/incidentFlow';
import IncidentView from '@/pages/platformCenter/bsmanager/workOrder/incidentView';
import Maintenance from '@/pages/platformCenter/bsmanager/maintenance/maintenance';
import Flow from '@/pages/platformCenter/bsmanager/workFlow/flow';
import FlowNode from '@/pages/platformCenter/bsmanager/workFlow/flowNode/flowNode';
......@@ -291,6 +293,18 @@ export default {
name: '事件',
component: Incident,
},
{
path: '/platformCenter/bsmanger/incidentFlow',
name: '事件受理流程',
hideMenu: true,
component: IncidentFlow,
},
{
path: '/platformCenter/bsmanger/incidentView',
name: '事件辅助视图',
hideMenu: true,
component: IncidentView,
},
{
path: '/platformCenter/bsmanger/flow',
name: '流程',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment