From a6ed23b018343a68f9fd276647cc4af817398d1b Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期四, 01 二月 2024 15:21:26 +0800 Subject: [PATCH] feat:修改部分问题 --- public/index.html | 384 +++++----- src/views/your/sign-manage/exportColumn.js | 2 src/main.js | 15 src/views/your/order-manage/orderEvaluateManage.vue | 144 ++- src/views/your/sign-manage/signManage.vue | 842 +++++-------------------- src/views/home/home.vue | 2 package.json | 2 src/views/your/sign-manage/signManage.less | 6 src/views/your/map/areaMap.vue | 540 ++++++++-------- src/api/open.js | 8 10 files changed, 753 insertions(+), 1,192 deletions(-) diff --git a/package.json b/package.json index 5882554..1b5b7bf 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "sockjs-client": "^1.5.1", "stompjs": "^2.3.3", "view-design": "^4.6.1", - "viewerjs": "^1.9.2", + "viewerjs": "^1.11.6", "vue": "^2.6.14", "vue-apexcharts": "^1.6.1", "vue-clipboard2": "^0.3.1", diff --git a/public/index.html b/public/index.html index c2aa172..ea25365 100644 --- a/public/index.html +++ b/public/index.html @@ -2,224 +2,226 @@ <html lang="en"> <head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> --> - <!--<link rel="icon" href="<%= BASE_URL %>logo.png">--> - <title>瀹夊叏閰嶉�佺鐞嗗悗鍙�</title> - <meta name="keywords" - content=""> - <meta name="description" - content=""> - <script src="<%= BASE_URL %>config.js" type="text/javascript"></script> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> --> + <!--<link rel="icon" href="<%= BASE_URL %>logo.png">--> + <title>瀹夊叏閰嶉�佺鐞嗗悗鍙�</title> + <meta name="keywords" + content=""> + <meta name="description" + content=""> + <script src="<%= BASE_URL %>config.js" type="text/javascript"></script> - <!-- 閮ㄧ讲CDN浼樺寲 --> - <!--<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/vuex@3.6.2/dist/vuex.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/vue-i18n@8.24.4/dist/vue-i18n.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/vue-router@3.5.1/dist/vue-router.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/axios@0.21.1/dist/axios.min.js"></script>--> - <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/view-design@4.6.1/dist/styles/iview.css">--> - <!--<script src="https://cdn.jsdelivr.net/npm/view-design@4.6.1/dist/iview.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/vue-lazyload@1.3.3/vue-lazyload.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/echarts@5.1.2/dist/echarts.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/apexcharts@3.27.1/dist/apexcharts.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/vue-apexcharts@1.6.1/dist/vue-apexcharts.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/xlsx@0.17.0/dist/xlsx.full.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/dplayer@1.26.0/dist/DPlayer.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/print-js@1.6.0/dist/print.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/html2canvas@1.0.0-rc.7/dist/html2canvas.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/vue-json-pretty@1.8.0/lib/vue-json-pretty.min.js"></script>--> - <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vue-json-pretty@1.8.0/lib/styles.css">--> - <!--<script src="https://cdn.jsdelivr.net/npm/js-cookie@2.2.1/src/js.cookie.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/wangeditor@4.7.5/dist/wangEditor.min.js"></script>--> - <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/quill@1.3.7/dist/quill.snow.css">--> - <!--<script src="https://cdn.jsdelivr.net/npm/quill@1.3.7/dist/quill.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/sockjs-client@1.5.1/dist/sockjs.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/stompjs@2.3.3/lib/stomp.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/sortablejs@1.8.4/Sortable.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/vuedraggable@2.24.3/dist/vuedraggable.umd.min.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/viewerjs@1.9.2/dist/viewer.min.js"></script>--> - <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/viewerjs@1.9.2/dist/viewer.min.css">--> - <script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=H1RLDFX3oib78k9N9ocaB1Ac"></script> - <link href="//mapopen.cdn.bcebos.com/github/BMapGLLib/DrawingManager/src/DrawingManager.min.css" rel="stylesheet"> - <script type="text/javascript" src="//mapopen.cdn.bcebos.com/github/BMapGLLib/DrawingManager/src/DrawingManager.min.js"></script> - <!----> - <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css">--> - <!--<script src="https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js"></script>--> - <!--<script src="//cdn.jsdelivr.net/npm/leancloud-storage@4.10.1/dist/av-min.js"></script>--> + <!-- 閮ㄧ讲CDN浼樺寲 --> + <!--<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/vuex@3.6.2/dist/vuex.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/vue-i18n@8.24.4/dist/vue-i18n.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/vue-router@3.5.1/dist/vue-router.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/axios@0.21.1/dist/axios.min.js"></script>--> + <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/view-design@4.6.1/dist/styles/iview.css">--> + <!--<script src="https://cdn.jsdelivr.net/npm/view-design@4.6.1/dist/iview.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/vue-lazyload@1.3.3/vue-lazyload.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/echarts@5.1.2/dist/echarts.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/apexcharts@3.27.1/dist/apexcharts.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/vue-apexcharts@1.6.1/dist/vue-apexcharts.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/xlsx@0.17.0/dist/xlsx.full.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/dplayer@1.26.0/dist/DPlayer.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/print-js@1.6.0/dist/print.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/html2canvas@1.0.0-rc.7/dist/html2canvas.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/vue-json-pretty@1.8.0/lib/vue-json-pretty.min.js"></script>--> + <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vue-json-pretty@1.8.0/lib/styles.css">--> + <!--<script src="https://cdn.jsdelivr.net/npm/js-cookie@2.2.1/src/js.cookie.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/wangeditor@4.7.5/dist/wangEditor.min.js"></script>--> + <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/quill@1.3.7/dist/quill.snow.css">--> + <!--<script src="https://cdn.jsdelivr.net/npm/quill@1.3.7/dist/quill.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/sockjs-client@1.5.1/dist/sockjs.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/stompjs@2.3.3/lib/stomp.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/sortablejs@1.8.4/Sortable.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/vuedraggable@2.24.3/dist/vuedraggable.umd.min.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/viewerjs@1.9.2/dist/viewer.min.js"></script>--> + <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/viewerjs@1.9.2/dist/viewer.min.css">--> + <script type="text/javascript" + src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=H1RLDFX3oib78k9N9ocaB1Ac"></script> + <link href="//mapopen.cdn.bcebos.com/github/BMapGLLib/DrawingManager/src/DrawingManager.min.css" rel="stylesheet"> + <script type="text/javascript" + src="//mapopen.cdn.bcebos.com/github/BMapGLLib/DrawingManager/src/DrawingManager.min.js"></script> + <!----> + <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css">--> + <!--<script src="https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js"></script>--> + <!--<script src="//cdn.jsdelivr.net/npm/leancloud-storage@4.10.1/dist/av-min.js"></script>--> - <!--<!– vaptcha –>--> - <!--<script src="https://v.vaptcha.com/v3.js"></script>--> - <!--<!– monaco缂栬緫鍣� –>--> - <!--<link rel="stylesheet" data-name="vs/editor/editor.main"--> + <!--<!– vaptcha –>--> + <!--<script src="https://v.vaptcha.com/v3.js"></script>--> + <!--<!– monaco缂栬緫鍣� –>--> + <!--<link rel="stylesheet" data-name="vs/editor/editor.main"--> <!--href="https://cdn.jsdelivr.net/npm/monaco-editor@0.24.0/min/vs/editor/editor.main.css">--> - <!--<script>self.require = { paths: { 'vs': 'https://cdn.jsdelivr.net/npm/monaco-editor@0.24.0/min/vs' }, 'vs/nls': { availableLanguages: { '*': 'zh-cn' } } };</script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.24.0/min/vs/loader.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.24.0/min/vs/editor/editor.main.nls.zh-cn.js"></script>--> - <!--<script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.24.0/min/vs/editor/editor.main.js"></script>--> - <!--<!– mapbox –>--> - <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/mapbox-gl@2.3.0/dist/mapbox-gl.css">--> - <!--<link rel="stylesheet"--> + <!--<script>self.require = { paths: { 'vs': 'https://cdn.jsdelivr.net/npm/monaco-editor@0.24.0/min/vs' }, 'vs/nls': { availableLanguages: { '*': 'zh-cn' } } };</script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.24.0/min/vs/loader.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.24.0/min/vs/editor/editor.main.nls.zh-cn.js"></script>--> + <!--<script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.24.0/min/vs/editor/editor.main.js"></script>--> + <!--<!– mapbox –>--> + <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/mapbox-gl@2.3.0/dist/mapbox-gl.css">--> + <!--<link rel="stylesheet"--> <!--href="https://cdn.jsdelivr.net/npm/@mapbox/mapbox-gl-geocoder@4.7.1/dist/mapbox-gl-geocoder.css">--> - <style> - .page-loading-wrap { - padding: 120px; - display: flex; - justify-content: center; - align-items: center; - flex-direction: column; - } + <style> + .page-loading-wrap { + padding: 120px; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + } - .la-timer, - .la-timer>div { - position: relative; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } + .la-timer, + .la-timer > div { + position: relative; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } - .la-timer { - display: block; - font-size: 0; - color: #fff; - } + .la-timer { + display: block; + font-size: 0; + color: #fff; + } - .la-timer.la-dark { - color: #333; - } + .la-timer.la-dark { + color: #333; + } - .la-timer>div { - display: inline-block; - float: none; - background-color: currentColor; - border: 0 solid currentColor; - } + .la-timer > div { + display: inline-block; + float: none; + background-color: currentColor; + border: 0 solid currentColor; + } - .la-timer { - width: 32px; - height: 32px; - } + .la-timer { + width: 32px; + height: 32px; + } - .la-timer>div { - width: 32px; - height: 32px; - background: transparent; - border-width: 2px; - border-radius: 100%; - } + .la-timer > div { + width: 32px; + height: 32px; + background: transparent; + border-width: 2px; + border-radius: 100%; + } - .la-timer>div:before, - .la-timer>div:after { - position: absolute; - top: 14px; - left: 14px; - display: block; - width: 2px; - margin-top: -1px; - margin-left: -1px; - content: ""; - background: currentColor; - border-radius: 2px; - -webkit-transform-origin: 1px 1px 0; - -moz-transform-origin: 1px 1px 0; - -ms-transform-origin: 1px 1px 0; - -o-transform-origin: 1px 1px 0; - transform-origin: 1px 1px 0; - -webkit-animation: timer-loader 1250ms infinite linear; - -moz-animation: timer-loader 1250ms infinite linear; - -o-animation: timer-loader 1250ms infinite linear; - animation: timer-loader 1250ms infinite linear; - -webkit-animation-delay: -625ms; - -moz-animation-delay: -625ms; - -o-animation-delay: -625ms; - animation-delay: -625ms; - } + .la-timer > div:before, + .la-timer > div:after { + position: absolute; + top: 14px; + left: 14px; + display: block; + width: 2px; + margin-top: -1px; + margin-left: -1px; + content: ""; + background: currentColor; + border-radius: 2px; + -webkit-transform-origin: 1px 1px 0; + -moz-transform-origin: 1px 1px 0; + -ms-transform-origin: 1px 1px 0; + -o-transform-origin: 1px 1px 0; + transform-origin: 1px 1px 0; + -webkit-animation: timer-loader 1250ms infinite linear; + -moz-animation: timer-loader 1250ms infinite linear; + -o-animation: timer-loader 1250ms infinite linear; + animation: timer-loader 1250ms infinite linear; + -webkit-animation-delay: -625ms; + -moz-animation-delay: -625ms; + -o-animation-delay: -625ms; + animation-delay: -625ms; + } - .la-timer>div:before { - height: 12px; - } + .la-timer > div:before { + height: 12px; + } - .la-timer>div:after { - height: 8px; - -webkit-animation-duration: 15s; - -moz-animation-duration: 15s; - -o-animation-duration: 15s; - animation-duration: 15s; - -webkit-animation-delay: -7.5s; - -moz-animation-delay: -7.5s; - -o-animation-delay: -7.5s; - animation-delay: -7.5s; - } + .la-timer > div:after { + height: 8px; + -webkit-animation-duration: 15s; + -moz-animation-duration: 15s; + -o-animation-duration: 15s; + animation-duration: 15s; + -webkit-animation-delay: -7.5s; + -moz-animation-delay: -7.5s; + -o-animation-delay: -7.5s; + animation-delay: -7.5s; + } - @-webkit-keyframes timer-loader { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } + @-webkit-keyframes timer-loader { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } - } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } + } - @-moz-keyframes timer-loader { - 0% { - -moz-transform: rotate(0deg); - transform: rotate(0deg); - } + @-moz-keyframes timer-loader { + 0% { + -moz-transform: rotate(0deg); + transform: rotate(0deg); + } - 100% { - -moz-transform: rotate(360deg); - transform: rotate(360deg); - } - } + 100% { + -moz-transform: rotate(360deg); + transform: rotate(360deg); + } + } - @-o-keyframes timer-loader { - 0% { - -o-transform: rotate(0deg); - transform: rotate(0deg); - } + @-o-keyframes timer-loader { + 0% { + -o-transform: rotate(0deg); + transform: rotate(0deg); + } - 100% { - -o-transform: rotate(360deg); - transform: rotate(360deg); - } - } + 100% { + -o-transform: rotate(360deg); + transform: rotate(360deg); + } + } - @keyframes timer-loader { - 0% { - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -o-transform: rotate(0deg); - transform: rotate(0deg); - } + @keyframes timer-loader { + 0% { + -webkit-transform: rotate(0deg); + -moz-transform: rotate(0deg); + -o-transform: rotate(0deg); + transform: rotate(0deg); + } - 100% { - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -o-transform: rotate(360deg); - transform: rotate(360deg); - } - } - </style> + 100% { + -webkit-transform: rotate(360deg); + -moz-transform: rotate(360deg); + -o-transform: rotate(360deg); + transform: rotate(360deg); + } + } + </style> </head> <body> - <noscript> +<noscript> <strong>We're sorry but xboot-front doesn't work properly without JavaScript enabled. Please enable it to - continue.</strong> - </noscript> - <div id="app"> + continue.</strong> +</noscript> +<div id="app"> <div class="page-loading-wrap"> - <div style="color: #4e9ff5" class="la-timer"> - <div></div> - </div> - <h4 style="margin-top:20px;font-size:14px;font-weight:400;color: #515a6e;">姝e湪鍔犺浇璧勬簮...</h4> + <div style="color: #4e9ff5" class="la-timer"> + <div></div> + </div> + <h4 style="margin-top:20px;font-size:14px;font-weight:400;color: #515a6e;">姝e湪鍔犺浇璧勬簮...</h4> </div> - </div> - <!-- built files will be auto injected --> +</div> +<!-- built files will be auto injected --> </body> </html> \ No newline at end of file diff --git a/src/api/open.js b/src/api/open.js index 1bfae66..68520b6 100644 --- a/src/api/open.js +++ b/src/api/open.js @@ -287,7 +287,9 @@ return getRequest(`/signCount/selectBySign?pageSize=${pageSize}&pageNum=${pageNum}&carName=${carName}&StatisticalType=${StatisticalType}`) } // 绛炬敹缁熻瀵煎嚭鍒楄〃 -export const outExcel = (pageNum, pageSize, carName, sendDateStart, sendDateEnd) => { - return getmethod(`/signCount/outExcels?pageSize=${pageSize}&pageNum=${pageNum}&carName=${carName}&sendDateStart=${sendDateStart}&sendDateEnd=${sendDateEnd}`) +export const outExcel = (pageNum, pageSize, carName, sendDateStart, sendDateEnd,line) => { + return getmethod(`/signCount/outExcels?pageSize=${pageSize}&pageNum=${pageNum}&carName=${carName}&sendDateStart=${sendDateStart}&sendDateEnd=${sendDateEnd}&line=${line}`) } - + export const getNewSignList = (pageNum, pageSize, carName, sendDateStart, sendDateEnd,line,sendDate,userName,batch) => { + return getRequest(`/signCount/selectBySignNew?pageSize=${pageSize}&pageNum=${pageNum}&carName=${carName}&sendDateStart=${sendDateStart}&sendDateEnd=${sendDateEnd}&line=${line}&sendDate=${sendDate}&userName=${userName}&batch=${batch}`) +} diff --git a/src/main.js b/src/main.js index 7e1deb0..2fba38a 100644 --- a/src/main.js +++ b/src/main.js @@ -4,12 +4,12 @@ import ViewUI from 'view-design' import 'view-design/dist/styles/iview.css' import App from './App' -import { router } from './router/index' +import {router} from './router/index' import store from './store' import i18n from '@/locale' -import { getRequest, postRequest, putRequest, postBodyRequest, getNoAuthRequest, postNoAuthRequest } from '@/libs/axios' -import { setStore, getStore, removeStore,setSessionStore,getSessionStore } from '@/libs/storage' -import { format } from "date-fns" +import {getRequest, postRequest, putRequest, postBodyRequest, getNoAuthRequest, postNoAuthRequest} from '@/libs/axios' +import {setStore, getStore, removeStore, setSessionStore, getSessionStore} from '@/libs/storage' +import {format} from "date-fns" import util from '@/libs/util' import hasPermission from '@/libs/hasPermission' import hasRole from '@/libs/hasRole' @@ -21,7 +21,9 @@ import './assets/iconfont/iconfont.css' import '@babel/polyfill' + Vue.config.productionTip = false + Vue.use(VueLazyload, { error: require('./assets/img-error.png'), loading: require('./assets/loading2.gif') @@ -58,15 +60,14 @@ store, i18n, render: h => h(App), - data: { - }, + data: {}, mounted() { // 鍔犺浇涓婚 this.$store.commit('setTheme', localStorage.theme); // 鍒濆鍖栬彍鍗� util.initRouter(this); // 璁剧疆鐢ㄦ埛淇℃伅 - this.$store.commit("setUserInfo", { nickname: localStorage.nickname, avatar: localStorage.avatar }); + this.$store.commit("setUserInfo", {nickname: localStorage.nickname, avatar: localStorage.avatar}); // 鏄剧ず鎵撳紑鐨勯〉闈㈢殑鍒楄〃 this.$store.commit('setOpenedList'); this.$store.commit('initCachepage'); diff --git a/src/views/home/home.vue b/src/views/home/home.vue index ff32ddf..5b0f3d3 100644 --- a/src/views/home/home.vue +++ b/src/views/home/home.vue @@ -567,7 +567,7 @@ }, mounted() { let token = this.getSessionStore('accessToken') - this.token = `http://111.63.178.115:9093?token=${token}`; + this.token = `https://111.63.178.115:9093?token=${token}`; // this.token = `http://localhost:63343/dp/index.html?token=$vj$xCShfaQRUQlF8lqL1lwWi2auOrkLfkoecRuDWiJXlTnSg1mh6BODfjieo3ncsosjiocew?token1=${token}`; //this.token = `http://127.0.0.1:8848/dp/index.html?token=${token}`; //alert(this.toCode('绠$悊鍛�')) diff --git a/src/views/your/map/areaMap.vue b/src/views/your/map/areaMap.vue index fc1dad1..47f610f 100644 --- a/src/views/your/map/areaMap.vue +++ b/src/views/your/map/areaMap.vue @@ -1,291 +1,281 @@ <template> - <div> + <div> <div style="float: left;width: 15%;overflow:auto"> - <Table - border - :columns="columns" - :data="data" - ref="table" - height="600" - highlight-row - @on-current-change="handleRowChange" - ></Table> + <Table + border + :columns="columns" + :data="data" + ref="table" + height="600" + highlight-row + @on-current-change="handleRowChange" + ></Table> </div> <div style="float: right;width: 85%;"> - <!--<div id="container"></div>--> - <!--<ul class="drawing-panel" style="z-index: 99;">--> - <!--<li class = "btn" @click="openEdit">寮�鍚紪杈�</li>--> - <!--<li class = "btn" @click="closeEdit">淇濆瓨缂栬緫</li>--> - <!--</ul>--> + <!--<div id="container"></div>--> + <!--<ul class="drawing-panel" style="z-index: 99;">--> + <!--<li class = "btn" @click="openEdit">寮�鍚紪杈�</li>--> + <!--<li class = "btn" @click="closeEdit">淇濆瓨缂栬緫</li>--> + <!--</ul>--> - <ul class = "drawing-panel"> - <li class="bmap-btn bmap-polygon" id="polygon" @click="draw"></li> - <!--<li class = "btn" @click="clearAll">娓呴櫎閲嶇敾</li>--> - </ul> - <div id = "container"></div> + <ul class="drawing-panel"> + <li class="bmap-btn bmap-polygon" id="polygon" @click="draw"></li> +<!-- <li class="btn" @click="clearAll">娓呴櫎閲嶇敾</li>--> + </ul> + <div id="container"></div> </div> - </div> + </div> </template> <script> - import { - getAllArea, - addAreaMap, - getAllByAreaId, - delAreaMap, - } from "@/api/open"; - export default { - name: "", - data() { - return { - polygon: {}, - columns: [ - { - title: "鐗囧尯鍚嶇О", - key: "name", - }, - ], - data:[], - map:{}, - areaId:"", - drawingManager:{}, - overlays:[] - } +import { + getAllArea, + addAreaMap, + getAllByAreaId, + delAreaMap, +} from "@/api/open"; + +export default { + name: "", + data() { + return { + polygon: {}, + columns: [ + { + title: "鐗囧尯鍚嶇О", + key: "name", }, - mounted() { - this.getDataList(); - - this.map = new BMapGL.Map('container',{enableMapClick:false}); - var point = new BMapGL.Point(118.187167,39.636514); - this.map.centerAndZoom(point, 12); - this.map.enableScrollWheelZoom(true); - - - - - - - - // this.polygon = new BMapGL.Polygon([ - // new BMapGL.Point(118.127822,39.697015), - // new BMapGL.Point(118.253728,39.697459), - // new BMapGL.Point(118.256028,39.601458), - // new BMapGL.Point(118.109424,39.59612), - // new BMapGL.Point(118.100801,39.650809), - // ], { - // strokeColor: 'blue', - // strokeWeight: 2, - // strokeOpacity: 0.5 - // }); - // this.map.addOverlay(this.polygon); - }, - methods:{ - clearAll() { - for(var i = 0; i < this.overlays.length; i++){ - this.map.removeOverlay(this.overlays[i]); - } - this.overlays.length = 0 - }, - draw(e) { - this.clearAll(); - - var styleOptions = { - strokeColor: '#5E87DB', // 杈圭嚎棰滆壊 - fillColor: '#5E87DB', // 濉厖棰滆壊銆傚綋鍙傛暟涓虹┖鏃讹紝鍦嗗舰娌℃湁濉厖棰滆壊 - strokeWeight: 2, // 杈圭嚎瀹藉害锛屼互鍍忕礌涓哄崟浣� - strokeOpacity: 1, // 杈圭嚎閫忔槑搴︼紝鍙栧�艰寖鍥�0-1 - fillOpacity: 0.2 // 濉厖閫忔槑搴︼紝鍙栧�艰寖鍥�0-1 - }; - - // 瀹炰緥鍖栭紶鏍囩粯鍒跺伐鍏� - this.drawingManager = new BMapGLLib.DrawingManager(this.map, { - // isOpen: true, // 鏄惁寮�鍚粯鍒舵ā寮� - enableCalculate: false, // 缁樺埗鏄惁杩涜娴嬭窛娴嬮潰 - enableSorption: true, // 鏄惁寮�鍚竟鐣屽惛闄勫姛鑳� - sorptiondistance: 20, // 杈圭晫鍚搁檮璺濈 - polygonOptions: styleOptions, // 澶氳竟褰㈢殑鏍峰紡 - }); - - console.log(e) - var arr = document.getElementsByClassName('bmap-btn'); - for(var i = 0; i<arr.length; i++) { - arr[i].style.backgroundPositionY = '0'; - } - //e.style.backgroundPositionY = '-52px'; - var drawingType = BMAP_DRAWING_POLYGON; - // 杩涜缁樺埗 - if (this.drawingManager._isOpen && this.drawingManager.getDrawingMode() === drawingType) { - this.drawingManager.close(); - } else { - this.drawingManager.setDrawingMode(drawingType); - this.drawingManager.open(); - } - - this.drawingManager.addEventListener('overlaycomplete', this.overlaycomplete); - }, - overlaycomplete(e){ - this.overlays.push(e.overlay); - var path = e.overlay.getPath(); - delAreaMap({id:this.areaId}).then((res) => { - if(res.success){ - for(var i=0;i<path.length;i++){ - addAreaMap({areaId:this.areaId,lng:path[i].lng,lat:path[i].lat,seq:i}).then((res) => { - this.findMap(); - }); - //this.sleep(150) - } - // addAreaMap({areaId:this.areaId,lng:path[0].lng,lat:path[0].lat}).then((res) => { - // - // }); - } - }); - }, - sleep(delay) { - var start = (new Date()).getTime(); - while((new Date()).getTime() - start < delay) { - continue; - } - }, - openEdit() { - this.polygon.enableEditing(); - }, - closeEdit() { - this.polygon.disableEditing(); - var obj = this.polygon.points; - console.log(this.polygon) - - delAreaMap({id:this.areaId}).then((res) => { - if(res.success){ - for(var i=0;i<obj.length;i++){ - addAreaMap({areaId:this.areaId,lng:this.getLng(obj[i].lng,obj[i].lat),lat:this.getLat(obj[i].lng,obj[i].lat)}).then((res) => { - this.findMap(); - }); - } - } - }); - - }, - getDataList() { - getAllArea({}).then((res) => { - if (res.success) { - this.data = res.result; - } - }); - }, - handleRowChange(currentRow, oldCurrentRow){ - this.areaId = currentRow.id - this.findMap(); - }, - findMap(){ - getAllByAreaId({id:this.areaId}).then((res) => { - if (res.success) { - this.map.clearOverlays(); - if(res.result.length>2){ - var ps = [] - for(var i=0;i<res.result.length;i++){ - ps.push(new BMapGL.Point(res.result[i].lng,res.result[i].lat)) - } - this.polygon = new BMapGL.Polygon(ps, { - strokeColor: 'blue', - strokeWeight: 2, - strokeOpacity: 0.5 - }); - this.map.addOverlay(this.polygon); - }else{ - // this.polygon = new BMapGL.Polygon([ - // new BMapGL.Point(118.127822,39.697015), - // new BMapGL.Point(118.253728,39.697459), - // new BMapGL.Point(118.256028,39.601458), - // new BMapGL.Point(118.109424,39.59612), - // new BMapGL.Point(118.100801,39.650809), - // ], { - // strokeColor: 'blue', - // strokeWeight: 2, - // strokeOpacity: 0.5 - // }); - // this.map.addOverlay(this.polygon); - } - } - }); - } - } + ], + data: [], + map: {}, + areaId: "", + drawingManager: {}, + overlays: [] } + }, + mounted() { + this.getDataList(); + + this.map = new BMapGL.Map('container', {enableMapClick: false}); + var point = new BMapGL.Point(118.187167, 39.636514); + this.map.centerAndZoom(point, 12); + this.map.enableScrollWheelZoom(true); + }, + methods: { + clearAll() { + for (var i = 0; i < this.overlays.length; i++) { + this.map.removeOverlay(this.overlays[i]); + } + this.overlays.length = 0 + }, + draw(e) { + this.clearAll(); + + var styleOptions = { + strokeColor: '#5E87DB', // 杈圭嚎棰滆壊 + fillColor: '#5E87DB', // 濉厖棰滆壊銆傚綋鍙傛暟涓虹┖鏃讹紝鍦嗗舰娌℃湁濉厖棰滆壊 + strokeWeight: 2, // 杈圭嚎瀹藉害锛屼互鍍忕礌涓哄崟浣� + strokeOpacity: 1, // 杈圭嚎閫忔槑搴︼紝鍙栧�艰寖鍥�0-1 + fillOpacity: 0.2 // 濉厖閫忔槑搴︼紝鍙栧�艰寖鍥�0-1 + }; + + // 瀹炰緥鍖栭紶鏍囩粯鍒跺伐鍏� + this.drawingManager = new BMapGLLib.DrawingManager(this.map, { + // isOpen: true, // 鏄惁寮�鍚粯鍒舵ā寮� + enableCalculate: false, // 缁樺埗鏄惁杩涜娴嬭窛娴嬮潰 + enableSorption: true, // 鏄惁寮�鍚竟鐣屽惛闄勫姛鑳� + sorptiondistance: 20, // 杈圭晫鍚搁檮璺濈 + polygonOptions: styleOptions, // 澶氳竟褰㈢殑鏍峰紡 + }); + + console.log(e) + var arr = document.getElementsByClassName('bmap-btn'); + for (var i = 0; i < arr.length; i++) { + arr[i].style.backgroundPositionY = '0'; + } + //e.style.backgroundPositionY = '-52px'; + var drawingType = BMAP_DRAWING_POLYGON; + // 杩涜缁樺埗 + if (this.drawingManager._isOpen && this.drawingManager.getDrawingMode() === drawingType) { + this.drawingManager.close(); + } else { + this.drawingManager.setDrawingMode(drawingType); + this.drawingManager.open(); + } + + this.drawingManager.addEventListener('overlaycomplete', this.overlaycomplete); + }, + overlaycomplete(e) { + this.overlays.push(e.overlay); + var path = e.overlay.getPath(); + delAreaMap({id: this.areaId}).then((res) => { + if (res.success) { + for (var i = 0; i < path.length; i++) { + addAreaMap({areaId: this.areaId, lng: path[i].lng, lat: path[i].lat, seq: i}).then((res) => { + this.findMap(); + }); + //this.sleep(150) + } + // addAreaMap({areaId:this.areaId,lng:path[0].lng,lat:path[0].lat}).then((res) => { + // + // }); + } + }); + }, + sleep(delay) { + var start = (new Date()).getTime(); + while ((new Date()).getTime() - start < delay) { + continue; + } + }, + openEdit() { + this.polygon.enableEditing(); + }, + closeEdit() { + this.polygon.disableEditing(); + var obj = this.polygon.points; + console.log(this.polygon) + + delAreaMap({id: this.areaId}).then((res) => { + if (res.success) { + for (var i = 0; i < obj.length; i++) { + addAreaMap({ + areaId: this.areaId, + lng: this.getLng(obj[i].lng, obj[i].lat), + lat: this.getLat(obj[i].lng, obj[i].lat) + }).then((res) => { + this.findMap(); + }); + } + } + }); + + }, + getDataList() { + getAllArea({}).then((res) => { + if (res.success) { + this.data = res.result; + } + }); + }, + handleRowChange(currentRow, oldCurrentRow) { + this.areaId = currentRow.id + this.findMap(); + }, + findMap() { + getAllByAreaId({id: this.areaId}).then((res) => { + if (res.success) { + this.map.clearOverlays(); + if (res.result.length > 2) { + var ps = [] + for (var i = 0; i < res.result.length; i++) { + ps.push(new BMapGL.Point(res.result[i].lng, res.result[i].lat)) + } + this.polygon = new BMapGL.Polygon(ps, { + strokeColor: 'blue', + strokeWeight: 2, + strokeOpacity: 0.5 + }); + this.map.addOverlay(this.polygon); + } + } + }); + } + } +} </script> <style scoped> - body, html, #container {width: 100%; height: 600px; overflow: hidden; margin: 0; font-family: "寰蒋闆呴粦";} - ul li {list-style: none;} - .drawing-panel { - z-index: 999; - position: fixed; - bottom: 3.5rem; - margin-left: 2.5rem; - padding-left: 0; - border-radius: .25rem; - height: 47px; - box-shadow: 0 2px 6px 0 rgba(27, 142, 236, 0.5); - } - .bmap-btn { - border-right: 1px solid #d2d2d2; - float: left; - width: 64px; - height: 100%; - background-image: url(//api.map.baidu.com/library/DrawingManager/1.4/src/bg_drawing_tool.png); - cursor: pointer; - } - .drawing-panel .bmap-marker { - background-position: -65px 0; - } - .drawing-panel .bmap-polyline { - background-position: -195px 0; - } - .drawing-panel .bmap-rectangle { - background-position: -325px 0; - } - .drawing-panel .bmap-polygon { - background-position: -260px 0; - } - .drawing-panel .bmap-circle { - background-position: -130px 0; - } - /*body,*/ - /*html,*/ - /*#container {*/ - /*overflow: hidden;*/ - /*width: 100%;*/ - /*height: 600px;*/ - /*margin: 0;*/ - /*font-family: "寰蒋闆呴粦";*/ - /*}*/ - /*ul li {*/ - /*list-style: none;*/ - /*}*/ - /*.drawing-panel {*/ - /*z-index: 999;*/ - /*position: fixed;*/ - /*bottom: 3.5rem;*/ - /*margin-left: 3rem;*/ - /*padding: 1rem 1rem;*/ - /*border-radius: .25rem;*/ - /*background-color: #fff;*/ - /*box-shadow: 0 2px 6px 0 rgba(27, 142, 236, 0.5);*/ - /*}*/ - /*.btn {*/ - /*width: 150px;*/ - /*height: 30px;*/ - /*float: left;*/ - /*background-color: #fff;*/ - /*color: rgba(27, 142, 236, 1);*/ - /*font-size: 14px;*/ - /*border:1px solid rgba(27, 142, 236, 1);*/ - /*border-radius: 5px;*/ - /*margin: 0 5px;*/ - /*text-align: center;*/ - /*line-height: 30px;*/ - /*}*/ - /*.btn:hover {*/ - /*background-color: rgba(27, 142, 236, 0.8);*/ - /*color: #fff;*/ - /*}*/ +body, html, #container { + width: 100%; + height: 600px; + overflow: hidden; + margin: 0; + font-family: "寰蒋闆呴粦"; +} + +ul li { + list-style: none; +} + +.drawing-panel { + z-index: 999; + position: fixed; + bottom: 3.5rem; + margin-left: 2.5rem; + padding-left: 0; + border-radius: .25rem; + height: 47px; + box-shadow: 0 2px 6px 0 rgba(27, 142, 236, 0.5); +} + +.bmap-btn { + border-right: 1px solid #d2d2d2; + float: left; + width: 64px; + height: 100%; + background-image: url(//api.map.baidu.com/library/DrawingManager/1.4/src/bg_drawing_tool.png); + cursor: pointer; +} + +.drawing-panel .bmap-marker { + background-position: -65px 0; +} + +.drawing-panel .bmap-polyline { + background-position: -195px 0; +} + +.drawing-panel .bmap-rectangle { + background-position: -325px 0; +} + +.drawing-panel .bmap-polygon { + background-position: -260px 0; +} + +.drawing-panel .bmap-circle { + background-position: -130px 0; +} + +/*body,*/ +/*html,*/ +/*#container {*/ +/*overflow: hidden;*/ +/*width: 100%;*/ +/*height: 600px;*/ +/*margin: 0;*/ +/*font-family: "寰蒋闆呴粦";*/ +/*}*/ +/*ul li {*/ +/*list-style: none;*/ +/*}*/ +/*.drawing-panel {*/ +/*z-index: 999;*/ +/*position: fixed;*/ +/*bottom: 3.5rem;*/ +/*margin-left: 3rem;*/ +/*padding: 1rem 1rem;*/ +/*border-radius: .25rem;*/ +/*background-color: #fff;*/ +/*box-shadow: 0 2px 6px 0 rgba(27, 142, 236, 0.5);*/ +/*}*/ +/*.btn {*/ +/*width: 150px;*/ +/*height: 30px;*/ +/*float: left;*/ +/*background-color: #fff;*/ +/*color: rgba(27, 142, 236, 1);*/ +/*font-size: 14px;*/ +/*border:1px solid rgba(27, 142, 236, 1);*/ +/*border-radius: 5px;*/ +/*margin: 0 5px;*/ +/*text-align: center;*/ +/*line-height: 30px;*/ +/*}*/ +/*.btn:hover {*/ +/*background-color: rgba(27, 142, 236, 0.8);*/ +/*color: #fff;*/ +/*}*/ </style> \ No newline at end of file diff --git a/src/views/your/order-manage/orderEvaluateManage.vue b/src/views/your/order-manage/orderEvaluateManage.vue index 2ee3b76..e2efe4d 100644 --- a/src/views/your/order-manage/orderEvaluateManage.vue +++ b/src/views/your/order-manage/orderEvaluateManage.vue @@ -7,34 +7,48 @@ <div class="search"> <Card> <Row class="operation"> - <Input v-model="searchForm2.userName" suffix="ios-search" @on-change="getDataList2" placeholder="杈撳叆閰嶉�佷汉" clearable style="width: 250px"/> - <Input v-model="searchForm2.customerName" suffix="ios-search" @on-change="getDataList2" placeholder="杈撳叆鍟嗘埛鍚嶇О" clearable style="width: 250px;margin-left: 20px"/> - <Date-picker clearable @on-change="time1" format="yyyy-MM-dd" type="date" placement="bottom-end" placeholder="璇烽�夋嫨閰嶉�佹棩鏈�" style="width: 240px;margin-left: 20px"> + <Input v-model="searchForm2.userName" suffix="ios-search" placeholder="杈撳叆閰嶉�佷汉" + clearable style="width: 250px"/> + <Input v-model="searchForm2.customerName" suffix="ios-search" + placeholder="杈撳叆鍟嗘埛鍚嶇О" clearable style="width: 250px;margin-left: 20px"/> + <Date-picker clearable @on-change="time1" format="yyyy-MM-dd" type="date" placement="bottom-end" + placeholder="璇烽�夋嫨閰嶉�佹棩鏈�" style="width: 240px;margin-left: 20px"> </Date-picker> - <Select v-model="searchForm2.status" style="width:200px;margin-left: 20px" clearable> + <Select v-model="searchForm2.status" style="width:200px;margin-left: 20px" clearable + placeholder="璇烽�夋嫨閰嶉�佺姸鎬�"> <Option v-for="item in cityList" :value="item.value" :key="item">{{ item.label }}</Option> </Select> - <Button @click="init2" icon="md-refresh">鏌ヨ</Button> + <Button @click="init2" icon="md-search" style="margin-left: 20px">鏌ヨ</Button> </Row> <Table - :loading="loading" - border - :columns="columns" - :data="data" - ref="table" - ></Table> + :loading="loading" + border + :columns="columns" + :data="data" + ref="table" + > + <template #img="{ row, index }"> + <div v-for="(fit,index) in getImg(row.img)" :key="index"> + <img + :src="fit" + alt="鏆傛棤鍥剧墖" + style="width: 100px;height: 100px" + @click="handleImageClick"/> + </div> + </template> + </Table> <Row type="flex" justify="end" class="page"> <Page - :current="searchForm.pageNumber" - :total="total" - :page-size="searchForm.pageSize" - @on-change="changePage" - @on-page-size-change="changePageSize" - :page-size-opts="[10, 20, 50]" - size="small" - show-total - show-elevator - show-sizer + :current="searchForm.pageNumber" + :total="total" + :page-size="searchForm.pageSize" + @on-change="changePage" + @on-page-size-change="changePageSize" + :page-size-opts="[10, 20, 50]" + size="small" + show-total + show-elevator + show-sizer ></Page> </Row> </Card> @@ -47,16 +61,19 @@ import { findPageOrderTask2, } from "@/api/open"; + + export default { name: "car-manage", data() { return { + previewModal: false, maxHeight: 510, openTip: true, openLevel: "0", loading: true, modalTitle: "", - modalVisible:false, + modalVisible: false, searchForm: { pageNumber: 1, // 褰撳墠椤垫暟 pageSize: 10, // 椤甸潰澶у皬 @@ -68,6 +85,8 @@ pageSize: 10, // 椤甸潰澶у皬 sort: "sendDate", // 榛樿鎺掑簭瀛楁 order: "desc", // 榛樿鎺掑簭鏂瑰紡 + customerName: '', + sendDate: '' }, submitLoading: false, selectList: [], @@ -85,7 +104,7 @@ { title: "鍟嗘埛鍚嶇О", key: "customerName", - ellipsis:true, + ellipsis: true, }, { title: "閫佽揣鏉℃暟", @@ -126,7 +145,7 @@ }, }), ]); - }else{ + } else { return h("div", [ h("Badge", { props: { @@ -142,25 +161,33 @@ title: "寮傚父绛炬敹鍘熷洜", key: "remarks", width: 150, - ellipsis:true, + ellipsis: true, }, { - title: "绛炬敹鏂瑰紡", - key: "status", - width: 150, - render: (h, params) => { - if (params.row.status == 1) { - return h("div", [ - h("Badge", { - props: { - status: "success", - text: "鎸囩汗", - }, - }), - ]); - } - }, - }, + title: '绛炬敹鍥剧墖', + align: "center", + width: 200, + slot: "img", + // render: (h, params) => { + // + // return h('div', { + // attrs: { + // style: 'width: 100px;height: 100px;' + // } + // }, [ + // h('img', { + // attrs: { + // src: params.row.img || null, + // style: 'width: 100px;height: 100px;' + // }, + // props: { + // type: 'primary', + // size: 'large' + // } + // }) + // ]) + // } + } ], data: [], total: 0, @@ -181,24 +208,47 @@ }; }, methods: { + handleImageClick(e) { + console.log(e.target.src); + }, + getImg(html) { + let newHtml = []; + if (html.indexOf('http') === -1) { + if (typeof html == 'string' && html.indexOf(',') !== -1) { + newHtml = html.split(',').slice(0, 2); + return newHtml; + } + newHtml.push(html); + return newHtml; + } else { + if (typeof html == 'string' && html.indexOf(',') !== -1) { + newHtml = html.split(',').slice(0, 2).map(v => '/xboot' + v.split('/xboot')[1]) + return newHtml; + } + let result = '/xboot' + html.split('/xboot')[1] + newHtml.push(result); + return newHtml; + } + }, + init() { this.getDataList(); }, init2() { this.getDataList2(); }, - time1(e){ + time1(e) { this.searchForm.sendDate = e; - this.getDataList(); + this.searchForm2.sendDate = e; }, changePage(v) { - this.searchForm.pageNumber = v; - this.getDataList(); + this.searchForm2.pageNumber = v; + this.getDataList2(); this.clearSelectAll(); }, changePageSize(v) { - this.searchForm.pageSize = v; - this.getDataList(); + this.searchForm2.pageSize = v; + this.getDataList2(); }, getDataList() { this.loading = true; diff --git a/src/views/your/sign-manage/exportColumn.js b/src/views/your/sign-manage/exportColumn.js index ee34655..d9e5ae7 100644 --- a/src/views/your/sign-manage/exportColumn.js +++ b/src/views/your/sign-manage/exportColumn.js @@ -63,7 +63,7 @@ export const childColumn = [ { title: "绗竴鍛�", - width: 118, + width: 120, align: "center", key: "sendDate" }, diff --git a/src/views/your/sign-manage/signManage.less b/src/views/your/sign-manage/signManage.less index 39903e3..676cd8d 100644 --- a/src/views/your/sign-manage/signManage.less +++ b/src/views/your/sign-manage/signManage.less @@ -16,9 +16,9 @@ text-align: center; } -// .Sign .ivu-table td { -// border-bottom: 0; -// } + .Sign .ivu-table td { + border-bottom: 0; + } .isshow { display: block; diff --git a/src/views/your/sign-manage/signManage.vue b/src/views/your/sign-manage/signManage.vue index 22e811a..b4ef75c 100644 --- a/src/views/your/sign-manage/signManage.vue +++ b/src/views/your/sign-manage/signManage.vue @@ -8,52 +8,37 @@ <Card> <Row class="operation"> <Date-picker v-model="value" @on-change="getDataByDate" value-format="yyyy-MM-dd" type="daterange" - placement="bottom-start" placeholder="璇烽�夋嫨鏃ユ湡" style="width: 240px;padding-left: 20px"> + placement="bottom-start" placeholder="璇烽�夋嫨鏃ユ湡" + style="width: 240px;padding-left: 20px;margin-right: 20px"> </Date-picker> + <Input v-model="carNo" suffix="ios-search" @on-change="getSign" placeholder="杈撳叆杞︾墝鍙锋悳绱�" clearable + style="width: 250px;margin-right: 20px"/> + <Input v-model="line" suffix="ios-search" @on-change="getSign" placeholder="杈撳叆鍖哄煙鎼滅储" clearable + style="width: 250px"/> + <Button @click="exportExcel" class="init-button export-button">瀵煎嚭鏁版嵁</Button> + <!-- <Button @click="exportAllExcel" class="init-button export-button">瀵煎嚭鍏ㄩ儴鏁版嵁</Button> --> <Button @click="init" icon="md-refresh" class="init-button">鍒锋柊</Button> <Button type="dashed" @click="openTip = !openTip">{{ openTip ? "鍏抽棴鎻愮ず" : "寮�鍚彁绀�" - }} + }} </Button> - <Input v-model="carNo" suffix="ios-search" @on-change="getSign" placeholder="杈撳叆杞︾墝鍙锋悳绱�" clearable - style="width: 250px" /> - <Button @click="exportExcel" class="init-button export-button">瀵煎嚭鏈〉鏁版嵁</Button> - <!-- <Button @click="exportAllExcel" class="init-button export-button">瀵煎嚭鍏ㄩ儴鏁版嵁</Button> --> - <div @click="switchnum = 1"> - <Button class="init-button export-button">鏃ョ鏀剁巼</Button> - </div> - <div @click="switchnum = 2"> - <Button class="init-button export-button">鏈堢鏀剁巼</Button> - </div> </Row> <Alert show-icon v-show="openTip"> 宸查�夋嫨 <span class="select-count">{{ selectList.length }}</span> 椤� <a class="select-clear" @click="clearSelectAll">娓呯┖</a> </Alert> - <!-- 鏃ョ鏀剁巼鐨勮〃 --> - <div v-show="switchnum === 1"> + <!-- 绛炬敹鐜囩殑琛� --> + <div> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" - :span-method="handleSpan" @on-sort-change="changeSort" @on-selection-change="changeSelect" height="600"></Table> + :span-method="handleSpan" @on-sort-change="changeSort" @on-selection-change="changeSelect" + height="615"></Table> </div> - <!-- 鏈堢鏀剁巼鐨勮〃 --> - <div v-show="switchnum === 2"> - <Table :loading="loading" border :columns="columnsMonth" :data="monthData" sortable="custom" - :span-method="handleSpan" @on-sort-change="changeSort" @on-selection-change="changeSelect" height="600"> - </Table> - </div> - <div v-show="switchnum === 1"> + <div> <Row type="flex" justify="end" class="page"> <Page :current="pageNum" :total="total" :page-size="pageSize" @on-change="changePage" - @on-page-size-change="changePageSize" :page-size-opts="[18, 36]" size="small" show-total show-elevator - show-sizer></Page> - </Row> - </div> - <div v-show="switchnum === 2"> - <Row type="flex" justify="end" class="page"> - <Page :current="pageNum" :total="totalmonth" :page-size="pageSize" @on-change="changePage" - @on-page-size-change="changePageSize" :page-size-opts="[18, 36]" size="small" show-total show-elevator - show-sizer></Page> + @on-page-size-change="changePageSize" :page-size-opts="[60, 120]" size="small" show-total show-elevator + show-sizer></Page> </Row> </div> </Card> @@ -62,30 +47,30 @@ <Modal :title="modalTitle" v-model="roleModalVisible" :mask-closable="false" :width="500"> <Form ref="carForm" :model="carForm" :label-width="80" :rules="carFormValidate"> <FormItem label="鍝佺墝" prop="brand"> - <Input v-model="carForm.brand" /> + <Input v-model="carForm.brand"/> </FormItem> <FormItem label="鍨嬪彿" prop="model"> - <Input v-model="carForm.model" /> + <Input v-model="carForm.model"/> </FormItem> <FormItem label="鎺掗噺" prop="displacement"> - <Input v-model="carForm.displacement" /> + <Input v-model="carForm.displacement"/> </FormItem> <Form-item label="璐疆骞翠唤"> <Row> <Col span="11"> - <Date-picker @on-change="change1" type="date" value="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" - v-model="carForm.buyYear"></Date-picker> + <Date-picker @on-change="change1" type="date" value="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + v-model="carForm.buyYear"></Date-picker> </Col> </Row> </Form-item> <FormItem label="鐗岀収" prop="carNo"> - <Input v-model="carForm.carNo" /> + <Input v-model="carForm.carNo"/> </FormItem> <FormItem label="鍔犳补鍗″彿" prop="addOilCode"> - <Input v-model="carForm.addOilCode" /> + <Input v-model="carForm.addOilCode"/> </FormItem> <FormItem label="杞﹁締缂栧彿" prop="code"> - <Input v-model="carForm.code" /> + <Input v-model="carForm.code"/> </FormItem> <FormItem label="鍙告満" prop="userId"> <Select v-model="carForm.userId" filterable> @@ -112,7 +97,7 @@ <Button @click="init" icon="md-refresh">鍒锋柊</Button> </Row> <Table :loading="loading" border :columns="columns2" :data="data2" ref="table" sortable="custom" - @on-sort-change="changeSort" @on-selection-change="changeSelect"> + @on-sort-change="changeSort" @on-selection-change="changeSelect"> </Table> @@ -134,13 +119,13 @@ </Select> </FormItem> <FormItem label="缂栧彿" prop="code"> - <Input v-model="equipmentForm.code" /> + <Input v-model="equipmentForm.code"/> </FormItem> <FormItem label="ip鍦板潃" prop="ip"> - <Input v-model="equipmentForm.ip" /> + <Input v-model="equipmentForm.ip"/> </FormItem> <FormItem label="绔彛鍙�" prop="port"> - <Input v-model="equipmentForm.port" /> + <Input v-model="equipmentForm.port"/> </FormItem> </Form> @@ -175,13 +160,13 @@ <Modal :title="modalTitle" v-model="carModalVisible" :mask-closable="false" :width="500" class="depModal"> <Form :label-width="85" ref="removeForm" :model="removeForm"> <FormItem label="绉婚櫎鍘熷洜" prop="removeReason"> - <Input v-model="removeForm.removeReason" /> + <Input v-model="removeForm.removeReason"/> </FormItem> </Form> <div v-show="dataType == 1" style="margin-top: 15px"> <div style="position: relative"> <Tree ref="depTree" :data="depData" :load-data="loadData" @on-toggle-expand="expandCheckDep" multiple - style="margin-top: 15px"></Tree> + style="margin-top: 15px"></Tree> <Spin size="large" fix v-if="depTreeLoading"></Spin> </div> </div> @@ -195,34 +180,21 @@ </template> <script> -import { - getAllPermissionList, - setDefaultRole, - editRolePerm, - initDepartment, - loadDepartment, - editRoleDep, -} from "@/api/index"; +import {editRoleDep, editRolePerm, getAllPermissionList, loadDepartment, setDefaultRole,} from "@/api/index"; import { - getAll, addCar, - getCarList, - editCar, - deleteCar, - getEquipment, addEquipment, - getUser, - getDriver, + deleteCar, deleteEquipment, - getSignList, - getLicense, - getSignByMonth, + editCar, + getDriver, + getEquipment, + getNewSignList, outExcel } from "@/api/open"; import util from "@/libs/util.js"; -import { childColumn, childData, childDataTwo, childColumnTwo, childColumnthree } from "./exportColumn" -import Vue from "vue" + export default { name: "car-manage", data() { @@ -249,7 +221,7 @@ searchForm: { // 鎼滅储妗嗗垵濮嬪寲瀵硅薄 pageNumber: 1, // 褰撳墠椤垫暟 - pageSize: 10, // 椤甸潰澶у皬 + pageSize: 60, // 椤甸潰澶у皬 sort: "createTime", // 榛樿鎺掑簭瀛楁 order: "desc", // 榛樿鎺掑簭鏂瑰紡 key: "", @@ -268,7 +240,7 @@ }, carFormValidate: { name: [ - { required: true, message: "瑙掕壊鍚嶇О涓嶈兘涓虹┖", trigger: "change" }, + {required: true, message: "瑙掕壊鍚嶇О涓嶈兘涓虹┖", trigger: "change"}, ], }, submitLoading: false, @@ -298,148 +270,29 @@ align: "center", }, { - title: "閰嶉�佸憳", - key: "name", + title: "鍖哄煙", + key: "line", width: 100, align: "center", }, - // { - // title: "骞存湀", - // key: "sendMonth", - // minWidth: 120, - // align: "center", - // }, { title: "01娈�", - // key: "oneBatch", + key: "oneBatch", minWidth: 140, align: "center", - children: [ - { - title: '鏃ユ湡', - align: 'center', - key: 'sendDate', - minWidth: 120, - className: 'no_border', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumn, - "show-header": false, - data: params.row.childone, - align: 'center', - }, - }), - ]) - }, - }, - { - title: '鏃ョ鏀剁巼', - align: 'center', - className: 'no_border', - minWidth: 120, - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumnTwo, - data: params.row.childone, - "show-header": false, - }, - }), - ]) - }, - }, - ] + }, { title: "02娈�", key: "twoBatch", minWidth: 140, align: "center", - children: [ - { - title: '鏃ユ湡', - align: 'center', - key: 'model', - minWidth: 120, - className: 'no_border', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumn, - data: params.row.childtwo, - "show-header": false, - }, - }), - ]) - }, - }, - { - title: '鏃ョ鏀剁巼', - align: 'center', - key: 'model', - minWidth: 120, - className: 'no_border', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumnTwo, - data: params.row.childtwo, - "show-header": false, - }, - }), - ]) - }, - }, - ] }, { title: "03娈�", key: "threeBatch", minWidth: 140, align: "center", - children: [ - { - title: '鏃ユ湡', - align: 'center', - key: 'model', - minWidth: 120, - className: 'no_border', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumn, - data: params.row.childthree, - "show-header": false, - }, - }), - ]) - }, - }, - { - title: '鏃ョ鏀剁巼', - align: 'center', - key: 'model', - minWidth: 120, - className: 'no_border', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumnTwo, - data: params.row.childthree, - "show-header": false, - }, - }), - ]) - }, - }, - ], }, { title: "04娈�", @@ -447,348 +300,19 @@ minWidth: 140, align: "center", tooltip: true, - children: [ - { - title: '鏃ユ湡', - align: 'center', - key: 'model', - minWidth: 120, - className: 'no_border', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumn, - data: params.row.childfour, - "show-header": false, - }, - }), - ]) - }, - }, - { - title: '鏃ョ鏀剁巼', - align: 'center', - key: 'model', - minWidth: 120, - className: 'no_border', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumnTwo, - data: params.row.childfour, - "show-header": false, - }, - }), - ]) - }, - }, - ] }, { title: "05娈�", key: "fiveBatch", minWidth: 140, align: "center", - children: [ - { - title: '鏃ユ湡', - align: 'center', - key: 'model', - minWidth: 120, - className: 'no_border', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumn, - data: params.row.childfive, - "show-header": false, - }, - }), - ]) - }, - }, - { - title: '鏃ョ鏀剁巼', - align: 'center', - key: 'model', - minWidth: 120, - className: 'no_border', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumnTwo, - data: params.row.childfive, - "show-header": false, - }, - }), - ]) - }, - }, - ] - }, - ], - columnsMonth: [ - { - type: "selection", - width: 60, - align: "center", }, { - type: "index", - title: "搴忓彿", - width: 80, - align: "center", - }, - { - title: "杞︾墝鍙�", - key: "carName", - width: 140, - align: "center", - }, - { - title: "鍙告満", - key: "userName", - width: 140, - align: "center", - }, - // { - // title: "閰嶉�佸憳", - // key: "name", - // width: 100, - // align: "center", - // }, - // { - // title: "骞存湀", - // key: "sendMonth", - // minWidth: 120, - // align: "center", - // }, - { - title: "01娈�", - width: 140, - align: "center", - children: [ - { - title: '鏈堜唤', - align: 'center', - key: 'sendDate', - width: 120, - className: 'no_border', - render: (h, params) => { - console.log(params.row.childone); - return h("div", [ - h("Table", { - props: { - columns: childColumn, - "show-header": false, - data: params.row.childone, - align: 'center', - }, - }), - ]) - }, - }, - { - title: '鏈堢鏀剁巼', - align: 'center', - key: 'proportion', - width: 120, - className: 'no_border Sign', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumnthree, - data: params.row.childone, - "show-header": false, - }, - }), - ]) - }, - } - ] - }, - { - title: "02娈�", - key: "twoBatch", + title: "鎬�(骞冲潎)绛炬敹鐜�", + key: "sendMonth", minWidth: 140, align: "center", - children: [ - { - title: '鏈堜唤', - align: 'center', - key: 'model', - width: 120, - className: 'no_border', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumn, - data: params.row.childtwo, - "show-header": false, - }, - }), - ]) - }, - }, - { - title: '鏈堢鏀剁巼', - align: 'center', - // key: 'proportion', - width: 120, - className: 'no_border Sign', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumnthree, - data: params.row.childtwo, - "show-header": false, - }, - }), - ]) - }, - } - ] - }, - { - title: "03娈�", - key: "threeBatch", - minWidth: 140, - align: "center", - children: [ - { - title: '鏈堜唤', - align: 'center', - key: 'model', - width: 120, - className: 'no_border', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumn, - data: params.row.childthree, - "show-header": false, - }, - }), - ]) - }, - }, - { - title: '鏈堢鏀剁巼', - align: 'center', - // key: 'model', - width: 120, - className: 'no_border Sign', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumnthree, - data: params.row.childthree, - "show-header": false, - }, - }), - ]) - }, - } - ], - }, - { - title: "04娈�", - key: "fourBatch", - minWidth: 140, - align: "center", - tooltip: true, - children: [ - { - title: '鏈堜唤', - align: 'center', - key: 'model', - width: 120, - className: 'no_border', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumn, - data: params.row.childfour, - "show-header": false, - }, - }), - ]) - }, - }, - { - title: '鏈堢鏀剁巼', - align: 'center', - // key: 'model', - width: 120, - className: 'no_border Sign', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumnthree, - data: params.row.childfour, - "show-header": false, - }, - }), - ]) - }, - } - ] - }, - { - title: "05娈�", - key: "fiveBatch", - minWidth: 140, - align: "center", - children: [ - { - title: '鏈堜唤', - align: 'center', - key: 'model', - width: 120, - className: 'no_border', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumn, - data: params.row.childfive, - "show-header": false, - }, - }), - ]) - }, - }, - { - title: '鏈堢鏀剁巼', - align: 'center', - // key: 'model', - width: 120, - className: 'no_border Sign', - render: (h, params) => { - return h("div", [ - h("Table", { - props: { - columns: childColumnthree, - data: params.row.childfive, - "show-header": false, - }, - }), - ]) - }, - } - ] - }, + } ], columns2: [ { @@ -895,15 +419,15 @@ render: (h, params) => { return h("div", [ h( - "a", - { - on: { - click: () => { - this.editEquipment(params.row); + "a", + { + on: { + click: () => { + this.editEquipment(params.row); + }, }, }, - }, - "缂栬緫" + "缂栬緫" ), h("Divider", { props: { @@ -911,15 +435,15 @@ }, }), h( - "a", - { - on: { - click: () => { - this.removeEquipment(params.row); + "a", + { + on: { + click: () => { + this.removeEquipment(params.row); + }, }, }, - }, - "鍒犻櫎" + "鍒犻櫎" ), ]); }, @@ -945,99 +469,108 @@ // 椤电爜 pageNum: 1, // 姣忛〉鏉℃暟 - pageSize: 36, + pageSize: 60, // 杞︾墝鍙� carNo: "", + // 绾胯矾 + line: "", // 寮�濮嬫棩鏈� beginTime: "", // 缁撴潫鏃ユ湡 endTime: "", // 鎸夋湀鏌ヨ鐨刣ata - monthData: [], + // monthData: [], // 瀵煎嚭鐨勬暟鎹� exportData: "", - // 鏃� 鏈堢鏀剁巼涓ゅ紶琛ㄧ殑鍒囨崲 - switchnum: 1 + dateOption: { + disabledDate(date) { + const now = new Date(); + const year = now.getFullYear(); + const month = now.getMonth(); + return date.getFullYear() !== year || date.getMonth() !== month; + } + } }; }, + computed: { + firstDate() { + let y = new Date().getFullYear(); //鑾峰彇骞翠唤 + let m = new Date().getMonth() + 1; //鑾峰彇鏈堜唤 + let d = '01'; + m = m < 10 ? '0' + m : m; //鏈堜唤琛� 0 + return [y, m, d].join('-') + }, + lastDate() { + let y = new Date().getFullYear(); //鑾峰彇骞翠唤 + let m = new Date().getMonth() + 1; //鑾峰彇鏈堜唤 + let d = new Date(y, m, 0).getDate(); //鑾峰彇褰撴湀鏈�鍚庝竴鏃� + m = m < 10 ? '0' + m : m; //鏈堜唤琛� 0 + d = d < 10 ? '0' + d : d; //鏃ユ暟琛� 0 + return [y, m, d].join('-') + }, + }, created() { + this.beginTime = this.firstDate + this.endTime = this.lastDate + this.value = [this.firstDate, this.lastDate] //璇锋眰鏁版嵁 this.getSign() - // 鎸夋湀璇锋眰鐨勬暟鎹� - this.getSignByMonthList() }, methods: { getSign() { - getSignList(this.pageNum, this.pageSize, this.carNo, this.beginTime, this.endTime).then(result => { + this.loading = true; + getNewSignList(this.pageNum, this.pageSize, this.carNo, this.beginTime, this.endTime, this.line, '', '', '').then(result => { this.loading = false; if (result.success) { - this.data = result.result.records; + let reg = /\d/g; + this.data = result.result.records.map(v => { + return { + ...v, + sendMonth: v.sendMonth.length >= 6 ? v.sendMonth.slice(0, 5) + '%' : v.sendMonth, + proportion: v.proportion.length >= 6 ? v.proportion.slice(0, 5) + '%' : v.proportion, + line: v.line.replace(reg, '').replace('杞�', '') + } + }) this.total = result.result.total; this.data = this.merge(this.data) - // console.log(this.data); + } }) }, - getSignByMonthList() { - getSignByMonth(this.pageNum, this.pageSize, this.carNo, 3).then(result => { - this.loading = false; - if (result.success) { - this.dataMonth = result.result.records - this.totalmonth = result.result.total; - this.monthData = this.merge(this.dataMonth) - // console.log(this.monthData); + merge(data) { + return Object.values(data.reduce((acc, cur) => { + if (!acc[cur.userName]) { + acc[cur.userName] = [cur]; + } else { + acc[cur.userName].push(cur); } - }) - }, - merge(index) { - let dataInfo = {}; - index.forEach((item, index) => { - let { userName, carName, sendMonth, name } = item; - if (!dataInfo[userName]) { - dataInfo[userName] = { - userName, - carName, - sendMonth, - name, - childone: [], - childtwo: [], - childthree: [], - childfour: [], - childfive: [] + return acc; + }, {})).map(group => { + return group.reduce((acc, cur) => { + acc.sendMonth = cur.sendMonth; + acc.carName = cur.carName; + acc.line = cur.line + if (cur.oneBatch) { + acc.oneBatch = cur.proportion; } - } - if (item.batch === "01娈�") { - dataInfo[userName].childone.push(item); - } - if (item.batch === "02娈�") { - dataInfo[userName].childtwo.push(item); - } - if (item.batch === "03娈�") { - dataInfo[userName].childthree.push(item); - } - if (item.batch === "04娈�") { - dataInfo[userName].childfour.push(item); - } - if (item.batch === "05娈�") { - dataInfo[userName].childfive.push(item); - } + if (cur.twoBatch) { + acc.twoBatch = cur.proportion; + } + if (cur.threeBatch) { + acc.threeBatch = cur.proportion; + } + if (cur.fourBatch) { + acc.fourBatch = cur.proportion; + } + if (cur.fiveBatch) { + acc.fiveBatch = cur.proportion; + } + return acc; + }, {userName: group[0].userName}); }); - let list = Object.values(dataInfo); - list.forEach(item => { - let arr = new Array(5 - item.childone.length).fill({ proportion: "" }) - let arr1 = new Array(5 - item.childtwo.length).fill({ proportion: "" }) - let arr2 = new Array(5 - item.childthree.length).fill({ proportion: "" }) - let arr3 = new Array(5 - item.childfour.length).fill({ proportion: "" }) - let arr4 = new Array(5 - item.childfive.length).fill({ proportion: "" }) - item.childone = [...item.childone, ...arr] - item.childtwo = [...item.childtwo, ...arr1] - item.childthree = [...item.childthree, ...arr2] - item.childfour = [...item.childfour, ...arr3] - item.childfive = [...item.childfive, ...arr4] - }) - return list + }, - handleSummary({ columns, data }) { + handleSummary({columns, data}) { const sums = {}; columns.forEach((column, index) => { const key = column.key; @@ -1074,8 +607,8 @@ }, // 瀵煎嚭涓篹xcel exportExcel() { - outExcel(this.pageNum, this.pageSize, this.carNo, this.beginTime, this.endTime).then((res) => { - let blob = new Blob([res], { type: 'application/vnd.ms-excel' }); + outExcel(this.pageNum, this.pageSize, this.carNo, this.beginTime, this.endTime, this.line).then((res) => { + let blob = new Blob([res], {type: 'application/vnd.ms-excel'}); let url = URL.createObjectURL(blob); const link = document.createElement('a'); //鍒涘缓a鏍囩 link.href = url; @@ -1084,18 +617,7 @@ URL.revokeObjectURL(url); }) }, - exportAllExcel() { - outExcel().then(res => { - let blob = new Blob([res], { type: 'application/vnd.ms-excel' }); - let url = URL.createObjectURL(blob); - const link = document.createElement('a'); //鍒涘缓a鏍囩 - link.href = url; - link.download = '鍏ㄩ儴閰嶉�佷俊鎭�.xlsx'; //閲嶅懡鍚嶆枃浠� - link.click(); - URL.revokeObjectURL(url); - }) - }, - handleSpan({ row, column, rowIndex, columnIndex }) { + handleSpan({row, column, rowIndex, columnIndex}) { if (rowIndex || !rowIndex) { return {} } @@ -1107,7 +629,7 @@ this.getDataList(); // 鑾峰彇鎵�鏈夎彍鍗曟潈闄愭爲 }, - renderContent(h, { root, node, data }) { + renderContent(h, {root, node, data}) { let icon = ""; if (data.level == 0) { icon = "ios-navigate"; @@ -1121,57 +643,57 @@ icon = "md-radio-button-off"; } return h( - "span", - { - style: { - display: "inline-block", - cursor: "pointer", - }, - on: { - click: () => { - if (data.status == -1) { - return; - } - data.checked = !data.checked; + "span", + { + style: { + display: "inline-block", + cursor: "pointer", + }, + on: { + click: () => { + if (data.status == -1) { + return; + } + data.checked = !data.checked; + }, }, }, - }, - [ - h("span", [ - h("Icon", { - props: { - type: icon, - size: "16", - }, - style: { - "margin-right": "8px", - "margin-bottom": "3px", - }, - }), - h("span", data.title), - ]), - ] + [ + h("span", [ + h("Icon", { + props: { + type: icon, + size: "16", + }, + style: { + "margin-right": "8px", + "margin-bottom": "3px", + }, + }), + h("span", data.title), + ]), + ] ); }, changePage(v) { + this.loading = true; this.pageNum = v this.getSign(); - this.getSignByMonthList() this.clearSelectAll(); }, changePageSize(v) { + this.loading = true; this.pageSize = v; this.getSign(); - this.getSignByMonthList() }, getAllUser() { - getDriver({ type: 0 }).then((res) => { + getDriver({type: 0}).then((res) => { if (res.success) { this.userList = res.result; } }); //this.type.type=1; - getDriver({ type: 1 }).then((res) => { + getDriver({type: 1}).then((res) => { if (res.success) { this.driverList = res.result; } @@ -1196,25 +718,19 @@ m = m < 10 ? ('0' + m) : m let d = date.getDate() d = d < 10 ? ('0' + d) : d - const time = y + '-' + m + '-' + d; - return time + return y + '-' + m + '-' + d }, //鏍规嵁閫夋嫨鐨勬棩鏈熻繑鍥炴暟鎹� getDataByDate() { this.loading = true; if (this.value[0] != "" && this.value[1] != "") { + console.log(this.value) this.beginTime = this.selectDate(this.value[0]); this.endTime = this.selectDate(this.value[1]); - this.page = false; } else { - // var date = new Date(); - // this.endTime = this.selectDate(date); - // this.value[1] = this.endTime; - // date.setDate(1); - // this.value[0] = date; - // this.beginTime = this.selectDate(date); - this.beginTime = ""; - this.endTime = "" + this.beginTime = this.firstDate; + this.endTime = this.lastDate; + this.value = [this.firstDate, this.lastDate] } this.getSign(); }, @@ -1429,7 +945,7 @@ content: "鎮ㄧ‘璁よ鍒犻櫎鍚� ", loading: true, onOk: () => { - deleteCar({ ids: v.id }).then((res) => { + deleteCar({ids: v.id}).then((res) => { this.$Modal.remove(); if (res.success) { this.clearSelectAll(); @@ -1446,7 +962,7 @@ content: "鎮ㄧ‘璁よ鍒犻櫎鍚� ", loading: true, onOk: () => { - deleteEquipment({ ids: v.id }).then((res) => { + deleteEquipment({ids: v.id}).then((res) => { this.$Modal.remove(); if (res.success) { this.clearSelectAll(); @@ -1506,7 +1022,7 @@ ids += e.id + ","; }); ids = ids.substring(0, ids.length - 1); - deleteCar({ ids: ids }).then((res) => { + deleteCar({ids: ids}).then((res) => { this.$Modal.remove(); if (res.success) { this.$Message.success("鍒犻櫎鎴愬姛"); @@ -1601,7 +1117,7 @@ this.permModalVisible = false; }, loadData(item, callback) { - loadDepartment(item.id, { openDataFilter: false }).then((res) => { + loadDepartment(item.id, {openDataFilter: false}).then((res) => { if (res.success) { res.result.forEach(function (e) { e.selected = false; -- Gitblit v1.9.1