md
This commit is contained in:
parent
168097d279
commit
54f3151c2e
55
src/api/emis/emisTmsMapTrace.js
Normal file
55
src/api/emis/emisTmsMapTrace.js
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询可视化物流轨迹列表
|
||||||
|
export function listEmisTmsMapTrace(query) {
|
||||||
|
return request({
|
||||||
|
url: '/emis/emisTmsMapTrace/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 查询可视化物流轨迹详细
|
||||||
|
export function getDeviceNoByBillCode(billCode) {
|
||||||
|
return request({
|
||||||
|
url: '/emis/emisTmsMapTrace/getDeviceNoByBillCode',
|
||||||
|
method: 'get',
|
||||||
|
params: {billCode:billCode}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 查询可视化物流轨迹详细
|
||||||
|
export function getEmisTmsMapTrace(id) {
|
||||||
|
return request({
|
||||||
|
url: '/emis/emisTmsMapTrace/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增可视化物流轨迹
|
||||||
|
export function addEmisTmsMapTrace(data) {
|
||||||
|
return request({
|
||||||
|
url: '/emis/emisTmsMapTrace',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改可视化物流轨迹
|
||||||
|
export function updateEmisTmsMapTrace(data) {
|
||||||
|
return request({
|
||||||
|
url: '/emis/emisTmsMapTrace',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除可视化物流轨迹
|
||||||
|
export function delEmisTmsMapTrace(id) {
|
||||||
|
return request({
|
||||||
|
url: '/emis/emisTmsMapTrace/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
94
src/views/emis/customerService/mapTraceView.vue
Normal file
94
src/views/emis/customerService/mapTraceView.vue
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
<template>
|
||||||
|
<div class="" >
|
||||||
|
<div v-if="isNeedTrace">
|
||||||
|
<iframe :src="traceMapUrl" id="map" scrolling="no" frameborder="0" style="width:100%;min-height: 400px;" ></iframe>
|
||||||
|
</div>
|
||||||
|
<div v-else>未配置</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getDeviceNoByBillCode } from "@/api/emis/emisTmsMapTrace";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "MapTraceView",
|
||||||
|
props:{
|
||||||
|
billCode:{
|
||||||
|
type: String,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dicts: [],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
reverse: false,
|
||||||
|
loading: true,
|
||||||
|
isNeedTrace:false,
|
||||||
|
deviceNo:null,
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
traceMapUrl: function () {
|
||||||
|
return "https://lbs.jtrs56.com/showTraceMap?deviceNo="+this.deviceNo;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
"billCode": {
|
||||||
|
handler (newValue, oldValue) {
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
initData() {
|
||||||
|
this.isNeedTrace=true;
|
||||||
|
if(this.billCode) {
|
||||||
|
getDeviceNoByBillCode(this.billCode).then(response => {
|
||||||
|
this.deviceNo=response.data;
|
||||||
|
if(this.deviceNo!='-1'){
|
||||||
|
this.isNeedTrace=true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.deviceNo=null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getIndex($index) {
|
||||||
|
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
|
|
||||||
|
.margin-top{
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-descriptions-item__label.is-bordered-label {
|
||||||
|
min-width: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.printMeClass {
|
||||||
|
font-family: SimHei;
|
||||||
|
label {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.siteOrManHighlight {
|
||||||
|
color: #00BFFF;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.transferGray{
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
140
src/views/emis/emisTmsMapTrace/emisTmsMapTraceForm.vue
Normal file
140
src/views/emis/emisTmsMapTrace/emisTmsMapTraceForm.vue
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
<template>
|
||||||
|
<div >
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="关联类型" prop="traceType">
|
||||||
|
<el-select v-model="form.traceType" placeholder="关联类型" clearable filterable style="width:100%" >
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.emis_map_trace_num_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="关联单号" prop="orderNo">
|
||||||
|
<el-input v-model="form.orderNo" placeholder="请输入关联运单或批次号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="设备号" prop="deviceNo">
|
||||||
|
<el-input v-model="form.deviceNo" placeholder="请输入跟踪设备号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: center;margin-bottom: 10px;">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listEmisTmsMapTrace, getEmisTmsMapTrace, delEmisTmsMapTrace, addEmisTmsMapTrace, updateEmisTmsMapTrace } from "@/api/emis/emisTmsMapTrace";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "emisTmsMapTraceForm",
|
||||||
|
props:{
|
||||||
|
id:{
|
||||||
|
type:Number
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: { },
|
||||||
|
dicts: ['emis_map_trace_num_type'
|
||||||
|
],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
emisTmsMapTraceOptions: [],
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
id: [
|
||||||
|
{ required: true, message: "id不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
orderNo: [
|
||||||
|
{ required: true, message: "单号号或者批次号不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
deviceNo: [
|
||||||
|
{ required: true, message: "设备号不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
traceType: [
|
||||||
|
{ required: true, message: "1-运单不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
"id": {
|
||||||
|
handler (newValue, oldValue) {
|
||||||
|
this.id = newValue;
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
initData() {
|
||||||
|
|
||||||
|
if(this.id !=null) {
|
||||||
|
this.loading = true;
|
||||||
|
getEmisTmsMapTrace(this.id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.reset();
|
||||||
|
}
|
||||||
|
// this.getTreeselect();
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.reset();
|
||||||
|
this.$emit("on-cancel");
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
orderNo: null,
|
||||||
|
deviceNo: null,
|
||||||
|
traceType: null,
|
||||||
|
lastTraceDate: null,
|
||||||
|
lastTraceStatus: null,
|
||||||
|
lastLocationInfo: null,
|
||||||
|
remark: null,
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateEmisTmsMapTrace(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.$emit("on-changed");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addEmisTmsMapTrace(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.$emit("on-changed");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
343
src/views/emis/emisTmsMapTrace/index.vue
Normal file
343
src/views/emis/emisTmsMapTrace/index.vue
Normal file
@ -0,0 +1,343 @@
|
|||||||
|
<template>
|
||||||
|
<XdPageContainer class="app-container">
|
||||||
|
<SearchForm slot="pageHeader" :model="queryParams" ref="queryForm" size="mini" :maxShow="3" label-width="68px" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
|
||||||
|
|
||||||
|
<el-form-item label="关联单号" prop="orderNo">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.orderNo"
|
||||||
|
:placeholder="$t('关联运单号或批次号')"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备号" prop="deviceNo">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.deviceNo"
|
||||||
|
:placeholder="$t('设备号')"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="关联类型" prop="traceType">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.traceType"
|
||||||
|
:placeholder="$t('关联类型')"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</SearchForm>
|
||||||
|
|
||||||
|
|
||||||
|
<XdTable v-loading="loading"
|
||||||
|
|
||||||
|
slot="pageContent"
|
||||||
|
slot-scope="slotProps"
|
||||||
|
:height="(slotProps.contentHeight)+'px'"
|
||||||
|
|
||||||
|
highlight-current-row
|
||||||
|
|
||||||
|
ref="refTable"
|
||||||
|
|
||||||
|
|
||||||
|
storageName="emisTmsMapTraceList_main_240702"
|
||||||
|
|
||||||
|
border stripe
|
||||||
|
size="small"
|
||||||
|
:data="emisTmsMapTraceList"
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
:queryParams="queryParams"
|
||||||
|
:total="total"
|
||||||
|
@queryTable="getList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
@sort-change="handleSortChange"
|
||||||
|
>
|
||||||
|
|
||||||
|
<div slot="toolbar">
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['emis:emisTmsMapTrace:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['emis:emisTmsMapTrace:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['emis:emisTmsMapTrace:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['emis:emisTmsMapTrace:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
|
||||||
|
<el-table-column :label="$t('关联单号')" align="center" prop="orderNo" min-width="150" />
|
||||||
|
<el-table-column :label="$t('设备号')" align="center" prop="deviceNo" min-width="150" />
|
||||||
|
<el-table-column :label="$t('关联类型')" align="center" prop="traceType" min-width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.emis_map_trace_num_type" :value="scope.row.traceType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建人" align="center" prop="createByName" width="80" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="创建网点" align="center" prop="createSiteName" width="80" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" width="170"/>
|
||||||
|
<el-table-column label="修改人" align="center" prop="updateByName" width="80" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="修改网点" align="center" prop="updateSiteName" width="80" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="修改时间" align="center" prop="updateTime" width="170"/>
|
||||||
|
</XdTable>
|
||||||
|
|
||||||
|
<el-dialog :title="titleForm" :visible.sync="openForm" width="40%" :destroy-on-close="true" v-dialogDrag append-to-body>
|
||||||
|
<emisTmsMapTraceForm :id="currentId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></EmisTmsMapTraceForm>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<el-dialog :title="titleView" :visible.sync="openView" width="60%" :close-on-click-modal="false" v-dialogDrag append-to-body>
|
||||||
|
<emisTmsMapTraceView :id="id" ></EmisTmsMapTraceView>
|
||||||
|
</el-dialog>
|
||||||
|
-->
|
||||||
|
|
||||||
|
</XdPageContainer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listEmisTmsMapTrace, getEmisTmsMapTrace, delEmisTmsMapTrace, addEmisTmsMapTrace, updateEmisTmsMapTrace } from "@/api/emis/emisTmsMapTrace";
|
||||||
|
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||||
|
// import emisTmsMapTraceView from '@/views/emis/emisTmsMapTrace/emisTmsMapTraceView';
|
||||||
|
import emisTmsMapTraceForm from '@/views/emis/emisTmsMapTrace/emisTmsMapTraceForm';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "emisTmsMapTrace",
|
||||||
|
components: { elDateSimplePicker,emisTmsMapTraceForm },
|
||||||
|
dicts: ['emis_map_trace_num_type'
|
||||||
|
],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 创建时间搜索
|
||||||
|
dateTimeRange:[],
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 可视化物流轨迹表格数据
|
||||||
|
emisTmsMapTraceList: [],
|
||||||
|
selectionList:[],
|
||||||
|
|
||||||
|
currentId:null,
|
||||||
|
openForm: false,
|
||||||
|
titleForm: "",
|
||||||
|
|
||||||
|
// 弹出展示层
|
||||||
|
id:null,
|
||||||
|
titleView:"",
|
||||||
|
openView: false,
|
||||||
|
// 更新站点时间范围
|
||||||
|
daterangeLastTraceDate: [],
|
||||||
|
// 更新站点时间范围
|
||||||
|
daterangeCreateTime: [],
|
||||||
|
// 更新站点时间范围
|
||||||
|
daterangeUpdateTime: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
orderNo: null,
|
||||||
|
deviceNo: null,
|
||||||
|
traceType: null,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询可视化物流轨迹列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listEmisTmsMapTrace(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
||||||
|
this.emisTmsMapTraceList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
this.selectionList=selection;
|
||||||
|
|
||||||
|
},
|
||||||
|
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||||
|
handleSortChange(column) {
|
||||||
|
this.queryParams.orderByColumn = column.prop;
|
||||||
|
this.queryParams.isAsc = column.order;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd(row) {
|
||||||
|
this.currentId=null;
|
||||||
|
this.openForm= true;
|
||||||
|
this.titleForm = "新增物流可视化单号关联";
|
||||||
|
},
|
||||||
|
handleShowMoreInput(){
|
||||||
|
this.moreInputVisible = !this.moreInputVisible;
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.currentId= row.id||this.ids[0];
|
||||||
|
this.openForm = true;
|
||||||
|
this.titleForm = "修改";
|
||||||
|
},
|
||||||
|
handleView(row) {
|
||||||
|
this.id=row.id;
|
||||||
|
this.titleView="查看";
|
||||||
|
this.openView=true;
|
||||||
|
// this.router.push({ path: '/emis/emisTmsMapTrace/viewDetail', query: { id: row.id }})
|
||||||
|
},
|
||||||
|
handleFormChanged(){
|
||||||
|
this.openForm = false;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
cancelForm(){
|
||||||
|
this.openForm = false;
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除').then(function() {
|
||||||
|
return delEmisTmsMapTrace(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
// this.download('emis/emisTmsMapTrace/export', {
|
||||||
|
// ...this.queryParams
|
||||||
|
// }, `emisTmsMapTrace_${new Date().getTime()}.xlsx`)
|
||||||
|
const loadingInstance = this.$loading({
|
||||||
|
text: '正在导出...'
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(this.selectionList&&this.selectionList.length>0){
|
||||||
|
this.exportData(this.selectionList,loadingInstance);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
let qExportParam=this.deepClone(this.queryParams);
|
||||||
|
qExportParam.pageNum=1;
|
||||||
|
qExportParam.pageSize=20000;
|
||||||
|
|
||||||
|
listEmisTmsMapTrace(qExportParam).then(response => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
let rows=this.unzipToJson(response.rows[0]);
|
||||||
|
this.exportData(rows,loadingInstance);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
exportData(selData,loadingInstance){
|
||||||
|
const curList =selData
|
||||||
|
import('@/vendor/Export2Excel').then(excel => {
|
||||||
|
const exportParam=this.$refs.refTable.getExportParam();
|
||||||
|
const tHeader = exportParam.header;
|
||||||
|
const filterVal = exportParam.filter;
|
||||||
|
const data = this.formatJson(filterVal, curList, selData)
|
||||||
|
excel.export_json_to_excel({
|
||||||
|
header: tHeader,
|
||||||
|
data,
|
||||||
|
filename: '跟踪列表',
|
||||||
|
autoWidth: true
|
||||||
|
})
|
||||||
|
loadingInstance.close()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
formatJson(filterVal, jsonData, resData) {
|
||||||
|
let index = 0
|
||||||
|
return jsonData.map(v => filterVal.map(j => {
|
||||||
|
if (j === 'index') {
|
||||||
|
return ++index
|
||||||
|
}
|
||||||
|
if (j === 'status') {
|
||||||
|
var statusStr='xxx'
|
||||||
|
if(v[j] == 10){
|
||||||
|
statusStr='xxx'
|
||||||
|
}
|
||||||
|
return statusStr;
|
||||||
|
}
|
||||||
|
return v[j]
|
||||||
|
}))
|
||||||
|
},
|
||||||
|
/** 列索引函数 */
|
||||||
|
getIndex($index) {
|
||||||
|
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||||
|
},
|
||||||
|
/** 时间搜索响应函数 */
|
||||||
|
dateTimeChange(value){
|
||||||
|
this.dateTimeRange=value;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-divider{
|
||||||
|
margin-top: 0px;
|
||||||
|
background: 0 0;
|
||||||
|
border-top: 1px solid #E6EBF5;
|
||||||
|
}
|
||||||
|
.el-divider__text {
|
||||||
|
color: #0955ee;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user