Browse Source

feat:fix bugs

master
zhaobing 9 months ago
parent
commit
e47be27a6e
  1. 4
      api/app/lib/controllers/bigScreen/leader.js
  2. 4
      web-screen/client/src/layout/components/header/index.js
  3. 72
      web-screen/client/src/sections/bigScreen/components/error/style.less
  4. 4
      web-screen/client/src/sections/bigScreen/components/inspection/left.js
  5. 2
      web-screen/client/src/sections/bigScreen/components/leader/index.js
  6. 2
      web-screen/client/src/sections/bigScreen/components/leader/left.js
  7. 4
      web-screen/client/src/sections/bigScreen/components/run/style.less
  8. 2
      web-screen/client/src/sections/bigScreen/components/style.less

4
api/app/lib/controllers/bigScreen/leader.js

@ -212,8 +212,10 @@ async function devicesGuarantee(ctx) {
// where: searchWhere, // where: searchWhere,
order: [["id", "desc"]], order: [["id", "desc"]],
include: [{ include: [{
required:true,
model: models.PointDevice, model: models.PointDevice,
include: { include: {
required:true,
model: models.Point, model: models.Point,
where: { projectId: { $in: projectId.split(',') } } where: { projectId: { $in: projectId.split(',') } }
} }
@ -332,8 +334,10 @@ async function getCenterData(ctx) {
// where: searchWhere, // where: searchWhere,
order: [["id", "desc"]], order: [["id", "desc"]],
include: [{ include: [{
required:true,
model: models.PointDevice, model: models.PointDevice,
include: { include: {
required:true,
model: models.Point, model: models.Point,
where: { projectId: { $in: projectId.split(',') } } where: { projectId: { $in: projectId.split(',') } }
} }

4
web-screen/client/src/layout/components/header/index.js

@ -38,14 +38,14 @@ const Header = props => {
fontSize: '1.875rem', fontSize: '1.875rem',
color: ' #FFFFFF', color: ' #FFFFFF',
fontWeight: 600, fontWeight: 600,
fontFamily: 'PangMenZhengDao', fontFamily: ' PangMenZhengDaoBiaoTiTi',
letterSpacing: '.5231rem', letterSpacing: '.5231rem',
width:'39rem' width:'39rem'
} }
let headerTabStyle = { let headerTabStyle = {
width: '4.375rem', width: '4.375rem',
height: '1.125rem', height: '1.125rem',
fontFamily: 'PangMenZhengDao', fontFamily: ' PangMenZhengDaoBiaoTiTi',
fontSize: '1.125rem', fontSize: '1.125rem',
color: '#CCE6FF', color: '#CCE6FF',
letterSpacing: '.0231rem' letterSpacing: '.0231rem'

72
web-screen/client/src/sections/bigScreen/components/error/style.less

@ -12,7 +12,7 @@
background-size: 100% 100%; background-size: 100% 100%;
height: 2.6875rem; height: 2.6875rem;
width: 100%; width: 100%;
font-family: PangMenZhengDao; font-family: PangMenZhengDaoBiaoTiTi;
font-size: 1.125rem; font-size: 1.125rem;
// color: #CCE6FF; // color: #CCE6FF;
letter-spacing: .0231rem; letter-spacing: .0231rem;
@ -142,25 +142,52 @@
.ant-table-thead > tr > th { .ant-table-thead > tr > th {
background-color: green; background-color: green;
} }
.ant-input-affix-wrapper{
// .ant-input-affix-wrapper{
// background-color: #00508D !important;
// >input{
// background-color: #00508D;
// }
// }
body > div:nth-child(5) > div >div.ant-select-dropdown{
background-color: #00508D !important; background-color: #00508D !important;
>input{ }
background-color: #00508D;
}
}
#patrol-record{ #patrol-record{
.ant-select{ div.ant-table-wrapper > div > div > ul > li.ant-pagination-options > div >div.ant-select-selector{
.ant-select-selector{
background-color: #00508D !important; background-color: #00508D !important;
border-color: #00508D !important;
} }
} > div:nth-child(1) > div > div>div.ant-select-selector{
background-color: #00508D !important;
border-color: #00508D !important;
}
// .ant-select{
// .ant-select-selector{
// background-color: #00508D !important;
// }
// }
} }
.ant-select-dropdown{ // .ant-select-dropdown{
background-color: #00508D !important; // background-color: #00508D !important;
} // }
#patrol-record{ #patrol-record{
div:nth-child(1) > div > span{
background-color: #00508D !important;
border-color: #00508D !important;
>input{
background-color: #00508D !important;
border-color: #00508D !important;
}
}
.ant-table-wrapper{ .ant-table-wrapper{
.ant-table-container{ .ant-table-container{
.ant-table-header{ .ant-table-header{
@ -191,31 +218,46 @@
background-color: transparent; background-color: transparent;
background: transparent; background: transparent;
color: #FFFFFF; color: #FFFFFF;
font-family: PangMenZhengDao; font-family: PangMenZhengDaoBiaoTiTi;
font-size: 1.125rem; font-size: 1.125rem;
border-bottom:2px solid transparent; border-bottom:2px solid transparent;
} }
.ant-table-cell-scrollbar:not([rowspan]){ .ant-table-cell-scrollbar:not([rowspan]){
box-shadow: 0 1px 0 1px transparent; box-shadow: 0 1px 0 1px transparent;
} }
.ant-table-tbody > tr.ant-table-row:hover > td, .ant-table-tbody > tr > td.ant-table-cell-row-hover{ .ant-table-tbody > tr.ant-table-row:hover > td, .ant-table-tbody > tr :hover{
background-image: linear-gradient(360deg, #0080ff4d 0%, #0080ff33 58%, #0080ff4d 100%); // background-image: linear-gradient(360deg, #0080ff4d 0%, #0080ff33 58%, #0080ff4d 100%);
background-color: #00508D;
// background-image: linear-gradient(180deg, #0080ff4d 0%, #0080ff33 58%, #0080ff4d 100%);
border-bottom:1px solid #0080ff;
border-top:1px solid #0080ff;
} }
} }
#patrol-record > div.ant-table-wrapper > div > div > div > div > div.ant-table-body > table > tbody > tr{ #patrol-record > div.ant-table-wrapper > div > div > div > div > div.ant-table-body > table > tbody > tr{
background-color: #00508D background-color: #00508D
// background-image: linear-gradient(180deg, #0080ff4d 0%, #0080ff33 58%, #0080ff4d 100%);
} }
#patrol-record { #patrol-record {
.ant-pagination-item-link{ .ant-pagination-item-link{
color:#fff ; color:#fff ;
background-color: #00508D; background-color: #00508D;
border-color: #00508D !important;
} }
.ant-pagination-item{ .ant-pagination-item{
color:#fff ; color:#fff ;
background-color: #00508D; background-color: #00508D;
border-color: #00508D !important;
} }
div.ant-table-wrapper > div > div > ul > li.ant-pagination-options > div > div.ant-select-selector > span.ant-select-selection-item{
color: #1890ff;
}
} }

4
web-screen/client/src/sections/bigScreen/components/inspection/left.js

@ -90,10 +90,8 @@ const Left = props => {
}) })
//计算比例 //计算比例
Object.values(repairObject).forEach(item => { Object.values(repairObject).forEach(item => {
console.log('item',item)
repair.push(item.quests === 0 ? 0 : Number((item.done / item.quests * 100).toFixed(2))); repair.push(item.quests === 0 ? 0 : Number((item.done / item.quests * 100).toFixed(2)));
}); });
console.log('x1111',repair,cRate)
setRRate(repair) setRRate(repair)
} }
} }
@ -138,6 +136,7 @@ const Left = props => {
} }
} }
if(data.length>10){ if(data.length>10){
setRank(data.slice(0,10)) setRank(data.slice(0,10))
}else{ }else{
setRank(data) setRank(data)
@ -181,6 +180,7 @@ const Left = props => {
} }
const topClick=(e)=>{ const topClick=(e)=>{
console.log('2222',e)
switch (e) { switch (e) {
case 'perBottom': case 'perBottom':
const rs=rankCopy.sort((a,b)=>b.patrolRecordCount-a.patrolRecordCount) const rs=rankCopy.sort((a,b)=>b.patrolRecordCount-a.patrolRecordCount)

2
web-screen/client/src/sections/bigScreen/components/leader/index.js

@ -17,7 +17,7 @@ const Leader = (props) => {
fontSize:'1.2rem', fontSize:'1.2rem',
fontStyle:'italic', fontStyle:'italic',
color:'#E5F1FF', color:'#E5F1FF',
fontFamily: '思源黑体', fontFamily: 'SourceHanSansCN-Regular',
} }
const centerNumFontStyle={ const centerNumFontStyle={

2
web-screen/client/src/sections/bigScreen/components/leader/left.js

@ -21,7 +21,7 @@ const Left = props => {
const [months, setMonths] = useState([]) const [months, setMonths] = useState([])
const [period, setPeriod] = useState('week') const [period, setPeriod] = useState('week')
const [rank,setRank]=useState([]) const [rank,setRank]=useState([])
const [state, setState] = useState(0) const [state, setState] = useState(1)
const [rankCopy,setRankCopy]=useState([])//用于排序(巡检次数) const [rankCopy,setRankCopy]=useState([])//用于排序(巡检次数)
const { bigScreen } = actions const { bigScreen } = actions
// const questFontColor = { color: '#8f7a49' } //有问题的颜色 // const questFontColor = { color: '#8f7a49' } //有问题的颜色

4
web-screen/client/src/sections/bigScreen/components/run/style.less

@ -21,7 +21,7 @@
.title { .title {
// width: 122px; // width: 122px;
height: 1.3125rem; height: 1.3125rem;
font-family: PangMenZhengDao; font-family: PangMenZhengDaoBiaoTiTi;
font-size: 1.3125rem; font-size: 1.3125rem;
color: #ffffff; color: #ffffff;
// letter-spacing: 0.95px; // letter-spacing: 0.95px;
@ -201,7 +201,7 @@
display: flex; display: flex;
padding-left: 3.375rem; padding-left: 3.375rem;
line-height: 2.5rem; line-height: 2.5rem;
font-family: PangMenZhengDao-Regular; font-family: PangMenZhengDaoBiaoTiTi;
font-weight: 400; font-weight: 400;
font-size: 1rem; font-size: 1rem;
color: #FFFFFF; color: #FFFFFF;

2
web-screen/client/src/sections/bigScreen/components/style.less

@ -34,7 +34,7 @@
.title { .title {
// width: 122px; // width: 122px;
height: 1.3125rem; height: 1.3125rem;
font-family: PangMenZhengDao; font-family: PangMenZhengDaoBiaoTiTi;
font-size: 1.3125rem; font-size: 1.3125rem;
color: #ffffff; color: #ffffff;
// letter-spacing: 0.95px; // letter-spacing: 0.95px;

Loading…
Cancel
Save