Commit be16adfcb48d0972b1845de9fd5b238c6c1ff4ea

Authored by youxiw2000
1 parent 97214904

m

trash-admin/src/main/resources/application-dev.yml
... ... @@ -16,10 +16,10 @@ trash:
16 16 # 验证码类型 math 数组计算 char 字符验证
17 17 captchaType: math
18 18 # 远程服务器地址
19   - #remotePath: http://183.66.242.6:6001
20   - #token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJjc3poIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg0MzI3NzQ1ODkyfQ.4BrpgD9i_1TwjLRGqa3wo4Ikx8t8Gcl3FzHfjL_uolPnNMm2rd7fCvrUoBBN4Qp4cMGzg9h2Nt4NNx8PYThTaQ
21   - remotePath: http://183.66.242.6:14601
22   - token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJjc3poIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg0NDU5MjEzNzQ2fQ.85oIrOnU7cz7L_-IGt4Bt1LXDTkFtyrdqNt05K0v9-4nsrrzzpbjbemK-yMlbnUpe4Fx2FFES-Wbw8Yr8ML69w
  19 + remotePath: http://183.66.242.6:6001
  20 + token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJjc3poIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg0MzI3NzQ1ODkyfQ.4BrpgD9i_1TwjLRGqa3wo4Ikx8t8Gcl3FzHfjL_uolPnNMm2rd7fCvrUoBBN4Qp4cMGzg9h2Nt4NNx8PYThTaQ
  21 + #remotePath: http://183.66.242.6:14601
  22 + #token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJjc3poIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg0NDU5MjEzNzQ2fQ.85oIrOnU7cz7L_-IGt4Bt1LXDTkFtyrdqNt05K0v9-4nsrrzzpbjbemK-yMlbnUpe4Fx2FFES-Wbw8Yr8ML69w
23 23  
24 24 # 数据源配置
25 25 spring:
... ...
trash-ui/src/api/business/threestep.js
... ... @@ -81,3 +81,12 @@ export function exportThreestep(query) {
81 81 params: query
82 82 })
83 83 }
  84 +
  85 +// 导出【请填写功能名称】
  86 +export function getBase64(query) {
  87 + return request({
  88 + url: '/business/threestep/getBase64',
  89 + method: 'get',
  90 + params: query
  91 + })
  92 +}
... ...
trash-ui/src/api/caseOfflineInfo.js
... ... @@ -90,6 +90,8 @@ export default {
90 90 workflow:"workflow_caseoffline",
91 91 data:{},
92 92 adviceList:[],
  93 + showPic:false,
  94 + picImage:null,
93 95 };
94 96 },
95 97 created() {
... ... @@ -120,6 +122,17 @@ export default {
120 122 },
121 123  
122 124 downloadFile(path) {
  125 + if(path.indexOf(".jpg") > -1){
  126 +
  127 + getBase64({"path":path}).then(res=>{
  128 + if(res){
  129 + this.picImage = "data:image/jpg;base64," + res;
  130 + this.showPic = true;
  131 + }
  132 + });
  133 +
  134 + return;
  135 + }
123 136 window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
124 137 },
125 138 /** 修改按钮操作 */
... ...
trash-ui/src/api/threestepInfo.js 0 → 100644
  1 +
  2 + import {getThreestep,
  3 + getBase64,
  4 + } from "@/api/business/threestep";
  5 +
  6 + import {getToken} from "@/utils/auth";
  7 +
  8 +
  9 + import {
  10 + getArea,
  11 + truckList,
  12 + } from "@/api/dict";
  13 +
  14 +
  15 + export default {
  16 + name: "ThreestepInfo",
  17 + props: {
  18 + businessKey: {
  19 + type: String
  20 + }
  21 + },
  22 + data() {
  23 + return{
  24 + areas:[],
  25 + labelName : "工地名称",
  26 + labelName2: "绑定消纳场",
  27 + infoData:{type:0},
  28 + loading:null,
  29 + showPic:false,
  30 + picImage:null,
  31 + }
  32 + },
  33 + created() {
  34 + this.loading = true;
  35 + this.getInfo();
  36 +
  37 +
  38 + },
  39 + methods:{
  40 + downloadFile(path) {
  41 + if(path.indexOf(".jpg") > -1){
  42 +
  43 + getBase64({"path":path}).then(res=>{
  44 + if(res){
  45 + this.picImage = "data:image/jpg;base64," + res;
  46 + this.showPic = true;
  47 + }
  48 + });
  49 +
  50 + return;
  51 + }
  52 +
  53 +
  54 + window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
  55 + },
  56 +
  57 + getInfo() {
  58 + let id;
  59 + if(this.businessKey.split(":").length == 2){
  60 + id = this.businessKey.split(":")[1];
  61 + }else{
  62 + id = this.businessKey;
  63 + }
  64 +
  65 + getThreestep(id).then(response => {
  66 + this.infoData = response.data;
  67 +
  68 + this.selectType(this.infoData.type);
  69 + this.infoData.type = this.infoData.type + "";
  70 +
  71 +
  72 + getArea().then(res => {
  73 + this.areas = res.result;
  74 + this.loading = false;
  75 + for(let i =0;i<this.areas.length;i++){
  76 + if(Number(this.infoData.place) == this.areas[i].code){
  77 + this.infoData.place = this.areas[i].name;
  78 + }
  79 + }
  80 + });
  81 +
  82 + let query = {
  83 + 'page':1,
  84 + 'size':9999,
  85 + 'valid':0
  86 + }
  87 + truckList(query).then(res=>{
  88 + this.truckList = res.result.list;
  89 +
  90 + let trucks = "";
  91 +
  92 + for(let i in this.truckList){
  93 + if(this.infoData.companyTrucks.split(",").indexOf(this.truckList[i].id ) > -1){
  94 + trucks += this.truckList[i].licenseplateNo + ",";
  95 + }
  96 + }
  97 + this.infoData.companyTrucks = trucks;
  98 +
  99 + });
  100 +
  101 +
  102 + });
  103 + },
  104 + selectType(value) {
  105 + if (value == "0") {
  106 + this.labelName = "工地名称";
  107 + this.labelName2 = "绑定消纳场";
  108 + } else {
  109 + this.labelName = "消纳场名称";
  110 + this.labelName2 = "绑定工地";
  111 + }
  112 + },
  113 + }
  114 +
  115 +}
... ...
trash-ui/src/layout/index.vue
1 1 <template>
  2 + <div :class="classObj" class="app-wrapper">
  3 + <sidebar class="sidebar-container" />
  4 + <div :class="{hasTagsView:needTagsView}" class="main-container">
  5 + <tags-view v-if="needTagsView" />
2 6 <app-main />
  7 +
  8 + </div>
  9 + </div>
3 10 </template>
4 11  
5 12 <script>
... ...
trash-ui/src/layout/index3.vue renamed to trash-ui/src/layout/index4.vue
1 1 <template>
2   - <div :class="classObj" class="app-wrapper">
3   - <sidebar class="sidebar-container" />
4   - <div :class="{hasTagsView:needTagsView}" class="main-container">
5   - <tags-view v-if="needTagsView" />
6 2 <app-main />
7   -
8   - </div>
9   - </div>
10 3 </template>
11 4  
12 5 <script>
... ...
trash-ui/src/views/business/threestep/threestepInfo.vue
1 1 <template>
  2 + <div>
2 3 <el-form ref="form" label-width="120px" v-loading="loading">
3 4 <el-row type="flex" justify="center">
4 5 <el-col :span="12">
... ... @@ -414,107 +415,15 @@
414 415 </el-col>
415 416 </el-row>
416 417 </el-form>
  418 +
  419 + <el-dialog title="" :visible.sync="showPic" append-to-body width="400px">
  420 + <img :src="picImage" width="100%" height="400px" />
  421 + </el-dialog>
  422 + </div>
417 423 </template>
418 424  
419   -<script>
420   - import {getThreestep} from "@/api/business/threestep";
421 425  
422   - import {getToken} from "@/utils/auth";
423   -
424   -
425   - import {
426   - getArea,
427   - truckList,
428   - } from "@/api/dict";
429   -
430   -
431   - export default {
432   - name: "ThreestepInfo",
433   - props: {
434   - businessKey: {
435   - type: String
436   - }
437   - },
438   - data() {
439   - return{
440   - areas:[],
441   - labelName : "工地名称",
442   - labelName2: "绑定消纳场",
443   - infoData:{type:0},
444   - loading:null,
445   - }
446   - },
447   - created() {
448   - this.loading = true;
449   - this.getInfo();
450   -
451   -
452   - },
453   - methods:{
454   - downloadFile(path) {
455   - window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
456   - },
457   - getInfo() {
458   - let id;
459   - if(this.businessKey.split(":").length == 2){
460   - id = this.businessKey.split(":")[1];
461   - }else{
462   - id = this.businessKey;
463   - }
464   -
465   - getThreestep(id).then(response => {
466   - this.infoData = response.data;
467   -
468   - this.selectType(this.infoData.type);
469   - this.infoData.type = this.infoData.type + "";
470   -
471   -
472   - getArea().then(res => {
473   - this.areas = res.result;
474   - this.loading = false;
475   - for(let i =0;i<this.areas.length;i++){
476   - if(Number(this.infoData.place) == this.areas[i].code){
477   - this.infoData.place = this.areas[i].name;
478   - }
479   - }
480   - });
481   -
482   - let query = {
483   - 'page':1,
484   - 'size':9999,
485   - 'valid':0
486   - }
487   - truckList(query).then(res=>{
488   - this.truckList = res.result.list;
489   -
490   - let trucks = "";
491   -
492   - for(let i in this.truckList){
493   - if(this.infoData.companyTrucks.split(",").indexOf(this.truckList[i].id ) > -1){
494   - trucks += this.truckList[i].licenseplateNo + ",";
495   - }
496   - }
497   - this.infoData.companyTrucks = trucks;
498   -
499   - });
500   -
501   -
502   - });
503   - },
504   - selectType(value) {
505   - if (value == "0") {
506   - this.labelName = "工地名称";
507   - this.labelName2 = "绑定消纳场";
508   - } else {
509   - this.labelName = "消纳场名称";
510   - this.labelName2 = "绑定工地";
511   - }
512   - },
513   - }
514   -
515   -}
516   -
517   -</script>
  426 +<script src="../../../api/threestepInfo">
518 427  
519 428 <style>
520 429 </style>
... ...
trash-ui/src/views/caseOffline/caseOffline/caseOfflineInfo.vue
1 1 <template>
2 2  
  3 + <div>
3 4 <el-form ref="form" :model="form" :rules="rules" label-width="80px">
4 5 <el-form-item label="案卷类型" prop="type">
5 6 <el-input v-model="form.type" type="textarea" :rows="3" disabled />
... ... @@ -48,6 +49,10 @@
48 49  
49 50  
50 51 </el-form>
  52 + <el-dialog title="" :visible.sync="showPic" append-to-body width="400px">
  53 + <img :src="picImage" width="100%" height="400px" />
  54 + </el-dialog>
  55 + </div>
51 56 </template>
52 57  
53 58 <script src="../../../api/caseOfflineInfo">
... ...
trash-ui/src/views/h5/caseOffline/caseOfflineInfo.vue
1 1 <template>
2 2  
  3 + <div>
3 4 <el-form ref="form" :model="form" :rules="rules" label-width="80px">
4 5 <el-form-item label="案卷类型" prop="type">
5 6 <el-input v-model="form.type" type="textarea" :rows="3" disabled />
... ... @@ -47,7 +48,11 @@
47 48 </el-table>
48 49  
49 50  
50   - </el-form>
  51 + </el-form>
  52 + <el-dialog title="" :visible.sync="showPic" append-to-body width="400px">
  53 + <img :src="picImage" width="100%" height="400px" />
  54 + </el-dialog>
  55 + </div>
51 56 </template>
52 57  
53 58 <script src="../../../api/caseOfflineInfo" >
... ...
trash-ui/src/views/h5/task/threestepInfo.vue
1 1 <template>
  2 + <div>
  3 +
  4 +
2 5 <el-form ref="form" label-width="100px" v-loading="loading">
3 6  
4 7 <el-row >
... ... @@ -410,7 +413,7 @@
410 413 <el-form-item label="抽查时间" v-if="infoData.checkEndTime">
411 414 <el-input v-model="infoData.checkEndTime" :maxlength="20" show-word-limit disabled />
412 415 </el-form-item>
413   -
  416 +
414 417  
415 418  
416 419 <el-row type="flex" justify="center" v-if="infoData.subSubReason">
... ... @@ -458,107 +461,15 @@
458 461 </el-col>
459 462 </el-row>
460 463 </el-form>
461   -</template>
462 464  
463   -<script>
464   - import {getThreestep} from "@/api/business/threestep";
465   -
466   - import {getToken} from "@/utils/auth";
467   -
468   -
469   - import {
470   - getArea,
471   - truckList,
472   - } from "@/api/dict";
473   -
474   -
475   - export default {
476   - name: "ThreestepInfo",
477   - props: {
478   - businessKey: {
479   - type: String
480   - }
481   - },
482   - data() {
483   - return{
484   - areas:[],
485   - labelName : "工地名称",
486   - labelName2: "绑定消纳场",
487   - infoData:{type:0},
488   - loading:null,
489   - }
490   - },
491   - created() {
492   - this.loading = true;
493   - this.getInfo();
494   -
495   -
496   - },
497   - methods:{
498   - downloadFile(path) {
499   - window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
500   - },
501   -
502   - getInfo() {
503   - let id;
504   - if(this.businessKey.split(":").length == 2){
505   - id = this.businessKey.split(":")[1];
506   - }else{
507   - id = this.businessKey;
508   - }
509   -
510   - getThreestep(id).then(response => {
511   - this.infoData = response.data;
512   -
513   - this.selectType(this.infoData.type);
514   - this.infoData.type = this.infoData.type + "";
515   -
516   -
517   - getArea().then(res => {
518   - this.areas = res.result;
519   - this.loading = false;
520   - for(let i =0;i<this.areas.length;i++){
521   - if(Number(this.infoData.place) == this.areas[i].code){
522   - this.infoData.place = this.areas[i].name;
523   - }
524   - }
525   - });
526   -
527   - let query = {
528   - 'page':1,
529   - 'size':9999,
530   - 'valid':0
531   - }
532   - truckList(query).then(res=>{
533   - this.truckList = res.result.list;
534   -
535   - let trucks = "";
536   -
537   - for(let i in this.truckList){
538   - if(this.infoData.companyTrucks.split(",").indexOf(this.truckList[i].id ) > -1){
539   - trucks += this.truckList[i].licenseplateNo + ",";
540   - }
541   - }
542   - this.infoData.companyTrucks = trucks;
543   -
544   - });
545   -
546   -
547   - });
548   - },
549   - selectType(value) {
550   - if (value == "0") {
551   - this.labelName = "工地名称";
552   - this.labelName2 = "绑定消纳场";
553   - } else {
554   - this.labelName = "消纳场名称";
555   - this.labelName2 = "绑定工地";
556   - }
557   - },
558   - }
559   -
560   -}
  465 + <el-dialog title="" :visible.sync="showPic" append-to-body width="400px">
  466 + <img :src="picImage" width="100%" height="400px" />
  467 + </el-dialog>
  468 + </div>
  469 +
  470 +</template>
561 471  
  472 +<script src="../../../api/threestepInfo">
562 473 </script>
563 474  
564 475 <style>
... ...
trash-ui/src/views/h5/task/violationCaseFileInfo.vue
... ... @@ -119,6 +119,7 @@
119 119 <el-dialog title="预览" :visible.sync="openImg" append-to-body v-if="entryType==0" width="300px">
120 120 <img :src="img" width="100%" height="750px" />
121 121 </el-dialog>
  122 +
122 123 </el-form>
123 124 </template>
124 125  
... ...
trash-ui/src/views/h5/threestep/index.vue
... ... @@ -145,7 +145,7 @@
145 145 <el-col :span="12">
146 146 <a style="color:blue;font-size: 12px;" @click="showFileUpload(0)">过水槽照片</a>
147 147 <el-input v-model="form.img0" type="hidden"></el-input>
148   - <p v-for="img,index in form.img0">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(0,img)" style="color:red"> x</a></p>
  148 + <p v-for="img,index in form.img0">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(0,img)" style="color:red"> x</a></p>
149 149 </el-col>
150 150 <el-col :span="12">
151 151 <a style="color:blue;font-size: 12px;" @click="showFileUpload(1)">洗车平台照片</a>
... ... @@ -294,16 +294,12 @@
294 294  
295 295 </template>
296 296  
297   -<script>
298   -
299   -</script>
300   -
301 297 <script src="../../../api/three_step.js" />
302 298 <style scope>
303 299 .el-select-dropdown__item{
304 300 width:300px;
305 301 }
306   -
  302 +
307 303 .card_title{
308 304 word-break: break-all;
309 305 }
... ...
trash-ui/vue.config.js
... ... @@ -41,8 +41,8 @@ module.exports = {
41 41 }
42 42 },
43 43 ['/api']: {
44   - target: `http://183.66.242.6:14601`,
45   - // target: `http://183.66.242.6:6001`,
  44 + // target: `http://183.66.242.6:14601`,
  45 + target: `http://183.66.242.6:6001`,
46 46 changeOrigin: true,
47 47 },
48 48  
... ...
trash-workFlow/src/main/java/com/trash/business/controller/SupervisionThreestepController.java
1 1 package com.trash.business.controller;
2 2  
  3 +import java.io.File;
  4 +import java.io.FileInputStream;
3 5 import java.io.IOException;
4 6 import java.util.ArrayList;
5 7 import java.util.Date;
... ... @@ -11,6 +13,7 @@ import javax.servlet.http.HttpServletRequest;
11 13 import javax.servlet.http.HttpServletResponse;
12 14  
13 15 import org.springframework.security.access.prepost.PreAuthorize;
  16 +import org.springframework.util.Base64Utils;
14 17 import org.springframework.beans.factory.annotation.Autowired;
15 18 import org.springframework.web.bind.annotation.GetMapping;
16 19 import org.springframework.web.bind.annotation.PostMapping;
... ... @@ -375,4 +378,30 @@ public class SupervisionThreestepController extends BaseController
375 378 e.printStackTrace();
376 379 }
377 380 }
  381 +
  382 + @RequestMapping(value = "/getBase64")
  383 + public String getBase64(@RequestParam("path") String path) throws IOException {
  384 + try
  385 + {
  386 + String realFileName = path.split("/")[path.split("/").length-1];
  387 + String filePath = trashConfig.getUploadPath() + path.replace("/profile/upload", "");
  388 +
  389 + File file = new File(filePath);
  390 +
  391 +
  392 + FileInputStream fileInputStream = new FileInputStream(file);
  393 +
  394 + byte[] bytes = new byte[fileInputStream.available()];
  395 +
  396 + fileInputStream.read(bytes);
  397 +
  398 + return Base64Utils.encodeToString(bytes);
  399 +
  400 + }
  401 + catch (Exception e)
  402 + {
  403 + e.printStackTrace();
  404 + }
  405 + return null;
  406 + }
378 407 }
... ...