zhongtianhaoyuan 2 éve
szülő
commit
b745fc9a88

+ 11 - 0
src/api/news.js

@@ -0,0 +1,11 @@
+import request from '@/utils/request'
+const uploadPath = process.env.VUE_APP_BASE_API + '/appendix/admin'
+// const uploadPath = 'https://apitest.changyuntong56.com/appendix/api/upload'
+export { uploadPath }
+export function getNewsList(data) {
+    return request({
+        url: '/newsInfo/selectNewsInfo',
+        method: 'get',
+        params: data,
+    })
+}

+ 2 - 0
src/router/index.js

@@ -4,6 +4,7 @@ import store from '../store'
 Vue.use(Router)
 
 import Layout from '@/layout'
+import news from './news/index'
 import driverManagement from './driverManagement/index'
 import cargoOwnerManagement from './cargoOwnerManagement/index'
 import enterpriseManagement from './enterpriseManagement/index'
@@ -86,6 +87,7 @@ export const constantRoutes = [{
     // }
 ]
 let cofigRouter = [
+    news,
     driverManagement,
     cargoOwnerManagement,
     enterpriseManagement,

+ 30 - 0
src/router/news/index.js

@@ -0,0 +1,30 @@
+/** When your routing table is too long, you can split it into small modules**/
+
+import Layout from '@/layout'
+
+const newsRouter = {
+    path: '/news',
+    component: Layout,
+    redirect: 'noRedirect',
+    name: 'news',
+    meta: {
+        title: '消息管理',
+        icon: 'sijiguanli',
+        checkIcon: 'checksijiguanli',
+        module: 'changyuntong.sijiguanli',
+    },
+    children: [{
+            path: 'index',
+            name: 'index',
+            component: () =>
+                import ('@/views/news/index'),
+            meta: {
+                title: '消息管理',
+                icon: '',
+                module: 'changyuntong.sijiguanli.view',
+            }
+        }
+    ]
+}
+
+export default newsRouter

+ 98 - 0
src/views/news/index.vue

@@ -0,0 +1,98 @@
+<template>
+    <div class="content">
+        <div class="newsList">
+            <ul class="infinite-list" v-infinite-scroll="load" style="overflow: auto;height: 80vh;" >
+                <li v-for="(item, index) in newList" class="infinite-list-item" :key="index">
+                    <div class="list_item">
+                        <div class="list_item_top">
+                            <div class="title">{{ item.newsTitle }}</div>
+                            <div class="date">{{ item.updateDate }}</div>
+                        </div>
+                        <div class="tips">{{ item.newsContent }}</div>
+                    </div>
+                    <el-divider></el-divider>
+                </li>
+            </ul>
+        </div>
+    </div>
+</template>
+<script >
+import { getNewsList } from "@/api/news";
+export default {
+    data() {
+        return {
+            currentPage: 1,
+            pageSize: 10,
+            deptBudgetTotal: "",
+            newList: [],
+            id: "", //用户id
+            check: true, //下拉刷新开关
+        };
+    },
+    mounted() {
+        this.id = localStorage.getItem("ws-pf_userId");
+        // this.getList();
+    },
+    methods: {
+        getList() {
+            this.listLoading = true;
+            getNewsList({
+                reCommonId: this.id,
+                currentPage: this.currentPage,
+                pageSize: this.pageSize,
+            })
+                .then((response) => {
+                    this.newList = response.data.records;
+                    this.deptBudgetTotal = response.data.total;
+                    this.listLoading = false;
+                })
+                .catch(() => {
+                    this.listLoading = false;
+                });
+        },
+        load() {
+            this.pageSize += 10;
+            this.getList()
+        },
+    },
+};
+</script>
+<style lang="scss" scoped>
+.content {
+    background: #f6f7fc;
+    height: 100vh - 7vh;
+    padding-top: 30px;
+}
+
+.newsList {
+    width: 80%;
+    // height: 80vh;
+    border-radius: 6px;
+    background: #ffffff;
+    // overflow:auto;
+    margin: 0 auto;
+
+    .list_item {
+        .list_item_top {
+            display: flex;
+            margin: 10px 0;
+
+            .title {
+                font-size: 20px;
+                font-weight: 600;
+                width: 20%;
+            }
+
+            .date {
+                text-align: right;
+                width: 80%;
+                margin-right: 20px;
+            }
+        }
+
+        .tips {
+            color: #8890b1;
+        }
+    }
+}
+</style>

+ 4 - 2
src/views/orderManagement/orderAudit.vue

@@ -279,7 +279,9 @@
             <div class="right_item">{{costData.hyCarrierInfo.estimatedFreight}}</div>
             <div class="right_title">装车时间</div>
             <div class="right_item">{{costData.hyCarrierInfo.loadingDate}}</div>
-            <div class="right_title">装车定位</div>
+            <div class="right_title">运输时长</div>
+            <div class="right_item">{{costData.hyCarrierInfo.transportationDuration}}</div>
+            <div class="right_title" v-if="costData.hyCarrierInfo.loadingCity">装车定位</div>
             <div class="right_item">{{costData.hyCarrierInfo.loadingCity}}{{costData.hyCarrierInfo.loadingArea}}</div>
             <div class="right_title">装车照片</div>
             <div style="display: flex;" v-if="costData.hyCarrierInfo.loadingImg">
@@ -291,7 +293,7 @@
             <div class="right_item">{{costData.hyCarrierInfo.totalFreight}}</div>
             <div class="right_title" v-if="costData.hyCarrierInfo.unloadingDate">卸车时间</div>
             <div class="right_item">{{costData.hyCarrierInfo.unloadingDate}}</div>
-            <div class="right_title">卸车定位</div>
+            <div class="right_title" v-if="costData.hyCarrierInfo.unloadingCity">卸车定位</div>
             <div class="right_item">{{costData.hyCarrierInfo.unloadingCity}}{{costData.hyCarrierInfo.unloadingArea}}</div>
             <div class="right_title" v-if="costData.hyCarrierInfo.unloadingImg">卸车照片</div>
             <div style="display: flex;" v-if="costData.hyCarrierInfo.unloadingImg">