Commit e8113108 authored by 皮倩雯's avatar 皮倩雯

fix: 'web配置新增网站增加功能标签配置'

parent f5a738ac
Pipeline #50996 passed with stages
in 7 minutes 23 seconds
...@@ -97,6 +97,7 @@ const AddModal = props => { ...@@ -97,6 +97,7 @@ const AddModal = props => {
'二维码识别', '二维码识别',
'设备二维码', '设备二维码',
'位置坐标', '位置坐标',
'富文本',
]); ]);
const [visible, setVisible] = useState(false); // 弹窗 const [visible, setVisible] = useState(false); // 弹窗
const [isShow, setIsShow] = useState(false); // 弹窗 const [isShow, setIsShow] = useState(false); // 弹窗
......
...@@ -91,6 +91,15 @@ const WebDic = () => { ...@@ -91,6 +91,15 @@ const WebDic = () => {
title: () => <span className={styles.font}>名称</span>, title: () => <span className={styles.font}>名称</span>,
dataIndex: 'nodeName', dataIndex: 'nodeName',
key: 'nodeName', key: 'nodeName',
onCell: () => ({
style: {
maxWidth: 350,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'auto',
},
}),
// render: item => searchStyle(item), // render: item => searchStyle(item),
render: record => ( render: record => (
<Tooltip placement="topLeft" title={record}> <Tooltip placement="topLeft" title={record}>
...@@ -103,6 +112,11 @@ const WebDic = () => { ...@@ -103,6 +112,11 @@ const WebDic = () => {
key: 'action', key: 'action',
width: 100, width: 100,
align: 'center', align: 'center',
onCell: () => ({
style: {
cursor: ' auto',
},
}),
render: record => ( render: record => (
<Space> <Space>
<Tooltip title="编辑"> <Tooltip title="编辑">
...@@ -157,7 +171,7 @@ const WebDic = () => { ...@@ -157,7 +171,7 @@ const WebDic = () => {
key: 'ID', key: 'ID',
width: 60, width: 60,
align: 'center', align: 'center',
className: 'column', // className: 'column',
render: (text, record, index) => ( render: (text, record, index) => (
<Space> <Space>
<span>{index + 1}</span> <span>{index + 1}</span>
...@@ -168,14 +182,14 @@ const WebDic = () => { ...@@ -168,14 +182,14 @@ const WebDic = () => {
title: () => <span className={styles.font}>名称</span>, title: () => <span className={styles.font}>名称</span>,
dataIndex: 'nodeName', dataIndex: 'nodeName',
key: 'nodeName', key: 'nodeName',
className: 'column', // className: 'column',
onCell: () => ({ onCell: () => ({
style: { style: {
maxWidth: 200, maxWidth: 200,
overflow: 'hidden', overflow: 'hidden',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
cursor: 'pointer', cursor: ' auto',
}, },
}), }),
render: record => ( render: record => (
...@@ -189,14 +203,14 @@ const WebDic = () => { ...@@ -189,14 +203,14 @@ const WebDic = () => {
dataIndex: 'nodeValue', dataIndex: 'nodeValue',
key: 'nodeValue', key: 'nodeValue',
// width: 400, // width: 400,
className: 'column', // className: 'column',
onCell: () => ({ onCell: () => ({
style: { style: {
maxWidth: 300, maxWidth: 300,
overflow: 'hidden', overflow: 'hidden',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
cursor: 'pointer', cursor: ' auto',
}, },
}), }),
render: record => { render: record => {
...@@ -214,8 +228,13 @@ const WebDic = () => { ...@@ -214,8 +228,13 @@ const WebDic = () => {
title: () => <span className={styles.font}>操作</span>, title: () => <span className={styles.font}>操作</span>,
key: 'action', key: 'action',
width: 100, width: 100,
className: 'column', // className: 'column',
align: 'center', align: 'center',
onCell: () => ({
style: {
cursor: ' auto',
},
}),
render: record => ( render: record => (
<Space> <Space>
<Tooltip title="编辑"> <Tooltip title="编辑">
...@@ -929,13 +948,22 @@ const WebDic = () => { ...@@ -929,13 +948,22 @@ const WebDic = () => {
{/* 一级条目 表格 */} {/* 一级条目 表格 */}
<DragTable <DragTable
size="small" size="small"
ItemTypes="first"
bordered
rowKey={record => record.nodeID} rowKey={record => record.nodeID}
columns={columns} columns={columns}
dataSource={data}
scroll={{ y: 'calc(100vh - 370px)' }}
bordered
dragCallBack={dragCallBack} dragCallBack={dragCallBack}
className={styles.pab} className={styles.pab}
dataSource={data}
scroll={{ y: 'calc(100vh - 370px)' }}
rowClassName={record => setRowClassName(record.nodeID)}
onClick={record => {
getData(record.nodeID);
setSelect(record);
setSelectColor(record.nodeID);
setSelectID(record.nodeID);
setName(record.nodeName);
}}
title={() => ( title={() => (
<div> <div>
<span>一级条目</span> <span>一级条目</span>
...@@ -952,15 +980,6 @@ const WebDic = () => { ...@@ -952,15 +980,6 @@ const WebDic = () => {
</Tooltip> </Tooltip>
</div> </div>
)} )}
rowClassName={record => setRowClassName(record.nodeID)}
onClick={record => {
getData(record.nodeID);
setSelect(record);
setSelectColor(record.nodeID);
setSelectID(record.nodeID);
setName(record.nodeName);
}}
ItemTypes="first"
pagination={false} pagination={false}
/> />
</Col> </Col>
......
...@@ -62,4 +62,10 @@ ...@@ -62,4 +62,10 @@
max-width: 98%; max-width: 98%;
margin-left: 2%; margin-left: 2%;
} }
.ant-table-cell > div {
overflow: hidden;
max-width: 350px;
white-space: nowrap;
text-overflow: ellipsis;
}
} }
...@@ -246,6 +246,16 @@ export default props => { ...@@ -246,6 +246,16 @@ export default props => {
))} ))}
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item label="功能标签" name="mdi">
<Select placeholder="请选择功能标签">
<Option value="MDI" key="0">
多标签模式
</Option>
<Option value="SDI" key="1">
单标签模式
</Option>
</Select>
</Form.Item>
<Form.Item label="二维码地址" name="qrcode"> <Form.Item label="二维码地址" name="qrcode">
<Input placeholder="请输入二维码地址" autoComplete="off" /> <Input placeholder="请输入二维码地址" autoComplete="off" />
</Form.Item> </Form.Item>
......
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