Commit 20033b3e09de8cdd580fb5d938dd002ec82ba719

Authored by 273548560@qq.com
1 parent 7d80695e

修复bug

trash-common/src/main/java/com/trash/common/utils/file/MimeTypeUtils.java
... ... @@ -34,7 +34,9 @@ public class MimeTypeUtils
34 34 // pdf
35 35 "pdf" ,
36 36 //activiti
37   - "bpmn", "bar" };
  37 + "bpmn", "bar",
  38 + // video
  39 + "mp4", "avi"};
38 40  
39 41 public static String getExtension(String prefix)
40 42 {
... ...
trash-ui/src/api/caseOfflineInfo.js
... ... @@ -115,6 +115,9 @@ export default {
115 115 showSlides(path) {
116 116 return process.env.VUE_APP_BASE_API + path;
117 117 },
  118 + showVideo(path) {
  119 + return process.env.VUE_APP_BASE_API + path;
  120 + },
118 121 /** 修改按钮操作 */
119 122 handleUpdate() {
120 123 let id;
... ...
trash-ui/src/api/caseoffline.js
... ... @@ -96,7 +96,8 @@ export default {
96 96 },
97 97 data:{},
98 98 objId:null,
99   - slides:[]
  99 + slides:[],
  100 + videoSrc:[]
100 101 };
101 102 },
102 103 created() {
... ... @@ -173,7 +174,9 @@ export default {
173 174 cancel() {
174 175 this.open = false;
175 176 this.open2 = false;
  177 + this.uploadImageDialog = false;
176 178 this.slides = [];
  179 + this.videoSrc = [];
177 180 this.reset();
178 181 },
179 182 // 表单重置
... ... @@ -309,6 +312,11 @@ export default {
309 312 this.slides.splice(i, 1);
310 313 }
311 314 }
  315 + for(let i=0;i<this.videoSrc.length;i++){
  316 + if(this.videoSrc[i].alt==img){
  317 + this.videoSrc.splice(i, 1);
  318 + }
  319 + }
312 320  
313 321 this.$forceUpdate();
314 322 },
... ... @@ -327,6 +335,14 @@ export default {
327 335 url:url,
328 336 alt:res
329 337 })
  338 +
  339 + }
  340 + if(file.name.indexOf('.avi') > -1 ||file.name.indexOf('.mp4') > -1){
  341 + let url = URL.createObjectURL(file.raw)
  342 + this.videoSrc.push({
  343 + url:url,
  344 + alt:res
  345 + });
330 346 }
331 347 },
332 348 showFileUpload(i) {
... ... @@ -334,18 +350,18 @@ export default {
334 350 this.picIndex = i;
335 351 },
336 352 beforeUpload(file) {
337   - let isRightSize = file.size / 1024 / 1024 < 20
  353 + let isRightSize = file.size / 1024 / 1024 < 100
338 354 if (!isRightSize) {
339   - this.$message.error('文件大小超过 20MB')
  355 + this.$message.error('文件大小超过 100MB')
340 356 return isRightSize;
341 357 }
342 358 let isAccept = false;
343 359 if (file.name.indexOf('.docx') > -1 || file.name.indexOf(".jpg") > -1 || file.name.indexOf('.doc') > -1 || file
344   - .name.indexOf('.pdf') > -1 || file.name.indexOf('.png') > -1) {
  360 + .name.indexOf('.pdf') > -1 || file.name.indexOf('.png') > -1||file.name.indexOf('.mp4') > -1 || file.name.indexOf(".avi") > -1) {
345 361 isAccept = true;
346 362 }
347 363 if (!isAccept) {
348   - this.$message.error('应该选择PDF、PNG、JPG、WORD类型的文件')
  364 + this.$message.error('应该选择PDF、PNG、JPG、WORD、mp4、avi类型的文件')
349 365 return isAccept;
350 366 }
351 367 },
... ...
trash-ui/src/api/vio_casefile.js
... ... @@ -127,12 +127,14 @@ export default {
127 127 isLoadingCompany: false,
128 128 idInfo:null,
129 129 openInfo:false,
130   - slide1: []
  130 + slide1: [],
  131 + videoSrc:[]
131 132 };
132 133 },
133 134 watch: {
134 135 fileEntityList(value) {
135 136 this.slide1 = []
  137 + this.videoSrc = []
136 138 if (this.fileEntityList.length != 0) {
137 139 this.fileEntityList.map(item => {
138 140 if (item.name.indexOf(".jpg") > -1 || item.name.indexOf(".png") > -1 || item.name.indexOf(".jpeg") > -1 || item.name.indexOf(".jpg") > -1) {
... ... @@ -142,6 +144,13 @@ export default {
142 144 this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
143 145 }
144 146 }
  147 + if(item.name.indexOf(".mp4") > -1 || item.name.indexOf(".avi") > -1){
  148 + if (item.raw != null) {
  149 + this.videoSrc.push(URL.createObjectURL(item.raw));
  150 + } else {
  151 + this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
  152 + }
  153 + }
145 154 })
146 155 }
147 156  
... ... @@ -247,7 +256,7 @@ export default {
247 256 this.open = true;
248 257 this.form.number = this.getNumber();
249 258 this.form.violationGrade = "一般类";
250   - this.form.sendObject = "区管理部门(治)";
  259 + this.form.sendObject = "区管理部门";
251 260 this.title = "添加平台违规案卷";
252 261 },
253 262 /** 修改按钮操作 */
... ... @@ -411,11 +420,11 @@ export default {
411 420 }
412 421 let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
413 422 //格式符合后判断大小
414   - if ("docx,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) {
415   - let max5M = file.size / 1024 / 1024 < 20;
  423 + if ("docx,doc,pdf,png,jpeg,png,jpg,mp4,avi".indexOf(fileType) != -1) {
  424 + let max5M = file.size / 1024 / 1024 < 100;
416 425 if (!max5M) {
417 426 this.$message({
418   - message: '上传文件大小不得超过20M!',
  427 + message: '上传文件大小不得超过100M!',
419 428 type: 'warning'
420 429 });
421 430 fileList = fileList.splice(fileList.length - 1, 1);
... ... @@ -425,7 +434,7 @@ export default {
425 434 }
426 435 } else {
427 436 this.$message({
428   - message: '上传文件只能是 docx、doc、pdf、png、jpeg、png、jpg格式!',
  437 + message: '上传文件只能是 docx、doc、pdf、png、jpeg、png、jpg、mp4、avi格式!',
429 438 type: 'warning'
430 439 });
431 440 fileList = fileList.splice(fileList.length - 1, 1);
... ... @@ -435,6 +444,7 @@ export default {
435 444 handleDeleteFile(index) {
436 445 this.fileEntityList.splice(index, 1);
437 446 this.slide1.splice(index, 1);
  447 + this.videoSrc.splice(index, 1);
438 448 },
439 449 /** 文件下载 */
440 450 downloadFA(row) {
... ...
trash-ui/src/api/warningInfo.js
... ... @@ -179,12 +179,14 @@ export default {
179 179 data: {},
180 180 showPic: null,
181 181 picImage: null,
182   - slide1: []
  182 + slide1: [],
  183 + videoSrc:[]
183 184 };
184 185 },
185 186 watch: {
186 187 fileEntityList(value) {
187 188 this.slide1 = []
  189 + this.videoSrc = []
188 190 if (this.fileEntityList.length != 0) {
189 191 this.fileEntityList.map(item => {
190 192 if (item.name.indexOf(".jpg") > -1 || item.name.indexOf(".png") > -1 || item.name.indexOf(".jpeg") > -1 || item.name.indexOf(".jpg") > -1) {
... ... @@ -194,6 +196,13 @@ export default {
194 196 this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
195 197 }
196 198 }
  199 + if(item.name.indexOf(".mp4") > -1 || item.name.indexOf(".avi") > -1){
  200 + if (item.raw != null) {
  201 + this.videoSrc.push(URL.createObjectURL(item.raw));
  202 + } else {
  203 + this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
  204 + }
  205 + }
197 206 })
198 207 }
199 208  
... ... @@ -302,7 +311,7 @@ export default {
302 311 this.open = true;
303 312 this.form.number = this.getNumber();
304 313 this.form.violationGrade = "一般类";
305   - this.form.sendObject = "区管理部门(治)";
  314 + this.form.sendObject = "区管理部门";
306 315 this.title = "添加违规预警信息";
307 316 },
308 317 /** 修改按钮操作 */
... ... @@ -475,11 +484,11 @@ export default {
475 484 }
476 485 let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
477 486 //格式符合后判断大小
478   - if ("docx,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) {
479   - let max5M = file.size / 1024 / 1024 < 20;
  487 + if ("docx,doc,pdf,png,jpeg,png,jpg,mp4,avi".indexOf(fileType) != -1) {
  488 + let max5M = file.size / 1024 / 1024 < 100;
480 489 if (!max5M) {
481 490 this.$message({
482   - message: '上传文件大小不得超过20M!',
  491 + message: '上传文件大小不得超过100M!',
483 492 type: 'warning'
484 493 });
485 494 fileList = fileList.splice(fileList.length - 1, 1);
... ... @@ -489,7 +498,7 @@ export default {
489 498 }
490 499 } else {
491 500 this.$message({
492   - message: '上传文件只能是 docx、doc、pdf、png、jpeg、png、jpg格式!',
  501 + message: '上传文件只能是 docx、doc、pdf、png、jpeg、png、jpg、mp4、avi格式!',
493 502 type: 'warning'
494 503 });
495 504 fileList = fileList.splice(fileList.length - 1, 1);
... ... @@ -499,6 +508,7 @@ export default {
499 508 handleDeleteFile(index) {
500 509 this.fileEntityList.splice(index, 1);
501 510 this.slide1.splice(index, 1);
  511 + this.videoSrc.splice(index, 1);
502 512 },
503 513 /** 文件下载 */
504 514 downloadFA(row) {
... ...
trash-ui/src/views/business/supervisionSpecial/index.vue
... ... @@ -2,18 +2,18 @@
2 2 <div class="app-container">
3 3 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
4 4 <el-form-item label="类型" prop="type">
5   - <el-select v-model="queryParams.type" placeholder="请选择类型" size="small">
6   - <el-option label="工地" value="0" />
7   - <el-option label="处理场所" value="1" />
  5 + <el-select v-model="queryParams.type" placeholder="请选择类型" size="small">
  6 + <el-option label="工地" value="0"/>
  7 + <el-option label="处理场所" value="1"/>
8 8 </el-select>
9 9 </el-form-item>
10 10 <el-form-item label="项目名称" prop="title">
11   - <el-input v-model="queryParams.title" placeholder="请输入项目名称" size="small"
12   - />
  11 + <el-input v-model="queryParams.title" placeholder="请输入项目名称" size="small"
  12 + />
13 13 </el-form-item>
14 14 <el-form-item label="所属区域" prop="place">
15   - <el-select v-model="queryParams.place" placeholder="请选择类型" size="small">
16   - <el-option v-for="item in areas" :label="item.name" :value="item.name" />
  15 + <el-select v-model="queryParams.place" placeholder="请选择类型" size="small">
  16 + <el-option v-for="item in areas" :label="item.name" :value="item.name"/>
17 17 </el-select>
18 18 </el-form-item>
19 19 <el-form-item>
... ... @@ -25,59 +25,63 @@
25 25 <el-row :gutter="10" class="mb8">
26 26 <el-col :span="1.5">
27 27 <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
28   - v-hasPermi="['SupervisionSpecial:SupervisionSpecial:add']">新增</el-button>
  28 + v-hasPermi="['SupervisionSpecial:SupervisionSpecial:add']">新增
  29 + </el-button>
29 30 </el-col>
30 31 <el-col :span="1.5">
31 32 <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport"
32   - v-hasPermi="['SupervisionSpecial:SupervisionSpecial:export']">导出</el-button>
  33 + v-hasPermi="['SupervisionSpecial:SupervisionSpecial:export']">导出
  34 + </el-button>
33 35 </el-col>
34 36 <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
35 37 </el-row>
36 38  
37 39 <el-table v-loading="loading" :data="SupervisionSpecialList" @selection-change="handleSelectionChange">
38   - <el-table-column type="selection" width="55" align="center" />
39   - <el-table-column label="序号" align="center" type="index" />
40   - <el-table-column label="所属区域" align="center" prop="place" />
  40 + <el-table-column type="selection" width="55" align="center"/>
  41 + <el-table-column label="序号" align="center" type="index"/>
  42 + <el-table-column label="所属区域" align="center" prop="place"/>
41 43 <el-table-column label="填报日期" align="center" prop="createTime" width="180">
42 44 <template slot-scope="scope">
43 45 <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
44 46 </template>
45 47 </el-table-column>
46   - <el-table-column label="项目名称" align="center" prop="title" />
47   - <el-table-column label="督查内容" align="center" prop="content" />
48   - <el-table-column label="督查人" align="center" prop="person" />
  48 + <el-table-column label="项目名称" align="center" prop="title"/>
  49 + <el-table-column label="督查内容" align="center" prop="content"/>
  50 + <el-table-column label="督查人" align="center" prop="person"/>
49 51  
50 52 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
51 53 <template slot-scope="scope">
52 54 <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
53   - v-hasPermi="['SupervisionSpecial:SupervisionSpecial:edit']">查看详情</el-button>
  55 + v-hasPermi="['SupervisionSpecial:SupervisionSpecial:edit']">查看详情
  56 + </el-button>
54 57 </template>
55 58 </el-table-column>
56 59 </el-table>
57 60  
58 61 <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
59   - @pagination="getList" />
  62 + @pagination="getList"/>
60 63  
61 64 <!-- 添加或修改专项督察对话框 -->
62 65 <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
63 66 <el-form ref="form" :model="form" :rules="rules" label-width="80px">
64 67 <el-form-item label="类型" prop="type">
65 68 <el-select v-model="form.type" placeholder="请选择类型" @change="form.title=null;">
66   - <el-option label="工地" value="0" />
67   - <el-option label="处理场所" value="1" />
  69 + <el-option label="工地" value="0"/>
  70 + <el-option label="处理场所" value="1"/>
68 71 </el-select>
69 72 </el-form-item>
70 73 <el-row>
71 74 <el-col :span="12">
72 75 <el-form-item label="项目名称" prop="title">
73   - <el-select v-model="form.title" placeholder="项目名称" >
74   - <el-option v-for="item in data[form.type]" :label="item.name" :value="item.name" @click.native="selectName(item)"/>
  76 + <el-select v-model="form.title" placeholder="项目名称">
  77 + <el-option v-for="item in data[form.type]" :label="item.name" :value="item.name"
  78 + @click.native="selectName(item)"/>
75 79 </el-select>
76 80 </el-form-item>
77 81 </el-col>
78 82 <el-col :span="12">
79 83 <el-form-item label="督查人" prop="person">
80   - <el-input v-model="form.person" placeholder="请输入督查人" />
  84 + <el-input v-model="form.person" placeholder="请输入督查人"/>
81 85 </el-form-item>
82 86 </el-col>
83 87  
... ... @@ -85,220 +89,353 @@
85 89 <el-form-item label="督查内容">
86 90 <el-input type="textarea" v-model="form.content" placeholder="督查内容" :rows="8"/>
87 91 </el-form-item>
  92 + <el-form-item label="附件" prop="attach" v-if="form.id==null">
  93 + <a style="color:blue;font-size: 12px;" @click="uploadImageDialog=true;">选择附件</a>
  94 + <br/>
  95 + <el-image v-for="item in slides"
  96 + style="width: 150px; height: 100px; margin: 5px;"
  97 + :src="item.url"
  98 + :preview-src-list="[item.url]"
  99 + :z-index="2000">
  100 + </el-image>
  101 + <div style="display: inline-block;margin: 5px;position: relative; width: 150px;height: 100px;overflow:hidden;" v-for="item in videoSrc" >
  102 + <video width="100%" controls="controls" height="100%" :src="item.url"></video>
  103 + </div>
  104 + <el-input v-model="form.attach" type="hidden"></el-input>
  105 + <div style="color: blue;" v-for="(img,index) in form.attach">{{ img.split("/")[img.split("/").length - 1] }}<a
  106 + @click="removeAttchItem(index,img)" style="color:red;">X</a></div>
  107 + </el-form-item>
  108 + <el-form-item label="附件" prop="attach" v-if="form.id!=null">
  109 + <el-image v-for="(item,index) in form.attach"
  110 + v-if="item.indexOf('.png') != -1||item.indexOf('.jpg') != -1"
  111 + style="width: 150px; height: 100px; margin: 5px;"
  112 + :src="showSlides(item)"
  113 + :preview-src-list="[showSlides(item)]"
  114 + :z-index="2000">
  115 + </el-image>
  116 + <div style="display: inline-block;margin: 5px;position: relative; width: 150px;height: 100px;overflow:hidden;" v-for="(item,index) in form.attach" v-if="item.indexOf('.avi') != -1||item.indexOf('.mp4') != -1">
  117 + <video width="100%" controls="controls" height="100%" :src="showVideo(item)"></video>
  118 + </div>
  119 + <el-input v-model="form.attach" type="hidden"></el-input>
  120 + <a @click="downloadFile(img);" style="color: blue;" v-for="(img,index) in form.attach"> {{ img.split("/")[img.split("/").length - 1] }} </a>
  121 + </el-form-item>
88 122 </el-form>
89 123 <div slot="footer" class="dialog-footer">
90 124 <el-button type="primary" @click="submitForm">确 定</el-button>
91 125 <el-button @click="cancel">取 消</el-button>
92 126 </div>
93 127 </el-dialog>
  128 + <el-dialog title="附件" :visible.sync="uploadImageDialog" append-to-body :beforeClose="handleClose">
  129 + <el-upload multiple :headers="upload.headers" :action="upload.url" :file-list="fileList"
  130 + accept=".docx,.doc,.pdf,.png,.jpeg,.png,.jpg,.mp4,.avi"
  131 + :on-success="uploadSuccess" :before-upload="beforeUpload">
  132 + <el-button size="small" type="primary">选择附件</el-button>
  133 + <div slot="tip" class="el-upload__tip">只能上传不超过 20MB 的jpg、png、pdf、word、avi、mp4文件</div>
  134 + </el-upload>
  135 + <div style="height: 40px;width:100%;">
  136 + <el-button type="primary" style="margin-top: 20px;float:right;" @click="handleClose">关闭</el-button>
  137 + </div>
  138 + </el-dialog>
94 139 </div>
95 140 </template>
96 141  
97 142 <script>
98   - import {
99   - listSupervisionSpecial,
100   - getSupervisionSpecial,
101   - delSupervisionSpecial,
102   - addSupervisionSpecial,
103   - updateSupervisionSpecial,
104   - exportSupervisionSpecial
105   - }
106   - from "@/api/business/supervisionSpecial";
  143 +import {
  144 + addSupervisionSpecial,
  145 + delSupervisionSpecial,
  146 + exportSupervisionSpecial,
  147 + getSupervisionSpecial,
  148 + listSupervisionSpecial,
  149 + updateSupervisionSpecial
  150 +} from "@/api/business/supervisionSpecial";
107 151  
108   - import Editor from '@/components/Editor';
  152 +import Editor from '@/components/Editor';
109 153  
110   - import {
111   - earthsitesList,
112   - constructionsitesList,
113   - getArea,
114   - } from "@/api/dict";
  154 +import {constructionsitesList, earthsitesList, getArea,} from "@/api/dict";
  155 +import {getToken} from "@/utils/auth";
115 156  
116   - export default {
117   - name: "SupervisionSpecial",
118   - components: {
119   - Editor
120   - },
121   - data() {
122   - return {
123   - // 遮罩层
124   - loading: true,
125   - // 选中数组
126   - ids: [],
127   - // 非单个禁用
128   - single: true,
129   - // 非多个禁用
130   - multiple: true,
131   - // 显示搜索条件
132   - showSearch: true,
133   - // 总条数
134   - total: 0,
135   - // 专项督察表格数据
136   - SupervisionSpecialList: [],
137   - // 弹出层标题
138   - title: "",
139   - // 是否显示弹出层
  157 +export default {
  158 + name: "SupervisionSpecial",
  159 + components: {
  160 + Editor
  161 + },
  162 + data() {
  163 + return {
  164 + // 遮罩层
  165 + loading: true,
  166 + // 选中数组
  167 + ids: [],
  168 + // 非单个禁用
  169 + single: true,
  170 + // 非多个禁用
  171 + multiple: true,
  172 + // 显示搜索条件
  173 + showSearch: true,
  174 + // 总条数
  175 + total: 0,
  176 + // 专项督察表格数据
  177 + SupervisionSpecialList: [],
  178 + // 弹出层标题
  179 + title: "",
  180 + // 是否显示弹出层
  181 + open: false,
  182 + // 查询参数
  183 + queryParams: {
  184 + pageNum: 1,
  185 + pageSize: 10,
  186 + type: null,
  187 + title: null,
  188 + content: null,
  189 + person: null,
  190 + place: null,
  191 + },
  192 + data: {},
  193 + areas: [],
  194 + // 表单参数
  195 + form: {},
  196 + // 表单校验
  197 + rules: {},
  198 + upload: {
  199 + // 是否显示弹出层(用户导入)
140 200 open: false,
141   - // 查询参数
142   - queryParams: {
143   - pageNum: 1,
144   - pageSize: 10,
145   - type: null,
146   - title: null,
147   - content: null,
148   - person: null,
149   - place: null,
  201 + // 弹出层标题(用户导入)
  202 + title: "",
  203 + // 是否禁用上传
  204 + isUploading: false,
  205 + // 设置上传的请求头部
  206 + headers: {
  207 + Authorization: "Bearer " + getToken()
150 208 },
151   - data: {},
152   - areas: [],
153   - // 表单参数
154   - form: {},
155   - // 表单校验
156   - rules: {}
157   - };
158   - },
159   - created() {
160   - getArea().then(res => {
161   - this.areas = res.result;
162   - });
  209 + // 上传的地址
  210 + url: process.env.VUE_APP_BASE_API + "/business/threestep/upload",
  211 + },
  212 + uploadImageDialog:false,
  213 + fileList:[],
  214 + slides:[],
  215 + videoSrc:[]
  216 + };
  217 + },
  218 + created() {
  219 + getArea().then(res => {
  220 + this.areas = res.result;
  221 + });
163 222  
164   - let remoteQueryData = {
165   - "page": 1,
166   - "size": 9999
167   - };
  223 + let remoteQueryData = {
  224 + "page": 1,
  225 + "size": 9999
  226 + };
168 227  
169   - constructionsitesList(remoteQueryData).then(res => {
170   - this.data[0] = res.result.list;
171   - });
  228 + constructionsitesList(remoteQueryData).then(res => {
  229 + this.data[0] = res.result.list;
  230 + });
172 231  
173   - earthsitesList(remoteQueryData).then(res => {
174   - this.data[1] = res.result.list;
175   - });
  232 + earthsitesList(remoteQueryData).then(res => {
  233 + this.data[1] = res.result.list;
  234 + });
176 235  
177 236  
178   - this.getList();
179   - },
180   - methods: {
181   - selectName(item){
  237 + this.getList();
  238 + },
  239 + methods: {
  240 + selectName(item) {
182 241  
183 242  
184   - for(var i in this.areas){
185   - if(this.areas[i].code == item.areaCode){
186   - this.form.place = this.areas[i].name;
187   - }
  243 + for (var i in this.areas) {
  244 + if (this.areas[i].code == item.areaCode) {
  245 + this.form.place = this.areas[i].name;
188 246 }
  247 + }
189 248  
190 249  
191   -
192   - },
193   - /** 查询专项督察列表 */
194   - getList() {
195   - this.loading = true;
196   - listSupervisionSpecial(this.queryParams).then(response => {
197   - this.SupervisionSpecialList = response.rows;
198   - this.total = response.total;
199   - this.loading = false;
200   - });
201   - },
202   - // 取消按钮
203   - cancel() {
204   - this.open = false;
205   - this.reset();
206   - },
207   - // 表单重置
208   - reset() {
209   - this.form = {
210   - id: null,
211   - type: null,
212   - title: null,
213   - content: null,
214   - person: null,
215   - place: null,
216   - createBy: null,
217   - createTime: null,
218   - updateTime: null,
219   - updateBy: null
220   - };
221   - this.resetForm("form");
222   - },
223   - /** 搜索按钮操作 */
224   - handleQuery() {
225   - this.queryParams.pageNum = 1;
226   - this.getList();
227   - },
228   - /** 重置按钮操作 */
229   - resetQuery() {
230   - this.resetForm("queryForm");
231   - this.handleQuery();
232   - },
233   - // 多选框选中数据
234   - handleSelectionChange(selection) {
235   - this.ids = selection.map(item => item.id)
236   - this.single = selection.length !== 1
237   - this.multiple = !selection.length
238   - },
239   - /** 新增按钮操作 */
240   - handleAdd() {
241   - this.reset();
  250 + },
  251 + /** 查询专项督察列表 */
  252 + getList() {
  253 + this.loading = true;
  254 + listSupervisionSpecial(this.queryParams).then(response => {
  255 + this.SupervisionSpecialList = response.rows;
  256 + this.total = response.total;
  257 + this.loading = false;
  258 + });
  259 + },
  260 + // 取消按钮
  261 + cancel() {
  262 + this.open = false;
  263 + this.uploadImageDialog = false;
  264 + this.slides = [];
  265 + this.videoSrc = [];
  266 + this.reset();
  267 + },
  268 + // 表单重置
  269 + reset() {
  270 + this.form = {
  271 + id: null,
  272 + type: null,
  273 + title: null,
  274 + content: null,
  275 + person: null,
  276 + place: null,
  277 + createBy: null,
  278 + createTime: null,
  279 + updateTime: null,
  280 + updateBy: null
  281 + };
  282 + this.resetForm("form");
  283 + },
  284 + /** 搜索按钮操作 */
  285 + handleQuery() {
  286 + this.queryParams.pageNum = 1;
  287 + this.getList();
  288 + },
  289 + /** 重置按钮操作 */
  290 + resetQuery() {
  291 + this.resetForm("queryForm");
  292 + this.handleQuery();
  293 + },
  294 + // 多选框选中数据
  295 + handleSelectionChange(selection) {
  296 + this.ids = selection.map(item => item.id)
  297 + this.single = selection.length !== 1
  298 + this.multiple = !selection.length
  299 + },
  300 + /** 新增按钮操作 */
  301 + handleAdd() {
  302 + this.reset();
  303 + this.open = true;
  304 + this.title = "添加专项督察";
  305 + },
  306 + /** 修改按钮操作 */
  307 + handleUpdate(row) {
  308 + this.reset();
  309 + const id = row.id || this.ids
  310 + getSupervisionSpecial(id).then(response => {
  311 + this.form = response.data;
  312 + if (this.form.attach && this.form.attach != "")
  313 + this.form.attach = this.form.attach.split(",");
242 314 this.open = true;
243   - this.title = "添加专项督察";
244   - },
245   - /** 修改按钮操作 */
246   - handleUpdate(row) {
247   - this.reset();
248   - const id = row.id || this.ids
249   - getSupervisionSpecial(id).then(response => {
250   - this.form = response.data;
251   - this.open = true;
252   - this.title = "修改专项督察";
253   - });
254   - },
255   - /** 提交按钮 */
256   - submitForm() {
257   - this.$refs["form"].validate(valid => {
258   - if (valid) {
259   - if (this.form.id != null) {
260   - updateSupervisionSpecial(this.form).then(response => {
261   - this.msgSuccess("修改成功");
262   - this.open = false;
263   - this.getList();
264   - });
265   - } else {
266   - addSupervisionSpecial(this.form).then(response => {
267   - this.msgSuccess("新增成功");
268   - this.open = false;
269   - this.getList();
270   - });
271   - }
  315 + this.title = "修改专项督察";
  316 + });
  317 + },
  318 + /** 提交按钮 */
  319 + submitForm() {
  320 + this.$refs["form"].validate(valid => {
  321 + if (valid) {
  322 + this.form.attach = this.form.attach +"";
  323 + if (this.form.id != null) {
  324 + updateSupervisionSpecial(this.form).then(response => {
  325 + this.msgSuccess("修改成功");
  326 + this.open = false;
  327 + this.getList();
  328 + });
  329 + } else {
  330 + addSupervisionSpecial(this.form).then(response => {
  331 + this.msgSuccess("新增成功");
  332 + this.open = false;
  333 + this.getList();
  334 + });
272 335 }
273   - });
274   - },
275   - /** 删除按钮操作 */
276   - handleDelete(row) {
277   - const ids = row.id || this.ids;
278   - this.$confirm('是否确认删除专项督察编号为"' + ids + '"的数据项?', "警告", {
279   - confirmButtonText: "确定",
280   - cancelButtonText: "取消",
281   - type: "warning"
282   - }).then(function() {
283   - return delSupervisionSpecial(ids);
284   - }).then(() => {
285   - this.getList();
286   - this.msgSuccess("删除成功");
287   - })
288   - },
289   - /** 导出按钮操作 */
290   - handleExport() {
291   - const queryParams = this.queryParams;
292   - this.$confirm('是否确认导出所有专项督察数据项?', "警告", {
293   - confirmButtonText: "确定",
294   - cancelButtonText: "取消",
295   - type: "warning"
296   - }).then(function() {
297   - return exportSupervisionSpecial(queryParams);
298   - }).then(response => {
299   - this.download(response.message);
  336 + }
  337 + });
  338 + },
  339 + /** 删除按钮操作 */
  340 + handleDelete(row) {
  341 + const ids = row.id || this.ids;
  342 + this.$confirm('是否确认删除专项督察编号为"' + ids + '"的数据项?', "警告", {
  343 + confirmButtonText: "确定",
  344 + cancelButtonText: "取消",
  345 + type: "warning"
  346 + }).then(function () {
  347 + return delSupervisionSpecial(ids);
  348 + }).then(() => {
  349 + this.getList();
  350 + this.msgSuccess("删除成功");
  351 + })
  352 + },
  353 + /** 导出按钮操作 */
  354 + handleExport() {
  355 + const queryParams = this.queryParams;
  356 + this.$confirm('是否确认导出所有专项督察数据项?', "警告", {
  357 + confirmButtonText: "确定",
  358 + cancelButtonText: "取消",
  359 + type: "warning"
  360 + }).then(function () {
  361 + return exportSupervisionSpecial(queryParams);
  362 + }).then(response => {
  363 + this.download(response.message);
  364 + })
  365 + },
  366 + removeAttchItem(index, img) {
  367 + this.form.attach.splice(this.form.attach.indexOf(img), 1);
  368 + for(let i=0;i<this.slides.length;i++){
  369 + if(this.slides[i].alt==img){
  370 + this.slides.splice(i, 1);
  371 + }
  372 + }
  373 + for(let i=0;i<this.videoSrc.length;i++){
  374 + if(this.videoSrc[i].alt==img){
  375 + this.videoSrc.splice(i, 1);
  376 + }
  377 + }
  378 +
  379 + this.$forceUpdate();
  380 + },
  381 + uploadSuccess(res, file, fileList) {
  382 + if(res.code){
  383 + this.$message(res.message);
  384 + return;
  385 + }
  386 + if(!this.form.attach){
  387 + this.form.attach = [];
  388 + }
  389 + this.form.attach.push(res);
  390 + if(file.name.indexOf('.jpg') > -1 ||file.name.indexOf('.png') > -1){
  391 + let url = URL.createObjectURL(file.raw)
  392 + this.slides.push({
  393 + url:url,
  394 + alt:res
300 395 })
  396 +
  397 + }
  398 + if(file.name.indexOf('.avi') > -1 ||file.name.indexOf('.mp4') > -1){
  399 + let url = URL.createObjectURL(file.raw)
  400 + this.videoSrc.push({
  401 + url:url,
  402 + alt:res
  403 + });
301 404 }
302   - }
303   - };
  405 + },
  406 + showFileUpload(i) {
  407 + this.uploadImageDialog = true;
  408 + this.picIndex = i;
  409 + },
  410 + beforeUpload(file) {
  411 + let isRightSize = file.size / 1024 / 1024 < 100
  412 + if (!isRightSize) {
  413 + this.$message.error('文件大小超过 100MB')
  414 + return isRightSize;
  415 + }
  416 + let isAccept = false;
  417 + if (file.name.indexOf('.docx') > -1 || file.name.indexOf(".jpg") > -1 || file.name.indexOf('.doc') > -1 || file
  418 + .name.indexOf('.pdf') > -1 || file.name.indexOf('.png') > -1||file.name.indexOf('.mp4') > -1 || file.name.indexOf(".avi") > -1) {
  419 + isAccept = true;
  420 + }
  421 + if (!isAccept) {
  422 + this.$message.error('应该选择PDF、PNG、JPG、WORD、mp4、avi类型的文件')
  423 + return isAccept;
  424 + }
  425 + },
  426 + downloadFile(path) {
  427 + window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
  428 + },
  429 + handleClose() {
  430 + this.uploadImageDialog = false;
  431 + this.fileList = [];
  432 + },
  433 + showSlides(path) {
  434 + return process.env.VUE_APP_BASE_API + path;
  435 + },
  436 + showVideo(path) {
  437 + return process.env.VUE_APP_BASE_API + path;
  438 + },
  439 + }
  440 +};
304 441 </script>
... ...
trash-ui/src/views/caseOffline/caseOffline/caseOfflineInfo.vue
... ... @@ -44,6 +44,9 @@
44 44 :preview-src-list="[showSlides(item)]"
45 45 :z-index="2000">
46 46 </el-image>
  47 + <div style="display: inline-block;margin: 5px;position: relative; width: 150px;height: 100px;overflow:hidden;" v-for="(item,index) in form.attach" v-if="item.indexOf('.avi') != -1||item.indexOf('.mp4') != -1">
  48 + <video width="100%" controls="controls" height="100%" :src="showVideo(item)"></video>
  49 + </div>
47 50 <el-input v-model="form.attach" type="hidden"></el-input>
48 51 <a @click="downloadFile(img);" style="color: blue;" v-for="(img,index) in form.attach"> {{ img.split("/")[img.split("/").length - 1] }} </a>
49 52 </el-form-item>
... ...
trash-ui/src/views/caseOffline/caseOffline/index.vue
... ... @@ -115,11 +115,14 @@
115 115 <a style="color:blue;font-size: 12px;" @click="uploadImageDialog=true;">选择附件</a>
116 116 <br/>
117 117 <el-image v-for="item in slides"
118   - style="width: 100px; height: 100px; margin: 5px;"
  118 + style="width: 150px; height: 100px; margin: 5px;"
119 119 :src="item.url"
120 120 :preview-src-list="[item.url]"
121 121 :z-index="2000">
122 122 </el-image>
  123 + <div style="display: inline-block;margin: 5px;position: relative; width: 150px;height: 100px;overflow:hidden;" v-for="item in videoSrc" >
  124 + <video width="100%" controls="controls" height="100%" :src="item.url"></video>
  125 + </div>
123 126 <el-input v-model="form.attach" type="hidden"></el-input>
124 127 <div style="color: blue;" v-for="(img,index) in form.attach">{{ img.split("/")[img.split("/").length - 1] }}<a
125 128 @click="removeAttchItem(index,img)" style="color:red;">X</a></div>
... ... @@ -143,9 +146,10 @@
143 146  
144 147 <el-dialog title="附件" :visible.sync="uploadImageDialog" append-to-body :beforeClose="handleClose">
145 148 <el-upload multiple :headers="upload.headers" :action="upload.url" :file-list="fileList"
  149 + accept=".docx,.doc,.pdf,.png,.jpeg,.png,.jpg,.mp4,.avi"
146 150 :on-success="uploadSuccess" :before-upload="beforeUpload">
147 151 <el-button size="small" type="primary">选择附件</el-button>
148   - <div slot="tip" class="el-upload__tip">只能上传不超过 20MB 的jpg、png、pdf、word文件</div>
  152 + <div slot="tip" class="el-upload__tip">只能上传不超过 20MB 的jpg、png、pdf、word、avi、mp4文件</div>
149 153 </el-upload>
150 154 <div style="height: 40px;width:100%;">
151 155 <el-button type="primary" style="margin-top: 20px;float:right;" @click="handleClose">关闭</el-button>
... ...
trash-ui/src/views/casefile/violationCaseFile/index.vue
... ... @@ -180,7 +180,7 @@
180 180 </el-row>
181 181 <el-row :gutter="2">
182 182 <el-col :span="11">
183   - <el-form-item label="公司" prop="violationGrade">
  183 + <el-form-item label="公司" prop="companyName">
184 184 <el-select v-model="form.companyName" :filterable="true" :remote-method="companyLoadOptions" :loading="isLoadingCompany" placeholder="请输入项目名称" style="width: 100%;">
185 185 <el-option v-for="item in companyList" :key="item.name" :label="item.name" :value="item.name"></el-option>
186 186 </el-select>
... ... @@ -193,7 +193,7 @@
193 193  
194 194 <el-row :gutter="2">
195 195 <el-col :span="8" :offset="3">
196   - <el-button type="primary" @click="createDescribe">生成违规描述</el-button>
  196 + <el-button style="margin-left: 14px" type="primary" @click="createDescribe">生成违规描述</el-button>
197 197 </el-col>
198 198 </el-row>
199 199 <el-row>
... ... @@ -205,24 +205,26 @@
205 205 </el-row>
206 206 <el-form-item label="推送对象">
207 207 <el-radio-group v-model="form.sendObject">
208   - <el-radio label="区管理部门(治)">区管理部门(治)</el-radio>
209   - <el-radio label="区管理部门(消)">区管理部门(消)</el-radio>
  208 + <el-radio label="区管理部门">区管理部门</el-radio>
210 209 <el-radio label="运输企业">运输企业</el-radio>
211 210 </el-radio-group>
212 211 </el-form-item>
213   - <el-form-item label="附件图片预览" v-if="slide1.length!=0">
  212 + <el-form-item label="附件预览" v-if="slide1.length!=0">
214 213 <el-image v-for="item in slide1"
215   - style="width: 100px; height: 100px; margin: 5px;"
  214 + style="width: 150px; height: 100px; margin: 5px;"
216 215 :src="item"
217 216 :preview-src-list="slide1"
218 217 :z-index="2000">
219 218 </el-image>
  219 + <div style="display: inline-block;margin: 5px;position: relative; width: 150px;height: 100px;overflow:hidden;" v-for="item in videoSrc" >
  220 + <video width="100%" controls="controls" height="100%" :src="item"></video>
  221 + </div>
220 222 </el-form-item>
221 223 <el-form-item prop="fileEntityList" label="附件">
222 224 <el-upload
223 225 ref="upload"
224 226 action=""
225   - accept=".docx,.doc,.pdf,.png,.jpeg,.png,.jpg"
  227 + accept=".docx,.doc,.pdf,.png,.jpeg,.png,.jpg,.mp4,.avi"
226 228 :on-change="fileChange"
227 229 :auto-upload="false"
228 230 :show-file-list="false"
... ...
trash-ui/src/views/casefile/violationCaseFile/violationCaseFileInfo.vue
... ... @@ -93,8 +93,7 @@
93 93 </el-row>
94 94 <el-form-item label="推送对象">
95 95 <el-radio-group v-model="form.sendObject" :disabled="true">
96   - <el-radio label="区管理部门(治)">区管理部门(治)</el-radio>
97   - <el-radio label="区管理部门(消)">区管理部门(消)</el-radio>
  96 + <el-radio label="区管理部门">区管理部门</el-radio>
98 97 <el-radio label="运输企业">运输企业</el-radio>
99 98 </el-radio-group>
100 99 </el-form-item>
... ... @@ -124,11 +123,14 @@
124 123 </el-table>
125 124 <el-dialog title="查看附件" :visible.sync="open" append-to-body>
126 125 <el-image v-for="item in slide1"
127   - style="width: 100px; height: 100px; margin: 5px;"
  126 + style="width: 150px; height: 100px; margin: 5px;"
128 127 :src="item"
129 128 :preview-src-list="slide1"
130 129 :z-index="2000">
131 130 </el-image>
  131 + <div style="display: inline-block;margin: 5px;position: relative; width: 150px;height: 100px;overflow:hidden;" v-for="item in videoSrc" >
  132 + <video width="100%" controls="controls" height="100%" :src="item"></video>
  133 + </div>
132 134 <el-table :data="fileEntityList">
133 135 <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column>
134 136 <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center">
... ... @@ -185,7 +187,8 @@ export default {
185 187 img: [],
186 188 showPic: null,
187 189 picImage: null,
188   - slide1: []
  190 + slide1: [],
  191 + videoSrc: [],
189 192 }
190 193 },
191 194 created() {
... ... @@ -210,6 +213,9 @@ export default {
210 213 if (item.url.indexOf(".jpg") > -1 || item.url.indexOf(".png") > -1 || item.url.indexOf(".jpeg") > -1 || item.url.indexOf(".jpg") > -1) {
211 214 this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
212 215 }
  216 + if (item.url.indexOf(".mp4") > -1 || item.url.indexOf(".avi") > -1) {
  217 + this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
  218 + }
213 219 })
214 220 });
215 221  
... ... @@ -229,6 +235,7 @@ export default {
229 235 a.click()
230 236 },
231 237 openImage(img) {
  238 + this.img = [];
232 239 this.openImg = true;
233 240 this.img.push(img);
234 241 },
... ...
trash-ui/src/views/casefile/violationWarningInformation/index.vue
... ... @@ -171,7 +171,7 @@
171 171 </el-row>
172 172 <el-row :gutter="2">
173 173 <el-col :span="8" :offset="3">
174   - <el-button type="primary" @click="createDescribe">生成违规描述</el-button>
  174 + <el-button style="margin-left: 14px" type="primary" @click="createDescribe">生成违规描述</el-button>
175 175 </el-col>
176 176 <el-col :span="11">
177 177 <el-form-item label="企业名称" prop="companyName">
... ... @@ -190,24 +190,26 @@
190 190 </el-row>
191 191 <el-form-item label="推送对象">
192 192 <el-radio-group v-model="form.sendObject">
193   - <el-radio label="区管理部门(治)">区管理部门(治)</el-radio>
194   - <el-radio label="区管理部门(消)">区管理部门(消)</el-radio>
  193 + <el-radio label="区管理部门">区管理部门</el-radio>
195 194 <el-radio label="运输企业">运输企业</el-radio>
196 195 </el-radio-group>
197 196 </el-form-item>
198   - <el-form-item label="附件图片预览" v-if="slide1.length!=0">
  197 + <el-form-item label="附件预览" v-if="slide1.length!=0">
199 198 <el-image v-for="item in slide1"
200   - style="width: 100px; height: 100px; margin: 5px;"
  199 + style="width: 150px; height: 100px; margin: 5px;"
201 200 :src="item"
202 201 :preview-src-list="slide1"
203 202 :z-index="2000">
204 203 </el-image>
  204 + <div style="display: inline-block;margin: 5px;position: relative; width: 150px;height: 100px;overflow:hidden;" v-for="item in videoSrc" >
  205 + <video width="100%" controls="controls" height="100%" :src="item"></video>
  206 + </div>
205 207 </el-form-item>
206 208 <el-form-item prop="fileEntityList" label="附件">
207 209 <el-upload
208 210 ref="upload"
209 211 action=""
210   - accept=".docx,.doc,.pdf,.png,.jpeg,.png,.jpg"
  212 + accept=".docx,.doc,.pdf,.png,.jpeg,.png,.jpg,.mp4,.avi"
211 213 :on-change="fileChange"
212 214 :auto-upload="false"
213 215 :show-file-list="false"
... ...
trash-ui/src/views/casefile/violationWarningInformation/violationWarningInformationInfo.vue
... ... @@ -91,8 +91,7 @@
91 91 </el-row>
92 92 <el-form-item label="推送对象">
93 93 <el-radio-group v-model="form.sendObject" :disabled="true">
94   - <el-radio label="区管理部门(治)">区管理部门(治)</el-radio>
95   - <el-radio label="区管理部门(消)">区管理部门(消)</el-radio>
  94 + <el-radio label="区管理部门">区管理部门</el-radio>
96 95 <el-radio label="运输企业">运输企业</el-radio>
97 96 </el-radio-group>
98 97 </el-form-item>
... ... @@ -120,13 +119,16 @@
120 119 </template>
121 120 </el-table-column>
122 121 </el-table>
123   - <el-dialog title="查看附件" :visible.sync="open" append-to-body>
  122 + <el-dialog title="附件预览" :visible.sync="open" append-to-body>
124 123 <el-image v-for="item in slide1"
125   - style="width: 100px; height: 100px; margin: 5px;"
  124 + style="width: 150px; height: 100px; margin:5px;"
126 125 :src="item"
127 126 :preview-src-list="slide1"
128 127 :z-index="2000">
129 128 </el-image>
  129 + <div style="display: inline-block;margin: 5px;position: relative; width: 150px;height: 100px;overflow:hidden;" v-for="item in videoSrc" >
  130 + <video width="100%" controls="controls" height="100%" :src="item"></video>
  131 + </div>
130 132 <el-table :data="fileEntityList">
131 133 <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column>
132 134 <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center">
... ... @@ -183,7 +185,8 @@ export default {
183 185 img: [],
184 186 showPic: null,
185 187 picImage: null,
186   - slide1: []
  188 + slide1: [],
  189 + videoSrc: [],
187 190 }
188 191 },
189 192 created() {
... ... @@ -206,6 +209,9 @@ export default {
206 209 if (item.url.indexOf(".jpg") > -1 || item.url.indexOf(".png") > -1 || item.url.indexOf(".jpeg") > -1 || item.url.indexOf(".jpg") > -1) {
207 210 this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
208 211 }
  212 + if (item.url.indexOf(".mp4") > -1 || item.url.indexOf(".avi") > -1) {
  213 + this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
  214 + }
209 215 })
210 216 });
211 217 listReplyApprovalProcess({tableName: "violation_warning" + ":" + this.idInfo}).then(response => {
... ...
trash-ui/src/views/h5/leaveApplication/index.vue
... ... @@ -142,7 +142,7 @@
142 142 </el-form-item>
143 143 <el-form-item label="附件图片预览" v-if="slide1.length!=0">
144 144 <el-image v-for="item in slide1"
145   - style="width: 100px; height: 100px; margin: 5px;"
  145 + style="width: 150px; height: 100px; margin: 5px;"
146 146 :src="item"
147 147 :preview-src-list="slide1"
148 148 :z-index="2000">
... ...
trash-ui/src/views/h5/leaveApplication/leaveApplicationInfo.vue
... ... @@ -46,7 +46,7 @@
46 46 </el-form-item>
47 47 <el-form-item label="附件图片预览" v-if="slide1.length!=0">
48 48 <el-image v-for="item in slide1"
49   - style="width: 100px; height: 100px; margin: 5px;"
  49 + style="width: 150px; height: 100px; margin: 5px;"
50 50 :src="item"
51 51 :preview-src-list="slide1"
52 52 :z-index="2000">
... ...
trash-ui/src/views/h5/task/violationCaseFileInfo.vue
... ... @@ -72,8 +72,7 @@
72 72  
73 73 <el-form-item label="推送对象">
74 74 <el-radio-group v-model="form.sendObject" :disabled="true">
75   - <el-radio label="区管理部门(治)">区管理部门(治)</el-radio>
76   - <el-radio label="区管理部门(消)">区管理部门(消)</el-radio>
  75 + <el-radio label="区管理部门">区管理部门</el-radio>
77 76 <el-radio label="运输企业">运输企业</el-radio>
78 77 </el-radio-group>
79 78 </el-form-item>
... ... @@ -97,6 +96,15 @@
97 96 </el-table-column>
98 97 </el-table>
99 98 <el-dialog title="查看附件" :visible.sync="open" append-to-body width="300px">
  99 + <el-image v-for="item in slide1"
  100 + style="width: 100px; height: 100px; margin: 5px;"
  101 + :src="item"
  102 + :preview-src-list="slide1"
  103 + :z-index="2000">
  104 + </el-image>
  105 + <div style="display: inline-block;margin: 5px;position: relative; width: 150px;height: 100px;overflow:hidden;" v-for="item in videoSrc" >
  106 + <video width="100%" controls="controls" height="100%" :src="item"></video>
  107 + </div>
100 108 <el-table :data="fileEntityList">
101 109 <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column>
102 110 <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center">
... ... @@ -117,7 +125,11 @@
117 125 </div>
118 126 </el-dialog>
119 127 <el-dialog title="预览" :visible.sync="openImg" append-to-body v-if="entryType==0" width="300px">
120   - <img :src="img" width="100%" height="750px" />
  128 + <el-image style="width: 250px; height: 250px; margin: 5px;"
  129 + :src="img[0]"
  130 + :preview-src-list="img"
  131 + :z-index="2000">
  132 + </el-image>
121 133 </el-dialog>
122 134  
123 135 </el-form>
... ... @@ -147,6 +159,10 @@ export default {
147 159 replyApprovalProcessList:[],
148 160 openImg:false,
149 161 img:null,
  162 + showPic: null,
  163 + picImage: null,
  164 + slide1: [],
  165 + videoSrc: [],
150 166 }
151 167 },
152 168 created() {
... ... @@ -169,6 +185,14 @@ export default {
169 185 this.form = response.data.violationCaseFile;
170 186 let files = JSON.stringify(response.data.uploadFiles);
171 187 this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"));
  188 + this.fileEntityList.map(item => {
  189 + if (item.url.indexOf(".jpg") > -1 || item.url.indexOf(".png") > -1 || item.url.indexOf(".jpeg") > -1 || item.url.indexOf(".jpg") > -1) {
  190 + this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
  191 + }
  192 + if (item.url.indexOf(".mp4") > -1 || item.url.indexOf(".avi") > -1) {
  193 + this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
  194 + }
  195 + })
172 196 });
173 197  
174 198  
... ... @@ -186,9 +210,10 @@ export default {
186 210 a.setAttribute('href', process.env.VUE_APP_BASE_API + url);
187 211 a.click()
188 212 },
189   - openImage(base64){
  213 + openImage(img) {
  214 + this.img = [];
190 215 this.openImg = true;
191   - this.img = base64;
  216 + this.img.push(img);
192 217 },
193 218 }
194 219 }
... ...
trash-ui/src/views/h5/task/violationWarningInformationInfo.vue
... ... @@ -69,8 +69,7 @@
69 69  
70 70 <el-form-item label="推送对象">
71 71 <el-radio-group v-model="form.sendObject" :disabled="true">
72   - <el-radio label="区管理部门(治)">区管理部门(治)</el-radio>
73   - <el-radio label="区管理部门(消)">区管理部门(消)</el-radio>
  72 + <el-radio label="区管理部门">区管理部门</el-radio>
74 73 <el-radio label="运输企业">运输企业</el-radio>
75 74 </el-radio-group>
76 75 </el-form-item>
... ... @@ -93,6 +92,15 @@
93 92 </el-table-column>
94 93 </el-table>
95 94 <el-dialog title="查看附件" :visible.sync="open" append-to-body width="300px">
  95 + <el-image v-for="item in slide1"
  96 + style="width: 150px; height: 100px; margin:5px;"
  97 + :src="item"
  98 + :preview-src-list="slide1"
  99 + :z-index="2000">
  100 + </el-image>
  101 + <div style="display: inline-block;margin: 5px;position: relative; width: 150px;height: 100px;overflow:hidden;" v-for="item in videoSrc" >
  102 + <video width="100%" controls="controls" height="100%" :src="item"></video>
  103 + </div>
96 104 <el-table :data="fileEntityList">
97 105 <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column>
98 106 <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center">
... ... @@ -113,7 +121,11 @@
113 121 </div>
114 122 </el-dialog>
115 123 <el-dialog title="预览" :visible.sync="openImg" append-to-body v-if="entryType==0" width="300px">
116   - <img :src="img" width="100%" height="750px" />
  124 + <el-image style="width: 250px; height: 250px; margin: 5px;"
  125 + :src="img[0]"
  126 + :preview-src-list="img"
  127 + :z-index="2000">
  128 + </el-image>
117 129 </el-dialog>
118 130 </el-form>
119 131 </template>
... ... @@ -142,6 +154,10 @@ export default {
142 154 replyApprovalProcessList:[],
143 155 openImg:false,
144 156 img:null,
  157 + showPic: null,
  158 + picImage: null,
  159 + slide1: [],
  160 + videoSrc: [],
145 161 }
146 162 },
147 163 created() {
... ... @@ -160,6 +176,14 @@ export default {
160 176 this.form = response.data.violationWarningInformation;
161 177 let files = JSON.stringify(response.data.uploadFiles);
162 178 this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"));
  179 + this.fileEntityList.map(item => {
  180 + if (item.url.indexOf(".jpg") > -1 || item.url.indexOf(".png") > -1 || item.url.indexOf(".jpeg") > -1 || item.url.indexOf(".jpg") > -1) {
  181 + this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
  182 + }
  183 + if (item.url.indexOf(".mp4") > -1 || item.url.indexOf(".avi") > -1) {
  184 + this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
  185 + }
  186 + })
163 187 });
164 188 listReplyApprovalProcess({tableName:"violation_warning" + ":" + this.idInfo}).then(response => {
165 189 this.replyApprovalProcessList = response.rows;
... ... @@ -176,8 +200,9 @@ export default {
176 200 a.click()
177 201 },
178 202 openImage(base64){
  203 + this.img = [];
179 204 this.openImg = true;
180   - this.img = base64;
  205 + this.img.push(img);
181 206 }
182 207 }
183 208 }
... ...
trash-ui/src/views/h5/violationCaseFile/index.vue
... ... @@ -173,16 +173,26 @@
173 173 </el-row>
174 174 <el-form-item label="推送对象">
175 175 <el-radio-group v-model="form.sendObject">
176   - <el-radio label="区管理部门(治)">区管理部门(治)</el-radio>
177   - <el-radio label="区管理部门(消)">区管理部门(消)</el-radio>
  176 + <el-radio label="区管理部门">区管理部门</el-radio>
178 177 <el-radio label="运输企业">运输企业</el-radio>
179 178 </el-radio-group>
180 179 </el-form-item>
  180 + <el-form-item label="附件预览" v-if="slide1.length!=0">
  181 + <el-image v-for="item in slide1"
  182 + style="width: 150px; height: 100px; margin: 5px;"
  183 + :src="item"
  184 + :preview-src-list="slide1"
  185 + :z-index="2000">
  186 + </el-image>
  187 + <div style="display: inline-block;margin: 5px;position: relative; width: 150px;height: 100px;overflow:hidden;" v-for="item in videoSrc" >
  188 + <video width="100%" controls="controls" height="100%" :src="item"></video>
  189 + </div>
  190 + </el-form-item>
181 191 <el-form-item prop="fileEntityList" label="附件">
182 192 <el-upload
183 193 ref="upload"
184 194 action=""
185   - accept=".docx,.xlsx,.xls,.ppt,.doc,.pdf,.png,.jpeg,.png,.jpg"
  195 + accept=".docx,.xlsx,.xls,.ppt,.doc,.pdf,.png,.jpeg,.png,.jpg,.mp4,.avi"
186 196 :on-change="fileChange"
187 197 :auto-upload="false"
188 198 :show-file-list="false"
... ... @@ -228,7 +238,8 @@
228 238 </div>
229 239 </template>
230 240  
231   -<script src="../../../api/vio_casefile"/>
  241 +<script src="../../../api/vio_casefile">
  242 +</script>
232 243 <style scope>
233 244 .el-select-dropdown__item{
234 245 width:300px;
... ...
trash-ui/src/views/h5/violationWarningInformation/index.vue
... ... @@ -134,16 +134,26 @@
134 134 </el-form-item>
135 135 <el-form-item label="推送对象">
136 136 <el-radio-group v-model="form.sendObject">
137   - <el-radio label="区管理部门(治)">区管理部门(治)</el-radio>
138   - <el-radio label="区管理部门(消)">区管理部门(消)</el-radio>
  137 + <el-radio label="区管理部门">区管理部门</el-radio>
139 138 <el-radio label="运输企业">运输企业</el-radio>
140 139 </el-radio-group>
141 140 </el-form-item>
  141 + <el-form-item label="附件预览" v-if="slide1.length!=0">
  142 + <el-image v-for="item in slide1"
  143 + style="width: 150px; height: 100px; margin: 5px;"
  144 + :src="item"
  145 + :preview-src-list="slide1"
  146 + :z-index="2000">
  147 + </el-image>
  148 + <div style="display: inline-block;margin: 5px;position: relative; width: 150px;height: 100px;overflow:hidden;" v-for="item in videoSrc" >
  149 + <video width="100%" controls="controls" height="100%" :src="item"></video>
  150 + </div>
  151 + </el-form-item>
142 152 <el-form-item prop="fileEntityList" label="附件">
143 153 <el-upload
144 154 ref="upload"
145 155 action=""
146   - accept=".docx,.xlsx,.xls,.ppt,.doc,.pdf,.png,.jpeg,.png,.jpg"
  156 + accept=".docx,.xlsx,.xls,.ppt,.doc,.pdf,.png,.jpeg,.png,.jpg,.mp4,.avi"
147 157 :on-change="fileChange"
148 158 :auto-upload="false"
149 159 :show-file-list="false"
... ...
trash-ui/src/views/office/handle/handleInfo.vue
... ... @@ -91,7 +91,7 @@
91 91 </el-form-item>
92 92 <el-form-item label="附件图片预览" v-if="slide1.length!=0">
93 93 <el-image v-for="item in slide1"
94   - style="width: 100px; height: 100px; margin: 5px;"
  94 + style="width: 150px; height: 100px; margin: 5px;"
95 95 :src="item"
96 96 :preview-src-list="slide1"
97 97 :z-index="2000">
... ...
trash-ui/src/views/office/leaveApplication/leaveApplicationInfo.vue
... ... @@ -46,7 +46,7 @@
46 46 </el-form-item>
47 47 <el-form-item label="附件图片预览" v-if="slide1.length!=0">
48 48 <el-image v-for="item in slide1"
49   - style="width: 100px; height: 100px; margin: 5px;"
  49 + style="width: 150px; height: 100px; margin: 5px;"
50 50 :src="item"
51 51 :preview-src-list="slide1"
52 52 :z-index="2000">
... ...
trash-workFlow/src/main/java/com/trash/business/domain/SupervisionSpecial.java
... ... @@ -38,7 +38,17 @@ public class SupervisionSpecial extends BaseEntity
38 38 @Excel(name = "所属区域")
39 39 private String place;
40 40  
41   - public void setId(String id)
  41 + private String attach;
  42 +
  43 + public String getAttach() {
  44 + return attach;
  45 + }
  46 +
  47 + public void setAttach(String attach) {
  48 + this.attach = attach;
  49 + }
  50 +
  51 + public void setId(String id)
42 52 {
43 53 this.id = id;
44 54 }
... ...
trash-workFlow/src/main/java/com/trash/casefile/kafka/Consumer.java
... ... @@ -134,7 +134,7 @@ public class Consumer {
134 134 violationWarningInformation.setViolationGrade("一般类");
135 135 //项目名称(工地名称,消纳场名称)
136 136  
137   - violationWarningInformation.setSendObject("区管理部门(治)");
  137 + violationWarningInformation.setSendObject("区管理部门");
138 138 String describe = "";
139 139 //根据不同违规类型,走不同流程
140 140 switch (violationTypeCode) {
... ... @@ -146,7 +146,7 @@ public class Consumer {
146 146 case "44030030":
147 147 case "44030031":
148 148 violationWarningInformation.setViolationObjectType("0");
149   - violationWarningInformation.setSendObject("区管理部门(治)");
  149 + violationWarningInformation.setSendObject("区管理部门");
150 150 violationWarningInformation.setProjectName(jsonObject.getString("siteName"));
151 151 describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
152 152 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "在" +
... ... @@ -158,7 +158,7 @@ public class Consumer {
158 158 case "44030029":
159 159 case "44030025":
160 160 violationWarningInformation.setViolationObjectType("1");
161   - violationWarningInformation.setSendObject("区管理部门(消)");
  161 + violationWarningInformation.setSendObject("区管理部门");
162 162 violationWarningInformation.setProjectName(jsonObject.getString("siteName"));
163 163 describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
164 164 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "在" +
... ... @@ -167,7 +167,7 @@ public class Consumer {
167 167 case "44030032":
168 168 violationWarningInformation.setViolationObjectType("0");
169 169 violationWarningInformation.setViolationGrade("重点类");
170   - violationWarningInformation.setSendObject("区管理部门(治)");
  170 + violationWarningInformation.setSendObject("区管理部门");
171 171 describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
172 172 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "在" +
173 173 jsonObject.get("siteName") + "出现" + violationWarningInformation.getViolationType();
... ...
trash-workFlow/src/main/resources/mapper/SupervisionSpecialMapper.xml
... ... @@ -15,10 +15,11 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
15 15 <result property="createTime" column="create_time" />
16 16 <result property="updateTime" column="update_time" />
17 17 <result property="updateBy" column="update_by" />
  18 + <result property="attach" column="attach" />
18 19 </resultMap>
19 20  
20 21 <sql id="selectSupervisionSpecialVo">
21   - select id, type, title, content, person, place, create_by, create_time, update_time, update_by from supervision_special
  22 + select id, type, title, content, person, place, create_by, create_time, update_time, update_by,attach from supervision_special
22 23 </sql>
23 24  
24 25 <select id="selectSupervisionSpecialList" parameterType="SupervisionSpecial" resultMap="SupervisionSpecialResult">
... ... @@ -50,6 +51,8 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
50 51 <if test="createTime != null">create_time,</if>
51 52 <if test="updateTime != null">update_time,</if>
52 53 <if test="updateBy != null">update_by,</if>
  54 + <if test="updateBy != null">update_by,</if>
  55 + <if test="attach != null">attach,</if>
53 56 </trim>
54 57 <trim prefix="values (" suffix=")" suffixOverrides=",">
55 58 <if test="id != null">#{id},</if>
... ... @@ -62,6 +65,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
62 65 <if test="createTime != null">#{createTime},</if>
63 66 <if test="updateTime != null">#{updateTime},</if>
64 67 <if test="updateBy != null">#{updateBy},</if>
  68 + <if test="attach != null">#{attach},</if>
65 69 </trim>
66 70 </insert>
67 71  
... ... @@ -77,6 +81,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
77 81 <if test="createTime != null">create_time = #{createTime},</if>
78 82 <if test="updateTime != null">update_time = #{updateTime},</if>
79 83 <if test="updateBy != null">update_by = #{updateBy},</if>
  84 + <if test="attach != null">attach =#{attach},</if>
80 85 </trim>
81 86 where id = #{id}
82 87 </update>
... ...