Commit 040b17ff authored by 皮倩雯's avatar 皮倩雯

fix: '修改视频平台界面样式'

parent 6ed0615d
Pipeline #46599 skipped with stages
......@@ -2,7 +2,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-03-04 18:33:24
* @LastEditTime: 2022-03-22 10:11:21
* @LastEditTime: 2022-03-24 17:41:25
* @LastEditors: leizhe
*/
import { Tree } from 'antd';
......@@ -23,10 +23,6 @@ export default props => {
}, [expandedKeys]);
const handleExpand = (keys, { expanded, node }) => {
console.log(keys);
console.log(expanded);
console.log(node);
console.log(keepTree);
if (keepTree && keepTree.indexOf(node.key) != -1 && epKeys.indexOf(node.key) == -1) {
setEpKeys([node.key]);
} else {
......@@ -39,10 +35,6 @@ export default props => {
};
const handleSelect = (keys, e) => {
console.log(keys);
console.log(e);
console.log(epKeys);
console.log(keepTree);
if (keepTree && keepTree.indexOf(keys[0]) != -1 && epKeys.indexOf(keys[0]) == -1) {
setEpKeys(keys);
} else {
......
......@@ -58,7 +58,7 @@ const ProxyConfig = () => {
if (res.code === 0) {
message.success('保存成功');
} else {
message.error('保存失败');
message.error(res.msg);
}
});
};
......@@ -78,20 +78,10 @@ const ProxyConfig = () => {
StartNginx().then(res => {
setLoading(false);
if (res.code === 0) {
// message.success('开启成功');
notification.success({
message: '提示',
duration: 15,
description: '开启成功',
});
message.success('开启成功');
setFlag(flag + 1);
} else {
// message.error('开启失败');
notification.error({
message: '提示',
duration: 15,
description: res.msg,
});
message.error(res.msg);
}
});
};
......@@ -101,18 +91,10 @@ const ProxyConfig = () => {
StopNginx().then(res => {
setLoading(false);
if (res.code === 0) {
notification.success({
message: '提示',
duration: 15,
description: '关闭成功',
});
message.success('关闭成功');
setFlag(flag + 1);
} else {
notification.error({
message: '提示',
duration: 15,
description: res.msg,
});
message.error(res.msg);
}
});
};
......
......@@ -99,7 +99,7 @@ const ProjectManage = props => {
dataIndex: 'type',
align: 'center',
key: 'type',
render: (text, record) => <div>{text === null ? '-' : text}</div>,
render: (text, record) => <div>{text === null || !text ? '-' : text}</div>,
},
{
title: '推送方式',
......@@ -117,7 +117,7 @@ const ProjectManage = props => {
}),
render: (text, record) => (
<span>
{text === null ? (
{text === null || !text ? (
'-'
) : (
<Tooltip placement="topLeft" title={text}>
......@@ -144,7 +144,7 @@ const ProjectManage = props => {
}),
render: (text, record) => (
<span>
{text === null ? (
{text === null || !text ? (
'-'
) : (
<Tooltip placement="topLeft" title={text}>
......
......@@ -135,14 +135,14 @@ const TemplateManage = () => {
dataIndex: 'type',
key: 'type',
align: 'center',
render: text => <span>{text == null ? '-' : text}</span>,
render: text => <span>{text == null || !text ? '-' : text}</span>,
},
{
title: '第三方模板名称',
dataIndex: 'third_name',
key: 'third_name',
align: 'center',
render: text => <span>{text == null ? '-' : text}</span>,
render: text => <span>{text == null || !text ? '-' : text}</span>,
},
{
title: '企业微信ID',
......@@ -160,7 +160,7 @@ const TemplateManage = () => {
}),
render: (text, record) => (
<span>
{text === null ? (
{text === null || !text ? (
'-'
) : (
<Tooltip placement="topLeft" title={text}>
......@@ -187,7 +187,7 @@ const TemplateManage = () => {
}),
render: (text, record) => (
<span>
{text === null ? (
{text === null || !text ? (
'-'
) : (
<Tooltip placement="topLeft" title={text}>
......@@ -213,7 +213,7 @@ const TemplateManage = () => {
}),
render: (text, record) => (
<span>
{text === null ? (
{text === null || !text ? (
'-'
) : (
<Tooltip placement="topLeft" title={text}>
......@@ -239,7 +239,7 @@ const TemplateManage = () => {
}),
render: (text, record) => (
<span>
{text === null ? (
{text === null || !text ? (
'-'
) : (
<Tooltip placement="topLeft" title={text}>
......@@ -265,7 +265,7 @@ const TemplateManage = () => {
}),
render: (text, record) => (
<span>
{text === null ? (
{text === null || !text ? (
'-'
) : (
<Tooltip placement="topLeft" title={text}>
......@@ -292,7 +292,7 @@ const TemplateManage = () => {
}),
render: (text, record) => (
<span>
{text === null ? (
{text === null || !text ? (
'-'
) : (
<Tooltip placement="topLeft" title={text}>
......
......@@ -60,10 +60,21 @@ const AddModal = props => {
return (
<SiteModal
{...props}
title="模板添加"
title={
<span>
<span style={{ marginRight: '20px' }}>
<span>模板添加</span>
</span>
<span style={{ fontSize: '14px' }}>当前解析版本规则</span>
<span style={{ color: 'rgb(24, 144, 255)' }}>{messageVersion}</span>
</span>
}
style={{ top: 200, borderRadius: '20px' }}
width="820px"
destroyOnClose
afterClose={() => {
form.resetFields();
}}
cancelText="取消"
okText="确认"
onOk={() => onSubmit()}
......@@ -116,7 +127,7 @@ const AddModal = props => {
<Row>
<Col span={12}>
<Item
label="请选择第三方模板名称"
label="第三方模板名称"
name="third_name"
wrapperCol={{ span: 12 }}
labelCol={{ span: 12 }}
......@@ -166,7 +177,7 @@ const AddModal = props => {
<Row>
<Col span={12}>
<Item
label="请选择第三方模板名称"
label="第三方模板名称"
wrapperCol={{ span: 12 }}
labelCol={{ span: 12 }}
name="third_name"
......@@ -222,16 +233,7 @@ const AddModal = props => {
placeholder="first: 标题信息|Second: 展示内容|Third: 时间|Four: 备注信息"
/>
</Item>
<Item
label={
<>
<span>当前解析规则版本</span>
<span>{messageVersion}</span>
</>
}
name="analysis_params"
labelCol={{ span: 6 }}
>
<Item label="解析规则版本(仅针对1.0规则)" name="analysis_params" labelCol={{ span: 6 }}>
<TextArea rows={2} style={{ width: '95%' }} placeholder="param1|param2|param3|param4" />
</Item>
</Form>
......
......@@ -39,7 +39,7 @@ const EditModal = props => {
if (option) {
setTemplateName(option.filter(item => item.Type === props.template.type));
}
}, [props.template]);
}, [props.template, visible]);
const layout = {
layout: 'horizontal',
......@@ -71,11 +71,22 @@ const EditModal = props => {
return (
<SiteModal
{...props}
title="模板编辑"
title={
<span>
<span style={{ marginRight: '20px' }}>
<span>模板编辑</span>
</span>
<span style={{ fontSize: '14px' }}>当前解析版本规则</span>
<span style={{ color: 'rgb(24, 144, 255)' }}>{messageVersion}</span>
</span>
}
bodyStyle={{ width: '100%', minHeight: '100px' }}
style={{ top: 200, borderRadius: '20px' }}
width="820px"
destroyOnClose
afterClose={() => {
form.resetFields();
}}
cancelText="取消"
okText="确认"
onOk={() => onSubmit()}
......@@ -239,12 +250,7 @@ const EditModal = props => {
/>
</Item>
<Item
label={
<>
<span>当前解析规则版本</span>
<span>{messageVersion}</span>
</>
}
label="当前解析规则版本(仅针对1.0规则)"
labelCol={{ span: 6 }}
name="analysis_params"
>
......
......@@ -58,7 +58,20 @@ const videoManager = () => {
key: 'Name',
width: 200,
align: 'center',
render: item => searchStyle(item),
onCell: () => ({
style: {
maxWidth: 200,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer',
},
}),
render: item => (
<Tooltip placement="topLeft" title={item}>
{searchStyle(item)}
</Tooltip>
),
},
{
title: '视频厂商',
......@@ -75,18 +88,18 @@ const videoManager = () => {
align: 'center',
render: item => searchStyle(item),
},
{
title: '登录密码',
dataIndex: 'LoginPwd',
key: 'LoginPwd',
width: 350,
align: 'center',
},
// {
// title: '登录密码',
// dataIndex: 'LoginPwd',
// key: 'LoginPwd',
// width: 350,
// align: 'center',
// },
{
title: '设备编码',
dataIndex: 'EquipmentCode',
key: 'EquipmentCode',
width: 150,
width: 200,
align: 'center',
render: item => searchStyle(item),
},
......@@ -94,15 +107,43 @@ const videoManager = () => {
title: '通道ID',
dataIndex: 'PassageId',
key: 'PassageId',
width: 100,
width: 150,
align: 'center',
onCell: () => ({
style: {
maxWidth: 150,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer',
},
}),
render: item => (
<Tooltip placement="topLeft" title={item}>
{item}
</Tooltip>
),
},
{
title: '刻录机名称',
dataIndex: 'RecorderName',
key: 'RecorderName',
width: 100,
width: 150,
align: 'center',
onCell: () => ({
style: {
maxWidth: 150,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer',
},
}),
render: item => (
<Tooltip placement="topLeft" title={item}>
{item}
</Tooltip>
),
},
{
// title: '录入时间',
......@@ -272,6 +313,7 @@ const videoManager = () => {
VideoType: type,
pageIndex: 1,
pageSize: 1000,
QueryWhere: searchWord,
}).then(res => {
setLoading(false);
if (res.msg === 'Ok') {
......@@ -389,6 +431,7 @@ const videoManager = () => {
</Row>
<Spin spinning={loading} tip="loading">
<div className={styles.table}>
{tableData.length > 0 ? (
<Table
size="small"
bordered
......@@ -410,6 +453,29 @@ const videoManager = () => {
showSizeChanger: true,
}}
/>
) : (
<Table
size="small"
bordered
rowKey={record => record.Id}
columns={columns}
dataSource={tableData}
scroll={{ y: 'calc(100vh - 116px)', x: 'max-content' }}
onRow={record => ({
onDoubleClick: event => {
event.stopPropagation();
edit(record);
}, // 双击
})}
pagination={{
showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条`,
pageSizeOptions: [10, 20, 50, 100],
defaultPageSize: 20,
showQuickJumper: true,
showSizeChanger: true,
}}
/>
)}
</div>
</Spin>
<AddModal
......
......@@ -532,6 +532,7 @@ const UserManage = () => {
// 点击树节点,获取当前机构下所有用户
const onSelect = (props, e) => {
console.log(props);
if (e) {
props[0] = e.node.key;
} else {
......
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