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

修改数据字典模块

parents bf89e623 2d8a8a4e
Pipeline #31991 skipped with stages
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
...@@ -21,22 +21,26 @@ const EditForm = props => { ...@@ -21,22 +21,26 @@ const EditForm = props => {
otherForm.resetFields(); otherForm.resetFields();
}, [info]); }, [info]);
useEffect(() => { useEffect(() => {
if (nodeType === 1 || nodeType === 2) { if(JSON.stringify(info)!='{}' ){
let arr = Object.keys(form.getFieldsValue()); let data =info.data
let obj = {}; if (nodeType === 1 || nodeType === 2) {
arr.map(i => { let arr = Object.keys(form.getFieldsValue());
obj[i] = info[i]; let obj = {};
}); arr.map(i => {
form.setFieldsValue({ ...obj, shortName: info.menuShortName }); obj[i] = data[i];
} });
if (nodeType === 3 || nodeType === 4) { form.setFieldsValue({ ...obj, shortName: data.menuShortName });
let arr = Object.keys(otherForm.getFieldsValue()); }
let obj = {}; if (nodeType === 3 || nodeType === 4) {
arr.map(i => { let arr = Object.keys(otherForm.getFieldsValue());
obj[i] = info[i]; let obj = {};
}); arr.map(i => {
otherForm.setFieldsValue({ ...obj, shortName: info.menuShortName }); obj[i] = data[i];
});
otherForm.setFieldsValue({ ...obj, shortName: data.menuShortName });
}
} }
}, [info]); }, [info]);
const submit = () => { const submit = () => {
...@@ -214,7 +218,7 @@ const EditForm = props => { ...@@ -214,7 +218,7 @@ const EditForm = props => {
<Input /> <Input />
</Item> </Item>
<CheckList <CheckList
info={info} info={info.data?info.data:{}}
nodeType={nodeType} nodeType={nodeType}
valueCallback={valueCallback} valueCallback={valueCallback}
/> />
......
import React, { useState, useEffect } from 'react';
import {
Form,
Modal,
Space,
Table,
Button,
Popconfirm,
Spin,
notification,
} from 'antd';
import { reloadTableFields, removeFields } from '@/services/platform/bs';
import FieldEditor from './fieldEditor';
const AddModal = props => {
const [tableData, setTableData] = useState([]);
const { callBackSubmit = () => {}, type, formObj, visible } = props;
const [loading, setLoading] = useState(false);
const [treeLoading, setTreeLoading] = useState(true);
const [form] = Form.useForm();
const [flag, setFlag] = useState(0); // 弹窗类型
const [isVisible, setIsVisible] = useState(false); // 弹窗
const [isType, setIsType] = useState(''); // 弹窗类型
const [itemData, setItemData] = useState({});
const { Item } = Form;
// 提交
const onSubmit = () => {
form.validateFields().then(validate => {
if (validate) {
setLoading(true);
let obj = form.getFieldsValue();
}
});
};
const columns = [
{
title: '字段名',
dataIndex: 'name',
key: 'name',
width: 150,
render: text => <a>{text}</a>,
},
{
title: '别名',
dataIndex: 'alias',
key: 'alias',
align: 'center',
},
{
title: '字段类型',
dataIndex: 'storeType',
key: 'storeType',
align: 'center',
},
{
title: '形态',
dataIndex: 'shape',
key: 'shape',
align: 'center',
},
{
title: '配置',
dataIndex: 'config',
key: 'config',
align: 'center',
},
{
title: '只读',
dataIndex: 'readOnly',
key: 'readOnly',
align: 'center',
},
{
title: '同步',
dataIndex: 'syncEvent',
key: 'syncEvent',
align: 'center',
},
{
title: '操作',
width: 250,
ellipsis: true,
align: 'center',
render: (text, record) => (
<Space>
<Button
type="primary"
size="small"
onClick={() => {
editor(record);
}}
>
编辑
</Button>
<div onClick={e => e.stopPropagation()}>
<Popconfirm
title="是否删除该字段?"
okText="确认"
cancelText="取消"
onConfirm={() => {
deleteChart(record);
}}
>
<Button size="small" danger>
删除
</Button>
</Popconfirm>
</div>
</Space>
),
},
];
const editor = record => {
setIsType('edit');
setIsVisible(true);
setItemData(record);
};
const Submit = prop => {
setIsVisible(false);
setFlag(flag + 1);
};
useEffect(() => {
if (type !== '') {
setTreeLoading(true);
reloadTableFields({
tableName: formObj.tableName,
}).then(res => {
setTreeLoading(false);
if (res.msg === 'Ok') {
setTableData(res.data.root);
}
});
}
}, [visible, flag]);
// 删除表字段
const deleteChart = record => {
removeFields({ fieldIDs: record.ID }).then(res => {
if (res.msg === 'Ok' || res.msg === '') {
notification.success({
message: '提示',
duration: 3,
description: '删除成功',
});
setFlag(flag + 1);
} else {
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
}
});
};
return (
<>
<Modal
title="字段配置"
bodyStyle={{ width: '100%', minHeight: '100px' }}
style={{ top: '50px', left: '50px' }}
width="60%"
destroyOnClose
maskClosable={false}
cancelText="取消"
okText="确认"
{...props}
onOk={() => onSubmit()}
confirmLoading={loading}
forceRender
getContainer={false}
>
{visible && (
<Spin tip="loading..." spinning={treeLoading}>
<Table
columns={columns}
dataSource={tableData}
// pagination={{ pageSize: 10 }}
scroll={{ x: 'max-content', y: '35rem' }}
size="small"
rowKey={(record, index) => `complete${record.tableID}${index}`}
pagination={false}
/>
</Spin>
)}
</Modal>
<FieldEditor
isVisible={isVisible}
isType={isType}
itemData={itemData}
formObj1={formObj}
onCancel={() => setIsVisible(false)}
callBackSubmit={Submit}
/>
</>
);
};
export default AddModal;
...@@ -50,9 +50,9 @@ ...@@ -50,9 +50,9 @@
padding: 0.5rem; padding: 0.5rem;
} }
.cardContent{ .cardContent{
height: 25rem; height:35rem;
overflow-y: scroll; overflow-y: scroll;
width: 19.5rem; width: 22rem;
} }
.cardItemData{ .cardItemData{
padding: 1rem; padding: 1rem;
...@@ -77,6 +77,9 @@ ...@@ -77,6 +77,9 @@
font-weight: 600; font-weight: 600;
background: #FAFAFA; background: #FAFAFA;
} }
td{
width: 12rem;
}
} }
tbody{ tbody{
tr:hover{ tr:hover{
...@@ -85,3 +88,9 @@ ...@@ -85,3 +88,9 @@
} }
} }
} }
.defaultTile{
background-color:transparent ;
}
.activeTile{
background-color:#dfe8f6 ;
}
\ No newline at end of file
...@@ -20,7 +20,6 @@ import styles from './index.less' ...@@ -20,7 +20,6 @@ import styles from './index.less'
import Editor from './components/Field/editor' import Editor from './components/Field/editor'
import AddTablelList from './components/Field/addTable' import AddTablelList from './components/Field/addTable'
import AffiliateAdd from './components/Field/affiliateAdd' import AffiliateAdd from './components/Field/affiliateAdd'
import FieldsConfig from './components/Field/fieldsConfig'
import LoadGroup from './components/Field/loadGroup' import LoadGroup from './components/Field/loadGroup'
import { useHistory } from 'react-router-dom'; import { useHistory } from 'react-router-dom';
const { Search } = Input; const { Search } = Input;
...@@ -140,6 +139,7 @@ const TableManager = () => { ...@@ -140,6 +139,7 @@ const TableManager = () => {
Object.keys(groupData).map((item, index) => { Object.keys(groupData).map((item, index) => {
newArr.push({ type: item, key: index }) newArr.push({ type: item, key: index })
}) })
console.log('groupData',groupData);
setAllData(groupData) setAllData(groupData)
setGroupArr(newArr) setGroupArr(newArr)
} }
...@@ -302,7 +302,7 @@ const TableManager = () => { ...@@ -302,7 +302,7 @@ const TableManager = () => {
{ {
title: '类型', dataIndex: 'type', key: 'type', title: '类型', dataIndex: 'type', key: 'type',
render: text => { render: text => {
return (<div style={{ color: '#3764a0' }}>{text}({allData[text].length}个)</div>) return (<div style={{ color: '#3764a0' }}>{text}({allData&&allData[text]?allData[text].length:0}个)</div>)
} }
}, },
...@@ -311,7 +311,6 @@ const TableManager = () => { ...@@ -311,7 +311,6 @@ const TableManager = () => {
return ( return (
<Spin tip="loading..." spinning={treeLoading}> <Spin tip="loading..." spinning={treeLoading}>
<PageContainer> <PageContainer>
<div className={styles.tablemanager_container}> <div className={styles.tablemanager_container}>
<div className={styles.operate_bar}> <div className={styles.operate_bar}>
<div className={styles.fast_search}> <div className={styles.fast_search}>
...@@ -331,7 +330,7 @@ const TableManager = () => { ...@@ -331,7 +330,7 @@ const TableManager = () => {
<Button type="primary" style={{ marginLeft: "10px" }} onClick={AffiliateAddTable}>附加</Button> <Button type="primary" style={{ marginLeft: "10px" }} onClick={AffiliateAddTable}>附加</Button>
</div> </div>
<div className={styles.table_container}> <div style={{ width: '100vm', height: 'calc(100vh - 150px) ', background: '#ffffff' }}>
{/* <Table {/* <Table
columns={columns} columns={columns}
dataSource={tableData} dataSource={tableData}
...@@ -353,6 +352,7 @@ const TableManager = () => { ...@@ -353,6 +352,7 @@ const TableManager = () => {
className="components-table-demo-nested" className="components-table-demo-nested"
columns={columns} columns={columns}
expandable={{ expandedRowRender }} expandable={{ expandedRowRender }}
showHeader={false}
dataSource={groupArr} dataSource={groupArr}
size="small" size="small"
style={{ height: '8rem' }} style={{ height: '8rem' }}
...@@ -393,15 +393,7 @@ const TableManager = () => { ...@@ -393,15 +393,7 @@ const TableManager = () => {
formObj={formObj} formObj={formObj}
/> />
)} )}
{visible && type === 'config' && (
<FieldsConfig
visible={visible}
type={type}
formObj={formObj}
onCancel={() => setVisible(false)}
callBackSubmit={onSubmit}
/>
)}
{visible && type === 'sort' && ( {visible && type === 'sort' && (
<LoadGroup <LoadGroup
visible={visible} visible={visible}
......
.tablemanager_container { .tablemanager_container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100vm;
.operate_bar { .operate_bar {
width: 100%; width: 100%;
height: 60px; height: 60px;
...@@ -25,7 +26,3 @@ ...@@ -25,7 +26,3 @@
} }
} }
.table_container{
width: 100%;
height: calc(100% - 100px);
}
\ No newline at end of file
...@@ -19,10 +19,16 @@ const AddModal = props => { ...@@ -19,10 +19,16 @@ const AddModal = props => {
const [checkAll, setCheckAll] = useState([]); const [checkAll, setCheckAll] = useState([]);
const [selectData, setSelectData] = useState([]) const [selectData, setSelectData] = useState([])
let objArr = [] let objArr = []
const onChangeList = (list, index) => { const onChangeList = (list, index,title) => {
const checkedListArr = [...checkedList] const checkedListArr = [...checkedList]
checkedListArr[index] = list checkedListArr[index] = list
setCheckedList(checkedListArr); setCheckedList(checkedListArr);
const indeterminateArr = [...indeterminate]
const checkAllArr = [...checkAll]
indeterminateArr[index] = !!list.length && list.length < filed[title].length
checkAllArr[index] = list.length === filed[title].length
setIndeterminate(indeterminateArr)
setCheckAll(checkAllArr);
}; };
const onCheckAllChange = e => { const onCheckAllChange = e => {
...@@ -61,14 +67,21 @@ const AddModal = props => { ...@@ -61,14 +67,21 @@ const AddModal = props => {
else if (isType === 'characteristics') { else if (isType === 'characteristics') {
let arr = Object.keys(filed) let arr = Object.keys(filed)
setTitle(arr) setTitle(arr)
console.log('arr', arr); let checkArr = []
let indeterminateArr = [] let indeterminateArr = []
let checkAllArr = [] let checkAllArr = []
arr.map((item, index) => { arr.map((item, index) => {
indeterminateArr.push(true) checkArr[index] = []
checkAllArr.push(false) newCheckedList.map(checkItem => {
if (filed[item].includes(checkItem)) {
checkArr[index].push(checkItem)
}
})
indeterminateArr.push(!!checkArr[index].length && checkArr[index].length < filed[item].length)
checkAllArr.push(checkArr[index].length === filed[item].length)
}) })
setCheckedList(newCheckedList) setCheckedList(checkArr)
setIndeterminate(indeterminateArr) setIndeterminate(indeterminateArr)
setCheckAll(checkAllArr) setCheckAll(checkAllArr)
let newArr = characterValue.length? characterValue.split(","):[] let newArr = characterValue.length? characterValue.split(","):[]
...@@ -158,7 +171,7 @@ const AddModal = props => { ...@@ -158,7 +171,7 @@ const AddModal = props => {
{title.map((item, index) => { {title.map((item, index) => {
return <div className={styles.cardItemData} key={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> <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)} /></div> <CheckboxGroup options={filed[item]} value={checkedList[index]} onChange={(e) => onChangeList(e, index,item)} /></div>
})} })}
</div> </div>
</div> </div>
......
...@@ -33,7 +33,6 @@ const AddModal = props => { ...@@ -33,7 +33,6 @@ const AddModal = props => {
if (validate) { if (validate) {
setLoading(true); setLoading(true);
let obj = form.getFieldsValue(); let obj = form.getFieldsValue();
console.log('obj', obj);
let data = [{ Unit: pramData.Unit || '', StoreType: "nvarchar(255)", Group: pramData.Group || '', Shape, ExceptionEvent: pramData.ExceptionEvent || '', RowSpan: pramData.RowSpan || 0, ColSpan: pramData.ColSpan || 0, ReadOnly: pramData.ReadOnly || false, EditableLater: pramData.EditableLater || false, ExceptionValue: pramData.ExceptionValue || '', Preset: pramData.Preset || '', ID: Number(itemData.ID), Name: obj.Name, Alias: obj.Alias, SyncEvent: obj.SyncEvent, ValidationRule: obj.ValidationRule, ExceptionEventFields: characterValue }] let data = [{ Unit: pramData.Unit || '', StoreType: "nvarchar(255)", Group: pramData.Group || '', Shape, ExceptionEvent: pramData.ExceptionEvent || '', RowSpan: pramData.RowSpan || 0, ColSpan: pramData.ColSpan || 0, ReadOnly: pramData.ReadOnly || false, EditableLater: pramData.EditableLater || false, ExceptionValue: pramData.ExceptionValue || '', Preset: pramData.Preset || '', ID: Number(itemData.ID), Name: obj.Name, Alias: obj.Alias, SyncEvent: obj.SyncEvent, ValidationRule: obj.ValidationRule, ExceptionEventFields: characterValue }]
switch (Shape) { switch (Shape) {
...@@ -87,10 +86,12 @@ const AddModal = props => { ...@@ -87,10 +86,12 @@ const AddModal = props => {
form.setFieldsValue({ ...res[0].data.root }) form.setFieldsValue({ ...res[0].data.root })
if (res[0].data.root.ExceptionEventFields === '') { if (res[0].data.root.ExceptionEventFields === '') {
setCharacterValue('') setCharacterValue('')
setCheckedList([])
setIsShow(false) setIsShow(false)
} else { } else {
setIsShow(true) setIsShow(true)
setCharacterValue(res[0].data.root.ExceptionEventFields) setCharacterValue(res[0].data.root.ExceptionEventFields)
setCheckedList(res[0].data.root.ExceptionEventFields.split(','))
} }
setShape(res[0].data.root.Shape) setShape(res[0].data.root.Shape)
let coordinates = false, picture = false, must = false let coordinates = false, picture = false, must = false
...@@ -109,6 +110,9 @@ const AddModal = props => { ...@@ -109,6 +110,9 @@ const AddModal = props => {
} }
setPramData({ ...res[0].data.root, coordinates, must, picture }) setPramData({ ...res[0].data.root, coordinates, must, picture })
let index = res[2].data.root.find(item => { return item.Name == res[0].data.root.ExceptionEvent })
console.log('index',index);
getFieldData(index.TableName)
} }
}) })
} }
...@@ -178,6 +182,7 @@ const AddModal = props => { ...@@ -178,6 +182,7 @@ const AddModal = props => {
setIsShow(false) setIsShow(false)
setFiled({}) setFiled({})
setCharacterValue('') setCharacterValue('')
setCheckedList([])
} }
} }
const getFieldData = (value) => { const getFieldData = (value) => {
...@@ -312,7 +317,7 @@ const AddModal = props => { ...@@ -312,7 +317,7 @@ const AddModal = props => {
width="700px" width="700px"
destroyOnClose destroyOnClose
maskClosable={false} maskClosable={false}
centered ={true} centered={true}
cancelText="取消" cancelText="取消"
okText="确认" okText="确认"
{...props} {...props}
...@@ -329,7 +334,7 @@ const AddModal = props => { ...@@ -329,7 +334,7 @@ const AddModal = props => {
name="Name" name="Name"
rules={[{ required: true, message: '请输入表名' }]} rules={[{ required: true, message: '请输入表名' }]}
> >
<Input placeholder="请输入别名" disabled/> <Input placeholder="请输入别名" disabled />
</Item> </Item>
<Item <Item
label="别名" label="别名"
......
...@@ -16,105 +16,15 @@ import { useHistory } from 'react-router-dom'; ...@@ -16,105 +16,15 @@ import { useHistory } from 'react-router-dom';
import styles from './index.less' import styles from './index.less'
const AddModal = props => { const AddModal = props => {
const history = useHistory(); const history = useHistory();
const [allData, setAllData] = useState([]);
const [tableData, setTableData] = useState([]); const [tableData, setTableData] = useState([]);
const { callBackSubmit = () => { }, type, visible } = props;
const [loading, setLoading] = useState(false);
const [treeLoading, setTreeLoading] = useState(false); const [treeLoading, setTreeLoading] = useState(false);
const [formObj, setFormObj] = useState(''); const [formObj, setFormObj] = useState('');
const [form] = Form.useForm();
const [flag, setFlag] = useState(0); // 弹窗类型 const [flag, setFlag] = useState(0); // 弹窗类型
const [isVisible, setIsVisible] = useState(false); // 弹窗 const [isVisible, setIsVisible] = useState(false); // 弹窗
const [isType, setIsType] = useState(''); // 弹窗类型 const [isType, setIsType] = useState(''); // 弹窗类型
const [itemData, setItemData] = useState({}); const [itemData, setItemData] = useState({});
const { Item } = Form;
// 提交
const onSubmit = () => {
form.validateFields().then(validate => {
if (validate) {
setLoading(true);
let obj = form.getFieldsValue();
}
});
};
const columns = [
{
title: '字段名',
dataIndex: 'name',
key: 'name',
width: 150,
render: text => <a>{text}</a>,
},
{
title: '别名',
dataIndex: 'alias',
key: 'alias',
align: 'center',
},
{
title: '字段类型',
dataIndex: 'storeType',
key: 'storeType',
align: 'center',
},
{
title: '形态',
dataIndex: 'shape',
key: 'shape',
align: 'center',
},
{
title: '配置',
dataIndex: 'config',
key: 'config',
align: 'center',
},
{
title: '只读',
dataIndex: 'readOnly',
key: 'readOnly',
align: 'center',
},
{
title: '同步',
dataIndex: 'syncEvent',
key: 'syncEvent',
align: 'center',
},
{
title: '操作',
width: 250,
ellipsis: true,
align: 'center',
render: (text, record) => (
<Space>
<Button
type="primary"
size="small"
onClick={() => {
editor(record);
}}
>
编辑
</Button>
<div onClick={e => e.stopPropagation()}>
<Popconfirm
title="是否删除该字段?"
okText="确认"
cancelText="取消"
onConfirm={() => {
deleteChart(record);
}}
>
<Button size="small" danger>
删除
</Button>
</Popconfirm>
</div>
</Space>
),
},
];
const editor = record => { const editor = record => {
setIsType('edit'); setIsType('edit');
setIsVisible(true); setIsVisible(true);
...@@ -124,6 +34,106 @@ const AddModal = props => { ...@@ -124,6 +34,106 @@ const AddModal = props => {
setIsVisible(false); setIsVisible(false);
setFlag(flag + 1); setFlag(flag + 1);
}; };
const expandedRowRender = (item) => {
const columns = [
{
title: '字段名',
dataIndex: 'name',
key: 'name',
width: 150,
render: text => <a>{text}</a>,
},
{
title: '别名',
dataIndex: 'alias',
key: 'alias',
align: 'center',
width: 200,
},
{
title: '字段类型',
dataIndex: 'storeType',
key: 'storeType',
align: 'center',
width: 200,
},
{
title: '形态',
dataIndex: 'shape',
key: 'shape',
align: 'center',
width: 200,
},
{
title: '配置',
dataIndex: 'config',
key: 'config',
align: 'center',
width: 200,
},
{
title: '只读',
dataIndex: 'readOnly',
key: 'readOnly',
align: 'center',
width: 200,
},
{
title: '同步',
dataIndex: 'syncEvent',
key: 'syncEvent',
align: 'center',
width: 200,
},
{
title: '操作',
width: 250,
ellipsis: true,
align: 'center',
render: (text, record) => (
<Space>
<Button
type="primary"
size="small"
onClick={() => {
editor(record);
}}
>
编辑
</Button>
<div onClick={e => e.stopPropagation()}>
<Popconfirm
title="是否删除该字段?"
okText="确认"
cancelText="取消"
onConfirm={() => {
deleteChart(record);
}}
>
<Button size="small" danger>
删除
</Button>
</Popconfirm>
</div>
</Space>
),
},
];
return <Table columns={columns} dataSource={allData[item.type]} pagination={false} />;
};
const columns = [
{
title: '类型', dataIndex: 'type', key: 'type',
render: text => {
return (<div style={{ color: '#3764a0' }}>{text}(共{allData[text].length}条)</div>)
}
},
];
useEffect(() => { useEffect(() => {
if (props.match.params.id) { if (props.match.params.id) {
setFormObj(props.match.params.id) setFormObj(props.match.params.id)
...@@ -133,9 +143,13 @@ const AddModal = props => { ...@@ -133,9 +143,13 @@ const AddModal = props => {
}).then(res => { }).then(res => {
setTreeLoading(false); setTreeLoading(false);
if (res.msg === 'Ok') { if (res.msg === 'Ok') {
setTableData(res.data.root); let arr =formateArrDataA(res.data.root,'group')
let newArr = []
console.log(formateArrDataA(res.data.root,'groupName')); Object.keys(arr).map((item, index) => {
newArr.push({ type: item, key: index,id:index })
})
setAllData(arr);
setTableData(newArr);
} }
}); });
} }
...@@ -167,11 +181,12 @@ const AddModal = props => { ...@@ -167,11 +181,12 @@ const AddModal = props => {
} }
} }
} }
for (let key in tempObj) { for (let keys in tempObj) {
let arr = [] let arr = []
tempObj[key].map(item => { tempObj[keys].map((item,index) => {
tempObj[key] = arr; tempObj[keys] = arr;
arr.push(item.fieldName) item.key = index
arr.push(item)
}) })
} }
return tempObj return tempObj
...@@ -206,10 +221,12 @@ const AddModal = props => { ...@@ -206,10 +221,12 @@ const AddModal = props => {
<Table <Table
columns={columns} columns={columns}
dataSource={tableData} dataSource={tableData}
expandable={{ expandedRowRender }}
showHeader={false}
// pagination={{ pageSize: 10 }} // pagination={{ pageSize: 10 }}
scroll={{ x: 'max-content', y: '45rem' }} scroll={{ y: '45rem' }}
size="small" size="small"
rowKey={(record, index) => `complete${record.tableID}${index}`} rowKey='id'
pagination={{ pagination={{
showTotal: (total, range) => showTotal: (total, range) =>
`第${range[0]}-${range[1]} 条/共 ${total} 条`, `第${range[0]}-${range[1]} 条/共 ${total} 条`,
......
...@@ -7,10 +7,11 @@ import { ...@@ -7,10 +7,11 @@ import {
Button, Button,
Select, Select,
Popconfirm, Popconfirm,
message message,
Tooltip
} from 'antd'; } from 'antd';
import { PlusCircleOutlined } from '@ant-design/icons'; import { PlusCircleOutlined, EditTwoTone, DeleteOutlined, FundViewOutlined } from '@ant-design/icons';
import { useHistory } from 'react-router-dom';
const { Search } = Input; const { Search } = Input;
const { Option } = Select; const { Option } = Select;
import EditModal from './components/EditModal' import EditModal from './components/EditModal'
...@@ -18,7 +19,7 @@ import VisibleRoleModal from './components/RolseSelect/VisibleRoleModal' ...@@ -18,7 +19,7 @@ import VisibleRoleModal from './components/RolseSelect/VisibleRoleModal'
import { GetMessageConfigList, TestPush, DeleteMessageConfig, GetMsgTypeList, DeleteIISAgentConfig } from '@/services/platform/messagemanage' import { GetMessageConfigList, TestPush, DeleteMessageConfig, GetMsgTypeList, DeleteIISAgentConfig } from '@/services/platform/messagemanage'
import styles from './ProjectManage.less' import styles from './ProjectManage.less'
const ProjectManage = () => { const ProjectManage = () => {
const history = useHistory();
const [visibleParams, setvisibleParams] = useState({ const [visibleParams, setvisibleParams] = useState({
addVisible: false, // 新增弹窗 addVisible: false, // 新增弹窗
delVisible: false, // 删除弹窗 delVisible: false, // 删除弹窗
...@@ -72,24 +73,16 @@ const ProjectManage = () => { ...@@ -72,24 +73,16 @@ const ProjectManage = () => {
ellipsis: true, ellipsis: true,
render: (text, record) => ( render: (text, record) => (
<Space> <Space>
<Button <Tooltip title="测试">
type="primary" <FundViewOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={() => {
size="small"
onClick={() => {
TestDesc(record); TestDesc(record);
}} }} />
> </Tooltip>
测试 <Tooltip title="编辑">
</Button> <EditTwoTone style={{ fontSize: '16px', color: '#e86060' }} onClick={() => {
<Button
type="primary"
size="small"
onClick={() => {
changeDesc(record); changeDesc(record);
}} }}></EditTwoTone>
> </Tooltip>
编辑
</Button>
{ {
record.name != "通用报警" record.name != "通用报警"
...@@ -104,9 +97,8 @@ const ProjectManage = () => { ...@@ -104,9 +97,8 @@ const ProjectManage = () => {
DeleteProject(record) DeleteProject(record)
}} }}
> >
<Button size="small" danger>
删除 <DeleteOutlined style={{ fontSize: '16px', color: '#e86060' }}></DeleteOutlined>
</Button>
</Popconfirm> </Popconfirm>
</div>) </div>)
} }
...@@ -120,28 +112,27 @@ const ProjectManage = () => { ...@@ -120,28 +112,27 @@ const ProjectManage = () => {
GetMessageList({ pageSize: 10, pageIndex: 0, search: value }) GetMessageList({ pageSize: 10, pageIndex: 0, search: value })
} }
const changeDesc = (record) => { const changeDesc = (record) => {
setCurrentTempalte(record) setCurrentTempalte(record)
handleShowModal("editVisible", true) history.push({ pathname: `/platformCenter/schemeDetail`, state: { template: record } })
// handleShowModal("editVisible", true)
} }
const TestDesc = (record) => { const TestDesc = (record) => {
console.log(record) if (record.ThemeName)
if(record.ThemeName) TestPush({
TestPush({ theme: record.ThemeName,
theme:record.ThemeName, msgType: record.MsgType,
msgType:record.MsgType, tousers: record.PushGroup,
tousers:record.PushGroup, pushPath: record.item.AgentConfig ? record.item.AgentConfig.Url : '',
pushPath:record.item.AgentConfig.Url, msgTypeId: record.ID
msgTypeId:record.ID }).then(
}).then( res => {
res =>{ if (res.code === 0) {
if(res.code === 0){ message.success("测试推送成功")
message.success("测试推送成功") } else {
}else{ message.error(res.msg)
message.error(res.msg) }
} }
} )
)
} }
const DeleteProject = (record) => { const DeleteProject = (record) => {
let agen = record.item.AgentConfig let agen = record.item.AgentConfig
...@@ -158,21 +149,21 @@ const ProjectManage = () => { ...@@ -158,21 +149,21 @@ const ProjectManage = () => {
res3 => { res3 => {
if (res3.code === 0) { if (res3.code === 0) {
message.success("删除方案成功") message.success("删除方案成功")
setFlag(flag +1) setFlag(flag + 1)
} }
} }
) )
} }
} }
) )
}else{ } else {
DeleteMessageConfig({ DeleteMessageConfig({
id:config.ID id: config.ID
}).then( }).then(
res3 =>{ res3 => {
if(res3.code === 0){ if (res3.code === 0) {
message.success("删除方案成功") message.success("删除方案成功")
setFlag(flag +1) setFlag(flag + 1)
} }
} }
) )
...@@ -189,16 +180,18 @@ const ProjectManage = () => { ...@@ -189,16 +180,18 @@ const ProjectManage = () => {
setvisibleParams({ ...visibleParams, [key]: value }); setvisibleParams({ ...visibleParams, [key]: value });
}; };
const editModal = () => { const editModal = () => {
handleShowModal("editVisbile",false)
handleShowModal("editVisbile", false)
setFlag(flag + 1) setFlag(flag + 1)
} }
const bddModal = () => { const bddModal = () => {
handleShowModal("addVisbile",false) handleShowModal("addVisbile", false)
setFlag(flag + 1) setFlag(flag + 1)
} }
const onAddClick = () => { const onAddClick = () => {
setCurrentTempalte({}) setCurrentTempalte({})
handleShowModal("addVisible", true) // handleShowModal("addVisible", true)
history.push({ pathname: `/platformCenter/schemeDetail`, state: { template: {} } })
} }
const onTypeChange = (value) => { const onTypeChange = (value) => {
if (value == "全部") { if (value == "全部") {
...@@ -237,6 +230,7 @@ const ProjectManage = () => { ...@@ -237,6 +230,7 @@ const ProjectManage = () => {
res => { res => {
let mesList = [] let mesList = []
if (res.code === 0) { if (res.code === 0) {
console.log('res.data.MessageConfigModels', res.data.MessageConfigModels);
res.data.MessageConfigModels.map((item) => { res.data.MessageConfigModels.map((item) => {
mesList.push({ mesList.push({
name: item.MessageConfig.MsgType, name: item.MessageConfig.MsgType,
...@@ -248,7 +242,7 @@ const ProjectManage = () => { ...@@ -248,7 +242,7 @@ const ProjectManage = () => {
item: item item: item
}) })
}) })
console.log('mesList',mesList); console.log('mesList', mesList);
setDataList(mesList) setDataList(mesList)
} }
} }
...@@ -297,7 +291,7 @@ const ProjectManage = () => { ...@@ -297,7 +291,7 @@ const ProjectManage = () => {
</div> </div>
<div className={styles.list_view}> <div className={styles.list_view}>
<Table columns={columns} dataSource={dataList} pagination={{ pageSize: '10' }} rowKey='ID'/> <Table columns={columns} dataSource={dataList} pagination={{ pageSize: '10' }} rowKey='ID' />
</div> </div>
<EditModal <EditModal
visible={visibleParams.editVisible} visible={visibleParams.editVisible}
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
align-items: center; align-items: center;
.title { .title {
margin-left: 5px; margin-left: 18px;
margin-right: 5px; margin-right: 10px;
} }
} }
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
align-items: center; align-items: center;
.title { .title {
margin-left: 20px; margin-left: 25px;
margin-right: 5px; margin-right: 10px;
} }
} }
} }
......
...@@ -105,12 +105,13 @@ const EditModal = props => { ...@@ -105,12 +105,13 @@ const EditModal = props => {
console.log(form.getFieldValue()) console.log(form.getFieldValue())
let fv = form.getFieldValue() let fv = form.getFieldValue()
if (template.ThemeName) { if (template.ThemeName) {
console.log('fv.wx_template',fv.wx_template);
console.log('fv.push_mode.toString()',fv.push_mode.toString());
let a = { let a = {
ID: template.ID, ID: template.ID,
ThemeName: template.ThemeName, ThemeName: template.ThemeName,
MsgType: fv.name, MsgType: fv.name,
PublicTemplateID: fv.wx_template, PublicTemplateID: fv.wx_template.toString(),
PublicConfig: template.PublicConfig, PublicConfig: template.PublicConfig,
PublicPath: fv.h5_path, PublicPath: fv.h5_path,
MsgTemplateName: template.MsgTemplateName, MsgTemplateName: template.MsgTemplateName,
...@@ -157,6 +158,7 @@ const EditModal = props => { ...@@ -157,6 +158,7 @@ const EditModal = props => {
) )
} else { } else {
console.log('fv.push_mode.toString()',fv.push_mode.toString());
let b = { let b = {
ThemeName: "定时推送", ThemeName: "定时推送",
MsgType: fv.name, MsgType: fv.name,
...@@ -209,7 +211,6 @@ const EditModal = props => { ...@@ -209,7 +211,6 @@ const EditModal = props => {
} }
const onTypeChange = (value) => { const onTypeChange = (value) => {
console.log(value)
setCurrentTrench({ setCurrentTrench({
isAPPShow: value.indexOf("平台弹框") > -1 ? true : false, isAPPShow: value.indexOf("平台弹框") > -1 ? true : false,
isWXShow: value.indexOf("公众号推送") > -1 ? true : false, isWXShow: value.indexOf("公众号推送") > -1 ? true : false,
......
...@@ -6,6 +6,7 @@ import DayOfWeekSelect from './DayOfWeekSelect' ...@@ -6,6 +6,7 @@ import DayOfWeekSelect from './DayOfWeekSelect'
import styles from './VisibleIISAgentConfig.less' import styles from './VisibleIISAgentConfig.less'
import moment from 'moment' import moment from 'moment'
import { tr } from 'voca'; import { tr } from 'voca';
import {EditOutlined } from '@ant-design/icons';
const { Item } = Form; const { Item } = Form;
...@@ -25,7 +26,6 @@ const VisibleIISAgentConfig = props => { ...@@ -25,7 +26,6 @@ const VisibleIISAgentConfig = props => {
const [form] = Form.useForm(); const [form] = Form.useForm();
const dateFormat = 'YYYY-MM-DD HH:mm:ss'; const dateFormat = 'YYYY-MM-DD HH:mm:ss';
const { agentConfig, value, onIISAgentSubmit } = props const { agentConfig, value, onIISAgentSubmit } = props
useEffect(() => { useEffect(() => {
if (agentConfig) { if (agentConfig) {
form.setFieldsValue({ form.setFieldsValue({
...@@ -53,11 +53,13 @@ const VisibleIISAgentConfig = props => { ...@@ -53,11 +53,13 @@ const VisibleIISAgentConfig = props => {
} }
if(value){
form.setFieldsValue({ form.setFieldsValue({
name: value name: value
}) })
setSelectRole(props.value) setSelectRole(props.value)
}
}, [props]) }, [props])
...@@ -163,8 +165,7 @@ const VisibleIISAgentConfig = props => { ...@@ -163,8 +165,7 @@ const VisibleIISAgentConfig = props => {
return ( return (
<div className={styles.agent_container}> <div className={styles.agent_container}>
<Input value={selectRole} disabled={true} /> <Input value={selectRole} disabled={true} />
<div className={styles.select_btn} onClick={handleClick}>推送计划</div> <div className={styles.select_btn} onClick={handleClick}><EditOutlined style={{fontSize:'18px'}}/></div>
<SiteModal <SiteModal
{...props} {...props}
title="编辑定时任务" title="编辑定时任务"
...@@ -174,6 +175,7 @@ const VisibleIISAgentConfig = props => { ...@@ -174,6 +175,7 @@ const VisibleIISAgentConfig = props => {
destroyOnClose destroyOnClose
cancelText="取消" cancelText="取消"
okText="确认" okText="确认"
forceRender
visible={previewVisible} visible={previewVisible}
onOk={() => handleOk()} onOk={() => handleOk()}
confirmLoading={loading} confirmLoading={loading}
......
.agent_container { .agent_container {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
width: 80%;
.select_btn { .select_btn {
display: inline-block; display: inline-block;
color: #2f54eb;
cursor: pointer; cursor: pointer;
border-bottom: 1px solid #2f54eb; text-align: center;
width: 80px; padding: 0 0.8rem;
margin-left: 20px; color: rgba(22,133,255,1);
} }
.select_result {} .select_result {}
......
...@@ -24,7 +24,7 @@ const VisibleRoleModal = props => { ...@@ -24,7 +24,7 @@ const VisibleRoleModal = props => {
const [dataTree, setDataTree] = useState([]) const [dataTree, setDataTree] = useState([])
const [dataLeafs, setDataLeafs] = useState([]) const [dataLeafs, setDataLeafs] = useState([])
const [selectValues, setSelectValues] = useState([]) const [selectValues, setSelectValues] = useState([])
const { onSubmit, title, operate,initValues } = props const { onSubmit, title, operate, initValues, selectValue } = props
const GetRoleGroupList = () => { const GetRoleGroupList = () => {
...@@ -50,11 +50,11 @@ const VisibleRoleModal = props => { ...@@ -50,11 +50,11 @@ const VisibleRoleModal = props => {
// for (const id of initValues) { // for (const id of initValues) {
// if(id == roleItem.roleID){ // if(id == roleItem.roleID){
// leafNode.checked = true // leafNode.checked = true
// } // }
// } // }
return leafNode return leafNode
}) })
}) })
}) })
...@@ -66,6 +66,7 @@ const VisibleRoleModal = props => { ...@@ -66,6 +66,7 @@ const VisibleRoleModal = props => {
useEffect(() => { useEffect(() => {
setSelectRole(props.value) setSelectRole(props.value)
selectValue && setSelectRole(selectValue)
GetRoleGroupList() GetRoleGroupList()
}, []) }, [])
...@@ -110,7 +111,7 @@ const VisibleRoleModal = props => { ...@@ -110,7 +111,7 @@ const VisibleRoleModal = props => {
<SiteModal <SiteModal
{...props} {...props}
title={title ? `选择${title}` : "关联角色"} title={title && Object.prototype.toString.call(title) !== '[object Object]' ? `选择${title}` : "关联角色"}
bodyStyle={{ width: '100%', minHeight: '100px' }} bodyStyle={{ width: '100%', minHeight: '100px' }}
style={{ top: 200, borderRadius: '20px' }} style={{ top: 200, borderRadius: '20px' }}
width="800px" width="800px"
...@@ -124,7 +125,7 @@ const VisibleRoleModal = props => { ...@@ -124,7 +125,7 @@ const VisibleRoleModal = props => {
> >
<div className={styles.list_card}> <div className={styles.list_card}>
<ListCard {...props} onChange2={onChange2} data={dataTree} dataLeafs={dataLeafs} initValues={initValues}/> <ListCard {...props} onChange2={onChange2} data={dataTree} dataLeafs={dataLeafs} initValues={initValues} />
</div> </div>
</SiteModal> </SiteModal>
</div> </div>
...@@ -147,7 +148,7 @@ const checkChildrenByCondition = ( ...@@ -147,7 +148,7 @@ const checkChildrenByCondition = (
const ListCard = props => { const ListCard = props => {
const { onChange, onChange2, data, dataLeafs,initValues } = props const { onChange, onChange2, data, dataLeafs, initValues } = props
const [changedItem, setChangedItem] = useState({ item: {} }); const [changedItem, setChangedItem] = useState({ item: {} });
const [valueList, setValueList] = useState([]); const [valueList, setValueList] = useState([]);
...@@ -219,7 +220,7 @@ const ListCard = props => { ...@@ -219,7 +220,7 @@ const ListCard = props => {
} }
useEffect(() => { useEffect(() => {
initValues&&setValueList(initValues) initValues && setValueList(initValues)
}, []) }, [])
return ( return (
<div> <div>
......
.role_container { .role_container {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
width: 80%;
.select_btn { .select_btn {
display: inline-block; display: inline-block;
color: #2f54eb;
cursor: pointer; cursor: pointer;
border-bottom: 1px solid #2f54eb; text-align: center;
width: 80px; padding: 0 0.8rem;
margin-left: 20px; color: rgba(22,133,255,1);
} }
} }
.list_card{ .list_card{
......
...@@ -72,11 +72,8 @@ const TemplateManage = () => { ...@@ -72,11 +72,8 @@ const TemplateManage = () => {
setOption([]); setOption([]);
GetThirdpartyTemplates(obj).then(res => { GetThirdpartyTemplates(obj).then(res => {
if (res.msg==="Ok") { if (res.msg==="Ok") {
console.log(res.data);
setOption(res.data); setOption(res.data);
console.log(2)
} else { } else {
console.log(1);
notification.error({ notification.error({
message: '提示', message: '提示',
duration: 15, duration: 15,
......
This diff is collapsed.
.editModal_container{
width: 100%;
overflow-y: hidden;
height: calc(100% - 20px);
display: flex;
flex-direction: column;
button[ant-click-animating-without-extra-node]:after {
border: 0 none;
opacity: 0;
animation:none 0 ease 0 1 normal;
}
.content{
height: calc(100vh - 140px);
overflow-y: scroll;
}
.cardList{
display: flex;
flex-wrap: wrap;
.cardListItem{
width: 50%;
margin-bottom: 1rem;
}
}
.ant-card-bordered {
border-right: none;
}
.push_trench{
width: 100%;
height: fit-content;
display: flex;
flex-direction:row;
flex-wrap: wrap;
justify-content: space-between;
.trench_card{
margin-top: 1rem;
width: 49.2%;
border-width: 1px;
border-color: #EEEEEE;
border-style: solid;
border-radius: 5px;
display: flex;
flex-direction: column;
align-items: center;
background-color: #ffffff;
.card_title{
border-bottom-style: solid;
border-bottom-width: 1px;
border-bottom-color:#F6F7F9;
height:50px;
width: 100%;
display: flex;
flex-direction: row;
justify-content:space-between;
padding: 0 1.6rem;
align-items: center;
.lable{
font-size: large;
margin-left: 10px;
}
}
.card_body{
margin-top: 10px;
width: 100%;
padding: 10px;
height: 18rem;
display: flex;
flex-direction: column;
justify-content: center;
}
}
}
}
\ No newline at end of file
import React, { useState, useEffect, useCallback, useRef } from 'react'; import React, { useState, useEffect, useCallback, useRef } from 'react';
import { Form, Modal, Space, Divider, Radio, Checkbox } from 'antd'; import { Form, Modal, Space, Divider, Radio, Checkbox } from 'antd';
import {
} from '@/services/platform/bs' import styles from './standingBook.less'
import styles from './index.less'
import Sortable from 'sortablejs'; import Sortable from 'sortablejs';
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;
const AddModal = props => { const AddModal = props => {
const { callBackSubmit = () => { }, isType, formObj, visible, filed, characterValue, newCheckedList } = props; const { callBackSubmit = () => { }, isType, pickItem, visible, filed, characterValue, newCheckedList } = props;
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [value, setValue] = useState(''); const [value, setValue] = useState('');
const [checkValue, setCheckValue] = useState([]); const [checkValue, setCheckValue] = useState([]);
...@@ -19,10 +17,16 @@ const AddModal = props => { ...@@ -19,10 +17,16 @@ const AddModal = props => {
const [checkAll, setCheckAll] = useState([]); const [checkAll, setCheckAll] = useState([]);
const [selectData, setSelectData] = useState([]) const [selectData, setSelectData] = useState([])
let objArr = [] let objArr = []
const onChangeList = (list, index) => { const onChangeList = (list, index, title) => {
const checkedListArr = [...checkedList] const checkedListArr = [...checkedList]
checkedListArr[index] = list checkedListArr[index] = list
setCheckedList(checkedListArr); setCheckedList(checkedListArr);
const indeterminateArr = [...indeterminate]
const checkAllArr = [...checkAll]
indeterminateArr[index] = !!list.length && list.length < filed[title].length
checkAllArr[index] = list.length === filed[title].length
setIndeterminate(indeterminateArr)
setCheckAll(checkAllArr);
}; };
const onCheckAllChange = e => { const onCheckAllChange = e => {
...@@ -50,47 +54,37 @@ const AddModal = props => { ...@@ -50,47 +54,37 @@ const AddModal = props => {
} }
const onSubmit = () => { const onSubmit = () => {
isType === 'rule' ? callBackSubmit(`${value === '无' || value === '' ? '' : value + ','}${checkValue.join(',')}`) : callBackSubmit({ checkedList, str: selectData.join(",") }); isType === 'rule' ? callBackSubmit(`${value === '无' || value === '' ? '' : value + ','}${checkValue.join(',')}`) : callBackSubmit({ checkedList, str: selectData.join(","), pickItem });
}; };
useEffect(() => { useEffect(() => {
if (isType != '' && isType === 'rule') { if (isType != '') {
setValue(formObj.numerical)
setCheckValue(formObj.rule)
}
else if (isType === 'characteristics') {
let arr = Object.keys(filed) let arr = Object.keys(filed)
setTitle(arr) setTitle(arr)
console.log('arr', arr); let checkArr = []
let indeterminateArr = [] let indeterminateArr = []
let checkAllArr = [] let checkAllArr = []
arr.map((item, index) => { arr.map((item, index) => {
indeterminateArr.push(true) checkArr[index] = []
checkAllArr.push(false) newCheckedList.map(checkItem => {
if (filed[item].includes(checkItem)) {
checkArr[index].push(checkItem)
}
})
indeterminateArr.push(!!checkArr[index].length && checkArr[index].length < filed[item].length)
checkAllArr.push(checkArr[index].length === filed[item].length)
}) })
setCheckedList(newCheckedList) setCheckedList(checkArr)
setIndeterminate(indeterminateArr) setIndeterminate(indeterminateArr)
setCheckAll(checkAllArr) setCheckAll(checkAllArr)
let newArr = characterValue.length? characterValue.split(","):[] let newArr = characterValue.length ? characterValue.split(",") : []
setSelectData(newArr) setSelectData(newArr)
draftSort() draftSort()
} }
}, [visible]); }, [visible]);
//单选框变化时触发的事件
const handleChange = (e) => {
setValue(e.target.value)
if (e.target.value === '无') {
setCheckValue([])
}
}
//复选框变化时触发的事件
const onChange = (e) => {
setCheckValue(e)
if (e.length && value == '无') {
setValue('')
}
}
//拖拽初始化及逻辑 //拖拽初始化及逻辑
const draftSort = () => { const draftSort = () => {
let el = document.getElementById('doctor-drag-items'); let el = document.getElementById('doctor-drag-items');
...@@ -114,10 +108,10 @@ const AddModal = props => { ...@@ -114,10 +108,10 @@ const AddModal = props => {
<Modal <Modal
title={isType === 'rule' ? '选择验证规则' : '字段集选择'} title={isType === 'rule' ? '选择验证规则' : '字段集选择'}
bodyStyle={{ width: '100%', minHeight: '100px' }} bodyStyle={{ width: '100%', minHeight: '100px' }}
style={{ top: '160px' }} style={{ top: '10px' }}
width="700px" width="700px"
destroyOnClose destroyOnClose
centered ={true} centered={true}
maskClosable={false} maskClosable={false}
cancelText="取消" cancelText="取消"
okText="确认" okText="确认"
...@@ -127,30 +121,8 @@ const AddModal = props => { ...@@ -127,30 +121,8 @@ const AddModal = props => {
forceRender={true} forceRender={true}
getContainer={false} getContainer={false}
> >
{visible && isType === 'rule' && (
<> {visible && (
<Radio.Group onChange={handleChange} value={value}>
<Space direction="vertical">
<Radio value='无'>无(清空选中)</Radio>
<Radio value='number'>数值(number)</Radio>
<Radio value='digits'>整数(digits)</Radio>
<Radio value='email'>邮箱(email)</Radio>
<Radio value='identity'>身份证号(identity)</Radio>
<Radio value='mobile'>手机号(mobile)</Radio>
<Radio value='bankAccount'>银行卡号(bankAccount)</Radio>
<Radio value='timeControl'>时间控制(timeControl)</Radio>
</Space>
</Radio.Group>
<Checkbox.Group style={{ width: '100%', marginTop: '1rem' }} onChange={onChange} value={checkValue}>
<Space direction="vertical">
<Checkbox value="required">必填(required)</Checkbox>
<Checkbox value="emphasis">强调(emphasis)</Checkbox>
<Checkbox value="sensitive">敏感(sensitive)</Checkbox>
</Space>
</Checkbox.Group>
</>
)}
{visible && isType === 'characteristics' && (
<div className={styles.listCard}> <div className={styles.listCard}>
<div className={styles.cardItem} style={{ borderRight: '1px solid #99bbe8' }}> <div className={styles.cardItem} style={{ borderRight: '1px solid #99bbe8' }}>
<Divider orientation="left" style={{ margin: '0 0 10px 0', backgroundColor: '#dfe8f6' }}>待选字段列表</Divider> <Divider orientation="left" style={{ margin: '0 0 10px 0', backgroundColor: '#dfe8f6' }}>待选字段列表</Divider>
...@@ -158,7 +130,7 @@ const AddModal = props => { ...@@ -158,7 +130,7 @@ const AddModal = props => {
{title.map((item, index) => { {title.map((item, index) => {
return <div className={styles.cardItemData} key={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> <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)} /></div> <CheckboxGroup options={filed[item]} value={checkedList[index]} onChange={(e) => onChangeList(e, index, item)} /></div>
})} })}
</div> </div>
</div> </div>
......
This diff is collapsed.
This diff is collapsed.
.redText{
color: red;
cursor: pointer;
}
.ant-layout{
overflow: auto;
.ant-layout-content{
margin:12px !important;
}
}
.ant-btn > .anticon + span, .ant-btn > span + .anticon {
margin-left: 8px;
vertical-align: middle;
}
.siteTitle{
font-size: 16px;
margin: 0 0 6px 0;
user-select: none;
padding: 3px;
border-bottom: 1px solid #ccc;
}
.userManageContainer{
.ant-card-body{
padding-left: 0;
padding-right: 0;
}
.listItem{
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 400;
color: #414E65;
cursor: pointer;
line-height: 28px;
align-items: center;
padding: 8px 14px;
}
.pickItem{
background-color: #F5F6F9;
}
.ant-form-item {
vertical-align: top;
}
.ant-form-item-label > label {
align-items:middle;
}
.ant-modal-body{
padding-bottom:0px;
padding-right:40px;
padding-left:40px;
.ant-form{
width: 90%;
}
}
.anticon svg {
margin-top: -3px;
}
.ant-popover-message {
position: relative;
padding: 0px 0 0px;
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
}
.ant-tree-treenode{
width: 100% !important;
.ant-tree-node-content-wrapper{
display: inline-block;
width: 100%;
}
.iconWraper1{
float: right;
span{
display: none;
}
}
}
.ant-tree-treenode:hover{
.iconWraper1>span{
margin-left: 12px;
font-size: 18px;
display: inline-block;
}
}
.ant-radio-group {
margin: 0px !important;
}
.contentContainers{
display: flex;
width: 100%;
position: relative;
.ant-table.ant-table-bordered > .ant-table-container {
min-width: calc(100vw - 582px);
height: calc(100vh - 120px);
overflow-x: hidden;
border: none;
}
.orgContainer{
height: calc(100vh - 74px);
width: 340px;
left: 0;
top: 0;
overflow-x: hidden;
margin-right: 10px;
position: relative;
transition-property:width,left;
transition-duration: 0.5s;
white-space: nowrap;
.ant-tree{
padding-top: 6px;
.ant-tree-switcher{
line-height: 1;
margin-right: 0px !important;
color:#1890FF;
.ant-tree-switcher-line-icon{
margin-left: 5px;
}
}
}
.switcher{
display: block;
position: absolute;
font-size: 18px;
color: #1890FF!important;
top: 50%;
right: 2px;
transform: translate(0%,-50%);
z-index: 1;
}
}
.orgContainerHide{
// transform: translateX(-230px);
left: 0px;
top: 0;
width: 26px;
}
.ant-popover-message-title {
padding-left: 20px;
}
.userContainer{
height: calc(100vh - 74px) !important;
z-index: 999;
min-width: 800px;
background: white;
width: 100%;
position: relative;
transition: width 0.5s;
.title{
margin: 16px 0 10px 16px;
display: inline-block;
width: 270px;
cursor: pointer;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.ant-table-pagination{
padding-right: 12px;
background: white;
margin: 1px 0;
padding: 8px;
padding-right: 20px;
}
.ant-btn{
margin: 0px 10px;
.ant-btn-primary{
background: #50aefc;
}
}
.ant-input-search-button{
margin-left: 0px !important;
}
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
}
.ant-table-cell{
text-align:center;
overflow: hidden;
// text-overflow:ellipsis;
white-space: nowrap;
}
.ant-table-body{
height:calc(100vh - 210px);
border-right: white;
overflow: auto !important;
}
.clickRowStyle{
background: #cfe7fd;
}
.ant-pagination{
z-index: 999;
border-top: 1px solid #f0eded;
}
}
}
}
.ant-modal-root{
.ant-tree-switcher{
line-height: 1;
color:#1890FF;
margin-right: 0px !important;
}
.ant-checkbox-group .ant-checkbox-group-item {
margin-right: 0px !important;
min-width: 270px !important;
}
.ant-tree-list-holder{
overflow: auto;
overflow-x:hidden;
height: 40vh;
}
.ant-tabs-content-holder{
overflow: auto;
height: 50vh;
}
}
.ant-modal-content{
border-radius: 5px;
}
.ant-modal-header{
border-radius: 5px 5px 0 0;
padding: 28px 40px;
}
.ant-modal-close{
top:14px;
right:20px;
}
.ant-modal-footer{
border:none;
padding: 28px 40px;
}
.ant-modal-footer .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
margin-bottom: 0;
margin-left: 15px;
}
// .ant-form-horizontal .ant-form-item-control {
// margin-left: 10px;
// }
.linkDrowp{
position: absolute;
top: 0;
left: 94.6%;
width: 1rem;
height: 100%;
display: flex;
align-items: center;
}
.title{
display: flex;
align-items: center;
width: 100%;
}
.tip{
display: none;
}
.fs{
font-size: 18px;
margin-left: 10px;
}
.title:hover{
.tip{
display: flex;
align-items: center;
justify-content: flex-end;
width: 100%;
}
}
.titleText{
width: 12rem;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
}
.ant-popover-inner {
border-radius: 10px;
background-color: rgba(255, 255, 255, 0.788);
}
.ant-popover-inner-content {
padding: 10px 10px;
}
.ant-popover-message > .anticon {
top: 7.0005px
}
.listCard{
display: flex;
.cardItem{
padding: 0.5rem;
}
.cardContent{
height: 30rem;
overflow-y: scroll;
width: 19.5rem;
}
.cardItemData{
padding: 1rem;
border: 1px solid #b5b8c8;
margin-bottom: 1rem;
}
}
.sortable-ghost {
border-bottom: 2px dashed #1890ff;
}
.doctorTable {
margin-bottom: 16px;
table {
width: 100%;
td {
padding: 6px;
border: 1px solid #e8e8e8;
}
thead {
tr {
font-weight: 600;
background: #FAFAFA;
}
}
tbody{
tr:hover{
background-color:#ededed ;
}
}
}
}
.formData{
height: 38rem;
overflow-y: scroll;
.ant-form-item-label > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before{
display: none;
}
.formData_label{
display: flex;
align-items: center;
}
.filed_listItem{
display: flex;
height: 3.6rem;
.ant-btn-icon-only {
width: 32px;
height: 32px;
/* padding: 2.4px 0; */
font-size: 16px;
border-radius: 2px;
vertical-align: -1px;
display: flex;
align-items: center;
justify-content: center;
}
}
}
...@@ -38,15 +38,17 @@ import { USER_MODE } from '@/utils/constants'; ...@@ -38,15 +38,17 @@ import { USER_MODE } from '@/utils/constants';
import BaseFrameContainer from '@/components/BaseFrameContainer'; import BaseFrameContainer from '@/components/BaseFrameContainer';
import JumpContainer from '@/components/JumpContainer'; import JumpContainer from '@/components/JumpContainer';
import HostManager from '@/pages/platformCenter/hostmanager'; import HostManager from '@/pages/platformCenter/hostmanager';
import MessageManager from '@/pages/platformCenter/messageManage'; import MessageManager from '@/pages/platformCenter/messageManage'
import SchemeDetail from '@/pages/platformCenter/schemeDetail/schemeDetail'
import SchemeConfig from '@/pages/platformCenter/schemeConfig/schemeConfig'; import SchemeConfig from '@/pages/platformCenter/schemeConfig/schemeConfig';
import DimensionsConfig from '@/pages/platformCenter/dimensionsConfig/dimensionsConfig'; import DimensionsConfig from '@/pages/platformCenter/dimensionsConfig/dimensionsConfig';
import TaskScheduling from '@/pages/artificial/taskScheduling/taskScheduling'; import TaskScheduling from '@/pages/artificial/taskScheduling/taskScheduling';
import PoliciesIssued from '@/pages/artificial/policiesIssued/policiesIssued'; import PoliciesIssued from '@/pages/artificial/policiesIssued/policiesIssued';
import TableManager from '@/pages/platformCenter/bsmanager/tablemanager';
import FiledConfig from '@/pages/platformCenter/filedConfig/filedConfig';
import AuthControl from '@/pages/authcontrol'; import AuthControl from '@/pages/authcontrol';
import TableManager from '@/pages/platformCenter/bsmanager/tablemanager'
import StandingBook from '@/pages/platformCenter/standingBook/standingBook'
import FiledConfig from '@/pages/platformCenter/filedConfig/filedConfig'
// import ColConen from '@/components/Colophon/colContent'; // import ColConen from '@/components/Colophon/colContent';
const iconStyle = { verticalAlign: '0.125em' }; const iconStyle = { verticalAlign: '0.125em' };
...@@ -242,6 +244,12 @@ export default { ...@@ -242,6 +244,12 @@ export default {
name: '消息平台', name: '消息平台',
component: MessageManager, component: MessageManager,
}, },
{
path: '/platformCenter/SchemeDetail',
name: '模板编辑',
component: SchemeDetail,
hideMenu: true,
},
{ {
path: '/platformCenter/emq', path: '/platformCenter/emq',
name: '宿主管理', name: '宿主管理',
...@@ -267,6 +275,11 @@ export default { ...@@ -267,6 +275,11 @@ export default {
component: FiledConfig, component: FiledConfig,
hideMenu: true, hideMenu: true,
}, },
{
path: '/platformCenter/bsmanger/standingBook',
name: '台账管理',
component: StandingBook,
},
// { // {
// path: '/platformCenter/bsmanger/standbookmanager', // path: '/platformCenter/bsmanger/standbookmanager',
// name: '台账配置', // name: '台账配置',
......
import { CITY_SERVICE, get, PUBLISH_SERVICE, post, postForm } from '../index';
// 加载台账
export const GetCM_Ledger_LoadLedgers = query =>
get(`${PUBLISH_SERVICE}/WorkOrderCenter/GetCM_Ledger_LoadLedgers`, query);
// 加载台账表
export const GetCM_Ledger_LoadLedgerTable = query =>
get(`${PUBLISH_SERVICE}/WorkOrderCenter/GetCM_Ledger_LoadLedgerTable`, query);
// 查看对应台账
export const GetCMLedger_QueryLedgers = query =>
get(`${PUBLISH_SERVICE}/WorkOrderCenter/GetCMLedger_QueryLedgers`, query);
// 编辑或新增台账
export const GetCMLedger_OperateLedger = data =>
post(`${PUBLISH_SERVICE}/WorkOrderCenter/GetCMLedger_OperateLedger`, data);
// 删除台账
export const CM_Ledger_RmoveLedger = query =>
get(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Ledger_RmoveLedger`, query);
\ No newline at end of file
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