YangJian0701 před 1 rokem
rodič
revize
8d8c3e5f86

+ 1 - 0
package.json

@@ -13,6 +13,7 @@
     "babel-plugin-transform-remove-console": "^6.9.4",
     "build": "^0.1.4",
     "core-js": "^3.26.1",
+    "crypto-js": "^4.2.0",
     "dom-to-image": "^2.6.0",
     "echarts": "^5.3.3",
     "element-ui": "^2.15.9",

+ 3 - 3
src/App.vue

@@ -1,8 +1,8 @@
 <template>
 	<div id="app">
 		<showFirm></showFirm>
-		<router-view v-show="screenWidth>599"></router-view>
-		<div class="qr" v-show="screenWidth<599">
+        <router-view v-show="screenWidth>599 || $route.path=='/msgAlert'""></router-view>
+		<div class="qr" v-show="screenWidth<599 &&  $route.path!='/msgAlert'"">
 			<div class="qr-mai">
 				<img src="./assets/img/Qr.png" alt="请访问冷链小程序"
 					style="width: 150px;height: 150px;margin-bottom: 20px;">
@@ -25,8 +25,8 @@
 			showFirm
 		},
 		
-		
 		mounted() {
+            console.log(this.$route)
 			// //console.log(navigator.userAgent.indexOf('Chrome') > -1) //Opera浏览器 Firefox浏览器 Chrome浏览器 Safari浏览器 compatible(ie)是当前浏览器true
 			const that = this;
 			AOS.init();

+ 148 - 25
src/api/instrument/Theorder.js

@@ -4,62 +4,185 @@ import {
 } from '../../utils/http.js'
 
 const ClassApi = {
-	GoodsOrderList: '/v3/GoodsOrder/List',//订单管理列表
-	GoodsOrderAdd: '/v3/GoodsOrder/Add',//添加
-	GoodsOrderPDF: '/v3/GoodsOrder/PDF',//到处pdf
-	GoodsOrderDel: '/v3/GoodsOrder/Del',//删除订单
-	GoodsOrderEdit: '/v3/GoodsOrder/Edit',//编辑订单
-	
+	OrderList: '/v3/Order/List',//订单管理列表
+	OrderAdd: '/v3/Order/Add',//添加
+	OrderNumber: '/v3/Order/CreateOrderNo',//获取订单号
+	OrderDel: '/v3/Order/Del',//删除订单
+    OrderEdit: '/v3/Order/Edit',//编辑订单
+    OrderEdit: '/v3/Order/Edit',//编辑订单
+    OrderPDF: '/v3/Order/PDF',//导出pdf
 	DeviceList: '/v3/Device/List',//设备管理列表
-	
+
+	AddressList: '/v3/Addr/List',//地址列表
+	AddressAdd: '/v3/Addr/Add',//地址添加
+	AddressEdit: '/v3/Addr/Edit',//地址编辑
+	AddressDel: '/v3/Addr/Del',//地址删除
+	getdevData: '/v3/Order/GetDeviceData',//温湿度,地址
+
+	getdevDataNot: '/v3/Order/GetDeviceDataNot',//温湿度,地址
+
+    
+}
+
+export function getdevDataNot(data) {
+	return axios({
+		url: ClassApi.getdevDataNot,
+		method: 'post',
+		data:data,
+	})
+}
+
+export function OrderPDF(data) {
+	return axios({
+		url: ClassApi.OrderPDF,
+		method: 'post',
+		data:data,
+	})
+}
+/**
+ * 地址删除
+ * @param {*} data 
+ * @returns 
+ */
+export function getdevData(data) {
+	return axios({
+		url: ClassApi.getdevData,
+		method: 'post',
+		data:data,
+	})
+}
+/**
+ * 地址删除
+ * @param {*} data 
+ * @returns 
+ */
+export function AddressDel(data) {
+	return axios({
+		url: ClassApi.AddressDel,
+		method: 'post',
+		data:data,
+	})
+}
+/**
+ * 地址编辑
+ * @param {*} data 
+ * @returns 
+ */
+export function AddressEdit(data) {
+	return axios({
+		url: ClassApi.AddressEdit,
+		method: 'post',
+		data:data,
+	})
+}
+
+/**
+ * 地址添加
+ * @param {*} data 
+ * @returns 
+ */
+export function AddressAdd(data) {
+	return axios({
+		url: ClassApi.AddressAdd,
+		method: 'post',
+		data:data,
+	})
+}
+
+
+
+/**
+ * 地址列表
+ * @param {*} data 
+ * @returns 
+ */
+export function AddressList(data) {
+	return axios({
+		url: ClassApi.AddressList,
+		method: 'post',
+		data:data,
+	})
+}
+
+//订单管理列表
+export function OrderList(data) {
+	return axios({
+		url: ClassApi.OrderList,
+		method: 'post',
+		data:data,
+	})
 }
 //编辑订单
-export function GoodsOrderEdit(data) {
+export function OrderEdit(data) {
 	return axios({
-		url: ClassApi.GoodsOrderEdit,
+		url: ClassApi.OrderEdit,
 		method: 'post',
 		data:data
 	})
 }
-//设备管理列表
-export function GoodsOrderDel(data) {
+//添加
+export function OrderAdd(data) {
 	return axios({
-		url: ClassApi.GoodsOrderDel,
+		url: ClassApi.OrderAdd,
 		method: 'post',
 		data:data
 	})
 }
-
-//设备管理列表
-export function GoodsOrderPDF(data) {
+/**
+ * 删除订单
+ * @param {*} data 
+ * @returns 
+ */
+export function OrderDel(data) {
 	return axios({
-		url: ClassApi.GoodsOrderPDF,
+		url: ClassApi.OrderDel,
 		method: 'post',
 		data:data
 	})
 }
-//设备管理列表
-export function DeviceList(data) {
+/**
+ * 获取订单号
+ * @param {*}  
+ */
+export function getNumber(data) {
+    return axios({
+		url: ClassApi.OrderNumber,
+		method: 'post',
+		data:data
+	})
+}
+
+/***
+ * 获取公司名称
+ * @param {*} data
+ */
+export function getCompany(data) {
 	return axios({
-		url: ClassApi.DeviceList,
+		url: "/v3/Company/Get",
 		method: 'post',
 		data:data
 	})
 }
-//添加
-export function GoodsOrderAdd(data) {
+/***
+ * 获取公司列表
+ * @param {*} data
+ */
+export function getcompanyTree(data) {
 	return axios({
-		url: ClassApi.GoodsOrderAdd,
+		url: "/v3/Company/Tree",
 		method: 'post',
 		data:data
 	})
 }
 
-//订单管理列表
-export function GoodsOrderList(data) {
+//设备管理列表
+export function DeviceList(data) {
 	return axios({
-		url: ClassApi.GoodsOrderList,
+		url: ClassApi.DeviceList,
 		method: 'post',
 		data:data
 	})
 }
+
+
+

+ 67 - 0
src/components/FloatingPanel.vue

@@ -0,0 +1,67 @@
+<template>
+    <div class="floating-panel">
+        <div class="floating-panel-header" @click="_onclick">
+        </div>
+        <div class="floating-panel-content" :style="{ height: height + 'vh' }">
+            <slot></slot>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: 'FloatingPanel',
+    data() {
+        return {
+            maxHeight:80,//最大高度为80vh
+            minHeight:30,//最小高度为10vh
+
+            height:30,//按下的时候的位置
+            diifY:0,//移动的距离
+            speed:1
+        };
+    },
+    methods: {
+        _onclick(event) {
+            this.height = this.height==this.minHeight?this.maxHeight:this.minHeight;
+        },
+    }
+};
+</script>
+
+<style scoped>
+.floating-panel {
+    position: fixed;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    border-radius: 30px 30px 0 0 ;
+    z-index: 1000;
+    background: #fff;
+    overflow: hidden;
+    box-shadow: 0 0 10px rgba(248, 249, 250, 0.8);
+}
+
+.floating-panel-header {
+    cursor: pointer;
+    height: 40px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    border-bottom: 1px solid #EBEEF5
+}
+.floating-panel-header::before{
+    content: "";
+    display: block;
+    width: 30px;
+    height: 4px;
+    background: #ccc;
+    margin: 0 auto;
+    border-radius: 20px;
+}
+
+.floating-panel-content {
+    padding: 16px;
+    transition: height .2s ease;
+}
+</style>

+ 0 - 1
src/components/highcharts-t.vue

@@ -156,7 +156,6 @@
 				return obj
 			},
 			minRangeFun(){
-				console.log('多大')
 				setTimeout(() => {
 					return null
 				}, 1000);

+ 1 - 1
src/components/showFirm.vue

@@ -57,7 +57,7 @@
 			font-size: 12px;
 			display: flex;
 			flex-direction: column;
-			margin-top: 10px;
+			margin-top: 5px;
 			cursor: pointer;
 			min-height: 30px;
 			padding: 0 30px;

+ 22 - 0
src/plugins/aes.js

@@ -0,0 +1,22 @@
+const CryptoJS = require('crypto-js');
+
+export function aesEncrypt(keys) {
+    return new Promise((resolve) => {
+        const encryptedBase64 = decodeURIComponent(keys);
+        const key = CryptoJS.enc.Utf8.parse('xJy1C2Eo5N7qR8Vr'); // 16 字节密钥
+        const iv = CryptoJS.enc.Utf8.parse('xJy1C2Eo5N7qR8Vr');  // 16 字节偏移量
+        const encryptedBytes = CryptoJS.enc.Base64.parse(encryptedBase64);
+        const decrypted = CryptoJS.AES.decrypt({ ciphertext: encryptedBytes }, key, {
+            iv: iv,
+            mode: CryptoJS.mode.CBC,
+            padding: CryptoJS.pad.Pkcs7
+        });
+        const decryptedText = decrypted.toString(CryptoJS.enc.Utf8);
+        if (decryptedText) {
+            resolve(decryptedText);
+        }else{
+            alert('参数有误,解密失败');
+        }
+    })
+    
+}

+ 3 - 1
src/plugins/showFirm.js

@@ -11,5 +11,7 @@ export const showFirmArr = [
     '/intelligentsystem/Smart',
     '/intelligentsystem/plan',
     '/intelligentsystem/visual',
-    '/intelligentsystem/myinfo'
+    '/intelligentsystem/myinfo',
+
+    '/msgAlert',
 ]

+ 16 - 2
src/router/index.js

@@ -27,7 +27,7 @@ const routes = [
 		},
 		component: () => import('@/views/layout/index.vue')
 	},
-	{
+    {
 		path: '*',
 		name: "error",
 		hidden:true,
@@ -62,6 +62,15 @@ const routes = [
 			}]
 		}]
 	},
+    {
+		path: '/msgAlert',
+		name: "msgAlert",
+		hidden:true,
+        meta: {
+			title: '短信通知',
+		},
+		component: () => import('@/views/msgAlert.vue'),
+	},
 	...intelligentrouterData.intelligentrouterData
 ];
 
@@ -88,11 +97,17 @@ const router = new VueRouter({
 // })
 //登录拦截//未登录返回到登录界面
 router.beforeEach(async (to, from, next) => {
+    console.log('to',to,from)
     storts.dispatch('SETROUTE', from);
 	if(storts.state.nav.length==0){
 		if(to.path == '/'){
 			next()
 		}else{
+            if(to.path.includes('/msgAlert')){//处理短信链接跳转
+                document.title = to.meta.title
+                next()	
+                return
+            }
 			//获取数据
 			let res = await getNavData();
 			//处理路由配置数据
@@ -105,7 +120,6 @@ router.beforeEach(async (to, from, next) => {
 			//判断是否有标题,赋值标题
 			to.meta.title ? document.title = to.meta.title : document.title = '宝智达-冷链系统3.0'
 			next({path:to.path})//不写刷新会白屏
-
 		}
 	}else{
 		if(to.path == '/'){

+ 5 - 8
src/utils/http.js

@@ -31,18 +31,15 @@ const service = axios.create({
 
 // 请求拦截器
 service.interceptors.request.use((config) => {
-	// document.cookie = 'ioiopipoadiasdasdbasdbas564'
-	// console.log('config',config.url,config.url.split('/').join(''))
-	config.url.split('/').join('').includes('GoodsOrder')?config.baseURL = baseURLGood://订单专用
+    
+	config.url.split('/').join('').includes('Order')?config.baseURL = baseURLGood://订单专用
+	config.url.split('/').join('').includes('Addr')?config.baseURL = baseURLGood://订单地址专用
+
 	config.url.split('/').join('').includes('WorkOrder')?config.baseURL = baseURLWork://工单专用
 	config.url.split('/').join('').includes('Cold_Monitor')?config.baseURL = baseURLColdMonitor://环动
 	['Product','Device','DeviceDevicePush'].includes(config.url.split('/').join(''))?config.baseURL = baseURLyunaiot:
-	// config.url.split('/').join('')=='Product'?config.baseURL = baseURLyunaiot://物联智控
-	// config.url.split('/').join('')=='Device'?config.baseURL = baseURLyunaiot://物联智控
-	// config.url.split('/').join('')=='DeviceDevicePush'?config.baseURL = baseURLyunaiot://物联智控
-	// config.url.split('/').join('')=='Cold_MonitorDeviceDelete'?config.baseURL = baseURLyunaiot://物联智控
-
 	config.baseURL = baseURL//通用地址
+
 	if(!['Product','Device'].includes(config.url.split('/')[1])){
         config.data.User_tokey = store.state.userInfo.token
     }

+ 345 - 286
src/views/ToolSystem/Theorder.vue

@@ -5,16 +5,16 @@
                 <Breadcrumb></Breadcrumb>
                 <div class="Theorder-searchs">
                     <div class="Theorder-searchs1">
-                        <el-input v-model="input" placeholder-style="color:red" style="width: 200px;" placeholder="请输入内容"></el-input>
-                        <el-date-picker v-model="value1" type="daterange" range-separator="至" start-placeholder="开始日期"
-                            end-placeholder="结束日期">
+                        <el-input v-model="initParam.t_orderid" clearable placeholder-style="color:red" style="width: 200px;" placeholder="订单号"></el-input>
+                        <el-date-picker v-model="daterange" type="daterange" range-separator="至" 
+                        value-format="yyyy-MM-dd"
+                        start-placeholder="开始日期" end-placeholder="结束日期">
                         </el-date-picker>
-                        <el-select v-model="value" placeholder="请选择">
-                            <el-option v-for="item in options" :key="item.value" :label="item.label"
-                                :value="item.value">
+                        <el-select v-model="initParam.t_sn" clearable placeholder="请选择设备编号">
+                            <el-option v-for="item in options" :key="item.value" :label="item.T_devName" :value="item.T_sn">
                             </el-option>
                         </el-select>
-                        <el-button type="primary" icon="el-icon-search" @click="searchs()"></el-button>
+                        <el-button type="primary" icon="el-icon-search" @click="_searchs()"></el-button>
                     </div>
                     <div class="Theorder-tit-mai1-btn">
                         <!-- @click="clickNew()" -->
@@ -30,101 +30,142 @@
         </div>
         <div class="Theorder-B">
             <div class="Theorder2">
-                <el-button v-permission="'GoodsOrder:Add'" @click="clickNew()" icon="el-icon-plus"
-                    style="margin-bottom: 20px;">新增订单</el-button>
+                <div style="margin-bottom: 20px; display: flex; gap:20px">
+                    <el-button v-permission="'GoodsOrder:Add'" @click="_clickNew('新增订单')" icon="el-icon-plus">新增订单</el-button>
+                    <Address/>
+                </div>
                 <el-table :data="tableData" border style="width: 100%" size="small">
                     <template slot="empty">
                         <noData></noData>
                     </template>
-                    <el-table-column prop="id" label="货单ID" :show-overflow-tooltip="true" width="100">
+                    	
+                    <el-table-column prop="T_name" label="设备名称" :show-overflow-tooltip="true">
                     </el-table-column>
-                    <el-table-column prop="sn" label="货单查询号码" :show-overflow-tooltip="true">
+                    <el-table-column prop="DeviceType" label="设备类型" :show-overflow-tooltip="true">
                     </el-table-column>
-                    <el-table-column prop="sn" label="货单号码" :show-overflow-tooltip="true">
+                    <el-table-column prop="T_orderid" label="订单号码" :show-overflow-tooltip="true">
                     </el-table-column>
-                    <el-table-column prop="sn" label="箱号" :show-overflow-tooltip="true">
+                    <el-table-column prop="WaybillNo" label="运单号码" :show-overflow-tooltip="true">
                     </el-table-column>
-                    <el-table-column prop="sn" label="收货单位" :show-overflow-tooltip="true">
-                    </el-table-column>
-                    <el-table-column prop="sn" label="建单人" :show-overflow-tooltip="true">
-                        <!-- <template slot-scope="scope">
-                            {{ scope.row.T_end_Ut | Time(scope.row.T_end_Ut) }}
-                        </template> -->
+                    <el-table-column label="是否外派">
+                        <template slot-scope="scope" show-overflow-tooltip>
+                            <el-tag :type="
+                                scope.row.IsExpatriate==1?'':'warning'">{{scope.row.IsExpatriate==1?'否':'是'}}</el-tag>
+                        </template>
                     </el-table-column>
-                    <el-table-column prop="time" label="建单时间" :show-overflow-tooltip="true">
+                    
+                    <el-table-column prop="T_receiving" label="收货单位" :show-overflow-tooltip="true">
                     </el-table-column>
-                    <el-table-column prop="time" label="启运时间" :show-overflow-tooltip="true">
+                    <el-table-column prop="T_start_Ut" label="开始时间" :show-overflow-tooltip="true">
                     </el-table-column>
-                    <el-table-column prop="time" label="抵达时间" :show-overflow-tooltip="true">
+                    <el-table-column prop="T_end_Ut" label="抵达时间" :show-overflow-tooltip="true">
                     </el-table-column>
-                    <el-table-column prop="time" label="状态" :show-overflow-tooltip="true">
+                    <el-table-column label="状态">
+                        <template slot-scope="scope" show-overflow-tooltip>
+                            <el-tag :type="
+                                scope.row.T_State==1?'':
+                                scope.row.T_State==2?'warning':
+                                'success'">{{deviceStatus[scope.row.T_State-1]}}</el-tag>
+                        </template>
                     </el-table-column>
-                    <el-table-column prop="address" label="操作" fixed="right">
+                    
+                    <el-table-column prop="address" label="操作" fixed="right" width="220">
                         <template slot-scope="scope">
-                            <!-- <el-button v-permission="'GoodsOrder:Pdf'" size="small"
-                                @click="allpir('a', scope.row)">PDF下载</el-button> -->
-                            <el-button v-permission="'GoodsOrder:Edit'" size="small"
-                                @click="allpir('b', scope.row)">编辑</el-button>
-                            <el-button v-permission="'GoodsOrder:Del'" size="small"
-                                @click="allpir('c', scope.row)">删除</el-button>
+                            <div style="display:flex;gap:10px">
+                                <preview :row="scope.row"/>
+                            <el-button type="primary" plain v-permission="'GoodsOrder:Edit'" size="small"
+                            @click="_clickNew('编辑订单',scope.row)" >编辑</el-button>
+                            <el-button type="danger" style="margin-left:0" plain v-permission="'GoodsOrder:Del'" size="small"
+                                @click="_setdelApi(scope.row.Id)">删除</el-button>
+                            </div>
                         </template>
                     </el-table-column>
                 </el-table>
             </div>
             <div class="Theorder-pagination">
-                <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" background
-                    :current-page="pages.page" :page-size="pages.page_z" layout="total, prev, pager, next, jumper"
+                <el-pagination
+                :hide-on-single-page="true"
+                @size-change="handleSizeChange" @current-change="handleCurrentChange" background
+                    :current-page="initParam.page" :page-size="initParam.page_z" layout="total, prev, pager, next, jumper"
                     :total="total">
                 </el-pagination>
             </div>
         </div>
 
-        <el-dialog :title="titles" :visible.sync="dialogVisible" width="50%" :append-to-body="true">
-            <div class="NewUser">
-                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+        <el-dialog :title="titles"
+        :close-on-click-modal="false" custom-class="y-dialog"
+        @closed="_beforeclose"
+        :visible.sync="dialogVisible" width="1000px" :append-to-body="true">
+            <div class="NewUser" v-loading="loading">
+                <el-form :model="ruleForm" :inline="true" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
                     <el-form-item label="订单号">
-                        <el-input v-model="ruleForm.T_orderid" disabled placeholder="订单号"></el-input>
+                        <el-input v-model="ruleForm.T_orderid" disabled placeholder="订单号" class="conter_width"></el-input>
                     </el-form-item>
-                    <el-form-item label="出库订单号" prop="T_outorderid">
-                        <el-input v-model="ruleForm.T_outorderid" placeholder="出库订单号"></el-input>
+                    <el-form-item label="运单号">
+                        <el-input v-model="ruleForm.WaybillNo" placeholder="出库订单号" class="conter_width"></el-input>
                     </el-form-item>
                     <el-form-item label="设备编号" prop="T_sn">
-                        <el-select v-model="ruleForm.T_sn" placeholder="请选择设备编号">
-                            <el-option v-for="item in options" :key="item.value" :label="item.T_devName"
-                                :value="item.T_sn">
+                        <el-select v-model="ruleForm.T_sn" placeholder="设备编号" class="conter_width">
+                            <el-option v-for="item in options" :key="item.value" :label="item.T_devName" :value="item.T_sn">
                             </el-option>
                         </el-select>
                     </el-form-item>
-                    <el-form-item label="收货单位" prop="T_receiving">
-                        <el-input v-model="ruleForm.T_receiving" placeholder="请输入收货单位"></el-input>
+                    <el-form-item label="设备类型" prop="DeviceType">
+                        <el-select v-model="ruleForm.DeviceType" placeholder="设备类型" class="conter_width">
+                            <el-option v-for="item in deviceType" :key="item.value" :label="item.label"
+                                :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item label="是否外派" prop="IsExpatriate">
+                        <el-radio-group v-model="ruleForm.IsExpatriate" @change="_inputGroup" class="conter_width">
+							<el-radio :label="1">否</el-radio>
+							<el-radio :label="2">是</el-radio>
+						</el-radio-group>
+                    </el-form-item>
+                    <el-form-item label="手机号码" prop="Phone" v-if="ruleForm.IsExpatriate==2">
+                        <el-input v-model="ruleForm.Phone" maxlength="11" placeholder="手机号码" class="conter_width"></el-input>
+                    </el-form-item>
+                    <el-form-item label="收货单位" prop="ChildPid">
+                        <el-cascader v-model="ruleForm.ChildPid" :options="optionsTree"
+                        filterable :show-all-levels="false" class="conter_width"
+                        @change="handleChange"
+                        :props="{ children: 'Children', checkStrictly: true, label: 'T_name', value: 'Id', emitPath: false,}"
+                        ></el-cascader>
+                    </el-form-item>
+                    <el-form-item label="发货单位" prop="ShippingUnit">
+                        <el-input v-model="ruleForm.ShippingUnit" placeholder="发货单位" class="conter_width"></el-input>
                     </el-form-item>
                     <el-form-item label="配送计划" prop="T_time">
-                        <el-date-picker v-model="ruleForm.T_time" type="datetimerange"
-                            value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期"
+                        <el-date-picker v-model="ruleForm.T_time" type="daterange" class="conter_width"
+                            value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期"
                             end-placeholder="结束日期">
                         </el-date-picker>
                     </el-form-item>
                     <el-form-item label="随货同行单">
                         <el-upload
+                         class="conter_width"
                             ref="uploadRef"
                             action=""
                             :multiple="false"
                             :limit="1" 
                             :auto-upload="false"
                             :on-change="changeFile"
+                            :before-remove="()=>ruleForm.PeerList = ''"
                             accept="image/*,application/pdf,application/octet-stream,application/zip,application/x-tar,application/msword"
                             >
                             <el-button size="small" @click="_onclickupload" icon="el-icon-link">上传附件</el-button>
                         </el-upload>
                     </el-form-item>
-                    <el-form-item label="详情" prop="T_text">
-                        <el-input type="textarea" v-model="ruleForm.T_text"></el-input>
-                    </el-form-item>
-                    <el-form-item>
-                        <el-button type="danger" @click="submitForm('ruleForm')">立即提交</el-button>
-                        <el-button @click="dialogVisible = false">取消</el-button>
+                    <el-form-item label="详情">
+                        <el-input type="textarea" v-model="ruleForm.T_text" class="conter_width"></el-input>
                     </el-form-item>
                 </el-form>
+                <el-divider></el-divider>
+                <div class="_footer">
+                    <el-button type="primary" :disabled="disabled" @click="submitForm('ruleForm')">立即提交</el-button>
+                    <el-button @click="dialogVisible = false">取消</el-button>
+                </div>
             </div>
         </el-dialog>
 
@@ -133,101 +174,86 @@
 
 <script>
 import {
-    GoodsOrderList,
-    GoodsOrderAdd,
+    OrderList,
+    OrderAdd,
     DeviceList,
-    GoodsOrderDel,
-    GoodsOrderEdit,
-    GoodsOrderPDF
+    getNumber,
+    getCompany,
+    getcompanyTree,
+    OrderDel,OrderEdit,AddressList
 } from '../../api/instrument/Theorder.js'
 
 import { getQiniuToken } from "@/api/pdfToken.js";
-import { formatDate } from '../../utils/Times.js'
 import { _sendUpFun } from './js/qiliuyun.js';
+import {rules} from "./js/rules.js";
+import {initParam,ruleForm,initForm} from './js/initParam.js'
+import { deviceType,deviceStatus } from "./js/goods.js";
 import * as qiniu from 'qiniu-js';
-import Axios from 'axios'
+import Address from './address.vue'
+import preview from './preview.vue'
+
 export default {
+    components: {
+        Address,preview
+    },
     data() {
         return {
             uploadData: {},
             uploadInstance: new _sendUpFun(),
-
+            initParam,//列表请求参数
+            deviceType,//设备类型下拉数据
+            deviceStatus,//设备状态下拉数据
+            ruleForm,//新增编辑请求参数
+            daterange: '',
             total: 0,
-            pages: {
-                T_name: '',
-                page: 1,
-                page_z: 10
-            },
+            rules,
             titles: '',
-            ruleForm: {
-                T_orderid: '', //订单号
-                T_outorderid: '', //出库订单号
-                T_sn: '', //设备sn
-                T_receiving: '', //收货单位
-                T_time: [], //运输时间
-                T_text: '' //详情
-            },
-            rules: {
-                T_orderid: [{
-                    required: true,
-                    message: '请输入订单号',
-                    trigger: 'blur'
-                },],
-                T_outorderid: [{
-                    required: true,
-                    message: '请输入出库订单号',
-                    trigger: 'blur'
-                }],
-                T_sn: [{
-                    required: true,
-                    message: '请选择设备编号',
-                    trigger: 'change'
-                }],
-                T_receiving: [{
-                    required: true,
-                    message: '请输入收货单位',
-                    trigger: 'blur'
-                }],
-                T_time: [{
-                    required: true,
-                    message: '请选择运输时间',
-                    trigger: 'change'
-                }],
-                T_text: [{
-                    required: true,
-                    message: '请填写订单详情',
-                    trigger: 'blur'
-                }]
-            },
+            loading: false,
+            optionsTree: [],//公司下拉数据
+            disabled:false,//禁止新增编辑的提交按钮
             options: [],
             dialogVisible: false,
-            Page4: 5, //当前页
-            loading: false,
-            formInline: {
-                user: '',
-                region: ''
-            },
-            sta: null,
-            tableData: [
-            {id:Math.floor(100000 + Math.random() * 900000),sn:Math.floor(100000 + Math.random() * 900000000000),time:'2025-01-01',name:'测试数据'},
-            {id:Math.floor(100000 + Math.random() * 900000),sn:Math.floor(100000 + Math.random() * 900000000000),time:'2025-01-01',name:'测试数据'},
-            {id:Math.floor(100000 + Math.random() * 900000),sn:Math.floor(100000 + Math.random() * 900000000000),time:'2025-01-01',name:'测试数据'},
-            {id:Math.floor(100000 + Math.random() * 900000),sn:Math.floor(100000 + Math.random() * 900000000000),time:'2025-01-01',name:'测试数据'},
-        ]
-
+            tableData: [],
+            
         }
     },
     mounted() {
-        this.GetTheorderApi()
-        this.GetDeviceListApi()
-        // 创建 _sendUpFun 类的实例
+        this._getTheorderApi()
+        this._getDeviceListApi()
     },
     methods: {
+        _inputGroup(e){
+            console.log('切换',e)
+            this.ruleForm.ChildPid = ''//清空收货单位
+            this.ruleForm.Phone = ''//清空手机号码
+            if(e==1){
+                this._getTree()
+            }else{
+                this._getAddressListApi()
+            }
+            
+        },
+        /**
+         * 地址管理列表
+         */
+        _getAddressListApi() {
+            AddressList({page: 1,page_z:9999}).then(res => {
+                let {data:result} = res
+                if (result.Code == 200) {
+                    this.optionsTree = result.Data.Data || []
+                    console.log(this.optionsTree)
+                }
+            }) 
+        },
+        async _getTree(){
+            const {data:res} = await getcompanyTree({page_z: 999999})//获取公司树
+            this.optionsTree = this.removeEmptyChildren(res.Data.Data)
+        },
         _onclickupload() {
             this.$refs.uploadRef.clearFiles();
         },
         async changeFile(e){
-            console.log('changeFile',e);
+            this.loading = true
             let file = e.raw;
             console.log(file);
             var strtype = file.name.substring(file.name.lastIndexOf('.') + 1); //获取后缀 png jpg
@@ -254,12 +280,17 @@ export default {
             };
             var observable = qiniu.upload(file, file.name, token, putExtra, config);
             //   设置实例的监听对象
+
             var observer = {
                 next(res) {
                     console.log('上传进度', parseInt(res.total.percent))
+                    if (parseInt(res.total.percent)==100) {
+                        _this.loading = false
+                    }
                 },
                 // 接收上传错误信息
                 error(err) {
+                    _this.loading = false
                     switch (err.code) {
                         case 413:
                             _this.$message.error('错了哦,图片可能太大了哦');
@@ -273,166 +304,226 @@ export default {
                 },
                 // 接收上传完成后的信息
                 complete(com) {
-                    console.log('七牛云返回',com)
+                    _this.ruleForm.PeerList = com.key
+
                 }
             };
             observable.subscribe(observer);
         },
-
-        GetTheorderApi() {
-            GoodsOrderList(this.pages).then(res => {
+        /**
+         * 列表数据
+         */
+        _getTheorderApi() {
+            if(this.daterange.length>0){
+                this.initParam.startTime = this.daterange[0]
+                this.initParam.endTime = this.daterange[1]
+            }
+            OrderList(this.initParam).then(res => {
                 if (res.data.Code === 200 && res.data.Msg === 'ok!') {
-                    ////console.log('liebiao',res.data.Data.Data)
-                    this.total = res.data.Data.Num
-                    this.tableData = res.data.Data.Data
+                    this.total = res.data.Data.Num || 0
+                    this.tableData = res.data.Data.Data || []
                 }
             })
         },
-        GetDeviceListApi() { //设备编号select框
-            var that = this
-            DeviceList({
-                page: 1,
-                page_z: 9999999
-            }).then(res => {
-                if (res.data.Code === 200 && res.data.Msg === "ok!") {
-                    that.options = res.data.Data.Device_lite
-                }
+
+        _searchs(){
+            this.initParam.page = 1
+            this._getTheorderApi()
+        },
+        /**
+         * 清空上传随货同行单文件
+         */
+        _beforeclose(){
+            if (this.$refs.uploadRef.uploadFiles.length>0) {
+                this.$refs.uploadRef.uploadFiles = []
+            }
+        },
+        /**
+         * 新增、编辑订单
+         */
+        async _clickNew(title,item=null) {
+            this.titles = title
+            this.disabled = false
+            console.log('新增',item)
+            
+            this.dialogVisible = true
+            
+            if (this.$refs.ruleForm) {//为了验证第一次触发表单验证,第二次打开还是触发
+                this.$refs.ruleForm.resetFields();
+            }
+            Object.keys(this.ruleForm).forEach(key => {
+                if (key == 'IsExpatriate'){this.ruleForm[key] = 1}else{this.ruleForm[key] = ''}
             })
+
+            if (title == '新增订单') {
+                const {data:result} = await getNumber({}) 
+                this.ruleForm.T_orderid = result.Data
+                const {data:result1} = await getCompany({})//获取公司名称
+                this.ruleForm.ShippingUnit = result1.Data.Data.T_name
+                this._getTree()
+            }else{//编辑订单
+                if(item.IsExpatriate==1){
+                    this._getTree()
+                }else{
+                    this._getAddressListApi()
+                }
+                Object.keys(this.ruleForm).forEach(key => {
+                    this.ruleForm[key] = item[key]
+                })
+                this.ruleForm.T_time = [this.ruleForm.EstimateStartTime.split(' ')[0],this.ruleForm.EstimateEndTime.split(' ')[0]]
+                this.ruleForm.ChildPid = Number(this.ruleForm.ChildPid)
+                this.ruleForm.T_id = item.Id
+            }
         },
-        inputValue(e) {
-            this.pages.T_name = e
-            this.pages.page = 1
-            this.GetTheorderApi()
+        /**
+         * 去除空Children
+         */
+        removeEmptyChildren(arr) {
+            for (let i = 0; i < arr.length; i++) {
+                const item = arr[i];
+                if (item.Children && item.Children.length === 0) {
+                    delete item.Children;
+                } else if (item.Children) {
+                    this.removeEmptyChildren(item.Children);
+                }
+            }
+            return arr;
         },
+        /**
+         * 提交新增、编辑
+         * @param formName 表单名
+         */
         submitForm(formName) {
+            var self = this
             this.$refs[formName].validate((valid) => {
                 if (valid) {
-                    var obj = { ...this.ruleForm }
-                    obj.T_time = obj.T_time[0] + '|' + obj.T_time[1]
-                    ////console.log('提交', obj,this.sta)
-                    var that = this
-                    if (that.sta == 'a') {
-                        ////console.log('新增提交')
-                        that.SetAdd(obj)
-                    } else {
-                        ////console.log('编辑提交')
-                        that.SetEdit(obj)
+                    self.disabled = true
+                    var obj = { ...self.ruleForm }
+                    obj.EstimateStartTime = obj.T_time[0]
+                    obj.EstimateEndTime = obj.T_time[1]
+                    delete obj.T_time
+                    if (obj.IsExpatriate == 1) obj.Phone = ''
+                    if (self.titles == '新增订单') {
+                        self._setAdd(obj)
+                    } else {//编辑订单
+                        self._setEdit(obj)
                     }
-                } else {
-                    this.$message.error('请完善必填信息在提交')
-                    return false;
                 }
             });
         },
-        SetEdit(e) {
-            var that = this
-            GoodsOrderEdit(e).then(res => {
-                ////console.log('res',res)
+        /**
+         * 新增Api
+         */
+        _setAdd(obj) {
+            var self = this
+            OrderAdd(obj).then(res => {
+                console.log('添加',res)
                 if (res.data.Code === 200 && res.data.Msg === "ok!") {
-                    that.pages.page = 1
-                    that.GetTheorderApi()
-                    that.$message.success('编辑订单成功!')
-                    that.dialogVisible = false
+                    self.initParam.page = 1
+                    self._getTheorderApi()
+                    self.$message.success('新增成功!')
+                    self.dialogVisible = false
                 }
+                self.disabled = false
             })
         },
-        SetAdd(obj) {
-            var that = this
-            GoodsOrderAdd(obj).then(res => {
-                ////console.log('添加',res)
+        /**
+         * 编辑api
+         * @param e 
+         */
+        _setEdit(e) {
+            var self = this
+            OrderEdit(e).then(res => {
                 if (res.data.Code === 200 && res.data.Msg === "ok!") {
-                    that.pages.page = 1
-                    that.GetTheorderApi()
-                    that.$message.success('新增订单成功!')
-                    that.dialogVisible = false
+                    self.initParam.page = 1
+                    self._getTheorderApi()
+                    self.$message.success('编辑成功!')
+                    self.dialogVisible = false
                 }
             })
         },
-        clickNew() {
-            this.dialogVisible = true
-            this.sta = 'a'
-            this.titles = '新增订单'
-            if (this.$refs.ruleForm) {//为了验证第一次触发表单验证,第二次打开还是触发
-                this.$refs.ruleForm.resetFields();
-            }
-        },
-        handleSizeChange(e) { //每页多少条
-            this.pages.page_z = e
-            this.GetTheorderApi()
+        /**
+         * 删除api
+         * @param id 
+         */
+        _setdelApi(id) {
+            let _this = this
+            this.$confirm('删除操作,是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning',
+                center: true
+            }).then(() => {
+                console.log('删除',id)
+                OrderDel({ T_id: id }).then(res => {
+                    console.log('删除成功',res)
+                    if (res.data.Code === 200 && res.data.Msg == "ok!") {
+                        _this.initParam.page = 1
+                        _this._getTheorderApi()
+                        _this.$message.success('删除成功')
+                    }
+                })
+            }).catch(() => {});
         },
-        handleCurrentChange(e) { //跳转页
-            this.pages.page = e
-            this.GetTheorderApi()
+        /**
+         * 筛选出选中收货单位id对应的公司名称
+         * @param value 
+         */
+        handleChange(value) {
+            this.ruleForm.T_receiving = this._findTNameById(value, this.optionsTree);
+            if(this.ruleForm.IsExpatriate==2){
+                const result = this.optionsTree.find(item=>item.Id==value)
+                this.ruleForm.Phone = result.Phone
+            }
         },
-        allpir(i, item) {
-            var that = this
-            if (i === 'a') { //
-                const loading = this.$loading({
-                    lock: true,
-                    text: '正在整理数据,请稍后...',
-                    spinner: 'el-icon-loading',
-                    background: 'rgba(0, 0, 0, 0.7)'
-                });
-                GoodsOrderPDF({ T_id: item.Id }).then(res => {
-                    loading.close()
-                    Axios({
-                        method: 'get',
-                        url: res.data.Data,
-                        responseType: 'blob'
-                    }).then(resBlob => {
-                        const FileSaver = require('file-saver')
-                        const blob = new Blob([resBlob.data], { type: 'application/pdf;charset=utf-8' }) // 此处type根据你想要的
-                        FileSaver.saveAs(blob, new Date().getTime()) // 下载的name文件名
-                        this.$message.success('PDF文件下载成功');
-                    });
-                })
-            } else if (i === "b") { //编辑
-                if (this.$refs.ruleForm) {//为了验证第一次触发表单验证,第二次打开还是触发
-                    this.$refs.ruleForm.resetFields();
+        /**
+         * 根据公司id筛选出对应的公司名称
+         * @param id 公司id
+         * @param arr 公司数组
+         */
+        _findTNameById(id, arr) {
+            for (let i = 0; i < arr.length; i++) {
+                const currentObj = arr[i];
+                if (currentObj.Id === id) {
+                    return currentObj.T_name;
+                }
+                if (currentObj.Children && currentObj.Children.length > 0) {
+                    const result = this._findTNameById(id, currentObj.Children);
+                    if (result) {
+                        return result;
+                    }
                 }
-                this.dialogVisible = true
-                this.sta = 'b'
-                this.titles = '编辑订单'
-                this.ruleForm.T_time[0] = formatDate(item.T_start_Ut)
-                this.ruleForm.T_time[1] = formatDate(item.T_end_Ut)
-                this.ruleForm.T_text = item.T_text
-                this.ruleForm.T_id = item.Id
-                this.ruleForm.T_sn = item.T_sn
-                this.ruleForm.T_receiving = item.T_receiving
-                this.ruleForm.T_outorderid = item.T_outorderid
-                this.ruleForm.T_orderid = item.T_orderid
-
-            } else if (i === "c") { //同步大屏
-                this.$confirm('删除操作,是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning',
-                    center: true
-                }).then(() => {
-                    that.SetdelApi(item.Id)
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '删除取消'
-                    });
-                });
-
-
             }
+            return null;
+        },
+        /**
+         * 每页多少条
+         */
+        handleSizeChange(e) { 
+            this.initParam.page_z = e
+            this._getTheorderApi()
+        },
+        /**
+         * 跳转页
+         */
+        handleCurrentChange(e) {
+            this.initParam.page = e
+            this._getTheorderApi()
         },
-        SetdelApi(id) {
+        /**
+         * 设备编号select框
+         */
+         _getDeviceListApi() {
             var that = this
-            GoodsOrderDel({ T_id: id }).then(res => {
-                ////console.log('删除',res)
-                if (res.data.Code === 200 && res.data.Msg == "ok!") {
-                    that.GetTheorderApi()
-                    that.$message.success('删除成功')
+            DeviceList({
+                page: 1,
+                page_z: 9999999
+            }).then(res => {
+                if (res.data.Code === 200 && res.data.Msg === "ok!") {
+                    that.options = res.data.Data.Device_lite
                 }
             })
         },
-        onSubmit() {
-            ////console.log('submit!');
-        }
     },
     filters: {
         Time: function (time) { //时间戳转换
@@ -454,9 +545,14 @@ export default {
 </script>
 
 <style lang="scss">
+.conter_width{
+    width:350px;
+}
+._footer{
+    display: flex;
+    justify-content: center;
+}
 .Theorder {
-    user-select: none;
-
     .Theorder-T {
         display: flex;
         align-items: center;
@@ -465,7 +561,6 @@ export default {
         height: 70px;
         padding: 15px 10px;
         box-shadow: 5px 5px 10px -10px #000;
-
         .Theorder-TL {
             display: flex;
             align-items: center;
@@ -476,7 +571,6 @@ export default {
                 justify-content: center;
                 margin-left: 20px;
 
-                .Theorder-tit-mai1-btn {}
 
                 .Theorder-searchs1 {
                     display: flex;
@@ -491,8 +585,6 @@ export default {
             display: flex;
             align-items: center;
             cursor: pointer;
-
-            .Theorder-searchsMai1 {}
         }
     }
 
@@ -501,49 +593,16 @@ export default {
     }
 
     .Theorder2 {
-
-        // border-radius: 10px;
         overflow: hidden;
         margin: 10px;
         padding: 20px;
     }
 
     .Theorder-pagination {
-        // background: rgba(#31353e,1);
         padding: 50px 20px;
         margin: 10px;
         border-radius: 2px;
         display: flex;
-        // .el-pagination.is-background .btn-next,
-        // .btn-prev,
-        // .el-pagination.is-background .el-pager li {
-        // 	//未选中
-        // 	margin: 0 5px;
-        // 	background-color: #222;
-        // 	color: #fff;
-        // 	min-width: 30px;
-        // 	border-radius: 2px;
-        // }
-
-        // .el-pagination.is-background .el-pager li:not(.disabled).active {
-        // 	//选中
-        // 	background-color: #fff;
-        // 	color: #222;
-        // }
-
-        // .el-pagination__total {
-        // 	//总total
-        // 	margin-right: 10px;
-        // 	font-weight: 400;
-        // 	// color: #fff;
-        // }
-
-        // .el-pagination__jump {
-        // 	//跳转页
-        // 	margin-left: 24px;
-        // 	font-weight: 400;
-        // 	// color: #fff;
-        // }
     }
 }
 </style>

+ 196 - 0
src/views/ToolSystem/address.vue

@@ -0,0 +1,196 @@
+<template>
+    <div class="address">
+        <el-button type="primary" @click="_onclick">{{title}}</el-button>
+        <el-dialog :title="title" custom-class="y-dialog" :close-on-click-modal="false" :visible.sync="dialogVisible" width="50%" :append-to-body="true">
+            <div style="margin-bottom: 10px;display:flex;justify-content: space-between;">
+                <el-button @click="_clickNew('新增地址')" icon="el-icon-plus">新增地址</el-button>
+
+                <div style="display:flex;gap: 10px;">
+                    <el-input v-model="initForm.T_Address" clearable style="width: 200px;" placeholder="地址"></el-input>
+                    <el-button type="primary" icon="el-icon-search" @click="_searchs()"></el-button>
+                </div>
+            </div>
+            <el-table :data="tableData" border style="width: 100%" size="small">
+                <el-table-column label="序号" type="index" width="50"></el-table-column>
+                <el-table-column label="公司名称" prop="T_name"></el-table-column>
+                <el-table-column label="地址" prop="T_Address"></el-table-column>
+                <el-table-column label="手机号" prop="Phone"></el-table-column>
+                <el-table-column label="操作" fixed="right">
+                    <template slot-scope="scope">
+                        <el-button size="small" @click="_clickNew('编辑地址',scope.row)" >编辑</el-button>
+                        <el-button size="small" @click="_setdelApi(scope.row.Id)">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <div class="Theorder-pagination">
+                <el-pagination
+                :hide-on-single-page="true"
+                @size-change="handleSizeChange" @current-change="handleCurrentChange" background
+                    :current-page="initForm.page" :page-size="initForm.page_z" layout="total, prev, pager, next, jumper"
+                    :total="total">
+                </el-pagination>
+            </div>
+            <el-dialog width="500px"  custom-class="y-dialog" :close-on-click-modal="false" :title="innerTitle" :visible.sync="innerVisible" destroy-on-close append-to-body>
+                <el-form :model="ruleForms" :rules="addressRules" ref="ruleForms" label-width="80px" class="demo-ruleForm">
+                    <el-form-item label="公司名称" prop="T_name">
+                        <el-input v-model="ruleForms.T_name" placeholder="公司名称"></el-input>
+                    </el-form-item>
+                    <el-form-item label="地址" prop="T_Address">
+                        <el-input v-model="ruleForms.T_Address" placeholder="地址"></el-input>
+                    </el-form-item>
+                    <el-form-item label="手机号" prop="Phone">
+                        <el-input v-model="ruleForms.Phone" maxlength="11" placeholder="手机号"></el-input>
+                    </el-form-item>
+                </el-form>
+                <el-divider></el-divider>
+                <div class="_footer">
+                    <el-button type="primary" :disabled="disabled" @click="submitForm('ruleForms')">立即提交</el-button>
+                    <el-button @click="innerVisible = false">取消</el-button>
+                </div>
+            </el-dialog>
+        </el-dialog>
+    </div>
+</template>
+<script>
+import {
+    AddressList,
+    AddressAdd,
+    AddressEdit,
+    AddressDel
+} from '@/api/instrument/Theorder.js'
+import { addressRules } from "./js/rules.js";
+import { initForm,ruleForms } from "./js/initParam.js";
+    export default {
+        data() {
+            return {
+                tableData:[],
+                title:'地址管理',
+                dialogVisible: false,
+                initForm,//列表请求参数
+                total: 0,
+                innerVisible:false,
+                innerTitle:'',
+                ruleForms,//新增、编辑公司参数
+                addressRules,
+                disabled:false
+            }
+        }, 
+        methods: {
+            _onclick() {
+                this.dialogVisible = true
+                this.initForm = {...initForm}
+                this._getAddressList()
+            },
+            _searchs(){
+                this.initForm.page = 1
+                this._getAddressList()
+            },
+            _getAddressList() {
+                console.log(this.initForm)
+                AddressList(this.initForm).then(res => {
+                    let {data:result} = res
+                    if (result.Code == 200) {
+                        this.total = res.data.Data.Num || 0
+                        this.tableData = res.data.Data.Data || []
+                    }
+                }) 
+            },
+            /**
+             * 提交表单
+             * @param formName 
+             */
+            submitForm(formName) {
+                this.$refs[formName].validate(async (valid) => {
+                    if (valid) {
+                        this.disabled = true
+                        if (this.innerTitle == '新增地址') {
+                            const {data:result} = await AddressAdd(this.ruleForms)
+                            if(result.Code == 200){
+                                this.innerVisible = false
+                                // setTimeout(() => this.disabled = false, 100);
+                                this._getAddressList()
+                                this.$message.success(result.Msg)
+                            }
+                        }else{//编辑地址
+                            const {data:result} = await AddressEdit(this.ruleForms)
+                            if(result.Code == 200){
+                                this.innerVisible = false
+                                // setTimeout(() => this.disabled = false, 100);
+                                this._getAddressList()
+                                this.$message.success(result.Msg)
+                            }
+                        }
+
+                    } 
+                }) 
+            },
+            /**
+             * 新增地址,编辑地址
+             * @param title 
+             * @param row 
+             */
+           async _clickNew(title,row=null) {
+                console.log(title,row)
+                this.innerTitle = title
+                this.innerVisible = true
+                this.disabled = false
+                if (this.$refs.ruleForms) {//为了验证第一次触发表单验证,第二次打开还是触发
+                    this.$refs.ruleForms.resetFields();
+                }
+                if(title == '编辑地址'){
+                    Object.keys(this.ruleForms).forEach(key => {
+                        this.ruleForms[key] = row[key]
+                    })
+                    this.ruleForms.T_id = row.Id
+                }else{
+                    Object.keys(this.ruleForms).forEach(key => {
+                        this.ruleForms[key] = ''
+                    })
+                }
+            },
+            /**
+             * 删除地址
+             * @param id
+             */
+            _setdelApi(id) {
+                let _this = this
+                this.$confirm('删除操作,是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning',
+                    center: true
+                }).then(() => {
+                    AddressDel({ T_id: id }).then(res => {
+                        if (res.data.Code === 200 && res.data.Msg == "ok!") {
+                            _this.initForm.page = 1
+                            _this._getAddressList()
+                            _this.$message.success('删除成功')
+                        }
+                    })
+                }).catch(() => {});
+            },
+            /**
+             * 每页多少条
+             */
+            handleSizeChange(e) { 
+                this.initForm.page_z = e
+                this._getAddressList()
+            },
+            /**
+             * 跳转页
+             */
+            handleCurrentChange(e) {
+                this.initForm.page = e
+                this._getAddressList()
+            },
+        }
+    }
+</script>
+<style lang="scss">
+.y-dialog {
+    border-radius: 15px;
+}
+.Theorder-pagination{
+    margin-top: 20px;
+}
+</style>

+ 23 - 1
src/views/ToolSystem/js/goods.js

@@ -1 +1,23 @@
-export const goods = "image/*,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
+export const goods = "image/*,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
+
+/**
+ * 设备类型
+ */
+export const deviceType = [
+    {
+        label: '保温箱',
+        value: '保温箱'
+    },
+    {
+        label: '冷藏车',
+        value: '冷藏车'
+    },
+    {
+        label: '其他',
+        value: '其他'
+    }
+]
+
+
+
+export const deviceStatus = ['正常', '在途', '已到达']

+ 41 - 0
src/views/ToolSystem/js/initParam.js

@@ -0,0 +1,41 @@
+export const initParam = {
+    t_sn:'',
+    t_orderid: '',
+    startTime: '',
+    endTime: '',
+    page: 1,
+    page_z: 10
+}
+
+/**
+ * 新增或者编辑参数
+ */
+export const ruleForm = {
+    T_orderid: '',//订单号
+    WaybillNo: '',//运单号
+    T_sn: '',//设备编号
+    DeviceType: '',//设备类型
+    IsExpatriate: 1,//是否外派 1 否 2 是
+    Phone: '',//电话
+    T_receiving: '',//收货单位
+    ChildPid: '',//收货单位编号
+    ShippingUnit: '',//发货单位
+    T_time: '',//配送计划,需要切割为开始与结束时间
+    EstimateStartTime: '',//配送计划开始时间
+    EstimateEndTime: '',//配送计划结束时间
+    PeerList: '',//随货同行单
+    T_text: '',//详情
+}
+
+
+export const initForm = {
+    page: 1,
+    page_z: 8,
+    T_Address: '',//地址名称
+}
+
+export const ruleForms = {
+    Phone:'',//手机号
+    T_Address:'',//地址
+    T_name: '',//公司名称
+}

+ 56 - 0
src/views/ToolSystem/js/rules.js

@@ -0,0 +1,56 @@
+export const rules = {
+    T_sn: [{
+        required: true,
+        message: '设备编号',
+        trigger: 'change'
+    },],
+    DeviceType: [{
+        required: true,
+        message: '设备类型',
+        trigger: 'change'
+    }],
+    IsExpatriate: [{
+        required: true,
+        message: '是否外派',
+        trigger: 'blur'
+    }],
+    Phone:[
+        { required: true, message: '请输入手机号', trigger: 'change' },
+        { min: 11, message: '请正确输入11位手机号', pattern:/^1[3456789]\d{9}$/, trigger: 'change' }
+    ],
+
+    ChildPid: [{
+        required: true,
+        message: '收货单位',
+        trigger: 'change'
+    }],
+    ShippingUnit: [{
+        required: true,
+        message: '发货单位',
+        trigger: 'change'
+    }],
+
+    T_time: [{
+        required: true,
+        message: '配送计划',
+        trigger: 'change'
+    }],
+}
+
+export const addressRules = {
+    Phone:[
+        { required: true, message: '请输入手机号', trigger: 'change' },
+        { min: 11, message: '请正确输入11位手机号', pattern:/^1[3456789]\d{9}$/, trigger: 'change' }
+    ],
+    T_Address: [{
+        required: true,
+        message: '地址名称',
+        trigger: 'change'  
+    }],
+    T_name: [{
+        required: true,
+        message: '公司名称',
+        trigger: 'change'
+    }],
+
+}

+ 423 - 0
src/views/ToolSystem/preview.vue

@@ -0,0 +1,423 @@
+<template>
+    <div class="">
+        <el-button type="primary"  plain size="small" @click="_onclick">{{title}}</el-button>
+        <el-drawer :title="title" size="90%" :visible.sync="drawer" direction="rtl" append-to-body destroy-on-close>
+            <div style="display:flex;justify-content:center;align-items:center;gap:20px;margin-bottom:20px">
+                <el-checkbox-group v-model="checkList">
+                    <el-checkbox :label="0">温度曲线</el-checkbox>
+                    <el-checkbox :label="1">湿度曲线</el-checkbox>
+                    <el-checkbox :label="2">运动轨迹</el-checkbox>
+                </el-checkbox-group>
+                <el-button type="primary" :disabled="checkList.length>0 && seriesData.length>0?false:true" size="small" @click="canvasIt">导出PDF</el-button>    
+            </div>
+            <div ref="html2canvasRef" class="y-dialog-body" style="">
+                <div v-show="checkList.includes(0)" id="highcharts_t" style="height:400px"></div>
+                <div v-show="checkList.includes(1)" id="highcharts_h" style="height:400px"></div>
+                <h3 v-show="checkList.includes(2)" style="text-align:center;padding-bottom:10px;background:#fff">运动轨迹</h3>
+                <div v-show="checkList.includes(2)" id="containers" ref="mapContainers" style="width:100%;height:600px;"></div>
+            </div>
+        </el-drawer>
+    </div>
+</template>
+
+<script>
+var Highcharts = require('highcharts');
+require('highcharts/modules/stock')(Highcharts);
+require('highcharts/modules/exporting')(Highcharts);
+import draggable from 'highcharts/modules/draggable-points.js'
+import html2canvas from "html2canvas";
+import Axios from 'axios'
+import {
+    getdevData,OrderPDF,
+} from '@/api/instrument/Theorder.js'
+export default {
+    props: {
+        row: {
+            type: Object,
+            default: () => ({})
+        },
+    },
+    name:"",
+    data() {
+        return {
+            checkList: [0],
+            title:'预览',
+            drawer:false,
+            chart:null,
+            seriesData:[],//温度数据
+            seriesData_h:[],//湿度数据
+
+            path: [], // 运动轨迹数据
+        }
+    },
+    methods: {
+        canvasIt() {//截图
+            const mapsRef = this.$refs.html2canvasRef
+            const loading = this.$loading({
+                lock: true,
+                text: 'Loading',
+                spinner: 'el-icon-loading',
+                background: 'rgba(0, 0, 0, 0.7)'
+            });
+
+
+
+            html2canvas(mapsRef, {
+                    allowTaint: false, //允许跨域截图
+                    backgroundColor: null, //画出来的图片有白色的边框,不要可设置背景为透明色(null)
+                    useCORS: true, //支持图片跨域
+                    // scale: 1.5, //设置放大的倍数
+                }).then(canvas => {
+
+                    // // 获取原图片的宽度和高度
+                    // const originalWidth = canvas.width;
+                    // const originalHeight = canvas.height;
+                    // // 设置目标宽度
+                    // const targetWidth = 595;
+                    // // 计算高度自适应的值
+                    // const targetHeight = (targetWidth / originalWidth) * originalHeight;
+
+                    // // 创建一个新的 canvas 用于绘制缩放后的图片
+                    // const scaledCanvas = document.createElement('canvas');
+                    // const ctx = scaledCanvas.getContext('2d');
+                    // scaledCanvas.width = targetWidth;
+                    // scaledCanvas.height = targetHeight;
+                    // console.log(canvas,scaledCanvas.width,scaledCanvas.height,ctx)
+                    // // 将原图片绘制到新的 canvas 上
+                    // ctx.drawImage(canvas, 0, 0, originalWidth, originalHeight, 0, 0, targetWidth, targetHeight);
+                    // let img = new Image();
+                    // img.src = scaledCanvas.toDataURL('image/png');
+                    // let a = document.createElement('a');
+                    // a.href = img.src;
+                    // a.download = new Date().getTime()
+                    // a.click();
+                    // return
+                    let img = new Image();
+                    img.src = canvas.toDataURL('image/png'); // toDataURL :图片格式转成 base64
+                    // let a = document.createElement('a');
+                    // a.href = img.src;
+                    // a.download = new Date().getTime()
+                    // a.click();
+                    OrderPDF({
+                        T_id:this.row.Id,
+                        images:img.src 
+                    }).then(res=>{
+                        if(res.data.Data){
+                            Axios({
+                                method: 'get',
+                                url: res.data.Data,
+                                responseType: 'blob'
+                            }).then(resBlob => {
+                                const FileSaver = require('file-saver')
+                                const blob = new Blob([resBlob.data], {
+                                    type: 'application/pdf;charset=utf-8'
+                                }) // 此处type根据你想要的
+                                FileSaver.saveAs(blob,new Date().getTime()) 
+                                loading.close();
+                                this.$message.success('导出成功')
+                            });
+                        }
+                    })
+                })
+            
+        },
+        async _onclick(){
+            let {Id:T_id} = this.row
+            this.drawer = true;
+            const result = await getdevData({T_id})
+            let res = result.data.Data || []
+            if (res.length === 0) {
+                return;
+            }
+            let arr = result.data.Data.reverse()
+            this.seriesData = [this.transformData(arr,['T_t','T_tl','T_tu'])]
+            this.seriesData_h = [this.transformData(arr,['T_rh','T_rhl','T_rhu'])]
+            this.path = arr.map(item=>[Number(item.T_site.split(',')[0]),Number(item.T_site.split(',')[1])])
+            console.log(this.seriesData,this.seriesData_h,this.path);
+            console.log(this.seriesData[0].data[0][3]);
+            
+            Highcharts.setOptions({
+                lang: {
+                    resetZoom: '重置缩放比例',
+                    resetZoomTitle: '重置缩放比例'
+                }
+            });
+            this.$nextTick(()=>{
+                this.getChart_t()	
+                this.getChart_h()	
+                this.initMap()
+            })
+        },
+        transformData(arr,key) {
+            if (arr.length === 0) {
+                return {
+                    name: '',
+                    data: []
+                };
+            }
+            const name = arr[0].T_name;
+            const data = arr.map(item => [Date.parse(item.T_time),item[key[0]],item[key[1]],item[key[2]]]);
+            return {
+                name,
+                data
+            };
+        },
+
+        initMap() {
+            // 初始化地图
+            this.map = new AMap.Map('containers', {
+                zoom: 13,
+                resizeEnable: true,
+                center: this.path[0],
+                 WebGLParams: {
+                        preserveDrawingBuffer: true
+                    },
+            });
+
+            // 绘制运动轨迹
+            this.polyline = new AMap.Polyline({
+                path: this.path,
+                strokeColor: '#FF33FF', // 线颜色
+                strokeWeight: 5, // 线宽
+                strokeOpacity: 1, // 透明度
+                lineJoin: 'round', // 折线拐点连接处样式
+                lineCap: 'round', // 折线两端线帽样式
+                zIndex: 50
+            });
+            this.polyline.setMap(this.map);
+
+
+      // 添加终点标记
+      this.endMarker = new AMap.Marker({
+        position: this.path[this.path.length - 1],
+        icon: 'https://webapi.amap.com/theme/v1.3/markers/n/mark_r.png',
+        offset: new AMap.Pixel(-10, -34)
+      });
+      this.endMarker.setMap(this.map);
+        },
+        getChart_t() {
+            console.log('触发');
+            // if (this.chart) {
+            //     this.chart.destroy(); // 销毁旧的图表实例
+            // }
+
+            let self = this
+            // 显示带导航条的 Highcharts.stockChart('highcharts', {
+            this.chart = Highcharts.chart('highcharts_t', {
+                chart: {
+                    zoomType: 'x', //x反向放大
+                    type: 'spline', //线样式
+                    panning: true, //是否移动
+                    panKey: 'ctrl' //按住ctrl可移动
+                },
+                time: {
+                    useUTC: true
+                },
+                boost: {
+                    useGPUTranslations: true
+                },
+                lang: {
+                    viewFullscreen: "全屏",
+                    exitFullscreen: "退出全屏",
+                    printChart: "打印图表",
+                    downloadJPEG: "下载JPEG图片",
+                    downloadPDF: "下载PDF文件",
+                    downloadPNG: "下载PNG文件",
+                    downloadSVG: "下载SVG文件",
+                },
+                title: {
+                    text: "冷链温度曲线图"
+                },
+                xAxis: {
+                    title: {text: '时间'},
+                    type: 'datetime',
+                },
+                
+                yAxis: {
+                    title: {
+                        text: '温度℃'
+                    },
+                    min: Math.min(...this.seriesData[0].data.map(item => item[2])) - 5, // 动态设置y轴最小值
+                    max: Math.max(...this.seriesData[0].data.map(item => item[3])) + 5, // 动态设置y轴最大值
+                    plotLines:[{
+                    	color: '#FF1D00', //线的颜色,定义为红色
+                    	dashStyle: 'solid', //默认值,这里定义为实线
+                    	value: this.seriesData[0].data[0][3], //定义在那个值上显示标示线,这里是在x轴上刻度为3的值处垂直化一条线  
+                    	width: 2, //标示线的宽度,2px
+                    	label: {
+                    		text: `温度上限(${this.seriesData[0].data[0][3]}℃)`, //标签的内容
+                    		align: 'right', //标签的水平位置,水平居左,默认是水平居中center
+                    		// x: 10 //标签相对于被定位的位置水平偏移的像素,重新定位,水平居左10px
+                    	},
+                    },{
+                    	color: '#FF1D00', //线的颜色,定义为红色
+                    	dashStyle: 'solid', //默认值,这里定义为实线
+                    	value: self.seriesData[0].data[0][2], //定义在那个值上显示标示线,这里是在x轴上刻度为3的值处垂直化一条线  
+                    	width: 2, //标示线的宽度,2px
+                    	label: {
+                    		text: `温度下限(${self.seriesData[0].data[0][2]}℃)`, //标签的内容
+                    		align: 'right', //标签的水平位置,水平居左,默认是水平居中center
+                    		// x: 10 //标签相对于被定位的位置水平偏移的像素,重新定位,水平居左10px
+                    	},
+                    }]
+                },
+                credits: {//去掉水印
+                    enabled: false
+                },
+                subtitle: {
+                    useHTML: false,
+                },
+                plotOptions: {
+                    series: {
+                        // compare: 'percent',
+                        showInNavigator: true
+                    }
+                },
+                tooltip: {
+                    valueSuffix: '℃',
+                    // backgroundColor: '#3d4b61', // 背景颜色
+                    // style: { // 文字内容相关样式
+                    //     color: "#fff",
+                    //     fontSize: "12px",
+                    //     fontWeight: "blod",
+                    //     fontFamily: "Courir new"
+                    // },
+                    crosshairs: [ //显示鼠标放上去的时候显示的提示标线
+                        {
+                            width: 1,
+                            color: '#ccc'
+                        },
+                    ],
+                },
+                series:this.seriesData,
+                responsive: {
+                    rules: [{ // 在图表小于 500px 的情况下关闭图例
+                        condition: { // 响应条件
+                            maxWidth: 500
+                        },
+                        chartOptions: { // 响应内容
+                            legend: {
+                                enabled: false
+                            }
+                        }
+                    }]
+                }
+            });
+        },
+        getChart_h() {
+            // if (this.chart) {
+            //     this.chart.destroy(); // 销毁旧的图表实例
+            // }
+            // 显示带导航条的 Highcharts.stockChart('highcharts', {
+            this.chart = Highcharts.chart('highcharts_h', {
+                chart: {
+                    zoomType: 'x', //x反向放大
+                    type: 'spline', //线样式
+                    panning: true, //是否移动
+                    panKey: 'ctrl' //按住ctrl可移动
+                },
+                time: {
+                    useUTC: true
+                },
+                boost: {
+                    useGPUTranslations: true
+                },
+                lang: {
+                    viewFullscreen: "全屏",
+                    exitFullscreen: "退出全屏",
+                    printChart: "打印图表",
+                    downloadJPEG: "下载JPEG图片",
+                    downloadPDF: "下载PDF文件",
+                    downloadPNG: "下载PNG文件",
+                    downloadSVG: "下载SVG文件",
+                },
+                title: {
+                    text: "冷链湿度曲线图"
+                },
+                xAxis: {
+                    title: {text: '时间'},
+                    type: 'datetime',
+                },
+                
+                yAxis: {
+                    title: {
+                        text: '湿度%'
+                    },
+                    min: Math.min(...this.seriesData_h[0].data.map(item => item[2])) - 5, // 动态设置y轴最小值
+                    max: Math.max(...this.seriesData_h[0].data.map(item => item[3])) + 5, // 动态设置y轴最大值
+                    plotLines:[{
+                    	color: '#FF1D00', //线的颜色,定义为红色
+                    	dashStyle: 'solid', //默认值,这里定义为实线DashDot
+                    	value: this.seriesData_h[0].data[0][3], //定义在那个值上显示标示线,这里是在x轴上刻度为3的值处垂直化一条线  
+                    	width: 2, //标示线的宽度,2px
+                    	label: {
+                    		text: `湿度上限(${this.seriesData_h[0].data[0][3]}%)`, //标签的内容
+                    		align: 'right', //标签的水平位置,水平居左,默认是水平居中center
+                    		// x: 10 //标签相对于被定位的位置水平偏移的像素,重新定位,水平居左10px
+                    	},
+                    },{
+                    	color: '#FF1D00', //线的颜色,定义为红色
+                    	dashStyle: 'solid', //默认值,这里定义为实线
+                    	value: this.seriesData_h[0].data[0][2], //定义在那个值上显示标示线,这里是在x轴上刻度为3的值处垂直化一条线  
+                    	width: 2, //标示线的宽度,2px
+                    	label: {
+                    		text: `湿度下限(${this.seriesData_h[0].data[0][2]}%)`, //标签的内容
+                    		align: 'right', //标签的水平位置,水平居左,默认是水平居中center
+                    		// x: 10 //标签相对于被定位的位置水平偏移的像素,重新定位,水平居左10px
+                    	},
+                    }]
+                },
+                credits: {//去掉水印
+                    enabled: false
+                },
+                subtitle: {
+                    useHTML: false,
+                },
+                plotOptions: {
+                    series: {
+                        // compare: 'percent',
+                        showInNavigator: true
+                    }
+                },
+                tooltip: {
+                    valueSuffix: '%',
+                    // backgroundColor: '#3d4b61', // 背景颜色
+                    // style: { // 文字内容相关样式
+                    //     color: "#fff",
+                    //     fontSize: "12px",
+                    //     fontWeight: "blod",
+                    //     fontFamily: "Courir new"
+                    // },
+                    crosshairs: [ //显示鼠标放上去的时候显示的提示标线
+                        {
+                            width: 1,
+                            color: '#ccc'
+                        },
+                    ],
+                },
+                series:this.seriesData_h,
+                responsive: {
+                    rules: [{ // 在图表小于 500px 的情况下关闭图例
+                        condition: { // 响应条件
+                            maxWidth: 500
+                        },
+                        chartOptions: { // 响应内容
+                            legend: {
+                                enabled: false
+                            }
+                        }
+                    }]
+                }
+            });
+        },
+    },
+}
+</script>
+<style lang="scss">
+    // .y-dialog{
+    //    overflow-y:auto;
+    //    margin-top:10vh !important;
+    //    height:80vh;
+       
+    // }
+</style>

+ 1 - 1
src/views/dataDisplay/mapShow.vue

@@ -65,7 +65,7 @@
                             @click="qietabs(index)"
                             v-for="item,index in tabsData" :key="index">{{item}}</div>
                         </div>
-                        <el-button type="primary" :disabled="showCar==0?true:false"  size="small" @click="canvasIt">截图</el-button>
+                        <el-button type="primary" :disabled="showCar==0?true:false"  size="small" @click="canvasIt">截图1</el-button>
                     </div>
                     <div class="mapShow-mai-nav-tit">
                         <div class="mapShow-mai-nav-tit-L">

+ 0 - 10
src/views/login.vue

@@ -58,18 +58,8 @@
 			// ////console.log('显示123',this.showFirm)
 			this.from.bzd_username = this.$store.state.userInfo.username
 			this.from.bzd_password = this.$store.state.userInfo.password
-
-
-			
-
-
-		},
-		destroyed() { //离开触发
 		},
 		methods: {
-			
-
-
 			async Login() {
 				var _this = this
 				_this.loading = true

+ 103 - 0
src/views/msgAlert.vue

@@ -0,0 +1,103 @@
+<template>
+    <div class="msgAlert">
+        <div id="containers" ref="mapContainers" style="width:100%;height:70vh;"></div>
+        <FloatingPanel>
+            <el-table height="100%" :data="tableData" border stripe size="medium" style="width: 100%">
+                <!-- <el-table-column align="center" type="index" width="50" label="序号"> </el-table-column> -->
+                <el-table-column align="center" prop="T_t" label="温度">
+                </el-table-column>
+                <el-table-column align="center" prop="T_rh" label="湿度">
+                </el-table-column>
+                <el-table-column align="center" prop="T_time" label="时间" min-width="160">
+                </el-table-column>
+            </el-table>
+        </FloatingPanel>
+    </div>
+</template>
+
+<script>
+import FloatingPanel from "@/components/FloatingPanel.vue";
+import { getdevDataNot } from '@/api/instrument/Theorder.js'
+import { aesEncrypt } from "@/plugins/aes.js";
+export default {
+    name: "",
+    components: { FloatingPanel },
+    data() {
+        return {
+            activeName: 'first',
+            tableData: [],
+            path: []
+        }
+    },
+    mounted() {
+        this._getDatas()
+    },
+    methods: {
+        async _getDatas() {
+            let param = this.$route.query;
+            const aes = await aesEncrypt(param.id)
+
+            const { data: result } = await getdevDataNot({ order: aes })
+            let arr = result.Data || []
+            this.tableData = arr
+
+            // 从 arr 数组生成 path 数组
+            this.path = arr.map(item => {
+                // 将 T_site 字符串按逗号分割,并转换为数字
+                return item.T_site.split(',').map(Number);
+            });
+            if (window.AMap) {
+                this.initMap();
+            } else {
+                // 可以添加一个定时器或者监听事件来确保 API 加载完成
+                window.addEventListener('load', () => {
+                    if (window.AMap) {
+                        this.initMap();
+                    }
+                });
+            }
+        },
+        initMap() {
+            // 初始化地图
+            this.map = new AMap.Map('containers', {
+                zoom: 13,
+                resizeEnable: true,
+                center: this.path[this.path.length - 1],
+            });
+            this.map.on('error', function() {
+               alert('地图加载失败')
+            });
+            // 绘制运动轨迹
+            this.polyline = new AMap.Polyline({
+                path: this.path,
+                strokeColor: '#FF33FF', // 线颜色
+                strokeWeight: 5, // 线宽
+                strokeOpacity: 1, // 透明度
+                lineJoin: 'round', // 折线拐点连接处样式
+                lineCap: 'round', // 折线两端线帽样式
+                zIndex: 50
+            });
+            this.polyline.setMap(this.map);
+
+
+            // 添加终点标记
+            this.endMarker = new AMap.Marker({
+                position: this.path[this.path.length - 1],
+                icon: 'https://a.amap.com/jsapi_demos/static/demo-center-v2/car.png',
+                offset: new AMap.Pixel(-10, -34)
+            });
+            this.endMarker.setMap(this.map);
+        },
+    },
+
+}
+</script>
+<style lang="scss">
+.msgAlert {
+    width: 100%;
+    height: 100vh;
+    background: #fff;
+    color: #000;
+    background: rgb(248, 249, 250);
+}
+</style>

+ 11 - 0
vue.config.js

@@ -12,6 +12,17 @@ new UglifyJsPlugin({
 	}
 })
 module.exports = {
+    // devServer: {
+    //     proxy: {
+    //         '/Cold_GoodsOrder': {
+    //             target: 'http://coldtest.coldbaozhida.com:9999',
+    //             changeOrigin: true,
+    //             pathRewrite: {
+    //                 '^/Cold_GoodsOrder': '/Cold_GoodsOrder'
+    //             }
+    //         }
+    //     }
+    // },
 	lintOnSave: false, //关闭eslint验证
 	outputDir: '冷链3.0',// 输出文件目录(默认dist)
 }

binární
冷链3.0.rar