Commit 217fe785 authored by 皮倩雯's avatar 皮倩雯

事件管理界面优化

parent 098df0bf
# PUBLIC_PATH = reactOMS, 默认转发 /cityinterface
PROXY=/Cityinterface:http://192.168.19.105:8049;/PandaOMS:http://192.168.19.105:8049;/Web4:http://192.168.19.105:8049;/CityTemp:http://192.168.19.105:8049
PROXY=/Cityinterface:http://192.168.19.105:8049;/PandaOMS:http://192.168.12.161:8888;/Web4:http://192.168.19.105:8049;/CityTemp:http://192.168.19.105:8049
# PROXY=/Cityinterface:http://192.168.12.121:8082;/PandaOMS:http://192.168.12.121:8082;/Web4:http://192.168.12.121:8082;/CityTemp:http://192.168.12.121:8082
# 可设置第二个代理,test为转发前缀,后面为代理转发的地址
# PROXY2 = test : http://localhost:8006/
......
......@@ -4,6 +4,8 @@ import { PlusOutlined } from '@ant-design/icons';
import ChangeAddFlows from './ChangeAddFlows'
import { CM_Event_ReloadFlows, CM_Event_LoadDepartmentAndRoles, CM_Event_AddEvenFlow, CM_Event_EditEvenFlow } from '@/services/standingBook/api';
import styles from './incident.less';
const { Option } = Select;
const AddFlowsModal = props => {
const { callBackSubmit = () => { }, type, visible, onCancel, formObj, obj, maxLength, record } = props;
const [form] = Form.useForm();
......@@ -15,6 +17,7 @@ const AddFlowsModal = props => {
const [pickItem, setPickItem] = useState('')
const [checkedList1, setCheckedList1] = useState([])
const [inputValue, setInputValue] = useState({ Roles: '' });
const [selectValue, setSelectValue] = useState('')
const [characterValue, setCharacterValue] = useState('')
const [Order, setOrder] = useState(''); // 弹窗类型
const [strr, setStrr] = useState('')
......@@ -39,9 +42,12 @@ const AddFlowsModal = props => {
setFiled1({})
form.resetFields();
}else if(type==='edit'){
console.log(record)
setInputValue({
Roles:record.FlowRoles
})
setSelectValue(record.FlowName)
console.log(selectValue)
}
}, [visible])
......@@ -153,6 +159,8 @@ const AddFlowsModal = props => {
callBackSubmit();
// setLoading(true);
let aa = form.getFieldsValue().FlowName
var index=aa.lastIndexOf("\\");
aa=aa.substring(index+1,aa.length);
console.log(aa)
console.log(inputValue)
console.log(strr)
......@@ -272,7 +280,25 @@ const AddFlowsModal = props => {
<Form form={form} labelCol={{ span: 7 }} style={{ height: '8rem', overflowY: 'scroll' }}>
<Row>
<Col span={24}>
<Item
{type === 'edit'?
<>
<Item
label="受理流程"
name="FlowName"
labelCol={{ span: 4 }}
>
<Select
style={{ width: '580px' }}
placeholder="选择受理流程"
placeholder={selectValue}
disabled
>
{standingTable ? standingTable.map((item, index) => { return <Option key={index} value={item}>{item}</Option> }) : ''}
</Select>
</Item>
</>
:<>
<Item
label="受理流程"
name="FlowName"
labelCol={{ span: 4 }}
......@@ -284,6 +310,9 @@ const AddFlowsModal = props => {
{standingTable ? standingTable.map((item, index) => { return <Option key={index} value={item}>{item}</Option> }) : ''}
</Select>
</Item>
</>
}
</Col>
<Col span={24}>
<Item
......
......@@ -30,6 +30,7 @@ const AddModal = props => {
const [checkAll, setCheckAll] = useState(true);
const [pickItem, setPickItem] = useState('')
const [prefixName, setPrefixName] = useState('')
const [selectValue, setSelectValue] = useState('')
const [standingTable, setStandingTable] = useState([]);
......@@ -57,6 +58,11 @@ const AddModal = props => {
console.log(obj.CreateMode)
console.log(obj.ReportFromWeb)
console.log(inputValue)
console.log(obj.tableName)
if(obj.TableName===undefined){
console.log(selectValue)
obj.TableName = selectValue
}
if (obj.CreateMode === 0 || 1) {
obj.CreateMode = obj.CreateMode.toString()
}
......@@ -106,6 +112,11 @@ const AddModal = props => {
message: '提示',
description: '当允许客户端上报时需选择事件权限',
})
}else if(inputValue.SummaryFields===''){
notification.warning({
message: '提示',
description: '摘要字段必填',
})
}else{
let data = type == 'add' ? { ...obj, ...inputValue, Order: maxLength } : { ...obj, Order, ID: formObj.ID }
if (type == 'edit') {
......@@ -214,6 +225,13 @@ const AddModal = props => {
if (res.msg === 'Ok') {
console.log(res.data)
setStandingTable(res.data)
let arr = []
res.data.map((item, index)=>{
arr.push(item.text)
})
console.log(arr)
setSelectValue(arr[0])
changTable(arr[0])
}
})
}
......@@ -475,17 +493,12 @@ const AddModal = props => {
label="事件主表"
name="TableName"
labelCol={{ span: 4 }}
rules={[
{
required: true,
message: '请选择事件主表',
},
]}
>
<Select
style={{ width: '580px' }}
placeholder="选择事件主表"
onChange={changTable}
defaultValue={selectValue}
>
{standingTable ? standingTable.map((item, index) => { return <Option key={index} value={item.text}>{item.text}</Option> }) : ''}
</Select>
......@@ -574,7 +587,7 @@ const AddModal = props => {
>
<div className={styles.filed_listItem} >
<Input style={{ width: '500px' }} placeholder="请选择摘要字段" onChange={(e) => changeText(e, 'SummaryFields')} value={inputValue.SummaryFields} allowClear />
<Button type="dashed" onClick={() => pickFiled('SummaryFields')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', height: '100%', width: '3.5rem' }} />
<Button type="dashed" onClick={() => pickFiled('SummaryFields')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', height: '100%', width: '4rem' }} />
</div>
</Item>
......@@ -587,7 +600,7 @@ const AddModal = props => {
>
<div className={styles.filed_listItem} >
<Input style={{ width: '500px' }} placeholder="请选择上报字段" onChange={(e) => changeText(e, 'ReportFields')} value={inputValue.ReportFields} allowClear />
<Button type="dashed" onClick={() => pickFiled('ReportFields')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', height: '100%', width: '3.5rem' }} />
<Button type="dashed" onClick={() => pickFiled('ReportFields')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', height: '100%', width: '4rem' }} />
</div>
</Item>
</Col>
......@@ -599,7 +612,7 @@ const AddModal = props => {
>
<div className={styles.filed_listItem} >
<Input style={{ width: '500px' }} placeholder="请选择显示字段" onChange={(e) => changeText(e, 'DisplayFields')} value={inputValue.DisplayFields} allowClear />
<Button type="dashed" onClick={() => pickFiled('DisplayFields')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', height: '100%', width: '3.5rem' }} />
<Button type="dashed" onClick={() => pickFiled('DisplayFields')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', height: '100%', width: '4rem' }} />
</div>
</Item>
</Col>
......@@ -611,7 +624,7 @@ const AddModal = props => {
>
<div className={styles.filed_listItem} >
<Input style={{ width: '500px' }} placeholder="请选择编辑字段" onChange={(e) => changeText(e, 'EditableFields')} value={inputValue.EditableFields} allowClear />
<Button type="dashed" onClick={() => pickFiled('EditableFields')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', height: '100%', width: '3.5rem' }} />
<Button type="dashed" onClick={() => pickFiled('EditableFields')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', height: '100%', width: '4rem' }} />
</div>
</Item>
</Col>
......@@ -623,7 +636,7 @@ const AddModal = props => {
>
<div className={styles.filed_listItem} >
<Input style={{ width: '500px' }} placeholder="请选择转单字段" onChange={(e) => changeText(e, 'TransitFields')} value={inputValue.TransitFields} allowClear />
<Button type="dashed" onClick={() => pickFiled('TransitFields')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', height: '100%', width: '3.5rem' }} />
<Button type="dashed" onClick={() => pickFiled('TransitFields')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', height: '100%', width: '4rem' }} />
</div>
</Item>
</Col>
......@@ -635,7 +648,7 @@ const AddModal = props => {
>
<div className={styles.filed_listItem} >
<Input style={{ width: '500px' }} placeholder="请选择事件权限" onChange={(e) => changeText(e, 'Roles')} value={inputValue.Roles} allowClear />
<Button type="dashed" onClick={() => pickFiled1('Roles')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', height: '100%', width: '3.5rem' }} />
<Button type="dashed" onClick={() => pickFiled1('Roles')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', height: '100%', width: '4rem' }} />
</div>
</Item>
</Col>
......@@ -683,7 +696,7 @@ const AddModal = props => {
>
<div className={styles.filed_listItem} >
<Input style={{ width: '500px' }} placeholder="请选择关联字段" onChange={(e) => changeText(e, 'RelatedEventFields')} value={inputValue.RelatedEventFields} allowClear />
<Button type="dashed" onClick={() => pickFiled('RelatedEventFields')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', height: '100%', width: '3.5rem' }} />
<Button type="dashed" onClick={() => pickFiled('RelatedEventFields')} icon={<PlusOutlined/>} style={{ marginLeft: '0.5rem', height: '100%', width: '4rem' }} />
</div>
</Item>
</Col>
......@@ -704,7 +717,7 @@ const AddModal = props => {
>
<div className={styles.filed_listItem} >
<Input style={{ width: '500px' }} placeholder="请选择图片表达" onChange={(e) => changeText(e, 'pictureFields')} value={inputValue.pictureFields} allowClear />
<Button type="dashed" onClick={() => pickFiled('pictureFields')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', height: '100%', width: '3.5rem' }} />
<Button type="dashed" onClick={() => pickFiled('pictureFields')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', height: '100%', width: '4rem' }} />
</div>
</Item>
</Col>
......
import React, { useEffect, useState } from 'react';
import { Form, Modal, Table, Input, Select, Tooltip, Button, notification, Image, Menu, Dropdown, Space, Popconfirm } from 'antd';
import { Modal, Table, Tooltip, notification, Space, Popconfirm } from 'antd';
import {
DoubleLeftOutlined,
DoubleRightOutlined,
PlusSquareFilled,
RightOutlined,
EditTwoTone,
DeleteOutlined,
OrderedListOutlined,
ApartmentOutlined,
DesktopOutlined
} from '@ant-design/icons';
import styles from './incident.less';
import { GetCM_Event_LoadEvenFlows, CM_Event_RemoveEvenFlow } from '@/services/standingBook/api';
......@@ -176,7 +170,8 @@ const ProcessModal = props => {
}}
columns={columns}
dataSource={tableData}
scroll={{ x: 'max-content', y: 'calc(100vh - 150px)' }}
pagination={false}
scroll={{ x: 'max-content' }}
/>
<AddFlowsModal
visible={addVisible}
......
......@@ -228,7 +228,8 @@ const ViewModal = props => {
}}
columns={columns}
dataSource={tableData}
scroll={{ x: 'max-content', y: 'calc(100vh - 150px)' }}
pagination={false}
scroll={{ x: 'max-content'}}
/>
<AddViewModal
visible={addViewVisible}
......
......@@ -14,6 +14,9 @@
padding: 8px 14px;
}
.ant-btn .anticon.anticon-plus > svg, .ant-btn .anticon.anticon-minus > svg {
margin-top: -5px;
}
.pickItem{
background-color: #F5F6F9;
}
......
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