Browse Source

样式修改

dev
LUCAS 2 years ago
parent
commit
c1e23e70a3
  1. 15
      web/client/src/sections/fillion/components/maintenanceTable.js
  2. 15
      web/client/src/sections/fillion/components/patrolTable.js
  3. 3
      web/client/src/sections/fillion/components/protable.less

15
web/client/src/sections/fillion/components/maintenanceTable.js

@ -119,7 +119,7 @@ const DetailList = (props) => {
} }
}, },
{ {
title: '缺陷名称', title: '具体内容',
key: 'content', key: 'content',
dataIndex: 'content', dataIndex: 'content',
align: 'center' align: 'center'
@ -191,7 +191,14 @@ const DetailList = (props) => {
const PatrolNameList = (props) => { const PatrolNameList = (props) => {
const [users, setUsers] = useState([]); const [users, setUsers] = useState([]);
const { onChange, record, userList, loading } = props; const { onChange, record, userList, loading } = props;
const { name } = record || { name: '' } const [selectRoad, setSelectRoad] = useState();
useEffect(() => {
if (userList && userList instanceof Array && userList.length) {
setSelectRoad(userList[0].id)
// onChange(userList[0]);
}
}, [userList])
const columns = [ const columns = [
{ {
title: '巡更人员', title: '巡更人员',
@ -230,7 +237,7 @@ const PatrolNameList = (props) => {
loading={loading} loading={loading}
rowKey="name" rowKey="name"
rowClassName={(record) => { rowClassName={(record) => {
return record.patrolName === name ? styles['split-row-select-active'] : ''; return record.id == selectRoad ? 'list-row-actived' : '';
}} }}
toolBarRender={() => [ toolBarRender={() => [
<Input placeholder='输入养护人员名称' onChange={doUserNameSearch} ></Input> <Input placeholder='输入养护人员名称' onChange={doUserNameSearch} ></Input>
@ -242,7 +249,7 @@ const PatrolNameList = (props) => {
return { return {
onClick: () => { onClick: () => {
if (record) { if (record) {
console.log('record:', record) setSelectRoad(record.id);
onChange(record); onChange(record);
} }
}, },

15
web/client/src/sections/fillion/components/patrolTable.js

@ -122,7 +122,7 @@ const DetailList = (props) => {
} }
}, },
{ {
title: '缺陷名称', title: '具体内容',
key: 'content', key: 'content',
dataIndex: 'content', dataIndex: 'content',
align: 'center' align: 'center'
@ -194,7 +194,15 @@ const DetailList = (props) => {
const PatrolNameList = (props) => { const PatrolNameList = (props) => {
const [users, setUsers] = useState([]); const [users, setUsers] = useState([]);
const { onChange, record, userList, loading } = props; const { onChange, record, userList, loading } = props;
const { name } = record || { name: '' } const [selectRoad, setSelectRoad] = useState();
useEffect(() => {
if (userList && userList instanceof Array && userList.length) {
setSelectRoad(userList[0].id)
// onChange(userList[0]);
}
}, [userList])
const columns = [ const columns = [
{ {
title: '巡更人员', title: '巡更人员',
@ -232,7 +240,7 @@ const PatrolNameList = (props) => {
loading={loading} loading={loading}
rowKey="name" rowKey="name"
rowClassName={(record) => { rowClassName={(record) => {
return record.patrolName === name ? styles['split-row-select-active'] : ''; return record.id == selectRoad ? 'list-row-actived' : '';
}} }}
toolBarRender={() => [ toolBarRender={() => [
<Input placeholder='输入巡更人员名称' onChange={doUserNameSearch} ></Input> <Input placeholder='输入巡更人员名称' onChange={doUserNameSearch} ></Input>
@ -245,6 +253,7 @@ const PatrolNameList = (props) => {
onClick: () => { onClick: () => {
if (record) { if (record) {
// console.log('record:', record) // console.log('record:', record)
setSelectRoad(record.id);
onChange(record); onChange(record);
} }
}, },

3
web/client/src/sections/fillion/components/protable.less

@ -10,8 +10,9 @@
} }
.list-row-actived { .list-row-actived {
background-color: #7cafc6; background-color: #e2f6ff;
font-weight: 600; font-weight: 600;
color: #1E80FF
} }

Loading…
Cancel
Save