董国庆
2025-03-05 4fb6166c8ac21a1cfc2705d763326324cc7b75a4
Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/H5/shehong-vehicle-supervision
5个文件已修改
119 ■■■■ 已修改文件
.gitignore 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/baseurl.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/order/component/detailModal.vue 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/order/index.vue 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -10,6 +10,7 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
# Editor directories and files
.idea
src/main.js
@@ -10,6 +10,8 @@
Vue.use(ElementUI)
Vue.prototype.$cookies = cookies;
Vue.prototype.$baseURL = apiConfig.baseURL
Vue.prototype.$mapKey = apiConfig.mapKey
Vue.prototype.$secretKey = apiConfig.secretKey
Vue.config.productionTip = false
/* 全局TableHeight */
Vue.prototype.$baseTableHeight = (formType) => {
src/utils/baseurl.js
@@ -2,6 +2,8 @@
    // 开发环境
    development: {
        baseURL: "",
        mapKey: "67968c82f27c7e2cb9f40c1a9aa3042b",
        secretKey: "37ce61ae86efa5ad82b649a277f5097c",
    },
    // 生产环境
    production: {
src/view/order/component/detailModal.vue
@@ -28,7 +28,7 @@
            </div>
            <!-- 行程轨迹 -->
            <div v-show="tabPosition == 'track'">
                <div class="mapContainer" id="mapContainer"></div>
            </div>
            <!-- 行程监控 -->
            <div v-show="tabPosition == 'monitoring'"></div>
@@ -37,28 +37,88 @@
</template>
<script>
import AMapLoader from "@amap/amap-jsapi-loader";
export default {
    components: {},
    props: {},
    data() {
        return {
            dialogVisible: true,
            dialogVisible: false,
            tabPosition: 'order',
        };
    },
    computed: {},
    watch: {},
    created() { },
    mounted() { },
    mounted() {
        this.initMap();
    },
    methods: {
        initMap() {
            window._AMapSecurityConfig = {
                securityJsCode: this.$secretKey,
            };
            AMapLoader.load({
                key: this.$mapKey,
                version: "2.0",
                plugins: [
                    "AMap.ToolBar",
                ],
            })
                .then((AMap) => {
                    this.map = new AMap.Map("mapContainer", {
                        center: [105.574542, 30.5061493],
                        zoom: 15,
                    });
                    this.map.addControl(new AMap.ToolBar());
                    let path = [
                        new AMap.LngLat(105.57, 30.51),
                        new AMap.LngLat(116.382122, 39.901176),
                        new AMap.LngLat(116.387271, 39.912501),
                        new AMap.LngLat(116.398258, 39.9046),
                    ]
                    const content = `<div class="custom-content-marker">
                                        <img src="${require("@/assets/logo.png")}">
                                    </div>`;
                    const marker = new AMap.Marker({
                        content: content, //自定义点标记覆盖物内容
                        position: [105.57, 30.51], //基点位置
                        offset: new AMap.Pixel(-30, -15), //相对于基点的偏移位置
                    });
                    this.map.add(marker);
                    let polyline = new AMap.Polyline({
                        path: path,
                        strokeWeight: 2, //线条宽度
                        strokeColor: "red", //线条颜色
                        lineJoin: "round", //折线拐点连接处样式
                    });
                    this.map.add(polyline);
                })
                .catch((e) => {
                });
        },
        closeClick() {
            this.dialogVisible = false
        }
    },
};
</script>
<style>
.custom-content-marker {
    width: 30px;
    height: 30px;
}
.custom-content-marker img {
    width: 100%;
    height: 100%;
}
</style>
<style scoped lang="less">
::v-deep .el-descriptions .el-descriptions-item__cell {
    padding-bottom: 25px;
}
#mapContainer {
    width: 100%;
    height: 600px;
}
</style>
src/view/order/index.vue
@@ -3,33 +3,39 @@
        <div class="form flex a-center j-between mt--23">
            <div class="form-left ml--30">
                <el-form :inline="true" :model="searchForm" class="demo-form-inline">
                    <el-form-item label="派单时间:" prop="level" class="unset_m" style="margin-right: 15px;">
                        <el-input v-model="searchForm.level" placeholder="请输入"></el-input>
                    <el-form-item label="派单时间:" prop="level" class="unset_m" style="margin-right: 100px;">
                        <el-date-picker style="width: 400px;" v-model="value1" type="datetimerange" range-separator="至"
                            start-placeholder="开始日期" end-placeholder="结束日期">
                        </el-date-picker>
                    </el-form-item>
                    <el-form-item label="订单编号:" prop="name" class="unset_m" style="margin-right: 15px;">
                    <el-form-item label="订单编号:" prop="name" class="unset_m" style="margin-right: 100px;">
                        <el-input v-model="searchForm.name" placeholder="请输入"></el-input>
                    </el-form-item>
                    <el-form-item label="车辆号牌:" prop="name" class="unset_m" style="margin-right: 15px;">
                    <el-form-item label="车辆号牌:" prop="name" class="unset_m" style="margin-right: 100px;">
                        <el-input v-model="searchForm.name" placeholder="请输入"></el-input>
                    </el-form-item>
                    <el-form-item label="驾驶员姓名:" prop="date" class="unset_m" style="margin-right: 15px;">
                    <el-form-item label="驾驶员姓名:" prop="date" class="unset_m" style="margin-right: 100px;">
                        <el-input v-model="searchForm.name" placeholder="请输入"></el-input>
                    </el-form-item>
                    <el-form-item label="公司名称:" prop="date" class="unset_m" style="margin-right: 15px;">
                    <el-form-item label="公司名称:" prop="date" class="unset_m" style="margin-right: 100px;">
                        <el-input class="companyName" v-model="searchForm.name" placeholder="请输入"></el-input>
                    </el-form-item>
                    <el-form-item label="上车地点:" prop="date" class="unset_m" style="margin-right: 100px;">
                        <el-input v-model="searchForm.name" placeholder="请输入"></el-input>
                    </el-form-item>
                    <el-form-item label="上车地点:" prop="date" class="unset_m" style="margin-right: 15px;">
                    <el-form-item label="下车地点:" prop="date" class="unset_m" style="margin-right: 100px;">
                        <el-input v-model="searchForm.name" placeholder="请输入"></el-input>
                    </el-form-item>
                    <el-form-item label="下车地点:" prop="date" class="unset_m" style="margin-right: 15px;">
                        <el-input v-model="searchForm.name" placeholder="请输入"></el-input>
                    </el-form-item>
                    <el-form-item label="里程范围:" prop="date" class="unset_m" style="margin-right: 15px;">
                        <el-input v-model="searchForm.name" placeholder="请输入"></el-input>
                    <el-form-item label="里程范围:" prop="date" class="unset_m" style="margin-right: 100px;">
                        <div class="flex a-center j-between">
                            <el-input class="range" v-model="searchForm.name" placeholder="请输入"></el-input>
                            <div class="mx--20">-</div>
                            <el-input class="range" v-model="searchForm.name" placeholder="请输入"></el-input>
                        </div>
                    </el-form-item>
                </el-form>
            </div>
            <div class="form-right mr--24 mb--22">
            <div class="form-right mr--24 mb--22 shrink0">
                <el-button class="search-button h--40 w--90 fs--14" icon="el-icon-search" type="primary" size="small"
                    @click="search">查询</el-button>
                <el-button @click="reset" icon="el-icon-refresh-right" class="reset-button h--40 w--90 fs--14"
@@ -123,4 +129,16 @@
::v-deep .el-form-item .el-input__inner {
    width: 240px;
}
::v-deep .companyName {
    .el-input__inner {
        width: 400px !important;
    }
}
::v-deep .range {
    .el-input__inner {
        width: 100% !important;
    }
}
</style>