Commit 0f973b19 authored by 华国豪's avatar 华国豪 🙄
parents 15409a74 3af399a7
......@@ -39,16 +39,11 @@ module.exports = function () {
}
if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}
......@@ -314,7 +314,6 @@ export default {
getGoodsTypeManager() {
this.apipost("Shop_post_GetCommodityCategoryList",{Name: "", ParentId: 0},res => {
if (res.data.resultCode === 1) {
console.log(res.data.data)
this.GoodsTypeList = res.data.data;
} else {
this.Error(res.data.message);
......
......@@ -314,75 +314,91 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('fnc.lcleixing')">
<el-radio v-model="radio" v-if="addMsg.TemplateType!=8" disabled="disabled" :label="1">{{$t('restaurant.res_income')}}</el-radio>
<el-radio v-model="radio" v-else @change="getCostTypeList(1),CostIdS=[],accListShow=true" :label="1">{{$t('restaurant.res_income')}}</el-radio>
<el-radio v-model="radio" v-if="addMsg.TemplateType!=8" disabled="disabled" :label="2">{{$t('restaurant.res_outcome')}}</el-radio>
<el-radio v-model="radio" v-else @change="getCostTypeList(2),CostIdS=[],accListMsg=[],accListShow=false" :label="2">{{$t('restaurant.res_outcome')}}</el-radio>
<el-radio v-model="radio" v-if="addMsg.TemplateType!=8" disabled="disabled" :label="7">{{$t('fnc.guazhang')}}</el-radio>
<el-radio v-model="radio" v-else @change="getCostTypeList(2),CostIdS=[],accListMsg=[],accListShow=false" :label="7">{{$t('fnc.guazhang')}}</el-radio>
<el-radio v-model="radio" v-if="addMsg.TemplateType!=8" disabled="disabled" :label="8">折让</el-radio>
<el-radio v-model="radio" v-else @change="getCostTypeList(2),CostIdS=[],accListMsg=[],accListShow=false" :label="8">折让</el-radio>
</el-form-item>
<el-form-item :label="$t('fnc.scfujian')">
<el-radio v-model="addMsg.IsUploadPic" :label="0">{{$t('fnc.buqiyong')}}</el-radio>
<el-radio v-model="addMsg.IsUploadPic" :label="1">{{$t('fnc.qiyong')}}</el-radio>
</el-form-item>
<el-form-item :label="$t('ios.sfxianshi')">
<el-radio @change="RadioShow" v-model="addMsg.IsShow" :label="1">{{$t('pub.yes')}}</el-radio>
<el-radio @change="RadioShow" v-model="addMsg.IsShow" :label="2">{{$t('pub.no')}}</el-radio>
</el-form-item>
<el-form-item v-show="addMsg.IsShow==2" label="可显示部门">
<el-select filterable multiple v-model='addMsg.ShowDepartmentList' class="w200" style="max-height:100px;overflow:hidden" size="small">
<el-option v-for='item in DepartmentList'
:label='item.DepartmentName'
:value='item.DepartmentID'
:key='item.DepartmentID'>
</el-option>
</el-select>
</el-form-item>
<el-form-item v-show="addMsg.IsShow==2" label="可显示人">
<el-select filterable multiple v-model='addMsg.ShowEmployeeList' class="w200" style="max-height:100px;overflow:hidden" size="small">
<el-option v-for='item in EmployeeList'
:label='item.EmName'
:value='item.EmployeeId'
:key='item.EmployeeId'>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('fnc.syfeiyong')" v-if="addMsg.TemplateType==8" class="_treeselect">
<!-- <el-select filterable multiple v-model='CostIdS' class="w200" @change="disabledOption2">
<el-option label='通用' value='0' key='0'></el-option>
<el-option v-for='item in CostTypeList'
<el-form-item v-if="xingzhenState" label="审批类型">
<el-select filterable v-model='addMsg.PropertyType' class="w200">
<el-option v-for='item in PropertyTypeList'
:label='item.Name'
:value='item.ID'
:key='item.ID'
:disabled="item.disabled">
:key='item.ID'>
</el-option>
</el-select> -->
<!-- :sort-value-by="sortValueBy" -->
<treeselect
class="w230"
v-model="CostIdS"
value-consists-of="LEAF_PRIORITY"
:placeholder="$t('pub.pleaseSel')"
:multiple="true"
:options="CostTypeList"
noChildrenText=''
:normalizer="normalizer"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('fnc.syzhanghu')" v-if="accListShow">
<el-checkbox :indeterminate="isIndeterminate" v-model="AccCheckAll" @change="handleCheckAllChangeAcc">{{$t('system.table_chekAll')}}</el-checkbox>
<div style="margin: 15px 0;"></div>
<el-checkbox-group v-model="accListMsg" @change="handleCheckedCitiesChangeAcc" text-color="#409EFF" fill="#409EFF">
<el-checkbox :value="1" :label="1" :key="1">{{$t('fnc.yinhang')}}</el-checkbox>
<el-checkbox :value="2" :label="2" :key="2">{{$t('fnc.xianjin')}}</el-checkbox>
<el-checkbox :value="3" :label="3" :key="3">{{$t('fnc.pingtai')}}</el-checkbox>
<el-checkbox :value="4" :label="4" :key="4">{{$t('fnc.zjinchi')}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<!-- 判断行政流程修改还是 -->
<div v-show="!xingzhenState">
<el-form-item :label="$t('fnc.lcleixing')">
<el-radio v-model="radio" v-if="addMsg.TemplateType!=8" disabled="disabled" :label="1">{{$t('restaurant.res_income')}}</el-radio>
<el-radio v-model="radio" v-else @change="getCostTypeList(1),CostIdS=[],accListShow=true" :label="1">{{$t('restaurant.res_income')}}</el-radio>
<el-radio v-model="radio" v-if="addMsg.TemplateType!=8" disabled="disabled" :label="2">{{$t('restaurant.res_outcome')}}</el-radio>
<el-radio v-model="radio" v-else @change="getCostTypeList(2),CostIdS=[],accListMsg=[],accListShow=false" :label="2">{{$t('restaurant.res_outcome')}}</el-radio>
<el-radio v-model="radio" v-if="addMsg.TemplateType!=8" disabled="disabled" :label="7">{{$t('fnc.guazhang')}}</el-radio>
<el-radio v-model="radio" v-else @change="getCostTypeList(2),CostIdS=[],accListMsg=[],accListShow=false" :label="7">{{$t('fnc.guazhang')}}</el-radio>
<el-radio v-model="radio" v-if="addMsg.TemplateType!=8" disabled="disabled" :label="8">折让</el-radio>
<el-radio v-model="radio" v-else @change="getCostTypeList(2),CostIdS=[],accListMsg=[],accListShow=false" :label="8">折让</el-radio>
</el-form-item>
<el-form-item :label="$t('fnc.scfujian')">
<el-radio v-model="addMsg.IsUploadPic" :label="0">{{$t('fnc.buqiyong')}}</el-radio>
<el-radio v-model="addMsg.IsUploadPic" :label="1">{{$t('fnc.qiyong')}}</el-radio>
</el-form-item>
<el-form-item :label="$t('ios.sfxianshi')">
<el-radio @change="RadioShow" v-model="addMsg.IsShow" :label="1">{{$t('pub.yes')}}</el-radio>
<el-radio @change="RadioShow" v-model="addMsg.IsShow" :label="2">{{$t('pub.no')}}</el-radio>
</el-form-item>
<el-form-item v-show="addMsg.IsShow==2" label="可显示部门">
<el-select filterable multiple v-model='addMsg.ShowDepartmentList' class="w200" style="max-height:100px;overflow:hidden" size="small">
<el-option v-for='item in DepartmentList'
:label='item.DepartmentName'
:value='item.DepartmentID'
:key='item.DepartmentID'>
</el-option>
</el-select>
</el-form-item>
<el-form-item v-show="addMsg.IsShow==2" label="可显示人">
<el-select filterable multiple v-model='addMsg.ShowEmployeeList' class="w200" style="max-height:100px;overflow:hidden" size="small">
<el-option v-for='item in EmployeeList'
:label='item.EmName'
:value='item.EmployeeId'
:key='item.EmployeeId'>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('fnc.syfeiyong')" v-if="addMsg.TemplateType==8" class="_treeselect">
<!-- <el-select filterable multiple v-model='CostIdS' class="w200" @change="disabledOption2">
<el-option label='通用' value='0' key='0'></el-option>
<el-option v-for='item in CostTypeList'
:label='item.Name'
:value='item.ID'
:key='item.ID'
:disabled="item.disabled">
</el-option>
</el-select> -->
<!-- :sort-value-by="sortValueBy" -->
<treeselect
class="w230"
v-model="CostIdS"
value-consists-of="LEAF_PRIORITY"
:placeholder="$t('pub.pleaseSel')"
:multiple="true"
:options="CostTypeList"
noChildrenText=''
:normalizer="normalizer"/>
</el-form-item>
<el-form-item :label="$t('fnc.syzhanghu')" v-if="accListShow">
<el-checkbox :indeterminate="isIndeterminate" v-model="AccCheckAll" @change="handleCheckAllChangeAcc">{{$t('system.table_chekAll')}}</el-checkbox>
<div style="margin: 15px 0;"></div>
<el-checkbox-group v-model="accListMsg" @change="handleCheckedCitiesChangeAcc" text-color="#409EFF" fill="#409EFF">
<el-checkbox :value="1" :label="1" :key="1">{{$t('fnc.yinhang')}}</el-checkbox>
<el-checkbox :value="2" :label="2" :key="2">{{$t('fnc.xianjin')}}</el-checkbox>
<el-checkbox :value="3" :label="3" :key="3">{{$t('fnc.pingtai')}}</el-checkbox>
<el-checkbox :value="4" :label="4" :key="4">{{$t('fnc.zjinchi')}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</div>
<el-form-item label="排序">
<el-input v-model="addMsg.Sort" class="w250" maxlength="60"></el-input>
</el-form-item>
......@@ -550,6 +566,8 @@ export default {
components: { Treeselect },
data(){
return{
PropertyTypeList:[],
xingzhenState:false,
DepartmentList:[],
EmployeeList:[],
Auditshow:false,
......@@ -574,6 +592,7 @@ export default {
IsShow: 1,
ShowEmployeeList:[],
ShowDepartmentList:[],
PropertyType:'',
},
AuditUserList:{
EmName:'',
......@@ -738,7 +757,13 @@ export default {
}
},
mounted(){
if(this.$route.query.xingzhen){
this.xingzhenState=true;
this.addMsg.TemplateSorce=2;
this.CostIdS.push('0')
// this.addMsg.PropertyType="";
this.getPropertyType();
}
this.getCompanyList();
this.getMaxDepartmentTierList();
if(this.TemplateId!=0){
......@@ -752,6 +777,18 @@ export default {
this.getDepartment();
},
methods:{
getPropertyType(){
this.apipost(
"FinancialFlowTemplate_post_GetPropertyTypeList",
{},
res => {
if (res.data.resultCode == 1) {
this.PropertyTypeList=res.data.data;
}
},
err => {}
);
},
//根据多公司获取部门
getDepartment() {
let msg= {
......@@ -846,6 +883,7 @@ export default {
this.addMsg.IsShow = data.IsShow;
this.addMsg.ShowEmployeeList = data.ShowEmployeeList;
this.addMsg.ShowDepartmentList = data.ShowDepartmentList;
this.addMsg.PropertyType= data.PropertyType;
if (data.list && data.list[0] !== -1) {
......@@ -934,6 +972,12 @@ export default {
}
},
saveApproval(){ // 保存数据
if(this.xingzhenState){
if(!this.addMsg.PropertyType || this.addMsg.PropertyType=='' ){
this.Error("请选择审批类型!");
return;
}
}
if (this.accListMsg.length === 0) {
this.addMsg.list = [-1]
} else {
......@@ -1001,10 +1045,20 @@ export default {
if(res.data.resultCode==1){
this.loading=false;
this.$message.success(this.$t('tips.czchenggong'))
this.$router.push({ name: 'FProcessManagement',query:{"type":this.addMsg.TemplateType,'Branch_Id':this.$route.query.Branch_Id} })
if(this.xingzhenState){
this.$router.push({ name: 'XProcessmanagement',query:{"type":this.addMsg.TemplateType,'Branch_Id':this.$route.query.Branch_Id} })
}else{
this.$router.push({ name: 'FProcessManagement',query:{"type":this.addMsg.TemplateType,'Branch_Id':this.$route.query.Branch_Id} })
}
}else{
this.loading=false;
if(this.xingzhenState){
this.addMsg.TemplateSorce=2;
}
this.addMsg = {
PropertyType:'',
Id:this.addMsg.Id,
Name:this.addMsg.Name,
DescribeInfo:this.addMsg.DescribeInfo,
......
......@@ -350,7 +350,6 @@
})
});
this.list = list;
console.log(this.list,'list');
this.$forceUpdate();
}
} else {
......
......@@ -627,7 +627,7 @@
this.list[this.findex].HotelOrderList[this.childIndex].OrderDetailsList.forEach((subItem,
subIndex) => {
//判断是否有库存价格
if (subIndex == 1 && ckedObj.CostPrice > 0) {
if (subIndex == 1 && ckedObj.CostPrice > 0 && ckedObj.Inventory>0) {
subItem.IsHaveStockPrice = 1;
} else {
subItem.IsHaveStockPrice = 0;
......
......@@ -304,7 +304,7 @@ export default {
.leaderTotalTable tr td .pHouseStyle{border-bottom: 1px solid #ccc; height: 20px; line-height: 20px;}
.leaderTotalTable tr td .pHouseStyle:last-child{border-bottom: none;}
.leaderTotalTable tr td .pDateStyle{border-bottom: 1px solid #ccc; height: 20px; line-height: 20px; margin-top: 0;}
.leaderTotalTable tr td .pMsgStyle{; padding: 0 10px; line-height: 20px;}
.leaderTotalTable tr td .pMsgStyle{padding: 0 10px; line-height: 20px;}
.leaderTotalTable tr td .link p:hover{text-decoration: underline; cursor: pointer;}
.leaderTotalTable tr td .phoverStype:hover{text-decoration: underline; cursor: pointer;}
.dmcTotalTable_tripDetails {padding: 0; box-shadow: 0px 1px 3px 0px #dedede; max-height: 400px;overflow-y: auto;}
......
......@@ -127,6 +127,7 @@
{{(childItem.PeopleNum-childItem.Discount)*childItem.PeoplePrice}}
</td>
<td>
<!--返佣-->
<el-input class='w50 tcenter' @input='calculationPrice(subItem)' v-model='childItem.DiscountPrice'
@keyup.native="checkInteger(childItem,'DiscountPrice')"></el-input>%
</td>
......
......@@ -127,13 +127,10 @@ export default {
res => {
this.loading = false;
if (res.data.resultCode == 1) {
console.log("res",res);
this.Actitylist = res.data.data;
if(this.Actitylist.length>0){
this.msg.CouponId=this.Actitylist[0].Id;
}
} else {
this.$message.error(res.data.message);
}
......@@ -149,7 +146,6 @@ export default {
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.list = res.data.data.pageData;
this.total=res.data.data.count;
} else {
......@@ -167,9 +163,7 @@ export default {
this.msg.pageIndex = 1;
this.currentPage = 1;
},
},
mounted() {
this.GetActity();
let userInfo = this.getLocalStorage();
......
<template>
<div style="position: relative;width: 100%; height: 100%;">
<div style="position: absolute; left: -20px; top: 0; width: 300px; color: #fff; line-height: 40px; text-align: center; height: 40px; background:#0a8cff; z-index: 50;border-bottom: 1px solid #2f9dff">
<!-- <input type="button" value="1" @click="playGj"/> --> {{$t('salesModule.SalesGuiji')}}
<span @click="toggleDiv" style="float: right; width: 40px; height: 40px; text-align: center; color: #fff; cursor: pointer;">
<i v-show="isToggle==1" class="el-icon-caret-top"></i>
<i v-show="isToggle==2" class="el-icon-caret-bottom"></i>
</span>
</div>
<div class="yingyanMeta" id='yingyanMeta'>
<div class="title">
<div @click="getType(1)">
<i class="iconfont icon-shipinjiankong"></i>{{$t('fnc.dqzhuangtai')}}
<div v-show="mapType==1" class="titleSjx"></div>
</div>
<div @click="getType(2)">
<i class="iconfont icon-guijitu"></i> {{$t('fnc.dqzhuangtai')}} {{$t('salesModule.GuijiSearch')}}
<div v-show="mapType==2" class="titleSjx"></div>
</div>
</div>
<div>
<div v-show="mapType==1">
<div class="isOnlineType">
<li @click="online=1">
{{$t('advmanager.v_all')}}{{personData.length}}
<div class="cked" v-show="online==1"></div>
</li>
<li @click="online=2,filterText1=''">{{$t('salesModule.OnLine')}}{{onlinePerson}}
<div class="cked" v-show="online==2"></div>
</li>
<li @click="online=3,filterText1=''">{{$t('salesModule.OutLine')}}{{personData.length-onlinePerson}}
<div class="cked" v-show="online==3"></div>
</li>
</div>
<p v-show="online==1" style="margin:14px 0; padding: 0 14px; ">
<el-input class='w272' :placeholder="$t('salesModule.EmployeeSearch')" v-model="filterText1"><i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input>
</p>
<div class="yingyanMetacont">
<div style="margin-bottom:70px;" v-if="online==1">
<el-tree :data='treeData' ref="tree1" :filter-node-method="filterNode1" v-show="online==1" :props="defaultProps1">
<span class="custom-tree-node" style="width: 100%;" slot-scope="{ node, data }">
<span class="fz14" v-if="data.Type==0">{{ node.label }}</span>
<span class="fz14" v-if="data.Type==2" style="width: 100%; display: inline-block;" @click="getOneMarker(data)">
<img v-if='!data.EmPhoto':title="info(data.Phone,data.Type)!='离线'?(info(data.Phone,data.Type)!='未开通定位'?'在线':'未开通定位'):'离线'" src="../../assets/img/litheader.png" class="yingyanIcon"/>
<img v-if='data.EmPhoto' :title="info(data.Phone,data.Type)!='离线'?(info(data.Phone,data.Type)!='未开通定位'?'在线':'未开通定位'):'离线'" :onerror="defaultImg" :src='data.EmPhoto' class="yingyanIcon" :class="{notOnlineStyle:info(data.Phone,data.Type)=='未开通定位'||info(data.Phone,data.Type)=='离线'}"/>
{{ node.label }}
</span>
</span>
</el-tree>
</div>
<div class="yingyanMsgList" v-show="online==2">
<ul>
<li v-for='item in onlineTypeList' @click="getOnlineMarker(item)">
<img v-if='!item.EmPhoto' src="../../assets/img/litheader.png" class="yingyanIcon"/>
<img v-if='item.EmPhoto' :onerror="defaultImg" :src="item.EmPhoto" class="yingyanIcon"> {{item.EmName}}
<span>{{info(item.entity_name,2)}}</span>
</li>
</ul>
</div>
<div class="yingyanMsgList" v-show="online==3">
<ul>
<li v-for='item in leaveLineTypeList' @click="getOnlineMarker(item)" >
<img v-if='!item.EmPhoto' src="../../assets/img/litheader.png" class="yingyanIcon"/>
<img v-if='item.EmPhoto' :onerror="defaultImg" :src="item.EmPhoto" class="yingyanIcon notOnlineStyle" > {{item.EmName}}
<span style="font-size: 12px;">{{item.DepartmentName}}</span>
</li>
</ul>
</div>
</div>
</div>
<div v-show="mapType==2">
<p style="margin:14px 0; padding: 0 14px;">
<el-date-picker class='w272' value-format="yyyy-MM-dd" v-model='dateTime' type="date" @change='getPersonListByTime'></el-date-picker>
</p>
<p style="margin:14px 0; padding: 0 14px; ">
<el-input class='w272' :placeholder="$t('salesModule.EmployeeSearch')" v-model="filterText"><i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input>
</p>
<!-- -->
<div v-if="FinalYingYan" class="yingyanMetacont">
<div style="margin-bottom:70px;">
<el-tree :data='trackTreeData' ref="tree" :filter-node-method="filterNode" :props="defaultProps">
<span class="custom-tree-node" style="width: 100%;" slot-scope="{ node, data }">
<span class="fz14" v-if="data.Type==0" >{{ node.label }}</span>
<span class="fz14" v-if="data.Type==2" style="width: 100%; display: inline-block;" @click="getPersonList(data)">
<img v-if='!data.EmPhoto' :title="info(data.Phone,data.Type)!='离线'?(info(data.Phone,data.Type)!='未开通定位'?'在线':'未开通定位'):'离线'" src="../../assets/img/litheader.png" class="yingyanIcon"/>
<img v-if='data.EmPhoto' :title="info(data.Phone,data.Type)!='离线'?(info(data.Phone,data.Type)!='未开通定位'?'在线':'未开通定位'):'离线'" :onerror="defaultImg" :src='data.EmPhoto' class="yingyanIcon" :class="{notOnlineStyle:info(data.Phone,data.Type)=='未开通定位'||info(data.Phone,data.Type)=='离线'}"/>
{{ node.label }}
<em style="float: right; font-size:12px; font-style: normal; margin-right: 10px;">{{getDistance(data)}}{{data.distance|FileSizeFormat(data.distance)}}</em>
</span>
</span>
</el-tree>
</div>
</div>
</div>
</div>
</div>
<div class="yingyanRightMeta" v-show='mapType==1'>
<p>
{{$t('salesModule.ShowAll')}}
<el-switch v-model="isShowAll" active-value="1" inactive-value="0" @change='isShowAllMarkers'></el-switch>
</p>
<p>
{{$t('salesModule.EquipNum')}}:{{totalNum}}
</p>
</div>
<div class="yingyanRightMeta" v-show='mapType==2'>
<p>{{$t('salesModule.GuijiJP')}}
<el-switch v-model="isjiuzheng" active-value="1" inactive-value="0" @change='isJZ'></el-switch>
</p>
<p v-show="isjiuzheng==1">
<label><input value="need_denoise" v-model="isCkedAll" type="checkbox" @change="isJZ">{{$t('salesModule.QZ')}}</label>
<label><input value="need_vacuate" v-model="isCkedAll" type="checkbox" @change="isJZ">{{$t('salesModule.CX')}}</label>
<label><input value="need_mapmatch" v-model="isCkedAll" type="checkbox" @change="isJZ">{{$t('salesModule.BL')}}</label>
</p>
<p v-show="isjiuzheng==1">{{$t('salesModule.MoveStyle')}}
<label><input type="radio" v-model="transportMode" value="auto" @change="isJZ">{{$t('salesModule.Auto')}}</label>
<label><input type="radio" v-model="transportMode" value="driving" @change="isJZ">{{$t('salesModule.Drive')}}</label>
<label><input type="radio" v-model="transportMode" value="riding" @change="isJZ">{{$t('salesModule.Cycling')}}</label>
<label><input type="radio" v-model="transportMode" value="walking" @change="isJZ">{{$t('salesModule.Walk')}}</label>
</p>
</div>
<div style="width:100%;height:100%; border:1px solid #eee" id="container"></div>
</div>
<div style="position: relative;width: 100%; height: 100%;">
<div
style="position: absolute; left: -20px; top: 0; width: 300px; color: #fff; line-height: 40px; text-align: center; height: 40px; background:#0a8cff; z-index: 50;border-bottom: 1px solid #2f9dff"
>
<!-- <input type="button" value="1" @click="playGj"/> -->
{{ $t("salesModule.SalesGuiji") }}
<span
@click="toggleDiv"
style="float: right; width: 40px; height: 40px; text-align: center; color: #fff; cursor: pointer;"
>
<i v-show="isToggle == 1" class="el-icon-caret-top"></i>
<i v-show="isToggle == 2" class="el-icon-caret-bottom"></i>
</span>
</div>
<div class="yingyanMeta" id="yingyanMeta">
<div class="title">
<div @click="getType(1)">
<i class="iconfont icon-shipinjiankong"></i
>{{ $t("fnc.dqzhuangtai") }}
<div v-show="mapType == 1" class="titleSjx"></div>
</div>
<div @click="getType(2)">
<i class="iconfont icon-guijitu"></i> {{ $t("fnc.dqzhuangtai") }}
{{ $t("salesModule.GuijiSearch") }}
<div v-show="mapType == 2" class="titleSjx"></div>
</div>
</div>
<div>
<div v-show="mapType == 1">
<div class="isOnlineType">
<li @click="online = 1">
{{ $t("advmanager.v_all") }}{{ personData.length }}
<div class="cked" v-show="online == 1"></div>
</li>
<li @click="(online = 2), (filterText1 = '')">
{{ $t("salesModule.OnLine") }}{{ onlinePerson }}
<div class="cked" v-show="online == 2"></div>
</li>
<li @click="(online = 3), (filterText1 = '')">
{{ $t("salesModule.OutLine") }}{{
personData.length - onlinePerson
}}
<div class="cked" v-show="online == 3"></div>
</li>
</div>
<p v-show="online == 1" style="margin:14px 0; padding: 0 14px; ">
<el-input
class="w272"
:placeholder="$t('salesModule.EmployeeSearch')"
v-model="filterText1"
><i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
</p>
<div class="yingyanMetacont">
<div style="margin-bottom:70px;" v-if="online == 1">
<el-tree
:data="treeData"
ref="tree1"
:filter-node-method="filterNode1"
v-show="online == 1"
:props="defaultProps1"
>
<span
class="custom-tree-node"
style="width: 100%;"
slot-scope="{ node, data }"
>
<span class="fz14" v-if="data.Type == 0">{{
node.label
}}</span>
<span
class="fz14"
v-if="data.Type == 2"
style="width: 100%; display: inline-block;"
@click="getOneMarker(data)"
>
<img
v-if="!data.EmPhoto"
:title="
info(data.Phone, data.Type) != '离线'
? info(data.Phone, data.Type) != '未开通定位'
? '在线'
: '未开通定位'
: '离线'
"
src="../../assets/img/litheader.png"
class="yingyanIcon"
/>
<img
v-if="data.EmPhoto"
:title="
info(data.Phone, data.Type) != '离线'
? info(data.Phone, data.Type) != '未开通定位'
? '在线'
: '未开通定位'
: '离线'
"
:onerror="defaultImg"
:src="data.EmPhoto"
class="yingyanIcon"
:class="{
notOnlineStyle:
info(data.Phone, data.Type) == '未开通定位' ||
info(data.Phone, data.Type) == '离线'
}"
/>
{{ node.label }}
</span>
</span>
</el-tree>
</div>
<div class="yingyanMsgList" v-show="online == 2">
<ul>
<li
v-for="item in onlineTypeList"
@click="getOnlineMarker(item)"
>
<img
v-if="!item.EmPhoto"
src="../../assets/img/litheader.png"
class="yingyanIcon"
/>
<img
v-if="item.EmPhoto"
:onerror="defaultImg"
:src="item.EmPhoto"
class="yingyanIcon"
/>
{{ item.EmName }}
<span>{{ info(item.entity_name, 2) }}</span>
</li>
</ul>
</div>
<div class="yingyanMsgList" v-show="online == 3">
<ul>
<li
v-for="item in leaveLineTypeList"
@click="getOnlineMarker(item)"
>
<img
v-if="!item.EmPhoto"
src="../../assets/img/litheader.png"
class="yingyanIcon"
/>
<img
v-if="item.EmPhoto"
:onerror="defaultImg"
:src="item.EmPhoto"
class="yingyanIcon notOnlineStyle"
/>
{{ item.EmName }}
<span style="font-size: 12px;">{{
item.DepartmentName
}}</span>
</li>
</ul>
</div>
</div>
</div>
<div v-show="mapType == 2">
<p style="margin:14px 0; padding: 0 14px;">
<el-date-picker
class="w272"
value-format="yyyy-MM-dd"
v-model="dateTime"
type="date"
@change="getPersonListByTime"
></el-date-picker>
</p>
<p style="margin:14px 0; padding: 0 14px; ">
<el-input
class="w272"
:placeholder="$t('salesModule.EmployeeSearch')"
v-model="filterText"
><i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
</p>
<!-- -->
<div v-if="FinalYingYan" class="yingyanMetacont">
<div style="margin-bottom:70px;">
<el-tree
:data="trackTreeData"
ref="tree"
:filter-node-method="filterNode"
:props="defaultProps"
>
<span
class="custom-tree-node"
style="width: 100%;"
slot-scope="{ node, data }"
>
<span class="fz14" v-if="data.Type == 0">{{
node.label
}}</span>
<span
class="fz14"
v-if="data.Type == 2"
style="width: 100%; display: inline-block;"
@click="getPersonList(data)"
>
<img
v-if="!data.EmPhoto"
:title="
info(data.Phone, data.Type) != '离线'
? info(data.Phone, data.Type) != '未开通定位'
? '在线'
: '未开通定位'
: '离线'
"
src="../../assets/img/litheader.png"
class="yingyanIcon"
/>
<img
v-if="data.EmPhoto"
:title="
info(data.Phone, data.Type) != '离线'
? info(data.Phone, data.Type) != '未开通定位'
? '在线'
: '未开通定位'
: '离线'
"
:onerror="defaultImg"
:src="data.EmPhoto"
class="yingyanIcon"
:class="{
notOnlineStyle:
info(data.Phone, data.Type) == '未开通定位' ||
info(data.Phone, data.Type) == '离线'
}"
/>
{{ node.label }}
<em
style="float: right; font-size:12px; font-style: normal; margin-right: 10px;"
>{{ getDistance(data)
}}{{ data.distance | FileSizeFormat(data.distance) }}</em
>
</span>
</span>
</el-tree>
</div>
</div>
</div>
</div>
</div>
<div class="yingyanRightMeta" v-show="mapType == 1">
<p>
{{ $t("salesModule.ShowAll") }}
<el-switch
v-model="isShowAll"
active-value="1"
inactive-value="0"
@change="isShowAllMarkers"
></el-switch>
</p>
<p>{{ $t("salesModule.EquipNum") }}:{{ totalNum }}</p>
</div>
<div class="yingyanRightMeta" v-show="mapType == 2">
<p>
{{ $t("salesModule.GuijiJP") }}
<el-switch
v-model="isjiuzheng"
active-value="1"
inactive-value="0"
@change="isJZ"
></el-switch>
</p>
<p v-show="isjiuzheng == 1">
<label
><input
value="need_denoise"
v-model="isCkedAll"
type="checkbox"
@change="isJZ"
/>{{ $t("salesModule.QZ") }}</label
>
<label
><input
value="need_vacuate"
v-model="isCkedAll"
type="checkbox"
@change="isJZ"
/>{{ $t("salesModule.CX") }}</label
>
<label
><input
value="need_mapmatch"
v-model="isCkedAll"
type="checkbox"
@change="isJZ"
/>{{ $t("salesModule.BL") }}</label
>
</p>
<p v-show="isjiuzheng == 1">
{{ $t("salesModule.MoveStyle") }}
<label
><input
type="radio"
v-model="transportMode"
value="auto"
@change="isJZ"
/>{{ $t("salesModule.Auto") }}</label
>
<label
><input
type="radio"
v-model="transportMode"
value="driving"
@change="isJZ"
/>{{ $t("salesModule.Drive") }}</label
>
<label
><input
type="radio"
v-model="transportMode"
value="riding"
@change="isJZ"
/>{{ $t("salesModule.Cycling") }}</label
>
<label
><input
type="radio"
v-model="transportMode"
value="walking"
@change="isJZ"
/>{{ $t("salesModule.Walk") }}</label
>
</p>
</div>
<div
style="width:100%;height:100%; border:1px solid #eee"
id="container"
></div>
</div>
</template>
<script>
import BMap from 'BMap'
export default {
data() {
return {
mapX:'104.073652',
mapY:'30.664369',
playPoints:[],
MapObj:{},
playIndex:0,
isToggle:1,
filterText: "",
filterText1: "",
online: 1,
isCkedAll: [],
transportMode: 'auto',
isShowAll: '1',
isjiuzheng: '0',
defaultProps: {
children: "ChildList",
label: "DepartmentName",
disabled: "Disabled"
},
defaultProps1: {
children: "ChildList",
label: "DepartmentName",
disabled: "Disabled"
},
defaultImg: 'this.src="' + require("../../assets/img/litheader.png") + '"',
mapType: '1',
keys: '?ak=ZzGBZF6L0sgFDLlDohyvYhCnWy4dwksX&service_id=203768',
dateTime: '',
entity_name: '',
msg: {
Status: '0'
},
onlineType: 4,
onlineTypeList: [],
leaveLineTypeList: [],
totalNum: 0,
lastLocation: {},
locationStatus: '',
locationPhoto: '',
locationLastTime: '',
locationName: '',
loctionArr: {},
markersList: [],
list: [],
Point: [],
PositionList: [],
treeData: [],
trackTreeData: [],
personData: [],
onlinePerson: 0,
gettrackPageIndex:0,
getlistIndex:0,
FinalYingYan:true,
datainfo:{},
}
},
beforeDestroy() {
if(this.intervalid) { //如果定时器还在运行 或者直接关闭,不用判断
clearInterval(this.intervalid); //关闭
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
filterText1(val) {
this.$refs.tree1.filter(val);
}
},
filters: {
FileSizeFormat(value) {
return(value / 1000).toFixed(2) + 'Km'
}
},
created(){
},
methods: {
getPerson(id) {
this.apipost('admin_get_EmployeeGet', {
Id: id
}, res => {
if(res.data.resultCode == 1) {
this.datainfo=res.data.data;
this.filterText=this.datainfo.EmName;
let obj={};
obj.Phone=this.datainfo.EmLoginMobile
this.getPersonList(obj);
}
}, err => {})
},
toggleDiv(){
if(this.isToggle==1){
this.isToggle=2
document.getElementById('yingyanMeta').style.height='0'
}else{
this.isToggle=1
document.getElementById('yingyanMeta').style.height='500px'
}
},
filterNode(value, data) {
if(!value) return true;
return data.DepartmentName.indexOf(value) !== -1;
},
filterNode1(value, data) {
if(!value) return true;
return data.DepartmentName.indexOf(value) !== -1;
},
getType(val){
this.mapType=val
this.filterText1=''
if(val==1)
{ this.Point=[]
}
this.creatMap()
},
isJZ() {
let timestamp = new Date(this.dateTime)
let start_time = timestamp.getTime() / 1000
let end_time = start_time + 86400
let canshu = "need_denoise=0,need_vacuate=0,need_mapmatch=0";
this.isCkedAll.forEach(item => {
if(this.isCkedAll.findIndex(item => item == 'need_denoise') != -1) {
canshu = canshu.replace('need_denoise=0', 'need_denoise=1')
}
if(this.isCkedAll.findIndex(item => item == 'need_vacuate') != -1) {
canshu = canshu.replace('need_vacuate=0', 'need_vacuate=1')
}
if(this.isCkedAll.findIndex(item => item == 'need_mapmatch') != -1) {
canshu = canshu.replace('need_mapmatch=0', 'need_mapmatch=1')
}
})
this.gettrackPageIndex=1;
let url = this.keys + '&entity_name=' + this.entity_name + '&start_time=' + start_time + '&end_time=' + end_time + '&page_size=5000&is_processed=' + this.isjiuzheng +
'&process_option=' + canshu + ',transport_mode=' + this.transportMode;
this.gettrackPage(url);
this.Point = []
},
isShowAllMarkers() {
if(this.isShowAll == 0) {
this.totalNum = 0
this.lastLocation = {}
this.creatMap()
} else {
this.creatMap()
}
},
getOnlineMarker(treeObj) {
let obj = this.markersList.find(item => item.entity_name == treeObj.entity_name)
if(obj) {
this.loctionArr = obj.latest_location
if(obj.latest_location) {
this.lastLocation.log = obj.latest_location.longitude
this.lastLocation.lat = obj.latest_location.latitude
this.locationLastTime = obj.latest_location.loc_time
this.locationPhoto = treeObj.EmPhoto
this.locationName = treeObj.EmName
if(this.getOnlineStatus(obj.latest_location.loc_time) === 0) {
obj.latest_location.speed = obj.latest_location.speed || 0;
this.locationStatus = this.getSpeed(obj.latest_location.speed);
} else {
this.locationStatus = '离线';
}
this.creatMap()
}
}
},
getDistance(data) {
if(data.Phone) {
let timestamp = new Date(this.dateTime)
let start_time = timestamp.getTime() / 1000
let end_time = start_time + 86400
let canshu = "need_denoise=0,need_vacuate=0,need_mapmatch=0";
this.isCkedAll.forEach(item => {
if(this.isCkedAll.findIndex(item => item == 'need_denoise') != -1) {
canshu = canshu.replace('need_denoise=0', 'need_denoise=1')
}
if(this.isCkedAll.findIndex(item => item == 'need_vacuate') != -1) {
canshu = canshu.replace('need_vacuate=0', 'need_vacuate=1')
}
if(this.isCkedAll.findIndex(item => item == 'need_mapmatch') != -1) {
canshu = canshu.replace('need_mapmatch=0', 'need_mapmatch=1')
}
})
let url = this.keys + '&entity_name=' + data.Phone + '&start_time=' + start_time + '&end_time=' + end_time + '&page_index=1&page_size=1&is_processed=' + this.isjiuzheng +
'&process_option=' + canshu + ',transport_mode=' + this.transportMode;
this.$http.get('https://bird.ioliu.cn/v1?url=http://yingyan.baidu.com/api/v3/track/gettrack' + url).then(res => {
if(res.data.distance == undefined) {
data.distance = '0'
} else {
data.distance = res.data.distance
}
})
}
},
getOneMarker(treeObj) {
let obj = this.markersList.find(item => item.entity_name == treeObj.Phone)
if(obj) {
this.loctionArr = obj.latest_location
if(obj.latest_location) {
this.lastLocation.log = obj.latest_location.longitude
this.lastLocation.lat = obj.latest_location.latitude
this.locationLastTime = obj.latest_location.loc_time
this.locationPhoto = treeObj.EmPhoto
this.locationName = treeObj.DepartmentName
if(this.getOnlineStatus(obj.latest_location.loc_time) === 0) {
obj.latest_location.speed = obj.latest_location.speed || 0;
this.locationStatus = this.getSpeed(obj.latest_location.speed);
} else {
this.locationStatus = '离线';
}
this.creatMap()
}
}
},
/**
* 判断当前设备是否在线,规则是最后上传的轨迹点
* 时间在当前系统时间十分钟内判断为在线,否则为离线
*
* @param {number} time UNIX时间戳
* @return {number} 在线状态 0在线 1离线
*/
getOnlineStatus(time) {
var status = 0;
var timestamp = new Date().getTime() / 1000;
var timeDiff = (timestamp - time) / 60;
status = timeDiff >= 10 ? 1 : 0;
return status;
},
/**
* 判断当前设备是否为静止,规则是速度小于1km/h返回静止,
* 否则返回速度
*
* @param {number} speed 速度 单位为 km/h
* @return {string} 速度
*/
getSpeed(speed) {
var speedDesc
if(speed >= 150) {
speedDesc = ' - - ';
} else if(speed >= 1 && speed < 150) {
speedDesc = speed.toFixed(1) + 'km/h';
} else {
speedDesc = '静止';
}
return speedDesc;
},
info(phone, Type) {
if(Type == 2) {
if(phone != undefined && phone.length > 0) {
var eitem = this.markersList.find(item => item.entity_name == phone);
if(eitem) {
if(this.getOnlineStatus(eitem.latest_location.loc_time) === 0) {
eitem.latest_location.speed = eitem.latest_location.speed || 0;
return this.getSpeed(eitem.latest_location.speed);
} else {
return '离线';
}
} else {
return '未开通定位';
}
} else {
return '未开通定位';
}
}
},
getTrackTreeData() {
this.apipost('TaskManagemnet_get_GetEmpForNowDepartmentForPath', {
StartTime: this.dateTime
}, res => {
if(res.data.resultCode == 1) {
this.trackTreeData = res.data.data
}
}, err => {})
},
getData() {
this.apipost('TaskManagemnet_get_GetEmpForNowDepartment', this.msg, res => {
if(res.data.resultCode == 1) {
this.treeData = res.data.data.List
this.personData = res.data.data.entitiesR
this.creatMap()
} else {
}
}, err => {})
},
getlist() {
this.onlineTypeList = []
this.leaveLineTypeList = []
this.markersList=[]
let timestamp = new Date()
let start_time = timestamp.getTime() / 1000
let url = this.keys + '&timeStamp=' + start_time
this.getlistIndex=1
this.getlistPage(url)
// this.$http.get('https://bird.ioliu.cn/v1?url=http://yingyan.baidu.com/api/v3/entity/search' + url).then(res => {
// this.onlinePerson = 0
// this.markersList = res.data.entities
// this.personData.forEach(person => {
// let item = this.markersList.find(markers => markers.entity_name == person.entity_name)
// if(item) {
// let that = this
// if(that.getOnlineStatus(item.latest_location.loc_time) === 0) {
// this.onlineTypeList.push(person);
// this.onlinePerson += 1;
// } else {
// this.leaveLineTypeList.push(person)
// }
// } else {
// this.leaveLineTypeList.push(person)
// }
// });
//
// })
},
getlistPage(url){
let that=this
this.$http.get('https://bird.ioliu.cn/v1?url=http://yingyan.baidu.com/api/v3/entity/search' + url+'&page_index='+this.getlistIndex).then(res => {
this.markersList=this.markersList.concat(res.data.entities)
if(that.getlistIndex*1000<res.data.total){
that.getlistIndex+=1;
that.getlistPage(url);
}
else{
that.onlinePerson=0
that.personData.forEach(person => {
let item = that.markersList.find(markers => markers.entity_name == person.entity_name)
if(item) {
if(that.getOnlineStatus(item.latest_location.loc_time) === 0) {
that.onlineTypeList.push(person);
that.onlinePerson += 1;
} else {
that.leaveLineTypeList.push(person)
}
} else {
that.leaveLineTypeList.push(person)
}
});
}
});
},
// 轨迹请求
getPersonList(obj) {
this.entity_name = obj.Phone;
let timestamp = new Date(this.dateTime)
let start_time = timestamp.getTime() / 1000
let end_time = start_time + 86400
let canshu = "need_denoise=0,need_vacuate=0,need_mapmatch=0";
this.isCkedAll.forEach(item => {
if(this.isCkedAll.findIndex(item => item == 'need_denoise') != -1) {
canshu = canshu.replace('need_denoise=0', 'need_denoise=1')
}
if(this.isCkedAll.findIndex(item => item == 'need_vacuate') != -1) {
canshu = canshu.replace('need_vacuate=0', 'need_vacuate=1')
}
if(this.isCkedAll.findIndex(item => item == 'need_mapmatch') != -1) {
canshu = canshu.replace('need_mapmatch=0', 'need_mapmatch=1')
}
})
this.gettrackPageIndex=1;
let url = this.keys + '&entity_name=' + obj.Phone + '&start_time=' + start_time + '&end_time=' + end_time +'&page_size=5000&is_processed=' + this.isjiuzheng +
'&process_option=' + canshu + ',transport_mode=' + this.transportMode;
this.gettrackPage(url);
this.Point = []
},
gettrackPage(url){
this.$http.get('https://bird.ioliu.cn/v1?url=http://yingyan.baidu.com/api/v3/track/gettrack' + url+'&page_index='+this.gettrackPageIndex).then(res => {
let xy = res.data.points
if(xy != undefined) {
xy.forEach(x => {
this.Point.push({
xy: [x.latitude, x.longitude],time:x.loc_time
})
})
}
if(this.gettrackPageIndex*5000<res.data.total){
this.gettrackPageIndex+=1;
this.gettrackPage(url);
}
else{
this.creatMap();
}
});
},
getPersonListByTime() {
if(this.$route.query.EmployeeId){
let obj={};
obj.Phone=this.datainfo.EmLoginMobile
this.getPersonList(obj);
}
else{
this.filterText=''
this.getTrackTreeData();
}
},
formatDate(now) {
let dateTime = new Date(now * 1000)
   var year = dateTime.getFullYear(),
  month = dateTime.getMonth() + 1>=10?dateTime.getMonth() + 1:'0'+(dateTime.getMonth() + 1),
  date = dateTime.getDate()>=10?dateTime.getDate():'0'+dateTime.getDate(),
  hour = dateTime.getHours()>=10?dateTime.getHours():'0'+dateTime.getHours(),
  minute = dateTime.getMinutes()>=10?dateTime.getMinutes():'0'+dateTime.getMinutes(),
  second = dateTime.getSeconds()>=10?dateTime.getSeconds():'0'+dateTime.getSeconds();  
return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
},
playGj(){
let point = this.playPoints[this.playIndex];
if(this.playIndex > 0) {
this.MapObj.addOverlay(new BMap.Polyline([this.playPoints[this.playIndex - 1], this.playIndex], {strokeColor: "#ffffff", strokeWeight: 1, strokeOpacity: 1}));
}
this.playIndex++
if(this.playIndex < this.playPoints.length) {
this.playGj(this.playIndex)
//window.setTimeout("playGj(" + this.playIndex+ ")", 50);
} else {
}
},
creatMap() {
let map
map = new BMap.Map("container"); // 创建Map实例
//alert(typeof map)
this.MapObj=map
map.setCurrentCity("成都"); // 设置地图默认显示城市 此项是必须设置的
map.enableScrollWheelZoom(true); //开启鼠标滚轮缩放
map.centerAndZoom(new BMap.Point(this.mapX,this.mapY), 18); // 初始化地图,设置中心点坐标和地图级别
let PositionList = []
this.Point.forEach((x, index) => { //添加轨迹点
PositionList.push(new BMap.Point(x.xy[1], x.xy[0]))
})
this.playPoints=PositionList
if(this.Point.length > 0) {
let centerIndex = parseInt(this.Point.length / 2)
map.centerAndZoom(new BMap.Point(this.Point[centerIndex].xy[1], this.Point[centerIndex].xy[0]), 18);
let curve = new BMap.Polyline(PositionList, {
strokeColor: "#E95252",
strokeWeight:'8',//折线的宽度,以像素为单位
strokeOpacity: 1,//折线的透明度,取值范围0 - 1
});
//画轨迹图
map.addOverlay(curve);
}
if(this.markersList.length > 0&& this.mapType==1) {
this.personData.forEach(person => {
let item = this.markersList.find(markers => markers.entity_name == person.entity_name)
if(item) {
let myIcon = new BMap.Icon(this.domainManager().ViittoFileUrl+"/Upload/Icon/Common/positioning.png", new BMap.Size(32,40));
let point = new BMap.Point(item.latest_location.longitude, item.latest_location.latitude)
let marker
if(this.getOnlineStatus(item.latest_location.loc_time) === 0){
marker = new BMap.Marker(point)
}else{
marker = new BMap.Marker(point,{icon:myIcon})
}
map.addOverlay(marker);
let that = this
if(this.isShowAll==0){
marker.hide()
}
marker.addEventListener("click", function(e) {
let status
if(that.getOnlineStatus(item.latest_location.loc_time) === 0) {
item.latest_location.speed = item.latest_location.speed || 0;
status = that.getSpeed(item.latest_location.speed);
} else {
status = '离线';
}
let myGeo = new BMap.Geocoder();
myGeo.getLocation(point, function(res) {
let address
if(res) {
address = res.address
} else {
address = '无法定位'
}
let content = "<div class='mapLayer'>" +
"<p><img onerror='"+that.defaultImg+"' style='width:24px;height:24px;border-radius:12px;vertical-align: middle;' src='" + person.EmPhoto + "'>&nbsp;&nbsp;&nbsp;" + person.EmName + "</p>" +
"<p>状态:" + status + "</p>" +
"<p>地址:" + address + "</p>" +
"<p>定位:" + item.latest_location.longitude + ',' + item.latest_location.latitude + "</p>" +
"<p>时间:" + that.formatDate(item.latest_location.loc_time) + "</p>"
"</div>"
let infoWindow = new BMap.InfoWindow(content);
map.openInfoWindow(infoWindow, point); //开启信息窗口
})
});
}
});
}
if(this.mapType==2){
this.lastLocation = {}
// map.clearOverlays();
}
if(this.lastLocation.log && this.lastLocation.lat) { //单机打开弹窗
this.mapX=this.lastLocation.log
this.mapY=this.lastLocation.lat
let a = this.lastLocation.log
let b = this.lastLocation.lat
let point = new BMap.Point(this.lastLocation.log, this.lastLocation.lat);
if(this.isShowAll==0){
let myIcon = new BMap.Icon(this.domainManager().ViittoFileUrl+"/Upload/Icon/Common/positioning.png", new BMap.Size(32,40));
let marker = new BMap.Marker(point)
if(this.getOnlineStatus(this.locationLastTime) === 0){
marker = new BMap.Marker(point)
}else{
marker = new BMap.Marker(point,{icon:myIcon})
}
map.addOverlay(marker);
}
map.centerAndZoom(point, 18);
let myGeo = new BMap.Geocoder();
let that = this
myGeo.getLocation(point, function(res) {
let address
if(res) {
address = res.address
} else {
address = '无法定位'
}
let content = "<div class='mapLayer'>" +
"<p><img onerror='"+that.defaultImg+"' style='width:24px;height:24px;border-radius:12px;vertical-align: middle;' src='" + that.locationPhoto + "'>&nbsp;&nbsp;&nbsp;" + that.locationName + "</p>" +
"<p>状态:" + that.locationStatus + "</p>" +
"<p>地址:" + address + "</p>" +
"<p>定位:" + a + ',' + b + "</p>" +
"<p>时间:" + that.formatDate(that.locationLastTime) + "</p>"
"</div>"
let infoWindow = new BMap.InfoWindow(content);
map.openInfoWindow(infoWindow, point); //开启信息窗口
})
}
map.closeInfoWindow()
if(this.isShowAll == 1) {  // 获取经纬度范围参数
var  bs  =  map.getBounds();    //获取可视区域
var  bssw  =  bs.getSouthWest();    //可视区域左下角
var  bsne  =  bs.getNorthEast();    //可视区域右上角
var  topLat  =  bsne.lat;    
var  bottomLat  =  bssw.lat;    
var  leftLng  =  bssw.lng;    
var  rightLng  =  bsne.lng;
let timestamp = new Date()
let start_time = timestamp.getTime() / 1000
let url = this.keys + '&bounds=' + bottomLat + ',' + leftLng + ';' + topLat + ',' + rightLng + '&filter=&page_index=1&page_size=1000&timeStamp=' + start_time;
this.totalNum = 0
let that = this
this.$http.get('https://bird.ioliu.cn/v1?url=http://yingyan.baidu.com/api/v3/entity/boundsearch' + url).then(res => {
if(res.data.status==0){
this.personData.forEach(person => {
let item = res.data.entities.find(markers => markers.entity_name == person.entity_name)
if(item&&that.isShowAll==1) {
that.totalNum += 1
}
});
}else{
this.Error("请刷新重试!")
}
})
map.addEventListener("zoomend", function(evt) { //缩放地图
bs  =  map.getBounds();    //获取可视区域
bssw  =  bs.getSouthWest();    //可视区域左下角
bsne  =  bs.getNorthEast();    //可视区域右上角
topLat  =  bsne.lat;     
bottomLat  =  bssw.lat;     
leftLng  =  bssw.lng;     
rightLng  =  bsne.lng;
let url = that.keys + '&bounds=' + bottomLat + ',' + leftLng + ';' + topLat + ',' + rightLng + '&filter=&page_index=1&page_size=1000&timeStamp=' + start_time;
that.$http.get('https://bird.ioliu.cn/v1?url=http://yingyan.baidu.com/api/v3/entity/boundsearch' + url).then(res => {
that.totalNum = 0
if(res.data.entities) {
that.personData.forEach(person => {
let item = res.data.entities.find(markers => markers.entity_name == person.entity_name)
if(item&&that.isShowAll==1) {
that.totalNum += 1
}
});
}
})
})
map.addEventListener("moveend", function(evt) { //拖拽地图
bs  =  map.getBounds();    //获取可视区域
bssw  =  bs.getSouthWest();    //可视区域左下角
bsne  =  bs.getNorthEast();    //可视区域右上角
topLat  =  bsne.lat;     
bottomLat  =  bssw.lat;     
leftLng  =  bssw.lng;     
rightLng  =  bsne.lng;
let url = that.keys + '&bounds=' + bottomLat + ',' + leftLng + ';' + topLat + ',' + rightLng + '&filter=&page_index=1&page_size=1000&timeStamp=' + start_time;
that.$http.get('https://bird.ioliu.cn/v1?url=http://yingyan.baidu.com/api/v3/entity/boundsearch' + url).then(res => {
that.totalNum = 0
that.personData.forEach(person => {
let item = res.data.entities.find(markers => markers.entity_name == person.entity_name)
if(item&&that.isShowAll==1) {
that.totalNum += 1
}
});
})
});
}
},
},
mounted() {
let date = new Date();
let _y = date.getFullYear()
let _m = date.getMonth() + 1 >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1)
let _d = date.getDate()
this.dateTime = _y + '-' + _m + '-' + _d
this.getlist()
this.getTrackTreeData()
this.getData()
this.intervalid = setInterval(() => {
this.getlist()
}, 60000)
if(this.$route.query.EmployeeId){
let id=this.$route.query.EmployeeId;
this.FinalYingYan=false;
this.getPerson(id);
this.mapType=2;
}
}
}
import BMap from "BMap";
export default {
data() {
return {
mapX: "104.073652",
mapY: "30.664369",
playPoints: [],
MapObj: {},
playIndex: 0,
isToggle: 1,
filterText: "",
filterText1: "",
online: 1,
isCkedAll: [],
transportMode: "auto",
isShowAll: "1",
isjiuzheng: "0",
defaultProps: {
children: "ChildList",
label: "DepartmentName",
disabled: "Disabled"
},
defaultProps1: {
children: "ChildList",
label: "DepartmentName",
disabled: "Disabled"
},
defaultImg:
'this.src="' + require("../../assets/img/litheader.png") + '"',
mapType: "1",
keys: "?ak=ZzGBZF6L0sgFDLlDohyvYhCnWy4dwksX&service_id=203768",
dateTime: "",
entity_name: "",
msg: {
Status: "0"
},
onlineType: 4,
onlineTypeList: [],
leaveLineTypeList: [],
totalNum: 0,
lastLocation: {},
locationStatus: "",
locationPhoto: "",
locationLastTime: "",
locationName: "",
loctionArr: {},
markersList: [],
list: [],
Point: [],
PositionList: [],
treeData: [],
trackTreeData: [],
personData: [],
onlinePerson: 0,
gettrackPageIndex: 0,
getlistIndex: 0,
FinalYingYan: true,
datainfo: {},
page_size100: 100,
page_size: 1000,
page_size2: 5000
};
},
beforeDestroy() {
if (this.intervalid) {
//如果定时器还在运行 或者直接关闭,不用判断
clearInterval(this.intervalid); //关闭
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
filterText1(val) {
this.$refs.tree1.filter(val);
}
},
filters: {
FileSizeFormat(value) {
return (value / 1000).toFixed(2) + "Km";
}
},
created() {},
methods: {
getPerson(id) {
this.apipost(
"admin_get_EmployeeGet",
{
Id: id
},
res => {
if (res.data.resultCode == 1) {
this.datainfo = res.data.data;
this.filterText = this.datainfo.EmName;
let obj = {};
obj.Phone = this.datainfo.EmLoginMobile;
this.getPersonList(obj);
}
},
err => {}
);
},
toggleDiv() {
if (this.isToggle == 1) {
this.isToggle = 2;
document.getElementById("yingyanMeta").style.height = "0";
} else {
this.isToggle = 1;
document.getElementById("yingyanMeta").style.height = "500px";
}
},
filterNode(value, data) {
if (!value) return true;
return data.DepartmentName.indexOf(value) !== -1;
},
filterNode1(value, data) {
if (!value) return true;
return data.DepartmentName.indexOf(value) !== -1;
},
getType(val) {
this.mapType = val;
this.filterText1 = "";
if (val == 1) {
this.Point = [];
}
this.creatMap();
},
isJZ() {
let timestamp = new Date(this.dateTime);
let start_time = timestamp.getTime() / 1000;
let end_time = start_time + 86400;
let canshu = "need_denoise=0,need_vacuate=0,need_mapmatch=0";
this.isCkedAll.forEach(item => {
if (this.isCkedAll.findIndex(item => item == "need_denoise") != -1) {
canshu = canshu.replace("need_denoise=0", "need_denoise=1");
}
if (this.isCkedAll.findIndex(item => item == "need_vacuate") != -1) {
canshu = canshu.replace("need_vacuate=0", "need_vacuate=1");
}
if (this.isCkedAll.findIndex(item => item == "need_mapmatch") != -1) {
canshu = canshu.replace("need_mapmatch=0", "need_mapmatch=1");
}
});
this.gettrackPageIndex = 1;
let url =
this.keys +
"&entity_name=" +
this.entity_name +
"&start_time=" +
start_time +
"&end_time=" +
end_time +
"&page_size=5000&is_processed=" +
this.isjiuzheng +
"&process_option=" +
canshu +
",transport_mode=" +
this.transportMode;
this.gettrackPage(url);
this.Point = [];
},
isShowAllMarkers() {
if (this.isShowAll == 0) {
this.totalNum = 0;
this.lastLocation = {};
this.creatMap();
} else {
this.creatMap();
}
},
getOnlineMarker(treeObj) {
let obj = this.markersList.find(
item => item.entity_name == treeObj.entity_name
);
if (obj) {
this.loctionArr = obj.latest_location;
if (obj.latest_location) {
this.lastLocation.log = obj.latest_location.longitude;
this.lastLocation.lat = obj.latest_location.latitude;
this.locationLastTime = obj.latest_location.loc_time;
this.locationPhoto = treeObj.EmPhoto;
this.locationName = treeObj.EmName;
if (this.getOnlineStatus(obj.latest_location.loc_time) === 0) {
obj.latest_location.speed = obj.latest_location.speed || 0;
this.locationStatus = this.getSpeed(obj.latest_location.speed);
} else {
this.locationStatus = "离线";
}
this.creatMap();
}
} else {
this.Error("暂无定位数据");
}
},
getDistance(data) {
if (data.Phone) {
let timestamp = new Date(this.dateTime);
let start_time = timestamp.getTime() / 1000;
let end_time = start_time + 86400;
let canshu = "need_denoise=0,need_vacuate=0,need_mapmatch=0";
this.isCkedAll.forEach(item => {
if (this.isCkedAll.findIndex(item => item == "need_denoise") != -1) {
canshu = canshu.replace("need_denoise=0", "need_denoise=1");
}
if (this.isCkedAll.findIndex(item => item == "need_vacuate") != -1) {
canshu = canshu.replace("need_vacuate=0", "need_vacuate=1");
}
if (this.isCkedAll.findIndex(item => item == "need_mapmatch") != -1) {
canshu = canshu.replace("need_mapmatch=0", "need_mapmatch=1");
}
});
let url =
this.keys +
"&entity_name=" +
data.Phone +
"&start_time=" +
start_time +
"&end_time=" +
end_time +
"&page_index=1&page_size=1&is_processed=" +
this.isjiuzheng +
"&process_option=" +
canshu +
",transport_mode=" +
this.transportMode;
this.$http
.get(
"https://bird.ioliu.cn/v1?url=http://yingyan.baidu.com/api/v3/track/gettrack" +
url
)
.then(res => {
if (res.data.distance == undefined) {
data.distance = "0";
} else {
data.distance = res.data.distance;
}
});
}
},
getOneMarker(treeObj) {
let obj = this.markersList.find(
item => item.entity_name == treeObj.Phone
);
if (obj) {
this.loctionArr = obj.latest_location;
if (obj.latest_location) {
this.lastLocation.log = obj.latest_location.longitude;
this.lastLocation.lat = obj.latest_location.latitude;
this.locationLastTime = obj.latest_location.loc_time;
this.locationPhoto = treeObj.EmPhoto;
this.locationName = treeObj.DepartmentName;
if (this.getOnlineStatus(obj.latest_location.loc_time) === 0) {
obj.latest_location.speed = obj.latest_location.speed || 0;
this.locationStatus = this.getSpeed(obj.latest_location.speed);
} else {
this.locationStatus = "离线";
}
this.creatMap();
}
} else {
this.Error("暂无定位数据");
}
},
/**
* 判断当前设备是否在线,规则是最后上传的轨迹点
* 时间在当前系统时间十分钟内判断为在线,否则为离线
*
* @param {number} time UNIX时间戳
* @return {number} 在线状态 0在线 1离线
*/
getOnlineStatus(time) {
var status = 0;
var timestamp = new Date().getTime() / 1000;
var timeDiff = (timestamp - time) / 60;
status = timeDiff >= 10 ? 1 : 0;
return status;
},
/**
* 判断当前设备是否为静止,规则是速度小于1km/h返回静止,
* 否则返回速度
*
* @param {number} speed 速度 单位为 km/h
* @return {string} 速度
*/
getSpeed(speed) {
var speedDesc;
if (speed >= 150) {
speedDesc = " - - ";
} else if (speed >= 1 && speed < 150) {
speedDesc = speed.toFixed(1) + "km/h";
} else {
speedDesc = "静止";
}
return speedDesc;
},
info(phone, Type) {
if (Type == 2) {
if (phone != undefined && phone.length > 0) {
var eitem = this.markersList.find(item => item.entity_name == phone);
if (eitem) {
if (this.getOnlineStatus(eitem.latest_location.loc_time) === 0) {
eitem.latest_location.speed = eitem.latest_location.speed || 0;
return this.getSpeed(eitem.latest_location.speed);
} else {
return "离线";
}
} else {
return "未开通定位";
}
} else {
return "未开通定位";
}
}
},
getTrackTreeData() {
this.apipost(
"TaskManagemnet_get_GetEmpForNowDepartmentForPath",
{
StartTime: this.dateTime
},
res => {
if (res.data.resultCode == 1) {
this.trackTreeData = res.data.data;
}
},
err => {}
);
},
getData() {
this.apipost(
"TaskManagemnet_get_GetEmpForNowDepartment",
this.msg,
res => {
if (res.data.resultCode == 1) {
this.treeData = res.data.data.List;
this.personData = res.data.data.entitiesR;
this.creatMap();
} else {
}
},
err => {}
);
},
getlist() {
this.onlineTypeList = [];
this.leaveLineTypeList = [];
this.markersList = [];
let timestamp = new Date();
let start_time = timestamp.getTime() / 1000;
let url = this.keys + "&timeStamp=" + start_time;
this.getlistIndex = 1;
this.getlistPage(url);
},
getlistPage(url) {
let that = this;
this.$http
.get(
"https://bird.ioliu.cn/v1?url=http://yingyan.baidu.com/api/v3/entity/search" +
url +
"&page_index=" +
this.getlistIndex +
"&page_size" +
this.page_size100
)
.then(res => {
this.markersList = this.markersList.concat(res.data.entities);
if (that.getlistIndex * this.page_size100 < res.data.total) {
that.getlistIndex += 1;
that.getlistPage(url);
} else {
that.onlinePerson = 0;
that.personData.forEach(person => {
let item = that.markersList.find(
markers => markers.entity_name == person.entity_name
);
if (item) {
if (that.getOnlineStatus(item.latest_location.loc_time) === 0) {
that.onlineTypeList.push(person);
that.onlinePerson += 1;
} else {
that.leaveLineTypeList.push(person);
}
} else {
that.leaveLineTypeList.push(person);
}
});
}
});
},
// 轨迹请求
getPersonList(obj) {
this.entity_name = obj.Phone;
let timestamp = new Date(this.dateTime);
let start_time = timestamp.getTime() / 1000;
let end_time = start_time + 86400;
let canshu = "need_denoise=0,need_vacuate=0,need_mapmatch=0";
this.isCkedAll.forEach(item => {
if (this.isCkedAll.findIndex(item => item == "need_denoise") != -1) {
canshu = canshu.replace("need_denoise=0", "need_denoise=1");
}
if (this.isCkedAll.findIndex(item => item == "need_vacuate") != -1) {
canshu = canshu.replace("need_vacuate=0", "need_vacuate=1");
}
if (this.isCkedAll.findIndex(item => item == "need_mapmatch") != -1) {
canshu = canshu.replace("need_mapmatch=0", "need_mapmatch=1");
}
});
this.gettrackPageIndex = 1;
let url =
this.keys +
"&entity_name=" +
obj.Phone +
"&start_time=" +
start_time +
"&end_time=" +
end_time +
"&page_size=" +
this.page_size2 +
"&is_processed=" +
this.isjiuzheng +
"&process_option=" +
canshu +
",transport_mode=" +
this.transportMode;
this.gettrackPage(url);
this.Point = [];
},
gettrackPage(url) {
this.$http
.get(
"https://bird.ioliu.cn/v1?url=http://yingyan.baidu.com/api/v3/track/gettrack" +
url +
"&page_index=" +
this.gettrackPageIndex
)
.then(res => {
let xy = res.data.points;
if (xy != undefined) {
xy.forEach(x => {
this.Point.push({
xy: [x.latitude, x.longitude],
time: x.loc_time
});
});
}
if (this.gettrackPageIndex * this.page_size2 < res.data.total) {
this.gettrackPageIndex += 1;
this.gettrackPage(url);
} else {
this.creatMap();
}
});
},
getPersonListByTime() {
if (this.$route.query.EmployeeId) {
let obj = {};
obj.Phone = this.datainfo.EmLoginMobile;
this.getPersonList(obj);
} else {
this.filterText = "";
this.getTrackTreeData();
}
},
formatDate(now) {
let dateTime = new Date(now * 1000);
var year = dateTime.getFullYear(),
month =
dateTime.getMonth() + 1 >= 10
? dateTime.getMonth() + 1
: "0" + (dateTime.getMonth() + 1),
date =
dateTime.getDate() >= 10
? dateTime.getDate()
: "0" + dateTime.getDate(),
hour =
dateTime.getHours() >= 10
? dateTime.getHours()
: "0" + dateTime.getHours(),
minute =
dateTime.getMinutes() >= 10
? dateTime.getMinutes()
: "0" + dateTime.getMinutes(),
second =
dateTime.getSeconds() >= 10
? dateTime.getSeconds()
: "0" + dateTime.getSeconds();
return (
year +
"-" +
month +
"-" +
date +
" " +
hour +
":" +
minute +
":" +
second
);
},
playGj() {
let point = this.playPoints[this.playIndex];
if (this.playIndex > 0) {
this.MapObj.addOverlay(
new BMap.Polyline(
[this.playPoints[this.playIndex - 1], this.playIndex],
{ strokeColor: "#ffffff", strokeWeight: 1, strokeOpacity: 1 }
)
);
}
this.playIndex++;
if (this.playIndex < this.playPoints.length) {
this.playGj(this.playIndex);
} else {
}
},
creatMap() {
let map;
map = new BMap.Map("container"); // 创建Map实例
this.MapObj = map;
map.setCurrentCity("成都"); // 设置地图默认显示城市 此项是必须设置的
map.enableScrollWheelZoom(true); //开启鼠标滚轮缩放
map.centerAndZoom(new BMap.Point(this.mapX, this.mapY), 18); // 初始化地图,设置中心点坐标和地图级别
let PositionList = [];
this.Point.forEach((x, index) => {
//添加轨迹点
PositionList.push(new BMap.Point(x.xy[1], x.xy[0]));
});
this.playPoints = PositionList;
if (this.Point.length > 0) {
let centerIndex = parseInt(this.Point.length / 2);
map.centerAndZoom(
new BMap.Point(
this.Point[centerIndex].xy[1],
this.Point[centerIndex].xy[0]
),
18
);
let curve = new BMap.Polyline(PositionList, {
strokeColor: "#E95252",
strokeWeight: "8", //折线的宽度,以像素为单位
strokeOpacity: 1 //折线的透明度,取值范围0 - 1
});
//画轨迹图
map.addOverlay(curve);
}
let that = this;
if (this.markersList.length > 0 && this.mapType == 1) {
this.personData.forEach(person => {
let item = this.markersList.find(
markers => markers.entity_name == person.entity_name
);
if (item) {
let myIcon = new BMap.Icon(
this.domainManager().ViittoFileUrl +
"/Upload/Icon/Common/positioning.png",
new BMap.Size(32, 40)
);
let point = new BMap.Point(
item.latest_location.longitude,
item.latest_location.latitude
);
let marker;
if (this.getOnlineStatus(item.latest_location.loc_time) === 0) {
marker = new BMap.Marker(point);
} else {
marker = new BMap.Marker(point, { icon: myIcon });
}
map.addOverlay(marker);
if (this.isShowAll == 0) {
marker.hide();
}
marker.addEventListener("click", function(e) {
let status;
if (that.getOnlineStatus(item.latest_location.loc_time) === 0) {
item.latest_location.speed = item.latest_location.speed || 0;
status = that.getSpeed(item.latest_location.speed);
} else {
status = "离线";
}
let myGeo = new BMap.Geocoder();
myGeo.getLocation(point, function(res) {
let address;
if (res) {
address = res.address;
} else {
address = "无法定位";
}
let content =
"<div class='mapLayer'>" +
"<p><img onerror='" +
that.defaultImg +
"' style='width:24px;height:24px;border-radius:12px;vertical-align: middle;' src='" +
person.EmPhoto +
"'>&nbsp;&nbsp;&nbsp;" +
person.EmName +
"</p>" +
"<p>状态:" +
status +
"</p>" +
"<p>地址:" +
address +
"</p>" +
"<p>定位:" +
item.latest_location.longitude +
"," +
item.latest_location.latitude +
"</p>" +
"<p>时间:" +
that.formatDate(item.latest_location.loc_time) +
"</p>";
("</div>");
let infoWindow = new BMap.InfoWindow(content);
map.openInfoWindow(infoWindow, point); //开启信息窗口
});
});
}
});
}
if (this.mapType == 2) {
this.lastLocation = {};
}
if (this.lastLocation.log && this.lastLocation.lat) {
//单机打开弹窗
this.mapX = this.lastLocation.log;
this.mapY = this.lastLocation.lat;
let a = this.lastLocation.log;
let b = this.lastLocation.lat;
let point = new BMap.Point(
this.lastLocation.log,
this.lastLocation.lat
);
if (this.isShowAll == 0) {
let myIcon = new BMap.Icon(
this.domainManager().ViittoFileUrl +
"/Upload/Icon/Common/positioning.png",
new BMap.Size(32, 40)
);
let marker = new BMap.Marker(point);
if (this.getOnlineStatus(this.locationLastTime) === 0) {
marker = new BMap.Marker(point);
} else {
marker = new BMap.Marker(point, { icon: myIcon });
}
map.addOverlay(marker);
}
map.centerAndZoom(point, 18);
let myGeo = new BMap.Geocoder();
let that = this;
myGeo.getLocation(point, function(res) {
let address;
if (res) {
address = res.address;
} else {
address = "无法定位";
}
let content =
"<div class='mapLayer'>" +
"<p><img onerror='" +
that.defaultImg +
"' style='width:24px;height:24px;border-radius:12px;vertical-align: middle;' src='" +
that.locationPhoto +
"'>&nbsp;&nbsp;&nbsp;" +
that.locationName +
"</p>" +
"<p>状态:" +
that.locationStatus +
"</p>" +
"<p>地址:" +
address +
"</p>" +
"<p>定位:" +
a +
"," +
b +
"</p>" +
"<p>时间:" +
that.formatDate(that.locationLastTime) +
"</p>";
("</div>");
let infoWindow = new BMap.InfoWindow(content);
map.openInfoWindow(infoWindow, point); //开启信息窗口
});
}
map.closeInfoWindow();
let start_time;
if (this.isShowAll == 1) {
// 获取经纬度范围参数
var bs = map.getBounds(); //获取可视区域
var bssw = bs.getSouthWest(); //可视区域左下角
var bsne = bs.getNorthEast(); //可视区域右上角
var topLat = bsne.lat;
var bottomLat = bssw.lat;
var leftLng = bssw.lng;
var rightLng = bsne.lng;
let timestamp = new Date();
start_time = timestamp.getTime() / 1000;
that.getboundsearch(bottomLat, leftLng, topLat, rightLng, start_time);
map.addEventListener("zoomend", function(evt) {
//缩放地图
bs = map.getBounds(); //获取可视区域
bssw = bs.getSouthWest(); //可视区域左下角
bsne = bs.getNorthEast(); //可视区域右上角
topLat = bsne.lat;
bottomLat = bssw.lat;
leftLng = bssw.lng;
rightLng = bsne.lng;
that.getboundsearch(bottomLat, leftLng, topLat, rightLng, start_time);
});
map.addEventListener("moveend", function(evt) {
//拖拽地图
bs = map.getBounds(); //获取可视区域
bssw = bs.getSouthWest(); //可视区域左下角
bsne = bs.getNorthEast(); //可视区域右上角
topLat = bsne.lat;
bottomLat = bssw.lat;
leftLng = bssw.lng;
rightLng = bsne.lng;
that.getboundsearch(bottomLat, leftLng, topLat, rightLng, start_time);
});
}
},
getboundsearch(bottomLat, leftLng, topLat, rightLng, start_time) {
var that = this;
let url =
that.keys +
"&bounds=" +
bottomLat +
"," +
leftLng +
";" +
topLat +
"," +
rightLng +
"&filter=&page_index=1&page_size=" +
this.page_size +
"&timeStamp=" +
start_time;
that.$http
.get(
"https://bird.ioliu.cn/v1?url=http://yingyan.baidu.com/api/v3/entity/boundsearch" +
url
)
.then(res => {
var tempArray = res.data.entities;
that.totalNum = 0;
if (tempArray && tempArray != null && tempArray.length > 0) {
that.personData.forEach(person => {
let item = res.data.entities.find(
markers => markers.entity_name == person.entity_name
);
if (item && that.isShowAll == 1) {
that.totalNum += 1;
}
});
}
});
}
},
mounted() {
let date = new Date();
let _y = date.getFullYear();
let _m =
date.getMonth() + 1 >= 10
? date.getMonth() + 1
: "0" + (date.getMonth() + 1);
let _d = date.getDate();
this.dateTime = _y + "-" + _m + "-" + _d;
this.getlist();
this.getTrackTreeData();
this.getData();
this.intervalid = setInterval(() => {
this.getlist();
}, 60000);
if (this.$route.query.EmployeeId) {
let id = this.$route.query.EmployeeId;
this.FinalYingYan = false;
this.getPerson(id);
this.mapType = 2;
}
}
};
</script>
<style>
.notOnlineStyle{
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: grayscale(100%);
filter: gray;
}
.yingyanIcon {
width: 24px;
height: 24px;
border-radius: 12px;
display: inline-block;
vertical-align: middle;
}
.yingyanMeta .el-tree-node__content{height: 32px!important; line-height: 32px!important;}
.yingyanMeta {
color: #333;
position: absolute;
left: -20px;
top: 40px;
background: rgba(255, 255, 255, 1);
width: 300px;
height: 500px;
overflow: hidden;
z-index: 500;
transition: height .3s;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.09);
}
.yingyanMeta .el-tree{color: #333!important;}
.yingyanMeta .title {
background: #2398ff;
height: 50px;
line-height: 50px;
font-size: 14px;
color: #fff;
}
.yingyanMeta .title>div {
float: left;
width: 150px;
text-align: center;
cursor: pointer;
position: relative;
}
.yingyanMeta .el-tree-node__content>.el-tree-node__expand-icon{
padding: 0!important; margin: 3px 3px 0 3px!important;
color: #666;
}
.yingyanMeta .el-tree-node__content>.el-tree-node__expand-icon.is-leaf{
color: transparent;
}
.yingyanMeta .title .titleSjx {
width: 0;
height: 0;
border-width: 10px;
border-style: solid;
position: absolute;
left: 65px;
bottom: 0;
border-color: transparent transparent #f5f5f5 transparent;
}
.yingyanMeta .yingyanMetacont {
overflow-y: auto;
max-height: 430px;
padding-bottom:20px;
margin-top: 1px;
}
.yingyanMeta .isOnlineType {
width: 300px;
height: 40px;
line-height: 40px;
background: #f5f5f5;
}
.yingyanMeta .isOnlineType li {
float: left;
font-size: 14px;
color: #666;
height: 40px;
width: 100px;
text-align: center;
position: relative;
cursor: pointer;
}
.yingyanMeta .isOnlineType .cked {
position: absolute;
bottom: 0;
left: 0;
width:100px;height: 2px; background: #2AAFF3;
}
.yingyanMeta .yingyanMsgList {
height: 410px;
/* overflow-y: auto; */
font-size: 14px;
color: #666;
}
.yingyanMeta .yingyanMsgList li {
height: 40px;
line-height: 40px;
text-indent: 10px;
cursor: pointer;
}
.yingyanMeta .yingyanMsgList li >img{margin-right: 4px;}
.yingyanMeta .yingyanMsgList li>span {
float: right;
margin-right: 10px;
}
.yingyanMeta .yingyanMsgList li:hover {
background: #f1f1f1;
}
.yingyanRightMeta {
position: absolute;
right: 10px;
top: 10px;
background: rgba(255, 255, 255, 1);
box-shadow: 2px 2px 2px rgba(0, 0, 0, .2);
line-height: 24px;
border-radius: 4px;
padding: 10px 20px;
overflow: hidden;
z-index: 500;
font-size: 14px;
color: #333;
}
.yingyanRightMeta input {
vertical-align: sub;
margin-top: -2px;
}
.yingyanRightMeta>p {
margin-bottom: 5px;
}
.ul-container {
padding: 0 20px 0 10px;
font-size: 14px;
color: #333;
cursor: pointer;
}
.ul-container ul li {
line-height: 28px;
}
.ul-container ul li ul {
margin-left: 20px;
}
.yingyanMsgList::-webkit-scrollbar,
.yingyanMetacont::-webkit-scrollbar {
width: 4px;
height: 8px;
}
.yingyanMsgList::-webkit-scrollbar-thumb,
.yingyanMetacont::-webkit-scrollbar-thumb {
border-radius: 4px;
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
background: #c9c9c9;
}
.mapLayer {
font-size: 12px;
width: 300px;
}
.mapLayer>p {
line-height: 20px;
}
.notOnlineStyle {
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: grayscale(100%);
filter: gray;
}
.yingyanIcon {
width: 24px;
height: 24px;
border-radius: 12px;
display: inline-block;
vertical-align: middle;
}
.yingyanMeta .el-tree-node__content {
height: 32px !important;
line-height: 32px !important;
}
.yingyanMeta {
color: #333;
position: absolute;
left: -20px;
top: 40px;
background: rgba(255, 255, 255, 1);
width: 300px;
height: 500px;
overflow: hidden;
z-index: 500;
transition: height 0.3s;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.09);
}
.yingyanMeta .el-tree {
color: #333 !important;
}
.yingyanMeta .title {
background: #2398ff;
height: 50px;
line-height: 50px;
font-size: 14px;
color: #fff;
}
.yingyanMeta .title > div {
float: left;
width: 150px;
text-align: center;
cursor: pointer;
position: relative;
}
.yingyanMeta .el-tree-node__content > .el-tree-node__expand-icon {
padding: 0 !important;
margin: 3px 3px 0 3px !important;
color: #666;
}
.yingyanMeta .el-tree-node__content > .el-tree-node__expand-icon.is-leaf {
color: transparent;
}
.yingyanMeta .title .titleSjx {
width: 0;
height: 0;
border-width: 10px;
border-style: solid;
position: absolute;
left: 65px;
bottom: 0;
border-color: transparent transparent #f5f5f5 transparent;
}
.yingyanMeta .yingyanMetacont {
overflow-y: auto;
max-height: 430px;
padding-bottom: 20px;
margin-top: 1px;
}
.yingyanMeta .isOnlineType {
width: 300px;
height: 40px;
line-height: 40px;
background: #f5f5f5;
}
.yingyanMeta .isOnlineType li {
float: left;
font-size: 14px;
color: #666;
height: 40px;
width: 100px;
text-align: center;
position: relative;
cursor: pointer;
}
.yingyanMeta .isOnlineType .cked {
position: absolute;
bottom: 0;
left: 0;
width: 100px;
height: 2px;
background: #2aaff3;
}
.yingyanMeta .yingyanMsgList {
height: 410px;
/* overflow-y: auto; */
font-size: 14px;
color: #666;
}
.yingyanMeta .yingyanMsgList li {
height: 40px;
line-height: 40px;
text-indent: 10px;
cursor: pointer;
}
.yingyanMeta .yingyanMsgList li > img {
margin-right: 4px;
}
.yingyanMeta .yingyanMsgList li > span {
float: right;
margin-right: 10px;
}
.yingyanMeta .yingyanMsgList li:hover {
background: #f1f1f1;
}
.yingyanRightMeta {
position: absolute;
right: 10px;
top: 10px;
background: rgba(255, 255, 255, 1);
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
line-height: 24px;
border-radius: 4px;
padding: 10px 20px;
overflow: hidden;
z-index: 500;
font-size: 14px;
color: #333;
}
.yingyanRightMeta input {
vertical-align: sub;
margin-top: -2px;
}
.yingyanRightMeta > p {
margin-bottom: 5px;
}
.ul-container {
padding: 0 20px 0 10px;
font-size: 14px;
color: #333;
cursor: pointer;
}
.ul-container ul li {
line-height: 28px;
}
.ul-container ul li ul {
margin-left: 20px;
}
.yingyanMsgList::-webkit-scrollbar,
.yingyanMetacont::-webkit-scrollbar {
width: 4px;
height: 8px;
}
.yingyanMsgList::-webkit-scrollbar-thumb,
.yingyanMetacont::-webkit-scrollbar-thumb {
border-radius: 4px;
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
background: #c9c9c9;
}
.mapLayer {
font-size: 12px;
width: 300px;
}
.mapLayer > p {
line-height: 20px;
}
</style>
\ No newline at end of file
<style scoped>
.query-box{border: none;padding-left: 0}
._nav li{float: left;font-size: 14px;color: #666666;padding: 15px 10px;background-color: #F1F1F1;cursor: pointer;position: relative;}
._nav li._active{background-color:#FFFFFF;color: #333333 }
._nav li._active::after{content: "";width: 20px;height: 3px;background-color: #E95252;display: inline-block;position: absolute;bottom: 0;left: 38%;}
._content li{display: flex;padding: 0 30px;margin-top: 20px;border: 1px solid #ebebeb;background-color: white;}
._content li:hover{box-shadow:0px 0px 20px rgba(191,191,191,1);transition: all linear 0.5s;}
._content li>div{padding: 9px 0}
._left{display: flex;flex: 2;align-items: center;border-right: 1px dashed #DCDFE6;padding-right: 20px !important;}
._left>div{padding-left: 14px}
._Icon{width: 50px;height: 50px;line-height: 50px;text-align: center;color: white;font-weight: bold;background-color: #2AAEF2;border-radius: 50%;font-size: 22px;display: block;}
._t{color: #333333;font-size: 14px;padding-bottom: 7px;font-weight: bold}
._s{color: #666666;font-size: 12px;}
._cent{flex: 3;display: flex;align-items: center;}
._cent>div{width: 50%;padding-left: 80px;}
._right{flex: 1;align-items: center;display: flex;padding-left: 20px !important;border-left: 1px dashed #DCDFE6;}
.icon-liuchengsheji{background-color: #B552E9;}
.icon-liuchengsheji:hover{background-color: #c57dea}
.eicon-liuchengshejidit:active{background-color: #8741ab}
._red{color: #E95252}
._dt{text-decoration: underline}
._cu{cursor: pointer;}
._none{opacity:0 ;}
._block{opacity: 1}
.InfoChangeLog{height: auto;background-color: #FFFFFF;}
.changLogList{padding-left: 20px;max-height: 180px;overflow: auto;}
.changLogList_l{border-left: 1px solid #E9E9E9;position: relative;padding-bottom: 10px;padding-left: 20px;padding-top: 10px;}
._radius_green{background-color: #47BF8C;width: 7px;height: 7px;border-radius: 50%;display: inline-block;position: absolute;left: -4px;top: 19px;}
.changLog_time{color: #666666;font-size: 12px;display: inline-block;padding-right: 10px}
.el-button{border-radius: inherit !important}
._log_t{padding: 10px;}
._bdrd{border-radius: 17px;}
._tp{padding: 10px 20px 0 20px;font-size: 12px;display: flex;align-items: center;align-items: flex-end}
._bg_blue{background-color: #297BEF}
._bg_org{background-color: #F16C3C !important}
._bg_greend{background-color: #32B37C}
._bg_greendS{background-color:#1C9A65}
._bg_gray{background-color: #666666}
._color_blue{color: #005CAA}
._yewu{color: white;padding: 3px 13px;}
._qian{padding: 6px 15px;}
._array{display: inline-block;background-color: #999999}
._array_h{width: 35px;height: 3px;}
._array_h_left{top: 14px;left: -40px;position: absolute;}
._array_h_right{top: 14px;right: -40px;position: absolute;}
._array_w{width: 3px;height: 35px;}
.tri_left{width: 0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left: 6px solid #999999;}
.tri_down{width: 0;height:0;border-left:6px solid transparent;border-right: 6px solid transparent;border-top: 6px solid #999999; }
.tri_right{width: 0;height:0;border-top:6px solid transparent;border-bottom: 6px solid transparent;border-right: 6px solid #999999;}
._tag{display: inline-block;border-radius: 4px;padding: 2px 4px;margin-bottom: 4px;font-size: 12px}
._inlineblock_cen{display: inline-block;text-align: center}
._text_right{text-align: right;padding-right: 50px}
._tp_b{padding: 0 20px}
.height40{height: 40px;}
._feiyong{padding: 10px;flex-wrap: wrap;/*justify-content: space-between;*/display: flex;}
._feiyong>span{display: inline-block;padding: 4px 20px;color: white;font-size: 14px;border-radius: 4px;margin:0 10px 10px 0;}
._log_t_s{font-size: 12px;color: #666666}
.el-popover{text-align: inherit}
._dtel{padding-top: 10px;}
._no_liucheng{padding: 20px;text-align: center}
._liu_block{display: inline-block;width:auto;margin-bottom: 20px;position: relative;}
.icon-xiaotuziCduan_,.icon-xiaotuziCduan_2{position: absolute;right: -10px;top: -10px;color: #999999;}
._array_h_left .icon-xiaotuziCduan_2{position: absolute;left: -10px;top: -10px;right: initial;}
.text_l{text-align: left;margin-right: 50px}
.text_r{text-align: right;margin-left: 50px}
._miaoshu{display: inline-block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;padding:6px 15px;border-radius:4px;background-color: #297BEF;color:white;font-size: 14px;min-width: 120px; text-align: center;max-width: 130px;}
._last_ml0{margin-right: 0}
._last_mr0{margin-left: 0}
._array_h_dbox{position:absolute;top: 14px;right: -5px;}
._array_h_dbox_l{right: inherit;left: -40px}
._array_h_down{width: 35px;height: 3px;position: absolute;background-color: #999999}
._array_h_down_{width: 3px;height: 20px;position: absolute;background-color: #999999}
._array_h_down_l{left: 35px}
.icon-xiaotuziCduan_1{position: absolute;left: 28px;top: 10px;color: #999999;}
.xiaotuziCduan_1_l{left: inherit;right: -9px;}
._right i{width: 30px;height: 30px;display: inline-block;color: white !important;border-radius: 50%;text-align: center;line-height: 30px;margin-right: 10px;cursor: pointer;outline: none;}
._right i.icon-rizhi1{background-color: #67c23a}
._right i.icon-rizhi1:hover{background-color: #85ce61}
._right i.icon-rizhi1:active{background-color: #5daf34}
._right i.icon-liucheng1{background-color: #409EFF}
._right i.icon-liucheng1:hover{background-color: #66b1ff}
._right i.icon-liucheng1:active{background-color: #3a8ee6}
._right i.icon-bofang{background-color: #ebb563}
._right i.icon-bofang:hover{background-color: #ebb563}
._right i.icon-bofang:active{background-color: #cf9236}
._right i.icon-zanting1{background-color: #ebb563}
._right i.icon-zanting1:hover{background-color: #ebb563}
._right i.icon-zanting1:active{background-color: #cf9236}
._right i.el-icon-delete{background-color: #f56c6c}
._right i.el-icon-delete:hover{background-color: #f78989}
._right i.el-icon-delete:active{background-color: #dd6161}
._left ._Icon_box{width: 50px;padding: 0}
.page_FProcessManagement .query-box li:last-child{
top: 100px;
}
</style>
<template>
<div class="page_FProcessManagement">
<div class='query-box'>
<ul>
<!-- <li>
<span>注:财务基本流程包括(收款流程,付款流程,发票流程),如果需要其他的流程,比如退款流程等请在自定义流程下新增流程设置</span>
</li> -->
<li><input type="button" class="normalBtn" value="新增流程" @click="goUrl('addFinancialProcess',0,8)"/>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="resetPageIndex();getTemplateList();"/>
</li>
</ul>
</div>
<ul class="_nav clearfix">
<li class="_active" @click="getTemplateList()">流程列表</li>
<!-- <li :class="active==1?'_active':''" @click="active=1,msg.TempLateWay=8,getTemplateList()">自定义流程</li> -->
</ul>
<ul>
<el-form class="_info_box clearfix" label-width="110px">
<el-row>
<el-col :span="4" :gutter="35">
<el-form-item label="流程名称">
<el-input v-model="msg.Name"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="4" :gutter="35">
<el-form-item label="费用类型">
<el-select filterable v-model='msg.CostTypeID' >
<el-option :value="0" label="不限"></el-option>
<el-option v-for="item in GetCostTypeList" :key="item.ID" :value="item.ID" :label="item.Name"></el-option>
</el-select>
</el-form-item>
</el-col> -->
</el-row>
</el-form>
</ul>
<ul class="_content" v-loading="loading">
<li v-for="(item,index) in CTemplateList" >
<div class="_left">
<div class="_Icon_box">
<span class="_Icon">{{item.Name.substring(0,1)}}</span>
</div>
<div>
<p class="_t">{{item.Name}}</p>
<p class="_s">{{item.DescribeInfo}}</p>
</div>
</div>
<div class="_cent _cent_zidingyi">
<!-- <div>
<p class="_t _red">
<el-popover
popper-class="detailsIT_Journal"
width="420"
trigger="click">
<div class="InfoChangeLog" v-if="item.CoseTypeList">
<div class="changLog">
<p class="_log_t">适用费用</p>
<div class="_feiyong">
<span class="_bg_greend" v-for="Cose in item.CoseTypeList">{{Cose}}</span>
</div>
<p class="_log_t _log_t_s">注:以上费用类型将会被执行你设定的流程</p>
</div>
</div>
<div v-else>
<p class="_no_liucheng">暂无适用费用!</p>
</div>
<span slot="reference" class="_dt _cu" type="success" icon="iconfont icon-rizhi1">{{item.CoseTypeListLength}}个费用类型</span>
</el-popover>
</p>
<p class="_s">适用费用</p>
</div> -->
<div>
<p class="_t _cu" v-if="item.FinanceFlowConnectType!=3">
<!-- <template v-for="(cp,ci) in item.SuitableObjectNameList">
<span >{{cp}} <span v-if="ci!=item.SuitableObjectNameList.length-1">,</span> </span>
</template> -->
<el-popover popper-class="detailsIT_Journal" width="420" trigger="click">
<div class="InfoChangeLog" v-if="item.SuitableObjectNameList">
<div class="changLog">
<p class="_log_t">适用公司</p>
<div class="_feiyong">
<span class="_bg_greend" v-for="Cose in item.SuitableObjectNameList">{{Cose}}</span>
</div>
<p class="_log_t _log_t_s">注:以上公司将会被执行你设定的流程</p>
</div>
</div>
<div v-else>
<p class="_no_liucheng">暂无适用公司!</p>
</div>
<span slot="reference" class="_dt _cu" type="success" icon="iconfont icon-rizhi1" v-if="item.FinanceFlowConnectType!=3">{{item.SuitableObjectNameListlength}}个适用公司</span>
</el-popover>
</p>
<P v-if="item.FinanceFlowConnectType==3"> <span slot="reference" class="_t" type="success" icon="iconfont icon-rizhi1">集团通用</span></P>
<p class="_s">适用公司</p>
</div>
<div>
<p class="_t" v-if="item.Status==1">{{item.FlowNum==null?'无':item.FlowNum}}</p>
<p class="_t" v-else>暂未开启流程</p>
<p class="_s">子流程数量</p>
</div>
</div>
<div class="_right">
<el-tooltip class="item" effect="dark" content="日志" placement="top" >
<el-popover
popper-class="detailsIT_Journal"
width="250"
trigger="click">
<div class="InfoChangeLog" >
<div class="changLog">
<p class="_log_t">流程日志</p>
<ul class="changLogList" v-if="FinanceInfoChangeLog">
<li class="changLogList_l" v-for="(log,li) in FinanceInfoChangeLog">
<span style="background-color: #47BF8C" class="_radius_green"></span>
<p> <span class="_color_blue">{{log.emName}}</span> <span class="fr changLog_time">{{log.Time}}</span> </p>
<p class="_dtel">{{log.StartValue}}</p>
</li>
</ul>
<ul v-else>
<li>暂无修改日志</li>
</ul>
</div>
</div>
<i slot="reference" v-show="item.Status==1" class="iconfont icon-rizhi1" @click="FinanceInfoChangeLog = item.FinanceInfoChangeLog"></i>
</el-popover>
</el-tooltip>
<el-tooltip popper-class="item _process" effect="dark" content="流程" placement="top">
<el-popover
popper-class="detailsIT_Journal"
width="600"
trigger="click">
<div class="InfoChangeLog" >
<div class="changLog">
<p class="_log_t">收款流程</p>
<my-FlowChartModule :data="item.Workflow_Condition"></my-FlowChartModule>
</div>
</div>
<i slot="reference" v-show="item.Status==1" class="iconfont icon-liucheng1"></i>
</el-popover>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="启用" placement="top">
<i class="iconfont icon-bofang" v-show="item.Status==2" @click="UpdateStatus(item.Id,item.TemplateType)"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="停用" placement="top">
<i class="iconfont icon-zanting1" v-show="item.Status==1" @click="UpdateStatus(item.Id,item.TemplateType)"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="修改" placement="top">
<i class="iconfont icon-liuchengsheji" v-show="item.Status==1" @click="goUrl('addFinancialProcess',item.Id,8)"></i>
</el-tooltip>
<!-- <el-tooltip class="item" effect="dark" content="删除" placement="top">
<i class="edit el-icon-delete" v-show="item.Status==1" @click="deletTemplate(item.Id,item.Name)"></i>
</el-tooltip> -->
</div>
</li>
</ul>
<div class="noData" v-if="noData">
{{$t('system.content_noData')}}
</div>
<div>
<el-pagination
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size=msg.pageSize
:total=total>
</el-pagination>
</div>
</div>
</template>
<script>
import myFlowChartModule from "@/components/FinancialModule/FinancialSubmodule/FlowChartModule.vue";
export default {
data(){
return{
sendData:{},
//TemplateList:[],
CTemplateList:[],
FinanceInfoChangeLog:[],
GetCostTypeList:[],
total:0,
currentPage:1,
noData:true,
loading:false,
msg:{
pageIndex:1,
pageSize:6,
RB_BranchId:-1,
Name:'',
CostTypeID:0,
TemplateSorce:2,
}
}
},created(){
let type = this.$route.query.type;
if(this.$route.query.Branch_Id>=0){
this.msg.RB_BranchId = this.$route.query.Branch_Id;
};
},components: {
"my-FlowChartModule": myFlowChartModule
},methods:{
handleCurrentChange(val) {//翻页功能按钮
this.msg.pageIndex = val;
this.getTemplateList();
},
tips(msg,type) {
this.$message({
message: msg,
duration:2000,
type: type
});
},
addTemplate(obj){
obj.RB_BranchId = this.msg.RB_BranchId;
this.apipost('FinancialFlowTemplate_post_Set',obj,res=>{
if(res.data.resultCode==1){
this.$message.success('启用成功!')
this.getTemplateList()
}else{
this.$message.error(res.data.message)
}
},err=>{})
},
deletTemplate(id,text){ //删除
this.$confirm('确定删除'+'“'+text+'”'+'流程吗?删除后不可恢复!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('FinancialFlowTemplate_post_Remove',{ID:id},res=>{
if(res.data.resultCode==1){
this.$message.success(res.data.message)
this.getTemplateList()
}else{
this.$message.error(res.data.message)
}
},err=>{})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
financeinfo_post_GetCostTypeList(){ // 费用类型
this.apipost('financeinfo_post_GetCostTypeList',{Name:'',type:0,DepartIDs:this.DepartIDs},res=>{
if(res.data.resultCode==1){
this.GetCostTypeList = res.data.data;
}else{
}
},err=>{})
},
UpdateStatus(id,type){ //启停用
this.apipost('FinancialFlowTemplate_post_UpdateStatus',{ID:id,TemplateType:type,RB_Branch_id:this.msg.RB_BranchId},res=>{
if(res.data.resultCode==1){
this.$message.success(res.data.message)
this.getTemplateList()
}else{
this.$message.error(res.data.message)
}
},err=>{})
},
getTemplateList(){
this.loading = true;
let url = 'FinancialFlowTemplate_post_GetPageList'
// if(this.active==0){
// url = 'FinancialFlowTemplate_post_GetTemplateList'
// }
this.apipost(url,this.msg,res=>{
if(res.data.resultCode==1){
this.total = res.data.data.count;
let data = res.data.data.pageData;
data.forEach(x => {
if(x.CoseTypeList==null){
x.CoseTypeListLength = 0
}else{
x.CoseTypeListLength = x.CoseTypeList.length;
}
if(x.SuitableObjectNameList==null){
x.SuitableObjectNameListlength = 0
}else{
x.SuitableObjectNameListlength = x.SuitableObjectNameList.length
}
if(x.Workflow_Condition.AuditList!=null){
// v-if="lc.AuditWay!=1">({{lc.AuditWay=="2"?'会签':'或签'}})
x.Workflow_Condition.AuditList.forEach(y=>{
if(y.AuditWay==1){
y.contentTips = y.AuditDescription
}else{
y.contentTips = y.AuditWay==2?y.AuditDescription+'(会签)':y.AuditDescription+'(或签)'
}
})
}
x.FinanceInfoChangeLog.forEach(y=>{
y.Time = this.$commonUtils.formatMsgTime(y.UpdateDate)
})
});
this.CTemplateList = data;
this.loading = false;
if(data.length>0){
this.noData = false;
}else{
this.noData = true;
}
}else{
this.$message.error(res.data.message);
this.loading = false;
}
},err=>{})
},
resetPageIndex() {
this.msg.pageIndex = 1
this.currentPage = 1
},
goUrl(path,id,isZ,Branch_Id) {
this.$router.push({ name: path,query:{"id":id,"isZ":isZ,"xingzhen":true,"blank":'y',tab:"修改流程"} })
},
},mounted(){
this.getTemplateList();
this.financeinfo_post_GetCostTypeList();
}
}
</script>
......@@ -406,7 +406,7 @@
{{$t('ground.cituanhuidai')}}
</td>
</tr>
<tr>
<tr style="display:none;">
<td style="text-align:right;width:80px;">{{$t('ground.dingfangstatus')}}:</td>
<td>
<el-select v-model="NumObj.IsBookTeam">
......@@ -416,7 +416,6 @@
</el-select>
</td>
</tr>
<tr>
<td style="text-align:right;">{{$t('pub.pubRemark')}}</td>
<td>
......@@ -428,13 +427,13 @@
{{$t('ground.cibeizhu')}}.
</td>
</tr>
<tr>
<tr style="display:none;">
<td style="text-align:right;">{{$t('ground.gysbeizhu')}}</td>
<td>
<el-input class='mt10' v-model='NumObj.SupplierRemarks' type='textarea'></el-input>
</td>
</tr>
<tr>
<tr style="display:none;">
<td colspan="2">
{{$t('ground.cibeizhuchaxun')}}.
</td>
......@@ -503,23 +502,23 @@
<td colspan="23" style="text-align: left!important;padding:0 20px;">
<div class="link">
<p @click="getJourney(item)" style="padding-top:4px;">{{item.Title}}</p>
<div v-if="outItem.PriceCommonList[index].DMCNum && outItem.PriceCommonList[index].DMCNum!=''"
class="colorE95252" style="padding-top:5px;">{{$t('op.DJBZTH')}}:{{outItem.PriceCommonList[index].DMCNum}}
<div
class="colorE95252" style="padding-top:5px;padding-bottom:4px;font-size:13px;">{{$t('op.DJBZTH')}}<span style="font-weight:bold">{{outItem.PriceCommonList[index].DMCNum}}</span>
</div>
<div v-show="outItem.PriceCommonList[index].OPInnerRemark!=''" class="colorE95252"
style="padding-top:5px;">{{$t('Operation.Op_remark')}}:{{outItem.PriceCommonList[index].OPInnerRemark}}</div>
style="padding-top:5px;padding-bottom:4px;font-size:13px;">{{$t('Operation.Op_remark')}}{{outItem.PriceCommonList[index].OPInnerRemark}}</div>
<div v-show="outItem.PriceCommonList[index].OPRemark!=''" class="colorE95252"
style="padding-top:5px;">{{$t('Operation.Op_duiwaiRemark')}}:{{outItem.PriceCommonList[index].OPRemark}}</div>
<div v-show="outItem.PriceCommonList[0].DMCRemark!=''" class="colorE95252"
style="padding-top:5px;padding-bottom:4px;">{{$t('Operation.Op_dijieRemark')}}:{{outItem.PriceCommonList[index].DMCRemark}}
style="padding-top:5px;padding-bottom:4px;font-size:13px;">{{$t('Operation.Op_duiwaiRemark')}}{{outItem.PriceCommonList[index].OPRemark}}</div>
<div v-show="outItem.PriceCommonList[index].DMCRemark!=''" class="colorE95252"
style="padding-top:5px;padding-bottom:4px;font-size:13px;">{{$t('Operation.Op_dijieRemark')}}{{outItem.PriceCommonList[index].DMCRemark}}
</div>
<div v-show="outItem.PriceCommonList[0].SupplierRemarks!=''" class="colorE95252"
style="padding-top:5px;padding-bottom:4px;">
{{$t('ground.gysbeizhu')}}:{{outItem.PriceCommonList[index].SupplierRemarks}}
<div v-show="outItem.PriceCommonList[index].SupplierRemarks!=''" class="colorE95252"
style="padding-top:5px;padding-bottom:4px;font-size:13px;">
{{$t('ground.gysbeizhu')}}{{outItem.PriceCommonList[index].SupplierRemarks}}
</div>
<div v-show="outItem.PriceCommonList[0].SupplierToDmcRemarks!=''" class="colorE95252"
style="padding-top:5px;padding-bottom:4px;">
{{$t('ground.gysduindibeizhu')}} :{{outItem.PriceCommonList[index].SupplierToDmcRemarks}}
<div v-show="outItem.PriceCommonList[index].SupplierToDmcRemarks!=''" class="colorE95252"
style="padding-top:5px;padding-bottom:4px;font-size:13px;">
{{$t('ground.gysduindibeizhu')}}{{outItem.PriceCommonList[index].SupplierToDmcRemarks}}
</div>
</div>
</td>
......
<style>
.GOd_Table {
width: 100%;
font-size: 12px;
color: #333;
margin: 20px 0 auto;
border-collapse: collapse;
background-color: #fff;
border: 1px solid #d1d1d1;
}
.GOd_Table td {
border: 1px solid #d1d1d1;
text-align: center;
height: 40px;
padding: 5px;
}
.GOd_Table th {
background-color: #e6e6e6;
border: 1px solid #d1d1d1;
height: 40px;
}
.GD_comDiv {
width: 100%;
height: 25px;
line-height: 25px;
text-align: center;
border-bottom: 1px solid #d1d1d1;
}
.GOd_Table td .GD_comDiv:last-child {
border: none;
}
.GD_comPad {
padding: 0 !important;
}
.groundLastTable {
margin: 20px 0;
font-size: 12px;
}
.gdBtn {
position: relative;
top: -45px;
}
</style>
<template>
<div v-loading="loading2">
<div v-loading="loading">
<table class="GOd_Table" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="9">{{ $t("ground.dyldyxjhb") }}</th>
</tr>
<tr>
<th width="150">{{ $t("sm.chufadi") }}</th>
<th>{{ $t("ground.hbsj") }}</th>
<th>{{ $t("sm.jiheshijian") }}</th>
<th width="500">{{ $t("ground.ctmchen") }}</th>
<th>{{ $t("ground.tianshu") }}</th>
<th>{{ $t("Operation.Op_jinchudian") }}</th>
<th>{{ $t("ground.ctrenshu") }}</th>
<th>{{ $t("leader.leader_Leader") }}</th>
<th>{{ $t("leader.leader_Guide") }}</th>
</tr>
<tr v-for="(item,index) in BaseInfo" :key="index">
<td>{{ item.StartCityNames }}</td>
<td>
<span v-if="item.FlightList.length > 0">{{
item.FlightList[0].Departure_time
}}</span>
</td>
<td>{{ item.GatherTime }}</td>
<td style="text-align:left;">{{ item.Titles }}</td>
<td>{{ item.DayNum }}</td>
<td>{{ item.InOut }}</td>
<td>{{ item.TotalSeat }}+1</td>
<td>{{ item.LeaderName }}</td>
<td>{{ item.GuideName }}</td>
</tr>
<tr>
<td>{{ $t("ground.tsyaoqiu") }}</td>
<td colspan="8"></td>
</tr>
<tr>
<td rowspan="5">
{{ $t("ground.bmfzr") }}
</td>
<td>{{ $t("ground.jpfzren") }}</td>
<td>
<template v-if="PrincipalList.length > 0">
<el-input
v-model="PrincipalList[0].CreateByName"
class="w200"
></el-input>
</template>
</td>
<td>{{ $t("restaurant.res_ContactNumber") }}</td>
<td colspan="5">
<template v-if="PrincipalList.length > 0">
<el-input
v-model="PrincipalList[0].CreateByMobile"
class="w200"
></el-input>
</template>
</td>
</tr>
<tr>
<td>{{ $t("ground.dffzren") }}</td>
<td>
<template v-if="PrincipalList.length > 0">
<el-input
v-model="PrincipalList[0].HConfirmName"
class="w200"
></el-input>
</template>
</td>
<td>{{ $t("restaurant.res_ContactNumber") }}</td>
<td colspan="5">
<template v-if="PrincipalList.length > 0">
<el-input
v-model="PrincipalList[0].HConfirmMobile"
class="w200"
></el-input>
</template>
</td>
</tr>
<tr>
<td>{{ $t("ground.zlfzren") }}</td>
<td>
<template v-if="PrincipalList.length > 0">
<el-input
v-model="PrincipalList[0].BConfirmName"
class="w200"
></el-input>
</template>
</td>
<td>{{ $t("restaurant.res_ContactNumber") }}</td>
<td colspan="5">
<template v-if="PrincipalList.length > 0">
<el-input
v-model="PrincipalList[0].BConfirmMobile"
class="w200"
></el-input>
</template>
</td>
</tr>
<tr>
<td>{{ $t("ground.dcfzeren") }}</td>
<td>
<template v-if="PrincipalList.length > 0">
<el-input
v-model="PrincipalList[0].DConfirmName"
class="w200"
></el-input>
</template>
</td>
<td>{{ $t("restaurant.res_ContactNumber") }}</td>
<td colspan="5">
<template v-if="PrincipalList.length > 0">
<el-input
v-model="PrincipalList[0].DConfirmMobile"
class="w200"
></el-input>
</template>
</td>
</tr>
<tr>
<td>{{ $t("ground.mpfzeren") }}</td>
<td>
<template v-if="PrincipalList.length > 0">
<el-input
v-model="PrincipalList[0].TConfirmName"
class="w200"
></el-input>
</template>
</td>
<td>{{ $t("restaurant.res_ContactNumber") }}</td>
<td colspan="5">
<template v-if="PrincipalList.length > 0">
<el-input
v-model="PrincipalList[0].TConfirmMobile"
class="w200"
></el-input>
</template>
</td>
</tr>
</table>
<table class="GOd_Table" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="9">{{ $t("ground.clshiyong") }}</th>
</tr>
<tr>
<th>{{ $t("ground.usebusTime") }}</th>
<th>{{ $t("ground.clgs") }}</th>
<th>{{ $t("ground.chepaihao") }}</th>
<th>{{ $t("ground.sijiName") }}</th>
<th>{{ $t("ground.sijiPhone") }}</th>
<th>{{ $t("pub.pubRemark") }}</th>
</tr>
<tr v-for="item in DMCStaticsCommon.BusList">
<td>{{ item.PlanDateStr }}</td>
<td>{{ item.SupplierName }}</td>
<td>{{ item.BusNum }}</td>
<td>{{ item.DriverName }}</td>
<td>{{ item.DriverTel }}</td>
<td width="300">{{ item.Remarks }}</td>
</tr>
</table>
<table class="GOd_Table" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="17">{{ $t("ground.jdshiyong") }}</th>
</tr>
<tr>
<th width="80">{{ $t("ground.dfanghao") }}</th>
<th width="180">{{ $t("hotel.hotel_name") }}</th>
<th width="100">{{ $t("hotel.table_CheckInDate") }}</th>
<th width="80">{{ $t("op.TakeBed") }}/{{ $t("op.NoneedBed") }}</th>
<th width="80">{{ $t("ground.shijiyfs") }}</th>
<th width="80">{{ $t("restaurant.res_ContactNumber") }}</th>
<th width="200">{{ $t("admin.admin_address") }}</th>
<th width="200">{{ $t("pub.pubRemark") }}</th>
</tr>
<tbody v-for="item in DMCStaticsCommon.HotelOrderListReport">
<tr v-for="subItem in item.HotelOrderList">
<td>{{ subItem.ReserveNo }}</td>
<td style="text-align:left;">{{ subItem.HotelName }}</td>
<td>{{ subItem.CheckInDateStr }}</td>
<td>{{ getHotelTotalNum(subItem) }}</td>
<td>{{ getHotelTotal(subItem) }}</td>
<td>{{ subItem.Tel }}</td>
<td style="text-align:left;">{{ subItem.Address }}</td>
<td style="text-align:left;">{{ subItem.Remarks }}</td>
</tr>
</tbody>
</table>
<table class="GOd_Table" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="15">{{ $t("ground.canshishiyong") }}</th>
</tr>
<tr>
<th width="80">{{ $t("ground.dchao") }}</th>
<th width="80">{{ $t("restaurant.res_etTime") }}</th>
<th width="80">{{ $t("restaurant.res_resName") }}</th>
<th width="50">{{ $t("ground.leibie") }}</th>
<th width="80">{{ $t("ground.cayinlexing") }}</th>
<th width="80">{{ $t("ground.zongrenshu") }}</th>
<th width="80">{{ $t("restaurant.res_ContactNumber") }}</th>
<th width="200">{{ $t("admin.admin_address") }}</th>
<th width="300">{{ $t("pub.pubRemark") }}</th>
</tr>
<tbody v-for="item in DMCStaticsCommon.DiningList">
<tr v-for="subItem in item.DiningSummaryList">
<td>{{ subItem.ReserveNo }}</td>
<td>{{ subItem.UseTimeStr }}</td>
<td style="text-align:left;">{{ subItem.DiningName }}</td>
<td>{{ subItem.UseDinnerTypeStr }}</td>
<td>{{ subItem.MealName }}</td>
<td>{{ getDinnerTotal(subItem) }}</td>
<td>{{ subItem.Tel }}</td>
<td style="text-align:left;">{{ subItem.Address }}</td>
<td style="text-align:left;">{{ subItem.Remarks }}</td>
</tr>
</tbody>
</table>
<table class="GOd_Table" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="12">{{ $t("ground.mpshiyong") }}</th>
</tr>
<tr>
<th>{{ $t("ground.youlanshijian") }}</th>
<th width="400">{{ $t("visaT.jdname") }}</th>
<th>{{ $t("ground.zongrenshu") }}</th>
<th>{{ $t("restaurant.res_ContactNumber") }}</th>
<th width="300">{{ $t("admin.admin_address") }}</th>
<th width="200">{{ $t("pub.pubRemark") }}</th>
</tr>
<tbody v-for="item in DMCStaticsCommon.ScenicList">
<tr v-for="subItem in item.ScenicStatisticsList">
<td>{{ subItem.UseTimeStr }}</td>
<td style="text-align:left;">{{ subItem.ScenicName }}</td>
<td>
{{ getScenicTotal(subItem) }}
</td>
<td>{{ subItem.Tel }}</td>
<td style="text-align:left;">{{ subItem.Address }}</td>
<td style="text-align:left;">{{ subItem.Remarks }}</td>
</tr>
</tbody>
</table>
<table class="GOd_Table" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="6">{{ $t("salesModule.LKMD") }}</th>
</tr>
<tr>
<th>{{ $t("system.table_Passport") }}</th>
<th>{{ $t("system.table_sex") }}</th>
<th>{{ $t("ground.CustomerName") }}</th>
<th>{{ $t("ground.csnianyue") }}</th>
<th>{{ $t("ground.zhiye") }}</th>
</tr>
<tr v-for="item in guestList">
<td>{{ item.PassportNo }}</td>
<td>{{ item.SexStr }}</td>
<td>{{ item.userName }}</td>
<td>{{ item.Birthday }}</td>
<td>{{ item.Duty }}</td>
</tr>
</table>
<table class="GOd_Table" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="4">{{ $t("ground.gwd") }}</th>
</tr>
<tr>
<th>{{ $t("ground.dm") }}</th>
<th>{{ $t("ground.jdsj") }}</th>
<th>{{ $t("admin.admin_address") }}</th>
</tr>
<tr v-for="item in shopList">
<td>{{ item.ShopName }}</td>
<td>{{ item.StoreTimeStr }}</td>
<td>{{ item.Address }}</td>
</tr>
</table>
<table class="GOd_Table" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="2">{{ $t("ground.xcneirong") }}</th>
</tr>
<tr v-for="item in JourneyTitle">
<td width="100">
{{ $t("tips.di") }}{{ item.DayNum }}{{ $t("hotel.hotel_day") }}
</td>
<td style="text-align:left;">{{ item.Title }}</td>
</tr>
</table>
<table class="groundLastTable">
<tr>
<td style="vertical-align:top;">
{{ $t("hotel.hotel_attention") }}:
</td>
<td>
<el-input
v-model="PostConfig.PlanDescription"
type="textarea"
class="w700"
:autosize="{ minRows: 3, maxRows: 3 }"
resize="none"
:placeholder="$t('hotel.hotel_attention')"
maxlength="300"
></el-input>
<input
type="button"
class="normalBtn gdBtn"
@click="UpdateLeaderPay"
:value="$t('pub.saveBtn')"
/>
<input
type="button"
class="normalBtn gdBtn"
@click="DownLoadLeaderPay"
:value="$t('adm.adm_download')"
/>
</td>
</tr>
</table>
<div style="width:100%;height:100%;"></div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
TCIDs: "",
//基本信息
BaseInfo: [],
//负责人
PrincipalList: [],
//行程内容
JourneyTitle: [],
//旅客
guestList: [],
//房餐车景点
DMCStaticsCommon: {},
//购物店
shopList: [],
loading: false,
PostConfig: {
ID: 0,
TCIDs: "",
PlanDescription: ""
},
loading2: false
};
},
methods: {
//酒店统计(用房数)
getHotelTotal(item) {
var totalCount = 0;
item.OrderDetailsList.forEach(subItem => {
totalCount += subItem.HouseTypeCount;
});
return totalCount;
},
getHotelTotalNum(item) {
var totalCount = 0;
var noBed = 0;
item.OrderDetailsList.forEach((subItem, subIndex) => {
if (subItem.HouseType <= 4) {
totalCount += subItem.BookNum;
} else if (subItem.HouseType == 6) {
noBed += subItem.BookNum;
}
});
return totalCount + "/" + noBed;
},
//景点统计
getScenicTotal(item) {
var totalCount = 0;
item.TicketPriceList.forEach(subItem => {
totalCount += subItem.UsePeopleNum - subItem.Discount;
});
return totalCount;
},
//餐厅人数统计
getDinnerTotal(item) {
var totalCount = 0;
item.DiningPriceList.forEach(subItem => {
totalCount += subItem.UsePeopleNum - subItem.Discount;
});
return totalCount;
},
//根据团号获取负责人的信息
getConfirmName() {
let msg = {
TCIDs: this.TCIDs,
NewCombinationNum: ""
};
//更新酒店图片
this.loading2 = true;
this.apipost(
"dmcstatistics_post_GetExtendLeaderAllStatics_V2",
msg,
res => {
this.loading2 = false;
console.log("res.data",res.data.data);
if (res.data.resultCode == 1) {
// this.BaseInfo = res.data.data.BaseInfo;
// this.PrincipalList = res.data.data.PrincipalList;
// this.JourneyTitle = res.data.data.JourneyTitle;
// this.guestList = res.data.data.guestList;
// this.DMCStaticsCommon = res.data.data.DMCStaticsCommon;
// this.shopList = res.data.data.shopList;
// this.PostConfig = res.data.data.DMCStaticsCommon.LeaderApply;
} else {
this.Error(res.data.message);
}
},
null
);
},
//获取人员类型
peopleStrToWord(str) {
if (str == "1") return "成人";
if (str == "2") return "儿童";
if (str == "3") return "婴儿";
},
//总金额
diningTotalPrice(obj) {
let totalPrice = 0;
obj.forEach(x => {
totalPrice +=
x.PeoplePrice *
(x.PeopleNum - x.Discount) *
(1 - x.DiscountPrice / 100);
});
return totalPrice;
},
//景点
scenicTotalPrice(obj) {
let totalPrice = 0;
obj.forEach(x => {
totalPrice +=
x.PeoplePrice *
(x.UsePeopleNum - x.Discount) *
(1 - x.DiscountPrice / 100);
});
return totalPrice;
},
UpdateLeaderPay() {
this.PostConfig.TCIDs = this.TCIDs;
this.apipost(
"dmcstatistics_post_AuditLeaderapply",
{
LeaderApply: this.PostConfig,
LeaderGuidePlan: this.PrincipalList[0]
},
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
DownLoadLeaderPay() {
let msg = {
TCIDs: this.TCIDs,
NewCombinationNum: "",
uid: this.getLocalStorage().EmployeeId
};
let fileName = "导游计划表" + this.$commonUtils.getCurrentDate() + ".xls";
this.loading = true;
this.GetLocalFile(
"dmcstatistics_get_DwonLoadLeaderapply",
msg,
fileName,
res => {
this.loading = false;
}
);
}
},
mounted() {
this.TCIDs = this.$route.query.id;
this.PostConfig.TCIDs = this.TCIDs;
this.getConfirmName();
}
};
</script>
......@@ -641,6 +641,14 @@ export default {
title: '联盟管理'
},
},
{
path: '/XProcessmanagement', //联盟管理
name: 'XProcessmanagement',
component: resolve => require(['@/components/administrative/XProcessmanagement'], resolve),
meta: {
title: '流程管理'
},
},
{
path: '/custumerXzCertification', //客户实名认证
name: 'custumerXzCertification',
......@@ -3727,6 +3735,11 @@ export default {
name: 'groundOperation',
component: resolve => require(['@/components/dmc/manager/groundOperation'], resolve),
},
{
path: '/groundOperation2',
name: 'groundOperation2',
component: resolve => require(['@/components/dmc/manager/groundOperation2'], resolve),
},
{
path: '/newFeature',
name: 'newFeature',
......
......@@ -209,7 +209,7 @@ export function addTeamMembers({ state }, teamId, accounts) {
teamId: teamId,
accounts:accounts,
done: (err, obj) => {
console.log(obj)
}
})
}
......@@ -227,7 +227,7 @@ export function removeTeamMembers({ state }, teamId, accounts) {
teamId: teamId,
accounts:accounts,
done: (err, obj) => {
console.log(obj)
}
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment