From 3342e77756618c7b6ee47dbb309401696d4d72d1 Mon Sep 17 00:00:00 2001 From: kongdeqiang <123456> Date: 星期一, 05 六月 2023 18:07:53 +0800 Subject: [PATCH] 修改前端页面 --- src/components/page/parkticket/index.vue | 210 ++++ src/components/page/user/index.vue | 8 vue.config.js | 14 package-lock.json | 88 + src/components/page/zfticket/index.vue | 188 ++++ src/components/page/EditParkNum.vue | 6 src/components/page/Login.vue | 2 src/components/page/ticket/word-view/index.vue | 46 + src/libs/word.js | 89 + src/components/page/Index2.vue | 57 src/components/page/enterpark/index.vue | 145 +++ src/components/page/park/index2.vue | 2 src/components/page/outPark/index.vue | 371 +++---- src/components/page/whiteList/index.vue | 8 src/assets/js/ByUtils.js | 14 src/components/page/street/index.vue | 18 src/components/page/park/index.vue | 2 src/components/page/Index.vue | 2 src/components/page/costRule/index.vue | 8 src/components/common/Sidebar.vue | 155 +- src/libs/dialogDrag.js | 75 + src/router/index.js | 61 src/components/page/ticket/index.vue | 430 ++++---- /dev/null | 155 --- src/components/page/IndexTest.vue | 11 src/components/page/orderRecord/index.vue | 10 src/components/page/Index4.vue | 198 ++++ package.json | 6 src/components/page/ticket/ticket-form.vue | 222 ++++ src/components/page/violationType/index.vue | 6 src/components/page/ticket/picture-form.vue | 74 + 31 files changed, 1,953 insertions(+), 728 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5a3f3ef..d677d25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2636,6 +2636,11 @@ "@xtuc/long": "4.2.2" } }, + "@xmldom/xmldom": { + "version": "0.8.8", + "resolved": "https://mirrors.cloud.tencent.com/npm/@xmldom/xmldom/-/xmldom-0.8.8.tgz", + "integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q==" + }, "@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -5495,6 +5500,37 @@ "buffer-indexof": "^1.0.0" } }, + "docx-preview": { + "version": "0.1.15", + "resolved": "https://mirrors.cloud.tencent.com/npm/docx-preview/-/docx-preview-0.1.15.tgz", + "integrity": "sha512-qeYNwA+HF0e+GLxH/yltGdaBVQHoQrscfCwR2p7fRGCMjPBohdd36L7xDi1wdErS3ZnV/uh4kx5+tXOXgzq/dQ==", + "requires": { + "jszip": ">=3.0.0" + } + }, + "docxtemplater": { + "version": "3.37.9", + "resolved": "https://mirrors.cloud.tencent.com/npm/docxtemplater/-/docxtemplater-3.37.9.tgz", + "integrity": "sha512-0FYopqsEe8dpN2mILn8qINzXXXZ25qnbXYVJtgjxar3VI0IfUd7nPfZGRffWvAKgLQupPs2dGJDzjRI60TmD8A==", + "requires": { + "@xmldom/xmldom": "^0.8.7" + } + }, + "docxtemplater-image-module-free": { + "version": "1.1.1", + "resolved": "https://mirrors.cloud.tencent.com/npm/docxtemplater-image-module-free/-/docxtemplater-image-module-free-1.1.1.tgz", + "integrity": "sha512-aWOzVQN7ggDYjfoy3pTTNrcrZ7/CJrQcI9cT+hmyHE6nRLR67nt5yPFPe9hm9VWbfYIED2fi+3itOnF0TE/RWQ==", + "requires": { + "xmldom": "^0.1.27" + }, + "dependencies": { + "xmldom": { + "version": "0.1.31", + "resolved": "https://mirrors.cloud.tencent.com/npm/xmldom/-/xmldom-0.1.31.tgz", + "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==" + } + } + }, "dom-converter": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", @@ -6197,6 +6233,11 @@ } } } + }, + "file-saver": { + "version": "2.0.5", + "resolved": "https://mirrors.cloud.tencent.com/npm/file-saver/-/file-saver-2.0.5.tgz", + "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==" }, "file-type": { "version": "9.0.0", @@ -7215,6 +7256,11 @@ "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", "dev": true }, + "immediate": { + "version": "3.0.6", + "resolved": "https://mirrors.cloud.tencent.com/npm/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" + }, "import-cwd": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", @@ -7822,6 +7868,22 @@ "verror": "1.10.0" } }, + "jszip": { + "version": "3.10.1", + "resolved": "https://mirrors.cloud.tencent.com/npm/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "requires": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "jszip-utils": { + "version": "0.1.0", + "resolved": "https://mirrors.cloud.tencent.com/npm/jszip-utils/-/jszip-utils-0.1.0.tgz", + "integrity": "sha512-tBNe0o3HAf8vo0BrOYnLPnXNo5A3KsRMnkBFYjh20Y3GPYGfgyoclEMgvVchx0nnL+mherPi74yLPIusHUQpZg==" + }, "keyv": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.0.1.tgz", @@ -7893,6 +7955,14 @@ "resolved": "https://mirrors.cloud.tencent.com/npm/lib-flexible/-/lib-flexible-0.3.2.tgz", "integrity": "sha1-BvWnSDIxSi01wSA5vJw8otrqpCY=", "dev": true + }, + "lie": { + "version": "3.3.0", + "resolved": "https://mirrors.cloud.tencent.com/npm/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "requires": { + "immediate": "~3.0.5" + } }, "lighthouse-logger": { "version": "1.2.0", @@ -9412,6 +9482,21 @@ "version": "3.4.0", "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==" + } + } + }, + "pizzip": { + "version": "3.1.4", + "resolved": "https://mirrors.cloud.tencent.com/npm/pizzip/-/pizzip-3.1.4.tgz", + "integrity": "sha512-08yol1Of5Og1E0a1R56c+Z1jVkvfTEBUouwG9WYwCqpj8BjdcpEpLgZsrdLFNQYRgtxK0OOe0JpmBWJdrPr6Dg==", + "requires": { + "pako": "^2.1.0" + }, + "dependencies": { + "pako": { + "version": "2.1.0", + "resolved": "https://mirrors.cloud.tencent.com/npm/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" } } }, @@ -11405,8 +11490,7 @@ "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" }, "setprototypeof": { "version": "1.1.1", diff --git a/package.json b/package.json index 06d7052..700a450 100644 --- a/package.json +++ b/package.json @@ -11,12 +11,18 @@ "appium-chromedriver": "^4.11.0", "axios": "^0.18.0", "babel-polyfill": "^6.26.0", + "docx-preview": "^0.1.15", + "docxtemplater": "^3.37.9", + "docxtemplater-image-module-free": "^1.1.1", "echarts": "^4.9.0", "element-ui": "^2.13.1", + "file-saver": "^2.0.5", "jquery": "^3.5.1", + "jszip-utils": "^0.1.0", "mavon-editor": "^2.6.17", "moment": "^2.29.4", "node-sass": "^4.14.1", + "pizzip": "^3.1.4", "qs": "^6.9.4", "sass-loader": "^10.0.4", "v-distpicker": "^1.2.1", diff --git a/src/assets/js/ByUtils.js b/src/assets/js/ByUtils.js index b885c52..c296143 100644 --- a/src/assets/js/ByUtils.js +++ b/src/assets/js/ByUtils.js @@ -111,8 +111,17 @@ vm.$router.push({'path': '/login'}); vm.$alert('浼氳瘽缁撴潫锛岃閲嶆柊鐧诲綍', {'title': '鎻愮ず', 'type': 'warning', 'center': true, 'showClose': false}); }else{ - vm.$alert('鎿嶄綔澶辫触锛�' + data.message, {'title': '鎻愮ず', 'type': 'warning', 'center': true, 'showClose': false}); - } + let a = ''; + if(response.data){ + if(response.data.msg){ + a=response.data.msg + }else { + a='鏈嶅姟鍣ㄦ晠闅�' + } + }else { + a="鏁版嵁閿欒" + } + vm.$alert(a , {'title': '鎻愮ず', 'type': 'warning', 'center': true, 'showClose': false}); } } }).catch((e) => { vm.$loading().close(); @@ -265,6 +274,7 @@ }).then((response) => { //vm.$loading().close(); let data = response.data; + console.log(response) if (data && data.code==0) { callBackFunction(data); } else { diff --git a/src/components/common/Sidebar.vue b/src/components/common/Sidebar.vue index df487fa..17ede75 100644 --- a/src/components/common/Sidebar.vue +++ b/src/components/common/Sidebar.vue @@ -46,80 +46,103 @@ return { collapse: false, items: [ - { + { + id:1, + icon: 'el-icon-folder-opened', + indexUrl: '1', + name: '绯荤粺绠$悊', + children:[ + { id:1, icon: 'el-icon-user-solid', name: '浜哄憳绠$悊', + parentId: 1, indexUrl: 'user' - }, - { - id:2, - icon: 'el-icon-place', - name: '鍋滆溅鍦虹鐞�', - indexUrl: 'park' - }, - { - id:3, + } + ] + }, + { + id:2, + icon: 'el-icon-folder-opened', + indexUrl: '2', + name: '鏅烘収娉婅溅绠$悊', + children:[ + { + icon: 'el-icon-document', + name: '鍋滆溅鍦虹鐞�', + parentId: 2, + indexUrl: "park" + }, + { + icon: 'el-icon-document', + name: '鏀惰垂瑙勫垯绠$悊', + parentId: 2, + indexUrl: "costRule" + }, + { + icon: 'el-icon-document', + name: '杞﹁締鍏ュ満绠$悊', + parentId: 2, + indexUrl: "enterPark" + }, + { + icon: 'el-icon-document', + name: '杞﹁締鍑哄満绠$悊', + parentId: 2, + indexUrl: "outPark" + }, + { + icon: 'el-icon-document', + name: '鐧藉悕鍗曠鐞�', + parentId: 2, + indexUrl: "whiteList" + }, + { + icon: 'el-icon-document', + name: '娉婅溅鍙戠エ绠$悊', + parentId: 2, + indexUrl: "parkticket" + }, + { + icon: 'el-icon-document', + name: '璁㈠崟缁熻', + parentId: 2, + indexUrl: "orderRecord" + }, + ] + }, + { + id:3, + icon: 'el-icon-folder-opened', + indexUrl: '3', + name: '鏅烘収缃氭病绠$悊', + children:[ + { icon: 'el-icon-document', name: '杩濈珷绫诲瀷绠$悊', - indexUrl: 'violationType' - }, - // { - // id:4, - // icon: 'el-icon-document', - // name: '璁㈠崟绠$悊', - // indexUrl: 'outPark' - // }, - // { - // id:5, - // icon: 'el-icon-document', - // name: '缃氬崟绠$悊', - // indexUrl: 'ticket' - // }, - { - id:6, - icon: 'el-icon-document-checked', - name: '鐧藉悕鍗�', - indexUrl: 'whiteList' - }, - { - id:7, - icon: 'el-icon-s-fold', + parentId: 3, + indexUrl: "violationType" + }, + { + icon: 'el-icon-document', name: '琛楅亾绠$悊', - indexUrl: 'street' - }, - { - id:8, - icon: 'el-icon-document', - name: '鏀惰垂瑙勫垯绠$悊', - indexUrl: 'costRule' + parentId: 3, + indexUrl: "street" + }, + { + icon: 'el-icon-document', + name: '缃氬崟绠$悊', + parentId: 3, + indexUrl: "ticket" + }, + { + icon: 'el-icon-document', + name: '缃氭病鍙戠エ绠$悊', + parentId: 3, + indexUrl: "zfticket" + }, + ] }, - { - id:9, - icon: 'el-icon-document', - name: '璁㈠崟缁熻', - indexUrl: 'orderRecord' - }, - // { - // id:3, - // icon: 'el-icon-folder-opened', - // indexUrl: '2', - // name: '缁熻鎶ヨ〃', - // children:[ - // { - // icon: 'el-icon-document', - // name: '鏅�氬憳宸ユ湀搴﹁瘎浠�', - // parentId: 3, - // indexUrl: "puTongYuanGongStatistic" - // }, - // { - // icon: 'el-icon-document', - // name: '鑱岃兘閮ㄩ棬璇勪环缁撴灉', - // parentId: 3, - // indexUrl: "leaderStatistic" - // } - // ] - // } ] } }, diff --git a/src/components/page/EditParkNum.vue b/src/components/page/EditParkNum.vue index 7a9c1f1..1678bd5 100644 --- a/src/components/page/EditParkNum.vue +++ b/src/components/page/EditParkNum.vue @@ -68,13 +68,13 @@ num:'', carNum:'' }, - urlPath:this.$systemconfig.basePath + '/park/', + urlPath:this.$systemconfig.basePath + '/ffzf/park/', table1:[], table2:[], } }, mounted() { - this.$byutil.postData(this, this.$systemconfig.basePath+'/park/findAll', this.formData, res => { + this.$byutil.postData(this, this.urlPath+'findAll', this.formData, res => { this.table1 = res.data; }) }, @@ -150,4 +150,4 @@ height: 500px; } -</style> \ No newline at end of file +</style> diff --git a/src/components/page/Index.vue b/src/components/page/Index.vue index 74c00e6..118392d 100644 --- a/src/components/page/Index.vue +++ b/src/components/page/Index.vue @@ -74,7 +74,7 @@ cs[cs_arr[i].split('=')[0]] = cs_arr[i].split('=')[1] } this.ticketId = cs.id; - this.$byutil.postData(this, this.$systemconfig.basePath + '/ticket/findById', {id:cs.id}, res => { + this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/ticket/findById', {id:cs.id}, res => { this.statisticData = res.data; }) }, diff --git a/src/components/page/Index2.vue b/src/components/page/Index2.vue index d431dc7..a5ed5f6 100644 --- a/src/components/page/Index2.vue +++ b/src/components/page/Index2.vue @@ -37,14 +37,22 @@ <el-button class="jiaofei-btn" type="primary" @click="pay()" :loading="payFlag">鍘荤即璐�</el-button> </el-form-item> </el-form> -<!-- <el-form label-width="100px" label-position="left">--> -<!-- <el-form-item label="璇疯緭鍏ユ墜鏈哄彿" style="margin-left: 5px;">--> -<!-- <el-input v-model="carNo" placeholder="璇疯緭鍏ユ墜鏈哄彿"></el-input>--> -<!-- </el-form-item>--> -<!-- <el-form-item style="display: flex;justify-content: center;margin-top: 2px" label-width="0">--> -<!-- <el-button class="jiaofei-btn" type="primary" @click="noCarOut()" v-show="showFlag">鏃犵墝鍑哄満缂磋垂</el-button>--> -<!-- </el-form-item>--> -<!-- </el-form>--> + <el-form + class="carSearch" + label-position="left"> + <el-form-item + class='formLabel' + style="display: flex; + flex-direction: column;align-items: center;justify-content: center" + label="鏃� 鐗� 杞� 杈� 鏌� 璇�"> + <el-input prefix-icon="el-icon-search" style="margin-top: 20px;border: solid 1px #ccc!important;" v-model="carNo" placeholder="璇疯緭鍏ユ墜鏈哄彿"></el-input> + </el-form-item> + <el-form-item class="weizhang-footer-box" style="display: flex;justify-content: center;margin-top: 5.498vh" label-width="0"> + <el-button + style="borderColor:'none';background:#121215e0 " + class="jiaofei-btn" type="primary" @click="noCarOut()" v-show="showFlag">鏌ヨ</el-button> + </el-form-item> + </el-form> </div> @@ -113,26 +121,18 @@ }, noCarOut(){ if(this.carNo){ - this.$byutil.postData(this, this.$systemconfig.basePath + '/outpark/outPark2', {code2:this.code2,carNo:this.carNo}, res => { - if(res.success){ - this.outParkId = res.data.id; - this.pay(); - this.showFlag = false; - }else{ - this.$message({ - message: res.msg, type: 'error', duration:2000, - }); + this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/car/outParkByPhone', {code2:this.code2,carNo:this.carNo}, res => { + if(res.code===0){ + this.statisticData = res.data; + this.outParkId = this.statisticData.id; } - }) }else{ this.$message({ message: '璇疯緭鍏ユ墜鏈哄彿', type: 'error', - duration:2000, }); } - }, } } @@ -245,4 +245,21 @@ .weizhang-main-bootom{ margin-top: 0.333rem /* 25/75 */; } + .formLabel{ + ::v-deep .el-form-item__label{ + font-size: 18px; + } + ::v-deep el-input{ + border: solid 1px #ccc!important; + + } + + } + .carSearch{ + border:solid 1px #ccc; + margin-top: 15%; + border-radius: 4%; + box-shadow: 0px 0px 0px 10px; + + } </style> diff --git a/src/components/page/Index3.vue b/src/components/page/Index3.vue deleted file mode 100644 index b6c6baf..0000000 --- a/src/components/page/Index3.vue +++ /dev/null @@ -1,195 +0,0 @@ -<template> - <div class="weizhang-box"> - <!--<div class="weizhang-header">--> - <!--<div class="iconfont leftjiantou"></div>--> - <!--<div class="text"><h1>宄板嘲鐭垮尯缁煎悎琛屾斂鎵ф硶灞�</h1></div>--> - <!--<div class="right"></div>--> - <!--</div>--> - <div class="weizhang-main-box"> - <div class="weizhang-main-top"> - <img class="logoPhone" src="../../assets/images/logoImg.png" alt=""> - <!--<span class="money">锟{this.statisticData.price}}</span>--> - <span class="weizhang">鏃犵墝鍋滆溅</span> - </div> - <div class="weizhang-main-bootom"> - <div class="weizhang-main-form"> - <el-form label-width="100px" :model="statisticData" label-position="left"> - <el-form-item label="璇疯緭鍏ユ墜鏈哄彿" style="margin-left: 5px;"> - <el-input v-model="statisticData.carNo" placeholder="璇疯緭鍏ユ墜鏈哄彿"></el-input> - </el-form-item> - <el-form-item style="display: flex;justify-content: center;margin-top: 4.498vh" label-width="0"> - <el-button class="jiaofei-btn" type="primary" @click="pay()" v-show="showFlag">纭杩涘叆</el-button> - </el-form-item> - </el-form> - </div> - </div> - </div> - - </div> -</template> - -<script> - export default { - name: 'dashboard', - data() { - return { - outParkId:"", - statisticData:{ - carNo:"" - }, - showFlag:true, - status3:0, - code2:"", - } - }, - created(){ - var url = window.location.href; - var cs = url.split('?')[1]; - var cs_arr = cs.split('&'); - var cs={}; - for(var i=0;i<cs_arr.length;i++){ - cs[cs_arr[i].split('=')[0]] = cs_arr[i].split('=')[1] - } - this.code2 = cs.code; - //this.outParkId = cs.code; - // this.$byutil.postData(this, this.$systemconfig.basePath + '/outPark/findByBarrierCode', {code:cs.code}, res => { - // this.statisticData = res.obj; - // this.outParkId = this.statisticData.id; - // this.status3 = this.statisticData.status3; - // if(this.status3==1){ - // this.$message({ - // message: '鎮ㄦ湁杩濈珷鏈鐞嗭紝璇峰厛澶勭悊鎴栬仈绯诲仠杞﹀満绠$悊浜哄憳', - // type: 'error', - // duration:5000, - // }); - // } - // }) - }, - methods: { - pay(){ - if(this.statisticData.carNo){ - this.$byutil.postData(this, this.$systemconfig.basePath + '/outPark/enterPark2', {code2:this.code2,carNo:this.statisticData.carNo}, res => { - this.$message({ - message: '璇锋眰鎴愬姛', - type: 'success', - duration:5000, - }); - this.showFlag = false; - }) - }else{ - this.$message({ - message: '璇疯緭鍏ユ墜鏈哄彿', - type: 'error', - duration:2000, - }); - } - // if(this.status3==1){ - // this.$message({ - // message: '鎮ㄦ湁杩濈珷鏈鐞嗭紝璇峰厛澶勭悊鎴栬仈绯诲仠杞﹀満绠$悊浜哄憳', - // type: 'error', - // duration:5000, - // }); - // return; - // } - // this.$byutil.postData(this, this.$systemconfig.basePath + '/ffPay/park', {id:this.outParkId}, res => { - // this.$message({ - // message: '10绉掑悗鑷姩璺宠浆鍒版敮浠橀〉闈紝闃叉鍐呭缃戞暟鎹悓姝ュ欢杩燂紝璇风◢绛�', - // type: 'success', - // duration:10000, - // }); - // setTimeout(function(){window.location.href = res.obj;},10000); - // this.showFlag = false; - // }) - } - } - } - -</script> - - -<style lang="scss"> - .weizhang-main-bootom{ - .el-input__inner{ - border:none; - } - .el-form-item__label{ - color: #999999; - } - } - -</style> -<style lang="scss" scoped> - h1,h2,h3,h4,h5{ - font-family: '鑻规柟 涓瓑'; - font-weight: normal; - } - .weizhang-header{ - display: flex; - height: 12.8vw /* 96/7.5 */; - align-items: center; - border-bottom:1px solid rgba(154,154,154,0.2); - .text{ - flex: 1; - text-align: center; - h1{ - font-size: 2.699vh /* 36/13.34 */; - } - } - .right{ - width: 6.747vh /* 90/13.34 */; - } - .leftjiantou{ - font-size: 5.33vw; - width: 6.747vh /* 90/13.34 */; - display: flex; - justify-content: center; - align-items: center; - } - } - .weizhang-main-box{ - width: 100%; - display: flex; - flex-direction: column; - padding:5.33vw /* 40/7.5 */; - } - .weizhang-main-top{ - height: 22.489vh /* 300/13.34 */; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - .money{ - font-size: 6.93vw /* 52/7.5 */; - font-weight: 550; - } - .weizhang{ - font-size: 4.8vw /* 36/7.5 */; - margin-top:1.33vw /* 10/7.5 */; - } - } - .weizhang-main-form{ - } - .weizhang-tiaokuan{ - margin-top: 2.67vw /* 20/7.5 */; - h1{ - font-size:3.2vw /* 24/7.5 */; - color: #999999; - text-indent: 2.5em; - line-height: 2; - } - } - .jiaofei-btn{ - width: 64.53vw /* 484/7.5 */; - border-radius: 5.33vw /* 40/7.5 */; - background-image: linear-gradient(to right,#33b1fe,#0679dc); - } - - .logoPhone{ - margin-top: 0.67vw; - width: 20vw /* 180/7.5 */; - height: 20vw /* 180/7.5 */; - } - .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item { - margin-bottom: 10px; - } -</style> diff --git a/src/components/page/Index4.vue b/src/components/page/Index4.vue new file mode 100644 index 0000000..081de05 --- /dev/null +++ b/src/components/page/Index4.vue @@ -0,0 +1,198 @@ +<template> + <div class="weizhang-box"> + <!--<div class="weizhang-header">--> + <!--<div class="iconfont leftjiantou"></div>--> + <!--<div class="text"><h1>宄板嘲鐭垮尯缁煎悎琛屾斂鎵ф硶灞�</h1></div>--> + <!--<div class="right"></div>--> + <!--</div>--> + <div class="weizhang-main-box"> + <div class="weizhang-main-top"> + <img class="logoPhone" src="../../assets/images/logoImg.png" alt=""> + <span class="weizhang">鏃犵墝杞﹁締鍏ュ満</span> + + </div> + <div class="weizhang-main-bootom"> + <div class="weizhang-main-form"> + <el-form label-width="80px" :model="statisticData" label-position="left"> + <el-form-item label="鍋滆溅鍦�:" style="margin-left: 25px;"> + {{this.statisticData.parkName}} + </el-form-item> + <el-form-item label="閬撻椄:" style="margin-left: 25px;"> + {{this.statisticData.name}} + </el-form-item> + <el-form-item label="鎵嬫満鍙�:" style="margin-left: 25px;"> + <el-input v-model="enterPark.carNo"></el-input> + </el-form-item> + <el-form-item class="weizhang-footer-box" style="display: flex;justify-content: center;margin-top: 5.498vh" label-width="0" v-if="statisticData.type==1"> + <el-button class="jiaofei-btn" type="primary" @click="pay()" :loading="payFlag">杩涘満</el-button> + </el-form-item> + </el-form> + </div> + </div> + </div> + </div> +</template> + +<script> + export default { + name: 'dashboard', + data() { + return { + payFlag:false, + outParkId:"", + statisticData:{ + + }, + enterPark:{ + barrierId:"", + carNo:"", + parkId:"", + }, + showFlag:true, + showFlag2:true, + status3:0, + carNo:"", + code2:"" + } + }, + created(){ + var url = window.location.href; + var cs = url.split('?')[1]; + var cs_arr = cs.split('&'); + var cs={}; + for(var i=0;i<cs_arr.length;i++){ + cs[cs_arr[i].split('=')[0]] = cs_arr[i].split('=')[1] + } + this.code2 = cs.code; + this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/barrier/getByCode', {code:cs.code}, res => { + this.statisticData = res.data; + }) + }, + methods: { + pay(){ + if(this.enterPark.carNo === null || this.enterPark.carNo === ""){ + this.$message.error("璇峰~鍐欐墜鏈哄彿"); + return; + } + this.enterPark.parkId = this.statisticData.parkId, + this.enterPark.barrierId = this.statisticData.id, + this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/car/inParkByPhone', this.enterPark, res => { + if(res.code===0){ + this.$message.success("鎿嶄綔鎴愬姛"); + }else { + this.$message.error(res.msg); + } + }) + }, + } + } + +</script> + + +<style lang="scss"> + .weizhang-main-bootom{ + .el-input__inner{ + border:none; + } + .el-form-item__label{ + color: #000; + font-weight: 600; + } + } + .weizhang-footer-box{ + .el-form-item__content{ + width: 100%; + display: flex; + justify-content: center; + } + .el-button--small{ + padding: 11px 15px; + font-size: 0.347rem /* 26/75 */; + } + } + +</style> +<style lang="scss" scoped> + h1,h2,h3,h4,h5{ + font-family: '鑻规柟 涓瓑'; + font-weight: normal; + } + .weizhang-header{ + display: flex; + height: 12.8vw /* 96/7.5 */; + align-items: center; + border-bottom:1px solid rgba(154,154,154,0.2); + .text{ + flex: 1; + text-align: center; + h1{ + font-size: 2.699vh /* 36/13.34 */; + } + } + .right{ + width: 6.747vh /* 90/13.34 */; + } + .leftjiantou{ + font-size: 5.33vw; + width: 6.747vh /* 90/13.34 */; + display: flex; + justify-content: center; + align-items: center; + } + } + .weizhang-main-box{ + width: 100%; + display: flex; + flex-direction: column; + padding:5.33vw /* 40/7.5 */; + } + .weizhang-main-top{ + height: 22.489vh /* 300/13.34 */; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + border-bottom: 1px solid #f0f0f0; + .money{ + font-size: 6.93vw /* 52/7.5 */; + font-weight: 550; + color: #000; + } + .weizhang{ + font-size: 0.4rem /* 30/75 */; + line-height: 2; + font-weight: normal; + margin-top:1.33vw /* 10/7.5 */; + color: #000; + } + } + .weizhang-main-form{ + } + .weizhang-tiaokuan{ + margin-top: 2.67vw /* 20/7.5 */; + h1{ + font-size:3.2vw /* 24/7.5 */; + color: #999999; + text-indent: 2.5em; + line-height: 2; + } + } + .jiaofei-btn{ + width: 80%; + border-radius: 5.33vw /* 40/7.5 */; + background-image: linear-gradient(to right,#33b1fe,#0679dc); + } + + .logoPhone{ + margin-top: 0.67vw; + width: 1.333rem /* 100/75 */; + height: 1.333rem /* 100/75 */; + } + .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item { + margin-bottom: 10px; + } + .weizhang-main-bootom{ + margin-top: 0.333rem /* 25/75 */; + } +</style> diff --git a/src/components/page/IndexTest.vue b/src/components/page/IndexTest.vue index a19a9c0..e4fa7b8 100644 --- a/src/components/page/IndexTest.vue +++ b/src/components/page/IndexTest.vue @@ -107,13 +107,10 @@ return; } this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/api/park', {id:this.outParkId}, res => { - this.$message({ - message: '2绉掑悗鑷姩璺宠浆鍒版敮浠橀〉闈紝闃叉鍐呭缃戞暟鎹悓姝ュ欢杩燂紝璇风◢绛�', - type: 'success', - duration:2000, - }); - setTimeout(function(){window.location.href = res.msg;},2000); - this.showFlag = false; + if(res.code === 0){ + window.location.href = res.msg + this.showFlag = false + } }) }, noCarOut(){ diff --git a/src/components/page/Login.vue b/src/components/page/Login.vue index 691914d..2ecaa84 100644 --- a/src/components/page/Login.vue +++ b/src/components/page/Login.vue @@ -48,7 +48,7 @@ submitForm(formName) { this.$refs[formName].validate((valid) => { if (valid) { - var url = this.$systemconfig.basePath + '/user/login'; + var url = this.$systemconfig.basePath + '/ffzf/user/login'; this.$byutil.postData(this,url,this.ruleForm,res=>{ let data = res.data; if (data) { diff --git a/src/components/page/costRule/index.vue b/src/components/page/costRule/index.vue index 4dce309..16a8784 100644 --- a/src/components/page/costRule/index.vue +++ b/src/components/page/costRule/index.vue @@ -12,7 +12,7 @@ </el-form> </div> - <el-table :data="pageData.rows" v-loading="pageData.isLoading" border style="width:100%;border:1px solid #bcbec2;"> + <el-table :data="pageData.rows" :height="tableHeight" v-loading="pageData.isLoading" border style="width:100%;border:1px solid #bcbec2;"> <el-table-column type="index" width="50" label="搴忓彿" align="center"> </el-table-column> <el-table-column prop="parkName" label="鍋滆溅鍦�" align="center" width="150"></el-table-column> <el-table-column prop="armyCar" label="鍐涜溅鏄惁鍏嶈垂" align="center" width="100"> @@ -173,15 +173,17 @@ freeTime:0, parkId:null }, - urlPath:this.$systemconfig.basePath + '/rule/', + urlPath:this.$systemconfig.basePath + '/ffzf/rule/', table1:[], + tableHeight:500, } }, mounted() { this.loadData(); - this.$byutil.postData(this, this.$systemconfig.basePath+'/park/findAll', this.formData, res => { + this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/park/findAll', this.formData, res => { this.table1 = res.data; }) + this.tableHeight = window.innerHeight - 260 }, methods: { onSave(){ diff --git a/src/components/page/enterpark/index.vue b/src/components/page/enterpark/index.vue new file mode 100644 index 0000000..485e1b7 --- /dev/null +++ b/src/components/page/enterpark/index.vue @@ -0,0 +1,145 @@ +<template> + <div class="mod-config"> + <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> + <el-form-item label="杞︾墝鍙�"> + <el-input v-model="searchForm.carNo" clearable></el-input> + </el-form-item> + <el-form-item label="鍋滆溅鍦�"> + <el-select v-model="searchForm.parkId" clearable> + <el-option v-for="item in table1" :key="item.id" :label="item.name" :value="item.id" ></el-option> + </el-select> + </el-form-item> + <el-form-item label="閫夋嫨鍏ュ満鏃堕棿"> + <div class="date-box"> + <el-date-picker type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" + v-model="searchForm.date" placeholder=""> + </el-date-picker> + </div> + </el-form-item> + <el-form-item> + <el-button type="primary" size="small" @click="getDataList" icon="el-icon-search">鏌ヨ</el-button> + </el-form-item> + </el-form> + + <div class="avue-crud"> + <el-table + :height="tableHeight" + :data="pageData.rows" + border + v-loading="pageData.isLoading"> + <el-table-column + type="index" + width="50" + label="搴忓彿" + align="center"> + </el-table-column> + <el-table-column label="鍏ュ満鍥�" width="200" header-align="center" align="center"> + <template slot-scope="scope"> + <!-- trigger(瑙﹀彂鏂瑰紡)銆乸lacement(鍑虹幇浣嶇疆) --> + <el-popover trigger="hover" placement="right" v-if="scope.row.imgPath != null"> + <img :src="scope.row.imgPath" style="height: 800px;width: 800px"/> + <img slot="reference" :src="scope.row.imgPath" :alt="scope.row.imgPath" style="height: 50px;width: 150px"> + </el-popover> + </template> + </el-table-column> + <el-table-column + prop="carNo" + header-align="center" + align="center" + label="杞︾墝鍙�"> + </el-table-column> + <el-table-column + prop="parkName" + header-align="center" + align="center" + label="鍋滆溅鍦�"> + </el-table-column> + <el-table-column + prop="createTime" + header-align="center" + align="center" + label="鍏ュ満鏃堕棿"> + </el-table-column> + <el-table-column + prop="status" + header-align="center" + align="center" + label="鍙戠幇杩濈珷"> + <template slot-scope="scope"> + <p v-if="scope.row.status==0">鏈繚绔�</p> + <p v-if="scope.row.status==1" style="color: red">鏈夎繚绔�</p> + </template> + </el-table-column> + </el-table> + <el-pagination background @size-change="onPageSizeChange" @current-change="onCurrentPageChange" :current-page="pageData.currentPage" :page-size="pageData.pageSize" :total="pageData.total" style="float: right"></el-pagination> + + </div> + + </div> +</template> + +<script> + export default { + data () { + return { + tableHeight:500, + dataForm: { + key: '' + }, + table1:[], + pageData: this.$byutil.defaultPageData(), + searchForm: { + current: this.pageIndex, + size: this.pageSize, + carNo:'', + parkId:'', + date: new Date, + }, + dataList: [], + pageIndex: 1, + pageSize: 100, + totalPage: 0, + dataListLoading: false, + addOrUpdateVisible: false + } + }, + components: { + }, + created () { + this.getAllPark() + this.getDataList() + this.tableHeight = window.innerHeight - 260 + }, + computed: { + }, + methods: { + // 鑾峰彇鏁版嵁鍒楄〃 + getDataList () { + this.dataListLoading = true + this.searchForm.current = this.pageIndex + this.searchForm.size = this.pageSize + this.$byutil.loadPageData(this, this.$systemconfig.basePath+'/ffzf/enterpark/findPage', this.searchForm); + this.dataListLoading = false + }, + getAllPark(){ + this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/park/findAll', this.formData, res => { + this.table1 = res.data; + }) + }, + onPageSizeChange(val) { + this.pageData.pageSize = val; + this.loadData(); + }, + onCurrentPageChange(val) { + this.pageData.page = val; + this.loadData(); + }, + } + } +</script> + +<style lang="scss" scoped> +.fenye-box{ + width: calc(70% - 20px); +} +</style> diff --git a/src/components/page/orderRecord/index.vue b/src/components/page/orderRecord/index.vue index 666e134..f7cbed2 100644 --- a/src/components/page/orderRecord/index.vue +++ b/src/components/page/orderRecord/index.vue @@ -16,7 +16,6 @@ </el-form-item> <el-form-item> <el-button type="primary" size="small" @click="onSearch" icon="el-icon-search">鏌ヨ</el-button> - <el-button type="primary" size="small" @click="onSearch2" icon="el-icon-search">鏌ヨ</el-button> </el-form-item> </el-form> </div> @@ -48,14 +47,14 @@ orderNum:'', orderMoney:'' }, - urlPath:this.$systemconfig.basePath + '/orderrecord/', + urlPath:this.$systemconfig.basePath + '/ffzf/orderrecord/', table1:[], table2:[], } }, mounted() { this.defaultDate(); - this.$byutil.postData(this, this.$systemconfig.basePath+'/park/findAll', this.formData, res => { + this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/park/findAll', this.formData, res => { this.table1 = res.data; }) }, @@ -75,11 +74,6 @@ onSearch() { this.loadData(); }, - onSearch2() { - this.$byutil.postData(this, this.urlPath+'getById/1000', null,res => { - console.log(res.data) - }); - }, //璁剧疆榛樿鏃ユ湡 defaultDate(){ //鑾峰彇鏂扮殑鏃堕棿 diff --git a/src/components/page/outPark/AddDialog.vue b/src/components/page/outPark/AddDialog.vue deleted file mode 100644 index 4f5edf5..0000000 --- a/src/components/page/outPark/AddDialog.vue +++ /dev/null @@ -1,155 +0,0 @@ -<template> - <el-dialog :title="dialogTitle" :visible.sync="dialogVisible"> - <el-form :model="formData" ref="formData"> - <el-form-item label="鐧诲綍鍚�" label-width="120px" prop="loginName" - :rules="[{required: true, message: '璇疯緭鍏ョ櫥褰曞悕', trigger: 'blur'}]"> - <el-input v-model="formData.loginName" auto-complete="off"></el-input> - </el-form-item> - <el-form-item label="濮撳悕" label-width="120px" prop="name" - :rules="[{required: true, message: '璇疯緭鍏ュ鍚�', trigger: 'blur'}]"> - <el-input v-model="formData.name" auto-complete="off"></el-input> - </el-form-item> - <el-form-item label="鎵嬫満鍙�" prop="phone" label-width="120px" - :rules="[{ required: true, message: '鎵嬫満鍙蜂笉鑳戒负绌�'},{ type: 'number', message: '鎵嬫満鍙峰繀椤讳负鏁板瓧'}]"> - <el-input v-model.number="formData.phone" auto-complete="off"></el-input> - </el-form-item> - <el-form-item label="瑙掕壊" label-width="120px" prop="roleIds" :rules="[{required: true, message: '璇烽�夋嫨瑙掕壊', trigger: 'blur'}]"> - <select-role-widget ref="selectRoleWidget" @backData="rolesBack" ></select-role-widget> - </el-form-item> - <el-form-item label="閮ㄩ棬" label-width="120px" prop="deptId" :rules="[{required: false, message: '璇烽�夋嫨閮ㄩ棬', trigger: 'blur'}]"> - <select-department-widget ref="selectDepartmentWidget" @backData="deptBack" ></select-department-widget> - </el-form-item> - <el-form-item label="鎵�灞炲叕鍙�" label-width="120px" prop="roleIds" :rules="[{required: false, message: '鏂板鎶曞叆鍝佷紒涓氱鐞嗗憳鎴栦腑鑽夎嵂浼佷笟绠$悊鍛樹娇鐢�'}]"> - <select-zcy-and-trp-company-widget ref="SelectZcyAndTrpCompanyWidget" @backData="companyBack"></select-zcy-and-trp-company-widget> - </el-form-item> - <el-form-item label="鎵�鍦ㄥ湴鍖�" label-width="120px" prop="area" - :rules="[{required: true, message: '璇烽�夋嫨鎵�鍦ㄥ湴鍖�', trigger: 'blur'}]"> - <v-distpicker :province="formData.province" - :city="formData.city" - :area="formData.area" - @province="onChangeProvince" @city="onChangeCity" @area="onChangeArea"> - </v-distpicker> - </el-form-item> - <el-form-item label="澶囨敞" label-width="120px" prop="description" - :rules="[{required: false, message: '璇疯緭鍏ュ娉�', trigger: 'blur'}]"> - <el-input v-model="formData.description" auto-complete="off"></el-input> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button @click="dialogVisible = false">鍙� 娑�</el-button> - <el-button type="primary" @click="onSave">纭� 瀹�</el-button> - </div> - </el-dialog> -</template> - -<script> - export default { - name: "AddDialog", - data() { - return { - pageConfig: { - saveUrl: this.$systemconfig.basePath + '/security/user/save', - findRoles:this.$systemconfig.basePath+'/security/user/findRoles' - }, - // 绐椾綋鏄剧ず鎴栭殣钘� - dialogVisible: false, - dialogTitle: '鏂板', - //琛ㄥ崟鏁版嵁 - formData: { - name: '', - loginName: '', - phone: '', - roleIds: '', - description: '', - deptId: '', - companyId:'', - province:'', - city:'', - area:'', - } - } - }, - mounted() { - }, - methods: { - // 鏈獥浣撴樉绀烘垨闅愯棌 - showDialog(val) { - this.dialogVisible = val; - }, - //淇敼 - initData(row) { - this.dialogTitle = '淇敼'; - this.formData.id = row.id; - this.formData.name = row.name; - this.formData.loginName = row.loginName; - this.formData.phone = Number(row.phone); - this.formData.description = row.description; - this.formData.deptId = row.deptId; - setTimeout(()=>{ - this.$refs.selectDepartmentWidget.initData(row.deptId); - },500); - this.$byutil.postData(this,this.pageConfig.findRoles,{userId:row.id},res=>{ - let roleIds = [] - for (let i in res.obj) { - roleIds.push(res.obj[i].roleId) - } - this.formData.roleIds = roleIds; - setTimeout(()=>{ - this.$refs.selectRoleWidget.initData(roleIds); - },500); - - }); - this.formData.province = row.province; - this.formData.city = row.city; - this.formData.area = row.area; - }, - rolesBack(val){ - this.formData.roleIds = val; - }, - companyBack(val){ - this.formData.companyId = val; - }, - deptBack(val){ - this.formData.deptId = val; - }, - - // 淇濆瓨 - onSave() { - // if(this.formData.province == ''|| this.formData.city == ''||this.formData.area == ''){ - // this.$message({message: '璇峰皢鐪佸競鍘�/鍖哄~鍐欏畬鏁�', type: 'fail'}); - // return; - // } - this.formData.roleIds = this.formData.roleIds.join(","); - this.$refs['formData'].validate((valid) => { - if (valid) { - this.$byutil.postData(this, this.pageConfig.saveUrl, this.formData, response => { - this.$refs['formData'].resetFields(); - this.showDialog(false); - this.$emit('reloadData'); - this.$message({message: '鎿嶄綔鎴愬姛', type: 'success'}); - - }) - // }) - } else { - return false; - } - }); - }, - - /********************浠ヤ笅鏄渷甯傚幙涓夌骇鑱斿姩缁勪欢鏂规硶*********************/ - onChangeProvince(a){ - this.formData.province = a.value; - }, - onChangeCity(a){ - this.formData.city = a.value; - }, - onChangeArea(a){ - this.formData.area = a.value; - }, - } - } -</script> - -<style scoped> - -</style> diff --git a/src/components/page/outPark/index.vue b/src/components/page/outPark/index.vue index aabbb65..c316190 100644 --- a/src/components/page/outPark/index.vue +++ b/src/components/page/outPark/index.vue @@ -1,226 +1,179 @@ <template> - <section> - <el-card class="box-card toolCard"> - <div slot="header" class="clearfix"> - <!--鏄剧ず瀵艰埅--> - <el-breadcrumb separator="/"> - <el-breadcrumb-item :to="{ path: '/' }">棣栭〉</el-breadcrumb-item> - <el-breadcrumb-item> - <a href="javascript:void(0);">绯荤粺绠$悊</a> - </el-breadcrumb-item> - <el-breadcrumb-item>鐢ㄦ埛绠$悊</el-breadcrumb-item> - </el-breadcrumb> - </div> - <!--<div class="text item">--> - <!--宸ュ叿鏉�--> - <!--<section class="toolbar">--> + <div class="mod-config"> + <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> + <el-form-item label="杞︾墝鍙�"> + <el-input v-model="searchForm.carNo" clearable></el-input> + </el-form-item> + <el-form-item label="鏀粯鐮�"> + <el-input v-model="searchForm.payCode" clearable></el-input> + </el-form-item> + <el-form-item label="鍋滆溅鍦�"> + <el-select v-model="searchForm.parkId" clearable> + <el-option v-for="item in table1" :key="item.id" :label="item.name" :value="item.id" ></el-option> + </el-select> + </el-form-item> + <el-form-item label="閫夋嫨鍑哄満鏃堕棿"> + <div class="date-box"> + <el-date-picker type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" + v-model="searchForm.date" placeholder=""> + </el-date-picker> + </div> + </el-form-item> + <el-form-item> + <el-button type="primary" size="small" @click="getDataList" icon="el-icon-search">鏌ヨ</el-button> + </el-form-item> + </el-form> - <!--</section>--> - <el-form :inline="true" :model="searchForm"> - <el-form-item label="鍚嶇О"> - <el-input v-model="searchForm.name" placeholder="鍚嶇О"></el-input> - </el-form-item> - <el-form-item label="鎵嬫満鍙�"> - <el-input v-model="searchForm.phone" placeholder="鎵嬫満鍙�"></el-input> - </el-form-item> - <el-form-item> - <el-button type="primary" size="small" @click="onSearch" icon="el-icon-search">鏌ヨ</el-button> - <el-button type="primary" size="small" @click="onAdd" icon="el-icon-plus">澧炲姞</el-button> - <el-button type="primary" size="small" @click="onInitPassword" icon="el-icon-refresh">鍒濆鍖栧瘑鐮�</el-button> - <el-button type="primary" size="small" @click="onSetUserImage" icon="el-icon-picture-outline">璁剧疆澶村儚</el-button> - <el-button type="primary" size="small" @click="onChangeDept" icon="el-icon-picture-outline">璋冩崲閮ㄩ棬</el-button> - </el-form-item> - </el-form> - - <!--</div>--> - </el-card> - - <!--鍒楄〃鏁版嵁--> - <el-table :data="pageData.rows" v-loading="pageData.isLoading" :element-loading-text="pageData.loadingText" - border - :height="pageConfig.maxHeight" - stripe tooltip-effect="dark" style="width:100%; height:100%" @selection-change="onSelectionChange" @row-click="clickRow" - ref="mulTable"> - <!--<el-table-column--> - <!--type="selection"--> - <!--width="50"> - </el-table-column>--> - <el-table-column prop="loginName" label="鐧诲綍鍚�"> + <div class="avue-crud"> + <el-table + :height="tableHeight" + :data="pageData.rows" + border + v-loading="pageData.isLoading"> + <el-table-column + type="index" + width="50" + label="搴忓彿" + align="center"> + </el-table-column> + <el-table-column label="鍑哄満鍥�" width="200" header-align="center" align="center"> + <template slot-scope="scope"> + <!-- trigger(瑙﹀彂鏂瑰紡)銆乸lacement(鍑虹幇浣嶇疆) --> + <el-popover trigger="hover" placement="right" v-if="scope.row.imgPath != null"> + <img :src="scope.row.imgPath" style="height: 800px;width: 800px"/> + <img slot="reference" :src="scope.row.imgPath" :alt="scope.row.imgPath" style="height: 50px;width: 150px"> + </el-popover> + </template> + </el-table-column> + <el-table-column + prop="carNo" + header-align="center" + align="center" + label="杞︾墝鍙�"> </el-table-column> - <el-table-column prop="name" label="濮撳悕"> + <el-table-column + prop="enterTime" + header-align="center" + align="center" + label="鍏ュ満鏃堕棿"> </el-table-column> - <el-table-column prop="sexStr" label="鎬у埆鍚�"> + <el-table-column + prop="createTime" + header-align="center" + align="center" + label="鍑哄満鏃堕棿"> + </el-table-column> + <el-table-column + prop="timeStr" + header-align="center" + align="center" + label="鍋滆溅鏃堕暱"> + </el-table-column> + <el-table-column + prop="parkName" + header-align="center" + align="center" + label="鍋滆溅鍦�"> </el-table-column> - <el-table-column prop="age" label="骞撮緞"> + <el-table-column + prop="payCode" + header-align="center" + align="center" + label="鏀粯鐮�"> </el-table-column> - <el-table-column prop="deptName" label="鎵�鍦ㄩ儴闂�"> + <el-table-column + prop="price" + width="100px" + header-align="center" + align="center" + label="鍋滆溅閲戦(鍏�)"> </el-table-column> - <el-table-column prop="post" label="鑱屼綅"> + <el-table-column + prop="status" + width="120px" + header-align="center" + align="center" + label="缂磋垂鐘舵��"> + <template slot-scope="scope"> + <p v-if="scope.row.status==0">鏈即璐�</p> + <p v-if="scope.row.status==1">宸茬即璐�</p> + </template> </el-table-column> - <el-table-column prop="phone" label="鎵嬫満鍙�"> - </el-table-column> - <el-table-column prop="roleNames" label="瑙掕壊"> - </el-table-column> - <el-table-column prop="status" label="鐘舵��"> - </el-table-column> - <el-table-column prop="lastLoginTime" label="鏈�杩戠櫥褰曟椂闂�"> - </el-table-column> - - <el-table-column label="鎿嶄綔" fixed="right" width="250"> - <template slot-scope="scope"> - <el-button - size="mini" - @click="onEdit(scope.$index, scope.row)">缂栬緫 - </el-button> - <el-button - size="mini" - type="danger" - @click="onStop(scope.$index, scope.row)">鍋滅敤 - </el-button> - <el-button - size="mini" - @click="onStart(scope.$index, scope.row)">鍚敤 - </el-button> - </template> + <el-table-column + prop="status3" + width="120px" + header-align="center" + align="center" + label="杩濈珷鐘舵��"> + <template slot-scope="scope"> + <p v-if="scope.row.status3==0">鏈繚绔�</p> + <p v-if="scope.row.status3==1" style="color: red">鏈夎繚绔�</p> + </template> </el-table-column> </el-table> - <!--鍒嗛〉淇℃伅--> - <el-pagination - background - @size-change="onPageSizeChange" - @current-change="onCurrentPageChange" - :current-page="pageData.currentPage" - :page-sizes="[10, 20, 30, 40, 50, 100, 200]" - :page-size="pageData.pageSize" - layout="total, sizes, jumper, prev, pager, next" - :total="pageData.total"> - </el-pagination> - </section> + <el-pagination background @size-change="onPageSizeChange" @current-change="onCurrentPageChange" :current-page="pageData.currentPage" :page-size="pageData.pageSize" :total="pageData.total" style="float: right"></el-pagination> + + </div> + </div> </template> <script> - // 瀵煎叆鏂板缁勪欢 - import addDialog from './AddDialog' - export default { - name: "UserIndex", - data: function () { - return { - pageConfig: { - pageDataUrl: this.$systemconfig.basePath + '/security/user/list', - stopUrl: this.$systemconfig.basePath + '/security/user/stop', - startUrl: this.$systemconfig.basePath + '/security/user/start', - initPasswordUrl:this.$systemconfig.basePath+'/security/user/restoreInitialPassword', - }, - // 鏌ヨ鏁版嵁 - searchForm: { - name: '' - }, - // 椤甸潰鏁版嵁 - pageData: this.$byutil.defaultPageData() - } + export default { + data () { + return { + tableHeight:500, + dataForm: { + key: '' }, - // 寮曞叆缁勪欢 - components: { - addDialog: addDialog + table1:[], + pageData: this.$byutil.defaultPageData(), + searchForm: { + current: this.pageIndex, + size: this.pageSize, + carNo:'', + parkId:'', + payCode:'', + date: new Date(), }, - // 鎵ц鍒濆鍖栨暟鎹� - mounted() { - this.$byutil.initTableMaxHeight(this); - this.loadData(); - }, - // 鏂规硶 - methods: { - //鍔犺浇鏁版嵁 - loadData() { - this.$byutil.loadPageData(this, this.pageConfig.pageDataUrl, this.searchForm); - }, - // 鐐瑰嚮鏌ヨ鎸夐挳 - onSearch() { - this.pageData = this.$byutil.defaultPageData(); - this.loadData(); - }, - // 鐐瑰嚮鏂板鎸夐挳 - onAdd() { - this.$refs.addDialog.showDialog(true); - }, - // 鐐瑰嚮缂栬緫鎸夐挳 - onEdit(index, row) { - this.$refs.addDialog.showDialog(true); - //鍒濆鍖栨棫鏁版嵁 - this.$refs.addDialog.initData(row); - }, - // 鐐瑰嚮鍋滅敤 - onStop(index, row) { - if(row.status == "鍒犻櫎"){ - alert("宸茬粡鍋滅敤锛屼笉鑳藉啀娆″仠鐢�"); - return; - } - this.$byutil.stopData(this, this.pageConfig.stopUrl, row); - }, - // 鐐瑰嚮鍚敤 - onStart(index, row) { - if(row.status == "姝e父"){ - alert("姝e父鐘舵�侊紝涓嶈兘鍐嶆鍚敤"); - return; - } - this.$byutil.startData(this, this.pageConfig.startUrl, row); - }, - // 澶氶�夋椂 - onSelectionChange(val) { - // this.pageData.multipleSelection = val - }, - // 鍒囨崲姣忛〉鏄剧ず鏉℃暟 - onPageSizeChange(val) { - this.pageData.pageSize = val; - this.loadData(); - }, - // 璺宠浆椤� - onCurrentPageChange(val) { - this.pageData.page = val; - this.loadData(); - }, - //鍗曢�� - clickRow(val){ - this.pageData.signSelection = val - - }, - // 璁剧疆澶村儚 - onSetUserImage (){ - let row = this.pageData.signSelection; - if(!row){ - this.$alert('璇烽�夋嫨鐢ㄦ埛', {'title': '鎻愮ず','type': 'warning','center': true,'showClose': false}); - return; - } - this.$refs.setUserImageDialog.showDialog(true); - this.$refs.setUserImageDialog.initData(row); - }, - - // 璋冩崲閮ㄩ棬 - onChangeDept (){ - let row = this.pageData.signSelection; - if(!row){ - this.$alert('璇烽�夋嫨鐢ㄦ埛', {'title': '鎻愮ず','type': 'warning','center': true,'showClose': false}); - return; - } - this.$refs.changeDeptDialog.showDialog(true); - this.$refs.changeDeptDialog.initData(row); - }, - - //鍒濆鍖栧瘑鐮� - onInitPassword(){ - let row = this.pageData.signSelection; - if(!row){ - this.$alert('璇烽�夋嫨鐢ㄦ埛', {'title': '鎻愮ず','type': 'warning','center': true,'showClose': false}); - return; - } - this.$byutil.postData(this,this.pageConfig.initPasswordUrl,row,res=>{ - this.$alert(row.name+'鍒濆鍖栧瘑鐮佹垚鍔�', {'title': '鎻愮ず','type': 'success','center': true,'showClose': false}); - }) - } - } + dataList: [], + pageIndex: 1, + pageSize: 100, + totalPage: 0, + dataListLoading: false, + addOrUpdateVisible: false + } + }, + components: { + }, + created () { + this.getAllPark() + this.getDataList() + this.tableHeight = window.innerHeight - 260 + }, + computed: { + }, + methods: { + // 鑾峰彇鏁版嵁鍒楄〃 + getDataList () { + this.dataListLoading = true + this.searchForm.current = this.pageIndex + this.searchForm.size = this.pageSize + this.$byutil.loadPageData(this, this.$systemconfig.basePath+'/ffzf/outpark/findPage', this.searchForm); + this.dataListLoading = false + }, + getAllPark(){ + this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/park/findAll', this.formData, res => { + this.table1 = res.data; + }) + }, + onPageSizeChange(val) { + this.pageData.pageSize = val; + this.loadData(); + }, + onCurrentPageChange(val) { + this.pageData.page = val; + this.loadData(); + }, } + } </script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/components/page/park/index.vue b/src/components/page/park/index.vue index 67f44ad..a22b3c6 100644 --- a/src/components/page/park/index.vue +++ b/src/components/page/park/index.vue @@ -83,7 +83,7 @@ phone: '', type: '', }, - urlPath:this.$systemconfig.basePath + '/park/', + urlPath:this.$systemconfig.basePath + '/ffzf/park/', id:null, } }, diff --git a/src/components/page/park/index2.vue b/src/components/page/park/index2.vue index 7ce2bb3..977c2e5 100644 --- a/src/components/page/park/index2.vue +++ b/src/components/page/park/index2.vue @@ -90,7 +90,7 @@ ipAddress:'', port:'', }, - urlPath:this.$systemconfig.basePath + '/barrier/', + urlPath:this.$systemconfig.basePath + '/ffzf/barrier/', } }, watch:{ diff --git a/src/components/page/parkticket/index.vue b/src/components/page/parkticket/index.vue new file mode 100644 index 0000000..fce0c41 --- /dev/null +++ b/src/components/page/parkticket/index.vue @@ -0,0 +1,210 @@ +<template> + <div class="mod-config"> + <basic-container> + <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> + <el-form-item label="杞︾墝鍙�"> + <el-input v-model="searchForm.carNo" clearable></el-input> + </el-form-item> +<!-- <el-form-item label="鍋滆溅鍦�">--> +<!-- <el-select v-model="searchForm.parkId" clearable>--> +<!-- <el-option v-for="item in table1" :key="item.id" :label="item.name" :value="item.id" ></el-option>--> +<!-- </el-select>--> +<!-- </el-form-item>--> + <el-form-item> + <el-button type="primary" size="small" @click="getDataList" icon="el-icon-search">鏌ヨ</el-button> + </el-form-item> + </el-form> + + <div class="avue-crud"> + <el-table + :height="tableHeight" + :data="pageData.rows" + border + v-loading="pageData.isLoading"> + <el-table-column + type="index" + width="50" + label="搴忓彿" + align="center"> + </el-table-column> + <el-table-column label="鍏ュ満鍥�" width="200" header-align="center" align="center"> + <template slot-scope="scope"> + <!-- trigger(瑙﹀彂鏂瑰紡)銆乸lacement(鍑虹幇浣嶇疆) --> + <el-popover trigger="hover" placement="right" v-if="scope.row.imgInPath != null"> + <img :src="scope.row.imgInPath" style="height: 800px;width: 800px"/> + <img slot="reference" :src="scope.row.imgInPath" :alt="scope.row.imgInPath" style="height: 50px;width: 150px"> + </el-popover> + </template> + </el-table-column> + <el-table-column label="鍑哄満鍥�" width="200" header-align="center" align="center"> + <template slot-scope="scope"> + <!-- trigger(瑙﹀彂鏂瑰紡)銆乸lacement(鍑虹幇浣嶇疆) --> + <el-popover trigger="hover" placement="right" v-if="scope.row.imgOutPath != null"> + <img :src="scope.row.imgOutPath" style="height: 800px;width: 800px"/> + <img slot="reference" :src="scope.row.imgOutPath" :alt="scope.row.imgOutPath" style="height: 50px;width: 150px"> + </el-popover> + </template> + </el-table-column> + <el-table-column + prop="carNo" + header-align="center" + align="center" + label="杞︾墝鍙�"> + </el-table-column> + <el-table-column + prop="code" + header-align="center" + align="center" + label="璁㈠崟鍙�"> + </el-table-column> + <el-table-column + prop="updateTime" + header-align="center" + align="center" + label="寮�绁ㄦ椂闂�"> + </el-table-column> + <el-table-column + prop="money" + header-align="center" + align="center" + width="100px" + label="閲戦"> + </el-table-column> + <el-table-column + prop="payCode" + header-align="center" + align="center" + label="鐢靛瓙缂存鐮�"> + </el-table-column> + <el-table-column + prop="ticketStatus" + header-align="center" + align="center" + width="100px" + label="寮�绁ㄧ姸鎬�"> + <template slot-scope="scope"> + <p v-if="scope.row.ticketStatus==2" style="color: red">鏈紑绁�</p> + <p v-if="scope.row.ticketStatus==1" >宸插紑绁�</p> + </template> + </el-table-column> + <el-table-column + header-align="center" + align="center" + label="鎿嶄綔"> + <template slot-scope="scope"> + <el-button type="text" size="small" icon="el-icon-view" @click="watchTicket(scope.row.fileId)">鏌ョ湅鍙戠エ</el-button> + <el-button type="text" size="small" icon="el-icon-download" @click="downTicket(scope.row.fileId)">涓嬭浇鍙戠エ</el-button> + </template> + </el-table-column> + </el-table> + <el-pagination background @size-change="onPageSizeChange" @current-change="onCurrentPageChange" :current-page="pageData.currentPage" :page-size="pageData.pageSize" :total="pageData.total" style="float: right"></el-pagination> + + </div> + + <el-dialog append-to-body title="鏌ョ湅鍙戠エ" :visible.sync="imgFlag" width="60%" :close-on-click-modal="closeDialog"> + <el-image + class = "my-img" + ref = "myImg" + :src="imageUrl" + :preview-src-list="srcList"> + </el-image> + </el-dialog> + + </basic-container> + </div> +</template> + +<script> + export default { + data () { + return { + tableHeight:500, + dataForm: { + key: '' + }, + table1:[], + pageData: this.$byutil.defaultPageData(), + searchForm: { + carNo:'', + parkId:'', + type:1, + current:this.pageIndex, + size:this.pageSize + }, + imageUrl:'', + imgFlag:false, + srcList:'', + dataList: [], + pageIndex: 1, + pageSize: 50, + totalPage: 0, + dataListLoading: false, + addOrUpdateVisible: false + } + }, + components: { + }, + created () { + this.getDataList() + this.getAllPark() + this.tableHeight = window.innerHeight - 260 + }, + computed: { + }, + methods: { + // 鑾峰彇鏁版嵁鍒楄〃 + getDataList () { + this.dataListLoading = true + this.searchForm.current = this.pageIndex + this.searchForm.size = this.pageSize + this.$byutil.loadPageData(this, this.$systemconfig.basePath+'/ffzf/orderrecord/findPage', this.searchForm); + this.dataListLoading = false + }, + getAllPark(){ + this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/park/findAll', this.formData, res => { + this.table1 = res.data; + }) + }, + closeDialog(){ + this.imgFlag = false + }, + watchTicket(fileId){ + this.imgFlag = true + this.imageUrl = "/ffzf/fileinfo/showImgById/"+fileId + }, + downTicket(fileId){ + this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/fileinfo/download/downloadPng', {fileId:fileId}, res => { + + }) + }, + onPageSizeChange(val) { + this.pageData.pageSize = val; + this.loadData(); + }, + onCurrentPageChange(val) { + this.pageData.page = val; + this.loadData(); + }, + } + } +</script> +<style lang="scss" scoped> +.fenye-box2{ + width: calc(80% - 20px); +} +.per-up{ + position: relative; + .my-img{ + width: 100px; + height: 100px; + .el-image__inner{ + visibility: hidden ; + } + } + .my-pre{ + position: absolute; + margin-left: 111px; + margin-top: -156px; + } +} +</style> diff --git a/src/components/page/street/index.vue b/src/components/page/street/index.vue index 230c2ce..2ebc0d9 100644 --- a/src/components/page/street/index.vue +++ b/src/components/page/street/index.vue @@ -16,7 +16,7 @@ </el-form> </div> - <el-table :data="pageData.rows" v-loading="pageData.isLoading" border style="width:100%;border:1px solid #bcbec2;margin-top: 10px;"> + <el-table :data="pageData.rows" :height="tableHeight" v-loading="pageData.isLoading" border style="width:100%;border:1px solid #bcbec2;margin-top: 10px;"> <el-table-column type="index" width="50" label="搴忓彿" align="center"> </el-table-column> <el-table-column prop="name" label="閬撹矾鍚嶇О" align="center"></el-table-column> <el-table-column prop="code" label="缂栧彿" align="center"></el-table-column> @@ -113,6 +113,7 @@ searchForm: { type: null }, + tableHeight:500, pageData: this.$byutil.defaultPageData(), formData: { name: '', @@ -123,11 +124,12 @@ }, mounted() { this.loadData(); + this.tableHeight = window.innerHeight - 260 }, methods: { onSave3(){ for(var i=0;i<this.streetIds.length;i++){ - this.$byutil.postData(this, this.$systemconfig.basePath + '/street/save2', {roadId:this.roadId,streetId:this.streetIds[i]}, res => { + this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/street/save2', {roadId:this.roadId,streetId:this.streetIds[i]}, res => { this.streetEdit(this.roadId); }) } @@ -149,21 +151,21 @@ this.loadSelect(); }, loadSelect(){ - this.$byutil.postData(this, this.$systemconfig.basePath + '/street/findList', {}, res => { + this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/street/findList', {}, res => { this.select3 = res.data.list2 }) }, streetEdit(id){ this.flag2 = true; this.roadId = id; - this.$byutil.postData(this, this.$systemconfig.basePath + '/street/findById', {id:id,type:0}, res => { + this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/street/findById', {id:id,type:0}, res => { this.table2 = res.data; }) }, onSave(){ this.$refs['formData'].validate((valid) => { if (valid) { - this.$byutil.postData(this, this.$systemconfig.basePath + '/street/save', this.formData, res => { + this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/street/save', this.formData, res => { this.$refs['formData'].resetFields(); this.flag=false; this.$message({message: '淇濆瓨鎴愬姛', type: 'success'}); @@ -176,7 +178,7 @@ }); }, loadData() { - this.$byutil.loadPageData(this, this.$systemconfig.basePath + '/street/findPage', this.searchForm); + this.$byutil.loadPageData(this, this.$systemconfig.basePath + '/ffzf/street/findPage', this.searchForm); }, onSearch() { this.pageData = this.$byutil.defaultPageData(); @@ -196,13 +198,13 @@ this.formData = row; }, onDelete(index, row) { - this.$byutil.deleteData(this,this.$systemconfig.basePath+"/street/delete",{id:row.id}, res => { + this.$byutil.deleteData(this,this.$systemconfig.basePath+"/ffzf/street/delete",{id:row.id}, res => { this.$message({message: '鍒犻櫎鎴愬姛', type: 'success'}); this.loadData(); }) }, onDelete2(index, row) { - this.$byutil.deleteData(this,this.$systemconfig.basePath+"/street/delete2",{id:row.id}, res => { + this.$byutil.deleteData(this,this.$systemconfig.basePath+"/ffzf/street/delete2",{id:row.id}, res => { this.$message({message: '鍒犻櫎鎴愬姛', type: 'success'}); this.streetEdit(this.roadId) }) diff --git a/src/components/page/ticket/AddDialog.vue b/src/components/page/ticket/AddDialog.vue deleted file mode 100644 index 4f5edf5..0000000 --- a/src/components/page/ticket/AddDialog.vue +++ /dev/null @@ -1,155 +0,0 @@ -<template> - <el-dialog :title="dialogTitle" :visible.sync="dialogVisible"> - <el-form :model="formData" ref="formData"> - <el-form-item label="鐧诲綍鍚�" label-width="120px" prop="loginName" - :rules="[{required: true, message: '璇疯緭鍏ョ櫥褰曞悕', trigger: 'blur'}]"> - <el-input v-model="formData.loginName" auto-complete="off"></el-input> - </el-form-item> - <el-form-item label="濮撳悕" label-width="120px" prop="name" - :rules="[{required: true, message: '璇疯緭鍏ュ鍚�', trigger: 'blur'}]"> - <el-input v-model="formData.name" auto-complete="off"></el-input> - </el-form-item> - <el-form-item label="鎵嬫満鍙�" prop="phone" label-width="120px" - :rules="[{ required: true, message: '鎵嬫満鍙蜂笉鑳戒负绌�'},{ type: 'number', message: '鎵嬫満鍙峰繀椤讳负鏁板瓧'}]"> - <el-input v-model.number="formData.phone" auto-complete="off"></el-input> - </el-form-item> - <el-form-item label="瑙掕壊" label-width="120px" prop="roleIds" :rules="[{required: true, message: '璇烽�夋嫨瑙掕壊', trigger: 'blur'}]"> - <select-role-widget ref="selectRoleWidget" @backData="rolesBack" ></select-role-widget> - </el-form-item> - <el-form-item label="閮ㄩ棬" label-width="120px" prop="deptId" :rules="[{required: false, message: '璇烽�夋嫨閮ㄩ棬', trigger: 'blur'}]"> - <select-department-widget ref="selectDepartmentWidget" @backData="deptBack" ></select-department-widget> - </el-form-item> - <el-form-item label="鎵�灞炲叕鍙�" label-width="120px" prop="roleIds" :rules="[{required: false, message: '鏂板鎶曞叆鍝佷紒涓氱鐞嗗憳鎴栦腑鑽夎嵂浼佷笟绠$悊鍛樹娇鐢�'}]"> - <select-zcy-and-trp-company-widget ref="SelectZcyAndTrpCompanyWidget" @backData="companyBack"></select-zcy-and-trp-company-widget> - </el-form-item> - <el-form-item label="鎵�鍦ㄥ湴鍖�" label-width="120px" prop="area" - :rules="[{required: true, message: '璇烽�夋嫨鎵�鍦ㄥ湴鍖�', trigger: 'blur'}]"> - <v-distpicker :province="formData.province" - :city="formData.city" - :area="formData.area" - @province="onChangeProvince" @city="onChangeCity" @area="onChangeArea"> - </v-distpicker> - </el-form-item> - <el-form-item label="澶囨敞" label-width="120px" prop="description" - :rules="[{required: false, message: '璇疯緭鍏ュ娉�', trigger: 'blur'}]"> - <el-input v-model="formData.description" auto-complete="off"></el-input> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button @click="dialogVisible = false">鍙� 娑�</el-button> - <el-button type="primary" @click="onSave">纭� 瀹�</el-button> - </div> - </el-dialog> -</template> - -<script> - export default { - name: "AddDialog", - data() { - return { - pageConfig: { - saveUrl: this.$systemconfig.basePath + '/security/user/save', - findRoles:this.$systemconfig.basePath+'/security/user/findRoles' - }, - // 绐椾綋鏄剧ず鎴栭殣钘� - dialogVisible: false, - dialogTitle: '鏂板', - //琛ㄥ崟鏁版嵁 - formData: { - name: '', - loginName: '', - phone: '', - roleIds: '', - description: '', - deptId: '', - companyId:'', - province:'', - city:'', - area:'', - } - } - }, - mounted() { - }, - methods: { - // 鏈獥浣撴樉绀烘垨闅愯棌 - showDialog(val) { - this.dialogVisible = val; - }, - //淇敼 - initData(row) { - this.dialogTitle = '淇敼'; - this.formData.id = row.id; - this.formData.name = row.name; - this.formData.loginName = row.loginName; - this.formData.phone = Number(row.phone); - this.formData.description = row.description; - this.formData.deptId = row.deptId; - setTimeout(()=>{ - this.$refs.selectDepartmentWidget.initData(row.deptId); - },500); - this.$byutil.postData(this,this.pageConfig.findRoles,{userId:row.id},res=>{ - let roleIds = [] - for (let i in res.obj) { - roleIds.push(res.obj[i].roleId) - } - this.formData.roleIds = roleIds; - setTimeout(()=>{ - this.$refs.selectRoleWidget.initData(roleIds); - },500); - - }); - this.formData.province = row.province; - this.formData.city = row.city; - this.formData.area = row.area; - }, - rolesBack(val){ - this.formData.roleIds = val; - }, - companyBack(val){ - this.formData.companyId = val; - }, - deptBack(val){ - this.formData.deptId = val; - }, - - // 淇濆瓨 - onSave() { - // if(this.formData.province == ''|| this.formData.city == ''||this.formData.area == ''){ - // this.$message({message: '璇峰皢鐪佸競鍘�/鍖哄~鍐欏畬鏁�', type: 'fail'}); - // return; - // } - this.formData.roleIds = this.formData.roleIds.join(","); - this.$refs['formData'].validate((valid) => { - if (valid) { - this.$byutil.postData(this, this.pageConfig.saveUrl, this.formData, response => { - this.$refs['formData'].resetFields(); - this.showDialog(false); - this.$emit('reloadData'); - this.$message({message: '鎿嶄綔鎴愬姛', type: 'success'}); - - }) - // }) - } else { - return false; - } - }); - }, - - /********************浠ヤ笅鏄渷甯傚幙涓夌骇鑱斿姩缁勪欢鏂规硶*********************/ - onChangeProvince(a){ - this.formData.province = a.value; - }, - onChangeCity(a){ - this.formData.city = a.value; - }, - onChangeArea(a){ - this.formData.area = a.value; - }, - } - } -</script> - -<style scoped> - -</style> diff --git a/src/components/page/ticket/index.vue b/src/components/page/ticket/index.vue index aabbb65..e8ab463 100644 --- a/src/components/page/ticket/index.vue +++ b/src/components/page/ticket/index.vue @@ -1,226 +1,236 @@ <template> - <section> - <el-card class="box-card toolCard"> - <div slot="header" class="clearfix"> - <!--鏄剧ず瀵艰埅--> - <el-breadcrumb separator="/"> - <el-breadcrumb-item :to="{ path: '/' }">棣栭〉</el-breadcrumb-item> - <el-breadcrumb-item> - <a href="javascript:void(0);">绯荤粺绠$悊</a> - </el-breadcrumb-item> - <el-breadcrumb-item>鐢ㄦ埛绠$悊</el-breadcrumb-item> - </el-breadcrumb> - </div> - <!--<div class="text item">--> - <!--宸ュ叿鏉�--> - <!--<section class="toolbar">--> + <div class="mod-config"> + <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> + <el-form-item label="杞︾墝鍙�"> + <el-input v-model="searchForm.carNo" clearable></el-input> + </el-form-item> + <el-form-item label="浜嬩欢绫诲瀷"> + <el-select v-model="searchForm.type" placeholder="璇烽�夋嫨" clearable> + <el-option label="鐜板満澶勭綒" :value="0"></el-option> + <el-option label="涓婄骇浠诲姟" :value="1"></el-option> + <el-option label="杩濈珷鎷栬溅" :value="2"></el-option> + </el-select> + </el-form-item> + <el-form-item label="缂磋垂鐘舵��"> + <el-select v-model="searchForm.payStatus" placeholder="璇烽�夋嫨" clearable> + <el-option label="寰呯即璐�" :value="0"></el-option> + <el-option label="宸茬即璐�" :value="1"></el-option> + <el-option label="缂磋垂澶辫触" :value="2"></el-option> + </el-select> + </el-form-item> + <el-form-item label="杩濈珷绫诲瀷"> + <el-select v-model="searchForm.violationTypeId" clearable> + <el-option v-for="item in table1" :key="item.id" :label="item.name" :value="item.id" ></el-option> + </el-select> + </el-form-item> + <el-form-item> + <el-button type="primary" size="small" @click="getDataList" icon="el-icon-search">鏌ヨ</el-button> + </el-form-item> + </el-form> - <!--</section>--> - <el-form :inline="true" :model="searchForm"> - <el-form-item label="鍚嶇О"> - <el-input v-model="searchForm.name" placeholder="鍚嶇О"></el-input> - </el-form-item> - <el-form-item label="鎵嬫満鍙�"> - <el-input v-model="searchForm.phone" placeholder="鎵嬫満鍙�"></el-input> - </el-form-item> - <el-form-item> - <el-button type="primary" size="small" @click="onSearch" icon="el-icon-search">鏌ヨ</el-button> - <el-button type="primary" size="small" @click="onAdd" icon="el-icon-plus">澧炲姞</el-button> - <el-button type="primary" size="small" @click="onInitPassword" icon="el-icon-refresh">鍒濆鍖栧瘑鐮�</el-button> - <el-button type="primary" size="small" @click="onSetUserImage" icon="el-icon-picture-outline">璁剧疆澶村儚</el-button> - <el-button type="primary" size="small" @click="onChangeDept" icon="el-icon-picture-outline">璋冩崲閮ㄩ棬</el-button> - </el-form-item> - </el-form> - - <!--</div>--> - </el-card> - - <!--鍒楄〃鏁版嵁--> - <el-table :data="pageData.rows" v-loading="pageData.isLoading" :element-loading-text="pageData.loadingText" - border - :height="pageConfig.maxHeight" - stripe tooltip-effect="dark" style="width:100%; height:100%" @selection-change="onSelectionChange" @row-click="clickRow" - ref="mulTable"> - <!--<el-table-column--> - <!--type="selection"--> - <!--width="50"> - </el-table-column>--> - <el-table-column prop="loginName" label="鐧诲綍鍚�"> + <div class="avue-crud"> + <el-table + :height="tableHeight" + :data="pageData.rows" + border + v-loading="pageData.isLoading"> + <el-table-column + type="index" + width="50" + label="搴忓彿" + align="center"> + </el-table-column> + <el-table-column + prop="carNo" + width="100px" + header-align="center" + align="center" + label="杞︾墝鍙�"> + </el-table-column> + <el-table-column + prop="type" + width="100px" + header-align="center" + align="center" + label="浜嬩欢绫诲瀷"> + <template slot-scope="scope"> + <p v-if="scope.row.type==0" >鐜板満澶勭綒</p> + <p v-if="scope.row.type==1">涓婄骇浠诲姟</p> + <p v-if="scope.row.type==2">杩濈珷鎷栬溅</p> + </template> + </el-table-column> + <el-table-column + prop="carType" + width="90px" + header-align="center" + align="center" + label="杞﹁締绫诲瀷"> + </el-table-column> + <el-table-column + prop="color" + width="90px" + header-align="center" + align="center" + label="杞﹁締棰滆壊"> + </el-table-column> + <el-table-column + prop="address" + header-align="center" + align="center" + label="杩濇硶鍦扮偣"> </el-table-column> - <el-table-column prop="name" label="濮撳悕"> - </el-table-column> - <el-table-column prop="sexStr" label="鎬у埆鍚�"> - </el-table-column> - <el-table-column prop="age" label="骞撮緞"> - </el-table-column> - <el-table-column prop="deptName" label="鎵�鍦ㄩ儴闂�"> - </el-table-column> - <el-table-column prop="post" label="鑱屼綅"> - </el-table-column> - <el-table-column prop="phone" label="鎵嬫満鍙�"> - </el-table-column> - <el-table-column prop="roleNames" label="瑙掕壊"> - </el-table-column> - <el-table-column prop="status" label="鐘舵��"> - </el-table-column> - <el-table-column prop="lastLoginTime" label="鏈�杩戠櫥褰曟椂闂�"> + <el-table-column + prop="money" + width="100px" + header-align="center" + align="center" + label="搴旂即閲戦"> </el-table-column> - <el-table-column label="鎿嶄綔" fixed="right" width="250"> - <template slot-scope="scope"> - <el-button - size="mini" - @click="onEdit(scope.$index, scope.row)">缂栬緫 - </el-button> - <el-button - size="mini" - type="danger" - @click="onStop(scope.$index, scope.row)">鍋滅敤 - </el-button> - <el-button - size="mini" - @click="onStart(scope.$index, scope.row)">鍚敤 - </el-button> - </template> + <el-table-column + prop="payStatus" + width="100px" + header-align="center" + align="center" + label="缂磋垂鐘舵��"> + <template slot-scope="scope"> + <p v-if="scope.row.payStatus==0" style="color: red">寰呯即璐�</p> + <p v-if="scope.row.payStatus==1">宸茬即璐�</p> + <p v-if="scope.row.payStatus==2" style="color: blue">缂磋垂澶辫触</p> + </template> </el-table-column> + <el-table-column + prop="userName" + width="100px" + header-align="center" + align="center" + label="澶勭悊浜�"> + </el-table-column> + <el-table-column + prop="violationTypeName" + header-align="center" + align="center" + width="100px" + label="杩濈珷绫诲瀷"> + </el-table-column> + <el-table-column + prop="remark" + header-align="center" + align="center" + label="澶囨敞"> + </el-table-column> + <el-table-column + fixed="right" + header-align="center" + align="center" + label="鎿嶄綔"> + <template slot-scope="scope"> + <el-button type="text" size="small" icon="el-icon-view" @click="addOrUpdateHandle(scope.row.id)">澶勫喅涔�</el-button> + <el-button type="text" size="small" icon="el-icon-view" @click="pictureHandle(scope.row)">鍥惧儚璇佹嵁</el-button> + <el-button type="text" size="small" icon="el-pay6zhifu" @click="jiaofeiHandle(scope.row.id)">鐜板満缂磋垂</el-button> + </template> + </el-table-column> </el-table> - <!--鍒嗛〉淇℃伅--> - <el-pagination - background - @size-change="onPageSizeChange" - @current-change="onCurrentPageChange" - :current-page="pageData.currentPage" - :page-sizes="[10, 20, 30, 40, 50, 100, 200]" - :page-size="pageData.pageSize" - layout="total, sizes, jumper, prev, pager, next" - :total="pageData.total"> - </el-pagination> - </section> + <el-pagination background @size-change="onPageSizeChange" @current-change="onCurrentPageChange" :current-page="pageData.currentPage" :page-size="pageData.pageSize" :total="pageData.total" style="float: right"></el-pagination> + + </div> + + <!-- 寮圭獥, 鏂板 / 淇敼 --> + <table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></table-form> + <!--鍥惧儚璇佹嵁--> + <pictureForm v-if="pictureFormVisiable" ref="pictureForm"></pictureForm> + </div> </template> <script> - // 瀵煎叆鏂板缁勪欢 - import addDialog from './AddDialog' - export default { - name: "UserIndex", - data: function () { - return { - pageConfig: { - pageDataUrl: this.$systemconfig.basePath + '/security/user/list', - stopUrl: this.$systemconfig.basePath + '/security/user/stop', - startUrl: this.$systemconfig.basePath + '/security/user/start', - initPasswordUrl:this.$systemconfig.basePath+'/security/user/restoreInitialPassword', - }, - // 鏌ヨ鏁版嵁 - searchForm: { - name: '' - }, - // 椤甸潰鏁版嵁 - pageData: this.$byutil.defaultPageData() - } + import TableForm from './ticket-form' + import pictureForm from './picture-form' + export default { + data () { + return { + tableHeight:650, + dataForm: { + key: '' }, - // 寮曞叆缁勪欢 - components: { - addDialog: addDialog + table1:[], + pageData: this.$byutil.defaultPageData(), + searchForm: { + current:this.pageIndex, + size:this.pageSize, + carNo:'', + type:null, + violationTypeId:null, + payStatus:null, }, - // 鎵ц鍒濆鍖栨暟鎹� - mounted() { - this.$byutil.initTableMaxHeight(this); - this.loadData(); - }, - // 鏂规硶 - methods: { - //鍔犺浇鏁版嵁 - loadData() { - this.$byutil.loadPageData(this, this.pageConfig.pageDataUrl, this.searchForm); - }, - // 鐐瑰嚮鏌ヨ鎸夐挳 - onSearch() { - this.pageData = this.$byutil.defaultPageData(); - this.loadData(); - }, - // 鐐瑰嚮鏂板鎸夐挳 - onAdd() { - this.$refs.addDialog.showDialog(true); - }, - // 鐐瑰嚮缂栬緫鎸夐挳 - onEdit(index, row) { - this.$refs.addDialog.showDialog(true); - //鍒濆鍖栨棫鏁版嵁 - this.$refs.addDialog.initData(row); - }, - // 鐐瑰嚮鍋滅敤 - onStop(index, row) { - if(row.status == "鍒犻櫎"){ - alert("宸茬粡鍋滅敤锛屼笉鑳藉啀娆″仠鐢�"); - return; - } - this.$byutil.stopData(this, this.pageConfig.stopUrl, row); - }, - // 鐐瑰嚮鍚敤 - onStart(index, row) { - if(row.status == "姝e父"){ - alert("姝e父鐘舵�侊紝涓嶈兘鍐嶆鍚敤"); - return; - } - this.$byutil.startData(this, this.pageConfig.startUrl, row); - }, - // 澶氶�夋椂 - onSelectionChange(val) { - // this.pageData.multipleSelection = val - }, - // 鍒囨崲姣忛〉鏄剧ず鏉℃暟 - onPageSizeChange(val) { - this.pageData.pageSize = val; - this.loadData(); - }, - // 璺宠浆椤� - onCurrentPageChange(val) { - this.pageData.page = val; - this.loadData(); - }, - //鍗曢�� - clickRow(val){ - this.pageData.signSelection = val + dataList: [], + pageIndex: 1, + pageSize: 10, + totalPage: 0, + dataListLoading: false, + addOrUpdateVisible: false, + pictureFormVisiable:false, //鍥惧儚璇佹嵁寮规 + } + }, + components: { + TableForm, + pictureForm + }, + created () { + this.getDataList() + this.findAllViolation() + this.tableHeight = window.innerHeight - 255 + }, + computed: { - }, - // 璁剧疆澶村儚 - onSetUserImage (){ - let row = this.pageData.signSelection; - if(!row){ - this.$alert('璇烽�夋嫨鐢ㄦ埛', {'title': '鎻愮ず','type': 'warning','center': true,'showClose': false}); - return; - } - this.$refs.setUserImageDialog.showDialog(true); - this.$refs.setUserImageDialog.initData(row); - }, + }, + methods: { + // 鑾峰彇鏁版嵁鍒楄〃 + getDataList () { + this.dataListLoading = true + this.searchForm.current=this.pageIndex + this.searchForm.size=this.pageSize + this.$byutil.loadPageData(this, this.$systemconfig.basePath+'/ffzf/ticket/findPage', this.searchForm); + this.dataListLoading = false + }, + findAllViolation(){ + this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/violationType/findAll', this.formData, res => { + this.table1 = res.data; + }) + }, + onPageSizeChange(val) { + this.pageData.pageSize = val; + this.loadData(); + }, + onCurrentPageChange(val) { + this.pageData.page = val; + this.loadData(); + }, + pictureHandle(data) { + console.log(data,'data=====') + let imgArry = [] + if(data.img) { + imgArry = data.img.split(',') + console.log(imgArry,'imgArry====') + } + this.pictureFormVisiable = true + this.$nextTick(() => { + this.$refs.pictureForm.init(imgArry) + }) - // 璋冩崲閮ㄩ棬 - onChangeDept (){ - let row = this.pageData.signSelection; - if(!row){ - this.$alert('璇烽�夋嫨鐢ㄦ埛', {'title': '鎻愮ず','type': 'warning','center': true,'showClose': false}); - return; - } - this.$refs.changeDeptDialog.showDialog(true); - this.$refs.changeDeptDialog.initData(row); - }, - - //鍒濆鍖栧瘑鐮� - onInitPassword(){ - let row = this.pageData.signSelection; - if(!row){ - this.$alert('璇烽�夋嫨鐢ㄦ埛', {'title': '鎻愮ず','type': 'warning','center': true,'showClose': false}); - return; - } - this.$byutil.postData(this,this.pageConfig.initPasswordUrl,row,res=>{ - this.$alert(row.name+'鍒濆鍖栧瘑鐮佹垚鍔�', {'title': '鎻愮ず','type': 'success','center': true,'showClose': false}); - }) - } - } + }, + // 鏂板 / 淇敼 + addOrUpdateHandle (id) { + this.addOrUpdateVisible = true + this.$nextTick(() => { + this.$refs.addOrUpdate.init(id) + }) + }, + //鐜板満缂磋垂 + jiaofeiHandle(id){ + this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/ticket/jiaofei', {id:id}, res => { + this.getDataList() + }) + }, } + } </script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/components/page/ticket/picture-form.vue b/src/components/page/ticket/picture-form.vue new file mode 100644 index 0000000..0f2715d --- /dev/null +++ b/src/components/page/ticket/picture-form.vue @@ -0,0 +1,74 @@ +<template> + <div> + <el-dialog + title="鍥惧儚璇佹嵁" + :close-on-click-modal="false" + :visible.sync="visible" + v-dialogDrag> + <div class="previewDialog" v-for="(item,index) in pictureList" :key="index"> + <img + style="width: 100%" + :src="item.url" + :preview="item.preview" + :preview-text="item.title" + alt=""> + <!--<div class="enlargeBox"> + <img + :src="item.larg" + alt=""> + </div>--> + </div> + </el-dialog> + </div> +</template> + +<script> + export default { + name: "pictureForm", + data() { + return { + visible:false, + pictureList: [] + } + }, + methods: { + init(data) { + + this.visible = true + this.pictureList = data.map((item,index) => { + return { + url: '/ffzf/fileinfo/showImg/'+item, + title: item, + preview:'1', + //larg: require('@/assets/img/enlarge.png') + } + }) + this.$previewRefresh(); + console.log(this.pictureList,'pictureList-----pictureList') + } + } + } +</script> + +<style lang="scss"> + .pswp{ + z-index: 9999; + } + +</style> +<style lang="scss" scoped> + .previewDialog{ + position: relative; + cursor: pointer; + /*.enlargeBox{*/ + /* position: absolute;*/ + /* z-index: 99999;*/ + /* left: 50%;*/ + /* top: 50%;*/ + /* background: rgba(0,0,0,0.5);*/ + /* padding: 20px;*/ + /* border-radius: 20px;*/ + /* box-shadow:inset 0 0 2px 3px rgba(255,255,255,0.2), 0 0 8px rgba(255,255,255,0.6),0 0 20px rgba(255,255,255,0.3);*/ + /*}*/ + } +</style> diff --git a/src/components/page/ticket/ticket-form.vue b/src/components/page/ticket/ticket-form.vue new file mode 100644 index 0000000..e91e364 --- /dev/null +++ b/src/components/page/ticket/ticket-form.vue @@ -0,0 +1,222 @@ +<template> + <div> + <el-dialog + :title="!dataForm.id ? '鏂板' : '瀹屽杽淇℃伅'" + append-to-body + :close-on-click-modal="false" + :visible.sync="visible" + v-dialogDrag> + <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" + label-width="140px"> + <el-row> + <el-col :span="12"> + <el-form-item label="骞翠唤"> + <el-date-picker + style="width: 100%" + v-model="dataForm.year" + value-format="yyyy" + type="year" + placeholder="閫夋嫨骞�"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鏂囦功鍙�"> + <el-input v-model="dataForm.number"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <!--<el-col :span="12"> + <el-form-item label="鍐冲畾涔﹀彿"> + <el-input + v-model="dataForm.unitName" + placeholder="宄扮患褰撶綒鍐炽�� 銆曠 鍙�" + ></el-input> + </el-form-item> + </el-col>--> + + <el-col :span="12"> + <el-form-item label="褰撲簨浜�" prop="personName"> + <el-input v-model="dataForm.personName" placeholder="璇疯緭鍏ュ綋浜嬩汉"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="韬唤璇佸彿鐮�" prop="idCard"> + <el-input v-model="dataForm.idCard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙风爜"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + + <el-col :span="12"> + <el-form-item label="浣忓潃" prop="personAddress"> + <el-input v-model="dataForm.personAddress" placeholder="璇疯緭鍏ヤ綇鍧�"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鎵ц鏈熼檺" prop="days"> + <el-input v-model="dataForm.days" placeholder="璇疯緭鍏ユ墽琛屾湡闄�"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="12"> + <el-form-item label="鎵ф硶浜哄憳" prop="zfName1"> + <el-input v-model="dataForm.zfName1" placeholder="璇疯緭鍏ヨ处鍙�"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鎵ф硶璇佸彿" prop="zfNum1"> + <el-input v-model="dataForm.zfNum1" placeholder="璇疯緭鍏ユ埛鍚�"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="12"> + <el-form-item label="鎵ф硶浜哄憳" prop="zfName2"> + <el-input v-model="dataForm.zfName2" placeholder="璇疯緭鍏ヨ处鍙�"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鎵ф硶璇佸彿" prop="zfNum2"> + <el-input v-model="dataForm.zfNum2" placeholder="璇疯緭鍏ユ埛鍚�"></el-input> + </el-form-item> + </el-col> + </el-row> + </el-form> + <span slot="footer" class="dialog-footer"> + <el-button @click="visible = false">鍙栨秷</el-button> + <el-button type="primary" @click="dataFormSubmit()" :loading="loadingSubmit">纭畾</el-button> + <el-button type="primary" @click="viewVord(dataForm)">棰勮</el-button> + <el-button type="success" @click="downloadWord(dataForm)">涓嬭浇</el-button> + </span> + </el-dialog> + <WordView v-if="WordViewShow" ref="WordView"></WordView> + </div> +</template> + +<script> + import WordView from './word-view/index' + import {exportDoc} from '../../../libs/word' + + export default { + components: { + WordView + }, + data() { + return { + WordViewShow: false, //word鏂囨。鏄惁鏄剧ず + visible: false, + loadingSubmit:false, + dataForm: { + year:'', + number:'', + personName:'', + idCard: '', + chufaCheckList:[], + fakuanCheckList:[], + personAddress:'', + zfName1:'', + zfName2:'', + zfNum1:'', + zfNum2:'', + id:'', + days: '0' + + }, + dataRule: { + + personName: [ + {required: true, message: '褰撲簨浜轰笉鑳戒负绌�', trigger: 'blur'} + ], + personAddress: [ + {required: true, message: '褰撲簨浜哄湴鍧�涓嶈兘涓虹┖', trigger: 'blur'} + ], + idCard: [ + {required: true, message: '韬唤璇佸彿涓嶈兘涓虹┖', trigger: 'blur'} + ], + zfName1: [ + {required: true, message: '鎵ф硶浜哄憳1涓嶈兘涓虹┖', trigger: 'blur'} + ], + zfName2: [ + {required: true, message: '鎵ф硶浜哄憳2涓嶈兘涓虹┖', trigger: 'blur'} + ], + } + } + }, + methods: { + init(id) { + this.dataForm.id = id || null; + this.visible = true; + this.$nextTick(() => { + this.$refs['dataForm'].resetFields() + if (this.dataForm.id) { + this.$byutil.getData(this,this.$systemconfig.basePath+'/ffzf/ticket/'+id,null,res=>{ + this.dataForm = res.data + }) + } + }) + }, + viewVord(data) { //word棰勮 + this.WordViewShow = true + this.$nextTick(() => { + this.$refs.WordView.initWord(data,'/words/administrativeDecisionLetter.docx') + }) + }, + downloadWord(data) { //word涓嬭浇 + + exportDoc(data,'/words/administrativeDecisionLetter.docx','褰撳満琛屾斂澶勭綒鍐冲畾涔�') + }, + // 琛ㄥ崟鎻愪氦 + dataFormSubmit() { + this.$refs['dataForm'].validate((valid) => { + if (valid) { + this.loadingSubmit = true; + if (this.dataForm.id) { + this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/ticket/updateById', this.formData, res => { + if (res.code === 0) { + this.$notify.success('淇敼鎴愬姛') + this.visible = false + this.loadingSubmit = false; + this.$emit('refreshDataList') + } else { + this.loadingSubmit = false; + } + }) + } else { + alert("鏈�夋嫨杩濈珷杞﹁締") + } + } + }) + } + } + } +</script> +<style lang="scss"> + .el-checkbox.flexDate{ + display: flex; + align-items: baseline; + .el-checkbox__label{ + display: flex; + flex-wrap: wrap; + line-height: 2; + white-space: initial; + } + } +</style> +<style lang="scss" scoped> + .flexDate{ + display: flex; + span{ + margin-left: 5px; + } + } + .dialog-footer{ + display: flex; + justify-content: center; + .el-button{ + margin: 0 5px; + } + } +</style> diff --git a/src/components/page/ticket/word-view/index.vue b/src/components/page/ticket/word-view/index.vue new file mode 100644 index 0000000..9266fd5 --- /dev/null +++ b/src/components/page/ticket/word-view/index.vue @@ -0,0 +1,46 @@ +<template> + <el-dialog + title="棰勮" + :visible.sync="dialogVisible" + class="dialogStyle" + v-dialogDrag> + <div ref="word"></div> + </el-dialog> +</template> + +<script> + import {viewD} from '../../../../libs/word' + export default { + name: "index", + data() { + return { + dialogVisible: false, + } + }, + methods: { + initWord(data,url) { + this.dialogVisible = true + setTimeout(() => { + viewD(data,url,this.$refs.word) + },1000) + } + } + } +</script> + +<style lang="scss"> + .dialogStyle{ + .el-dialog{ + width: clamp(860px,47%,960px) !important; + } + .docx-wrapper{ + background:#fff!important; + } + } + +</style> +<style lang="scss" scoped> + :v-deep{ + + } +</style> diff --git a/src/components/page/user/index.vue b/src/components/page/user/index.vue index bda0419..882343d 100644 --- a/src/components/page/user/index.vue +++ b/src/components/page/user/index.vue @@ -102,7 +102,7 @@ this.formData.parkIds = this.parkIds.toString() this.$refs['formData'].validate((valid) => { if (valid) { - this.$byutil.postData(this, this.$systemconfig.basePath + '/user/save', this.formData, res => { + this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/user/save', this.formData, res => { this.$refs['formData'].resetFields(); this.flag=false; this.$message({message: '淇濆瓨鎴愬姛', type: 'success'}); @@ -114,10 +114,10 @@ }); }, loadData() { - this.$byutil.loadPageData(this, this.$systemconfig.basePath + '/user/findPage', this.searchForm); + this.$byutil.loadPageData(this, this.$systemconfig.basePath + '/ffzf/user/findPage', this.searchForm); }, getParkList(){ - this.$byutil.postData(this, this.$systemconfig.basePath + '/park/findAll',null,res => { + this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/park/findAll',null,res => { this.parkList = res.data }); }, @@ -154,7 +154,7 @@ console.log(this.parkIds) }, onDelete(index, row) { - this.$byutil.deleteData(this,this.$systemconfig.basePath+"/user/delete",{id:row.id}, res => { + this.$byutil.deleteData(this,this.$systemconfig.basePath+"/ffzf/user/delete",{id:row.id}, res => { this.$message({message: '鍒犻櫎鎴愬姛', type: 'success'}); this.loadData(); }) diff --git a/src/components/page/violationType/index.vue b/src/components/page/violationType/index.vue index 6e7c4aa..24de8db 100644 --- a/src/components/page/violationType/index.vue +++ b/src/components/page/violationType/index.vue @@ -12,7 +12,7 @@ </el-form> </div> - <el-table :data="pageData.rows" v-loading="pageData.isLoading" border style="width:100%;border:1px solid #bcbec2;"> + <el-table :data="pageData.rows" :height="tableHeight" v-loading="pageData.isLoading" border style="width:100%;border:1px solid #bcbec2;"> <el-table-column type="index" width="50" label="搴忓彿" align="center"> </el-table-column> <el-table-column prop="code" label="杩濈珷浠g爜" align="center" width="80"></el-table-column> <el-table-column prop="name" label="绠�绉�" align="center" width="200"></el-table-column> @@ -63,6 +63,7 @@ searchForm: { name: '' }, + tableHeight:500, pageData: this.$byutil.defaultPageData(), formData: { name: '', @@ -70,11 +71,12 @@ reducePoint: 0, content: '', }, - urlPath:this.$systemconfig.basePath + '/violationType/' + urlPath:this.$systemconfig.basePath + '/ffzf/violationType/' } }, mounted() { this.loadData(); + this.tableHeight = window.innerHeight - 260 }, methods: { onSave(){ diff --git a/src/components/page/whiteList/index.vue b/src/components/page/whiteList/index.vue index 9d28e3b..2153b46 100644 --- a/src/components/page/whiteList/index.vue +++ b/src/components/page/whiteList/index.vue @@ -12,7 +12,7 @@ </el-form> </div> - <el-table :data="pageData.rows" v-loading="pageData.isLoading" border style="width:100%;border:1px solid #bcbec2;"> + <el-table :height="tableHeight" :data="pageData.rows" v-loading="pageData.isLoading" border style="width:100%;border:1px solid #bcbec2;"> <el-table-column type="index" width="50" label="搴忓彿" align="center"> </el-table-column> <el-table-column prop="carNo" label="杞︾墝鍙�" align="center" width="150"></el-table-column> <el-table-column prop="type" label="绫诲瀷" align="center" width="100"> @@ -84,15 +84,17 @@ name: '', }, ids:[], - urlPath:this.$systemconfig.basePath + '/whiteList/', + urlPath:this.$systemconfig.basePath + '/ffzf/whiteList/', table1:[], + tableHeight:500, } }, mounted() { this.loadData(); - this.$byutil.postData(this, this.$systemconfig.basePath+'/park/findAll', this.formData, res => { + this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/park/findAll', this.formData, res => { this.table1 = res.data; }) + this.tableHeight = window.innerHeight - 260 }, methods: { selectChange(value){ diff --git a/src/components/page/zfticket/index.vue b/src/components/page/zfticket/index.vue new file mode 100644 index 0000000..3231ff0 --- /dev/null +++ b/src/components/page/zfticket/index.vue @@ -0,0 +1,188 @@ +<template> + <div class="mod-config"> + <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> + <el-form-item label="杞︾墝鍙�"> + <el-input v-model="searchForm.carNo" clearable></el-input> + </el-form-item> +<!-- <el-form-item label="鍋滆溅鍦�">--> +<!-- <el-select v-model="searchForm.parkId" clearable>--> +<!-- <el-option v-for="item in table1" :key="item.id" :label="item.name" :value="item.id" ></el-option>--> +<!-- </el-select>--> +<!-- </el-form-item>--> + <el-form-item> + <el-button type="primary" size="small" @click="getDataList" icon="el-icon-search">鏌ヨ</el-button> + </el-form-item> + </el-form> + + <div class="avue-crud"> + <el-table + :height="tableHeight" + :data="pageData.rows" + border + v-loading="pageData.isLoading"> + <el-table-column + type="index" + width="50" + label="搴忓彿" + align="center"> + </el-table-column> + <el-table-column + prop="carNo" + header-align="center" + align="center" + label="杞︾墝鍙�"> + </el-table-column> + <el-table-column + prop="code" + header-align="center" + align="center" + label="璁㈠崟鍙�"> + </el-table-column> + <el-table-column + prop="updateTime" + header-align="center" + align="center" + label="寮�绁ㄦ椂闂�"> + </el-table-column> + <el-table-column + prop="money" + header-align="center" + align="center" + width="100px" + label="閲戦"> + </el-table-column> + <el-table-column + prop="payCode" + header-align="center" + align="center" + label="鐢靛瓙缂存鐮�"> + </el-table-column> + <el-table-column + prop="ticketStatus" + header-align="center" + align="center" + width="100px" + label="寮�绁ㄧ姸鎬�"> + <template slot-scope="scope"> + <p v-if="scope.row.ticketStatus==0" style="color: red">鏈紑绁�</p> + <p v-if="scope.row.ticketStatus==1" >宸插紑绁�</p> + </template> + </el-table-column> + <el-table-column + header-align="center" + align="center" + label="鎿嶄綔"> + <template slot-scope="scope"> + <el-button type="text" size="small" icon="el-icon-view" @click="watchTicket(scope.row.fileId)">鏌ョ湅鍙戠エ</el-button> + <el-button type="text" size="small" icon="el-icon-download" @click="downTicket(scope.row.fileId)">涓嬭浇鍙戠エ</el-button> + </template> + </el-table-column> + </el-table> + <el-pagination background @size-change="onPageSizeChange" @current-change="onCurrentPageChange" :current-page="pageData.currentPage" :page-size="pageData.pageSize" :total="pageData.total" style="float: right"></el-pagination> + + </div> + + <el-dialog append-to-body title="鏌ョ湅鍙戠エ" :visible.sync="imgFlag" width="60%" > + <el-image + class = "my-img" + ref = "myImg" + :src="imageUrl" + :preview-src-list="srcList"> + </el-image> + </el-dialog> + </div> +</template> + +<script> + export default { + data () { + return { + tableHeight:500, + dataForm: { + key: '' + }, + table1:[], + pageData: this.$byutil.defaultPageData(), + searchForm: { + carNo:'', + parkId:'', + type:0, + current:this.pageIndex, + size:this.pageSize + }, + imageUrl:'', + imgFlag:false, + srcList:'', + dataList: [], + pageIndex: 1, + pageSize: 50, + totalPage: 0, + dataListLoading: false, + addOrUpdateVisible: false + } + }, + components: { + }, + created () { + this.getDataList() + this.tableHeight = window.innerHeight - 260 + }, + computed: { + }, + methods: { + // 鑾峰彇鏁版嵁鍒楄〃 + getDataList () { + this.dataListLoading = true + this.searchForm.current = this.pageIndex + this.searchForm.size = this.pageSize + this.$byutil.loadPageData(this, this.$systemconfig.basePath+'/ffzf/orderrecord/findPage', this.searchForm); + this.dataListLoading = false + }, + getAllPark(){ + this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/park/findAll', this.formData, res => { + this.table1 = res.data; + }) + }, + closeDialog(){ + this.imgFlag = false + }, + watchTicket(fileId){ + this.imgFlag = true + this.imageUrl = "/ffzf/fileinfo/showImgById/"+fileId + }, + downTicket(fileId){ + this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/fileinfo/download/downloadPng', {fileId:fileId}, res => { + + }) + }, + onPageSizeChange(val) { + this.pageData.pageSize = val; + this.loadData(); + }, + onCurrentPageChange(val) { + this.pageData.page = val; + this.loadData(); + }, + } + } +</script> +<style lang="scss" scoped> +.fenye-box2{ + width: calc(80% - 20px); +} +.per-up{ + position: relative; + .my-img{ + width: 100px; + height: 100px; + .el-image__inner{ + visibility: hidden ; + } + } + .my-pre{ + position: absolute; + margin-left: 111px; + margin-top: -156px; + } +} +</style> diff --git a/src/libs/dialogDrag.js b/src/libs/dialogDrag.js new file mode 100644 index 0000000..a138096 --- /dev/null +++ b/src/libs/dialogDrag.js @@ -0,0 +1,75 @@ +import Vue from 'vue'; +// v-dialogDrag: 寮圭獥鎷栨嫿灞炴�� +Vue.directive('dialogDrag', { + bind(el, binding, vnode, oldVnode) { + const dialogHeaderEl = el.querySelector('.el-dialog__header'); + const dragDom = el.querySelector('.el-dialog'); + // dialogHeaderEl.style.cursor = 'move'; + dialogHeaderEl.style.cssText += ';cursor:move;'; + dragDom.style.cssText += ';top:0px;'; + + // 鑾峰彇鍘熸湁灞炴�� ie dom鍏冪礌.currentStyle 鐏嫄璋锋瓕 window.getComputedStyle(dom鍏冪礌, null); + const sty = (function() { + if (window.document.currentStyle) { + return (dom, attr) => dom.currentStyle[attr]; + } else { + return (dom, attr) => getComputedStyle(dom, false)[attr]; + } + })(); + dialogHeaderEl.onmousedown = e => { + // 榧犳爣鎸変笅锛岃绠楀綋鍓嶅厓绱犺窛绂诲彲瑙嗗尯鐨勮窛绂� + const disX = e.clientX - dialogHeaderEl.offsetLeft; + const disY = e.clientY - dialogHeaderEl.offsetTop; + const screenWidth = document.body.clientWidth; // body褰撳墠瀹藉害 + const screenHeight = document.documentElement.clientHeight; // 鍙鍖哄煙楂樺害(搴斾负body楂樺害锛屽彲鏌愪簺鐜涓嬫棤娉曡幏鍙�) + const dragDomWidth = dragDom.offsetWidth; // 瀵硅瘽妗嗗搴� + const dragDomheight = dragDom.offsetHeight; // 瀵硅瘽妗嗛珮搴� + const minDragDomLeft = dragDom.offsetLeft; + const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth; + const minDragDomTop = dragDom.offsetTop; + const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomheight; + // 鑾峰彇鍒扮殑鍊煎甫px 姝e垯鍖归厤鏇挎崲 + let styL = sty(dragDom, 'left'); + let styT = sty(dragDom, 'top'); + // 娉ㄦ剰鍦╥e涓� 绗竴娆¤幏鍙栧埌鐨勫�间负缁勪欢鑷甫50% 绉诲姩涔嬪悗璧嬪�间负px + if (styL.includes('%')) { + // eslint-disable-next-line no-useless-escape + styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100); + // eslint-disable-next-line no-useless-escape + styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100); + } else { + styL = +styL.replace(/\px/g, ''); + styT = +styT.replace(/\px/g, ''); + } + + document.onmousemove = function(e) { + // 閫氳繃浜嬩欢濮旀墭锛岃绠楃Щ鍔ㄧ殑璺濈 + let left = e.clientX - disX; + let top = e.clientY - disY; + + // 杈圭晫澶勭悊 + if (-left > minDragDomLeft) { + left = -minDragDomLeft; + } else if (left > maxDragDomLeft) { + left = maxDragDomLeft; + } + if (-top > minDragDomTop) { + top = -minDragDomTop; + } else if (top > maxDragDomTop) { + top = maxDragDomTop; + } + + // 绉诲姩褰撳墠鍏冪礌 + dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`; + }; + + document.onmouseup = function(e) { + document.onmousemove = null; + document.onmouseup = null; + }; + return false; + }; + } +}); + + diff --git a/src/libs/word.js b/src/libs/word.js new file mode 100644 index 0000000..8990427 --- /dev/null +++ b/src/libs/word.js @@ -0,0 +1,89 @@ +import PizZip from 'pizzip' +import docxtemplater from 'docxtemplater' +import JSZipUtils from 'jszip-utils' +import { saveAs } from 'file-saver' +let docx = require("docx-preview"); +const ImageModule = require("docxtemplater-image-module-free"); + +//涓嬭浇word锛屼笉甯﹀浘鐗� +export const exportDoc = (e,path,dname) => { + for(let i in e) { + if(e[i] == null) { + e[i] = '' + } + } + let docxsrc = path; //妯℃澘鏂囦欢鐨勪綅缃� + let docxname = dname; //瀵煎嚭鏂囦欢鐨勫悕瀛� + // 璇诲彇骞惰幏寰楁ā鏉挎枃浠剁殑浜岃繘鍒跺唴瀹� + JSZipUtils.getBinaryContent(docxsrc,function (error, content) { + if (error) throw error // 鎶涘嚭寮傚父 + let zip = new PizZip(content) // 鍒涘缓涓�涓狫SZip瀹炰緥锛屽唴瀹逛负妯℃澘鐨勫唴瀹� + let doc = new docxtemplater().loadZip(zip) // 鍒涘缓骞跺姞杞絛ocxtemplater瀹炰緥瀵硅薄 + doc.setData(e) // 璁剧疆妯℃澘鍙橀噺鐨勫�� + try { + doc.render() // 鐢ㄦā鏉垮彉閲忕殑鍊兼浛鎹㈡墍鏈夋ā鏉垮彉閲� + } catch(error) { + let e = { + message: error.message, + name: error.name, + stack: error.stack, + properties: error.properties + } + console.log(JSON.stringify({ error: e })) + throw error // 鎶涘嚭寮傚父 + } + // 鐢熸垚涓�涓唬琛╠ocxtemplater瀵硅薄鐨剒ip鏂囦欢锛堜笉鏄竴涓湡瀹炵殑鏂囦欢锛岃�屾槸鍦ㄥ唴瀛樹腑鐨勮〃绀猴級 + let out = doc.getZip().generate({ + type: "blob", + mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" + }); + // 灏嗙洰鏍囨枃浠跺璞′繚瀛樹负鐩爣绫诲瀷鐨勬枃浠讹紝骞跺懡鍚� + saveAs(out, docxname); + }) +} + +//棰勮word锛屼笉甯﹀浘鐗囩殑 +export const viewD = (e, path , continer) => { + for (let attr in e) { + if (e[attr] == null) { + e[attr] = ""; + } + } + let docxsrc = path; //妯℃澘鏂囦欢鐨勪綅缃� + // 璇诲彇骞惰幏寰楁ā鏉挎枃浠剁殑浜岃繘鍒跺唴瀹� + JSZipUtils.getBinaryContent(docxsrc, function (error, content) { + // docxsrc鏄ā鏉裤�傛垜浠湪瀵煎嚭鐨勬椂鍊欙紝浼氭牴鎹妯℃澘鏉ュ鍑哄搴旂殑鏁版嵁 + // 鎶涘嚭寮傚父 + if (error) { + throw error; + } + + // 鍒涘缓涓�涓狿izZip瀹炰緥锛屽唴瀹逛负妯℃澘鐨勫唴瀹� + let zip = new PizZip(content); + // 鍒涘缓骞跺姞杞絛ocx templater瀹炰緥瀵硅薄 + let doc = new docxtemplater().loadZip(zip); + // 璁剧疆妯℃澘鍙橀噺鐨勫�� + doc.setData(e); + + try { + //鏇挎崲鎵�鏈夋ā鏉垮彉閲� + doc.render(); + } catch (error) { + let e = { + message: error.message, + name: error.name, + stack: error.stack, + properties: error.properties + }; + console.log(JSON.stringify({error: e})); + throw error; + } + + // 鐢熸垚涓�涓唬琛╠ocxtemplater瀵硅薄鐨剒ip鏂囦欢锛堜笉鏄竴涓湡瀹炵殑鏂囦欢锛岃�屾槸鍦ㄥ唴瀛樹腑鐨勮〃绀猴級 + let out = doc.getZip().generate({ + type: "blob", + mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" + }); + docx.renderAsync(out, continer); // 娓叉煋鍒伴〉闈㈤瑙� + }); +}; diff --git a/src/router/index.js b/src/router/index.js index bcc4c1f..86c3599 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -18,35 +18,31 @@ path: '/user', component: resolve => require(['../components/page/user/index.vue'], resolve), meta: { title: '浜哄憳绠$悊' } - },{ + }, + { path: '/park', component: resolve => require(['../components/page/park/index.vue'], resolve), meta: { title: '鍋滆溅鍦虹鐞�' } }, { - path: '/violationType', - component: resolve => require(['../components/page/violationType/index.vue'], resolve), - meta: { title: '杩濈珷绫诲瀷绠$悊' } + path: '/enterPark', + component: resolve => require(['../components/page/enterpark/index.vue'], resolve), + meta: { title: '杞﹁締鍏ュ満绠$悊' } }, { path: '/outPark', component: resolve => require(['../components/page/outPark/index.vue'], resolve), - meta: { title: '璁㈠崟绠$悊' } + meta: { title: '杞﹁締鍑哄満绠$悊' } + }, + { + path: '/parkticket', + component: resolve => require(['../components/page/parkticket/index.vue'], resolve), + meta: { title: '娉婅溅鍙戠エ绠$悊' } }, { path: '/whiteList', component: resolve => require(['../components/page/whiteList/index.vue'], resolve), meta: { title: '鐧藉悕鍗�' } - }, - { - path: '/ticket', - component: resolve => require(['../components/page/ticket/index.vue'], resolve), - meta: { title: '缃氬崟绠$悊' } - }, - { - path: '/street', - component: resolve => require(['../components/page/street/index.vue'], resolve), - meta: { title: '缃氬崟绠$悊' } }, { path: '/costRule', @@ -57,6 +53,26 @@ path: '/orderRecord', component: resolve => require(['../components/page/orderRecord/index.vue'], resolve), meta: { title: '璁㈠崟缁熻' } + }, + { + path: '/violationType', + component: resolve => require(['../components/page/violationType/index.vue'], resolve), + meta: { title: '杩濈珷绫诲瀷绠$悊' } + }, + { + path: '/ticket', + component: resolve => require(['../components/page/ticket/index.vue'], resolve), + meta: { title: '缃氬崟绠$悊' } + }, + { + path: '/zfticket', + component: resolve => require(['../components/page/zfticket/index.vue'], resolve), + meta: { title: '缃氭病鍙戠エ绠$悊' } + }, + { + path: '/street', + component: resolve => require(['../components/page/street/index.vue'], resolve), + meta: { title: '琛楅亾绠$悊' } }, ] }, @@ -79,15 +95,20 @@ component: resolve => require(['../components/page/Index2.vue'], resolve), meta: { title: '鏅烘収娉婅溅' } }, + // { + // path: '/index3', + // component: resolve => require(['../components/page/Index3.vue'], resolve), + // meta: { title: '鏃犵墝鍋滆溅' } + // }, + { + path: '/index4', + component: resolve => require(['../components/page/Index4.vue'], resolve), + meta: { title: '鏃犵墝鍏ュ満' } + }, { path: '/indexTest', component: resolve => require(['../components/page/IndexTest.vue'], resolve), meta: { title: '閭偍娴嬭瘯' } - }, - { - path: '/index3', - component: resolve => require(['../components/page/Index3.vue'], resolve), - meta: { title: '鏃犵墝鍋滆溅' } }, { path: '/invoice', diff --git a/vue.config.js b/vue.config.js index 5921df5..f7f0fd9 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,12 +1,22 @@ +var path = require("path") module.exports = { baseUrl: './', + configureWebpack: { + resolve: { + alias: { + '@': path.join(__dirname, 'src') + } + } + }, assetsDir: 'static', productionSourceMap: false, devServer: { + sockHost: 'demo.my-domain.com', + disableHostCheck: true, proxy: { '/api':{ - target:'http://183.196.93.178', - //target:'http://127.0.0.1', + //target:'http://183.196.93.178', + target:'http://127.0.0.1', changeOrigin:true, pathRewrite:{ '/api':'' -- Gitblit v1.9.1