@ -12,7 +12,7 @@
< header -content :auths ="auths_auth_mixin" >
< template # search >
< div style = "display: flex" >
< el -date -picker type = "daterange" v-model ="selectDate" size="small" :clearable="false" style="width: 220px;" @change=" getTransfer "> < / el -date -picker >
< el -date -picker type = "daterange" v-model ="selectDate" size="small" :clearable="false" style="width: 220px;" @change=" search "> < / el -date -picker >
<!-- < Button - - >
<!-- style = "margin-left: 10px" -- >
<!-- type = "primary" -- >
@ -28,41 +28,39 @@
< / div >
< / div >
< el -card id = "docx-content" >
< div class = "title" > { { selectDate [ 0 ] ? $moment ( selectDate [ 0 ] ) . format ( 'YYYY-MM-DD' ) : "-" } } ~ { { selectDate [ 1 ] ? $moment ( selectDate [ 1 ] ) . format ( 'YYYY-MM-DD' ) : "-" } } 调度指令执行情况 < / div >
< el -card id = "docx-content" v -loading = " loading "
element - loading - spinner = "el-icon-loading"
element - loading - text = "拼命加载中"
element - loading - background = "rgba(0, 0, 0, 0.8)" >
< div v-for ="(value, date) in showData" :key="date" v-if="Object.keys(value).length > 0" >
< div class = "title" > { { date } } 调度指令执行情况 < / div >
< p class = "weather" > { { weather [ date ] ? weather [ date ] . weather : '' } } < / p >
< p style = "text-indent: 30px;line-height: 1.2;padding: 20px 0;" > { { weather . weather } } < / p >
< div v-for ="(area, areaId) in value" :key ="areaId" >
< div class = "area" > { { area . area ? area . area . key : '暂无区域' } } < / div >
< div v-for ="(item, index) in showData.filter(i => i._data.size > 0)" :key="item.value" >
< div class = "item" v-if ="item._data.size > 0" >
< div class = "sub-title" > { { numberToChinese ( index + 1 ) } } . { { item . key } } < / div >
< div v-for ="(item1, index1) in Array.from(item._data)" :key="item1[0]" >
< div class = "name" >
{ { index1 + 1 } } . { { item1 [ 1 ] [ 0 ] . equipment _id _equipments _id _relation ? item1 [ 1 ] [ 0 ] . equipment _id _equipments _id _relation . name : '' } }
< div v-for ="(transfer, index) in area._data" :key="transfer.id" class="transfer" >
< div class = "transfer__name" > { { numberToChinese ( ++ index ) } } . { { transfer . xuhao } } { { transfer . equipment _id _equipments _id _relation ? transfer . equipment _id _equipments _id _relation . name : '' } } < / div >
< div class = "transfer__type" >
【 { { diaolingleixing . get ( transfer . diaolingleixing ) } } 】 { { type ( transfer . leibie ) } }
< / div >
< div v-for ="(item2, index2) in item1[1].sort((a,b) => new Date(a.act_start_time).valueOf() - new Date(b.act_start_time).valueOf())" :key="item2.id" style="display: flex;" >
< div style = "text-indent: 60px;" > { { index1 + 1 } } . { { index2 + 1 } } < / div >
< div >
< div >
【 { { diaolingleixing . get ( item2 . diaolingleixing ) } } 】 { { type ( item2 . leibie ) } }
< / div >
< div class = "time" >
< span > 时间 : < / span >
< span > { { item2 . act _start _time ? $moment ( item2 . act _start _time ) . format ( 'YYYY-MM-DD HH:mm' ) : "-" } } ~ { { item2 . act _end _time ? $moment ( item2 . act _end _time ) . format ( 'HH:mm' ) : "-" } } < / span >
< / div >
< div class = "content" >
< span > 内容 : < / span >
< span > { { item2 . to _transfer _id ? "[调整]" : "" } } { { item2 . content } } < / span >
< / div >
< div class = "content" v-if ="item2.diaolingleixing === 4" >
< p v-for ="log in item2.id_logs_transfer_id_relation" > {{ $ moment ( log.created_at ) .format ( ' HH : mm ' ) }} {{ log.content }} < / p >
< / div >
< / div >
< div class = "transfer__plantime" >
< span > 计划时间 : < / span >
< span > { { $moment ( transfer . start _time ) . format ( 'YYYY-MM-DD HH:mm' ) } } ~ { { $moment ( transfer . end _time ) . format ( 'YYYY-MM-DD HH:mm' ) } } < / span >
< / div >
< div class = "transfer__acttime" >
< span > 实际时间 : < / span >
< span > { { $moment ( transfer . act _start _time ) . format ( 'YYYY-MM-DD HH:mm' ) } } ~ { { $moment ( transfer . act _end _time ) . format ( 'YYYY-MM-DD HH:mm' ) } } < / span >
< / div >
< div class = "transfer__content" >
< span > 调令内容 : < / span >
< span > { { transfer . to _transfer _id ? "[调整]" : "" } } { { transfer . content } } < / span >
< / div >
< / div >
< / div >
< / div >
< el -empty v-if ="transfers.length === 0" description="暂无完成调令" > < / el -empty >
< / e l - c a r d >
< / div >
< / template >
@ -92,11 +90,12 @@ export default {
mixins : [ authMixin ] ,
data ( ) {
return {
loading : false ,
types : [ ] ,
areas : [ ] ,
weather : { } ,
transfers : [ ] ,
showData : [] ,
showData : {} ,
selectDate : [ new Date ( ) , new Date ( ) ] ,
diaolingleixing : new Map ( [
[ 1 , "水环境调令" ] ,
@ -107,6 +106,12 @@ export default {
}
} ,
methods : {
search ( ) {
if ( this . loading ) return ;
this . loading = true ;
Promise . all ( [ this . getTransfer ( ) , this . getWeather ( ) ] ) . then ( _ => this . loading = false ) . catch ( _ => this . loading = false )
} ,
async getWeatherInfo ( ) {
try {
let infoObj = {
@ -142,17 +147,24 @@ export default {
filter : [
{
key : 'date' ,
op : ' eq ',
value : this . $moment ( ) . format ( 'YYYY-MM-DD ')
op : ' rang e',
value : ` ${ this . $moment ( this . selectDate [ 0 ] || new Date ( ) ) . startOf ( 'days' ) . format ( 'YYYY-MM-DD HH:mm:ss ') } , ${ this . $moment ( this . selectDate [ 1 ] || new Date ( ) ) . endOf ( 'days' ) . format ( 'YYYY-MM-DD HH:mm:ss' ) } `
}
]
} , false ) ) . data [ 0 ]
} , false ) ) . data
if ( ! res ) {
await this . getWeatherInfo ( )
} else {
this . weather = res
let pickDateArr = [ ] ;
let startDay = this . $moment ( this . selectDate [ 0 ] || new Date ( ) ) . startOf ( 'days' )
while ( startDay . isBefore ( this . $moment ( this . selectDate [ 1 ] || new Date ( ) ) . endOf ( 'days' ) ) || ( startDay . valueOf ( ) === this . $moment ( this . selectDate [ 1 ] || new Date ( ) ) . endOf ( 'days' ) . valueOf ( ) ) ) {
pickDateArr . push ( startDay . format ( 'YYYY-MM-DD' ) )
startDay = startDay . add ( 1 , 'day' )
}
this . weather = { } ;
pickDateArr . forEach ( date => {
this . weather [ date ] = res . find ( i => i . date === date )
} )
console . log ( this . weather )
} ,
numberToChinese ( num ) {
@ -224,7 +236,7 @@ export default {
table _name : "transfers" ,
page : 1 ,
page _size : 999 ,
sort _name : " equipment_id ",
sort _name : " start_time ",
filter : [
{
key : 'start_time' ,
@ -239,138 +251,267 @@ export default {
]
} ) ) . data
this . showData = this . areas . map ( i => {
return {
... i ,
_data : new Map ( )
}
let pickDateArr = [ ] ;
let startDay = this . $moment ( this . selectDate [ 0 ] || new Date ( ) ) . startOf ( 'days' )
while ( startDay . isBefore ( this . $moment ( this . selectDate [ 1 ] || new Date ( ) ) . endOf ( 'days' ) ) || ( startDay . valueOf ( ) === this . $moment ( this . selectDate [ 1 ] || new Date ( ) ) . endOf ( 'days' ) . valueOf ( ) ) ) {
pickDateArr . push ( startDay . format ( 'YYYY-MM-DD' ) )
startDay = startDay . add ( 1 , 'day' )
}
this . showData = { }
pickDateArr . forEach ( date => {
this . showData [ date ] = { }
} )
this . transfers . forEach ( item => {
let filterData = this . showData . find ( i => i . value === item . equipment _id _equipments _id _relation . area )
if ( filterData ) {
if ( filterData . _data . has ( item . equipment _id ) ) {
filterData . _data . get ( item . equipment _id ) . push ( item )
if ( item . start _time && item . equipment _id _equipments _id _relation . area ) {
let myDate = this . $moment ( item . start _time ) . format ( 'YYYY-MM-DD' ) ;
let dateObj = this . showData [ myDate ] ;
if ( dateObj . hasOwnProperty ( item . equipment _id _equipments _id _relation . area ) ) {
dateObj [ item . equipment _id _equipments _id _relation . area ] . _data . push ( item )
} else {
filterData . _data . set ( item . equipment _id , [ item ] )
dateObj [ item . equipment _id _equipments _id _relation . area ] = {
_data : [ item ] ,
area : this . areas . find ( k => k . value === item . equipment _id _equipments _id _relation . area )
}
}
}
} )
/ / t h i s . s h o w D a t a = t h i s . a r e a s . m a p ( i = > {
/ / r e t u r n {
/ / . . . i ,
/ / _ d a t a : n e w M a p ( )
/ / }
/ / } )
/ / t h i s . t r a n s f e r s . f o r E a c h ( i t e m = > {
/ / l e t f i l t e r D a t a = t h i s . s h o w D a t a . f i n d ( i = > i . v a l u e = = = i t e m . e q u i p m e n t _ i d _ e q u i p m e n t s _ i d _ r e l a t i o n . a r e a )
/ / i f ( f i l t e r D a t a ) {
/ / i f ( f i l t e r D a t a . _ d a t a . h a s ( i t e m . e q u i p m e n t _ i d ) ) {
/ / f i l t e r D a t a . _ d a t a . g e t ( i t e m . e q u i p m e n t _ i d ) . p u s h ( i t e m )
/ / } e l s e {
/ / f i l t e r D a t a . _ d a t a . s e t ( i t e m . e q u i p m e n t _ i d , [ i t e m ] )
/ / }
/ / }
/ / } )
} catch ( e ) {
}
this . showData = Object . assign ( { } , this . showData )
console . log ( this . showData )
} ,
async exportDocx ( ) {
/ / c o n s t i n n e r H T M L = d o c u m e n t . q u e r y S e l e c t o r ( " # d o c x - c o n t e n t " ) . i n n e r H T M L ;
/ / c o n s t e x p o r t H T M L = ` < h t m l x m l n s : o = ' u r n : s c h e m a s - m i c r o s o f t - c o m : o f f i c e : o f f i c e ' x m l n s : w = ' u r n : s c h e m a s - m i c r o s o f t - c o m : o f f i c e : w o r d ' x m l n s = ' h t t p : / / w w w . w 3 . o r g / T R / R E C - h t m l 4 0 ' > < h e a d > < m e t a c h a r s e t = ' u t f - 8 ' > < t i t l e > 调 令 内 容 < / t i t l e > < / h e a d > < b o d y > $ { i n n e r H T M L } < / b o d y > < / h t m l > `
/ / l e t b l o b = n e w B l o b ( [ " \ u f e f f " , e x p o r t H T M L ] , {
/ / t y p e : " a p p l i c a t i o n / m s w o r d " ,
/ / } )
if ( this . loading ) return ;
if ( this . transfers . length <= 0 ) {
this . $message ( {
type : "warning" ,
message : "暂无完成调令"
} )
}
const document = new Document ( {
sections : [
{
children : [
new Paragraph ( {
text : ` ${ this . selectDate [ 0 ] ? this . $moment ( this . selectDate [ 0 ] ) . format ( 'YYYY年MM月DD日' ) : "-" } ~ ${ this . selectDate [ 1 ] ? this . $moment ( this . selectDate [ 1 ] ) . format ( 'YYYY年MM月DD日' ) : "-" } 调度指令执行情况 ` ,
heading : HeadingLevel . HEADING _1 ,
alignment : AlignmentType . CENTER ,
spacing : {
after : 400
}
} ) ,
new Paragraph ( {
indent : {
firstLine : convertInchesToTwip ( 0.5 )
} ,
spacing : {
before : 200 ,
line : 500
} ,
children : [
new TextRun ( {
text : this . weather . weather ,
size : 18 ,
} )
]
} ) ,
... this . showData . filter ( i => ( i . _data && i . _data . size > 0 ) ) . map ( ( i , index ) => (
[
new Paragraph ( {
title : ` ${ this . selectDate [ 0 ] ? this . $moment ( this . selectDate [ 0 ] ) . format ( 'YYYY年MM月DD日' ) : "-" } ~ ${ this . selectDate [ 1 ] ? this . $moment ( this . selectDate [ 1 ] ) . format ( 'YYYY年MM月DD日' ) : "-" } 调度指令执行情况 ` ,
sections : ( ( ) => {
let sections = [ ] ;
for ( let date in this . showData ) {
let value = this . showData [ date ] ;
if ( Object . keys ( value ) . length > 0 ) {
let sectionChildren = [
new Paragraph ( {
text : ` ${ this . $moment ( date ) . format ( 'YYYY年MM月DD日' ) } 调度指令执行情况 ` ,
heading : HeadingLevel . HEADING _2 ,
alignment : AlignmentType . CENTER ,
spacing : {
after : 300
}
} ) ,
new Paragraph ( {
text : this . weather [ date ] ? . weather ,
heading : HeadingLevel . HEADING _4 ,
alignment : AlignmentType . CENTER ,
spacing : {
after : 200
}
} ) ,
]
for ( let areaId in value ) {
let area = value [ areaId ] ;
sectionChildren . push ( new Paragraph ( {
indent : {
firstLine : convertInchesToTwip ( 0.5 )
} ,
spacing : {
after : 100 ,
before : 100
} ,
children : [
new TextRun ( {
text : area ? . area . key || "暂无区域" ,
size : 24 ,
bold : true
} )
]
} ) )
for ( let index in area . _data ) {
let transfer = area . _data [ index ] ;
sectionChildren . push ( new Paragraph ( {
text : ` ${ this . numberToChinese ( ++ index ) } . ${ transfer ? . xuhao || ' ' } ${ transfer ? . equipment _id _equipments _id _relation ? . name } ` ,
indent : {
firstLine : convertInchesToTwip ( 0.8 )
} ,
spacing : {
before : 200 ,
line : 400
after : 50
} ,
children : [
new TextRun ( {
text : ` ${ this . numberToChinese ( index + 1 ) } 、 ${ i . key } ` ,
size : 28 ,
bold : true ,
} ) ,
]
} ) ,
... Array . from ( i . _data ) . map ( ( i1 , index1 ) => (
[
new Paragraph ( {
spacing : {
before : 200 ,
line : 300
} ,
indent : {
left : 200
} ,
children : [
new TextRun ( {
text : ` ${ index1 + 1 } . ${ i1 [ 1 ] [ 0 ] . equipment _id _equipments _id _relation ? i1 [ 1 ] [ 0 ] . equipment _id _equipments _id _relation . name : '' } ` ,
size : 24 ,
} ) ,
]
} ) ,
... i1 [ 1 ] . sort ( ( a , b ) => new Date ( a . act _start _time ) . valueOf ( ) - new Date ( b . act _start _time ) . valueOf ( ) ) . map ( ( i2 , index2 ) => {
return new Paragraph ( {
indent : {
left : 400
} ,
alignment : AlignmentType . LEFT ,
children : [
new TextRun ( {
text : ` ${ index1 + 1 } . ${ index2 + 1 } 【 ${ this . diaolingleixing . get ( i2 . diaolingleixing ) } 】 ${ this . type ( i2 . leibie ) } ` ,
size : 20 ,
break : 1 ,
} ) ,
new TextRun ( {
text : ` 时间: ${ i2 . act _start _time ? this . $moment ( i2 . act _start _time ) . format ( 'YYYY-MM-DD HH:mm' ) : "-" } ~ ${ i2 . act _end _time ? this . $moment ( i2 . act _end _time ) . format ( 'HH:mm' ) : "-" } ` ,
size : 18 ,
break : 1 ,
} ) ,
new TextRun ( {
text : ` ${ i2 . to _transfer _id ? "[调整]" : "" } 内容: ${ i2 . content || '' } ` ,
size : 18 ,
break : 1 ,
} ) ,
... ( ( ) => {
if ( i2 . diaolingleixing === 4 ) {
return i2 . id _logs _transfer _id _relation . map ( log => new TextRun ( {
text : ` ${ this . $moment ( log . created _at ) . format ( 'HH:mm' ) } ${ log . content } ` ,
size : 18 ,
break : 1 ,
} ) )
} else {
return [ ]
}
} ) ( )
]
} )
} )
]
) ) . flat ( )
]
) ) . flat ( )
]
} ,
]
} ) )
sectionChildren . push ( new Paragraph ( {
text : ` 【 ${ this . diaolingleixing . get ( transfer . diaolingleixing ) } 】 ${ this . type ( transfer . leibie ) } ` ,
indent : {
firstLine : convertInchesToTwip ( 1 )
} ,
spacing : {
after : 50
} ,
} ) )
sectionChildren . push ( new Paragraph ( {
text : ` 计划时间: ${ this . $moment ( transfer . start _time ) . format ( 'YYYY-MM-DD HH:mm' ) } ~ ${ this . $moment ( transfer . end _time ) . format ( 'YYYY-MM-DD HH:mm' ) } ` ,
indent : {
firstLine : convertInchesToTwip ( 1 )
} ,
spacing : {
after : 50
} ,
} ) )
sectionChildren . push ( new Paragraph ( {
text : ` 实际时间: ${ this . $moment ( transfer . act _start _time ) . format ( 'YYYY-MM-DD HH:mm' ) } ~ ${ this . $moment ( transfer . act _end _time ) . format ( 'YYYY-MM-DD HH:mm' ) } ` ,
indent : {
firstLine : convertInchesToTwip ( 1 )
} ,
spacing : {
after : 50
} ,
} ) )
sectionChildren . push ( new Paragraph ( {
text : ` ${ transfer . to _transfer _id ? '[调整]' : '' } 内容: ${ transfer . content || ' ' } ` ,
indent : {
firstLine : convertInchesToTwip ( 1 )
} ,
spacing : {
after : 50
} ,
} ) )
}
}
sections . push ( {
children : sectionChildren
} )
}
}
return sections ;
} ) ( )
} )
/ / c o n s t d o c u m e n t = n e w D o c u m e n t ( {
/ / s e c t i o n s : [
/ / {
/ / c h i l d r e n : [
/ / n e w P a r a g r a p h ( {
/ / t e x t : ` $ { t h i s . s e l e c t D a t e [ 0 ] ? t h i s . $ m o m e n t ( t h i s . s e l e c t D a t e [ 0 ] ) . f o r m a t ( ' Y Y Y Y 年 M M 月 D D 日 ' ) : " - " } ~ $ { t h i s . s e l e c t D a t e [ 1 ] ? t h i s . $ m o m e n t ( t h i s . s e l e c t D a t e [ 1 ] ) . f o r m a t ( ' Y Y Y Y 年 M M 月 D D 日 ' ) : " - " } 调 度 指 令 执 行 情 况 ` ,
/ / h e a d i n g : H e a d i n g L e v e l . H E A D I N G _ 1 ,
/ / a l i g n m e n t : A l i g n m e n t T y p e . C E N T E R ,
/ / s p a c i n g : {
/ / a f t e r : 4 0 0
/ / }
/ / } ) ,
/ / n e w P a r a g r a p h ( {
/ / i n d e n t : {
/ / f i r s t L i n e : c o n v e r t I n c h e s T o T w i p ( 0 . 5 )
/ / } ,
/ / s p a c i n g : {
/ / b e f o r e : 2 0 0 ,
/ / l i n e : 5 0 0
/ / } ,
/ / c h i l d r e n : [
/ / n e w T e x t R u n ( {
/ / t e x t : t h i s . w e a t h e r . w e a t h e r ,
/ / s i z e : 1 8 ,
/ / } )
/ / ]
/ / } ) ,
/ / . . . t h i s . s h o w D a t a . f i l t e r ( i = > ( i . _ d a t a & & i . _ d a t a . s i z e > 0 ) ) . m a p ( ( i , i n d e x ) = > (
/ / [
/ / n e w P a r a g r a p h ( {
/ / s p a c i n g : {
/ / b e f o r e : 2 0 0 ,
/ / l i n e : 4 0 0
/ / } ,
/ / c h i l d r e n : [
/ / n e w T e x t R u n ( {
/ / t e x t : ` $ { t h i s . n u m b e r T o C h i n e s e ( i n d e x + 1 ) } 、 $ { i . k e y } ` ,
/ / s i z e : 2 8 ,
/ / b o l d : t r u e ,
/ / } ) ,
/ / ]
/ / } ) ,
/ / . . . A r r a y . f r o m ( i . _ d a t a ) . m a p ( ( i 1 , i n d e x 1 ) = > (
/ / [
/ / n e w P a r a g r a p h ( {
/ / s p a c i n g : {
/ / b e f o r e : 2 0 0 ,
/ / l i n e : 3 0 0
/ / } ,
/ / i n d e n t : {
/ / l e f t : 2 0 0
/ / } ,
/ / c h i l d r e n : [
/ / n e w T e x t R u n ( {
/ / t e x t : ` $ { i n d e x 1 + 1 } . $ { i 1 [ 1 ] [ 0 ] . e q u i p m e n t _ i d _ e q u i p m e n t s _ i d _ r e l a t i o n ? i 1 [ 1 ] [ 0 ] . e q u i p m e n t _ i d _ e q u i p m e n t s _ i d _ r e l a t i o n . n a m e : ' ' } ` ,
/ / s i z e : 2 4 ,
/ / } ) ,
/ / ]
/ / } ) ,
/ / . . . i 1 [ 1 ] . s o r t ( ( a , b ) = > n e w D a t e ( a . a c t _ s t a r t _ t i m e ) . v a l u e O f ( ) - n e w D a t e ( b . a c t _ s t a r t _ t i m e ) . v a l u e O f ( ) ) . m a p ( ( i 2 , i n d e x 2 ) = > {
/ / r e t u r n n e w P a r a g r a p h ( {
/ / i n d e n t : {
/ / l e f t : 4 0 0
/ / } ,
/ / a l i g n m e n t : A l i g n m e n t T y p e . L E F T ,
/ / c h i l d r e n : [
/ / n e w T e x t R u n ( {
/ / t e x t : ` $ { i n d e x 1 + 1 } . $ { i n d e x 2 + 1 } 【 $ { t h i s . d i a o l i n g l e i x i n g . g e t ( i 2 . d i a o l i n g l e i x i n g ) } 】 $ { t h i s . t y p e ( i 2 . l e i b i e ) } ` ,
/ / s i z e : 2 0 ,
/ /
/ / b r e a k : 1 ,
/ / } ) ,
/ / n e w T e x t R u n ( {
/ / t e x t : ` 时 间 : $ { i 2 . a c t _ s t a r t _ t i m e ? t h i s . $ m o m e n t ( i 2 . a c t _ s t a r t _ t i m e ) . f o r m a t ( ' Y Y Y Y - M M - D D H H : m m ' ) : " - " } ~ $ { i 2 . a c t _ e n d _ t i m e ? t h i s . $ m o m e n t ( i 2 . a c t _ e n d _ t i m e ) . f o r m a t ( ' H H : m m ' ) : " - " } ` ,
/ / s i z e : 1 8 ,
/ / b r e a k : 1 ,
/ / } ) ,
/ / n e w T e x t R u n ( {
/ / t e x t : ` $ { i 2 . t o _ t r a n s f e r _ i d ? " [ 调 整 ] " : " " } 内 容 : $ { i 2 . c o n t e n t | | ' ' } ` ,
/ / s i z e : 1 8 ,
/ / b r e a k : 1 ,
/ / } ) ,
/ / . . . ( ( ) = > {
/ / i f ( i 2 . d i a o l i n g l e i x i n g = = = 4 ) {
/ / r e t u r n i 2 . i d _ l o g s _ t r a n s f e r _ i d _ r e l a t i o n . m a p ( l o g = > n e w T e x t R u n ( {
/ / t e x t : ` $ { t h i s . $ m o m e n t ( l o g . c r e a t e d _ a t ) . f o r m a t ( ' H H : m m ' ) } $ { l o g . c o n t e n t } ` ,
/ / s i z e : 1 8 ,
/ / b r e a k : 1 ,
/ / } ) )
/ / } e l s e {
/ / r e t u r n [ ]
/ / }
/ / } ) ( )
/ / ]
/ / } )
/ / } )
/ / ]
/ / ) ) . f l a t ( )
/ / ]
/ / ) ) . f l a t ( )
/ / ]
/ / } ,
/ / ]
/ / } )
const blob = await Packer . toBlob ( document )
saveAs ( blob , ` ${ this . selectDate [ 0 ] ? this . $moment ( this . selectDate [ 0 ] ) . format ( 'YYYY年MM月DD日' ) : "-" } ~ ${ this . selectDate [ 1 ] ? this . $moment ( this . selectDate [ 1 ] ) . format ( 'YYYY年MM月DD日' ) : "-" } 调度指令执行情况.docx ` )
@ -391,43 +532,42 @@ export default {
created ( ) {
this . getType ( )
this . getArea ( )
this . getTransfer ( )
this . getWeather ( )
this . search ( )
}
}
< / script >
< style scoped lang = "scss" >
# docx - content {
min - height : 300 px ;
}
. title {
font - weight : bolder ;
font - size : 19 px ;
text - align : center ;
padding : 10 px 0 ;
}
. sub - title {
font - weight : bold ;
font - size : 16 px ;
padding : 8 px 0 ;
line - height : 3 ;
}
. name {
text - indent : 30 px ;
. weather {
font - size : 15 px ;
text - align : center ;
line - height : 1.5 ;
padding : 6 px 0 ;
}
. time {
text- indent : 10 px ;
line- height : 1.5 ;
. area {
font- weight : 600 ;
font- size : 15 px ;
line - height : 3 ;
}
. content {
text - indent : 10 px ;
line - height : 1.5 ;
. transfer {
line - height : 1.75 ;
text - indent : 20 px ;
& > div : nth - child ( n + 2 ) {
text - indent : 40 px ;
}
& _ _type {
}
. item + . item {
margin - top : 20 px ;
}
& _ _name {
}
}
< / style >