Compare commits

..

No commits in common. "aaa1de240ea25f256bd7377061669228678d2c4d" and "b9399865054cad99d35595acfab8ac4bbc3ad686" have entirely different histories.

8 changed files with 164 additions and 215 deletions

View File

@ -100,13 +100,3 @@ export function downloadOrder(params) {
responseType: 'blob' responseType: 'blob'
}) })
} }
export function exportManagement(params) {
return request({
url: '/system/rescueInfo/exportManagement',
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -2,11 +2,6 @@
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-table-column label="序号" align="center">
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-form-item label="姓名" prop="name"> <el-form-item label="姓名" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.name" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
@ -91,9 +86,6 @@
>新增 >新增
</el-button> </el-button>
</el-col> </el-col>
<!-- <el-col>-->
<!-- <el-button type="primary" @click="syncData">同步</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
:loading="exportLoading" :loading="exportLoading"
@ -179,7 +171,6 @@ import * as StaffApi from '@/api/company/staff'
import StaffForm from './form/StaffForm.vue' import StaffForm from './form/StaffForm.vue'
import StaffChangeForm from './form/StaffChangeForm' import StaffChangeForm from './form/StaffChangeForm'
import StaffResetPassword from './form/StaffResetPassword' import StaffResetPassword from './form/StaffResetPassword'
import request from '@/utils/request'
export default { export default {
name: 'Staff', name: 'Staff',
@ -323,15 +314,7 @@ export default {
} finally { } finally {
this.exportLoading = false this.exportLoading = false
} }
}, }
// syncData(){
// request({
// url: "/rescue/sync",
// methods: "get"
// }).then(res => {
// console.log(res)
// })
// }
} }
} }
</script> </script>

View File

@ -336,9 +336,9 @@ import {
handleUpdate(row) { handleUpdate(row) {
const data = { const data = {
...row, ...row,
firstDriverIds: row.firstDriverIds ? row.firstDriverIds.split(",").map(id => parseInt(id)) : "", firstDriverIds: row.firstDriverIds.split(",").map(id => parseInt(id)),
secondDriverIds: row.secondDriverIds ? row.secondDriverIds.split(",").map(id => parseInt(id)) : "", secondDriverIds: row.secondDriverIds.split(",").map(id => parseInt(id)),
thirdDriverIds: row.thirdDriverIds ? row.thirdDriverIds.split(",").map(id => parseInt(id)) : "" thirdDriverIds: row.thirdDriverIds.split(",").map(id => parseInt(id))
} }
this.form = data this.form = data
// console.log(this.form) // console.log(this.form)
@ -351,9 +351,9 @@ import {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
this.form.firstDriverIds = this.form.firstDriverIds ? this.form.firstDriverIds.join(",") : null this.form.firstDriverIds = this.form.firstDriverIds.join(",")
this.form.secondDriverIds = this.form.secondDriverIds ? this.form.secondDriverIds.join(",") : null this.form.secondDriverIds = this.form.secondDriverIds.join(",")
this.form.thirdDriverIds = this.form.thirdDriverIds ? this.form.thirdDriverIds.join(",") : null this.form.thirdDriverIds = this.form.thirdDriverIds.join(",")
edept_driver(this.form).then(response => { edept_driver(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;

View File

@ -683,12 +683,14 @@ export default {
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
console.log(row)
this.reset() this.reset()
this.form = row this.form = row
this.form.realName = row.nickName this.form.realName = row.nickName
this.carfrom.carInfoList = !row.carInfoList ? row.carInfoList : this.carfrom.carInfoList this.carfrom.carInfoList = !!row.carInfoList ? row.carInfoList : this.carfrom.carInfoList
this.open = true this.open = true
this.title = '修改司机信息' this.title = '修改司机信息'
}, },
handleAuth(row) { handleAuth(row) {
this.reset() this.reset()
@ -704,7 +706,7 @@ export default {
this.$refs['carfrom'].validate(carValid => { this.$refs['carfrom'].validate(carValid => {
if (carValid) { if (carValid) {
if (this.form.id != null) { if (this.form.id != null) {
this.form.carInfoList = this.carfrom.carInfoList.carType this.form.carInfoList = this.carfrom.carInfoList
updateDriver(this.form).then(response => { updateDriver(this.form).then(response => {
this.$modal.msgSuccess('修改成功') this.$modal.msgSuccess('修改成功')
this.open = false this.open = false

View File

@ -100,11 +100,7 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<el-table-column label="序号" align="center">
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="客户信息" align="center"> <el-table-column label="客户信息" align="center">
<el-table-column label="姓名" align="center" prop="connectionName" /> <el-table-column label="姓名" align="center" prop="connectionName" />
<el-table-column label="手机号" width="130" align="center" prop="connectionPhone" /> <el-table-column label="手机号" width="130" align="center" prop="connectionPhone" />
@ -171,7 +167,7 @@
<span v-else>{{ scope.row.setMoney/100 }}<i @click="editInfoFront(2,scope.$index)" class="el-icon-edit"></i></span> <span v-else>{{ scope.row.setMoney/100 }}<i @click="editInfoFront(2,scope.$index)" class="el-icon-edit"></i></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实收金额(元)" width="150" align="center" prop="setMoney" > <el-table-column label="实收金额(元)" align="center" prop="setMoney" >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.payMoney/100 }}</span> <span>{{ scope.row.payMoney/100 }}</span>
</template> </template>
@ -504,6 +500,7 @@ export default {
editInfoFront(type,index){ editInfoFront(type,index){
this.editType =type this.editType =type
this.editIdx =index this.editIdx =index
}, },
cancelRepayment(){ cancelRepayment(){
this.repaymentForm = {} this.repaymentForm = {}

View File

@ -29,11 +29,6 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="refuelRecordList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="refuelRecordList" @selection-change="handleSelectionChange">
<el-table-column label="序号" align="center">
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="司机" align="center" prop="realName" /> <el-table-column label="司机" align="center" prop="realName" />
<el-table-column label="车牌号" align="center" prop="rescueCarNum" /> <el-table-column label="车牌号" align="center" prop="rescueCarNum" />
<el-table-column label="加油数量(L)" align="center" prop="refuelNum" /> <el-table-column label="加油数量(L)" align="center" prop="refuelNum" />
@ -159,8 +154,8 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
listRefuelRecord(this.queryParams).then(response => { listRefuelRecord(this.queryParams).then(response => {
this.refuelRecordList = response.data.records; this.refuelRecordList = response.rows;
this.total = response.data.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },

View File

@ -91,11 +91,7 @@
<el-table v-loading="loading" :data="rescueCarSpendList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="rescueCarSpendList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center"> <el-table-column label="序号" align="center" prop="id" />
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="车牌号" align="center" prop="carNum" /> <el-table-column label="车牌号" align="center" prop="carNum" />
<el-table-column label="维修保养时间" align="center" prop="maintenanceTime" width="180"> <el-table-column label="维修保养时间" align="center" prop="maintenanceTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
@ -123,7 +119,7 @@
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width" width="180"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="客户车牌号" prop="licenseNum"> <el-form-item label="客户车牌号" prop="licenseNum">
<el-input <el-input
v-model="queryParams.licenseNum" v-model="queryParams.licenseNum"
@ -25,26 +25,25 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="月份" prop="rescueStartMonth"> <el-form-item label="月份" prop="rescueStartMonth" >
<el-date-picker <el-date-picker
v-model="queryParams.rescueStartMonth" v-model="queryParams.rescueStartMonth"
value-format="yyyy-MM" value-format="yyyy-MM"
type="month" type="month"
placeholder="选择月份" placeholder="选择月份">
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="收费类型" prop="feeType"> <el-form-item label="收费类型" prop="feeType">
<el-select v-model="queryParams.feeType" placeholder="请选择收费类型" clearable> <el-select v-model="queryParams.feeType" placeholder="请选择收费类型" clearable>
<el-option <el-option
v-for="dict in this.getDictDatas(DICT_TYPE.FEE_TYPE)" v-for="dict in dict.type.fee_type"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="救援时间" prop="maintenanceTime"> <el-form-item label="救援时间" prop="maintenanceTime" >
<el-date-picker <el-date-picker
v-model="time1" v-model="time1"
type="daterange" type="daterange"
@ -54,75 +53,63 @@
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
:picker-options="pickerOptions" :picker-options="pickerOptions">
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button
type="success"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <div style="margin-left: 52%;font-weight: bold">
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<div style="display: flex;justify-content:right;font-weight: bold;font-size: 16px">
<span> <span>
施救总金额{{ moneyManagementData.allMoney }} 施救总金额{{moneyManagementData.allMoney}}
</span> </span>
<span style="margin-left: 3%"> <span style="margin-left: 3%">
出车次数{{ moneyManagementData.allNum }} 出车次数{{moneyManagementData.allNum}}
</span> </span>
<span style="margin-left: 3%"> <span style="margin-left: 3%">
提成总金额{{ moneyManagementData.tcAll }} 提成总金额{{moneyManagementData.tcAll}}
</span> </span>
<span style="margin-left: 3%"> <span style="margin-left: 3%">
燃油费小计{{ moneyManagementData.refuelMoney }} 燃油费小计{{moneyManagementData.refuelMoney}}
</span> </span>
</div> </div>
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<el-table-column label="序号" align="center"> <el-table-column :span-method="objectSpanMethod" type="selection" width="55" align="center" />
<template scope="scope"> <el-table-column label="客户车牌号" align="center" prop="licenseNum" />
<span>{{ scope.$index + 1 }}</span> <el-table-column label="司机" align="center" prop="driverName" />
</template> <el-table-column label="车牌号" align="center" prop="diverCarNum" />
</el-table-column>
<el-table-column label="客户车牌号" align="center" prop="licenseNum" width="180"/>
<el-table-column label="司机" align="center" prop="driverName" width="180"/>
<el-table-column label="车牌号" align="center" prop="diverCarNum" width="180"/>
<el-table-column label="救援时间" align="center" prop="rescueTime" width="180"> <el-table-column label="救援时间" align="center" prop="rescueTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.rescueTime, '{y}-{m}-{d} {h}:{m}') }}</span> <span>{{ parseTime(scope.row.rescueTime, '{y}-{m}-{d} {h}:{m}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="收费类型" align="center" prop="feeType" width="180"> <el-table-column label="收费类型" align="center" prop="feeType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.FEE_TYPE" :value="scope.row.feeType"/> <dict-tag :options="dict.type.fee_type" :value="scope.row.feeType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="施救金额(元)" align="center" prop="setMoney" width="180"/> <el-table-column label="施救金额(元)" align="center" prop="setMoney" />
<el-table-column label="过关费(元)" align="center" prop="checkpointMoney" width="180"/> <el-table-column label="过关费(元)" align="center" prop="checkpointMoney" />
<el-table-column label="应计提产值(元)" align="center" prop="upMoney" width="180"/> <el-table-column label="应计提产值(元)" align="center" prop="upMoney" />
<el-table-column label="提成比例" align="center" prop="royaltyRatio" width="180"/> <el-table-column label="提成比例" align="center" prop="royaltyRatio" />
<el-table-column label="提成金额(元)" align="center" prop="royaltyMoney" width="180"/> <el-table-column label="提成金额(元)" align="center" prop="royaltyMoney" />
<el-table-column label="放空公里数" align="center" prop="emptyingDistance" width="180"/> <el-table-column label="放空公里数" align="center" prop="emptyingDistance" />
<el-table-column label="油补(元)" align="center" prop="oilSubsidy" width="180"/> <el-table-column label="油补(元)" align="center" prop="oilSubsidy" />
<el-table-column label="燃油费(元)" align="center" prop="fuelCost" width="180"/> <el-table-column label="燃油费(元)" align="center" prop="fuelCost" />
<el-table-column label="每公里油耗(L)" align="center" prop="oilConsumption" width="180"/> <el-table-column label="每公里油耗(L)" align="center" prop="oilConsumption" />
<el-table-column label="工资(元)" align="center" prop="grossWages" width="180"/> <el-table-column label="工资(元)" align="center" prop="grossWages" />
</el-table> </el-table>
@ -137,24 +124,22 @@
</template> </template>
<script> <script>
import { moneyManagement, moneyManagementData,exportManagement } from '@/api/rescue/info' import {moneyManagement,moneyManagementData} from "@/api/rescue/info";
import { getmap } from '@/api/Map/map' import { getmap } from "@/api/Map/map";
import Map from '../../components/Map/index' import Map from "../../components/Map/index"
export default { export default {
name: 'Info', name: "Info",
dicts: ['dljy_type', 'fee_type', 'car_type', 'yes_no', 'jy_status', 'jy_order_status'], dicts: ['dljy_type', 'fee_type', 'car_type', 'yes_no','jy_status','jy_order_status'],
data() { data() {
return { return {
pickerOptions: null, chooseDriverId:'',
chooseDriverId: '', rescueInfoId:'',
rescueInfoId: '',
// //
loading: true, loading: true,
ztlist: [], ztlist:[],
// //
ids: [], ids: [],
time1: [], time1:[],
// //
single: true, single: true,
// //
@ -166,15 +151,15 @@ export default {
// //
infoList: [], infoList: [],
// //
title: '', title: "",
// //
open: false, open: false,
opens: false, opens:false,
designateFlag: false, designateFlag:false,
zong: '', zong:'',
repaymentForm: {}, repaymentForm:{},
repaymentOpen: false, repaymentOpen:false,
moneyManagementData: {}, moneyManagementData:{},
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
@ -187,65 +172,65 @@ export default {
destinationInfo: null, destinationInfo: null,
rescueStatus: null, rescueStatus: null,
rescueAmount: null, rescueAmount: null,
rescueStart: null rescueStart:null,
}, },
// //
form: {}, form: {},
driverList: [], driverList:[],
// //
rules: { rules: {
connectionName: [ connectionName: [
{ required: true, message: '联系人名称不能为空', trigger: 'blur' } { required: true, message: "联系人名称不能为空", trigger: "blur" }
], ],
connectionPhone: [ connectionPhone: [
{ required: true, message: '联系人手机号不能为空', trigger: 'blur' } { required: true, message: "联系人手机号不能为空", trigger: "blur" }
], ],
licenseNum: [ licenseNum: [
{ required: true, message: '车牌号不能为空', trigger: 'blur' } { required: true, message: "车牌号不能为空", trigger: "blur" }
], ],
isAppointment: [ isAppointment: [
{ required: true, message: '是否为预约单不能为空', trigger: 'change' } { required: true, message: "是否为预约单不能为空", trigger: "change" }
], ],
rescueType: [ rescueType: [
{ required: true, message: '救援类型 1拖车2送油3搭电4换台5扣车不能为空', trigger: 'change' } { required: true, message: "救援类型 1拖车2送油3搭电4换台5扣车不能为空", trigger: "change" }
], ],
carType: [ carType: [
{ required: true, message: '车辆类型 大中小不能为空', trigger: 'change' } { required: true, message: "车辆类型 大中小不能为空", trigger: "change" }
], ],
rescuePosition: [ rescuePosition: [
{ required: true, message: '救援地点 详细描述不能为空', trigger: 'blur' } { required: true, message: "救援地点 详细描述不能为空", trigger: "blur" }
], ],
feeType: [ feeType: [
{ required: true, message: '收费类型不能为空', trigger: 'change' } { required: true, message: "收费类型不能为空", trigger: "change" }
] ],
} }
} };
}, },
components: { components:{
Map Map
}, },
created() { created() {
this.getList() this.getList();
}, },
methods: { methods: {
cancelRepayment() { cancelRepayment(){
this.repaymentForm = {} this.repaymentForm = {}
this.repaymentOpen = false this.repaymentOpen = false
}, },
repaymentSubmit() { repaymentSubmit(){
this.$refs['repaymentForm'].validate(valid => { this.$refs["repaymentForm"].validate(valid => {
if (valid) { if (valid) {
returnOrder(this.repaymentForm).then(res => { returnOrder(this.repaymentForm).then(res=>{
this.$modal.msgSuccess('还款成功') this.$modal.msgSuccess("还款成功");
this.repaymentOpen = false this.repaymentOpen = false;
this.repaymentForm = {} this.repaymentForm = {}
this.getList() this.getList();
}) })
} }
}) });
}, },
repayment(data) { repayment(data){
this.repaymentOpen = true this.repaymentOpen = true
this.repaymentForm.rescueOrderId = data.rescueOrderId this.repaymentForm.rescueOrderId = data.rescueOrderId
}, },
@ -255,43 +240,43 @@ export default {
return { return {
rowspan: 2, rowspan: 2,
colspan: 1 colspan: 1
} };
} else { } else {
return { return {
rowspan: 0, rowspan: 0,
colspan: 0 colspan: 0
} };
} }
} }
}, },
driverOk() { driverOk(){
this.designateFlag = false this.designateFlag = false
designateDriver(this.rescueInfoId, this.chooseDriverId).then(res => { designateDriver(this.rescueInfoId,this.chooseDriverId).then(res=>{
this.$message.success('指派成功') this.$message.success("指派成功")
this.getList() this.getList()
}) })
}, },
/** 查询道路救援模块列表 */ /** 查询道路救援模块列表 */
getList() { getList() {
this.loading = true this.loading = true;
moneyManagement(this.queryParams).then(response => { moneyManagement(this.queryParams).then(response => {
this.infoList = response.data.records this.infoList = response.rows;
this.total = response.data.total this.total = response.total;
this.loading = false this.loading = false;
}) });
moneyManagementData(this.queryParams).then(response => { moneyManagementData(this.queryParams).then(response => {
this.moneyManagementData = response.data this.moneyManagementData = response.data;
}) });
}, },
getDriverList() { getDriverList() {
getDriver().then(response => { getDriver().then(response => {
this.driverList = response.rows this.driverList = response.rows;
}) });
}, },
// //
cancel() { cancel() {
this.open = false this.open = false;
this.reset() this.reset();
}, },
// //
reset() { reset() {
@ -319,77 +304,78 @@ export default {
createBy: null, createBy: null,
updateTime: null, updateTime: null,
updateBy: null updateBy: null
} };
this.resetForm('form') this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
if (this.time1 && this.time1.length > 0) { if (this.time1&&this.time1.length>0){
this.queryParams.rescueStart = this.time1[0] this.queryParams.rescueStart = this.time1[0];
this.queryParams.rescueEnd = this.time1[1] this.queryParams.rescueEnd = this.time1[1];
} }
this.queryParams.pageNo = 1 this.queryParams.pageNo = 1;
this.getList() this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.time1 = [] this.time1 =[]
this.resetForm('queryForm') this.resetForm("queryForm");
this.queryParams = {} this.queryParams={}
this.handleQuery() this.handleQuery();
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.id)
this.single = selection.length !== 1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset() this.reset();
this.open = true this.open = true;
this.title = '添加道路救援模块' this.title = "添加道路救援模块";
}, },
pickDriver(row) { pickDriver(row){
}, },
designateDriver(row) { designateDriver(row){
this.designateFlag = true this.designateFlag = true
this.rescueInfoId = row.id this.rescueInfoId = row.id
this.getDriverList() this.getDriverList();
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset() this.reset();
const id = row.id || this.ids const id = row.id || this.ids
getInfo(id).then(response => { getInfo(id).then(response => {
this.form = response.data this.form = response.data;
this.open = true this.open = true;
this.title = '修改道路救援模块' this.title = "修改道路救援模块";
}) });
}, },
handleMap(row) { handleMap(row){
this.rescueInfoId = row.id this.rescueInfoId = row.id
routeInfo(row.id).then(res => { routeInfo(row.id).then(res=>{
this.ztlist = res.data this.ztlist = res.data
this.none(res.data) this.none(res.data)
}) })
getmap(row.id).then(res => { getmap(row.id).then(res=>{
let datas = [] let datas =[]
res.data.forEach(it => { res.data.forEach(it=>{
let temp = [it.longitude, it.latitude] let temp =[it.longitude,it.latitude]
datas.push(temp) datas.push(temp)
}) })
this.$refs.mapComponent.initMap(datas) this.$refs.mapComponent.initMap(datas)
}) })
this.opens = true this.opens = true;
}, },
none(arr) { none(arr){
let sum = 0 let sum = 0;
for (var i = 0; i < arr.length; i++) { for(var i = 0;i<arr.length;i++){
sum += arr[i].distanceMeter sum += arr[i].distanceMeter;
} }
this.zong = sum this.zong = sum
@ -397,45 +383,45 @@ export default {
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs['form'].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
updateInfo(this.form).then(response => { updateInfo(this.form).then(response => {
this.$modal.msgSuccess('修改成功') this.$modal.msgSuccess("修改成功");
this.open = false this.open = false;
this.getList() this.getList();
}) });
} else { } else {
addInfo(this.form).then(response => { addInfo(this.form).then(response => {
this.$modal.msgSuccess('新增成功') this.$modal.msgSuccess("新增成功");
this.open = false this.open = false;
this.getList() this.getList();
}) });
} }
} }
}) });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除道路救援模块编号为"' + ids + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除道路救援模块编号为"' + ids + '"的数据项?').then(function() {
return delInfo(ids) return delInfo(ids);
}).then(() => { }).then(() => {
this.getList() this.getList();
this.$modal.msgSuccess('删除成功') this.$modal.msgSuccess("删除成功");
}).catch(() => { }).catch(() => {});
})
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
async handleExport() { handleExport() {
const data = await exportManagement(this.queryParams) this.download('/system/rescueInfo/exportManagement', {
this.$download.excel(data, `救援财务报表_${new Date().getTime()}.xlsx`) ...this.queryParams
}, `救援财务报表_${new Date().getTime()}.xlsx`)
} }
} }
} };
</script> </script>
<style scoped> <style scoped>
.lang-for { .lang-for{
width: 100%; width: 100%;
margin: 10px auto; margin: 10px auto;
} }