@ -1,10 +1,11 @@
< template >
< div class = "leftTop" >
< Card title = "承包商项目信息" >
< Card title = "总包单位信息轮播" >
<!-- < el-carousel style = "width: 110%;transform:translateX(-4.5%) translateY(-5%);" :autoplay = "false" indicator -position = " none " - - >
< el-carousel style = "width: 110%;transform:translateX(-4.5%) translateY(-5%);" :autoplay = "true" :interval = "10000" indicator -position = " none "
v - if = "cbsProjectInfo && cbsProjectInfo.length>0" >
< el-carousel-item style = "height:100%" v-for ="(item,i) in cbsProjectInfo" :key ="i" >
< div class = "mainContainer" style = "transform:translateX(5%) translateY(5%)" >
< div class = "mainContainer" style = "transform:translateX(5%) translateY(5%)" v-if = "item.lbType == 1" >
< div class = "lineBox" >
< span class = "aLine" style = "width:auto;margin-left: 5%;" > 承包商名称 : < / span >
< span class = "cLine" > { { item . projectEnterprise . cbsName || '--' } } < / span >
@ -66,6 +67,76 @@
< / div >
< / div >
< / div >
< div class = "mainContainer" style = "transform:translateX(5%) translateY(5%)" v-else >
< div >
< span > 承包商名称 : < / span >
< span > { { item . name || '--' } } < / span >
< / div >
< div class = "cbProcess" v-if = "item.processList.length > 3" >
<!-- v - if = "listData.length>0" : list = "listData" -- >
< vue3-seamless-scroll
v - if = "item.processList.length > 0"
: list = "item.processList"
: speed = "1"
: limitScrollNum = "3"
: step = "0.3"
: hover = "true"
class = "scroll"
>
< div class = "pItem" v-for ="(item2, i) in item.processList" :key ="i" >
< div class = "pLeft" >
< span : class = "['plInner', 'plBgc' + ((i + 1) % 12)]" >
< span style = "margin-left: 10px" > Top { { i + 1 } } < / span >
< / span >
< / div >
< div class = "pRight" >
< div class = "prTop" >
< div class = "prtLeft" > { { item2 . taskName } } < / div >
< div class = "prtRight" > { { item2 . progressRatio } } % < / div >
< / div >
< div class = "prBottom" >
< div class = "processLineBg" >
< div : class = "['processLine', 'plBtnBgc' + ((i + 1) % 12)]" : style = "{ width: item2.progressRatio + '%' }" >
< div class = "processLineBtn" > < / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / vue3-seamless-scroll >
< / div >
< div class = "cbProcess" v -else -if = " item.processList.length = = 0 " >
< div class = "processNotDta" v-if = "item.processList.length == 0" >
< img src = "@/assets/images/noData.png" alt = "" / >
< p > 暂无数据 < / p >
< / div >
< / div >
< div class = "cbProcess" v-else >
< div class = "pItem" v-for ="(item2, i) in item.processList" :key ="i" >
< div class = "pLeft" >
< span : class = "['plInner', 'plBgc' + ((i + 1) % 12)]" >
< span style = "margin-left: 10px" > Top { { i + 1 } } < / span >
< / span >
< / div >
< div class = "pRight" >
< div class = "prTop" >
< div class = "prtLeft" > { { item2 . taskName } } < / div >
< div class = "prtRight" > { { item2 . progressRatio } } % < / div >
< / div >
< div class = "prBottom" >
< div class = "processLineBg" >
< div : class = "['processLine', 'plBtnBgc' + ((i + 1) % 12)]" : style = "{ width: item2.progressRatio + '%' }" >
< div class = "processLineBtn" > < / div >
< / div >
< / div >
< / div >
< / div >
< / div >
<!-- < / vue3-seamless-scroll > -- >
< / div >
< / div >
< / el-carousel-item >
< / el-carousel >
< div class = "not-data" v-else >
@ -81,33 +152,77 @@ import Card from "@/components/card.vue";
import { GlobalStore } from "@/stores" ;
import { ref , onMounted , watch } from "vue" ;
import { COMPANY } from "@/config/config" ;
import { Vue3SeamlessScroll } from "vue3-seamless-scroll" ;
/ / 引 入 现 场 大 屏 A P I
import {
getEnterpriseIdApi ,
getEnterpriseInfoByIdApi ,
countProjectEnterpriseApi ,
countProcessApi ,
} from "@/api/modules/agjtLiveApi" ;
const store = GlobalStore ( ) ;
const BASEURL = import . meta . env . VITE _API _URL
const cbsProjectInfo = ref ( { } as any )
async function getCbsProjectInfo ( ) {
let data = {
let data 1 = {
page : 1 ,
pageSize : 999 ,
projectSn : store . sn ,
isCountMainEnterprise : 1
}
await countProjectEnterpriseApi ( data , true ) . then ( res => {
let peList : any = [ ]
await countProjectEnterpriseApi ( data1 , true ) . then ( ( res : any ) => {
if ( res . success ) {
if ( res . result . records ) {
cbsProjectInfo . value = res . result . records
if ( res . result && res . result . records ) {
peList = res . result . records
peList . map ( ( item : any ) => {
item . lbType = 1
} )
}
}
} ) ;
let data2 = {
projectSn : store . sn ,
orderBy : 1
}
let pList : any = [ ]
await countProcessApi ( data2 , true ) . then ( ( res : any ) => {
if ( res . success ) {
pList = res . result
}
} )
cbsProjectInfo . value = [ ]
peList . map ( ( item : any , i : any ) => {
cbsProjectInfo . value . push ( item )
let processList = pList . filter ( ( item2 : any ) => item2 . enterpriseId == item . id ) || [ ]
if ( processList . length > 3 ) {
let tempList : any = [ ]
/ / c b s P r o j e c t I n f o . v a l u e . m a p ( ( i t e m 3 : a n y , i : a n y ) = > {
processList . map ( ( item3 : any , i : any ) => {
tempList . push ( item3 )
if ( ( i + 1 ) % 3 == 0 ) {
cbsProjectInfo . value . push ( {
id : item . id ,
name : item . projectEnterprise . cbsName ,
lbType : 2 ,
processList : tempList
} )
tempList = [ ]
}
} )
} else {
cbsProjectInfo . value . push ( {
id : item . id ,
name : item . projectEnterprise . cbsName ,
lbType : 2 ,
processList : processList
} )
}
} )
console . log ( 'cbsProjectInfo' , cbsProjectInfo . value )
} ;
/ / a s y n c f u n c t i o n g e t C b s P r o j e c t I n f o ( ) {
/ / c o n s o l e . l o g ( " B A S E U R L = = = > " , B A S E U R L )
/ / / / 获 取 企 业 I d
/ / a w a i t g e t E n t e r p r i s e I d A p i ( ) . t h e n ( r e s = > {
/ / i f ( r e s . s u c c e s s ) {
@ -168,7 +283,7 @@ onMounted( async () => {
. leftTop {
width : 100 % ;
height : 100 % ;
overflow : hidden ;
overflow : hidden ;
. mainContainer {
width : calc ( 100 % - 20 px ) ;
height : calc ( 80 % - 20 px ) ;
@ -196,31 +311,225 @@ onMounted( async () => {
word - wrap : break - word ;
}
}
. cbProcess {
padding - top : 5 px ;
height : calc ( 100 % - 55 px ) ;
/ / w i d t h : c a l c ( 1 0 0 % - 5 5 p x ) ;
overflow : hidden ;
/ / b a c k g r o u n d - c o l o r : # f f f ;
. pItem {
width : 85 % ;
height : 55 px ;
display : flex ;
/ / b a c k g r o u n d - c o l o r : # f f f ;
font - size : 13 px ;
color : # fff ;
. pLeft {
width : 20 % ;
height : 55 px ;
display : flex ;
justify - content : center ;
align - items : center ;
. plInner {
width : 80 px ;
/ / t e x t - a l i g n : c e n t e r ;
line - height : 30 px ;
/ / b a c k g r o u n d - c o l o r : d a r k r e d ;
border - radius : 100 px ;
}
}
. pRight {
width : 80 % ;
height : 55 px ;
. prTop {
/ / b a c k g r o u n d - c o l o r : d a r k b l u e ;
display : flex ;
justify - content : space - between ;
height : 30 px ;
. prtLeft {
display : flex ;
justify - content : center ;
align - items : flex - end ;
}
. prtRight {
display : flex ;
justify - content : center ;
align - items : flex - end ;
}
}
. prBottom {
/ / b a c k g r o u n d - c o l o r : p u r p l e ;
height : 15 px ;
. processLineBg {
background - color : rgba ( 50 , 50 , 50 , 0.5 ) ;
/ / t r a n s f o r m : s c a l e X ( - 1 ) ;
. processLine {
margin - top : 10 px ;
/ / p a d d i n g - t o p : 1 0 p x ;
height : 5 px ;
display : flex ;
justify - content : flex - end ;
. processLineBtn {
width : 3 px ;
height : 9 px ;
background : # fff ;
transform : translateY ( - 2 px ) ;
}
}
/ / . p l B g c 1 {
/ / b a c k g r o u n d : r g b ( 1 5 0 , 0 , 0 ) ;
/ / b a c k g r o u n d : l i n e a r - g r a d i e n t ( 9 0 d e g , r g b a ( 5 0 , 5 0 , 5 0 , 0 . 5 ) 1 0 % , r g b a ( 1 5 0 , 0 , 0 , 1 ) 1 0 0 % ) ;
/ / }
}
}
}
}
}
}
. notoDta {
top : 38 % ;
width : 50 % ;
/ / l e f t : 4 0 % ;
position : absolute ;
text - align : center ;
left : 50 % ;
transform : translateX ( - 50 % ) ;
img {
width : 40 % ;
margin : 5 % 30 % ;
}
/ / . p r o j e c t I n f o {
/ / w i d t h : 1 0 0 % ;
/ / h e i g h t : 1 0 0 % ;
/ / c o l o r : # f f f ;
/ / p a d d i n g : 2 % 0 0 4 % ;
p {
color : # fff ;
font - size : calc ( 100 vw * 14 / 1920 ) ;
margin : - 6 % 30 % ;
}
}
/ / d i v {
/ / w i d t h : 9 5 % ;
/ / h e i g h t : 1 2 % ;
/ / f o n t - s i z e : 1 5 p x ;
/ / w h i t e - s p a c e : n o w r a p ; / / 单 行
/ / o v e r f l o w : h i d d e n ;
/ / t e x t - o v e r f l o w : e l l i p s i s ;
/ / s p a n {
/ / m a r g i n - r i g h t : 3 % ;
/ / c o l o r : # c c c ;
/ / }
/ / }
/ / }
}
. scroll {
height : 100 % ;
width : 100 % ;
overflow : hidden ;
}
. processNotDta {
top : 25 % ;
width : 40 % ;
/ / l e f t : 4 0 % ;
position : absolute ;
text - align : center ;
left : 45 % ;
transform : translateX ( - 50 % ) ;
img {
width : 40 % ;
margin : 5 % 30 % ;
}
p {
color : # fff ;
font - size : calc ( 100 vw * 14 / 1920 ) ;
margin : - 6 % 30 % ;
}
}
. plBgc1 {
background : rgb ( 139 , 0 , 0 ) ;
background : linear - gradient ( 90 deg , rgba ( 139 , 0 , 0 , 1 ) 35 % , rgba ( 0 , 0 , 0 , 0.5 ) 100 % ) ;
}
. plBtnBgc1 {
background : rgb ( 139 , 0 , 0 ) ;
background : linear - gradient ( 90 deg , rgba ( 50 , 50 , 50 , 0.5 ) 10 % , rgba ( 139 , 0 , 0 , 1 ) 100 % ) ;
}
. plBgc2 {
background : rgb ( 155 , 155 , 0 ) ;
background : linear - gradient ( 90 deg , rgba ( 155 , 155 , 0 , 1 ) 35 % , rgba ( 0 , 0 , 0 , 0.5 ) 100 % ) ;
}
. plBtnBgc2 {
background : rgb ( 155 , 155 , 0 ) ;
background : linear - gradient ( 90 deg , rgba ( 50 , 50 , 50 , 0.5 ) 10 % , rgba ( 155 , 155 , 0 , 1 ) 100 % ) ;
}
. plBgc3 {
background : rgb ( 0 , 0 , 139 ) ;
background : linear - gradient ( 90 deg , rgba ( 0 , 0 , 139 , 1 ) 35 % , rgba ( 0 , 0 , 0 , 0.5 ) 100 % ) ;
}
. plBtnBgc3 {
background : rgb ( 0 , 0 , 139 ) ;
background : linear - gradient ( 90 deg , rgba ( 50 , 50 , 50 , 0.5 ) 10 % , rgba ( 0 , 0 , 139 , 1 ) 100 % ) ;
}
. plBgc4 {
background : rgb ( 139 , 0 , 139 ) ;
background : linear - gradient ( 90 deg , rgba ( 139 , 0 , 139 , 1 ) 35 % , rgba ( 0 , 0 , 0 , 0.5 ) 100 % ) ;
}
. plBtnBgc4 {
background : rgb ( 139 , 0 , 139 ) ;
background : linear - gradient ( 90 deg , rgba ( 50 , 50 , 50 , 0.5 ) 10 % , rgba ( 139 , 0 , 139 , 1 ) 100 % ) ;
}
. plBgc5 {
background : rgb ( 72 , 61 , 139 ) ;
background : linear - gradient ( 90 deg , rgba ( 72 , 61 , 139 , 1 ) 35 % , rgba ( 0 , 0 , 0 , 0.5 ) 100 % ) ;
}
. plBtnBgc5 {
background : rgb ( 72 , 61 , 139 ) ;
background : linear - gradient ( 90 deg , rgba ( 50 , 50 , 50 , 0.5 ) 10 % , rgba ( 72 , 61 , 139 , 1 ) 100 % ) ;
}
. plBgc6 {
background : rgb ( 0 , 206 , 209 ) ;
background : linear - gradient ( 90 deg , rgba ( 0 , 206 , 209 , 1 ) 35 % , rgba ( 0 , 0 , 0 , 0.5 ) 100 % ) ;
}
. plBtnBgc6 {
background : rgb ( 0 , 206 , 209 ) ;
background : linear - gradient ( 90 deg , rgba ( 50 , 50 , 50 , 0.5 ) 10 % , rgba ( 0 , 206 , 209 , 1 ) 100 % ) ;
}
. plBgc7 {
background : rgb ( 47 , 79 , 79 ) ;
background : linear - gradient ( 90 deg , rgba ( 47 , 79 , 79 , 1 ) 35 % , rgba ( 0 , 0 , 0 , 0.5 ) 100 % ) ;
}
. plBtnBgc7 {
background : rgb ( 47 , 79 , 79 ) ;
background : linear - gradient ( 90 deg , rgba ( 50 , 50 , 50 , 0.5 ) 10 % , rgba ( 47 , 79 , 79 , 1 ) 100 % ) ;
}
. plBgc8 {
background : rgb ( 0 , 100 , 0 ) ;
background : linear - gradient ( 90 deg , rgba ( 0 , 100 , 0 , 1 ) 35 % , rgba ( 0 , 0 , 0 , 0.5 ) 100 % ) ;
}
. plBtnBgc8 {
background : rgb ( 0 , 100 , 0 ) ;
background : linear - gradient ( 90 deg , rgba ( 50 , 50 , 50 , 0.5 ) 10 % , rgba ( 0 , 100 , 0 , 1 ) 100 % ) ;
}
. plBgc9 {
background : rgb ( 189 , 183 , 107 ) ;
background : linear - gradient ( 90 deg , rgba ( 189 , 183 , 107 , 1 ) 35 % , rgba ( 0 , 0 , 0 , 0.5 ) 100 % ) ;
}
. plBtnBgc9 {
background : rgb ( 189 , 183 , 107 ) ;
background : linear - gradient ( 90 deg , rgba ( 50 , 50 , 50 , 0.5 ) 10 % , rgba ( 189 , 183 , 107 , 1 ) 100 % ) ;
}
. plBgc10 {
background : rgb ( 255 , 140 , 0 ) ;
background : linear - gradient ( 90 deg , rgba ( 255 , 140 , 0 , 1 ) 35 % , rgba ( 0 , 0 , 0 , 0.5 ) 100 % ) ;
}
. plBtnBgc10 {
background : rgb ( 255 , 140 , 0 ) ;
background : linear - gradient ( 90 deg , rgba ( 50 , 50 , 50 , 0.5 ) 10 % , rgba ( 255 , 140 , 0 , 1 ) 100 % ) ;
}
. plBgc11 {
background : rgb ( 233 , 150 , 122 ) ;
background : linear - gradient ( 90 deg , rgba ( 233 , 150 , 122 , 1 ) 35 % , rgba ( 0 , 0 , 0 , 0.5 ) 100 % ) ;
}
. plBtnBgc11 {
background : rgb ( 233 , 150 , 122 ) ;
background : linear - gradient ( 90 deg , rgba ( 50 , 50 , 50 , 0.5 ) 10 % , rgba ( 233 , 150 , 122 , 1 ) 100 % ) ;
}
. plBgc0 {
background : rgb ( 0 , 139 , 139 ) ;
background : linear - gradient ( 90 deg , rgba ( 0 , 139 , 139 , 1 ) 35 % , rgba ( 0 , 0 , 0 , 0.5 ) 100 % ) ;
}
. plBtnBgc0 {
background : rgb ( 0 , 139 , 139 ) ;
background : linear - gradient ( 90 deg , rgba ( 50 , 50 , 50 , 0.5 ) 10 % , rgba ( 0 , 139 , 139 , 1 ) 100 % ) ;
}
: : v - deep . h - card . content {
height : 80 % ;
}