页面搭建

lsf-dev
xielei 2024-09-27 17:52:34 +08:00
parent 12125356f0
commit c93f08e0d0
6 changed files with 33 additions and 36 deletions

View File

@ -223,6 +223,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
onDrop={(info) => { console.log(info.dataTransfer.files); }}
fileList={fileList}
disabled={loading}
maxCount={1}
// onSuccess={handleSuccess}
>
<p className="ant-upload-text">点击或拖拽文件到此区域上传</p>

View File

@ -48,7 +48,7 @@ const Page = () => {
title: '施行日期', key: 'implementationDate', dataIndex: 'implementationDate'
},
{
title: '上传时间', key: 'eventsDesc', dataIndex: 'eventsDesc'
title: '上传时间', key: 'uploadDate', dataIndex: 'uploadDate'
},
{
title: '附件', key: 'files', dataIndex: 'files',render:(v,r)=><a onClick={()=>download(v[0].fileId,v[0]?.fileName)}><PaperClipOutlined />{v[0]?.fileName}</a>

View File

@ -76,7 +76,7 @@ const basicData = [
},
{
label: '违法时间',
key: 'IllegalDate',
key: 'illegalDate',
type: 'DatePicker',
span: 12
},

View File

@ -48,7 +48,7 @@ const Page = ({ mode, onCrudSuccess,record,submit }) => {
...formData,
...e,
caseDate: dayjs(e.caseDate).format("YYYY-MM-DD HH:mm:ss"),
IllegalDate: e.IllegalDate ? dayjs(e.IllegalDate).format("YYYY-MM-DD HH:mm:ss") : e.IllegalDate,
illegalDate: e.illegalDate ? dayjs(e.v).format("YYYY-MM-DD HH:mm:ss") : e.illegalDate,
}
if (mode == 'save') {
@ -89,12 +89,12 @@ const Page = ({ mode, onCrudSuccess,record,submit }) => {
if(res.data?.caseDate){
obj.caseDate=dayjs(res.data.caseDate)
}
// if(res.data?.illegalDate){
// obj.illegalDate=dayjs(res.data.illegalDate)
// }
if(res.data.IllegalDate){
obj.IllegalDate = dayjs(res.data.IllegalDate)
if(res.data?.illegalDate){
obj.illegalDate=dayjs(res.data.illegalDate)
}
// if(res.data.IllegalDate){
// obj.IllegalDate = dayjs(res.data.IllegalDate)
// }
setFormData({...res.data,...obj})
})

View File

@ -178,6 +178,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
onDrop={(info) => { console.log(info.dataTransfer.files); }}
fileList={fileList}
disabled={loading}
maxCount={1}
// onSuccess={handleSuccess}
>
<p className="ant-upload-text">点击或拖拽文件到此区域上传</p>

View File

@ -1,3 +1,8 @@
import { Space } from 'antd';
import one from '../../../assets/img/u0.png'
// const one = `${process.env.PUBLIC_URL}/assets/img/u0.png`;
console.log(one);
const getBackground = () => {
return {
type: 'linear',
@ -100,6 +105,12 @@ export default function jgOption() {
//layerPadding: 30,//连接线长度 (发现没用)
symbol: 'circle', //图形形状 rect方形 roundRect圆角 emptyCircle圆形 circle实心圆
symbolSize: 14, //状态大小
symbol: function(value, params) {
console.log("params", value, params);
// params.data节点的所有数据
return "image://" + require("../../../assets/img/u0.png");
},
edgeShape: 'polyline', //线条类型 curve曲线
initialTreeDepth: 1, //初始展开的层级
expandAndCollapse: true,//子树折叠和展开的交互,默认打开
@ -123,41 +134,25 @@ export default function jgOption() {
borderWidth: 1, // 文字块边框宽度
borderType: 'solid', // 文字块边框描边类型 solid dashed dotted
borderRadius: 2, // 文字块的圆角
padding: [6, 6], // 文字块内边距
padding: [0,0,0, 0], // 文字块内边距
shadowColor: 'rgba(0,121,221,0.3)', // 文字块的背景阴影颜色
shadowBlur: 6, // 文字块的背景阴影长度
formatter: (params) => {
let newName = ''
let len = params.data.name.length
let strLen = params.data.relationType === 0 ? 100 : 1 //一行显示几个字
let rowNum = Math.ceil(len / strLen)
if (len > strLen) {
for (let p = 0; p < rowNum; p++) {
let tempStr = ''
let start = p * strLen
let end = start + strLen
if (p == rowNum - 1) {
tempStr = params.data.name.substring(start, len)
} else {
tempStr = params.data.name.substring(start, end) + '\n'
}
newName += tempStr
}
} else {
newName = params.data.name
}
let n = newName
if (n.length > 16) {
n = n.slice(0, 16) + '...'
}
let str = `{name|${n}}`
let isMain = params.data.relationType === 0
str = isMain ? `{name|${n}} {current|本企业} {main|总部}` : str
let t = params.data.name
let str = [`{name|}${t}`].join('\n')
return str
},
rich: {
b:{
fontSize: 14,
},
name: {
fontSize: 14
fontSize: 14,
padding:[0,0,0,5],
backgroundColor:{
image:one,
},
},
current: {
fontSize: 12,