method: 'POST', | method: 'POST', | ||||
data:params | data:params | ||||
}) | }) | ||||
}, | |||||
getAskCount(params){ | |||||
return axios({ | |||||
url: '/api/index/inspect/count', | |||||
method: 'GET', | |||||
params:params | |||||
}) | |||||
}, | |||||
getAskList(params){ | |||||
return axios({ | |||||
url: '/api/index/inspect/list', | |||||
method: 'GET', | |||||
params:{ | |||||
...params | |||||
} | |||||
}) | |||||
}, | |||||
addTask(params){ | |||||
return axios({ | |||||
url: '/api/index/inspect/addTask', | |||||
method: 'POST', | |||||
data:params | |||||
}) | |||||
}, | |||||
getQuaWarnList(params){ | |||||
return axios({ | |||||
url: '/api/index/water/warn', | |||||
method: 'GET', | |||||
params:{} | |||||
}) | |||||
}, | |||||
getQuaTrend(params){ | |||||
return axios({ | |||||
url: '/api/index/water/trend', | |||||
method: 'GET', | |||||
params:{} | |||||
}) | |||||
} | } | ||||
} | } |
<img src="../../../assets/img/command/ask-new.png"> | <img src="../../../assets/img/command/ask-new.png"> | ||||
<el-form ref="form" :model="ruleForm" :label-width="formLabelWidth+'px'"> | <el-form ref="form" :model="ruleForm" :label-width="formLabelWidth+'px'"> | ||||
<el-form-item label="河道名称:"> | <el-form-item label="河道名称:"> | ||||
<el-select :class="ruleForm.driver?'check-select':void(0)" clearable v-model="ruleForm.driver" placeholder=""> | |||||
<el-option | |||||
v-for="item in userList" | |||||
:key="item.value" | |||||
:label="item.label" | |||||
:value="item.value"> | |||||
</el-option> | |||||
<el-select :class="ruleForm.driverId?'check-select':void(0)" filterable clearable v-model="ruleForm.driverId" placeholder=""> | |||||
<el-option | |||||
v-for="item in driverDataList" | |||||
:key="item.id" | |||||
:label="item.name" | |||||
:value="item.id"> | |||||
</el-option> | |||||
</el-select> | </el-select> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item label="任务选择:"> | <el-form-item label="任务选择:"> | ||||
<el-select :class="ruleForm.user?'check-select':void(0)" clearable v-model="ruleForm.user" placeholder=""> | |||||
<el-select :class="ruleForm.type?'check-select':void(0)" clearable v-model="ruleForm.type" placeholder=""> | |||||
<el-option | |||||
key="1" | |||||
label="可见光巡检" | |||||
value="1"> | |||||
</el-option> | |||||
<el-option | <el-option | ||||
v-for="item in userList" | |||||
:key="item.value" | |||||
:label="item.label" | |||||
:value="item.value"> | |||||
key="2" | |||||
label="多光谱巡检" | |||||
value="2"> | |||||
</el-option> | </el-option> | ||||
</el-select> | </el-select> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item label="巡检日期:"> | <el-form-item label="巡检日期:"> | ||||
<el-date-picker | <el-date-picker | ||||
style="width: 100%" | style="width: 100%" | ||||
v-model="ruleForm.date" | |||||
v-model="ruleForm.inspectTime" | |||||
value-format="yyyy-MM-dd" | value-format="yyyy-MM-dd" | ||||
type="date" | type="date" | ||||
placeholder=""> | placeholder=""> | ||||
<script> | <script> | ||||
import {mapGetters} from "vuex"; | import {mapGetters} from "vuex"; | ||||
import api from '@/api/command/index' | |||||
export default { | export default { | ||||
name: "addDialog", | name: "addDialog", | ||||
data() { | data() { | ||||
return { | return { | ||||
submitLoading:false, | submitLoading:false, | ||||
userList: [ | |||||
{value: 1, label: '未处理'}, | |||||
{value: 2, label: '处理中'}, | |||||
{value: 3, label: '已完成'}, | |||||
], | |||||
ruleForm: {}, | |||||
ruleForm: { | |||||
inspectTime:'', | |||||
driverId:'', | |||||
type:'' | |||||
}, | |||||
formLabelWidth: this.$root.$options.filters.filterPx(0.83, this.fontSize), | formLabelWidth: this.$root.$options.filters.filterPx(0.83, this.fontSize), | ||||
} | } | ||||
}, | }, | ||||
default() { | default() { | ||||
return false | return false | ||||
} | } | ||||
}, | |||||
driverDataList: { | |||||
type: Array, | |||||
default() { | |||||
return [] | |||||
} | |||||
} | } | ||||
}, | }, | ||||
computed: { | computed: { | ||||
}, | }, | ||||
submit(){ | submit(){ | ||||
this.submitLoading=true | this.submitLoading=true | ||||
let me=this | |||||
setTimeout(function () { | |||||
me.submitLoading=false | |||||
me.$emit('successSubmit') | |||||
},2000) | |||||
let params = { | |||||
inspectTime:this.ruleForm.inspectTime, | |||||
type:this.ruleForm.type, | |||||
inspectDriverList:[{driverId:this.ruleForm.driverId}] | |||||
} | |||||
api.addTask(params).then(res => { | |||||
this.$emit('successSubmit') | |||||
this.submitLoading=false | |||||
}).catch(err => { | |||||
this.submitLoading=false | |||||
}); | |||||
} | } | ||||
} | } | ||||
} | } |
</div> | </div> | ||||
</div> | </div> | ||||
<div> | <div> | ||||
<div :class="activeType==1?'check-type':''" @click="activeTypeClick(1)"> | |||||
<div :class="activeType==2?'check-type':''" @click="activeTypeClick(2)"> | |||||
<div> | <div> | ||||
<div></div> | <div></div> | ||||
<div>正在执行</div> | <div>正在执行</div> | ||||
</div> | </div> | ||||
<div>24</div> | |||||
<div v-show="activeType==1"></div> | |||||
<div>{{inExecution}}</div> | |||||
<div v-show="activeType==2"></div> | |||||
</div> | </div> | ||||
<div :class="activeType==2?'check-type':''" @click="activeTypeClick(2)"> | |||||
<div :class="activeType==1?'check-type':''" @click="activeTypeClick(1)"> | |||||
<div> | <div> | ||||
<div></div> | <div></div> | ||||
<div>已执行</div> | |||||
<div>已完成</div> | |||||
</div> | </div> | ||||
<div>19</div> | |||||
<div v-show="activeType==2"></div> | |||||
<div>{{finished}}</div> | |||||
<div v-show="activeType==1"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div> | <div> | ||||
<el-input placeholder="请输入河流" v-model="searchValue"> | |||||
</el-input> | |||||
<div> | |||||
<img @click="search" src="../../../assets/img/command/search.png"> | |||||
</div> | |||||
<el-select @change="search" filterable v-model="ruleForm.driverId" placeholder="请选择河流" clearable> | |||||
<el-option | |||||
v-for="item in driverDataList" | |||||
:key="item.id" | |||||
:label="item.name" | |||||
:value="item.id"> | |||||
</el-option> | |||||
</el-select> | |||||
</div> | </div> | ||||
<div> | <div> | ||||
<div :key="index" v-for="(item,index) in dataList"> | |||||
<div :key="index" v-for="(item,index) in dataList.slice((currentPage - 1) * pageSize, currentPage * pageSize)"> | |||||
<div> | <div> | ||||
<div> | <div> | ||||
<div>澧水河</div> | |||||
<div>江宁</div> | |||||
<div>{{item.driverName}}</div> | |||||
<div>{{item.areaName}}</div> | |||||
</div> | </div> | ||||
<div>2020-04-22</div> | |||||
<div>{{item.inspectTime}}</div> | |||||
</div> | </div> | ||||
<div>秦淮河河东-秦淮河北</div> | |||||
<div>{{item.startPoint}}-{{item.endPoint}}</div> | |||||
<div> | <div> | ||||
<div> | <div> | ||||
<div :class="activeType==2?'isCheck':''"></div> | |||||
<div>{{activeType?'在执行':'已执行'}}</div> | |||||
<div :class="activeType==1?'isCheck':''"></div> | |||||
<div>{{item.statusText}}</div> | |||||
</div> | </div> | ||||
<div> | <div> | ||||
<img @click="routesClick" src="../../../assets/img/command/ask-routes.png"/> | |||||
<img @click="videoClick" v-if="activeType==1" src="../../../assets/img/command/ask-video.png"/> | |||||
<img @click="hpClick" v-if="activeType==2" src="../../../assets/img/command/ask-hp.png"/> | |||||
<img @click="routesClick(item.driverId)" src="../../../assets/img/command/ask-routes.png"/> | |||||
<img @click="videoClick(item.liveUrl)" v-if="activeType==2" src="../../../assets/img/command/ask-video.png"/> | |||||
<img @click="hpClick(item)" v-if="activeType==1" src="../../../assets/img/command/ask-hp.png"/> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div v-show="dataList.length>0"> | |||||
<div v-show="dataList.length>4" style="text-align: center"> | |||||
<el-pagination | <el-pagination | ||||
@current-change="handleCurrentChange" | |||||
background | background | ||||
:pager-count="5" | :pager-count="5" | ||||
:current-page="currentPage" | |||||
:page-size="pageSize" | |||||
layout="prev, pager, next" | layout="prev, pager, next" | ||||
:total="100"> | |||||
:total="dataList.length"> | |||||
</el-pagination> | </el-pagination> | ||||
</div> | </div> | ||||
<videoDialog :liveUrl="liveUrl" @dialogClose="visible=false" v-if="visible" :visible="visible" ></videoDialog> | <videoDialog :liveUrl="liveUrl" @dialogClose="visible=false" v-if="visible" :visible="visible" ></videoDialog> | ||||
<addDialog @successSubmit="successSubmit" @dialogClose="addVisible=false" v-if="addVisible" :visible="addVisible" ></addDialog> | |||||
<addDialog :driverDataList="driverDataList" @successSubmit="successSubmit" @dialogClose="addVisible=false" v-if="addVisible" :visible="addVisible" ></addDialog> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
import {mapGetters} from "vuex"; | import {mapGetters} from "vuex"; | ||||
import videoDialog from './videoDialog' | import videoDialog from './videoDialog' | ||||
import addDialog from './addDialog' | import addDialog from './addDialog' | ||||
import api from '@/api/command/index' | |||||
export default { | export default { | ||||
name: "ask-left", | name: "ask-left", | ||||
data() { | data() { | ||||
return { | return { | ||||
pageSize:4, | |||||
currentPage:1, | |||||
inExecution:'-', | |||||
finished:'-', | |||||
liveUrl:'', | liveUrl:'', | ||||
searchLoading: false, | searchLoading: false, | ||||
addVisible:false, | addVisible:false, | ||||
searchValue: '', | searchValue: '', | ||||
activeType: 1, | |||||
activeType:2, | |||||
visible: false, | visible: false, | ||||
dataList: [{}, {}, {}, {}], | |||||
dataList: [], | |||||
ruleForm:{ | |||||
driverId:'' | |||||
} | |||||
} | } | ||||
}, | }, | ||||
computed: { | computed: { | ||||
components: {videoDialog,addDialog}, | components: {videoDialog,addDialog}, | ||||
watch: { | watch: { | ||||
driverId() { | driverId() { | ||||
if (this.driverId) { | |||||
this.searchValue= this.driverId | |||||
this.ruleForm.driverId= this.driverId | |||||
this.search() | this.search() | ||||
} | |||||
} | } | ||||
}, | }, | ||||
props: { | props: { | ||||
default() { | default() { | ||||
return '' | return '' | ||||
} | } | ||||
}, | |||||
driverDataList: { | |||||
type: Array, | |||||
default() { | |||||
return [] | |||||
} | |||||
} | } | ||||
}, | }, | ||||
mounted() { | mounted() { | ||||
this.getAskCount() | |||||
this.search() | this.search() | ||||
}, | }, | ||||
methods: { | methods: { | ||||
handleCurrentChange(val){ | |||||
this.currentPage = val | |||||
}, | |||||
getAskCount(){ | |||||
api.getAskCount().then(res => { | |||||
const {inExecution,finished}=res.data | |||||
this.inExecution=inExecution?inExecution:'' | |||||
this.finished=finished?finished:'' | |||||
}).catch(err => { | |||||
this.inExecution='' | |||||
this.finished='' | |||||
}); | |||||
}, | |||||
activeTypeClick(activeType) { | activeTypeClick(activeType) { | ||||
this.activeType = activeType | this.activeType = activeType | ||||
this.searchValue = '' | this.searchValue = '' | ||||
this.$emit('askClear') | |||||
this.search() | this.search() | ||||
}, | }, | ||||
showProblemDetail(item) { | showProblemDetail(item) { | ||||
this.$emit('showProblemDetail', {id: 1, driverId: 27}) | this.$emit('showProblemDetail', {id: 1, driverId: 27}) | ||||
}, | }, | ||||
routesClick(){ | |||||
this.$emit('routesClick', 296) | |||||
routesClick(driverId){ | |||||
this.$emit('routesClick',driverId ) | |||||
}, | }, | ||||
videoClick(){ | |||||
this.$emit('askClear',this.driverId) | |||||
this.liveUrl='http://mudu.tv/?a=index&c=show&id=230645&type=pc&playerInlineMode=1' | |||||
this.visible=true | |||||
videoClick(liveUrl){ | |||||
this.$emit('askClear') | |||||
if(liveUrl){ | |||||
this.liveUrl=liveUrl | |||||
this.visible=true | |||||
}else{ | |||||
this.$notify.error({ | |||||
title: '错误', | |||||
message: '请配置直播地址' | |||||
}); | |||||
} | |||||
}, | }, | ||||
hpClick(){ | |||||
this.$emit('hpDetail',296) | |||||
hpClick(item){ | |||||
this.$emit('hpDetail',item) | |||||
}, | }, | ||||
addClick(){ | addClick(){ | ||||
this.$emit('askClear',this.driverId) | |||||
this.$emit('askClear') | |||||
this.addVisible=true | this.addVisible=true | ||||
}, | }, | ||||
successSubmit(){ | successSubmit(){ | ||||
}, | }, | ||||
search() { | search() { | ||||
this.$emit('askClear',this.ruleForm.driverId) | |||||
let me = this | let me = this | ||||
this.dataList=[] | this.dataList=[] | ||||
this.searchLoading = true | this.searchLoading = true | ||||
me.$emit('askClear',me.driverId) | |||||
setTimeout(function () { | |||||
me.dataList=[{},{},{},{}] | |||||
me.searchLoading = false | |||||
}, 2000) | |||||
api.getAskList({type:this.activeType,driverId:this.ruleForm.driverId}).then(res => { | |||||
this.dataList=res.data?res.data:[] | |||||
me.searchLoading = false | |||||
}).catch(e => { | |||||
me.searchLoading = false | |||||
this.dataList=[] | |||||
}); | |||||
} | } | ||||
}, | }, | ||||
} | } | ||||
line-height: 0.36rem; | line-height: 0.36rem; | ||||
opacity: 1; | opacity: 1; | ||||
} | } | ||||
> div:last-child { | |||||
position: absolute; | |||||
right: 0.1rem; | |||||
top: -0.63rem; | |||||
width: 0.23rem; | |||||
height: 0.23rem; | |||||
> img { | |||||
width: 100%; | |||||
} | |||||
.el-icon-loading { | |||||
font-size: 0.2rem; | |||||
color: #ffffff; | |||||
} | |||||
} | |||||
} | } | ||||
> div:nth-child(4) { | > div:nth-child(4) { | ||||
width: 100%; | width: 100%; | ||||
line-height: 0.2rem; | line-height: 0.2rem; | ||||
margin-top: 0.1rem; | margin-top: 0.1rem; | ||||
text-align: left; | |||||
overflow: hidden; | overflow: hidden; | ||||
text-overflow: ellipsis; | text-overflow: ellipsis; | ||||
-o-text-overflow: ellipsis; | -o-text-overflow: ellipsis; |
<div> | <div> | ||||
<div> | <div> | ||||
<div>河道名称:</div> | <div>河道名称:</div> | ||||
<div>槽水河</div> | |||||
<div>{{askChild.driverName}}</div> | |||||
</div> | </div> | ||||
<div> | <div> | ||||
<div>水质问题:</div> | |||||
<div>河流漂浮物</div> | |||||
<div>区属:</div> | |||||
<div>{{askChild.areaName}}</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div> | <div> | ||||
<div> | <div> | ||||
<div>处理人员:</div> | |||||
<div>张世名</div> | |||||
<div>起点:</div> | |||||
<div>{{askChild.startPoint}}</div> | |||||
</div> | </div> | ||||
<div> | <div> | ||||
<div>处理时间:</div> | |||||
<div>2020-12-01</div> | |||||
<div>终点:</div> | |||||
<div>{{askChild.endPoint}}</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div> | <div> | ||||
<div> | <div> | ||||
<div>巡检时间:</div> | <div>巡检时间:</div> | ||||
<div>2020-12-01</div> | |||||
<div>{{askChild.inspectTime}}</div> | |||||
</div> | </div> | ||||
<div> | <div> | ||||
<div>水质标准:</div> | |||||
<div>污水3类</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div> | |||||
<div>地理位置:</div> | |||||
<div>南京市江宁区东吉大道1号</div> | |||||
</div> | |||||
<div> | <div> | ||||
<div>拍摄照片:</div> | <div>拍摄照片:</div> | ||||
<viewer :images='[require("../../../assets/img/login.png"),require("../../../assets/img/login.png"),require("../../../assets/img/login.png")]'> | |||||
<img style="margin-left: 0" :src='require("../../../assets/img/login.png")'> | |||||
<img :src='require("../../../assets/img/login.png")'> | |||||
<img :src='require("../../../assets/img/login.png")'> | |||||
<viewer v-if="askChild.imageList&&askChild.imageList.length>0"> | |||||
<img v-lazy="item.thumbImg" :data-source="item.originalImg" :key=index v-for="(item,index) in askChild.imageList"> | |||||
</viewer> | </viewer> | ||||
</div> | </div> | ||||
<div> | |||||
<div v-if="askChild.driverVideo"> | |||||
<div>拍摄视频:</div> | <div>拍摄视频:</div> | ||||
<dVideo videoUrl="https://gss3.baidu.com/6LZ0ej3k1Qd3ote6lo7D0j9wehsv/tieba-smallvideo-transcode-crf/1116315_20146aa2c462c9383115e2512c34deb1_0.mp4"></dVideo> | |||||
<dVideo :videoUrl="askChild.driverVideo"></dVideo> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
default(){ | default(){ | ||||
return 0 | return 0 | ||||
} | } | ||||
}, | |||||
askChild:{ | |||||
type:Object, | |||||
default(){ | |||||
return {} | |||||
} | |||||
} | } | ||||
}, | }, | ||||
watch:{ | watch:{ | ||||
askChild(){ | |||||
console.log(this.askChild) | |||||
} | |||||
}, | }, | ||||
components:{dVideo}, | components:{dVideo}, | ||||
methods: { | methods: { | ||||
font-family: PingFangSC-Regular; | font-family: PingFangSC-Regular; | ||||
font-size: 0.14rem; | font-size: 0.14rem; | ||||
color: #989898; | color: #989898; | ||||
width: 0.9rem; | |||||
} | } | ||||
>div:last-child{ | >div:last-child{ | ||||
font-family: PingFangSC-Regular; | font-family: PingFangSC-Regular; | ||||
} | } | ||||
} | } | ||||
>div:nth-child(4){ | >div:nth-child(4){ | ||||
display: flex; | |||||
line-height: 0.2rem; | |||||
>div:first-child{ | |||||
font-family: PingFangSC-Regular; | |||||
font-size: 0.14rem; | |||||
color: #989898; | |||||
} | |||||
>div:last-child{ | |||||
font-family: PingFangSC-Regular; | |||||
font-size: 0.14rem; | |||||
margin: 0 0.05rem; | |||||
color: #FFFFFF; | |||||
flex: 1; | |||||
} | |||||
} | |||||
>div:nth-child(5){ | |||||
display: flex; | display: flex; | ||||
>div:first-child{ | >div:first-child{ | ||||
font-family: PingFangSC-Regular; | font-family: PingFangSC-Regular; | ||||
font-size: 0.14rem; | font-size: 0.14rem; | ||||
color: #989898; | color: #989898; | ||||
line-height: 0.2rem; | line-height: 0.2rem; | ||||
width: 0.9rem; | |||||
flex: none; | |||||
} | } | ||||
>div:last-child{ | >div:last-child{ | ||||
display: flex; | display: flex; | ||||
flex-wrap: wrap; | |||||
} | } | ||||
img{ | img{ | ||||
width: 0.95rem; | width: 0.95rem; | ||||
height: 0.95rem; | height: 0.95rem; | ||||
margin-left: 0.13rem; | margin-left: 0.13rem; | ||||
} | } | ||||
img:first-child{ | |||||
margin-left: 0px; | |||||
} | |||||
>img:first-child{ | >img:first-child{ | ||||
margin-left: 0; | margin-left: 0; | ||||
} | } | ||||
} | } | ||||
>div:last-child { | |||||
>div:nth-child(5) { | |||||
display: flex; | display: flex; | ||||
> div:first-child { | > div:first-child { |
padding: 0rem; | padding: 0rem; | ||||
height: 100%; | height: 100%; | ||||
width: 100%; | width: 100%; | ||||
border: 1px #ffffff solid; | |||||
} | } | ||||
.tech-theme .banner { | .tech-theme .banner { |
<div v-loading="loading" class="command-index" style="position: relative"> | <div v-loading="loading" class="command-index" style="position: relative"> | ||||
<div style="display:none;"> | <div style="display:none;"> | ||||
<problemDetailWin :id="questionId" @closeInfoWindow="closeInfoWindow" ref="problemDetailWin"></problemDetailWin> | <problemDetailWin :id="questionId" @closeInfoWindow="closeInfoWindow" ref="problemDetailWin"></problemDetailWin> | ||||
<hpDetailWin @closeInfoWindow="closeInfoWindow" ref="hpDetailWin"></hpDetailWin> | |||||
<hpDetailWin :askChild="askChild" @closeInfoWindow="closeInfoWindow" ref="hpDetailWin"></hpDetailWin> | |||||
</div> | </div> | ||||
<div class="index-map" id="indexMap"></div> | <div class="index-map" id="indexMap"></div> | ||||
<img class="head-img" src="../../assets/img/command/nav.png"/> | <img class="head-img" src="../../assets/img/command/nav.png"/> | ||||
<problemLeft :driverArea="driverArea" :driverDataList="driverDataList" :driverId="driverId" @fillMarker="fillMarker" @problemClear="problemClear" | <problemLeft :driverArea="driverArea" :driverDataList="driverDataList" :driverId="driverId" @fillMarker="fillMarker" @problemClear="problemClear" | ||||
@problemSearch="problemSearch" @showProblemDetail="showProblemDetail" | @problemSearch="problemSearch" @showProblemDetail="showProblemDetail" | ||||
v-if="activeType=='problem'&&finshMap"></problemLeft> | v-if="activeType=='problem'&&finshMap"></problemLeft> | ||||
<askLeft @hpDetail="hpDetail" @routesClick="routesClick" @askClear="askClear" :driverId="driverId" | |||||
<askLeft @hpDetail="hpDetail" @routesClick="routesClick" @askClear="askClear" :driverDataList="driverDataList" :driverId="driverId" | |||||
v-if="activeType=='ask'&&finshMap"></askLeft> | v-if="activeType=='ask'&&finshMap"></askLeft> | ||||
<qualityLeft @qualityClear="askClear" :driverId="driverId" v-if="activeType=='quality'&&finshMap"></qualityLeft> | <qualityLeft @qualityClear="askClear" :driverId="driverId" v-if="activeType=='quality'&&finshMap"></qualityLeft> | ||||
<qualityRight v-if="activeType=='quality'&&finshMap"></qualityRight> | <qualityRight v-if="activeType=='quality'&&finshMap"></qualityRight> | ||||
activeType: "date", | activeType: "date", | ||||
map: {}, | map: {}, | ||||
center: {}, | center: {}, | ||||
askChild:{}, | |||||
barHeight: document.body.clientHeight > 1050 ? 2.42 : 2.06, | barHeight: document.body.clientHeight > 1050 ? 2.42 : 2.06, | ||||
driverDataList:[], | driverDataList:[], | ||||
nameMarkList: [], | nameMarkList: [], | ||||
offset: new AMap.Pixel(0, -25) | offset: new AMap.Pixel(0, -25) | ||||
}); | }); | ||||
me.addBound(); | me.addBound(); | ||||
// me.addBound2(); | |||||
me.addBound2(); | |||||
me.map.setFitView(this.polygonList) | me.map.setFitView(this.polygonList) | ||||
me.getDriver() | me.getDriver() | ||||
me.loading = false | me.loading = false | ||||
}, | }, | ||||
components: {dateLeft, dateRight, problemLeft, problemDetailWin, askLeft,hpDetailWin,qualityLeft,qualityRight}, | components: {dateLeft, dateRight, problemLeft, problemDetailWin, askLeft,hpDetailWin,qualityLeft,qualityRight}, | ||||
methods: { | methods: { | ||||
hpDetail(driverId){ | |||||
hpDetail(child){ | |||||
this.closeInfoWin() | this.closeInfoWin() | ||||
this.askClear() | this.askClear() | ||||
this.askChild = {} | |||||
let me = this | let me = this | ||||
setTimeout(function () { | setTimeout(function () { | ||||
let marker = me.driverList.find(item => item.id == driverId) | |||||
let marker = me.driverList.find(item => item.id == child.driverId) | |||||
if (marker) { | if (marker) { | ||||
me.askChild = JSON.parse(JSON.stringify(child)) | |||||
me.InfoWindow.open(me.map, marker.getPath()[0]); | me.InfoWindow.open(me.map, marker.getPath()[0]); | ||||
} | } | ||||
me.checkDriver(driverId) | |||||
me.checkDriver(child.driverId) | |||||
}, 500) | }, 500) | ||||
}, | }, | ||||
routesClick(driverId) { | routesClick(driverId) { | ||||
this.clearRoutersMarker() | this.clearRoutersMarker() | ||||
this.checkDriver(driverId) | this.checkDriver(driverId) | ||||
let child = this.driverDataList.find(item => item.id == driverId) | let child = this.driverDataList.find(item => item.id == driverId) | ||||
if (child&&child.mapInfo&&child.mapInfo.length>0) { | |||||
if (child&&child.pointList&&child.pointList.length>0) { | |||||
this.initRouters(child) | this.initRouters(child) | ||||
} else { | } else { | ||||
this.$notify.error({ | this.$notify.error({ | ||||
} | } | ||||
}, | }, | ||||
initRouters(child) { | initRouters(child) { | ||||
let path = child.mapInfo | |||||
let path = child.pointList | |||||
let point = new AMap.LngLat(path[0].x, path[0].y) | let point = new AMap.LngLat(path[0].x, path[0].y) | ||||
let me = this | let me = this | ||||
let image = require('../../assets/img/command/uva.png') | let image = require('../../assets/img/command/uva.png') | ||||
this.map.setFitView(this.polygonList) | this.map.setFitView(this.polygonList) | ||||
}, | }, | ||||
askClear(driverId) { | askClear(driverId) { | ||||
if (!driverId) { | |||||
this.fillMarker() | |||||
} | |||||
this.driverId='' | |||||
this.checkDriver(driverId) | |||||
this.clearRoutersMarker() | this.clearRoutersMarker() | ||||
this.map.setFitView(this.polygonList) | this.map.setFitView(this.polygonList) | ||||
}, | }, | ||||
} | } | ||||
this.clearMarker() | this.clearMarker() | ||||
this.map.setFitView(this.polygonList) | this.map.setFitView(this.polygonList) | ||||
// if(driverArea){ | |||||
// this.polygonList2.map(item=>{ | |||||
// item.hide() | |||||
// }) | |||||
// this.driverList.map(item=>{ | |||||
// item.show() | |||||
// }) | |||||
// }else{ | |||||
// this.polygonList2.map(item=>{ | |||||
// item.show() | |||||
// }) | |||||
// this.driverList.map(item=>{ | |||||
// item.hide() | |||||
// }) | |||||
// } | |||||
}, | }, | ||||
closeInfoWindow() { | closeInfoWindow() { | ||||
this.closeInfoWin() | this.closeInfoWin() | ||||
this.fillDriver() | this.fillDriver() | ||||
}, | }, | ||||
problemSearch(markerList,driverArea) { | |||||
problemSearch(markerList,driverArea,driverId) { | |||||
this.driverArea=driverArea | this.driverArea=driverArea | ||||
let me = this | let me = this | ||||
let list = [] | let list = [] | ||||
list.push(me.addMarker(point, item)) | list.push(me.addMarker(point, item)) | ||||
} | } | ||||
}) | }) | ||||
if(driverArea||driverId){ | |||||
this.polygonList2.map(item=>{ | |||||
item.hide() | |||||
}) | |||||
this.driverList.map(item=>{ | |||||
item.show() | |||||
}) | |||||
}else{ | |||||
this.polygonList2.map(item=>{ | |||||
item.show() | |||||
}) | |||||
this.driverList.map(item=>{ | |||||
item.hide() | |||||
}) | |||||
} | |||||
me.markerList = list | me.markerList = list | ||||
}, | }, | ||||
addMarker(point, item) { | addMarker(point, item) { | ||||
this.showDirver() | this.showDirver() | ||||
}else if(type=='problem'){ | }else if(type=='problem'){ | ||||
this.InfoWindow.setContent(this.$refs.problemDetailWin.$el) | this.InfoWindow.setContent(this.$refs.problemDetailWin.$el) | ||||
// this.polygonList2.map(item=>{ | |||||
// item.show() | |||||
// }) | |||||
// this.driverList.map(item=>{ | |||||
// item.hide() | |||||
// }) | |||||
this.polygonList2.map(item=>{ | |||||
item.show() | |||||
}) | |||||
this.driverList.map(item=>{ | |||||
item.hide() | |||||
}) | |||||
}else{ | }else{ | ||||
this.showDirver() | this.showDirver() | ||||
} | } | ||||
}, | }, | ||||
showDirver(){ | showDirver(){ | ||||
// this.polygonList2.map(item=>{ | |||||
// item.hide() | |||||
// }) | |||||
// this.driverList.map(item=>{ | |||||
// item.show() | |||||
// }) | |||||
this.polygonList2.map(item=>{ | |||||
item.hide() | |||||
}) | |||||
this.driverList.map(item=>{ | |||||
item.show() | |||||
}) | |||||
}, | }, | ||||
addBound() { | addBound() { | ||||
let me = this; | let me = this; |
api.getQuestionList(ruleForm).then(res => { | api.getQuestionList(ruleForm).then(res => { | ||||
this.dataList=res.data?res.data:[] | this.dataList=res.data?res.data:[] | ||||
console.log(this.dataList) | console.log(this.dataList) | ||||
me.$emit('problemSearch', this.dataList,this.ruleForm.driverArea) | |||||
me.$emit('problemSearch', this.dataList,this.ruleForm.driverArea,this.ruleForm.driverId) | |||||
me.searchLoading = false | me.searchLoading = false | ||||
}).catch(e => { | }).catch(e => { | ||||
me.searchLoading = false | me.searchLoading = false |
import {mapGetters} from "vuex"; | import {mapGetters} from "vuex"; | ||||
import cLine from './line' | import cLine from './line' | ||||
import quilityDialog from './qualityDialog' | import quilityDialog from './qualityDialog' | ||||
import api from '@/api/command/index' | |||||
export default { | export default { | ||||
name: "qualityRight", | name: "qualityRight", | ||||
watch: {}, | watch: {}, | ||||
props: {}, | props: {}, | ||||
mounted() { | mounted() { | ||||
this.search() | |||||
this.getQuaTrend() | |||||
this.getQuaWarnList() | |||||
}, | }, | ||||
methods: { | methods: { | ||||
detail(){ | detail(){ | ||||
this.visible=true | this.visible=true | ||||
}, | }, | ||||
activeTypeClick(activeType) { | |||||
this.activeType = activeType | |||||
this.search() | |||||
getQuaWarnList(){ | |||||
api.getQuaWarnList().then(res => { | |||||
console.log(res) | |||||
}).catch(err => { | |||||
}); | |||||
}, | }, | ||||
childTypeClick(childType) { | |||||
this.childType = childType | |||||
this.search() | |||||
}, | |||||
showProblemDetail(item) { | |||||
this.$emit('showProblemDetail', {id: 1, driverId: 27}) | |||||
}, | |||||
addClick() { | |||||
this.$emit('askClear', this.driverId) | |||||
this.addVisible = true | |||||
}, | |||||
successSubmit() { | |||||
this.addVisible = false | |||||
this.search() | |||||
}, | |||||
search() { | |||||
let me = this | |||||
this.searchLoading = true | |||||
me.$emit('qualityClear', me.driverId) | |||||
setTimeout(function () { | |||||
me.searchLoading = false | |||||
}, 2000) | |||||
getQuaTrend(){ | |||||
api.getQuaTrend().then(res => { | |||||
console.log(res) | |||||
}).catch(err => { | |||||
}); | |||||
} | } | ||||
}, | }, | ||||
} | } | ||||
} | } | ||||
> div:first-child { | > div:first-child { | ||||
height: 2.2rem; | |||||
> div:last-child { | > div:last-child { | ||||
padding: 0rem 0rem 0.1rem 0rem; | padding: 0rem 0rem 0.1rem 0rem; | ||||
position: relative; | position: relative; | ||||
} | } | ||||
> div:nth-child(2) { | > div:nth-child(2) { | ||||
height: 2.46rem; | |||||
> div:last-child { | > div:last-child { | ||||
padding: 0rem 0rem 0.1rem 0rem; | padding: 0rem 0rem 0.1rem 0rem; | ||||
position: relative; | position: relative; |
const chart = new G2.Chart({ | const chart = new G2.Chart({ | ||||
container: this.id, | container: this.id, | ||||
autoFit: true, | autoFit: true, | ||||
padding: [40,270,20,0], | |||||
padding: [40,270,40,0], | |||||
height: this.height | height: this.height | ||||
}); | }); | ||||