Commit dad3c46aed1430c29d3a22dfb06838d7fc17e3f1
1 parent
cb6cea09
m
Showing
57 changed files
with
6536 additions
and
4424 deletions
sql/daily_situation.sql
| 1 | 1 | /* |
| 2 | - Navicat Premium Data Transfer | |
| 2 | + Navicat MySQL Data Transfer | |
| 3 | 3 | |
| 4 | - Source Server : SH | |
| 5 | - Source Server Type : MySQL | |
| 6 | - Source Server Version : 80024 | |
| 4 | + Source Server : mari | |
| 5 | + Source Server Type : MariaDB | |
| 6 | + Source Server Version : 100508 | |
| 7 | 7 | Source Host : localhost:3306 |
| 8 | 8 | Source Schema : trash |
| 9 | 9 | |
| 10 | - Target Server Type : MySQL | |
| 11 | - Target Server Version : 80024 | |
| 10 | + Target Server Type : MariaDB | |
| 11 | + Target Server Version : 100508 | |
| 12 | 12 | File Encoding : 65001 |
| 13 | 13 | |
| 14 | - Date: 23/04/2023 13:25:45 | |
| 14 | + Date: 22/05/2023 14:40:08 | |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | 17 | SET NAMES utf8mb4; |
| ... | ... | @@ -22,16 +22,22 @@ SET FOREIGN_KEY_CHECKS = 0; |
| 22 | 22 | -- ---------------------------- |
| 23 | 23 | DROP TABLE IF EXISTS `daily_situation`; |
| 24 | 24 | CREATE TABLE `daily_situation` ( |
| 25 | - `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键id', | |
| 25 | + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id', | |
| 26 | 26 | `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题', |
| 27 | 27 | `operator` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作人', |
| 28 | 28 | `date` date NULL DEFAULT NULL COMMENT '日期', |
| 29 | 29 | `weather` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '天气', |
| 30 | - `Consumption_site_situation` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '全市工地,消纳场开停情况', | |
| 31 | - `Number_of_vehicles` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '车辆数', | |
| 32 | - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', | |
| 33 | - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', | |
| 30 | + `Consumption_site_situation` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '全市工地,消纳场开停情况', | |
| 31 | + `Number_of_vehicles` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '车辆数', | |
| 32 | + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', | |
| 33 | + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', | |
| 34 | + `create_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人', | |
| 35 | + `case_file_info` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '平台案卷', | |
| 36 | + `warning_case_file_info` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '平台报警案卷', | |
| 37 | + `desc1` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL, | |
| 38 | + `desc2` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL, | |
| 39 | + `desc3` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL, | |
| 34 | 40 | PRIMARY KEY (`id`) USING BTREE |
| 35 | -) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; | |
| 41 | +) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; | |
| 36 | 42 | |
| 37 | 43 | SET FOREIGN_KEY_CHECKS = 1; | ... | ... |
trash-ui/src/api/business/daywork.js
| ... | ... | @@ -17,3 +17,11 @@ export function exportDayWorkList(data) { |
| 17 | 17 | data: data |
| 18 | 18 | }) |
| 19 | 19 | } |
| 20 | + | |
| 21 | +export function exportDayWorkHistoryList(data) { | |
| 22 | + return request({ | |
| 23 | + url: '/business/threestep/exportDayWorkHistoryList', | |
| 24 | + method: 'post', | |
| 25 | + data: data | |
| 26 | + }) | |
| 27 | +} | |
| 20 | 28 | \ No newline at end of file | ... | ... |
trash-ui/src/api/dict.js
| ... | ... | @@ -51,9 +51,12 @@ export function updateEarthsites(data) { |
| 51 | 51 | }); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 54 | 57 | export function mainworkcompany(id) { |
| 55 | 58 | return requestRemote({ |
| 56 | - url: '/api/siteservice/cs/constructionsites/mainworkcompany/' + id, | |
| 59 | + url: '/api/siteservice/cs/constructionsites/' + id, | |
| 57 | 60 | method: 'get', |
| 58 | 61 | }); |
| 59 | 62 | } | ... | ... |
trash-ui/src/router/index.js
| ... | ... | @@ -185,6 +185,12 @@ export const constantRoutes = [ |
| 185 | 185 | meta: { title: '违规预警信息' } |
| 186 | 186 | }, |
| 187 | 187 | { |
| 188 | + path: 'casefile/violationWarningInformationTable', | |
| 189 | + component: (resolve) => require(['@/views/casefile/violationWarningInformation/violationWarningInformationTable'], resolve), | |
| 190 | + name: '违规预警信息统计表', | |
| 191 | + meta: { title: '违规预警信息统计表' } | |
| 192 | + }, | |
| 193 | + { | |
| 188 | 194 | path: 'casefile/violationCaseFile', |
| 189 | 195 | component: (resolve) => require(['@/views/casefile/violationCaseFile'], resolve), |
| 190 | 196 | name: '平台违规案卷', |
| ... | ... | @@ -235,25 +241,55 @@ export const constantRoutes = [ |
| 235 | 241 | { |
| 236 | 242 | path: 'task', |
| 237 | 243 | component: (resolve) => require(['@/views/h5/task/index'], resolve), |
| 238 | - name: '待办', | |
| 239 | - meta: { title: '待办' } | |
| 244 | + name: 'taskindex', | |
| 245 | + meta: { title: 'taskindex' } | |
| 240 | 246 | } , |
| 241 | 247 | { |
| 242 | 248 | path: 'taskhistory', |
| 243 | 249 | component: (resolve) => require(['@/views/h5/taskhistory/index'], resolve), |
| 244 | - name: '经办', | |
| 245 | - meta: { title: '经办' } | |
| 250 | + name: 'taskhistory', | |
| 251 | + meta: { title: 'taskhistory' } | |
| 246 | 252 | }, |
| 247 | 253 | { |
| 248 | 254 | path: 'taskend', |
| 249 | 255 | component: (resolve) => require(['@/views/h5/taskhistory/end'], resolve), |
| 250 | - name: '已办', | |
| 251 | - meta: { title: '已办' } | |
| 256 | + name: 'end', | |
| 257 | + meta: { title: 'end' } | |
| 252 | 258 | }, |
| 253 | 259 | |
| 260 | + { | |
| 261 | + path: 'EarthSitesCredit', | |
| 262 | + component: (resolve) => require(['@/views/h5/EarthSitesCredit'], resolve), | |
| 263 | + name: 'EarthSitesCredit', | |
| 264 | + meta: { title: 'EarthSitesCredit' } | |
| 265 | + }, | |
| 266 | + { | |
| 267 | + path: 'CompanyCredit', | |
| 268 | + component: (resolve) => require(['@/views/h5/CompanyCredit'], resolve), | |
| 269 | + name: 'CompanyCredit', | |
| 270 | + meta: { title: 'CompanyCredit' } | |
| 271 | + }, | |
| 272 | + { | |
| 273 | + path: 'TruckCredit', | |
| 274 | + component: (resolve) => require(['@/views/h5/TruckCredit'], resolve), | |
| 275 | + name: 'TruckCredit', | |
| 276 | + meta: { title: 'TruckCredit' } | |
| 277 | + }, | |
| 278 | + { | |
| 279 | + path: 'DriverCredit', | |
| 280 | + component: (resolve) => require(['@/views/h5/DriverCredit'], resolve), | |
| 281 | + name: 'DriverCredit', | |
| 282 | + meta: { title: 'DriverCredit' } | |
| 283 | + }, | |
| 284 | + { | |
| 285 | + path: 'ConstructionCredit', | |
| 286 | + component: (resolve) => require(['@/views/h5/ConstructionCredit'], resolve), | |
| 287 | + name: 'ConstructionCredit', | |
| 288 | + meta: { title: 'ConstructionCredit' } | |
| 289 | + }, | |
| 254 | 290 | { |
| 255 | 291 | path: 'leaveApplication', |
| 256 | - component: (resolve) => require(['@/views/h5/office/leaveApplication'], resolve), | |
| 292 | + component: (resolve) => require(['@/views/h5/leaveApplication'], resolve), | |
| 257 | 293 | name: 'leaveApplication', |
| 258 | 294 | meta: { title: 'leaveApplication' } |
| 259 | 295 | }, |
| ... | ... | @@ -269,6 +305,33 @@ export const constantRoutes = [ |
| 269 | 305 | name: 'dayWorkReport', |
| 270 | 306 | meta: { title: 'dayWorkReport' } |
| 271 | 307 | }, |
| 308 | + { | |
| 309 | + path: 'threestep', | |
| 310 | + component: (resolve) => require(['@/views/h5/threestep'], resolve), | |
| 311 | + name: 'threestep', | |
| 312 | + meta: { title: 'threestep' } | |
| 313 | + }, | |
| 314 | + { | |
| 315 | + path: 'caseOffline', | |
| 316 | + component: (resolve) => require(['@/views/h5/caseOffline'], resolve), | |
| 317 | + name: 'caseOffline', | |
| 318 | + meta: { title: 'caseOffline' } | |
| 319 | + }, | |
| 320 | + { | |
| 321 | + path: 'violationWarningInformation', | |
| 322 | + component: (resolve) => require(['@/views/h5/violationWarningInformation'], resolve), | |
| 323 | + name: 'violationWarningInformation', | |
| 324 | + meta: { title: 'violationWarningInformation' } | |
| 325 | + }, | |
| 326 | + { | |
| 327 | + path: 'violationCaseFile', | |
| 328 | + component: (resolve) => require(['@/views/h5/violationCaseFile'], resolve), | |
| 329 | + name: 'violationCaseFile', | |
| 330 | + meta: { title: 'violationCaseFile' } | |
| 331 | + }, | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 272 | 335 | ], |
| 273 | 336 | |
| 274 | 337 | }, | ... | ... |
trash-ui/src/views/activiti/task/constructsiteInfo.vue
| 1 | 1 | <template> |
| 2 | 2 | <div v-loading="loading"> |
| 3 | 3 | |
| 4 | + <el-button @click="printBody">打印</el-button> | |
| 5 | + <div id="printItem"> | |
| 4 | 6 | <el-row style="border: 1px solid black;" type="flex" align="middle" justify="center"> |
| 5 | 7 | <el-col :span="1" class="bd_padding"> |
| 6 | 8 | 勘察人员填写 |
| ... | ... | @@ -174,7 +176,7 @@ |
| 174 | 176 | </el-row> |
| 175 | 177 | </el-col> |
| 176 | 178 | </el-row> |
| 177 | - | |
| 179 | +</div> | |
| 178 | 180 | </div> |
| 179 | 181 | </template> |
| 180 | 182 | |
| ... | ... | @@ -271,10 +273,11 @@ import store from "@/store"; |
| 271 | 273 | }, |
| 272 | 274 | created() { |
| 273 | 275 | // if(){ |
| 274 | - if(window.location.search){ | |
| 275 | - this.businessKey = window.location.search.split("=")[1]; | |
| 276 | - } | |
| 277 | - // } | |
| 276 | + if(window.location.search){ | |
| 277 | + let arr = window.location.search.split("&"); | |
| 278 | + this.businessKey = arr[0].split("=")[1]; | |
| 279 | + } | |
| 280 | + | |
| 278 | 281 | |
| 279 | 282 | |
| 280 | 283 | this.loading = true; |
| ... | ... | @@ -282,6 +285,10 @@ import store from "@/store"; |
| 282 | 285 | |
| 283 | 286 | }, |
| 284 | 287 | methods: { |
| 288 | + printBody(){ | |
| 289 | + document.body.innerHTML = document.getElementById("printItem").innerHTML; | |
| 290 | + window.print(); | |
| 291 | + }, | |
| 285 | 292 | getInfo() { |
| 286 | 293 | let id; |
| 287 | 294 | if (this.businessKey.split(":").length == 2) { | ... | ... |
trash-ui/src/views/activiti/taskhistory/end.vue
| ... | ... | @@ -5,55 +5,73 @@ |
| 5 | 5 | |
| 6 | 6 | <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> |
| 7 | 7 | |
| 8 | + <!-- 审批对话框 --> | |
| 9 | + <el-dialog :title="title" :visible.sync="open" v-if="open" width="500px" append-to-body> | |
| 10 | + | |
| 11 | + <div slot="footer" class="dialog-footer"> | |
| 12 | + <el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button> | |
| 13 | + <el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">通过</el-button> | |
| 14 | + </div> | |
| 15 | + </el-dialog> | |
| 16 | + | |
| 17 | + | |
| 8 | 18 | <el-dialog :title="title" :visible.sync="open2" width="800px" append-to-body> |
| 9 | 19 | <threestepInfo :businessKey="businessKey" v-if="open2"/> |
| 10 | 20 | |
| 11 | 21 | </el-dialog> |
| 12 | 22 | <el-dialog :title="title" :visible.sync="construct" width="800px" append-to-body> |
| 13 | 23 | <constructsiteInfo :businessKey="businessKey" :signData="signData" v-if="construct" /> |
| 14 | - <div slot="footer" class="dialog-footer"> | |
| 15 | - <el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button> | |
| 16 | - <el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">通过</el-button> | |
| 17 | - </div> | |
| 18 | 24 | </el-dialog> |
| 19 | 25 | <!-- 会议管理 --> |
| 20 | 26 | <el-dialog :title="title" :visible.sync="conferenceOpen" width="850px" append-to-body> |
| 21 | 27 | <conferenceInfo :idInfo="idInfo" v-if="conferenceOpen"/> |
| 22 | - <div slot="footer" class="dialog-footer"> | |
| 23 | - <div slot="footer" class="dialog-footer"> | |
| 24 | - <el-button type="danger" @click="conferenceSubmitForm(1)">驳回</el-button> | |
| 25 | - <el-button type="primary" @click="conferenceSubmitForm(0)">通过</el-button> | |
| 26 | - </div> | |
| 27 | - </div> | |
| 28 | 28 | </el-dialog> |
| 29 | 29 | |
| 30 | 30 | <!-- 请假申请 --> |
| 31 | 31 | <el-dialog :title="title" :visible.sync="leaveApplicationOpen" width="500px" append-to-body> |
| 32 | 32 | <leaveApplicationInfo :idInfo="idInfo" v-if="leaveApplicationOpen"/> |
| 33 | - <div slot="footer" class="dialog-footer"> | |
| 34 | - <div slot="footer" class="dialog-footer"> | |
| 35 | - <el-button type="danger" @click="leaveApplicationSubmitForm(1)">驳回</el-button> | |
| 36 | - <el-button type="primary" @click="leaveApplicationSubmitForm(0)">通过</el-button> | |
| 37 | - </div> | |
| 38 | - </div> | |
| 39 | 33 | </el-dialog> |
| 40 | 34 | |
| 41 | 35 | |
| 42 | 36 | <el-dialog :title="title" :visible.sync="earthsites" width="800px" append-to-body> |
| 43 | 37 | <earthsitesInfo :businessKey="businessKey" v-if="earthsites" /> |
| 44 | - <div slot="footer" class="dialog-footer"> | |
| 45 | - <el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button> | |
| 46 | - <el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">通过</el-button> | |
| 47 | - </div> | |
| 48 | 38 | </el-dialog> |
| 49 | 39 | |
| 50 | 40 | <el-dialog :title="title" :visible.sync="contract" width="800px" append-to-body> |
| 51 | 41 | <contractInfo :businessKey="businessKey" v-if="contract" /> |
| 52 | - <div slot="footer" class="dialog-footer"> | |
| 53 | - <el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button> | |
| 54 | - <el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">通过</el-button> | |
| 55 | - </div> | |
| 56 | 42 | </el-dialog> |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + <!-- 后勤管理 --> | |
| 47 | + <el-dialog :title="title" :visible.sync="logisticsInfoOpen" width="500px" append-to-body | |
| 48 | + :close-on-click-modal="false"> | |
| 49 | + <logisticsInfo :idInfo="idInfo" v-if="logisticsInfoOpen"/> | |
| 50 | + </el-dialog> | |
| 51 | + | |
| 52 | + <!-- 办文办事 --> | |
| 53 | + <el-dialog :title="title" :visible.sync="handleAffairsInfoOpen" width="600px" append-to-body | |
| 54 | + :close-on-click-modal="false"> | |
| 55 | + <handleInfo ref="handleAffairsInfoRef" :idInfo="idInfo" v-if="handleAffairsInfoOpen" :depts="depts" | |
| 56 | + :businessKey="definitionKey" | |
| 57 | + :controlId="controlId"/> | |
| 58 | + </el-dialog> | |
| 59 | + | |
| 60 | + <!-- 线下案卷交办 --> | |
| 61 | + <el-dialog :title="title" :visible.sync="caseOffline" width="600px" append-to-body :close-on-click-modal="false"> | |
| 62 | + <caseOfflineInfo :businessKey="businessKey" v-if="caseOffline"/> | |
| 63 | + </el-dialog> | |
| 64 | + | |
| 65 | + <!-- 平台违规信息 --> | |
| 66 | + <el-dialog :title="title" :visible.sync="violationCaseFile" width="850px" append-to-body :close-on-click-modal="false"> | |
| 67 | + <violationCaseFileInfo :idInfo="businessKey" v-if="violationCaseFile"/> | |
| 68 | + </el-dialog> | |
| 69 | + | |
| 70 | + <!-- 违规预警信息 --> | |
| 71 | + <el-dialog :title="title" :visible.sync="violationCaseFile1" width="850px" append-to-body :close-on-click-modal="false"> | |
| 72 | + <violationWarningInformationInfo :idInfo="businessKey" v-if="violationCaseFile1"/> | |
| 73 | + </el-dialog> | |
| 74 | + | |
| 57 | 75 | </div> |
| 58 | 76 | </template> |
| 59 | 77 | |
| ... | ... | @@ -68,17 +86,20 @@ |
| 68 | 86 | formDataShow |
| 69 | 87 | } from "@/api/activiti/taskhistory"; |
| 70 | 88 | |
| 89 | + import { getSignByObjId, addSign, updateSign } from "@/api/sign/sign"; | |
| 71 | 90 | import taskCard from "@/views/activiti/task/taskCard"; |
| 72 | 91 | import earthSitesForm from "@/views/workflow/earthSitesForm"; |
| 73 | 92 | import threestepInfo from "@/views/business/threestep/threestepInfo"; |
| 74 | - | |
| 75 | - | |
| 76 | -import { getSignByObjId, addSign, updateSign } from "@/api/sign/sign"; | |
| 77 | -import constructsiteInfo from "@/views/activiti/task/constructsiteInfo"; | |
| 93 | + import constructsiteInfo from "@/views/activiti/task/constructsiteInfo"; | |
| 78 | 94 | import conferenceInfo from "@/views/office/conference/conferenceInfo"; |
| 79 | 95 | import leaveApplicationInfo from "@/views/office/leaveApplication/leaveApplicationInfo"; |
| 80 | 96 | import earthsitesInfo from "@/views/activiti/task/earthsitesInfo"; |
| 81 | 97 | import contractInfo from "@/views/activiti/task/contractInfo"; |
| 98 | + import logisticsInfo from "@/views/office/logistics/logisticsInfo"; | |
| 99 | + import handleInfo from "@/views/office/handle/handleInfo"; | |
| 100 | + import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo"; | |
| 101 | + import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo"; | |
| 102 | + import violationWarningInformationInfo from "@/views/casefile/violationWarningInformation/violationWarningInformationInfo"; | |
| 82 | 103 | |
| 83 | 104 | |
| 84 | 105 | export default { |
| ... | ... | @@ -210,6 +231,33 @@ import constructsiteInfo from "@/views/activiti/task/constructsiteInfo"; |
| 210 | 231 | return; |
| 211 | 232 | } |
| 212 | 233 | |
| 234 | + if (this.definitionKey == "logistics") { | |
| 235 | + this.idInfo = row.businessKey.substring(row.businessKey.lastIndexOf(":") + 1); | |
| 236 | + this.logisticsInfoOpen = true; | |
| 237 | + return; | |
| 238 | + } | |
| 239 | + if (this.definitionKey == "handleAffairs" || this.definitionKey == "gongwenchuli" || this.definitionKey == "yuelan" || this.definitionKey=="yuelanxuexi") { | |
| 240 | + this.controlId = this.form.formData[0].controlId; | |
| 241 | + this.idInfo = row.businessKey.split(":")[1]; | |
| 242 | + this.handleAffairsInfoOpen = true; | |
| 243 | + return; | |
| 244 | + } | |
| 245 | + if(this.definitionKey == "workflow_caseoffline"){ | |
| 246 | + this.caseOffline = true; | |
| 247 | + return; | |
| 248 | + } | |
| 249 | + | |
| 250 | + if(this.definitionKey == "workflow_casefile"){ | |
| 251 | + this.violationCaseFile = true; | |
| 252 | + return; | |
| 253 | + } | |
| 254 | + | |
| 255 | + if(this.definitionKey == "violation_warning"){ | |
| 256 | + this.violationCaseFile1 = true; | |
| 257 | + return; | |
| 258 | + } | |
| 259 | + | |
| 260 | + | |
| 213 | 261 | }, |
| 214 | 262 | } |
| 215 | 263 | }; | ... | ... |
trash-ui/src/views/activiti/taskhistory/index.vue
| ... | ... | @@ -5,6 +5,14 @@ |
| 5 | 5 | |
| 6 | 6 | <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> |
| 7 | 7 | |
| 8 | + <!-- 审批对话框 --> | |
| 9 | + <el-dialog :title="title" :visible.sync="open" v-if="open" width="500px" append-to-body> | |
| 10 | + | |
| 11 | + <div slot="footer" class="dialog-footer"> | |
| 12 | + <el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button> | |
| 13 | + <el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">通过</el-button> | |
| 14 | + </div> | |
| 15 | + </el-dialog> | |
| 8 | 16 | <el-dialog :title="title" :visible.sync="open2" width="800px" append-to-body> |
| 9 | 17 | <threestepInfo :businessKey="businessKey" v-if="open2"/> |
| 10 | 18 | </el-dialog> |
| ... | ... | @@ -25,18 +33,41 @@ |
| 25 | 33 | |
| 26 | 34 | <el-dialog :title="title" :visible.sync="earthsites" width="800px" append-to-body> |
| 27 | 35 | <earthsitesInfo :businessKey="businessKey" v-if="earthsites" /> |
| 28 | - <div slot="footer" class="dialog-footer"> | |
| 29 | - <el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button> | |
| 30 | - <el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">通过</el-button> | |
| 31 | - </div> | |
| 32 | 36 | </el-dialog> |
| 33 | 37 | |
| 34 | 38 | <el-dialog :title="title" :visible.sync="contract" width="800px" append-to-body> |
| 35 | 39 | <contractInfo :businessKey="businessKey" v-if="contract" /> |
| 36 | - <div slot="footer" class="dialog-footer"> | |
| 37 | - <el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button> | |
| 38 | - <el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">通过</el-button> | |
| 39 | - </div> | |
| 40 | + </el-dialog> | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + <!-- 后勤管理 --> | |
| 45 | + <el-dialog :title="title" :visible.sync="logisticsInfoOpen" width="500px" append-to-body | |
| 46 | + :close-on-click-modal="false"> | |
| 47 | + <logisticsInfo :idInfo="idInfo" v-if="logisticsInfoOpen"/> | |
| 48 | + </el-dialog> | |
| 49 | + | |
| 50 | + <!-- 办文办事 --> | |
| 51 | + <el-dialog :title="title" :visible.sync="handleAffairsInfoOpen" width="600px" append-to-body | |
| 52 | + :close-on-click-modal="false"> | |
| 53 | + <handleInfo ref="handleAffairsInfoRef" :idInfo="idInfo" v-if="handleAffairsInfoOpen" :depts="depts" | |
| 54 | + :businessKey="definitionKey" | |
| 55 | + :controlId="controlId"/> | |
| 56 | + </el-dialog> | |
| 57 | + | |
| 58 | + <!-- 线下案卷交办 --> | |
| 59 | + <el-dialog :title="title" :visible.sync="caseOffline" width="600px" append-to-body :close-on-click-modal="false"> | |
| 60 | + <caseOfflineInfo :businessKey="businessKey" v-if="caseOffline"/> | |
| 61 | + </el-dialog> | |
| 62 | + | |
| 63 | + <!-- 平台违规信息 --> | |
| 64 | + <el-dialog :title="title" :visible.sync="violationCaseFile" width="850px" append-to-body :close-on-click-modal="false"> | |
| 65 | + <violationCaseFileInfo :idInfo="businessKey" v-if="violationCaseFile"/> | |
| 66 | + </el-dialog> | |
| 67 | + | |
| 68 | + <!-- 违规预警信息 --> | |
| 69 | + <el-dialog :title="title" :visible.sync="violationCaseFile1" width="850px" append-to-body :close-on-click-modal="false"> | |
| 70 | + <violationWarningInformationInfo :idInfo="businessKey" v-if="violationCaseFile1"/> | |
| 40 | 71 | </el-dialog> |
| 41 | 72 | </div> |
| 42 | 73 | </template> |
| ... | ... | @@ -51,21 +82,20 @@ |
| 51 | 82 | formDataShow |
| 52 | 83 | } from "@/api/activiti/taskhistory"; |
| 53 | 84 | |
| 54 | - | |
| 55 | - | |
| 56 | - | |
| 85 | + import { getSignByObjId, addSign, updateSign } from "@/api/sign/sign"; | |
| 57 | 86 | import taskCard from "@/views/activiti/task/taskCard"; |
| 58 | - import leaveHistoryForm from "@/views/workflow/leaveHistoryForm"; | |
| 87 | + import earthSitesForm from "@/views/workflow/earthSitesForm"; | |
| 59 | 88 | import threestepInfo from "@/views/business/threestep/threestepInfo"; |
| 60 | - | |
| 61 | - | |
| 62 | -import { getSignByObjId, addSign, updateSign } from "@/api/sign/sign"; | |
| 63 | -import constructsiteInfo from "@/views/activiti/task/constructsiteInfo"; | |
| 64 | - | |
| 89 | + import constructsiteInfo from "@/views/activiti/task/constructsiteInfo"; | |
| 65 | 90 | import conferenceInfo from "@/views/office/conference/conferenceInfo"; |
| 66 | 91 | import leaveApplicationInfo from "@/views/office/leaveApplication/leaveApplicationInfo"; |
| 67 | 92 | import earthsitesInfo from "@/views/activiti/task/earthsitesInfo"; |
| 68 | 93 | import contractInfo from "@/views/activiti/task/contractInfo"; |
| 94 | + import logisticsInfo from "@/views/office/logistics/logisticsInfo"; | |
| 95 | + import handleInfo from "@/views/office/handle/handleInfo"; | |
| 96 | + import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo"; | |
| 97 | + import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo"; | |
| 98 | + import violationWarningInformationInfo from "@/views/casefile/violationWarningInformation/violationWarningInformationInfo"; | |
| 69 | 99 | |
| 70 | 100 | |
| 71 | 101 | |
| ... | ... | @@ -162,6 +192,7 @@ import constructsiteInfo from "@/views/activiti/task/constructsiteInfo"; |
| 162 | 192 | this.businessKey = row.businessKey; |
| 163 | 193 | this.id = row.id; |
| 164 | 194 | |
| 195 | + this.title = "详情"; | |
| 165 | 196 | |
| 166 | 197 | if(this.definitionKey == "conference"){ |
| 167 | 198 | this.idInfo = row.businessKey.substring(row.businessKey.indexOf(":")+1); |
| ... | ... | @@ -181,32 +212,46 @@ import constructsiteInfo from "@/views/activiti/task/constructsiteInfo"; |
| 181 | 212 | }); |
| 182 | 213 | return; |
| 183 | 214 | } |
| 215 | + if(this.definitionKey == "workflow_earthsites"){ | |
| 216 | + this.earthsites = true; | |
| 217 | + return; | |
| 218 | + } | |
| 219 | + if(this.definitionKey == "workflow_conract"){ | |
| 220 | + this.contract = true; | |
| 221 | + return; | |
| 222 | + } | |
| 223 | + | |
| 224 | + | |
| 225 | + if(this.definitionKey == "workflow_threestep"){ | |
| 226 | + this.open2 = true; | |
| 227 | + return; | |
| 228 | + } | |
| 184 | 229 | |
| 185 | - if(this.definitionKey == "workflow_constructsite"){ | |
| 186 | - getSignByObjId(this.businessKey.split(":")[1]).then(res=>{ | |
| 187 | - this.signData = res; | |
| 188 | - this.construct = true; | |
| 189 | - }); | |
| 190 | - return; | |
| 191 | - } | |
| 192 | - if(this.definitionKey == "workflow_earthsites"){ | |
| 193 | - this.earthsites = true; | |
| 194 | - return; | |
| 195 | - } | |
| 196 | - if(this.definitionKey == "workflow_conract"){ | |
| 197 | - this.contract = true; | |
| 198 | - return; | |
| 199 | - } | |
| 200 | - | |
| 201 | - | |
| 202 | - if(this.definitionKey == "workflow_threestep"){ | |
| 203 | - this.open2 = true; | |
| 204 | - return; | |
| 205 | - } | |
| 206 | - | |
| 207 | - | |
| 208 | - | |
| 209 | - | |
| 230 | + if (this.definitionKey == "logistics") { | |
| 231 | + this.idInfo = row.businessKey.substring(row.businessKey.lastIndexOf(":") + 1); | |
| 232 | + this.logisticsInfoOpen = true; | |
| 233 | + return; | |
| 234 | + } | |
| 235 | + if (this.definitionKey == "handleAffairs" || this.definitionKey == "gongwenchuli" || this.definitionKey == "yuelan" || this.definitionKey=="yuelanxuexi") { | |
| 236 | + this.controlId = this.form.formData[0].controlId; | |
| 237 | + this.idInfo = row.businessKey.split(":")[1]; | |
| 238 | + this.handleAffairsInfoOpen = true; | |
| 239 | + return; | |
| 240 | + } | |
| 241 | + if(this.definitionKey == "workflow_caseoffline"){ | |
| 242 | + this.caseOffline = true; | |
| 243 | + return; | |
| 244 | + } | |
| 245 | + | |
| 246 | + if(this.definitionKey == "workflow_casefile"){ | |
| 247 | + this.violationCaseFile = true; | |
| 248 | + return; | |
| 249 | + } | |
| 250 | + | |
| 251 | + if(this.definitionKey == "violation_warning"){ | |
| 252 | + this.violationCaseFile1 = true; | |
| 253 | + return; | |
| 254 | + } | |
| 210 | 255 | |
| 211 | 256 | |
| 212 | 257 | }, | ... | ... |
trash-ui/src/views/business/CompanyCredit/index.vue
| ... | ... | @@ -152,7 +152,7 @@ |
| 152 | 152 | <el-table-column label="序号" align="center" type="index" /> |
| 153 | 153 | <el-table-column label="失信时间" align="center" prop="time" width="180"> |
| 154 | 154 | <template slot-scope="scope"> |
| 155 | - <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> | |
| 155 | + <span>{{ scope.row.time}}</span> | |
| 156 | 156 | </template> |
| 157 | 157 | </el-table-column> |
| 158 | 158 | <el-table-column label="情况说明" align="center" prop="reason" /> | ... | ... |
trash-ui/src/views/business/ConstructionCredit/index.vue
| ... | ... | @@ -140,7 +140,7 @@ |
| 140 | 140 | </div> |
| 141 | 141 | </el-dialog> |
| 142 | 142 | |
| 143 | - <el-dialog title="历史失信" :visible.sync="infoDialog" width="800px" append-to-body> | |
| 143 | + <el-dialog title="历史失信" :visible.sync="infoDialog" width="300px" append-to-body> | |
| 144 | 144 | <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> |
| 145 | 145 | <el-table-column label="序号" align="center" type="index" /> |
| 146 | 146 | <el-table-column label="失信时间" align="center" prop="time" width="180" /> | ... | ... |
trash-ui/src/views/business/DriverCredit/index.vue
| ... | ... | @@ -130,9 +130,6 @@ |
| 130 | 130 | <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> |
| 131 | 131 | <el-table-column label="序号" align="center" type="index" /> |
| 132 | 132 | <el-table-column label="失信时间" align="center" prop="time" width="180"> |
| 133 | - <template slot-scope="scope"> | |
| 134 | - <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> | |
| 135 | - </template> | |
| 136 | 133 | </el-table-column> |
| 137 | 134 | <el-table-column label="情况说明" align="center" prop="reason" /> |
| 138 | 135 | <el-table-column label="操作历史" align="center" prop="lostCredit"> | ... | ... |
trash-ui/src/views/business/TruckCredit/index.vue
| ... | ... | @@ -133,9 +133,6 @@ |
| 133 | 133 | <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> |
| 134 | 134 | <el-table-column label="序号" align="center" type="index" /> |
| 135 | 135 | <el-table-column label="失信时间" align="center" prop="time" width="180" > |
| 136 | - <template slot-scope="scope"> | |
| 137 | - <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> | |
| 138 | - </template> | |
| 139 | 136 | </el-table-column> |
| 140 | 137 | <el-table-column label="情况说明" align="center" prop="reason" /> |
| 141 | 138 | <el-table-column label="操作历史" align="center" prop="lostCredit"> | ... | ... |
trash-ui/src/views/business/dayWorkReport/index.vue
| ... | ... | @@ -82,7 +82,8 @@ |
| 82 | 82 | <script> |
| 83 | 83 | import { |
| 84 | 84 | dayWorkList, |
| 85 | - exportDayWorkList | |
| 85 | + exportDayWorkList, | |
| 86 | + exportDayWorkHistoryList | |
| 86 | 87 | } from "@/api/business/daywork"; |
| 87 | 88 | |
| 88 | 89 | |
| ... | ... | @@ -207,19 +208,18 @@ |
| 207 | 208 | |
| 208 | 209 | this.loading = true; |
| 209 | 210 | |
| 210 | - let query = this.queryParams; | |
| 211 | + // let query = this.queryParams; | |
| 212 | + | |
| 211 | 213 | |
| 212 | 214 | if(this.queryParams.his != tabIdx && tabIdx == 1){ |
| 215 | + this.resetQuery(); | |
| 213 | 216 | this.queryParams.his = tabIdx; |
| 214 | - query.workStartTime = "2000-01-01 00:00:00"; | |
| 215 | - query.workEndTime = "2999-01-01 00:00:00"; | |
| 216 | 217 | }else if(tabIdx==0){ |
| 218 | + this.resetQuery(); | |
| 217 | 219 | this.queryParams.his = null; |
| 218 | - query.workStartTime = null; | |
| 219 | - query.workEndTime = null; | |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | - dayWorkList(query).then(response => { | |
| 222 | + dayWorkList(this.queryParams).then(response => { | |
| 223 | 223 | |
| 224 | 224 | this.threestepList = response.rows; |
| 225 | 225 | |
| ... | ... | @@ -229,6 +229,8 @@ |
| 229 | 229 | this.threestepList[i].place = this.getAreaName(this.threestepList[i].place); |
| 230 | 230 | if(this.outside.indexOf(this.threestepList[i].place) > -1){ |
| 231 | 231 | if(this.threestepList[i].status == "开工"){ |
| 232 | + this.threestepList[i].estatus = "开工"; | |
| 233 | + this.threestepList[i].eselfCheckTime = this.threestepList[i].selfCheckTime; | |
| 232 | 234 | this.threestepList[i].descript = "开工"; |
| 233 | 235 | } |
| 234 | 236 | } |
| ... | ... | @@ -269,7 +271,20 @@ |
| 269 | 271 | str = ""; |
| 270 | 272 | } |
| 271 | 273 | |
| 272 | - this.dayWorkCount = str + "长沙市工地开工数量:" + count + " " + str +"长沙市消纳场开工数量:" + count1; | |
| 274 | + let area = "长沙市"; | |
| 275 | + let area1 = "长沙市"; | |
| 276 | + | |
| 277 | + if(this.queryParams.place){ | |
| 278 | + area = this.getAreaName(this.queryParams.place) | |
| 279 | + } | |
| 280 | + | |
| 281 | + | |
| 282 | + if(this.queryParams.subReason){ | |
| 283 | + area1 = this.getAreaName(this.queryParams.subReason) | |
| 284 | + } | |
| 285 | + | |
| 286 | + | |
| 287 | + this.dayWorkCount = str + area +"工地开工数量:" + count + " " + str + area1 +"消纳场开工数量:" + count1; | |
| 273 | 288 | this.loading = false; |
| 274 | 289 | }); |
| 275 | 290 | |
| ... | ... | @@ -456,11 +471,12 @@ |
| 456 | 471 | handleExport() { |
| 457 | 472 | |
| 458 | 473 | let data = []; |
| 474 | + let index = 1; | |
| 459 | 475 | for(let i in this.threestepList){ |
| 460 | 476 | |
| 461 | 477 | |
| 462 | 478 | let obj = { |
| 463 | - id:this.threestepList[i].id, | |
| 479 | + id:index, | |
| 464 | 480 | name:this.threestepList[i].name, |
| 465 | 481 | createTime:this.threestepList[i].createTime, |
| 466 | 482 | selfCheckTime:this.threestepList[i].selfCheckTime, |
| ... | ... | @@ -476,19 +492,32 @@ |
| 476 | 492 | } |
| 477 | 493 | |
| 478 | 494 | data.push(obj); |
| 495 | + index += 1; | |
| 479 | 496 | |
| 497 | + } | |
| 498 | + if(this.queryParams.his ==1){ | |
| 499 | + this.$confirm('是否确认导出所有开工报表数据项?', "警告", { | |
| 500 | + confirmButtonText: "确定", | |
| 501 | + cancelButtonText: "取消", | |
| 502 | + type: "warning" | |
| 503 | + }).then(function() { | |
| 504 | + return exportDayWorkHistoryList(data); | |
| 505 | + }).then(response => { | |
| 506 | + this.download(response.message); | |
| 507 | + }) | |
| 508 | + }else{ | |
| 509 | + this.$confirm('是否确认导出所有开工报表数据项?', "警告", { | |
| 510 | + confirmButtonText: "确定", | |
| 511 | + cancelButtonText: "取消", | |
| 512 | + type: "warning" | |
| 513 | + }).then(function() { | |
| 514 | + return exportDayWorkList(data); | |
| 515 | + }).then(response => { | |
| 516 | + this.download(response.message); | |
| 517 | + }) | |
| 518 | + } | |
| 480 | 519 | |
| 481 | 520 | |
| 482 | - } | |
| 483 | - this.$confirm('是否确认导出所有开工报表数据项?', "警告", { | |
| 484 | - confirmButtonText: "确定", | |
| 485 | - cancelButtonText: "取消", | |
| 486 | - type: "warning" | |
| 487 | - }).then(function() { | |
| 488 | - return exportDayWorkList(data); | |
| 489 | - }).then(response => { | |
| 490 | - this.download(response.message); | |
| 491 | - }) | |
| 492 | 521 | } |
| 493 | 522 | } |
| 494 | 523 | }; | ... | ... |
trash-ui/src/views/business/threestep/index.vue
| ... | ... | @@ -87,12 +87,11 @@ |
| 87 | 87 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| 88 | 88 | <template slot-scope="scope"> |
| 89 | 89 | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
| 90 | - v-hasPermi="['business:threestep:edit']" v-if="queryParams.pageStatus==1 && scope.row.status==1">抽查</el-button> | |
| 90 | + v-hasPermi="['business:threestep:edit']" v-if="queryParams.pageStatus==1 && scope.row.status==1 && scope.row.checkEndTime == null">抽查</el-button> | |
| 91 | 91 | <el-button size="mini" type="text" icon="el-icon-edit" @click="reSub(scope.row)" |
| 92 | 92 | v-hasPermi="['business:threestep:add']" v-if="scope.row.status==2">被驳回</el-button> |
| 93 | 93 | |
| 94 | - <el-button size="mini" type="text" @click="handleUpdate(scope.row)" | |
| 95 | - v-hasPermi="['business:threestep:edit']">查看详情</el-button> | |
| 94 | + <el-button size="mini" type="text" @click="handleUpdate(scope.row)" v-hasPermi="['business:threestep:edit']">查看详情</el-button> | |
| 96 | 95 | </template> |
| 97 | 96 | </el-table-column> |
| 98 | 97 | </el-table> |
| ... | ... | @@ -154,18 +153,18 @@ |
| 154 | 153 | </el-form-item> |
| 155 | 154 | </el-col> |
| 156 | 155 | </el-row> |
| 157 | - <el-row type="flex" justify="center" v-if="form.type == 0"> | |
| 158 | - <el-col :span="12"> | |
| 156 | + <el-row type="flex" justify="center" v-if="form.type == 0" > | |
| 157 | + <el-col :span="12" > | |
| 159 | 158 | <el-form-item label="运输企业" prop="companys"> |
| 160 | - <el-select v-model="form.companys" filterable multiple @change="checkCompany"> | |
| 159 | + <el-select v-model="form.companys" filterable multiple @change="checkCompany" > | |
| 161 | 160 | <el-option v-for="item in companyList" :label="item.name" :value="item.name" :key="item.id" |
| 162 | 161 | /> |
| 163 | 162 | </el-select> |
| 164 | 163 | </el-form-item> |
| 165 | 164 | </el-col> |
| 166 | - <el-col :span="12"> | |
| 167 | - <el-form-item label="运输车辆" prop="companyTrucks"> | |
| 168 | - <el-select v-model="form.companyTrucks" filterable multiple reserve-keyword> | |
| 165 | + <el-col :span="12" > | |
| 166 | + <el-form-item label="运输车辆" prop="companyTrucks" > | |
| 167 | + <el-select v-model="form.companyTrucks" filterable multiple reserve-keyword > | |
| 169 | 168 | <el-option v-for="item in truckList" :label="item.licenseplateNo" :value="item.id" :key="item.id" |
| 170 | 169 | v-if="form.companys && (form.companys.indexOf(item.companyName) > -1)"></el-option> |
| 171 | 170 | </el-select> |
| ... | ... | @@ -281,7 +280,7 @@ |
| 281 | 280 | |
| 282 | 281 | <el-form ref="form" :model="form" :rules="rules" label-width="100px" v-if="this.queryParams.pageStatus==1"> |
| 283 | 282 | <el-form-item label="补充说明"> |
| 284 | - <el-input type="textarea" v-model="form.subSubReason" ></el-input> | |
| 283 | + <el-input type="textarea" v-model="form.subSubReason" maxlength="100"></el-input> | |
| 285 | 284 | </el-form-item> |
| 286 | 285 | |
| 287 | 286 | <el-row type="flex" justify="center"> |
| ... | ... | @@ -301,8 +300,6 @@ |
| 301 | 300 | <p v-for="img,index in form.attchItem3">{{img.split("/")[img.split("/").length -1]}}<a @click="removeAttchItem(3,img)" style="color:red"> x</a></p> |
| 302 | 301 | </el-col> |
| 303 | 302 | </el-row> |
| 304 | - | |
| 305 | - | |
| 306 | 303 | </el-form> |
| 307 | 304 | |
| 308 | 305 | <div slot="footer" class="dialog-footer"> |
| ... | ... | @@ -436,6 +433,9 @@ |
| 436 | 433 | }, |
| 437 | 434 | // 表单参数 |
| 438 | 435 | form: { |
| 436 | + companys:null, | |
| 437 | + companyTrucks:null, | |
| 438 | + | |
| 439 | 439 | }, |
| 440 | 440 | picIndex: null, |
| 441 | 441 | // 表单校验 |
| ... | ... | @@ -450,11 +450,6 @@ |
| 450 | 450 | message: '请填写完整', |
| 451 | 451 | trigger: 'change' |
| 452 | 452 | }, ], |
| 453 | - companys: [{ | |
| 454 | - required: true, | |
| 455 | - message: '请填写完整', | |
| 456 | - trigger: 'change' | |
| 457 | - }, ], | |
| 458 | 453 | objectId: [{ |
| 459 | 454 | required: true, |
| 460 | 455 | message: '请填写完整', |
| ... | ... | @@ -470,8 +465,13 @@ |
| 470 | 465 | message: '请填写完整', |
| 471 | 466 | trigger: 'change' |
| 472 | 467 | }, ], |
| 468 | + companys: [{ | |
| 469 | + required: false, | |
| 470 | + message: '请填写完整', | |
| 471 | + trigger: 'change' | |
| 472 | + }, ], | |
| 473 | 473 | companyTrucks: [{ |
| 474 | - required: true, | |
| 474 | + required: false, | |
| 475 | 475 | message: '请填写完整', |
| 476 | 476 | trigger: 'change' |
| 477 | 477 | }, ], |
| ... | ... | @@ -520,30 +520,31 @@ |
| 520 | 520 | } |
| 521 | 521 | }); |
| 522 | 522 | |
| 523 | - let query = { | |
| 524 | - 'page':1, | |
| 525 | - 'size':9999, | |
| 526 | - } | |
| 523 | + // let query = { | |
| 524 | + // 'page':1, | |
| 525 | + // 'size':9999, | |
| 526 | + // } | |
| 527 | 527 | |
| 528 | - companyList(query).then(response => { | |
| 528 | + // companyList(query).then(response => { | |
| 529 | 529 | |
| 530 | - let companys = response.result.list; | |
| 531 | - this.companyList = companys; | |
| 532 | - let ids = []; | |
| 530 | + // let companys = response.result.list; | |
| 531 | + // this.companyList = companys; | |
| 532 | + // let ids = []; | |
| 533 | 533 | |
| 534 | - for(let i = 0 ;i<companys.length;i++){ | |
| 535 | - ids.push(companys[i].id); | |
| 536 | - } | |
| 537 | - query.companyID = ids + ""; | |
| 538 | - query.valid = 0; | |
| 534 | + // for(let i = 0 ;i<companys.length;i++){ | |
| 535 | + // ids.push(companys[i].id); | |
| 536 | + // } | |
| 537 | + // query.companyID = ids + ""; | |
| 538 | + // query.valid = 0; | |
| 539 | 539 | |
| 540 | - truckList(query).then(res=>{ | |
| 541 | - this.truckList = res.result.list; | |
| 542 | - }); | |
| 543 | - }); | |
| 540 | + // truckList(query).then(res=>{ | |
| 541 | + // this.truckList = res.result.list; | |
| 542 | + // }); | |
| 543 | + // }); | |
| 544 | 544 | |
| 545 | 545 | |
| 546 | 546 | this.getList(0); |
| 547 | + | |
| 547 | 548 | }, |
| 548 | 549 | methods: { |
| 549 | 550 | conractCheck(item){ |
| ... | ... | @@ -626,58 +627,44 @@ |
| 626 | 627 | 'size':9999, |
| 627 | 628 | } |
| 628 | 629 | |
| 629 | - companyList(query).then(response => { | |
| 630 | + this.companyList = []; | |
| 631 | + this.truckList = []; | |
| 630 | 632 | |
| 631 | - let companys = response.result.list; | |
| 632 | - this.companyList = companys; | |
| 633 | - let ids = []; | |
| 633 | + mainworkcompany(item.id).then(response => { | |
| 634 | 634 | |
| 635 | - for(let i = 0 ;i<companys.length;i++){ | |
| 636 | - ids.push(companys[i].id); | |
| 637 | - } | |
| 638 | - query.companyID = ids + ""; | |
| 639 | - query.valid = 0; | |
| 640 | - | |
| 641 | - truckList(query).then(res=>{ | |
| 642 | - this.truckList = res.result.list; | |
| 643 | - }); | |
| 644 | - }); | |
| 635 | + this.companyList.push({id:item.transportCompanyId , name: item.transportCompany}); | |
| 645 | 636 | |
| 646 | - // mainworkcompany(item.id).then(response => { | |
| 637 | + let query = { | |
| 638 | + 'page':1, | |
| 639 | + 'size':9999, | |
| 640 | + 'creditStatus':0 | |
| 641 | + } | |
| 647 | 642 | |
| 648 | - // let companys = response.result.list; | |
| 649 | - // this.companyList = companys; | |
| 650 | - // let ids = []; | |
| 643 | + let ids = []; | |
| 651 | 644 | |
| 652 | - // for(let i = 0 ;i<companys.length;i++){ | |
| 653 | - // ids.push(companys[i].id); | |
| 654 | - // } | |
| 645 | + ids.push(item.transportCompanyId); | |
| 655 | 646 | |
| 656 | - // let query = { | |
| 657 | - // 'page':1, | |
| 658 | - // 'size':9999, | |
| 659 | - // 'creditStatus':0 | |
| 660 | - // } | |
| 647 | + query.companyID = ids; | |
| 648 | + query.valid = 0; | |
| 661 | 649 | |
| 662 | - // query.companyID = ids + ""; | |
| 663 | - // query.valid = 0; | |
| 650 | + getConstructionTruck(item.id).then(res=>{ | |
| 651 | + for(let i in res.result){ | |
| 664 | 652 | |
| 665 | - // getConstructionTruck(item.id).then(res=>{ | |
| 666 | - // for(let i in res.result){ | |
| 653 | + this.companyList.push({id:res.result[i].companyId , name: res.result[i].companyName}); | |
| 667 | 654 | |
| 668 | - // this.companyList.push({id:res.result[i].companyId , name: res.result[i].companyName}); | |
| 655 | + query.companyID += "," + res.result[i].companyId; | |
| 669 | 656 | |
| 670 | - // ids.push(res.result[i].companyId); | |
| 657 | + query.companyID = query.companyID.substring(0,query.companyID.length -1); | |
| 671 | 658 | |
| 672 | - // truckList(query).then(res=>{ | |
| 673 | - // this.truckList = res.result.list; | |
| 674 | - // }); | |
| 659 | + truckList(query).then(res=>{ | |
| 660 | + this.truckList = res.result.list; | |
| 661 | + }); | |
| 675 | 662 | |
| 676 | - // } | |
| 677 | - // }); | |
| 663 | + } | |
| 664 | + }); | |
| 678 | 665 | |
| 679 | 666 | |
| 680 | - // }); | |
| 667 | + }); | |
| 681 | 668 | |
| 682 | 669 | |
| 683 | 670 | } |
| ... | ... | @@ -716,6 +703,7 @@ |
| 716 | 703 | this.filterContract.push(obj); |
| 717 | 704 | } |
| 718 | 705 | |
| 706 | + | |
| 719 | 707 | for(let j in this.bindData){ |
| 720 | 708 | |
| 721 | 709 | this.bindData[j].show = false; |
| ... | ... | @@ -731,11 +719,7 @@ |
| 731 | 719 | } |
| 732 | 720 | |
| 733 | 721 | } |
| 734 | - | |
| 735 | - | |
| 736 | 722 | } |
| 737 | - | |
| 738 | - | |
| 739 | 723 | }, |
| 740 | 724 | getEarthsiteId(item) { |
| 741 | 725 | this.form.earthsitesName = item.name; |
| ... | ... | @@ -770,8 +754,6 @@ |
| 770 | 754 | this.form[target].push(res); |
| 771 | 755 | return; |
| 772 | 756 | } |
| 773 | - | |
| 774 | - | |
| 775 | 757 | let target = "img" + this.picIndex; |
| 776 | 758 | |
| 777 | 759 | if (!this.form[target]) { |
| ... | ... | @@ -807,6 +789,9 @@ |
| 807 | 789 | this.fileList = []; |
| 808 | 790 | }, |
| 809 | 791 | selectType(value) { |
| 792 | + | |
| 793 | + this.rules.companys[0].required = false; | |
| 794 | + this.rules.companyTrucks[0].required = false; | |
| 810 | 795 | if (value == "0") { |
| 811 | 796 | this.labelName = "工地名称"; |
| 812 | 797 | this.labelName2 = "绑定消纳场"; |
| ... | ... | @@ -836,11 +821,14 @@ |
| 836 | 821 | for(let i in this.bindData){ |
| 837 | 822 | this.bindData[i].show = true; |
| 838 | 823 | } |
| 824 | + this.rules.companys[0].required = true; | |
| 825 | + this.rules.companyTrucks[0].required = true; | |
| 839 | 826 | } else { |
| 840 | 827 | this.remoteData = res.result.list; |
| 841 | 828 | } |
| 842 | 829 | }); |
| 843 | 830 | |
| 831 | + | |
| 844 | 832 | }, |
| 845 | 833 | |
| 846 | 834 | getAreaName(code){ |
| ... | ... | @@ -896,9 +884,6 @@ |
| 896 | 884 | this.threestepList[i].place = this.getAreaName(this.threestepList[i].place); |
| 897 | 885 | } |
| 898 | 886 | }); |
| 899 | - | |
| 900 | - | |
| 901 | - | |
| 902 | 887 | }, |
| 903 | 888 | // 取消按钮 |
| 904 | 889 | cancel() { |
| ... | ... | @@ -995,7 +980,16 @@ |
| 995 | 980 | }, |
| 996 | 981 | |
| 997 | 982 | checkEndSuccess(){ |
| 998 | - this.form.checkEndTime = new Date(); | |
| 983 | + | |
| 984 | + let year = new Date().getFullYear(); | |
| 985 | + let month = (new Date().getMonth() + 1) < 10 ? "0" + (new Date().getMonth() + 1) : (new Date().getMonth() + 1); | |
| 986 | + let date = new Date().getDate() < 10 ? "0" + new Date().getDate() : new Date().getDate(); | |
| 987 | + let hour = new Date().getHours() < 10 ? "0" + new Date().getHours() : new Date().getHours(); | |
| 988 | + let minute = new Date().getMinutes() < 10 ? "0" + new Date().getMinutes() : new Date().getMinutes(); | |
| 989 | + let second = new Date().getSeconds() < 10 ? "0" + new Date().getSeconds() : new Date().getSeconds(); | |
| 990 | + | |
| 991 | + | |
| 992 | + this.form.checkEndTime = year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second; | |
| 999 | 993 | this.form.id = this.businessKey; |
| 1000 | 994 | for (let i = 1; i < 4; i++) { |
| 1001 | 995 | if (this.form["attchItem" + i]) { |
| ... | ... | @@ -1020,11 +1014,11 @@ |
| 1020 | 1014 | this.msgSuccess("提交成功"); |
| 1021 | 1015 | this.open = false; |
| 1022 | 1016 | this.open2 = false; |
| 1017 | + this.info = false; | |
| 1023 | 1018 | this.getList(); |
| 1024 | 1019 | this.loading = false; |
| 1025 | 1020 | },error=>{ |
| 1026 | 1021 | this.loading = false; |
| 1027 | - console.log(this.form); | |
| 1028 | 1022 | this.form.companys = this.form.companys.split(","); |
| 1029 | 1023 | this.form.companyTrucks = this.form.companyTrucks.split(","); |
| 1030 | 1024 | |
| ... | ... | @@ -1048,6 +1042,7 @@ |
| 1048 | 1042 | this.msgSuccess("修改成功"); |
| 1049 | 1043 | this.open = false; |
| 1050 | 1044 | this.open2 = false; |
| 1045 | + this.info = false; | |
| 1051 | 1046 | this.getList(); |
| 1052 | 1047 | this.loading = false; |
| 1053 | 1048 | },error=>{ | ... | ... |
trash-ui/src/views/business/threestep/threestepInfo.vue
| ... | ... | @@ -294,7 +294,7 @@ |
| 294 | 294 | </el-row> |
| 295 | 295 | <el-row v-if="infoData.sub_img6" > |
| 296 | 296 | <el-col :span="4"> |
| 297 | - {{form.type==0?"摄像头视频截图2":"雾炮机"}} | |
| 297 | + {{infoData.type==0?"摄像头视频截图2":"雾炮机"}} | |
| 298 | 298 | </el-col> |
| 299 | 299 | <el-col :span="20"> |
| 300 | 300 | <el-row v-for="img,index in infoData.sub_img6.split(',')" style="margin-bottom:10px;"> |
| ... | ... | @@ -304,7 +304,7 @@ |
| 304 | 304 | </el-row> |
| 305 | 305 | <el-row v-if="infoData.sub_img7" > |
| 306 | 306 | <el-col :span="4"> |
| 307 | - {{form.type==0?"摄像头视频截图3":"裸露黄土覆盖照片"}} | |
| 307 | + {{infoData.type==0?"摄像头视频截图3":"裸露黄土覆盖照片"}} | |
| 308 | 308 | </el-col> |
| 309 | 309 | <el-col :span="20"> |
| 310 | 310 | <el-row v-for="img,index in infoData.sub_img7.split(',')" style="margin-bottom:10px;"> | ... | ... |
trash-ui/src/views/caseOffline/caseOffline/index.vue
| ... | ... | @@ -246,22 +246,26 @@ export default { |
| 246 | 246 | |
| 247 | 247 | if(window.location.search){ |
| 248 | 248 | let businessKey = window.location.search.split("=")[1]; |
| 249 | - let id; | |
| 250 | - if(businessKey.split(":").length == 2){ | |
| 251 | - id = businessKey.split(":")[1]; | |
| 252 | - }else{ | |
| 253 | - id = businessKey; | |
| 254 | - } | |
| 249 | + debugger; | |
| 250 | + if(window.location.search.split("=")[0] == "?businessKey"){ | |
| 251 | + let id; | |
| 252 | + if(businessKey.split(":").length == 2){ | |
| 253 | + id = businessKey.split(":")[1]; | |
| 254 | + }else{ | |
| 255 | + id = businessKey; | |
| 256 | + } | |
| 255 | 257 | |
| 256 | - getThreestep(id).then(response => { | |
| 257 | - let data = response.data; | |
| 258 | + getThreestep(id).then(response => { | |
| 259 | + let data = response.data; | |
| 258 | 260 | |
| 259 | - this.handleAdd(); | |
| 261 | + this.handleAdd(); | |
| 262 | + | |
| 263 | + this.form.siteType = data.type + ""; | |
| 264 | + this.form.siteName = data.name; | |
| 265 | + this.form.place = Number(data.place); | |
| 266 | + }); | |
| 267 | + } | |
| 260 | 268 | |
| 261 | - this.form.siteType = data.type + ""; | |
| 262 | - this.form.siteName = data.name; | |
| 263 | - this.form.place = Number(data.place); | |
| 264 | - }); | |
| 265 | 269 | } |
| 266 | 270 | |
| 267 | 271 | ... | ... |
trash-ui/src/views/casefile/violationCaseFile/index.vue
| ... | ... | @@ -56,16 +56,6 @@ |
| 56 | 56 | v-hasPermi="['casefile:violationCaseFile:add']" |
| 57 | 57 | >新增</el-button> |
| 58 | 58 | </el-col> |
| 59 | - <el-col :span="1.5"> | |
| 60 | - <el-button | |
| 61 | - type="success" | |
| 62 | - icon="el-icon-edit" | |
| 63 | - size="mini" | |
| 64 | - :disabled="single" | |
| 65 | - @click="handleUpdate" | |
| 66 | - v-hasPermi="['casefile:violationCaseFile:edit']" | |
| 67 | - >修改</el-button> | |
| 68 | - </el-col> | |
| 69 | 59 | <!-- <el-col :span="1.5">--> |
| 70 | 60 | <!-- <el-button--> |
| 71 | 61 | <!-- type="danger"--> | ... | ... |
trash-ui/src/views/casefile/violationWarningInformation/index.vue
| ... | ... | @@ -48,16 +48,6 @@ |
| 48 | 48 | v-hasPermi="['casefile:violationWarningInformation:add']" |
| 49 | 49 | >新增</el-button> |
| 50 | 50 | </el-col> |
| 51 | - <el-col :span="1.5"> | |
| 52 | - <el-button | |
| 53 | - type="success" | |
| 54 | - icon="el-icon-edit" | |
| 55 | - size="mini" | |
| 56 | - :disabled="single" | |
| 57 | - @click="handleUpdate" | |
| 58 | - v-hasPermi="['casefile:violationWarningInformation:edit']" | |
| 59 | - >修改</el-button> | |
| 60 | - </el-col> | |
| 61 | 51 | <!-- <el-col :span="1.5">--> |
| 62 | 52 | <!-- <el-button--> |
| 63 | 53 | <!-- type="danger"--> | ... | ... |
trash-ui/src/views/daily/situation/index.vue
| ... | ... | @@ -151,7 +151,7 @@ |
| 151 | 151 | <editor v-model="form.desc2" :min-height="192"/> |
| 152 | 152 | </el-form-item> |
| 153 | 153 | |
| 154 | - <el-form-item label="特发时间处置等其他情况" prop="desc3"> | |
| 154 | + <el-form-item label="突发事件处置等其他情况" prop="desc3"> | |
| 155 | 155 | <editor v-model="form.desc3" :min-height="192"/> |
| 156 | 156 | </el-form-item> |
| 157 | 157 | ... | ... |
trash-ui/src/views/h5/CompanyCredit/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <el-row :gutter="10" class="mb8"> | |
| 4 | + <el-col :span="1.5"> | |
| 5 | + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" @click="getData(1);" >失信企业</el-button> | |
| 6 | + </el-col> | |
| 7 | + <el-col :span="1.5"> | |
| 8 | + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" @click="getHistoryData(1);">历史失信企业</el-button> | |
| 9 | + </el-col> | |
| 10 | + </el-row> | |
| 11 | + | |
| 12 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> | |
| 13 | + | |
| 14 | + <el-form-item label="运输企业" prop="name"> | |
| 15 | + <el-select v-model="queryParams.name" | |
| 16 | + filterable | |
| 17 | + reserve-keyword | |
| 18 | + placeholder="运输企业" | |
| 19 | + | |
| 20 | + size="small" | |
| 21 | + :loading="loading"> | |
| 22 | + <el-option | |
| 23 | + v-for="item in dictNames" | |
| 24 | + :label="item" | |
| 25 | + :value="item"> | |
| 26 | + </el-option> | |
| 27 | + </el-select> | |
| 28 | + </el-form-item> | |
| 29 | + | |
| 30 | + <el-form-item label="所属区域" prop="place"> | |
| 31 | + <el-select v-model="queryParams.place" placeholder="所属区域" | |
| 32 | + filterable | |
| 33 | + reserve-keyword | |
| 34 | + | |
| 35 | + size="small" | |
| 36 | + :loading="loading"> | |
| 37 | + <el-option | |
| 38 | + v-for="item in dictPlaces" | |
| 39 | + :label="item" | |
| 40 | + :value="item"> | |
| 41 | + </el-option> | |
| 42 | + </el-select> | |
| 43 | + </el-form-item> | |
| 44 | + | |
| 45 | + <el-form-item label="失信日期" prop="time" v-show="queryParams.status==0"> | |
| 46 | + <el-date-picker size="small" style="width: 200px" v-model="queryParams.time" type="date" | |
| 47 | + value-format="yyyy-MM-dd" placeholder="失信日期"> | |
| 48 | + </el-date-picker> | |
| 49 | + </el-form-item> | |
| 50 | + | |
| 51 | + </el-form> | |
| 52 | + | |
| 53 | + <el-row :gutter="10" class="mb8"> | |
| 54 | + <el-col :span="1.5"> | |
| 55 | + <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['Company:credit:add']" v-if="queryParams.status==0">新增</el-button> | |
| 56 | + </el-col> | |
| 57 | + <el-col :span="1.5"> | |
| 58 | + <el-button size="mini" @click="handleExport" v-hasPermi="['Company:credit:export']">导出</el-button> | |
| 59 | + </el-col> | |
| 60 | + <el-col :span="1.5"> | |
| 61 | + <el-button type="primary" size="mini" @click="handleQuery">查询</el-button> | |
| 62 | + </el-col> | |
| 63 | + <el-col :span="1.5"> | |
| 64 | + <el-button size="mini" @click="resetQuery">重置</el-button> | |
| 65 | + </el-col> | |
| 66 | + </el-row> | |
| 67 | + | |
| 68 | + | |
| 69 | + <el-card class="box-card" v-for="item in creditList" style="margin-bottom: 10px;" | |
| 70 | + > | |
| 71 | + <el-row class="card_row"> | |
| 72 | + <el-col :span="24" class="card_grid"> | |
| 73 | + <div class="card_title" style="font-weight: bold;">运输企业:{{ item.name }}</div> | |
| 74 | + </el-col> | |
| 75 | + </el-row> | |
| 76 | + <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;"> | |
| 77 | + <el-col :span="24"> | |
| 78 | + <span >失信时间:{{ item.time }}</span> | |
| 79 | + </el-col> | |
| 80 | + </el-row> | |
| 81 | + | |
| 82 | + <el-row class="card_row"> | |
| 83 | + <el-col :span="24"> | |
| 84 | + <span >所属区域:{{item.place}}</span> | |
| 85 | + </el-col> | |
| 86 | + </el-row> | |
| 87 | + <el-row class="card_row"> | |
| 88 | + <el-col :span="24"> | |
| 89 | + <span >失信原因:{{item.reason}}</span> | |
| 90 | + </el-col> | |
| 91 | + </el-row> | |
| 92 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(item)" v-hasPermi="['Company:credit:edit']" v-if="queryParams.status==0">撤销失信</el-button> | |
| 93 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="getDataInfo(item)" v-hasPermi="['Company:credit:edit']" v-if="queryParams.status==1">查看</el-button> | |
| 94 | + </el-card> | |
| 95 | + | |
| 96 | + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> | |
| 97 | + | |
| 98 | + <!-- 添加或修改工地对话框 --> | |
| 99 | + <el-dialog :title="title" :visible.sync="open" width="300px" append-to-body v-loading="loading"> | |
| 100 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px" v-if="open"> | |
| 101 | + <el-form-item label="运输企业" prop="name"> | |
| 102 | + <el-select | |
| 103 | + v-model="form.name" | |
| 104 | + filterable | |
| 105 | + reserve-keyword | |
| 106 | + placeholder="运输企业"> | |
| 107 | + <el-option | |
| 108 | + @click.native="getObjId(item)" | |
| 109 | + v-for="item in companyList" | |
| 110 | + :key="item.id" | |
| 111 | + :label="item.name" | |
| 112 | + :value="item.name" | |
| 113 | + v-if="item.dishonestState == 0"> | |
| 114 | + </el-option> | |
| 115 | + </el-select> | |
| 116 | + </el-form-item> | |
| 117 | + | |
| 118 | + <el-form-item label="所属区域" prop="place"> | |
| 119 | + <el-input | |
| 120 | + v-model="form.place" | |
| 121 | + placeholder="所属区域" disabled /> | |
| 122 | + </el-form-item> | |
| 123 | + <el-form-item label="失信原因" prop="reason"> | |
| 124 | + <el-input v-model="form.reason" placeholder="失信原因" /> | |
| 125 | + </el-form-item> | |
| 126 | + <el-input v-model="form.lostCredit" value="1" type="hidden" /> | |
| 127 | + <el-input v-model="form.objectId" type="hidden" /> | |
| 128 | + </el-form> | |
| 129 | + <div slot="footer" class="dialog-footer"> | |
| 130 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 131 | + <el-button @click="cancel">退出</el-button> | |
| 132 | + </div> | |
| 133 | + </el-dialog> | |
| 134 | + | |
| 135 | + | |
| 136 | + <el-dialog title="撤销失信" :visible.sync="isEdit" width="300px" append-to-body v-loading="loading"> | |
| 137 | + <el-form ref="updateForm" :model="updateForm" :rules="rules2" label-width="80px" v-if="updateForm" > | |
| 138 | + <el-form-item label="情况说明" prop="reason" > | |
| 139 | + <el-input v-model="updateForm.reason" type="textarea" maxlength="200" show-word-limit/> | |
| 140 | + </el-form-item> | |
| 141 | + </el-form> | |
| 142 | + <div slot="footer" class="dialog-footer"> | |
| 143 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 144 | + <el-button @click="cancel">退出</el-button> | |
| 145 | + </div> | |
| 146 | + </el-dialog> | |
| 147 | + | |
| 148 | + <el-dialog title="历史失信" :visible.sync="infoDialog" width="300px" append-to-body center="true"> | |
| 149 | + <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> | |
| 150 | + <el-table-column label="序号" align="center" type="index" /> | |
| 151 | + <el-table-column label="失信时间" align="center" prop="time" width="100"> | |
| 152 | + </el-table-column> | |
| 153 | + <el-table-column label="情况说明" align="center" prop="reason" /> | |
| 154 | + <el-table-column label="操作历史" align="center" prop="lostCredit"> | |
| 155 | + <template slot-scope="scope"> | |
| 156 | + <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : scope.row.lostCredit == 1 ? "失信" : "保密" }}</span> | |
| 157 | + </template> | |
| 158 | + </el-table-column> | |
| 159 | + </el-table> | |
| 160 | + </el-dialog> | |
| 161 | + </div> | |
| 162 | +</template> | |
| 163 | + | |
| 164 | +<script> | |
| 165 | + import { | |
| 166 | + listCredit, | |
| 167 | + getCredit, | |
| 168 | + delCredit, | |
| 169 | + addCredit, | |
| 170 | + updateCredit, | |
| 171 | + exportCredit, | |
| 172 | + getNames, | |
| 173 | + getPlaces, | |
| 174 | + historyCredit | |
| 175 | + } from "@/api/business/company"; | |
| 176 | + | |
| 177 | + import { | |
| 178 | + companyList, | |
| 179 | + updateCompany, | |
| 180 | + } from "@/api/dict"; | |
| 181 | + | |
| 182 | + import pagination from '../Pagination'; | |
| 183 | + | |
| 184 | + | |
| 185 | + export default { | |
| 186 | + name: "Credit", | |
| 187 | + components: {pagination}, | |
| 188 | + data() { | |
| 189 | + return { | |
| 190 | + // 遮罩层 | |
| 191 | + loading: true, | |
| 192 | + // 选中数组 | |
| 193 | + ids: [], | |
| 194 | + // 非单个禁用 | |
| 195 | + single: true, | |
| 196 | + // 非多个禁用 | |
| 197 | + multiple: true, | |
| 198 | + // 显示搜索条件 | |
| 199 | + showSearch: true, | |
| 200 | + infoDialog :false, | |
| 201 | + // 总条数 | |
| 202 | + total: 0, | |
| 203 | + // 工地表格数据 | |
| 204 | + creditList: [], | |
| 205 | + creditListInfo: [], | |
| 206 | + companyList:[], | |
| 207 | + dictNames:[], | |
| 208 | + dictPlaces:[], | |
| 209 | + // 弹出层标题 | |
| 210 | + title: "", | |
| 211 | + // 是否显示弹出层 | |
| 212 | + open: false, | |
| 213 | + isEdit:false, | |
| 214 | + // 查询参数 | |
| 215 | + queryParams: { | |
| 216 | + pageNum: 1, | |
| 217 | + pageSize: 10, | |
| 218 | + name: null, | |
| 219 | + time: null, | |
| 220 | + place: null, | |
| 221 | + reason: null, | |
| 222 | + status: 0, | |
| 223 | + lostCredit: 1 | |
| 224 | + }, | |
| 225 | + // 表单参数 | |
| 226 | + form: {}, | |
| 227 | + updateForm:{}, | |
| 228 | + // 表单校验 | |
| 229 | + rules: { | |
| 230 | + name: [ | |
| 231 | + { required: true, message: '请选择运输企业', trigger: 'change' }, | |
| 232 | + ], | |
| 233 | + reason: [ | |
| 234 | + { required: true, message: '请填写原因', trigger: 'change' }, | |
| 235 | + ], | |
| 236 | + }, | |
| 237 | + rules2: { | |
| 238 | + reason: [ | |
| 239 | + { required: true, message: '请填写原因', trigger: 'change' }, | |
| 240 | + ], | |
| 241 | + }, | |
| 242 | + }; | |
| 243 | + }, | |
| 244 | + created() { | |
| 245 | + this.init(); | |
| 246 | + }, | |
| 247 | + methods: { | |
| 248 | + init(){ | |
| 249 | + this.resetQuery(); | |
| 250 | + this.getList(); | |
| 251 | + getNames(this.queryParams).then(response => { | |
| 252 | + this.dictNames = response; | |
| 253 | + }); | |
| 254 | + getPlaces(this.queryParams).then(response => { | |
| 255 | + this.dictPlaces = response; | |
| 256 | + }); | |
| 257 | + | |
| 258 | + let query = { | |
| 259 | + 'page':1, | |
| 260 | + 'size':9999, | |
| 261 | + 'creditStatus':0 | |
| 262 | + } | |
| 263 | + companyList(query).then(response => { | |
| 264 | + | |
| 265 | + this.companyList = response.result.list; | |
| 266 | + }); | |
| 267 | + }, | |
| 268 | + getDataInfo(row){ | |
| 269 | + let param ={"objectId":row.objectId} | |
| 270 | + | |
| 271 | + listCredit(param).then(response => { | |
| 272 | + this.creditListInfo = response.rows; | |
| 273 | + this.infoDialog = true; | |
| 274 | + }); | |
| 275 | + | |
| 276 | + }, | |
| 277 | + getData(stauts){ | |
| 278 | + this.queryParams.status=0; | |
| 279 | + this.queryParams.lostCredit=stauts; | |
| 280 | + this.getList(); | |
| 281 | + }, | |
| 282 | + getHistoryData(){ | |
| 283 | + this.queryParams.status=1; | |
| 284 | + this.getList(); | |
| 285 | + }, | |
| 286 | + colStyle(obj){ | |
| 287 | + if(obj.column.property == "id"){ | |
| 288 | + return {background:"#f8f8f9"} | |
| 289 | + } | |
| 290 | + }, | |
| 291 | + getObjId(a){ | |
| 292 | + this.form.objectId = a.id; | |
| 293 | + this.form.place = a.areaName; | |
| 294 | + }, | |
| 295 | + getList() { | |
| 296 | + this.loading = true; | |
| 297 | + if(this.queryParams.status==0){ | |
| 298 | + listCredit(this.queryParams).then(response => { | |
| 299 | + this.creditList = response.rows; | |
| 300 | + this.total = response.total; | |
| 301 | + this.loading = false; | |
| 302 | + }); | |
| 303 | + } | |
| 304 | + if(this.queryParams.status==1){ | |
| 305 | + historyCredit(this.queryParams).then(response => { | |
| 306 | + this.creditList = response.rows; | |
| 307 | + this.total = response.total; | |
| 308 | + this.loading = false; | |
| 309 | + }); | |
| 310 | + } | |
| 311 | + | |
| 312 | + }, | |
| 313 | + // 取消按钮 | |
| 314 | + cancel() { | |
| 315 | + this.open = false; | |
| 316 | + this.isEdit = false; | |
| 317 | + this.reset(); | |
| 318 | + }, | |
| 319 | + // 表单重置 | |
| 320 | + reset() { | |
| 321 | + this.form = { | |
| 322 | + id: null, | |
| 323 | + name: null, | |
| 324 | + time: null, | |
| 325 | + place: null, | |
| 326 | + reason: null, | |
| 327 | + lostCredit: null, | |
| 328 | + objectId: null, | |
| 329 | + }; | |
| 330 | + this.resetForm("form"); | |
| 331 | + }, | |
| 332 | + /** 搜索按钮操作 */ | |
| 333 | + handleQuery() { | |
| 334 | + this.queryParams.pageNum = 1; | |
| 335 | + this.getList(); | |
| 336 | + }, | |
| 337 | + /** 重置按钮操作 */ | |
| 338 | + resetQuery() { | |
| 339 | + this.resetForm("queryForm"); | |
| 340 | + console.log(this.queryParams); | |
| 341 | + this.handleQuery(); | |
| 342 | + }, | |
| 343 | + // 多选框选中数据 | |
| 344 | + handleSelectionChange(selection) { | |
| 345 | + this.ids = selection.map(item => item.id) | |
| 346 | + this.single = selection.length !== 1 | |
| 347 | + this.multiple = !selection.length | |
| 348 | + }, | |
| 349 | + /** 新增按钮操作 */ | |
| 350 | + handleAdd() { | |
| 351 | + this.reset(); | |
| 352 | + this.open = true; | |
| 353 | + this.title = "企业信息录入"; | |
| 354 | + }, | |
| 355 | + /** 修改按钮操作 */ | |
| 356 | + handleUpdate(row) { | |
| 357 | + this.reset(); | |
| 358 | + const id = row.id || this.ids | |
| 359 | + getCredit(id).then(response => { | |
| 360 | + this.form = response.data; | |
| 361 | + this.isEdit = true; | |
| 362 | + }); | |
| 363 | + }, | |
| 364 | + /** 提交按钮 */ | |
| 365 | + submitForm() { | |
| 366 | + if(this.isEdit){ | |
| 367 | + this.$refs["updateForm"].validate(valid => { | |
| 368 | + if (valid) { | |
| 369 | + this.loading = true; | |
| 370 | + this.form.lostCredit = 0; | |
| 371 | + this.updateForm.id = this.form.id; | |
| 372 | + let data = [{id:this.form.objectId,dishonestState:this.form.lostCredit}]; | |
| 373 | + updateCompany(data).then(res=>{ | |
| 374 | + updateCredit(this.updateForm).then(response => { | |
| 375 | + this.msgSuccess("撤销成功"); | |
| 376 | + this.isEdit = false; | |
| 377 | + this.updateForm = {}; | |
| 378 | + this.init(); | |
| 379 | + }); | |
| 380 | + }); | |
| 381 | + } | |
| 382 | + }); | |
| 383 | + }else{ | |
| 384 | + this.$refs["form"].validate(valid => { | |
| 385 | + if (valid) { | |
| 386 | + this.loading = true; | |
| 387 | + this.form.lostCredit = 1; | |
| 388 | + let data = [{id:this.form.objectId,dishonestState:this.form.lostCredit}]; | |
| 389 | + updateCompany(data).then(res=>{ | |
| 390 | + addCredit(this.form).then(response => { | |
| 391 | + this.msgSuccess("新增成功"); | |
| 392 | + this.open = false; | |
| 393 | + this.init(); | |
| 394 | + }); | |
| 395 | + }); | |
| 396 | + } | |
| 397 | + }); | |
| 398 | + } | |
| 399 | + }, | |
| 400 | + handleExport() { | |
| 401 | + const queryParams = this.queryParams; | |
| 402 | + this.$confirm('是否确认导出所有企业数据项?', "警告", { | |
| 403 | + confirmButtonText: "确定", | |
| 404 | + cancelButtonText: "取消", | |
| 405 | + type: "warning" | |
| 406 | + }).then(function() { | |
| 407 | + return exportCredit(queryParams); | |
| 408 | + }).then(response => { | |
| 409 | + this.download(response.message); | |
| 410 | + }) | |
| 411 | + } | |
| 412 | + } | |
| 413 | + }; | |
| 414 | +</script> | ... | ... |
trash-ui/src/views/h5/ConstructionCredit/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <el-row :gutter="10" class="mb8"> | |
| 4 | + <el-col :span="1.5"> | |
| 5 | + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" | |
| 6 | + @click="getData(1);">失信工地</el-button> | |
| 7 | + </el-col> | |
| 8 | + <el-col :span="1.5"> | |
| 9 | + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" | |
| 10 | + @click="getHistoryData(1);">历史失信工地</el-button> | |
| 11 | + </el-col> | |
| 12 | + </el-row> | |
| 13 | + | |
| 14 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> | |
| 15 | + <el-row type="flex" justify="center"> | |
| 16 | + <el-col> | |
| 17 | + <el-form-item label="工地名称" prop="name" style="float:right;"> | |
| 18 | + <el-select v-model="queryParams.name" filterable reserve-keyword placeholder="工地名称" size="small" | |
| 19 | + :loading="loading"> | |
| 20 | + <el-option v-for="item in dictNames" :label="item" :value="item" :key="item"> | |
| 21 | + </el-option> | |
| 22 | + </el-select> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + | |
| 26 | + <el-col> | |
| 27 | + <el-form-item label="所属区域" prop="place"> | |
| 28 | + <el-select v-model="queryParams.place" filterable reserve-keyword placeholder="所属区域" size="small" | |
| 29 | + :loading="loading"> | |
| 30 | + <el-option v-for="item in dictPlaces" :label="item" :value="item" :key="item"> | |
| 31 | + </el-option> | |
| 32 | + </el-select> | |
| 33 | + </el-form-item> | |
| 34 | + </el-col> | |
| 35 | + </el-row> | |
| 36 | + <el-row type="flex" justify="center"> | |
| 37 | + <el-col> | |
| 38 | + <el-form-item label="垃圾类型" prop="type" style="float:right;"> | |
| 39 | + <el-select v-model="queryParams.type" filterable reserve-keyword placeholder="建筑垃圾类型" size="small" | |
| 40 | + :loading="loading"> | |
| 41 | + <el-option v-for="item in dictTypes" :label="item" :value="item" :key="item"> | |
| 42 | + </el-option> | |
| 43 | + </el-select> | |
| 44 | + </el-form-item> | |
| 45 | + </el-col> | |
| 46 | + <el-col> | |
| 47 | + <el-form-item label="失信日期" prop="time" v-show="queryParams.status==0"> | |
| 48 | + <el-date-picker size="small" style="width: 200px" v-model="queryParams.time" type="date" | |
| 49 | + value-format="yyyy-MM-dd" placeholder="失信日期"> | |
| 50 | + </el-date-picker> | |
| 51 | + </el-form-item> | |
| 52 | + </el-col> | |
| 53 | + </el-row> | |
| 54 | + </el-form> | |
| 55 | + | |
| 56 | + <el-row :gutter="10" class="mb8"> | |
| 57 | + <el-col :span="1.5"> | |
| 58 | + <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['business:ConstructionCredit:add']" | |
| 59 | + v-if="queryParams.status==0">新增</el-button> | |
| 60 | + </el-col> | |
| 61 | + <el-col :span="1.5"> | |
| 62 | + <el-button size="mini" @click="handleExport" v-hasPermi="['business:ConstructionCredit:export']">导出</el-button> | |
| 63 | + </el-col> | |
| 64 | + <el-col :span="1.5"> | |
| 65 | + <el-button type="primary" size="mini" @click="handleQuery">查询</el-button> | |
| 66 | + </el-col> | |
| 67 | + <el-col :span="1.5"> | |
| 68 | + <el-button size="mini" @click="resetQuery">重置</el-button> | |
| 69 | + </el-col> | |
| 70 | + </el-row> | |
| 71 | + | |
| 72 | + <el-card class="box-card" v-for="item in creditList" style="margin-bottom: 10px;" | |
| 73 | + > | |
| 74 | + <el-row class="card_row"> | |
| 75 | + <el-col :span="24" class="card_grid"> | |
| 76 | + <div class="card_title" style="font-weight: bold;">工地名称:{{ item.name }}</div> | |
| 77 | + </el-col> | |
| 78 | + </el-row> | |
| 79 | + | |
| 80 | + <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;"> | |
| 81 | + <el-col :span="24"> | |
| 82 | + <span >建筑垃圾类型:{{ item.type }}</span> | |
| 83 | + </el-col> | |
| 84 | + </el-row> | |
| 85 | + <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;"> | |
| 86 | + <el-col :span="24"> | |
| 87 | + <span >失信时间:{{ item.time }}</span> | |
| 88 | + </el-col> | |
| 89 | + </el-row> | |
| 90 | + | |
| 91 | + <el-row class="card_row"> | |
| 92 | + <el-col :span="24"> | |
| 93 | + <span >所属区域:{{item.place}}</span> | |
| 94 | + </el-col> | |
| 95 | + </el-row> | |
| 96 | + <el-row class="card_row"> | |
| 97 | + <el-col :span="24"> | |
| 98 | + <span >失信原因:{{item.reason}}</span> | |
| 99 | + </el-col> | |
| 100 | + </el-row> | |
| 101 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(item)" v-hasPermi="['Company:credit:edit']" v-if="queryParams.status==0">撤销失信</el-button> | |
| 102 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="getDataInfo(item)" v-hasPermi="['Company:credit:edit']" v-if="queryParams.status==1">查看</el-button> | |
| 103 | + </el-card> | |
| 104 | + | |
| 105 | + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | |
| 106 | + @pagination="getList" /> | |
| 107 | + | |
| 108 | + <!-- 添加或修改工地对话框 --> | |
| 109 | + <el-dialog :title="title" :visible.sync="open" width="300px" append-to-body v-loading="loading"> | |
| 110 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px" v-if="open"> | |
| 111 | + <el-form-item label="工地名称" prop="name"> | |
| 112 | + <el-select v-model="form.name" filterable reserve-keyword placeholder="工地名称"> | |
| 113 | + <el-option @click.native="getObjId(item)" v-for="item in constructionList" :key="item.id" :label="item.name" | |
| 114 | + :value="item.name" v-if="item.creditStatus==0"> | |
| 115 | + </el-option> | |
| 116 | + </el-select> | |
| 117 | + </el-form-item> | |
| 118 | + | |
| 119 | + <el-form-item label="建筑垃圾类型" prop="type"> | |
| 120 | + <el-input v-model="form.type" disabled /> | |
| 121 | + </el-form-item> | |
| 122 | + <el-form-item label="所属区域" prop="place"> | |
| 123 | + <el-input v-model="form.place" disabled /> | |
| 124 | + </el-form-item> | |
| 125 | + <el-form-item label="失信原因" prop="reason"> | |
| 126 | + <el-input v-model="form.reason" placeholder="失信原因" /> | |
| 127 | + </el-form-item> | |
| 128 | + </el-form> | |
| 129 | + | |
| 130 | + <el-input v-model="form.lostCredit" value="1" type="hidden" /> | |
| 131 | + <el-input v-model="form.objectId" type="hidden" /> | |
| 132 | + <div slot="footer" class="dialog-footer"> | |
| 133 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 134 | + <el-button @click="cancel">退出</el-button> | |
| 135 | + </div> | |
| 136 | + | |
| 137 | + </el-dialog> | |
| 138 | + | |
| 139 | + | |
| 140 | + <el-dialog title="撤销失信" :visible.sync="isEdit" width="300px" append-to-body v-loading="loading"> | |
| 141 | + <el-form ref="form" :model="updateForm" :rules="rules" label-width="80px" v-if="isEdit"> | |
| 142 | + <el-form-item label="情况说明" prop="reason"> | |
| 143 | + <el-input v-model="updateForm.reason" type="textarea" maxlength="200" show-word-limit /> | |
| 144 | + </el-form-item> | |
| 145 | + </el-form> | |
| 146 | + <div slot="footer" class="dialog-footer"> | |
| 147 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 148 | + <el-button @click="cancel">退出</el-button> | |
| 149 | + </div> | |
| 150 | + </el-dialog> | |
| 151 | + | |
| 152 | + <el-dialog title="历史失信" :visible.sync="infoDialog" width="300px" append-to-body> | |
| 153 | + <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> | |
| 154 | + <el-table-column label="序号" align="center" type="index" /> | |
| 155 | + <el-table-column label="失信时间" align="center" prop="time" width="100" /> | |
| 156 | + <el-table-column label="情况说明" align="center" prop="reason" /> | |
| 157 | + <el-table-column label="操作历史" align="center" prop="lostCredit"> | |
| 158 | + <template slot-scope="scope"> | |
| 159 | + <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : "失信" }}</span> | |
| 160 | + </template> | |
| 161 | + </el-table-column> | |
| 162 | + </el-table> | |
| 163 | + </el-dialog> | |
| 164 | + </div> | |
| 165 | +</template> | |
| 166 | + | |
| 167 | +<script> | |
| 168 | + import { | |
| 169 | + listCredit, | |
| 170 | + getCredit, | |
| 171 | + delCredit, | |
| 172 | + addCredit, | |
| 173 | + updateCredit, | |
| 174 | + exportCredit, | |
| 175 | + getNames, | |
| 176 | + getTypes, | |
| 177 | + getPlaces, | |
| 178 | + historyCredit | |
| 179 | + } from "@/api/business/constructionsites"; | |
| 180 | + | |
| 181 | +import pagination from '../Pagination'; | |
| 182 | + | |
| 183 | + import { | |
| 184 | + constructionsitesList, | |
| 185 | + getDict, | |
| 186 | + getArea, | |
| 187 | + updateConstructionsites | |
| 188 | + } from "@/api/dict"; | |
| 189 | + | |
| 190 | + export default { | |
| 191 | + name: "ConstructionCredit", | |
| 192 | + components: {pagination}, | |
| 193 | + data() { | |
| 194 | + return { | |
| 195 | + // 遮罩层 | |
| 196 | + loading: true, | |
| 197 | + // 选中数组 | |
| 198 | + ids: [], | |
| 199 | + // 非单个禁用 | |
| 200 | + single: true, | |
| 201 | + // 非多个禁用 | |
| 202 | + multiple: true, | |
| 203 | + // 显示搜索条件 | |
| 204 | + showSearch: true, | |
| 205 | + infoDialog: false, | |
| 206 | + // 总条数 | |
| 207 | + total: 0, | |
| 208 | + // 工地表格数据 | |
| 209 | + creditList: [], | |
| 210 | + creditListInfo: [], | |
| 211 | + dictNames: [], | |
| 212 | + dictTypes: [], | |
| 213 | + dictPlaces: [], | |
| 214 | + // 弹出层标题 | |
| 215 | + title: "", | |
| 216 | + // 是否显示弹出层 | |
| 217 | + open: false, | |
| 218 | + isEdit: false, | |
| 219 | + // 查询参数 | |
| 220 | + queryParams: { | |
| 221 | + pageNum: 1, | |
| 222 | + pageSize: 10, | |
| 223 | + name: null, | |
| 224 | + type: null, | |
| 225 | + time: null, | |
| 226 | + place: null, | |
| 227 | + reason: null, | |
| 228 | + status: 0, | |
| 229 | + lostCredit: 1, | |
| 230 | + }, | |
| 231 | + // 表单参数 | |
| 232 | + form: { | |
| 233 | + }, | |
| 234 | + updateForm: {}, | |
| 235 | + //建筑垃圾类型集合 | |
| 236 | + trashTypes: [], | |
| 237 | + constructionList: [], | |
| 238 | + // 表单校验 | |
| 239 | + rules: { | |
| 240 | + name: [{ | |
| 241 | + required: true, | |
| 242 | + message: '请选择工地', | |
| 243 | + trigger: 'change' | |
| 244 | + }, ], | |
| 245 | + reason: [{ | |
| 246 | + required: true, | |
| 247 | + message: '请填写原因', | |
| 248 | + trigger: 'change' | |
| 249 | + }, ] | |
| 250 | + }, | |
| 251 | + areas:[], | |
| 252 | + }; | |
| 253 | + | |
| 254 | + | |
| 255 | + }, | |
| 256 | + created() { | |
| 257 | + | |
| 258 | + getArea().then(res => { | |
| 259 | + this.areas = res.result; | |
| 260 | + }); | |
| 261 | + | |
| 262 | + getDict({'type': 'CSDisSiteDisposalType'}).then(response => { | |
| 263 | + this.trashTypes = response.result; | |
| 264 | + }); | |
| 265 | + | |
| 266 | + this.init(); | |
| 267 | + | |
| 268 | + }, | |
| 269 | + methods: { | |
| 270 | + init(){ | |
| 271 | + this.reset(); | |
| 272 | + this.resetQuery(); | |
| 273 | + this.getList(); | |
| 274 | + this.getNamesData(); | |
| 275 | + this.getTypesData(); | |
| 276 | + this.getPlacesData(); | |
| 277 | + | |
| 278 | + let query = { | |
| 279 | + 'page': 1, | |
| 280 | + 'size': 9999, | |
| 281 | + 'creditStatus': 0 | |
| 282 | + }; | |
| 283 | + constructionsitesList(query).then(response => { | |
| 284 | + this.constructionList = response.result.list | |
| 285 | + }); | |
| 286 | + }, | |
| 287 | + getList() { | |
| 288 | + this.loading = true; | |
| 289 | + if (this.queryParams.status == 0) { | |
| 290 | + listCredit(this.queryParams).then(response => { | |
| 291 | + this.creditList = response.rows; | |
| 292 | + this.total = response.total; | |
| 293 | + this.loading = false; | |
| 294 | + }); | |
| 295 | + } | |
| 296 | + if (this.queryParams.status == 1) { | |
| 297 | + historyCredit(this.queryParams).then(response => { | |
| 298 | + this.creditList = response.rows; | |
| 299 | + this.total = response.total; | |
| 300 | + this.loading = false; | |
| 301 | + }); | |
| 302 | + } | |
| 303 | + }, | |
| 304 | + getDataInfo(row) { | |
| 305 | + let param = { | |
| 306 | + "objectId": row.objectId | |
| 307 | + } | |
| 308 | + listCredit(param).then(response => { | |
| 309 | + this.creditListInfo = response.rows; | |
| 310 | + this.infoDialog = true; | |
| 311 | + }); | |
| 312 | + }, | |
| 313 | + getNamesData() { | |
| 314 | + getNames(this.queryParams).then(response => { | |
| 315 | + this.dictNames = response; | |
| 316 | + }); | |
| 317 | + }, | |
| 318 | + getTypesData() { | |
| 319 | + getTypes(this.queryParams).then(response => { | |
| 320 | + this.dictTypes = response; | |
| 321 | + }); | |
| 322 | + }, | |
| 323 | + getPlacesData() { | |
| 324 | + getPlaces(this.queryParams).then(response => { | |
| 325 | + this.dictPlaces = response; | |
| 326 | + }); | |
| 327 | + }, | |
| 328 | + getData(stauts) { | |
| 329 | + this.queryParams.status = 0; | |
| 330 | + this.queryParams.lostCredit = stauts; | |
| 331 | + this.init(); | |
| 332 | + }, | |
| 333 | + getHistoryData() { | |
| 334 | + this.queryParams.status = 1; | |
| 335 | + this.init(); | |
| 336 | + }, | |
| 337 | + colStyle(obj) { | |
| 338 | + if (obj.column.property == "id") { | |
| 339 | + return { | |
| 340 | + background: "#f8f8f9" | |
| 341 | + } | |
| 342 | + } | |
| 343 | + }, | |
| 344 | + getObjId(object) { | |
| 345 | + | |
| 346 | + this.form.objectId = object.id; | |
| 347 | + | |
| 348 | + for(let i in this.areas){ | |
| 349 | + if(this.areas[i].code == Number(object.areaCode)){ | |
| 350 | + this.form.place = this.areas[i].name; | |
| 351 | + break; | |
| 352 | + } | |
| 353 | + } | |
| 354 | + for(let i in this.trashTypes){ | |
| 355 | + if(this.trashTypes[i].code == Number(object.cargoId)){ | |
| 356 | + this.form.type = this.trashTypes[i].name; | |
| 357 | + break; | |
| 358 | + } | |
| 359 | + } | |
| 360 | + }, | |
| 361 | + // 取消按钮 | |
| 362 | + cancel() { | |
| 363 | + this.open = false; | |
| 364 | + this.isEdit = false; | |
| 365 | + this.reset(); | |
| 366 | + }, | |
| 367 | + // 表单重置 | |
| 368 | + reset() { | |
| 369 | + this.form = { | |
| 370 | + id: null, | |
| 371 | + name: null, | |
| 372 | + type: null, | |
| 373 | + time: null, | |
| 374 | + place: null, | |
| 375 | + reason: null, | |
| 376 | + lostCredit: null, | |
| 377 | + objectId: null, | |
| 378 | + }; | |
| 379 | + this.updateForm = { | |
| 380 | + reason:null, | |
| 381 | + }; | |
| 382 | + this.resetForm("updateForm"); | |
| 383 | + this.resetForm("form"); | |
| 384 | + }, | |
| 385 | + /** 搜索按钮操作 */ | |
| 386 | + handleQuery() { | |
| 387 | + this.queryParams.pageNum = 1; | |
| 388 | + this.getList(); | |
| 389 | + }, | |
| 390 | + /** 重置按钮操作 */ | |
| 391 | + resetQuery() { | |
| 392 | + this.resetForm("queryForm"); | |
| 393 | + console.log(this.queryParams); | |
| 394 | + this.handleQuery(); | |
| 395 | + }, | |
| 396 | + // 多选框选中数据 | |
| 397 | + handleSelectionChange(selection) { | |
| 398 | + this.ids = selection.map(item => item.id) | |
| 399 | + this.single = selection.length !== 1 | |
| 400 | + this.multiple = !selection.length | |
| 401 | + }, | |
| 402 | + /** 新增按钮操作 */ | |
| 403 | + handleAdd() { | |
| 404 | + this.reset(); | |
| 405 | + this.open = true; | |
| 406 | + this.title = "添加工地"; | |
| 407 | + }, | |
| 408 | + /** 修改按钮操作 */ | |
| 409 | + handleUpdate(row) { | |
| 410 | + this.reset(); | |
| 411 | + const id = row.id || this.ids | |
| 412 | + getCredit(id).then(response => { | |
| 413 | + this.form = response.data; | |
| 414 | + this.isEdit = true; | |
| 415 | + }); | |
| 416 | + }, | |
| 417 | + /** 提交按钮 */ | |
| 418 | + submitForm() { | |
| 419 | + this.$refs["form"].validate(valid => { | |
| 420 | + if (valid) { | |
| 421 | + this.loading = true; | |
| 422 | + if (this.form.id != null) { | |
| 423 | + this.form.lostCredit = 0; | |
| 424 | + let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}]; | |
| 425 | + | |
| 426 | + updateConstructionsites(data).then(response=>{ | |
| 427 | + this.updateForm.id = this.form.id; | |
| 428 | + updateCredit(this.updateForm).then(response => { | |
| 429 | + this.msgSuccess("撤销成功"); | |
| 430 | + this.isEdit = false; | |
| 431 | + this.init(); | |
| 432 | + }); | |
| 433 | + }); | |
| 434 | + } else { | |
| 435 | + this.form.lostCredit = 1; | |
| 436 | + let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}]; | |
| 437 | + updateConstructionsites(data).then(response=>{ | |
| 438 | + addCredit(this.form).then(response => { | |
| 439 | + this.msgSuccess("新增成功"); | |
| 440 | + this.open = false; | |
| 441 | + this.init(); | |
| 442 | + }); | |
| 443 | + }); | |
| 444 | + } | |
| 445 | + } | |
| 446 | + }); | |
| 447 | + }, | |
| 448 | + handleExport() { | |
| 449 | + const queryParams = this.queryParams; | |
| 450 | + this.$confirm('是否确认导出所有工地数据项?', "警告", { | |
| 451 | + confirmButtonText: "确定", | |
| 452 | + cancelButtonText: "取消", | |
| 453 | + type: "warning" | |
| 454 | + }).then(function() { | |
| 455 | + return exportCredit(queryParams); | |
| 456 | + }).then(response => { | |
| 457 | + this.download(response.message); | |
| 458 | + }) | |
| 459 | + } | |
| 460 | + } | |
| 461 | + }; | |
| 462 | +</script> | ... | ... |
trash-ui/src/views/h5/DriverCredit/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <el-row :gutter="10" class="mb8"> | |
| 4 | + <el-col :span="1.5"> | |
| 5 | + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" @click="getData(1);" >失信驾驶员</el-button> | |
| 6 | + </el-col> | |
| 7 | + <el-col :span="1.5"> | |
| 8 | + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" @click="getHistoryData(1);">历史驾驶员</el-button> | |
| 9 | + </el-col> | |
| 10 | + </el-row> | |
| 11 | + | |
| 12 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> | |
| 13 | + <el-row type="flex" justify="center"> | |
| 14 | + <el-col> | |
| 15 | + <el-form-item label="驾驶员姓名" prop="name" | |
| 16 | + style="float:right;"> | |
| 17 | + <el-select v-model="queryParams.name" | |
| 18 | + filterable | |
| 19 | + | |
| 20 | + reserve-keyword | |
| 21 | + placeholder="驾驶员姓名" | |
| 22 | + size="small" | |
| 23 | + :loading="loading"> | |
| 24 | + <el-option | |
| 25 | + v-for="item in dictNames" | |
| 26 | + :label="item" | |
| 27 | + :value="item"> | |
| 28 | + </el-option> | |
| 29 | + </el-select> | |
| 30 | + </el-form-item> | |
| 31 | + </el-col> | |
| 32 | + | |
| 33 | + <el-col> | |
| 34 | + <el-form-item label="失信日期" prop="time" v-show="queryParams.status==0"> | |
| 35 | + <el-date-picker size="small" style="width: 200px" v-model="queryParams.time" type="date" | |
| 36 | + value-format="yyyy-MM-dd" placeholder="失信日期"> | |
| 37 | + </el-date-picker> | |
| 38 | + </el-form-item> | |
| 39 | + </el-col> | |
| 40 | + </el-row> | |
| 41 | + | |
| 42 | + </el-form> | |
| 43 | + | |
| 44 | + <el-row :gutter="10" class="mb8"> | |
| 45 | + <el-col :span="1.5"> | |
| 46 | + <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['driver:credit:add']" v-if="queryParams.status==0">新增</el-button> | |
| 47 | + </el-col> | |
| 48 | + <el-col :span="1.5"> | |
| 49 | + <el-button size="mini" @click="handleExport" v-hasPermi="['driver:credit:export']">导出</el-button> | |
| 50 | + </el-col> | |
| 51 | + <el-col :span="1.5"> | |
| 52 | + <el-button type="primary" size="mini" @click="handleQuery">查询</el-button> | |
| 53 | + </el-col> | |
| 54 | + <el-col :span="1.5"> | |
| 55 | + <el-button size="mini" @click="resetQuery">重置</el-button> | |
| 56 | + </el-col> | |
| 57 | + </el-row> | |
| 58 | + | |
| 59 | + <el-card class="box-card" v-for="item in creditList" style="margin-bottom: 10px;" | |
| 60 | + > | |
| 61 | + <el-row class="card_row"> | |
| 62 | + <el-col :span="24" class="card_grid"> | |
| 63 | + <div class="card_title" style="font-weight: bold;">驾驶员姓名:{{ item.name }}</div> | |
| 64 | + </el-col> | |
| 65 | + </el-row> | |
| 66 | + | |
| 67 | + <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;"> | |
| 68 | + <el-col :span="24"> | |
| 69 | + <span >证件号码:{{item.idNumber}}</span> | |
| 70 | + </el-col> | |
| 71 | + </el-row> | |
| 72 | + <el-row class="card_row" > | |
| 73 | + <el-col :span="24"> | |
| 74 | + <span >失信时间:{{ item.time }}</span> | |
| 75 | + </el-col> | |
| 76 | + </el-row> | |
| 77 | + | |
| 78 | + <el-row class="card_row"> | |
| 79 | + <el-col :span="24"> | |
| 80 | + <span >失信原因:{{item.reason}}</span> | |
| 81 | + </el-col> | |
| 82 | + </el-row> | |
| 83 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(item)" v-hasPermi="['Company:credit:edit']" v-if="queryParams.status==0">撤销失信</el-button> | |
| 84 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="getDataInfo(item)" v-hasPermi="['Company:credit:edit']" v-if="queryParams.status==1">查看</el-button> | |
| 85 | + </el-card> | |
| 86 | + | |
| 87 | + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | |
| 88 | + @pagination="getList" /> | |
| 89 | + | |
| 90 | + <!-- 添加或修改工地对话框 --> | |
| 91 | + <el-dialog :title="title" :visible.sync="open" width="300px" append-to-body v-loading="loading"> | |
| 92 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 93 | + <el-form-item label="驾驶员姓名" prop="name"> | |
| 94 | + <el-select | |
| 95 | + v-model="form.name" | |
| 96 | + filterable | |
| 97 | + reserve-keyword | |
| 98 | + placeholder="驾驶员姓名"> | |
| 99 | + <el-option | |
| 100 | + @click.native="getObjId(item)" | |
| 101 | + v-for="item in driverList" | |
| 102 | + :key="item.id" | |
| 103 | + :label="item.name" | |
| 104 | + :value="item.name"> | |
| 105 | + </el-option> | |
| 106 | + </el-select> | |
| 107 | + </el-form-item> | |
| 108 | + | |
| 109 | + <el-form-item label="证件号码" prop="idNumber"> | |
| 110 | + <el-input v-model="form.idNumber" placeholder="证件号码" disabled/> | |
| 111 | + </el-form-item> | |
| 112 | + <el-form-item label="失信原因" prop="reason"> | |
| 113 | + <el-input v-model="form.reason" placeholder="失信原因" /> | |
| 114 | + </el-form-item> | |
| 115 | + <el-input v-model="form.lostCredit" value="1" type="hidden" /> | |
| 116 | + <el-input v-model="form.objectId" type="hidden" /> | |
| 117 | + </el-form> | |
| 118 | + <div slot="footer" class="dialog-footer"> | |
| 119 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 120 | + <el-button @click="cancel">退出</el-button> | |
| 121 | + </div> | |
| 122 | + </el-dialog> | |
| 123 | + | |
| 124 | + | |
| 125 | + <el-dialog title="撤销失信" :visible.sync="isEdit" width="300px" append-to-body v-loading="loading"> | |
| 126 | + <el-form ref="form" :model="updateForm" :rules="rules" label-width="80px"> | |
| 127 | + <el-form-item label="情况说明" prop="reason"> | |
| 128 | + <el-input v-model="updateForm.reason" type="textarea" maxlength="200" show-word-limit/> | |
| 129 | + </el-form-item> | |
| 130 | + </el-form> | |
| 131 | + <div slot="footer" class="dialog-footer"> | |
| 132 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 133 | + <el-button @click="cancel">退出</el-button> | |
| 134 | + </div> | |
| 135 | + </el-dialog> | |
| 136 | + | |
| 137 | + <el-dialog title="历史失信" :visible.sync="infoDialog" width="300px" append-to-body> | |
| 138 | + <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> | |
| 139 | + <el-table-column label="序号" align="center" type="index" /> | |
| 140 | + <el-table-column label="失信时间" align="center" prop="time" width="100"> | |
| 141 | + </el-table-column> | |
| 142 | + <el-table-column label="情况说明" align="center" prop="reason" /> | |
| 143 | + <el-table-column label="操作历史" align="center" prop="lostCredit"> | |
| 144 | + <template slot-scope="scope"> | |
| 145 | + <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : "失信" }}</span> | |
| 146 | + </template> | |
| 147 | + </el-table-column> | |
| 148 | + </el-table> | |
| 149 | + </el-dialog> | |
| 150 | + </div> | |
| 151 | +</template> | |
| 152 | + | |
| 153 | +<script> | |
| 154 | +import { | |
| 155 | + listCredit, | |
| 156 | + getCredit, | |
| 157 | + delCredit, | |
| 158 | + addCredit, | |
| 159 | + updateCredit, | |
| 160 | + exportCredit, | |
| 161 | + getNames, | |
| 162 | + historyCredit | |
| 163 | +} from "@/api/business/driver"; | |
| 164 | + | |
| 165 | +import { | |
| 166 | + companyList, | |
| 167 | + driverList | |
| 168 | +} from "@/api/dict"; | |
| 169 | + | |
| 170 | +import pagination from '../Pagination'; | |
| 171 | +export default { | |
| 172 | + name: "ConstructionCredit", | |
| 173 | + components: {pagination}, | |
| 174 | + data() { | |
| 175 | + return { | |
| 176 | + // 遮罩层 | |
| 177 | + loading: true, | |
| 178 | + // 选中数组 | |
| 179 | + ids: [], | |
| 180 | + // 非单个禁用 | |
| 181 | + single: true, | |
| 182 | + // 非多个禁用 | |
| 183 | + multiple: true, | |
| 184 | + // 显示搜索条件 | |
| 185 | + showSearch: true, | |
| 186 | + infoDialog :false, | |
| 187 | + // 总条数 | |
| 188 | + total: 0, | |
| 189 | + // 工地表格数据 | |
| 190 | + creditList: [], | |
| 191 | + creditListInfo: [], | |
| 192 | + dictNames:[], | |
| 193 | + dictTypes:[], | |
| 194 | + dictPlaces:[], | |
| 195 | + driverList:[], | |
| 196 | + names:[], | |
| 197 | + idNumbers:[], | |
| 198 | + places:[], | |
| 199 | + // 弹出层标题 | |
| 200 | + title: "", | |
| 201 | + // 是否显示弹出层 | |
| 202 | + open: false, | |
| 203 | + isEdit:false, | |
| 204 | + // 查询参数 | |
| 205 | + queryParams: { | |
| 206 | + pageNum: 1, | |
| 207 | + pageSize: 10, | |
| 208 | + name: null, | |
| 209 | + idNumber: null, | |
| 210 | + time: null, | |
| 211 | + reason: null, | |
| 212 | + status: 0, | |
| 213 | + lostCredit: 1 | |
| 214 | + }, | |
| 215 | + // 表单参数 | |
| 216 | + form: {}, | |
| 217 | + updateForm:{}, | |
| 218 | + // 表单校验 | |
| 219 | + rules: {name: [ | |
| 220 | + { required: true, message: '请选择驾驶员', trigger: 'change' }, | |
| 221 | + ],reason: [ | |
| 222 | + { required: true, message: '请填写原因', trigger: 'change' }, | |
| 223 | + ]} | |
| 224 | + }; | |
| 225 | + }, | |
| 226 | + created() { | |
| 227 | + this.init(); | |
| 228 | + }, | |
| 229 | + methods: { | |
| 230 | + init(){ | |
| 231 | + this.reset(); | |
| 232 | + | |
| 233 | + this.resetQuery(); | |
| 234 | + this.getList(); | |
| 235 | + this.getNamesData(); | |
| 236 | + | |
| 237 | + let query = { | |
| 238 | + 'page':1, | |
| 239 | + 'size':9999, | |
| 240 | + 'creditStatus':0 | |
| 241 | + } | |
| 242 | + | |
| 243 | + companyList(query).then(response => { | |
| 244 | + | |
| 245 | + let companys = response.result.list; | |
| 246 | + | |
| 247 | + let ids = []; | |
| 248 | + | |
| 249 | + for(let i = 0 ;i<companys.length;i++){ | |
| 250 | + ids.push(companys[i].id); | |
| 251 | + } | |
| 252 | + query.companyIds = ids + ""; | |
| 253 | + query.status = 3; | |
| 254 | + | |
| 255 | + driverList(query).then(res=>{ | |
| 256 | + | |
| 257 | + this.driverList = res.result; | |
| 258 | + | |
| 259 | + }); | |
| 260 | + | |
| 261 | + }); | |
| 262 | + }, | |
| 263 | + getDataInfo(row){ | |
| 264 | + let param ={"objectId":row.objectId} | |
| 265 | + listCredit(param).then(response => { | |
| 266 | + this.creditListInfo = response.rows; | |
| 267 | + this.infoDialog = true; | |
| 268 | + }); | |
| 269 | + | |
| 270 | + }, | |
| 271 | + getNamesData(){ | |
| 272 | + getNames(this.queryParams).then(response => { | |
| 273 | + this.dictNames = response; | |
| 274 | + }); | |
| 275 | + }, | |
| 276 | + getData(stauts){ | |
| 277 | + this.queryParams.status=0; | |
| 278 | + this.queryParams.lostCredit=stauts; | |
| 279 | + this.getList(); | |
| 280 | + }, | |
| 281 | + getHistoryData(){ | |
| 282 | + this.queryParams.status=1; | |
| 283 | + this.init(); | |
| 284 | + }, | |
| 285 | + colStyle(obj){ | |
| 286 | + if(obj.column.property == "id"){ | |
| 287 | + return {background:"#f8f8f9"} | |
| 288 | + } | |
| 289 | + }, | |
| 290 | + getObjId(a){ | |
| 291 | + this.form.objectId = a.id; | |
| 292 | + this.form.idNumber = a.identityNo; | |
| 293 | + }, | |
| 294 | + getList() { | |
| 295 | + this.loading = true; | |
| 296 | + if(this.queryParams.status==0){ | |
| 297 | + listCredit(this.queryParams).then(response => { | |
| 298 | + this.creditList = response.rows; | |
| 299 | + this.total = response.total; | |
| 300 | + this.loading = false; | |
| 301 | + }); | |
| 302 | + } | |
| 303 | + if(this.queryParams.status==1){ | |
| 304 | + historyCredit(this.queryParams).then(response => { | |
| 305 | + this.creditList = response.rows; | |
| 306 | + this.total = response.total; | |
| 307 | + this.loading = false; | |
| 308 | + }); | |
| 309 | + } | |
| 310 | + | |
| 311 | + }, | |
| 312 | + // 取消按钮 | |
| 313 | + cancel() { | |
| 314 | + this.open = false; | |
| 315 | + this.isEdit = false; | |
| 316 | + this.reset(); | |
| 317 | + }, | |
| 318 | + // 表单重置 | |
| 319 | + reset() { | |
| 320 | + this.form = { | |
| 321 | + id: null, | |
| 322 | + name: null, | |
| 323 | + idNumber: null, | |
| 324 | + time: null, | |
| 325 | + reason: null, | |
| 326 | + lostCredit: null, | |
| 327 | + objectId: null, | |
| 328 | + }; | |
| 329 | + this.updateForm = {}; | |
| 330 | + this.resetForm("form"); | |
| 331 | + }, | |
| 332 | + /** 搜索按钮操作 */ | |
| 333 | + handleQuery() { | |
| 334 | + this.queryParams.pageNum = 1; | |
| 335 | + this.getList(); | |
| 336 | + }, | |
| 337 | + /** 重置按钮操作 */ | |
| 338 | + resetQuery() { | |
| 339 | + this.resetForm("queryForm"); | |
| 340 | + console.log(this.queryParams); | |
| 341 | + this.handleQuery(); | |
| 342 | + }, | |
| 343 | + // 多选框选中数据 | |
| 344 | + handleSelectionChange(selection) { | |
| 345 | + this.ids = selection.map(item => item.id) | |
| 346 | + this.single = selection.length !== 1 | |
| 347 | + this.multiple = !selection.length | |
| 348 | + }, | |
| 349 | + /** 新增按钮操作 */ | |
| 350 | + handleAdd() { | |
| 351 | + this.reset(); | |
| 352 | + this.open = true; | |
| 353 | + this.title = "添加驾驶员"; | |
| 354 | + }, | |
| 355 | + /** 修改按钮操作 */ | |
| 356 | + handleUpdate(row) { | |
| 357 | + this.reset(); | |
| 358 | + const id = row.id || this.ids | |
| 359 | + getCredit(id).then(response => { | |
| 360 | + this.form = response.data; | |
| 361 | + this.isEdit = true; | |
| 362 | + }); | |
| 363 | + }, | |
| 364 | + /** 提交按钮 */ | |
| 365 | + submitForm() { | |
| 366 | + if(this.open){ | |
| 367 | + this.updateForm.reason = "1"; | |
| 368 | + } | |
| 369 | + this.$refs["form"].validate(valid => { | |
| 370 | + if (valid) { | |
| 371 | + | |
| 372 | + this.loading = true; | |
| 373 | + if (this.form.id != null) { | |
| 374 | + this.updateForm.id = this.form.id; | |
| 375 | + updateCredit(this.updateForm).then(response => { | |
| 376 | + this.msgSuccess("撤销成功"); | |
| 377 | + this.isEdit = false; | |
| 378 | + this.init(); | |
| 379 | + }); | |
| 380 | + } else { | |
| 381 | + this.form.lostCredit = 1; | |
| 382 | + addCredit(this.form).then(response => { | |
| 383 | + this.msgSuccess("新增成功"); | |
| 384 | + this.open = false; | |
| 385 | + this.init(); | |
| 386 | + }); | |
| 387 | + } | |
| 388 | + } | |
| 389 | + }); | |
| 390 | + }, | |
| 391 | + handleExport() { | |
| 392 | + const queryParams = this.queryParams; | |
| 393 | + this.$confirm('是否确认导出所有驾驶员数据项?', "警告", { | |
| 394 | + confirmButtonText: "确定", | |
| 395 | + cancelButtonText: "取消", | |
| 396 | + type: "warning" | |
| 397 | + }).then(function() { | |
| 398 | + return exportCredit(queryParams); | |
| 399 | + }).then(response => { | |
| 400 | + this.download(response.message); | |
| 401 | + }) | |
| 402 | + } | |
| 403 | + } | |
| 404 | +}; | |
| 405 | +</script> | ... | ... |
trash-ui/src/views/h5/EarthSitesCredit/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <el-row :gutter="10" class="mb8"> | |
| 4 | + <el-col :span="1.5"> | |
| 5 | + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" | |
| 6 | + @click="getData(1);">失信消纳场</el-button> | |
| 7 | + </el-col> | |
| 8 | + <el-col :span="1.5"> | |
| 9 | + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" | |
| 10 | + @click="getHistoryData(1);">历史失信消纳场</el-button> | |
| 11 | + </el-col> | |
| 12 | + </el-row> | |
| 13 | + | |
| 14 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> | |
| 15 | + <el-row type="flex" justify="center"> | |
| 16 | + <el-col> | |
| 17 | + <el-form-item label="消纳场名称" prop="name" style="float:right;"> | |
| 18 | + <el-select v-model="queryParams.name" filterable reserve-keyword placeholder="消纳场名称" size="small" | |
| 19 | + :loading="loading"> | |
| 20 | + <el-option v-for="item in dictNames" :label="item" :value="item" :key="item"> | |
| 21 | + </el-option> | |
| 22 | + </el-select> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + | |
| 26 | + <el-col> | |
| 27 | + <el-form-item label="所属区域" prop="place"> | |
| 28 | + <el-select v-model="queryParams.place" filterable reserve-keyword placeholder="所属区域" size="small" > | |
| 29 | + <el-option v-for="item in dictPlaces" :label="item" :value="item" :key="item"> | |
| 30 | + </el-option> | |
| 31 | + </el-select> | |
| 32 | + </el-form-item> | |
| 33 | + </el-col> | |
| 34 | + </el-row> | |
| 35 | + <el-row type="flex" justify="center"> | |
| 36 | + <el-col> | |
| 37 | + <el-form-item label="消纳场类型" prop="type" style="float:right;"> | |
| 38 | + <el-select v-model="queryParams.type" filterable reserve-keyword placeholder="消纳场类型" size="small" | |
| 39 | + :loading="loading"> | |
| 40 | + <el-option v-for="item in dictTypes" :label="item" :value="item" :key="item"> | |
| 41 | + </el-option> | |
| 42 | + </el-select> | |
| 43 | + </el-form-item> | |
| 44 | + </el-col> | |
| 45 | + <el-col> | |
| 46 | + <el-form-item label="失信日期" prop="time" v-show="queryParams.status==0"> | |
| 47 | + <el-date-picker size="small" style="width: 200px" v-model="queryParams.time" type="date" | |
| 48 | + value-format="yyyy-MM-dd" placeholder="失信日期"> | |
| 49 | + </el-date-picker> | |
| 50 | + </el-form-item> | |
| 51 | + </el-col> | |
| 52 | + </el-row> | |
| 53 | + </el-form> | |
| 54 | + | |
| 55 | + <el-row :gutter="10" class="mb8"> | |
| 56 | + <el-col :span="1.5"> | |
| 57 | + <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['EarthSites:credit:add']" v-if="queryParams.status==0">新增</el-button> | |
| 58 | + </el-col> | |
| 59 | + <el-col :span="1.5"> | |
| 60 | + <el-button size="mini" @click="handleExport" v-hasPermi="['EarthSites:credit:export']">导出</el-button> | |
| 61 | + </el-col> | |
| 62 | + | |
| 63 | + <el-col :span="1.5"> | |
| 64 | + <el-button type="primary" size="mini" @click="handleQuery">查询</el-button> | |
| 65 | + </el-col> | |
| 66 | + <el-col :span="1.5"> | |
| 67 | + <el-button size="mini" @click="resetQuery">重置</el-button> | |
| 68 | + </el-col> | |
| 69 | + </el-row> | |
| 70 | + | |
| 71 | + | |
| 72 | + <el-card class="box-card" v-for="item in creditList" style="margin-bottom: 10px;" | |
| 73 | + > | |
| 74 | + <el-row class="card_row"> | |
| 75 | + <el-col :span="24" class="card_grid"> | |
| 76 | + <div class="card_title" style="font-weight: bold;">消纳场名称:{{ item.name }}</div> | |
| 77 | + </el-col> | |
| 78 | + </el-row> | |
| 79 | + | |
| 80 | + <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;"> | |
| 81 | + <el-col :span="24"> | |
| 82 | + <span >消纳场类型:{{ item.type }}</span> | |
| 83 | + </el-col> | |
| 84 | + </el-row> | |
| 85 | + <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;"> | |
| 86 | + <el-col :span="24"> | |
| 87 | + <span >失信时间:{{ item.time }}</span> | |
| 88 | + </el-col> | |
| 89 | + </el-row> | |
| 90 | + | |
| 91 | + <el-row class="card_row"> | |
| 92 | + <el-col :span="24"> | |
| 93 | + <span >所属区域:{{item.place}}</span> | |
| 94 | + </el-col> | |
| 95 | + </el-row> | |
| 96 | + <el-row class="card_row"> | |
| 97 | + <el-col :span="24"> | |
| 98 | + <span >失信原因:{{item.reason}}</span> | |
| 99 | + </el-col> | |
| 100 | + </el-row> | |
| 101 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(item)" v-hasPermi="['Company:credit:edit']" v-if="queryParams.status==0">撤销失信</el-button> | |
| 102 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="getDataInfo(item)" v-hasPermi="['Company:credit:edit']" v-if="queryParams.status==1">查看</el-button> | |
| 103 | + </el-card> | |
| 104 | + | |
| 105 | + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | |
| 106 | + @pagination="getList" /> | |
| 107 | + | |
| 108 | + <!-- 添加或修改工地对话框 --> | |
| 109 | + <el-dialog :title="title" :visible.sync="open" width="300px" append-to-body v-loading="loading"> | |
| 110 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 111 | + <el-form-item label="消纳场名称" prop="name"> | |
| 112 | + <el-select | |
| 113 | + v-model="form.name" | |
| 114 | + filterable | |
| 115 | + reserve-keyword | |
| 116 | + placeholder="消纳场名称"> | |
| 117 | + <el-option | |
| 118 | + @click.native="getObjId(item)" | |
| 119 | + v-for="item in earthsitesList" | |
| 120 | + :key="item.id" | |
| 121 | + :label="item.name" | |
| 122 | + :value="item.name" | |
| 123 | + v-if="item.creditStatus==0"> | |
| 124 | + </el-option> | |
| 125 | + </el-select> | |
| 126 | + </el-form-item> | |
| 127 | + | |
| 128 | + <el-form-item label="消纳场类型" prop="type"> | |
| 129 | + | |
| 130 | + <el-input v-model="form.type" disabled/> | |
| 131 | + </el-form-item> | |
| 132 | + <el-form-item label="所属区域" prop="place"> | |
| 133 | + <el-input v-model="form.place" disabled/> | |
| 134 | + </el-form-item> | |
| 135 | + <el-form-item label="失信原因" prop="reason"> | |
| 136 | + <el-input v-model="form.reason" placeholder="失信原因" /> | |
| 137 | + </el-form-item> | |
| 138 | + <el-input v-model="form.lostCredit" value="1" type="hidden" /> | |
| 139 | + <el-input v-model="form.objectId" type="hidden" /> | |
| 140 | + </el-form> | |
| 141 | + <div slot="footer" class="dialog-footer"> | |
| 142 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 143 | + <el-button @click="cancel">退出</el-button> | |
| 144 | + </div> | |
| 145 | + </el-dialog> | |
| 146 | + | |
| 147 | + | |
| 148 | + <el-dialog title="撤销失信" :visible.sync="isEdit" width="300px" append-to-body v-loading="loading"> | |
| 149 | + <el-form ref="form" :model="updateForm" :rules="rules" label-width="80px"> | |
| 150 | + <el-form-item label="情况说明" prop="reason"> | |
| 151 | + <el-input v-model="updateForm.reason" type="textarea" maxlength="200" show-word-limit/> | |
| 152 | + </el-form-item> | |
| 153 | + </el-form> | |
| 154 | + <div slot="footer" class="dialog-footer"> | |
| 155 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 156 | + <el-button @click="cancel">退出</el-button> | |
| 157 | + </div> | |
| 158 | + </el-dialog> | |
| 159 | + | |
| 160 | + <el-dialog title="历史失信" :visible.sync="infoDialog" width="300px" append-to-body> | |
| 161 | + <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> | |
| 162 | + <el-table-column label="序号" align="center" type="index" /> | |
| 163 | + <el-table-column label="失信时间" align="center" prop="time" width="100" /> | |
| 164 | + <el-table-column label="情况说明" align="center" prop="reason" /> | |
| 165 | + <el-table-column label="操作历史" align="center" prop="lostCredit"> | |
| 166 | + <template slot-scope="scope"> | |
| 167 | + <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : "失信" }}</span> | |
| 168 | + </template> | |
| 169 | + </el-table-column> | |
| 170 | + </el-table> | |
| 171 | + </el-dialog> | |
| 172 | + </div> | |
| 173 | +</template> | |
| 174 | + | |
| 175 | +<script> | |
| 176 | +import { | |
| 177 | + listCredit, | |
| 178 | + getCredit, | |
| 179 | + delCredit, | |
| 180 | + addCredit, | |
| 181 | + updateCredit, | |
| 182 | + exportCredit, | |
| 183 | + getNames, | |
| 184 | + getTypes, | |
| 185 | + getPlaces, | |
| 186 | + historyCredit | |
| 187 | +} from "@/api/business/earthsites"; | |
| 188 | + | |
| 189 | +import { | |
| 190 | + earthsitesList, | |
| 191 | + updateEarthsites | |
| 192 | +} from "@/api/dict"; | |
| 193 | + | |
| 194 | +import requestRemote from '@/utils/requestRemote' | |
| 195 | + | |
| 196 | +import pagination from '../Pagination'; | |
| 197 | +export default { | |
| 198 | + name: "EarthSitesCredit", | |
| 199 | + components: {pagination}, | |
| 200 | + data() { | |
| 201 | + return { | |
| 202 | + // 遮罩层 | |
| 203 | + loading: true, | |
| 204 | + // 选中数组 | |
| 205 | + ids: [], | |
| 206 | + // 非单个禁用 | |
| 207 | + single: true, | |
| 208 | + // 非多个禁用 | |
| 209 | + multiple: true, | |
| 210 | + // 显示搜索条件 | |
| 211 | + showSearch: true, | |
| 212 | + infoDialog :false, | |
| 213 | + // 总条数 | |
| 214 | + total: 0, | |
| 215 | + // 工地表格数据 | |
| 216 | + creditList: [], | |
| 217 | + creditListInfo: [], | |
| 218 | + earthsitesList:[], | |
| 219 | + dictNames:[], | |
| 220 | + dictTypes:[], | |
| 221 | + dictPlaces:[], | |
| 222 | + names:[], | |
| 223 | + // 弹出层标题 | |
| 224 | + title: "", | |
| 225 | + // 是否显示弹出层 | |
| 226 | + open: false, | |
| 227 | + isEdit:false, | |
| 228 | + // 查询参数 | |
| 229 | + queryParams: { | |
| 230 | + pageNum: 1, | |
| 231 | + pageSize: 10, | |
| 232 | + name: null, | |
| 233 | + type: null, | |
| 234 | + time: null, | |
| 235 | + place: null, | |
| 236 | + reason: null, | |
| 237 | + status: 0, | |
| 238 | + lostCredit: 1 | |
| 239 | + }, | |
| 240 | + // 表单参数 | |
| 241 | + form: {}, | |
| 242 | + updateForm:{}, | |
| 243 | + // 表单校验 | |
| 244 | + rules: {name: [ | |
| 245 | + { required: true, message: '请选择消纳场', trigger: 'change' }, | |
| 246 | + ],reason: [ | |
| 247 | + { required: true, message: '请填写原因', trigger: 'change' }, | |
| 248 | + ]} | |
| 249 | + }; | |
| 250 | + }, | |
| 251 | + created() { | |
| 252 | + this.init(); | |
| 253 | + }, | |
| 254 | + methods: { | |
| 255 | + init(){ | |
| 256 | + this.resetQuery(); | |
| 257 | + this.reset(); | |
| 258 | + this.getList(); | |
| 259 | + this.getNamesData(); | |
| 260 | + this.getTypesData(); | |
| 261 | + this.getPlacesData(); | |
| 262 | + | |
| 263 | + let query = { | |
| 264 | + 'page': 1, | |
| 265 | + 'size': 9999, | |
| 266 | + 'creditStatus': 0 | |
| 267 | + }; | |
| 268 | + earthsitesList(query).then(response => { | |
| 269 | + this.earthsitesList = response.result.list | |
| 270 | + }); | |
| 271 | + }, | |
| 272 | + getDataInfo(row){ | |
| 273 | + let param ={"objectId":row.objectId} | |
| 274 | + listCredit(param).then(response => { | |
| 275 | + this.creditListInfo = response.rows; | |
| 276 | + this.infoDialog = true; | |
| 277 | + }); | |
| 278 | + | |
| 279 | + }, | |
| 280 | + getNamesData(){ | |
| 281 | + getNames(this.queryParams).then(response => { | |
| 282 | + this.dictNames = response; | |
| 283 | + }); | |
| 284 | + }, | |
| 285 | + getTypesData() { | |
| 286 | + getTypes(this.queryParams).then(response => { | |
| 287 | + this.dictTypes = response; | |
| 288 | + }); | |
| 289 | + }, | |
| 290 | + getPlacesData() { | |
| 291 | + getPlaces(this.queryParams).then(response => { | |
| 292 | + this.dictPlaces = response; | |
| 293 | + }); | |
| 294 | + }, | |
| 295 | + getData(stauts){ | |
| 296 | + this.queryParams.status=0; | |
| 297 | + this.queryParams.lostCredit=stauts; | |
| 298 | + this.init(); | |
| 299 | + }, | |
| 300 | + getHistoryData(){ | |
| 301 | + this.queryParams.status=1; | |
| 302 | + this.init(); | |
| 303 | + }, | |
| 304 | + colStyle(obj){ | |
| 305 | + if(obj.column.property == "id"){ | |
| 306 | + return {background:"#f8f8f9"} | |
| 307 | + } | |
| 308 | + }, | |
| 309 | + getObjId(a){ | |
| 310 | + this.form.objectId = a.id; | |
| 311 | + this.form.place = a.areaName; | |
| 312 | + this.form.type = a.typeName; | |
| 313 | + }, | |
| 314 | + getList() { | |
| 315 | + this.loading = true; | |
| 316 | + if(this.queryParams.status==0){ | |
| 317 | + listCredit(this.queryParams).then(response => { | |
| 318 | + this.creditList = response.rows; | |
| 319 | + this.total = response.total; | |
| 320 | + this.loading = false; | |
| 321 | + }); | |
| 322 | + } | |
| 323 | + if(this.queryParams.status==1){ | |
| 324 | + historyCredit(this.queryParams).then(response => { | |
| 325 | + this.creditList = response.rows; | |
| 326 | + this.total = response.total; | |
| 327 | + this.loading = false; | |
| 328 | + }); | |
| 329 | + } | |
| 330 | + | |
| 331 | + }, | |
| 332 | + // 取消按钮 | |
| 333 | + cancel() { | |
| 334 | + this.open = false; | |
| 335 | + this.isEdit = false; | |
| 336 | + this.reset(); | |
| 337 | + }, | |
| 338 | + // 表单重置 | |
| 339 | + reset() { | |
| 340 | + this.form = { | |
| 341 | + id: null, | |
| 342 | + name: null, | |
| 343 | + type: null, | |
| 344 | + time: null, | |
| 345 | + place: null, | |
| 346 | + reason: null, | |
| 347 | + lostCredit: null, | |
| 348 | + objectId: null, | |
| 349 | + }; | |
| 350 | + this.updateForm = {}; | |
| 351 | + this.resetForm("form"); | |
| 352 | + }, | |
| 353 | + /** 搜索按钮操作 */ | |
| 354 | + handleQuery() { | |
| 355 | + this.queryParams.pageNum = 1; | |
| 356 | + this.getList(); | |
| 357 | + }, | |
| 358 | + /** 重置按钮操作 */ | |
| 359 | + resetQuery() { | |
| 360 | + this.resetForm("queryForm"); | |
| 361 | + console.log(this.queryParams); | |
| 362 | + this.handleQuery(); | |
| 363 | + }, | |
| 364 | + // 多选框选中数据 | |
| 365 | + handleSelectionChange(selection) { | |
| 366 | + this.ids = selection.map(item => item.id) | |
| 367 | + this.single = selection.length !== 1 | |
| 368 | + this.multiple = !selection.length | |
| 369 | + }, | |
| 370 | + /** 新增按钮操作 */ | |
| 371 | + handleAdd() { | |
| 372 | + this.reset(); | |
| 373 | + this.open = true; | |
| 374 | + this.title = "添加消纳场"; | |
| 375 | + }, | |
| 376 | + /** 修改按钮操作 */ | |
| 377 | + handleUpdate(row) { | |
| 378 | + this.reset(); | |
| 379 | + const id = row.id || this.ids | |
| 380 | + getCredit(id).then(response => { | |
| 381 | + this.form = response.data; | |
| 382 | + this.isEdit = true; | |
| 383 | + }); | |
| 384 | + }, | |
| 385 | + /** 提交按钮 */ | |
| 386 | + submitForm() { | |
| 387 | + if(this.open){ | |
| 388 | + this.updateForm.reason = "1"; | |
| 389 | + } | |
| 390 | + | |
| 391 | + this.$refs["form"].validate(valid => { | |
| 392 | + if (valid) { | |
| 393 | + this.loading = true; | |
| 394 | + if (this.form.id != null) { | |
| 395 | + this.form.lostCredit = 0; | |
| 396 | + let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}]; | |
| 397 | + updateEarthsites(data).then(res=>{ | |
| 398 | + this.updateForm.id = this.form.id; | |
| 399 | + updateCredit(this.updateForm).then(response => { | |
| 400 | + this.msgSuccess("撤销成功"); | |
| 401 | + this.isEdit = false; | |
| 402 | + | |
| 403 | + this.init(); | |
| 404 | + }); | |
| 405 | + }); | |
| 406 | + } else { | |
| 407 | + this.form.lostCredit = 1; | |
| 408 | + let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}]; | |
| 409 | + updateEarthsites(data).then(res=>{ | |
| 410 | + addCredit(this.form).then(response => { | |
| 411 | + this.msgSuccess("新增成功"); | |
| 412 | + this.open = false; | |
| 413 | + | |
| 414 | + this.init(); | |
| 415 | + }); | |
| 416 | + }); | |
| 417 | + | |
| 418 | + } | |
| 419 | + } | |
| 420 | + }); | |
| 421 | + }, | |
| 422 | + handleExport() { | |
| 423 | + const queryParams = this.queryParams; | |
| 424 | + this.$confirm('是否确认导出所有消纳场数据项?', "警告", { | |
| 425 | + confirmButtonText: "确定", | |
| 426 | + cancelButtonText: "取消", | |
| 427 | + type: "warning" | |
| 428 | + }).then(function() { | |
| 429 | + return exportCredit(queryParams); | |
| 430 | + }).then(response => { | |
| 431 | + this.download(response.message); | |
| 432 | + }) | |
| 433 | + } | |
| 434 | + } | |
| 435 | +}; | |
| 436 | +</script> | ... | ... |
trash-ui/src/views/h5/Pagination/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div :class="{'hidden':hidden}" class="pagination-container"> | |
| 3 | + <el-pagination | |
| 4 | + :background="background" | |
| 5 | + :current-page.sync="currentPage" | |
| 6 | + :page-size.sync="pageSize" | |
| 7 | + :layout="layout" | |
| 8 | + :page-sizes="pageSizes" | |
| 9 | + :total="total" | |
| 10 | + v-bind="$attrs" | |
| 11 | + @size-change="handleSizeChange" | |
| 12 | + @current-change="handleCurrentChange" | |
| 13 | + /> | |
| 14 | + </div> | |
| 15 | +</template> | |
| 16 | + | |
| 17 | +<script> | |
| 18 | +import { scrollTo } from '@/utils/scroll-to' | |
| 19 | + | |
| 20 | +export default { | |
| 21 | + name: 'Pagination', | |
| 22 | + props: { | |
| 23 | + total: { | |
| 24 | + required: true, | |
| 25 | + type: Number | |
| 26 | + }, | |
| 27 | + page: { | |
| 28 | + type: Number, | |
| 29 | + default: 1 | |
| 30 | + }, | |
| 31 | + limit: { | |
| 32 | + type: Number, | |
| 33 | + default: 20 | |
| 34 | + }, | |
| 35 | + pageSizes: { | |
| 36 | + type: Array, | |
| 37 | + default() { | |
| 38 | + return [10, 20, 30, 50] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + layout: { | |
| 42 | + type: String, | |
| 43 | + default: 'prev, pager, next' | |
| 44 | + }, | |
| 45 | + background: { | |
| 46 | + type: Boolean, | |
| 47 | + default: true | |
| 48 | + }, | |
| 49 | + autoScroll: { | |
| 50 | + type: Boolean, | |
| 51 | + default: true | |
| 52 | + }, | |
| 53 | + hidden: { | |
| 54 | + type: Boolean, | |
| 55 | + default: false | |
| 56 | + } | |
| 57 | + }, | |
| 58 | + computed: { | |
| 59 | + currentPage: { | |
| 60 | + get() { | |
| 61 | + return this.page | |
| 62 | + }, | |
| 63 | + set(val) { | |
| 64 | + this.$emit('update:page', val) | |
| 65 | + } | |
| 66 | + }, | |
| 67 | + pageSize: { | |
| 68 | + get() { | |
| 69 | + return this.limit | |
| 70 | + }, | |
| 71 | + set(val) { | |
| 72 | + this.$emit('update:limit', val) | |
| 73 | + } | |
| 74 | + } | |
| 75 | + }, | |
| 76 | + methods: { | |
| 77 | + handleSizeChange(val) { | |
| 78 | + this.$emit('pagination', { page: this.currentPage, limit: val }) | |
| 79 | + if (this.autoScroll) { | |
| 80 | + scrollTo(0, 800) | |
| 81 | + } | |
| 82 | + }, | |
| 83 | + handleCurrentChange(val) { | |
| 84 | + this.$emit('pagination', { page: val, limit: this.pageSize }) | |
| 85 | + if (this.autoScroll) { | |
| 86 | + scrollTo(0, 800) | |
| 87 | + } | |
| 88 | + } | |
| 89 | + } | |
| 90 | +} | |
| 91 | +</script> | |
| 92 | + | |
| 93 | +<style scoped> | |
| 94 | +.pagination-container { | |
| 95 | + background: #fff; | |
| 96 | + padding: 32px 16px; | |
| 97 | +} | |
| 98 | +.pagination-container.hidden { | |
| 99 | + display: none; | |
| 100 | +} | |
| 101 | +</style> | ... | ... |
trash-ui/src/views/h5/TruckCredit/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <el-row :gutter="10" class="mb8"> | |
| 4 | + <el-col :span="1.5"> | |
| 5 | + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" | |
| 6 | + @click="getData(1);">失信车辆</el-button> | |
| 7 | + </el-col> | |
| 8 | + <el-col :span="1.5"> | |
| 9 | + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" | |
| 10 | + @click="getHistoryData(1);">历史失信车辆</el-button> | |
| 11 | + </el-col> | |
| 12 | + </el-row> | |
| 13 | + | |
| 14 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> | |
| 15 | + <el-form-item label="车牌号码" prop="licensePlate"> | |
| 16 | + <el-select v-model="queryParams.licensePlate" filterable reserve-keyword placeholder="车牌号码" | |
| 17 | + size="small" :loading="loading"> | |
| 18 | + <el-option v-for="item in dictNames" :label="item" :value="item"> | |
| 19 | + </el-option> | |
| 20 | + </el-select> | |
| 21 | + </el-form-item> | |
| 22 | + <el-form-item label="运输企业" prop="companyId"> | |
| 23 | + <el-select v-model="queryParams.companyId" filterable reserve-keyword placeholder="运输企业" | |
| 24 | + size="small" :loading="loading"> | |
| 25 | + <el-option v-for="item in dictCompanys" :label="item" :value="item"> | |
| 26 | + </el-option> | |
| 27 | + </el-select> | |
| 28 | + </el-form-item> | |
| 29 | + <el-form-item label="失信日期" prop="time" v-show="queryParams.status==0"> | |
| 30 | + <el-date-picker size="small" style="width: 200px" v-model="queryParams.time" type="date" | |
| 31 | + value-format="yyyy-MM-dd" placeholder="失信日期"> | |
| 32 | + </el-date-picker> | |
| 33 | + </el-form-item> | |
| 34 | + </el-row> | |
| 35 | + | |
| 36 | + </el-form> | |
| 37 | + | |
| 38 | + <el-row :gutter="10" class="mb8"> | |
| 39 | + <el-col :span="1.5"> | |
| 40 | + <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['truck:credit:add']" | |
| 41 | + v-if="queryParams.status==0">新增</el-button> | |
| 42 | + </el-col> | |
| 43 | + <el-col :span="1.5"> | |
| 44 | + <el-button size="mini" @click="handleExport" v-hasPermi="['truck:credit:export']">导出</el-button> | |
| 45 | + </el-col> | |
| 46 | + <el-col :span="1.5"> | |
| 47 | + <el-button type="primary" size="mini" @click="handleQuery">查询</el-button> | |
| 48 | + </el-col> | |
| 49 | + <el-col :span="1.5"> | |
| 50 | + <el-button size="mini" @click="resetQuery">重置</el-button> | |
| 51 | + </el-col> | |
| 52 | + </el-row> | |
| 53 | + | |
| 54 | + <el-card class="box-card" v-for="item in creditList" style="margin-bottom: 10px;"> | |
| 55 | + <el-row class="card_row"> | |
| 56 | + <el-col :span="24" class="card_grid"> | |
| 57 | + <div class="card_title" style="font-weight: bold;">运输企业:{{ item.companyId }}</div> | |
| 58 | + </el-col> | |
| 59 | + </el-row> | |
| 60 | + | |
| 61 | + <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;"> | |
| 62 | + <el-col :span="24"> | |
| 63 | + <span >车牌号码:{{ item.licensePlate }}</span> | |
| 64 | + </el-col> | |
| 65 | + </el-row> | |
| 66 | + <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;"> | |
| 67 | + <el-col :span="24"> | |
| 68 | + <span >失信时间:{{ item.time }}</span> | |
| 69 | + </el-col> | |
| 70 | + </el-row> | |
| 71 | + | |
| 72 | + <el-row class="card_row"> | |
| 73 | + <el-col :span="24"> | |
| 74 | + <span >失信原因:{{item.reason}}</span> | |
| 75 | + </el-col> | |
| 76 | + </el-row> | |
| 77 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(item)" v-hasPermi="['Company:credit:edit']" v-if="queryParams.status==0">撤销失信</el-button> | |
| 78 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="getDataInfo(item)" v-hasPermi="['Company:credit:edit']" v-if="queryParams.status==1">查看</el-button> | |
| 79 | + </el-card> | |
| 80 | + | |
| 81 | + | |
| 82 | + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | |
| 83 | + @pagination="getList" /> | |
| 84 | + | |
| 85 | + <!-- 添加或修改工地对话框 --> | |
| 86 | + <el-dialog :title="title" :visible.sync="open" width="300px" append-to-body v-loading="loading"> | |
| 87 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px" v-if="open"> | |
| 88 | + <el-form-item label="运输企业" prop="companyId"> | |
| 89 | + <el-select v-model="form.companyId" filterable reserve-keyword placeholder="运输企业"> | |
| 90 | + <el-option v-for="item in companyList" @click.native="form.licensePlate=null;" :key="item.name" :label="item.name" :value="item.name"> | |
| 91 | + </el-option> | |
| 92 | + </el-select> | |
| 93 | + </el-form-item> | |
| 94 | + <el-form-item label="车牌号码" prop="licensePlate"> | |
| 95 | + <el-select v-model="form.licensePlate" filterable reserve-keyword placeholder="车牌号码"> | |
| 96 | + <el-option @click.native="getObjId(item)" v-for="item in truckList" :key="item.id" :label="item.licenseplateNo" :value="item.licenseplateNo" v-if="!form.companyId || form.companyId==item.companyName"> | |
| 97 | + </el-option> | |
| 98 | + </el-select> | |
| 99 | + </el-form-item> | |
| 100 | + <el-form-item label="失信原因" prop="reason"> | |
| 101 | + <el-input v-model="form.reason" placeholder="失信原因" /> | |
| 102 | + </el-form-item> | |
| 103 | + <el-input v-model="form.lostCredit" value="1" type="hidden" /> | |
| 104 | + <el-input v-model="form.objectId" type="hidden" /> | |
| 105 | + </el-form> | |
| 106 | + <div slot="footer" class="dialog-footer"> | |
| 107 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 108 | + <el-button @click="cancel">退出</el-button> | |
| 109 | + </div> | |
| 110 | + </el-dialog> | |
| 111 | + | |
| 112 | + | |
| 113 | + <el-dialog title="撤销失信" :visible.sync="isEdit" width="300px" append-to-body v-loading="loading"> | |
| 114 | + <el-form ref="updateForm" :model="updateForm" :rules="rules2" label-width="80px" v-if="isEdit"> | |
| 115 | + <el-form-item label="情况说明" prop="reason"> | |
| 116 | + <el-input v-model="updateForm.reason" type="textarea" maxlength="200" show-word-limit /> | |
| 117 | + </el-form-item> | |
| 118 | + </el-form> | |
| 119 | + <div slot="footer" class="dialog-footer"> | |
| 120 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 121 | + <el-button @click="cancel">退出</el-button> | |
| 122 | + </div> | |
| 123 | + </el-dialog> | |
| 124 | + | |
| 125 | + <el-dialog title="历史失信" :visible.sync="infoDialog" width="300px" append-to-body center="true"> | |
| 126 | + <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> | |
| 127 | + <el-table-column label="序号" align="center" type="index" /> | |
| 128 | + <el-table-column label="失信时间" align="center" prop="time" width="100" > | |
| 129 | + </el-table-column> | |
| 130 | + <el-table-column label="情况说明" align="center" prop="reason" /> | |
| 131 | + <el-table-column label="操作历史" align="center" prop="lostCredit"> | |
| 132 | + <template slot-scope="scope"> | |
| 133 | + <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : scope.row.lostCredit == 1 ? "失信" : "保密" }}</span> | |
| 134 | + </template> | |
| 135 | + </el-table-column> | |
| 136 | + </el-table> | |
| 137 | + </el-dialog> | |
| 138 | + </div> | |
| 139 | +</template> | |
| 140 | + | |
| 141 | +<script> | |
| 142 | + import { | |
| 143 | + listCredit, | |
| 144 | + getCredit, | |
| 145 | + delCredit, | |
| 146 | + addCredit, | |
| 147 | + updateCredit, | |
| 148 | + exportCredit, | |
| 149 | + getNames, | |
| 150 | + getCompanys, | |
| 151 | + historyCredit | |
| 152 | + } from "@/api/business/truck"; | |
| 153 | + | |
| 154 | + | |
| 155 | + import { | |
| 156 | + companyList, | |
| 157 | + truckList, | |
| 158 | + updateTruck | |
| 159 | + } from "@/api/dict"; | |
| 160 | + | |
| 161 | + export default { | |
| 162 | + name: "Credit", | |
| 163 | + data() { | |
| 164 | + return { | |
| 165 | + // 遮罩层 | |
| 166 | + loading: true, | |
| 167 | + // 选中数组 | |
| 168 | + ids: [], | |
| 169 | + // 非单个禁用 | |
| 170 | + single: true, | |
| 171 | + // 非多个禁用 | |
| 172 | + multiple: true, | |
| 173 | + // 显示搜索条件 | |
| 174 | + showSearch: true, | |
| 175 | + infoDialog: false, | |
| 176 | + // 总条数 | |
| 177 | + total: 0, | |
| 178 | + // 工地表格数据 | |
| 179 | + creditList: [], | |
| 180 | + creditListInfo: [], | |
| 181 | + dictNames: [], | |
| 182 | + dictCompanys: [], | |
| 183 | + companyList:[], | |
| 184 | + truckList: [], | |
| 185 | + // 弹出层标题 | |
| 186 | + title: "", | |
| 187 | + // 是否显示弹出层 | |
| 188 | + open: false, | |
| 189 | + isEdit: false, | |
| 190 | + // 查询参数 | |
| 191 | + queryParams: { | |
| 192 | + pageNum: 1, | |
| 193 | + pageSize: 10, | |
| 194 | + companyId: null, | |
| 195 | + licensePlate: null, | |
| 196 | + time: null, | |
| 197 | + reason: null, | |
| 198 | + status: 0, | |
| 199 | + lostCredit: 1 | |
| 200 | + }, | |
| 201 | + // 表单参数 | |
| 202 | + form: {}, | |
| 203 | + updateForm: {}, | |
| 204 | + // 表单校验 | |
| 205 | + rules: { | |
| 206 | + companyId: [{ | |
| 207 | + required: true, | |
| 208 | + message: '请选择运输公司', | |
| 209 | + trigger: 'change' | |
| 210 | + }, ], | |
| 211 | + reason: [{ | |
| 212 | + required: true, | |
| 213 | + message: '请填写原因', | |
| 214 | + trigger: 'change' | |
| 215 | + }, ], | |
| 216 | + licensePlate: [{ | |
| 217 | + required: true, | |
| 218 | + message: '请选择车辆', | |
| 219 | + trigger: 'change' | |
| 220 | + }], | |
| 221 | + }, | |
| 222 | + rules2: { | |
| 223 | + reason: [{ | |
| 224 | + required: true, | |
| 225 | + message: '请填写原因', | |
| 226 | + trigger: 'change' | |
| 227 | + }, ], | |
| 228 | + } | |
| 229 | + }; | |
| 230 | + }, | |
| 231 | + created() { | |
| 232 | + this.init(); | |
| 233 | + }, | |
| 234 | + methods: { | |
| 235 | + | |
| 236 | + init() { | |
| 237 | + this.resetQuery(); | |
| 238 | + this.getList(); | |
| 239 | + getNames(this.queryParams).then(response => { | |
| 240 | + this.dictNames = response; | |
| 241 | + }); | |
| 242 | + | |
| 243 | + getCompanys(this.queryParams).then(response => { | |
| 244 | + this.dictCompanys = response; | |
| 245 | + }); | |
| 246 | + | |
| 247 | + let query = { | |
| 248 | + 'page':1, | |
| 249 | + 'size':9999, | |
| 250 | + 'dishonestState':0 | |
| 251 | + } | |
| 252 | + companyList(query).then(response => { | |
| 253 | + | |
| 254 | + let companys = response.result.list; | |
| 255 | + this.companyList = companys; | |
| 256 | + let ids = []; | |
| 257 | + | |
| 258 | + for(let i = 0 ;i<companys.length;i++){ | |
| 259 | + ids.push(companys[i].id); | |
| 260 | + } | |
| 261 | + query.companyID = ids + ""; | |
| 262 | + query.valid = 0; | |
| 263 | + | |
| 264 | + truckList(query).then(res=>{ | |
| 265 | + this.truckList = res.result.list; | |
| 266 | + }); | |
| 267 | + | |
| 268 | + }); | |
| 269 | + | |
| 270 | + | |
| 271 | + }, | |
| 272 | + getDataInfo(row) { | |
| 273 | + console.log(row); | |
| 274 | + | |
| 275 | + let param = { | |
| 276 | + "objectId": row.objectId | |
| 277 | + } | |
| 278 | + | |
| 279 | + listCredit(param).then(response => { | |
| 280 | + this.creditListInfo = response.rows; | |
| 281 | + this.infoDialog = true; | |
| 282 | + }); | |
| 283 | + | |
| 284 | + }, | |
| 285 | + getData(stauts) { | |
| 286 | + this.queryParams.status = 0; | |
| 287 | + this.queryParams.lostCredit = stauts; | |
| 288 | + this.init(); | |
| 289 | + }, | |
| 290 | + getHistoryData() { | |
| 291 | + this.queryParams.status = 1; | |
| 292 | + this.init(); | |
| 293 | + }, | |
| 294 | + colStyle(obj) { | |
| 295 | + if (obj.column.property == "id") { | |
| 296 | + return { | |
| 297 | + background: "#f8f8f9" | |
| 298 | + } | |
| 299 | + } | |
| 300 | + }, | |
| 301 | + getObjId(a) { | |
| 302 | + this.form.companyId = a.companyName; | |
| 303 | + this.form.objectId = a.id; | |
| 304 | + }, | |
| 305 | + getList() { | |
| 306 | + this.loading = true; | |
| 307 | + if (this.queryParams.status == 0) { | |
| 308 | + listCredit(this.queryParams).then(response => { | |
| 309 | + this.creditList = response.rows; | |
| 310 | + this.total = response.total; | |
| 311 | + this.loading = false; | |
| 312 | + }); | |
| 313 | + } | |
| 314 | + if (this.queryParams.status == 1) { | |
| 315 | + historyCredit(this.queryParams).then(response => { | |
| 316 | + this.creditList = response.rows; | |
| 317 | + this.total = response.total; | |
| 318 | + this.loading = false; | |
| 319 | + }); | |
| 320 | + } | |
| 321 | + | |
| 322 | + }, | |
| 323 | + // 取消按钮 | |
| 324 | + cancel() { | |
| 325 | + this.open = false; | |
| 326 | + this.isEdit = false; | |
| 327 | + this.reset(); | |
| 328 | + }, | |
| 329 | + // 表单重置 | |
| 330 | + reset() { | |
| 331 | + this.form = { | |
| 332 | + id: null, | |
| 333 | + companyId: null, | |
| 334 | + licensePlate: null, | |
| 335 | + time: null, | |
| 336 | + reason: null, | |
| 337 | + status: null, | |
| 338 | + lostCredit: null | |
| 339 | + }; | |
| 340 | + this.resetForm("form"); | |
| 341 | + }, | |
| 342 | + /** 搜索按钮操作 */ | |
| 343 | + handleQuery() { | |
| 344 | + this.queryParams.pageNum = 1; | |
| 345 | + this.getList(); | |
| 346 | + }, | |
| 347 | + /** 重置按钮操作 */ | |
| 348 | + resetQuery() { | |
| 349 | + this.resetForm("queryForm"); | |
| 350 | + console.log(this.queryParams); | |
| 351 | + this.handleQuery(); | |
| 352 | + }, | |
| 353 | + // 多选框选中数据 | |
| 354 | + handleSelectionChange(selection) { | |
| 355 | + this.ids = selection.map(item => item.id) | |
| 356 | + this.single = selection.length !== 1 | |
| 357 | + this.multiple = !selection.length | |
| 358 | + }, | |
| 359 | + /** 新增按钮操作 */ | |
| 360 | + handleAdd() { | |
| 361 | + this.reset(); | |
| 362 | + this.open = true; | |
| 363 | + this.title = "车辆失信录入"; | |
| 364 | + }, | |
| 365 | + /** 修改按钮操作 */ | |
| 366 | + handleUpdate(row) { | |
| 367 | + this.reset(); | |
| 368 | + const id = row.id || this.ids | |
| 369 | + getCredit(id).then(response => { | |
| 370 | + this.form = response.data; | |
| 371 | + this.isEdit = true; | |
| 372 | + }); | |
| 373 | + }, | |
| 374 | + /** 提交按钮 */ | |
| 375 | + submitForm() { | |
| 376 | + if(this.isEdit){ | |
| 377 | + this.$refs["updateForm"].validate(valid => { | |
| 378 | + if (valid) { | |
| 379 | + this.loading = true; | |
| 380 | + this.form.lostCredit = 0; | |
| 381 | + this.updateForm.id = this.form.id; | |
| 382 | + let data = [{creditStatus:this.form.lostCredit,id:this.form.objectId}]; | |
| 383 | + updateTruck(data).then(res=>{ | |
| 384 | + updateCredit(this.updateForm).then(response => { | |
| 385 | + this.msgSuccess("撤销成功"); | |
| 386 | + this.isEdit = false; | |
| 387 | + this.updateForm = {}; | |
| 388 | + this.init(); | |
| 389 | + }); | |
| 390 | + }); | |
| 391 | + } | |
| 392 | + }); | |
| 393 | + }else{ | |
| 394 | + this.$refs["form"].validate(valid => { | |
| 395 | + if (valid) { | |
| 396 | + this.loading = true; | |
| 397 | + this.form.lostCredit = 1; | |
| 398 | + this.form.createType = 0; | |
| 399 | + let data = [{creditStatus:this.form.lostCredit,id:this.form.objectId}]; | |
| 400 | + updateTruck(data).then(res=>{ | |
| 401 | + addCredit(this.form).then(response => { | |
| 402 | + this.msgSuccess("新增成功"); | |
| 403 | + this.open = false; | |
| 404 | + this.init(); | |
| 405 | + }); | |
| 406 | + }); | |
| 407 | + } | |
| 408 | + }); | |
| 409 | + } | |
| 410 | + }, | |
| 411 | + handleExport() { | |
| 412 | + const queryParams = this.queryParams; | |
| 413 | + this.$confirm('是否确认导出所有车辆数据项?', "警告", { | |
| 414 | + confirmButtonText: "确定", | |
| 415 | + cancelButtonText: "取消", | |
| 416 | + type: "warning" | |
| 417 | + }).then(function() { | |
| 418 | + return exportCredit(queryParams); | |
| 419 | + }).then(response => { | |
| 420 | + this.download(response.message); | |
| 421 | + }) | |
| 422 | + } | |
| 423 | + } | |
| 424 | + }; | |
| 425 | +</script> | ... | ... |
trash-ui/src/views/h5/caseOffline/caseOfflineInfo.vue
0 → 100644
| 1 | +<template> | |
| 2 | + | |
| 3 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 4 | + <el-form-item label="案卷类型" prop="type"> | |
| 5 | + <el-input v-model="form.type" type="textarea" :rows="3" disabled /> | |
| 6 | + </el-form-item> | |
| 7 | + <el-form-item label="所属区域" prop="place"> | |
| 8 | + <el-select v-model="form.place" placeholder="请输入所属区域" size="small" disabled> | |
| 9 | + <el-option v-for="item in areas" :label="item.name" :value="item.code" /> | |
| 10 | + </el-select> | |
| 11 | + </el-form-item> | |
| 12 | + <el-form-item label="类型" prop="siteType"> | |
| 13 | + <el-select v-model="form.siteType" placeholder="请选择类型" disabled> | |
| 14 | + <el-option label="工地" value="0" /> | |
| 15 | + <el-option label="消纳场" value="1" /> | |
| 16 | + </el-select> | |
| 17 | + </el-form-item> | |
| 18 | + <el-form-item :label="form.siteType==0?'工地名称':'消纳场名称'" prop="siteName"> | |
| 19 | + <el-select v-model="form.siteName" placeholder="请选择类型" disabled> | |
| 20 | + <el-option v-for="item in data[form.siteType]" :label="item.name" :value="item.name" @native.click="getSite(item)" disabled/> | |
| 21 | + </el-select> | |
| 22 | + </el-form-item> | |
| 23 | + <el-form-item label="问题描述" prop="caseDec"> | |
| 24 | + <el-input v-model="form.caseDec" type="textarea" maxlength="200" :rows="3" disabled/> | |
| 25 | + </el-form-item> | |
| 26 | + <el-form-item label="位置描述" prop="locationDec"> | |
| 27 | + <el-input v-model="form.locationDec" type="textarea" maxlength="100" :rows="3" disabled/> | |
| 28 | + </el-form-item> | |
| 29 | + <el-form-item label="审批意见" prop="advice1"> | |
| 30 | + <el-input v-model="form.advice1" type="textarea" :rows="3" disabled/> | |
| 31 | + </el-form-item> | |
| 32 | + | |
| 33 | + <el-form-item label="案卷编号" prop="number"> | |
| 34 | + <el-input v-model="form.number" disabled/> | |
| 35 | + </el-form-item> | |
| 36 | + | |
| 37 | + <el-form-item label="附件" prop="attach"> | |
| 38 | + <el-input v-model="form.attach" type="hidden"></el-input> | |
| 39 | + <a @click="downloadFile(img);" style="color: blue;" v-for="img,index in form.attach">附件 - {{index+1}}</a> | |
| 40 | + </el-form-item> | |
| 41 | + | |
| 42 | + | |
| 43 | + <el-table :data="adviceList" v-if="adviceList != null"> | |
| 44 | + <el-table-column label="用户" width="55" align="center" prop="name"/> | |
| 45 | + <el-table-column label="审批内容" align="center" prop="text" /> | |
| 46 | + <el-table-column label="时间" align="center" prop="time" /> | |
| 47 | + </el-table> | |
| 48 | + | |
| 49 | + | |
| 50 | + </el-form> | |
| 51 | +</template> | |
| 52 | + | |
| 53 | +<script> | |
| 54 | +import { listCaseOffline, getCaseOffline,getAdviceList } from "@/api/caseOffline/caseOffline"; | |
| 55 | + import { | |
| 56 | + getArea, | |
| 57 | + earthsitesList, | |
| 58 | + constructionsitesList, | |
| 59 | + getDict, | |
| 60 | + | |
| 61 | + } from "@/api/dict"; | |
| 62 | + import { | |
| 63 | + getThreestep, | |
| 64 | + } from "@/api/business/threestep"; | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + import { | |
| 69 | + getToken | |
| 70 | + } from "@/utils/auth"; | |
| 71 | +export default { | |
| 72 | + name: "CaseOffline", | |
| 73 | + props: { | |
| 74 | + businessKey: { | |
| 75 | + type: String | |
| 76 | + } | |
| 77 | + }, | |
| 78 | + data() { | |
| 79 | + return { | |
| 80 | + // 遮罩层 | |
| 81 | + loading: true, | |
| 82 | + // 选中数组 | |
| 83 | + ids: [], | |
| 84 | + // 非单个禁用 | |
| 85 | + single: true, | |
| 86 | + // 非多个禁用 | |
| 87 | + multiple: true, | |
| 88 | + // 显示搜索条件 | |
| 89 | + showSearch: true, | |
| 90 | + // 总条数 | |
| 91 | + total: 0, | |
| 92 | + // 线下交办案卷表格数据 | |
| 93 | + caseOfflineList: [], | |
| 94 | + // 弹出层标题 | |
| 95 | + title: "", | |
| 96 | + // 是否显示弹出层 | |
| 97 | + open: false, | |
| 98 | + open2:false, | |
| 99 | + // 查询参数 | |
| 100 | + queryParams: { | |
| 101 | + pageNum: 1, | |
| 102 | + pageSize: 10, | |
| 103 | + type: null, | |
| 104 | + place: null, | |
| 105 | + createTime: null, | |
| 106 | + }, | |
| 107 | + uploadImageDialog:false, | |
| 108 | + // 表单参数 | |
| 109 | + form: {}, | |
| 110 | + // 表单校验 | |
| 111 | + rules: { | |
| 112 | + }, | |
| 113 | + caseType:[ | |
| 114 | + {code:1,name:"渣土处置工地(含消纳场)的渣土运输车辆出场车身不洁,车轮带泥"}, | |
| 115 | + {code:2,name:"未洗车出场或者出场清洁不彻底"}, | |
| 116 | + {code:3,name:"渣土运输车辆货箱顶盖未按规定关闭到位或未按规定和标准装载渣土出场"}, | |
| 117 | + {code:4,name:"非核准车辆进入渣土处置工地运输渣土"}, | |
| 118 | + {code:5,name:"渣土处置工地未按规定时间开停工"}, | |
| 119 | + {code:6,name:"渣土处置工地洗车设施等破损、未正常使用及措施不到位的"}, | |
| 120 | + {code:7,name:"渣土处置工地、消纳场(含回填场)出入口两侧50米范围内出现渣土污染、污水外排等现象"} | |
| 121 | + ], | |
| 122 | + areas:null, | |
| 123 | + fileList:[], | |
| 124 | + areas: [], | |
| 125 | + upload: { | |
| 126 | + // 是否显示弹出层(用户导入) | |
| 127 | + open: false, | |
| 128 | + // 弹出层标题(用户导入) | |
| 129 | + title: "", | |
| 130 | + // 是否禁用上传 | |
| 131 | + isUploading: false, | |
| 132 | + // 设置上传的请求头部 | |
| 133 | + headers: { | |
| 134 | + Authorization: "Bearer " + getToken() | |
| 135 | + }, | |
| 136 | + // 上传的地址 | |
| 137 | + url: process.env.VUE_APP_BASE_API + "/business/threestep/upload", | |
| 138 | + | |
| 139 | + }, | |
| 140 | + workflow:"workflow_caseoffline", | |
| 141 | + data:{}, | |
| 142 | + adviceList:[], | |
| 143 | + }; | |
| 144 | + }, | |
| 145 | + created() { | |
| 146 | + this.handleUpdate(); | |
| 147 | + }, | |
| 148 | + methods: { | |
| 149 | + getSite(item){ | |
| 150 | + this.form.objectId = item.id; | |
| 151 | + }, | |
| 152 | + getAreaName(code){ | |
| 153 | + for(let i =0;i<this.areas.length;i++){ | |
| 154 | + if(Number(code) == this.areas[i].code){ | |
| 155 | + return this.areas[i].name; | |
| 156 | + break; | |
| 157 | + } | |
| 158 | + } | |
| 159 | + return code; | |
| 160 | + }, | |
| 161 | + getCaseType(type){ | |
| 162 | + for(let i in this.caseType){ | |
| 163 | + | |
| 164 | + | |
| 165 | + if(this.caseType[i].code==type) | |
| 166 | + return this.caseType[i].name | |
| 167 | + } | |
| 168 | + }, | |
| 169 | + /** 修改按钮操作 */ | |
| 170 | + handleUpdate() { | |
| 171 | + let id; | |
| 172 | + if(this.businessKey.split(":").length == 2){ | |
| 173 | + id = this.businessKey.split(":")[1]; | |
| 174 | + }else{ | |
| 175 | + id = this.businessKey; | |
| 176 | + } | |
| 177 | + | |
| 178 | + getCaseOffline(id).then(response => { | |
| 179 | + this.form = response.data; | |
| 180 | + if(this.form.attach && this.form.attach != "") | |
| 181 | + this.form.attach = this.form.attach.split(","); | |
| 182 | + | |
| 183 | + this.form.siteType = this.form.siteType + ""; | |
| 184 | + this.form.type = this.getCaseType(this.form.type); | |
| 185 | + this.form.place = this.getAreaName(this.form.place); | |
| 186 | + | |
| 187 | + getAdviceList(this.workflow+":"+id).then(res=>{ | |
| 188 | + if(res.data){ | |
| 189 | + if(res.data.advice1){ | |
| 190 | + this.adviceList.push({name: res.data.advice1.create_by ,time:res.data.advice1.create_time,text:this.form.advice1}) | |
| 191 | + } | |
| 192 | + if(res.data.advice2){ | |
| 193 | + this.adviceList.push({name: res.data.advice2.create_by ,time:res.data.advice2.create_time,text:this.form.advice2}) | |
| 194 | + } | |
| 195 | + if(res.data.advice3){ | |
| 196 | + this.adviceList.push({name: res.data.advice3.create_by ,time:res.data.advice3.create_time,text:this.form.advice3}) | |
| 197 | + } | |
| 198 | + if(res.data.advice4){ | |
| 199 | + this.adviceList.push({name: res.data.advice4.create_by ,time:res.data.advice4.create_time,text:this.form.advice4}) | |
| 200 | + } | |
| 201 | + | |
| 202 | + } | |
| 203 | + }); | |
| 204 | + | |
| 205 | + | |
| 206 | + this.open2 = true; | |
| 207 | + }); | |
| 208 | + | |
| 209 | + | |
| 210 | + }, | |
| 211 | + } | |
| 212 | +}; | |
| 213 | +</script> | ... | ... |
trash-ui/src/views/h5/caseOffline/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | |
| 4 | + <el-form-item label="案卷类型" prop="type"> | |
| 5 | + <el-select v-model="queryParams.type" placeholder="请选择案卷类型" size="small"> | |
| 6 | + <el-option v-for="item in caseType" :label="item.name" :value="item.code" /> | |
| 7 | + </el-select> | |
| 8 | + </el-form-item> | |
| 9 | + <el-form-item label="所属区域" prop="place"> | |
| 10 | + <el-select v-model="queryParams.place" placeholder="请选择案卷类型" size="small"> | |
| 11 | + <el-option v-for="item in areas" :label="item.name" :value="item.code" /> | |
| 12 | + </el-select> | |
| 13 | + </el-form-item> | |
| 14 | + <el-form-item label="时间" prop="createTime"> | |
| 15 | + <el-date-picker size="small" style="width: 200px" | |
| 16 | + v-model="queryParams.createTime" | |
| 17 | + type="date" | |
| 18 | + value-format="yyyy-MM-dd" | |
| 19 | + placeholder="选择时间"> | |
| 20 | + </el-date-picker> | |
| 21 | + </el-form-item> | |
| 22 | + <el-form-item> | |
| 23 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |
| 24 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |
| 25 | + </el-form-item> | |
| 26 | + </el-form> | |
| 27 | + | |
| 28 | + <el-row :gutter="10" class="mb8"> | |
| 29 | + <el-col :span="1.5"> | |
| 30 | + <el-button | |
| 31 | + type="primary" | |
| 32 | + icon="el-icon-plus" | |
| 33 | + size="mini" | |
| 34 | + @click="handleAdd" | |
| 35 | + v-hasPermi="['caseOffline:caseOffline:add']" | |
| 36 | + >新增</el-button> | |
| 37 | + </el-col> | |
| 38 | + <el-col :span="1.5"> | |
| 39 | + <el-button | |
| 40 | + type="warning" | |
| 41 | + icon="el-icon-download" | |
| 42 | + size="mini" | |
| 43 | + @click="handleExport" | |
| 44 | + v-hasPermi="['caseOffline:caseOffline:export']" | |
| 45 | + >导出</el-button> | |
| 46 | + </el-col> | |
| 47 | + </el-row> | |
| 48 | + | |
| 49 | + <a @click="handleUpdate(item)" v-for="item in caseOfflineList"> | |
| 50 | + <el-card class="box-card" style="margin-bottom: 10px;" | |
| 51 | + > | |
| 52 | + <el-row class="card_row"> | |
| 53 | + <el-col :span="24" class="card_grid"> | |
| 54 | + <div class="card_title" style="font-weight: bold;">案卷编号:{{item.number}}</div> | |
| 55 | + </el-col> | |
| 56 | + </el-row> | |
| 57 | + <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;"> | |
| 58 | + <el-col :span="24"> | |
| 59 | + <span >案卷类型:{{item.type}}</span> | |
| 60 | + </el-col> | |
| 61 | + </el-row> | |
| 62 | + <el-row class="card_row"> | |
| 63 | + <el-col :span="24" class="card_grid" > | |
| 64 | + <span >所属区域:{{item.place}}</span> | |
| 65 | + </el-col> | |
| 66 | + | |
| 67 | + </el-row> | |
| 68 | + <el-row class="card_row"> | |
| 69 | + <el-col :span="24" class="card_grid" > | |
| 70 | + <div>时间:{{item.createTime}}</div> | |
| 71 | + </el-col> | |
| 72 | + </el-row> | |
| 73 | + <span>{{item.status == 0 ?"审批中" : (item.status == 2 ?"驳回" :"审批完成")}}</span> | |
| 74 | + | |
| 75 | + </el-card> | |
| 76 | +</a> | |
| 77 | + | |
| 78 | + | |
| 79 | + <pagination | |
| 80 | + v-show="total>0" | |
| 81 | + :total="total" | |
| 82 | + :page.sync="queryParams.pageNum" | |
| 83 | + :limit.sync="queryParams.pageSize" | |
| 84 | + @pagination="getList" | |
| 85 | + /> | |
| 86 | + | |
| 87 | + <!-- 添加或修改线下交办案卷对话框 --> | |
| 88 | + <el-dialog :title="title" :visible.sync="open" width="300px" append-to-body> | |
| 89 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 90 | + <el-form-item label="案卷类型" prop="type"> | |
| 91 | + <el-select v-model="form.type" placeholder="请选择案卷类型"> | |
| 92 | + <el-option v-for="item in caseType" :label="item.name" :value="item.code" /> | |
| 93 | + </el-select> | |
| 94 | + </el-form-item> | |
| 95 | + <el-form-item label="所属区域" prop="place"> | |
| 96 | + <el-select v-model="form.place" placeholder="请输入所属区域" size="small"> | |
| 97 | + <el-option v-for="item in areas" :label="item.name" :value="item.code" /> | |
| 98 | + </el-select> | |
| 99 | + </el-form-item> | |
| 100 | + <el-form-item label="类型" prop="siteType"> | |
| 101 | + <el-select v-model="form.siteType" placeholder="请选择类型"> | |
| 102 | + <el-option label="工地" value="0" /> | |
| 103 | + <el-option label="消纳场" value="1" /> | |
| 104 | + </el-select> | |
| 105 | + </el-form-item> | |
| 106 | + <el-form-item :label="form.siteType==0?'工地名称':'消纳场名称'" prop="siteName"> | |
| 107 | + <el-select v-model="form.siteName" placeholder="请选择类型"> | |
| 108 | + <el-option v-for="item in data[form.siteType]" :label="item.name" :value="item.name" @native.click="getSite(item)"/> | |
| 109 | + </el-select> | |
| 110 | + </el-form-item> | |
| 111 | + <el-form-item label="问题描述" prop="caseDec"> | |
| 112 | + <el-input v-model="form.caseDec" placeholder="请输入问题描述" type="text" maxlength="200" :rows="3"/> | |
| 113 | + </el-form-item> | |
| 114 | + <el-form-item label="位置描述" prop="locationDec"> | |
| 115 | + <el-input v-model="form.locationDec" placeholder="请输入问题描述" type="text" maxlength="100" :rows="3"/> | |
| 116 | + </el-form-item> | |
| 117 | + <el-form-item label="案卷编号" prop="number"> | |
| 118 | + <el-input v-model="form.number" placeholder="请输入案卷编号" disabled/> | |
| 119 | + </el-form-item> | |
| 120 | + | |
| 121 | + <el-form-item label="附件" prop="attach"> | |
| 122 | + <a style="color:blue;font-size: 12px;" @click="uploadImageDialog=true;">选择附件</a> | |
| 123 | + <el-input v-model="form.attach" type="hidden"></el-input> | |
| 124 | + <a @click="downloadFile(img);" style="color: blue;" v-for="img,index in form.attach">附件 - {{index+1}}</a> | |
| 125 | + </el-form-item> | |
| 126 | + | |
| 127 | + </el-form> | |
| 128 | + <div slot="footer" class="dialog-footer"> | |
| 129 | + <el-button type="primary" @click="submitForm">确 定</el-button> | |
| 130 | + <el-button @click="cancel">取 消</el-button> | |
| 131 | + </div> | |
| 132 | + </el-dialog> | |
| 133 | + | |
| 134 | + | |
| 135 | + <el-dialog title="查看详情" :visible.sync="open2" width="300px" append-to-body> | |
| 136 | + <caseOfflineInfo :businessKey="businessKey" v-if="open2" /> | |
| 137 | + <div slot="footer" class="dialog-footer"> | |
| 138 | + <el-button @click="cancel">取 消</el-button> | |
| 139 | + </div> | |
| 140 | + </el-dialog> | |
| 141 | + | |
| 142 | + | |
| 143 | + <el-dialog title="附件" :visible.sync="uploadImageDialog" append-to-body :beforeClose="handleClose" width="300px"> | |
| 144 | + <el-upload multiple :headers="upload.headers" :action="upload.url" :file-list="fileList" | |
| 145 | + :on-success="uploadSuccess" :before-upload="beforeUpload"> | |
| 146 | + <el-button size="small" type="primary">选择附件</el-button> | |
| 147 | + <div slot="tip" class="el-upload__tip">只能上传不超过 20MB 的jpg pdf word文件</div> | |
| 148 | + </el-upload> | |
| 149 | + <div style="height: 40px;width:100%;"> | |
| 150 | + <el-button type="primary" style="margin-top: 20px;float:right;" @click="handleClose">关闭</el-button> | |
| 151 | + </div> | |
| 152 | + </el-dialog> | |
| 153 | + </div> | |
| 154 | +</template> | |
| 155 | + | |
| 156 | +<script> | |
| 157 | +import { listCaseOffline, getCaseOffline, delCaseOffline, addCaseOffline, updateCaseOffline, exportCaseOffline } from "@/api/caseOffline/caseOffline"; | |
| 158 | + | |
| 159 | +import caseOfflineInfo from "@/views/h5/caseOffline/caseOfflineInfo"; | |
| 160 | + | |
| 161 | +import { | |
| 162 | + getArea, | |
| 163 | + earthsitesList, | |
| 164 | + constructionsitesList, | |
| 165 | + getDict, | |
| 166 | + } from "@/api/dict"; | |
| 167 | + | |
| 168 | +import { | |
| 169 | + getThreestep, | |
| 170 | + } from "@/api/business/threestep"; | |
| 171 | + | |
| 172 | +import { | |
| 173 | + getToken | |
| 174 | + } from "@/utils/auth"; | |
| 175 | + | |
| 176 | + import pagination from '../Pagination'; | |
| 177 | + | |
| 178 | +export default { | |
| 179 | + name: "CaseOffline", | |
| 180 | + | |
| 181 | + components: { | |
| 182 | + caseOfflineInfo, | |
| 183 | + pagination | |
| 184 | + }, | |
| 185 | + data() { | |
| 186 | + return { | |
| 187 | + // 遮罩层 | |
| 188 | + loading: true, | |
| 189 | + // 选中数组 | |
| 190 | + ids: [], | |
| 191 | + // 非单个禁用 | |
| 192 | + single: true, | |
| 193 | + // 非多个禁用 | |
| 194 | + multiple: true, | |
| 195 | + // 显示搜索条件 | |
| 196 | + showSearch: true, | |
| 197 | + // 总条数 | |
| 198 | + total: 0, | |
| 199 | + // 线下交办案卷表格数据 | |
| 200 | + caseOfflineList: [], | |
| 201 | + // 弹出层标题 | |
| 202 | + title: "", | |
| 203 | + // 是否显示弹出层 | |
| 204 | + open: false, | |
| 205 | + open2:false, | |
| 206 | + // 查询参数 | |
| 207 | + queryParams: { | |
| 208 | + pageNum: 1, | |
| 209 | + pageSize: 10, | |
| 210 | + type: null, | |
| 211 | + place: null, | |
| 212 | + createTime: null, | |
| 213 | + }, | |
| 214 | + uploadImageDialog:false, | |
| 215 | + // 表单参数 | |
| 216 | + form: {}, | |
| 217 | + // 表单校验 | |
| 218 | + rules: { | |
| 219 | + }, | |
| 220 | + caseType:[ | |
| 221 | + {code:0,name:"渣土处置工地(含消纳场)的渣土运输车辆出场车身不洁,车轮带泥"}, | |
| 222 | + {code:1,name:"未洗车出场或者出场清洁不彻底"}, | |
| 223 | + {code:2,name:"渣土运输车辆货箱顶盖未按规定关闭到位或未按规定和标准装载渣土出场"}, | |
| 224 | + {code:3,name:"非核准车辆进入渣土处置工地运输渣土"}, | |
| 225 | + {code:4,name:"渣土处置工地未按规定时间开停工"}, | |
| 226 | + {code:5,name:"渣土处置工地洗车设施等破损、未正常使用及措施不到位的"}, | |
| 227 | + {code:6,name:"渣土处置工地、消纳场(含回填场)出入口两侧50米范围内出现渣土污染、污水外排等现象"}, | |
| 228 | + {code:7,name:"其他1"}, | |
| 229 | + {code:8,name:"其他2"}, | |
| 230 | + {code:9,name:"其他3"} | |
| 231 | + ], | |
| 232 | + areas:null, | |
| 233 | + fileList:[], | |
| 234 | + areas: [], | |
| 235 | + upload: { | |
| 236 | + // 是否显示弹出层(用户导入) | |
| 237 | + open: false, | |
| 238 | + // 弹出层标题(用户导入) | |
| 239 | + title: "", | |
| 240 | + // 是否禁用上传 | |
| 241 | + isUploading: false, | |
| 242 | + // 设置上传的请求头部 | |
| 243 | + headers: { | |
| 244 | + Authorization: "Bearer " + getToken() | |
| 245 | + }, | |
| 246 | + // 上传的地址 | |
| 247 | + url: process.env.VUE_APP_BASE_API + "/business/threestep/upload", | |
| 248 | + }, | |
| 249 | + data:{}, | |
| 250 | + objId:null | |
| 251 | + }; | |
| 252 | + }, | |
| 253 | + created() { | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + this.getList(); | |
| 258 | + | |
| 259 | + if(window.location.search){ | |
| 260 | + let businessKey = window.location.search.split("=")[1]; | |
| 261 | + let id; | |
| 262 | + if(businessKey.split(":").length == 2){ | |
| 263 | + id = businessKey.split(":")[1]; | |
| 264 | + }else{ | |
| 265 | + id = businessKey; | |
| 266 | + } | |
| 267 | + | |
| 268 | + getThreestep(id).then(response => { | |
| 269 | + let data = response.data; | |
| 270 | + | |
| 271 | + this.handleAdd(); | |
| 272 | + | |
| 273 | + this.form.siteType = data.type + ""; | |
| 274 | + this.form.siteName = data.name; | |
| 275 | + this.form.place = Number(data.place); | |
| 276 | + }); | |
| 277 | + } | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + let remoteQueryData = { | |
| 282 | + "page": 1, | |
| 283 | + "size": 9999 | |
| 284 | + } | |
| 285 | + | |
| 286 | + constructionsitesList(remoteQueryData).then(res => { | |
| 287 | + this.data[0]= res.result.list; | |
| 288 | + }); | |
| 289 | + | |
| 290 | + earthsitesList(remoteQueryData).then(res => { | |
| 291 | + this.data[1]= res.result.list; | |
| 292 | + }); | |
| 293 | + }, | |
| 294 | + methods: { | |
| 295 | + getSite(item){ | |
| 296 | + this.form.objectId = item.id; | |
| 297 | + }, | |
| 298 | + /** 查询线下交办案卷列表 */ | |
| 299 | + getList() { | |
| 300 | + this.loading = true; | |
| 301 | + listCaseOffline(this.queryParams).then(response => { | |
| 302 | + this.caseOfflineList = response.rows; | |
| 303 | + | |
| 304 | + for(let i in this.caseOfflineList){ | |
| 305 | + this.caseOfflineList[i].type = this.getCaseType(this.caseOfflineList[i].type); | |
| 306 | + | |
| 307 | + } | |
| 308 | + | |
| 309 | + getArea().then(res => { | |
| 310 | + this.areas = res.result; | |
| 311 | + for(let i =0;i< this.caseOfflineList.length;i++){ | |
| 312 | + this.caseOfflineList[i].place = this.getAreaName(this.caseOfflineList[i].place); | |
| 313 | + } | |
| 314 | + }); | |
| 315 | + | |
| 316 | + this.total = response.total; | |
| 317 | + this.loading = false; | |
| 318 | + }); | |
| 319 | + }, | |
| 320 | + // 取消按钮 | |
| 321 | + cancel() { | |
| 322 | + this.open = false; | |
| 323 | + this.open2 = false; | |
| 324 | + this.reset(); | |
| 325 | + }, | |
| 326 | + // 表单重置 | |
| 327 | + reset() { | |
| 328 | + this.form = { | |
| 329 | + id: null, | |
| 330 | + type: null, | |
| 331 | + siteName: null, | |
| 332 | + locationDec: null, | |
| 333 | + caseDec: null, | |
| 334 | + status: 0, | |
| 335 | + place: null, | |
| 336 | + number: null, | |
| 337 | + siteType: null, | |
| 338 | + objectId: null, | |
| 339 | + createTime: null, | |
| 340 | + createBy: null, | |
| 341 | + advice1: null, | |
| 342 | + advice2: null, | |
| 343 | + advice3: null, | |
| 344 | + advice4: null, | |
| 345 | + attach:[] | |
| 346 | + }; | |
| 347 | + this.resetForm("form"); | |
| 348 | + }, | |
| 349 | + /** 搜索按钮操作 */ | |
| 350 | + handleQuery() { | |
| 351 | + this.queryParams.pageNum = 1; | |
| 352 | + this.getList(); | |
| 353 | + }, | |
| 354 | + /** 重置按钮操作 */ | |
| 355 | + resetQuery() { | |
| 356 | + this.resetForm("queryForm"); | |
| 357 | + this.handleQuery(); | |
| 358 | + }, | |
| 359 | + // 多选框选中数据 | |
| 360 | + handleSelectionChange(selection) { | |
| 361 | + this.ids = selection.map(item => item.id) | |
| 362 | + this.single = selection.length!==1 | |
| 363 | + this.multiple = !selection.length | |
| 364 | + }, | |
| 365 | + getAreaName(code){ | |
| 366 | + for(let i =0;i<this.areas.length;i++){ | |
| 367 | + if(Number(code) == this.areas[i].code){ | |
| 368 | + return this.areas[i].name; | |
| 369 | + break; | |
| 370 | + } | |
| 371 | + } | |
| 372 | + return code; | |
| 373 | + }, | |
| 374 | + getCaseType(type){ | |
| 375 | + for(let i in this.caseType){ | |
| 376 | + | |
| 377 | + | |
| 378 | + if(this.caseType[i].code==type) | |
| 379 | + return this.caseType[i].name | |
| 380 | + } | |
| 381 | + }, | |
| 382 | + /** 新增按钮操作 */ | |
| 383 | + handleAdd() { | |
| 384 | + this.reset(); | |
| 385 | + this.open = true; | |
| 386 | + this.title = "添加线下交办案卷"; | |
| 387 | + | |
| 388 | + let date = new Date(); | |
| 389 | + | |
| 390 | + | |
| 391 | + this.form.number = date.getFullYear() | |
| 392 | + +""+((date.getMonth()+1) < 10 ? "0" + (date.getMonth()+1) : (date.getMonth()+1)) | |
| 393 | + +""+ ((date.getDate()) < 10 ? "0" + (date.getDate()) : (date.getDate())) | |
| 394 | + +""+ ((date.getHours()) < 10 ? "0" + (date.getHours()) : (date.getHours())) | |
| 395 | + +""+ ((date.getMinutes()) < 10 ? "0" + (date.getMinutes()) : (date.getMinutes())) | |
| 396 | + +""+ ((date.getSeconds()) < 10 ? "0" + (date.getSeconds()*1000) : (date.getSeconds()*1000)) | |
| 397 | + }, | |
| 398 | + /** 修改按钮操作 */ | |
| 399 | + handleUpdate(row) { | |
| 400 | + this.reset(); | |
| 401 | + this.businessKey =row.id + ""; | |
| 402 | + this.open2 = true; | |
| 403 | + }, | |
| 404 | + /** 提交按钮 */ | |
| 405 | + submitForm() { | |
| 406 | + this.$refs["form"].validate(valid => { | |
| 407 | + if (valid) { | |
| 408 | + this.form.attach = this.form.attach +""; | |
| 409 | + if (this.form.id != null) { | |
| 410 | + updateCaseOffline(this.form).then(response => { | |
| 411 | + this.msgSuccess("修改成功"); | |
| 412 | + this.open = false; | |
| 413 | + this.getList(); | |
| 414 | + }); | |
| 415 | + } else { | |
| 416 | + addCaseOffline(this.form).then(response => { | |
| 417 | + this.msgSuccess("新增成功"); | |
| 418 | + this.open = false; | |
| 419 | + this.getList(); | |
| 420 | + }); | |
| 421 | + } | |
| 422 | + } | |
| 423 | + }); | |
| 424 | + }, | |
| 425 | + /** 删除按钮操作 */ | |
| 426 | + handleDelete(row) { | |
| 427 | + const ids = row.id || this.ids; | |
| 428 | + this.$confirm('是否确认删除线下交办案卷编号为"' + ids + '"的数据项?', "警告", { | |
| 429 | + confirmButtonText: "确定", | |
| 430 | + cancelButtonText: "取消", | |
| 431 | + type: "warning" | |
| 432 | + }).then(function() { | |
| 433 | + return delCaseOffline(ids); | |
| 434 | + }).then(() => { | |
| 435 | + this.getList(); | |
| 436 | + this.msgSuccess("删除成功"); | |
| 437 | + }) | |
| 438 | + }, | |
| 439 | + /** 导出按钮操作 */ | |
| 440 | + handleExport() { | |
| 441 | + const queryParams = this.queryParams; | |
| 442 | + this.$confirm('是否确认导出所有线下交办案卷数据项?', "警告", { | |
| 443 | + confirmButtonText: "确定", | |
| 444 | + cancelButtonText: "取消", | |
| 445 | + type: "warning" | |
| 446 | + }).then(function() { | |
| 447 | + return exportCaseOffline(queryParams); | |
| 448 | + }).then(response => { | |
| 449 | + this.download(response.message); | |
| 450 | + }) | |
| 451 | + }, | |
| 452 | + removeAttchItem(index, img) { | |
| 453 | + this.form.attach.splice(this.form.attach.indexOf(img), 1); | |
| 454 | + this.$forceUpdate(); | |
| 455 | + }, | |
| 456 | + uploadSuccess(res, file, fileList) { | |
| 457 | + if(res.code){ | |
| 458 | + this.$message(res.message); | |
| 459 | + return; | |
| 460 | + } | |
| 461 | + if(!this.form.attach){ | |
| 462 | + this.form.attach = []; | |
| 463 | + } | |
| 464 | + this.form.attach.push(res); | |
| 465 | + }, | |
| 466 | + showFileUpload(i) { | |
| 467 | + this.uploadImageDialog = true; | |
| 468 | + this.picIndex = i; | |
| 469 | + }, | |
| 470 | + beforeUpload(file) { | |
| 471 | + let isRightSize = file.size / 1024 / 1024 < 20 | |
| 472 | + if (!isRightSize) { | |
| 473 | + this.$message.error('文件大小超过 20MB') | |
| 474 | + return isRightSize; | |
| 475 | + } | |
| 476 | + let isAccept = false; | |
| 477 | + if (file.name.indexOf('.docx') > -1 || file.name.indexOf(".jpg") > -1 || file.name.indexOf('.doc') > -1 || file | |
| 478 | + .name.indexOf('.pdf') > -1) { | |
| 479 | + isAccept = true; | |
| 480 | + } | |
| 481 | + if (!isAccept) { | |
| 482 | + this.$message.error('应该选择PDF、JPG、WORD类型的文件') | |
| 483 | + return isAccept; | |
| 484 | + } | |
| 485 | + }, | |
| 486 | + downloadFile(path) { | |
| 487 | + window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path); | |
| 488 | + }, | |
| 489 | + handleClose() { | |
| 490 | + this.uploadImageDialog = false; | |
| 491 | + this.fileList = []; | |
| 492 | + }, | |
| 493 | + } | |
| 494 | +}; | |
| 495 | +</script> | |
| 496 | + | |
| 497 | +<style scope> | |
| 498 | + .el-select-dropdown__item{ | |
| 499 | + width:300px; | |
| 500 | + } | |
| 501 | +</style> | ... | ... |
trash-ui/src/views/h5/dayWorkReport/index.vue
| 1 | 1 | <template> |
| 2 | 2 | <div class="app-container"> |
| 3 | + <el-row :gutter="10" class="mb8"> | |
| 4 | + <el-col :span="1.5"> | |
| 5 | + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.pageStatus==0}" size="mini" | |
| 6 | + @click="getList(0);">报工记录</el-button> | |
| 7 | + </el-col> | |
| 8 | + <el-col :span="1.5"> | |
| 9 | + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.pageStatus==1}" size="mini" | |
| 10 | + @click="getList(1);">历史报工记录</el-button> | |
| 11 | + </el-col> | |
| 12 | + </el-row> | |
| 3 | 13 | |
| 14 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px"> | |
| 15 | + <el-form-item label="工地名称" prop="name"> | |
| 16 | + <el-input v-model="queryParams.name" placeholder="请输入项目名称" size="small" | |
| 17 | + /> | |
| 18 | + </el-form-item> | |
| 19 | + <el-form-item label="消纳场名称" prop="earthsitesName"> | |
| 20 | + <el-input v-model="queryParams.earthsitesName" placeholder="请输入消纳场名称" size="small" | |
| 21 | + /> | |
| 22 | + </el-form-item> | |
| 23 | + <el-form-item label="工地区属" prop="place"> | |
| 24 | + <el-select v-model="queryParams.place" placeholder="工地所属区域 " size="small"> | |
| 25 | + <el-option v-for="item in areas" :label="item.name" :value="item.code" /> | |
| 26 | + </el-select> | |
| 27 | + </el-form-item> | |
| 28 | + | |
| 29 | + <el-form-item label="消纳场区属" prop="subReason"> | |
| 30 | + <el-select v-model="queryParams.subReason" placeholder="工地所属区域 " size="small"> | |
| 31 | + <el-option v-for="item in areas" :label="item.name" :value="item.code" /> | |
| 32 | + </el-select> | |
| 33 | + </el-form-item> | |
| 34 | + <el-form-item label="开始时间" prop="workStartTime" v-if="this.queryParams.his==1"> | |
| 35 | + <el-date-picker size="small" style="width: 200px" v-model="queryParams.workStartTime" type="date" | |
| 36 | + value-format="yyyy-MM-dd" placeholder="开始时间"> | |
| 37 | + </el-date-picker> | |
| 38 | + </el-form-item> | |
| 39 | + <el-form-item label="结束时间" prop="workEndTime" v-if="this.queryParams.his==1"> | |
| 40 | + <el-date-picker size="small" style="width: 200px" v-model="queryParams.workEndTime" type="date" | |
| 41 | + value-format="yyyy-MM-dd" placeholder="结束时间"> | |
| 42 | + </el-date-picker> | |
| 43 | + </el-form-item> | |
| 4 | 44 | |
| 5 | - <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | |
| 6 | - <el-row> | |
| 7 | - <el-col :span="12"> | |
| 8 | - <el-input v-model="queryParams.name" placeholder="请输入项目名称" /> | |
| 9 | - </el-col> | |
| 10 | - <el-col :span="12"> | |
| 11 | - <el-select v-model="queryParams.place" placeholder="工地所属区域 " size="small"> | |
| 12 | - <el-option v-for="item in areas" :label="item.name" :value="item.code" /> | |
| 13 | - </el-select> | |
| 14 | - </el-col> | |
| 15 | - </el-row> | |
| 16 | - <el-row> | |
| 17 | - <el-col :span="12"> | |
| 18 | - <el-date-picker size="small" style="width: 150px" v-model="queryParams.workStartTime" type="date" | |
| 19 | - value-format="yyyy-MM-dd" placeholder="开始时间"> | |
| 20 | - </el-date-picker> | |
| 21 | - </el-col> | |
| 22 | - <el-col :span="12"> | |
| 23 | - <el-date-picker size="small" style="width: 150px" v-model="queryParams.workEndTime" type="date" | |
| 24 | - value-format="yyyy-MM-dd" placeholder="结束时间"> | |
| 25 | - </el-date-picker> | |
| 26 | - </el-col> | |
| 27 | - </el-row> | |
| 28 | 45 | <el-form-item> |
| 29 | 46 | <el-button type="primary" size="mini" @click="handleQuery">搜索</el-button> |
| 30 | 47 | <el-button size="mini" @click="resetQuery">重置</el-button> |
| 31 | 48 | </el-form-item> |
| 32 | 49 | </el-form> |
| 33 | 50 | |
| 51 | + | |
| 52 | + <p> {{dayWorkCount}}</p> | |
| 53 | + | |
| 54 | + | |
| 34 | 55 | <el-row :gutter="10" class="mb8"> |
| 35 | 56 | <el-col :span="1.5"> |
| 36 | 57 | <el-button size="mini" @click="handleExport" v-hasPermi="['business:threestep:export']">导出</el-button> |
| ... | ... | @@ -38,18 +59,47 @@ |
| 38 | 59 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| 39 | 60 | </el-row> |
| 40 | 61 | |
| 41 | - <el-table v-loading="loading" :data="threestepList" @selection-change="handleSelectionChange"> | |
| 42 | - <el-table-column label="序号" align="center" type="index" /> | |
| 43 | - <el-table-column label="工地名称" align="center" prop="name" /> | |
| 44 | - <el-table-column label="项目类型" align="center" prop="type" /> | |
| 45 | - <el-table-column label="管辖区" align="center" prop="place" /> | |
| 46 | - <el-table-column label="审查意见" align="center" prop="sub_reason" width="180" /> | |
| 47 | - <el-table-column label="消纳场名称" align="center" prop="ename" width="180" /> | |
| 48 | - <el-table-column label="消纳场类型" align="center" prop="etype" width="180"/> | |
| 49 | - <el-table-column label="管辖区" align="center" prop="eplace" /> | |
| 50 | - <el-table-column label="审查意见" align="center" prop="esub_reason" width="180" /> | |
| 51 | - <el-table-column label="开工状态" align="center" prop="estatus" class-name="small-padding fixed-width"/> | |
| 52 | - </el-table> | |
| 62 | + <el-card class="box-card" v-for="item in threestepList" style="margin-bottom: 10px;"> | |
| 63 | + <p>{{item.createTime}} {{item.descript}}</p> | |
| 64 | + <el-row class="card_row"> | |
| 65 | + <el-col :span="24" class="card_grid"> | |
| 66 | + <div class="card_title" style="font-weight: bold;">工地名称:{{item.name}}</div> | |
| 67 | + </el-col> | |
| 68 | + </el-row> | |
| 69 | + <el-row class="card_row"> | |
| 70 | + <el-col :span="12" class="card_grid" > | |
| 71 | + <span >所属区:{{item.place}}</span> | |
| 72 | + </el-col> | |
| 73 | + <el-col :span="12" class="card_grid" > | |
| 74 | + <span >开工状态:{{item.status}}</span> | |
| 75 | + </el-col> | |
| 76 | + </el-row> | |
| 77 | + <el-row class="card_row" > | |
| 78 | + <el-col :span="24"> | |
| 79 | + <div>申请开工时间:{{item.selfCheckTime}}</div> | |
| 80 | + </el-col> | |
| 81 | + </el-row> | |
| 82 | + <el-row class="card_row" style="margin-top: 10px;"> | |
| 83 | + <el-col :span="24" class="card_grid"> | |
| 84 | + <div class="card_title" style="font-weight: bold;">消纳场名称:{{item.ename}}</div> | |
| 85 | + </el-col> | |
| 86 | + </el-row> | |
| 87 | + <el-row class="card_row"> | |
| 88 | + <el-col :span="12" class="card_grid" > | |
| 89 | + <span >所属区:{{item.eplace}}</span> | |
| 90 | + </el-col> | |
| 91 | + <el-col :span="12" class="card_grid" > | |
| 92 | + <span >开工状态:{{item.estatus}}</span> | |
| 93 | + </el-col> | |
| 94 | + </el-row> | |
| 95 | + <el-row class="card_row" style="margin-top: 5px;"> | |
| 96 | + <el-col :span="24"> | |
| 97 | + <div>申请开工时间:{{item.eselfCheckTime}}</div> | |
| 98 | + </el-col> | |
| 99 | + </el-row> | |
| 100 | + | |
| 101 | + </el-card> | |
| 102 | + | |
| 53 | 103 | |
| 54 | 104 | <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" |
| 55 | 105 | @pagination="getList" /> |
| ... | ... | @@ -60,7 +110,7 @@ |
| 60 | 110 | <script> |
| 61 | 111 | import { |
| 62 | 112 | dayWorkList, |
| 63 | - exportDayWorkList, | |
| 113 | + exportDayWorkList | |
| 64 | 114 | } from "@/api/business/daywork"; |
| 65 | 115 | |
| 66 | 116 | |
| ... | ... | @@ -78,8 +128,11 @@ |
| 78 | 128 | getArea |
| 79 | 129 | } from "@/api/dict"; |
| 80 | 130 | |
| 131 | +import pagination from '../Pagination'; | |
| 132 | + | |
| 81 | 133 | export default { |
| 82 | 134 | name: "dayWorkReport", |
| 135 | + components: {pagination}, | |
| 83 | 136 | data() { |
| 84 | 137 | return { |
| 85 | 138 | // 遮罩层 |
| ... | ... | @@ -103,7 +156,7 @@ |
| 103 | 156 | showSearch: true, |
| 104 | 157 | // 总条数 |
| 105 | 158 | total: 0, |
| 106 | - // 日开工报表表格数据 | |
| 159 | + // 开工报表表格数据 | |
| 107 | 160 | threestepList: [], |
| 108 | 161 | fileList: [], |
| 109 | 162 | // 弹出层标题 |
| ... | ... | @@ -139,7 +192,7 @@ |
| 139 | 192 | bindname:null, |
| 140 | 193 | projectTypes:null, |
| 141 | 194 | earthsitesTypes:null, |
| 142 | - | |
| 195 | + dayWorkCount:null, | |
| 143 | 196 | outside:["长沙县","望城区","浏阳市","宁乡市","株洲市","湘潭市","汩罗市","湘阴县"], |
| 144 | 197 | }; |
| 145 | 198 | }, |
| ... | ... | @@ -180,19 +233,36 @@ |
| 180 | 233 | this.uploadImageDialog = false; |
| 181 | 234 | this.fileList = []; |
| 182 | 235 | }, |
| 183 | - /** 查询日开工报表列表 */ | |
| 236 | + /** 查询开工报表列表 */ | |
| 184 | 237 | getList(tabIdx) { |
| 185 | 238 | |
| 186 | - | |
| 187 | 239 | this.loading = true; |
| 188 | 240 | |
| 189 | - dayWorkList(this.queryParams).then(response => { | |
| 241 | + let query = this.queryParams; | |
| 242 | + | |
| 243 | + if(this.queryParams.his != tabIdx && tabIdx == 1){ | |
| 244 | + this.queryParams.his = tabIdx; | |
| 245 | + query.workStartTime = "2000-01-01 00:00:00"; | |
| 246 | + query.workEndTime = "2999-01-01 00:00:00"; | |
| 247 | + }else if(tabIdx==0){ | |
| 248 | + this.queryParams.his = null; | |
| 249 | + query.workStartTime = null; | |
| 250 | + query.workEndTime = null; | |
| 251 | + } | |
| 252 | + | |
| 253 | + dayWorkList(query).then(response => { | |
| 254 | + | |
| 190 | 255 | this.threestepList = response.rows; |
| 191 | 256 | |
| 192 | 257 | getArea().then(res => { |
| 193 | 258 | this.areas = res.result; |
| 194 | 259 | for(let i =0;i< this.threestepList.length;i++){ |
| 195 | 260 | this.threestepList[i].place = this.getAreaName(this.threestepList[i].place); |
| 261 | + if(this.outside.indexOf(this.threestepList[i].place) > -1){ | |
| 262 | + if(this.threestepList[i].status == "开工"){ | |
| 263 | + this.threestepList[i].descript = "开工"; | |
| 264 | + } | |
| 265 | + } | |
| 196 | 266 | |
| 197 | 267 | } |
| 198 | 268 | }); |
| ... | ... | @@ -201,7 +271,18 @@ |
| 201 | 271 | |
| 202 | 272 | constructionsitesList(this.remoteQueryData).then(res => { |
| 203 | 273 | this.constructionsitesList = res.result.list; |
| 274 | + | |
| 275 | + let count = 0; | |
| 276 | + let count1 = 0; | |
| 277 | + | |
| 204 | 278 | for(let i =0;i< this.threestepList.length;i++){ |
| 279 | + | |
| 280 | + if(this.threestepList[i].status == "开工"){ | |
| 281 | + count += 1; | |
| 282 | + } | |
| 283 | + if(this.threestepList[i].estatus == "开工"){ | |
| 284 | + count1 += 1; | |
| 285 | + } | |
| 205 | 286 | for(let j =0;j<this.constructionsitesList.length;j++){ |
| 206 | 287 | if(this.threestepList[i].objectId == this.constructionsitesList[j].id){ |
| 207 | 288 | for(let x in this.projectTypes){ |
| ... | ... | @@ -212,30 +293,31 @@ |
| 212 | 293 | } |
| 213 | 294 | } |
| 214 | 295 | } |
| 296 | + | |
| 297 | + | |
| 298 | + let str = "今日"; | |
| 299 | + if(this.queryParams.his){ | |
| 300 | + str = ""; | |
| 301 | + } | |
| 302 | + | |
| 303 | + this.dayWorkCount = str + "长沙市工地开工数量:" + count + " " + str +"长沙市消纳场开工数量:" + count1; | |
| 304 | + this.loading = false; | |
| 215 | 305 | }); |
| 216 | 306 | |
| 217 | 307 | earthsitesList(this.remoteQueryData).then(res => { |
| 218 | 308 | this.earthsitesList = res.result.list; |
| 219 | 309 | for(let i =0;i< this.threestepList.length;i++){ |
| 220 | 310 | for(let j =0;j<this.earthsitesList.length;j++){ |
| 221 | - console.log(this.threestepList[i].eid + "==" + this.earthsitesList[j].id); | |
| 222 | 311 | if(this.threestepList[i].eid == this.earthsitesList[j].id){ |
| 223 | 312 | this.threestepList[i].etype = this.earthsitesList[j].typeName; |
| 224 | 313 | this.threestepList[i].eplace = this.earthsitesList[j].areaName; |
| 225 | - | |
| 226 | - if(this.outside.indexOf(this.threestepList[i].eplace) > -1){ | |
| 227 | - if(this.threestepList[i].status == "开工"){ | |
| 228 | - this.threestepList[i].descript = "开工"; | |
| 229 | - } | |
| 230 | - } | |
| 231 | - | |
| 232 | 314 | } |
| 233 | 315 | } |
| 234 | 316 | } |
| 317 | + this.loading = false; | |
| 235 | 318 | }); |
| 236 | 319 | |
| 237 | 320 | this.total = response.total; |
| 238 | - this.loading = false; | |
| 239 | 321 | }); |
| 240 | 322 | |
| 241 | 323 | |
| ... | ... | @@ -390,7 +472,7 @@ |
| 390 | 472 | /** 删除按钮操作 */ |
| 391 | 473 | handleDelete(row) { |
| 392 | 474 | const ids = row.id || this.ids; |
| 393 | - this.$confirm('是否确认删除日开工报表编号为"' + ids + '"的数据项?', "警告", { | |
| 475 | + this.$confirm('是否确认删除开工报表编号为"' + ids + '"的数据项?', "警告", { | |
| 394 | 476 | confirmButtonText: "确定", |
| 395 | 477 | cancelButtonText: "取消", |
| 396 | 478 | type: "warning" |
| ... | ... | @@ -405,11 +487,12 @@ |
| 405 | 487 | handleExport() { |
| 406 | 488 | |
| 407 | 489 | let data = []; |
| 490 | + let index = 1; | |
| 408 | 491 | for(let i in this.threestepList){ |
| 409 | 492 | |
| 410 | 493 | |
| 411 | 494 | let obj = { |
| 412 | - id:this.threestepList[i].id, | |
| 495 | + id:index, | |
| 413 | 496 | name:this.threestepList[i].name, |
| 414 | 497 | createTime:this.threestepList[i].createTime, |
| 415 | 498 | selfCheckTime:this.threestepList[i].selfCheckTime, |
| ... | ... | @@ -423,13 +506,14 @@ |
| 423 | 506 | eselfCheckTime:this.threestepList[i].eselfCheckTime, |
| 424 | 507 | descript:this.threestepList[i].descript, |
| 425 | 508 | } |
| 509 | + | |
| 426 | 510 | data.push(obj); |
| 427 | 511 | |
| 512 | + index += 1; | |
| 428 | 513 | |
| 429 | 514 | |
| 430 | 515 | } |
| 431 | - | |
| 432 | - this.$confirm('是否确认导出所有日开工报表数据项?', "警告", { | |
| 516 | + this.$confirm('是否确认导出所有开工报表数据项?', "警告", { | |
| 433 | 517 | confirmButtonText: "确定", |
| 434 | 518 | cancelButtonText: "取消", |
| 435 | 519 | type: "warning" | ... | ... |
trash-ui/src/views/h5/office/leaveApplication/index.vue renamed to trash-ui/src/views/h5/leaveApplication/index.vue
| ... | ... | @@ -10,11 +10,12 @@ |
| 10 | 10 | |
| 11 | 11 | /> |
| 12 | 12 | </el-form-item> |
| 13 | - <el-form-item label="申请部门" prop="deptId"> | |
| 14 | - <el-select v-model="queryParams.deptId" placeholder="请选择部门" size="small"> | |
| 15 | - <el-option label="请选择字典生成" value=""/> | |
| 16 | - </el-select> | |
| 17 | - </el-form-item> | |
| 13 | +<!-- <el-form-item label="申请部门" prop="deptName">--> | |
| 14 | +<!-- <el-select v-model="queryParams.deptName" placeholder="请选择部门" size="small">--> | |
| 15 | +<!-- <el-option label="全部" value=""/>--> | |
| 16 | +<!-- <el-option v-for="item in depts" :label="item.name" :value="item.name" :key="item.code"/>--> | |
| 17 | +<!-- </el-select>--> | |
| 18 | +<!-- </el-form-item>--> | |
| 18 | 19 | <el-form-item label="请假类型" prop="type"> |
| 19 | 20 | <el-select v-model="queryParams.type" placeholder="请选择请假类型" size="small"> |
| 20 | 21 | <el-option label="事假" value="事假"/> |
| ... | ... | @@ -79,57 +80,45 @@ |
| 79 | 80 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| 80 | 81 | </el-row> |
| 81 | 82 | |
| 82 | - <el-table v-loading="loading" :data="leaveApplicationList" @selection-change="handleSelectionChange"> | |
| 83 | - <el-table-column type="selection" width="55" align="center"/> | |
| 84 | - <el-table-column label="申请人" align="center" prop="applicant"/>> | |
| 85 | - <el-table-column label="联系方式" align="center" prop="phone"/> | |
| 86 | - <el-table-column label="请假类型" align="center" prop="type"/> | |
| 87 | - <el-table-column label="请假开始时间" align="center" prop="beginDate" width="180"> | |
| 88 | - <template slot-scope="scope"> | |
| 89 | - <span>{{ parseTime(scope.row.beginDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> | |
| 90 | - </template> | |
| 91 | - </el-table-column> | |
| 92 | - <el-table-column label="请假结束时间" align="center" prop="endDate" width="180"> | |
| 93 | - <template slot-scope="scope"> | |
| 94 | - <span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> | |
| 95 | - </template> | |
| 96 | - </el-table-column> | |
| 97 | - <el-table-column label="请假天数" align="center" prop="numberDays"/> | |
| 98 | - <el-table-column label="审批状态" align="center" prop="status"> | |
| 99 | - <template slot-scope="scope"> | |
| 100 | - <span>{{ parseStatus(scope.row.status) }}</span> | |
| 101 | - </template> | |
| 102 | - </el-table-column> | |
| 103 | - <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |
| 104 | - <template slot-scope="scope"> | |
| 105 | - <el-button | |
| 106 | - size="mini" | |
| 107 | - type="text" | |
| 108 | - icon="el-icon-view" | |
| 109 | - @click="handleInfo(scope.row)" | |
| 110 | - v-hasPermi="['office:leaveApplication:edit']" | |
| 111 | - >详情 | |
| 112 | - </el-button> | |
| 113 | - <el-button | |
| 114 | - size="mini" | |
| 115 | - type="text" | |
| 116 | - icon="el-icon-edit" | |
| 117 | - @click="handleUpdate(scope.row)" | |
| 118 | - v-if="scope.row.status==2" | |
| 119 | - v-hasPermi="['office:leaveApplication:edit']" | |
| 120 | - >修改 | |
| 121 | - </el-button> | |
| 122 | -<!-- <el-button--> | |
| 123 | -<!-- size="mini"--> | |
| 124 | -<!-- type="text"--> | |
| 125 | -<!-- icon="el-icon-delete"--> | |
| 126 | -<!-- @click="handleDelete(scope.row)"--> | |
| 127 | -<!-- v-hasPermi="['office:leaveApplication:remove']"--> | |
| 128 | -<!-- >删除--> | |
| 129 | -<!-- </el-button>--> | |
| 130 | - </template> | |
| 131 | - </el-table-column> | |
| 132 | - </el-table> | |
| 83 | + | |
| 84 | + <a @click="handleInfo(item)" v-for="item in leaveApplicationList"> | |
| 85 | + <el-card class="box-card" style="margin-bottom: 10px;" | |
| 86 | + > | |
| 87 | + <el-row class="card_row"> | |
| 88 | + <el-col :span="24" class="card_grid"> | |
| 89 | + <div class="card_title" style="font-weight: bold;">申请人:{{item.applicant}}</div> | |
| 90 | + </el-col> | |
| 91 | + </el-row> | |
| 92 | + <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;"> | |
| 93 | + <el-col :span="24"> | |
| 94 | + <span >请假开始时间:{{ parseTime(item.beginDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> | |
| 95 | + </el-col> | |
| 96 | + </el-row> | |
| 97 | + | |
| 98 | + <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;"> | |
| 99 | + <el-col :span="24"> | |
| 100 | + <span >请假结束时间:{{ parseTime(item.endDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> | |
| 101 | + </el-col> | |
| 102 | + </el-row> | |
| 103 | + | |
| 104 | + | |
| 105 | + <el-row class="card_row"> | |
| 106 | + <el-col :span="16"> | |
| 107 | + <span >联系方式:{{item.phone}}</span> | |
| 108 | + </el-col> | |
| 109 | + <el-col :span="8" class="card_grid" > | |
| 110 | + <span >请假天数:{{item.numberDays}}</span> | |
| 111 | + </el-col> | |
| 112 | + </el-row> | |
| 113 | + | |
| 114 | + <el-row class="card_row"> | |
| 115 | + <el-col :span="24"> | |
| 116 | + <span >审批状态:{{ parseStatus(item.status) }}</span> | |
| 117 | + </el-col> | |
| 118 | + </el-row> | |
| 119 | + </el-card> | |
| 120 | + </a> | |
| 121 | + | |
| 133 | 122 | |
| 134 | 123 | <pagination |
| 135 | 124 | v-show="total>0" |
| ... | ... | @@ -225,7 +214,7 @@ |
| 225 | 214 | </div> |
| 226 | 215 | </el-dialog> |
| 227 | 216 | |
| 228 | - <el-dialog :title="title" :visible.sync="openInfo" width="500px" append-to-body :close-on-click-modal="false"> | |
| 217 | + <el-dialog :title="title" :visible.sync="openInfo" width="300px" append-to-body :close-on-click-modal="false"> | |
| 229 | 218 | <leaveApplicationInfo :idInfo="idInfo" v-if="openInfo"/> |
| 230 | 219 | <div slot="footer" class="dialog-footer"> |
| 231 | 220 | <el-button @click="cancel">取 消</el-button> |
| ... | ... | @@ -247,9 +236,12 @@ import Editor from '@/components/ZcEditor'; |
| 247 | 236 | import leaveApplicationInfo from './leaveApplicationInfo'; |
| 248 | 237 | import {getDict} from "@/api/dict"; |
| 249 | 238 | |
| 239 | + | |
| 240 | + import pagination from '../Pagination'; | |
| 241 | + | |
| 250 | 242 | export default { |
| 251 | 243 | name: "LeaveApplication", |
| 252 | - components: {Editor, leaveApplicationInfo}, | |
| 244 | + components: {Editor, leaveApplicationInfo,pagination}, | |
| 253 | 245 | data() { |
| 254 | 246 | return { |
| 255 | 247 | // 遮罩层 | ... | ... |
trash-ui/src/views/h5/office/leaveApplication/leaveApplicationInfo.vue renamed to trash-ui/src/views/h5/leaveApplication/leaveApplicationInfo.vue
trash-ui/src/views/h5/office/conference/conferenceInfo.vue deleted
100644 → 0
| 1 | -<template> | |
| 2 | - <el-form ref="form" :model="form" label-width="80px"> | |
| 3 | - <el-row :gutter="2"> | |
| 4 | - <el-col :span="11"> | |
| 5 | - <el-form-item label="会议时间" prop="conferenceTime"> | |
| 6 | - <el-date-picker size="small" style="width: 100%" | |
| 7 | - v-model="form.conferenceTime" | |
| 8 | - type="datetime" | |
| 9 | - value-format="yyyy-MM-dd HH:mm:ss" | |
| 10 | - :disabled="true" | |
| 11 | - placeholder="选择会议时间"> | |
| 12 | - </el-date-picker> | |
| 13 | - </el-form-item> | |
| 14 | - </el-col> | |
| 15 | - <el-col :span="11"> | |
| 16 | - <el-form-item label="会议地点" prop="conferenceSite"> | |
| 17 | - <el-input v-model="form.conferenceSite" placeholder="请输入会议地点" :disabled="true"/> | |
| 18 | - </el-form-item> | |
| 19 | - </el-col> | |
| 20 | - </el-row> | |
| 21 | - <el-row :gutter="2"> | |
| 22 | - <el-col :span="22"> | |
| 23 | - <el-form-item label="参会人员" prop="staff"> | |
| 24 | - <el-input type="textarea" v-model="form.staff" placeholder="请输入参会人员" :rows="4" :disabled="true"/> | |
| 25 | - </el-form-item> | |
| 26 | - </el-col> | |
| 27 | - </el-row> | |
| 28 | - <el-row :gutter="2"> | |
| 29 | - <el-col :span="22"> | |
| 30 | - <el-form-item label="会议议程" prop="content"> | |
| 31 | - <el-input type="textarea" v-model="form.content" placeholder="请输入会议议程" :rows="4" :disabled="true"/> | |
| 32 | - </el-form-item> | |
| 33 | - </el-col> | |
| 34 | - </el-row> | |
| 35 | - <el-row :gutter="2"> | |
| 36 | - <el-col :span="22"> | |
| 37 | - <el-form-item label="会议要求" prop="requirement"> | |
| 38 | - <el-input type="textarea" v-model="form.requirement" placeholder="请输入会议要求" :rows="4" :disabled="true"/> | |
| 39 | - </el-form-item> | |
| 40 | - </el-col> | |
| 41 | - </el-row> | |
| 42 | - <el-row> | |
| 43 | - <el-table :data="fileEntityList"> | |
| 44 | - <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | |
| 45 | - <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | |
| 46 | - <template slot-scope="scope"> | |
| 47 | - <el-button | |
| 48 | - size="small" type="success" | |
| 49 | - icon="el-icon-download" | |
| 50 | - @click="downloadFA(scope.row)" | |
| 51 | - v-hasPermi="['office:management:edit']" | |
| 52 | - v-if="form.id!=null" | |
| 53 | - round>下载 | |
| 54 | - </el-button> | |
| 55 | - </template> | |
| 56 | - </el-table-column> | |
| 57 | - </el-table> | |
| 58 | - </el-row> | |
| 59 | - </el-form> | |
| 60 | -</template> | |
| 61 | - | |
| 62 | -<script> | |
| 63 | -import {getConference} from "@/api/office/conference"; | |
| 64 | -import Editor from '@/components/ZcEditor'; | |
| 65 | -export default { | |
| 66 | - name: "conferenceInfo", | |
| 67 | - components: {Editor}, | |
| 68 | - props: { | |
| 69 | - businessKey: { | |
| 70 | - type: String | |
| 71 | - }, | |
| 72 | - idInfo: { | |
| 73 | - type: String | |
| 74 | - } | |
| 75 | - }, | |
| 76 | - data() { | |
| 77 | - return { | |
| 78 | - form: {}, | |
| 79 | - fileEntityList:[] | |
| 80 | - } | |
| 81 | - }, | |
| 82 | - created() { | |
| 83 | - this.init(); | |
| 84 | - }, | |
| 85 | - methods:{ | |
| 86 | - init(){ | |
| 87 | - getConference(this.idInfo).then(response => { | |
| 88 | - this.form = response.data.conference; | |
| 89 | - let files = JSON.stringify(response.data.uploadFiles); | |
| 90 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | |
| 91 | - }); | |
| 92 | - }, | |
| 93 | - /** 文件下载 */ | |
| 94 | - downloadFA(row) { | |
| 95 | - let name = row.name; | |
| 96 | - let url = row.url; | |
| 97 | - const a = document.createElement('a') | |
| 98 | - a.setAttribute('download', name) | |
| 99 | - a.setAttribute('target', '_blank') | |
| 100 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | |
| 101 | - a.click() | |
| 102 | - }, | |
| 103 | - } | |
| 104 | -} | |
| 105 | -</script> | |
| 106 | - | |
| 107 | -<style scoped> | |
| 108 | - | |
| 109 | -</style> |
trash-ui/src/views/h5/office/conference/index.vue deleted
100644 → 0
| 1 | -<template> | |
| 2 | - <div class="app-container"> | |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | |
| 4 | - <el-form-item label="会议时间" prop="conferenceTime"> | |
| 5 | - <el-date-picker size="small" style="width: 200px" | |
| 6 | - v-model="queryParams.conferenceTime" | |
| 7 | - type="date" | |
| 8 | - value-format="yyyy-MM-dd" | |
| 9 | - placeholder="选择会议时间"> | |
| 10 | - </el-date-picker> | |
| 11 | - </el-form-item> | |
| 12 | - <el-form-item label="发起部门" prop="deptName"> | |
| 13 | - <el-select v-model="queryParams.deptName" placeholder="请输入发起部门" style="width: 100%"> | |
| 14 | - <el-option label="全部" value=""/> | |
| 15 | - <el-option v-for="item in depts" :label="item.name" :value="item.name" :key="item.code"/> | |
| 16 | - </el-select> | |
| 17 | - </el-form-item> | |
| 18 | - <el-form-item label="会议地点" prop="conferenceSite"> | |
| 19 | - <el-input v-model="queryParams.conferenceSite" placeholder="请输入会议地点"/> | |
| 20 | - </el-form-item> | |
| 21 | - <el-form-item> | |
| 22 | - <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |
| 23 | - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |
| 24 | - </el-form-item> | |
| 25 | - </el-form> | |
| 26 | - | |
| 27 | - <el-row :gutter="10" class="mb8"> | |
| 28 | - <el-col :span="1.5"> | |
| 29 | - <el-button | |
| 30 | - type="primary" | |
| 31 | - icon="el-icon-plus" | |
| 32 | - size="mini" | |
| 33 | - @click="handleAdd" | |
| 34 | - v-hasPermi="['office:conference:add']" | |
| 35 | - >新增 | |
| 36 | - </el-button> | |
| 37 | - </el-col> | |
| 38 | -<!-- <el-col :span="1.5">--> | |
| 39 | -<!-- <el-button--> | |
| 40 | -<!-- type="success"--> | |
| 41 | -<!-- icon="el-icon-edit"--> | |
| 42 | -<!-- size="mini"--> | |
| 43 | -<!-- :disabled="single"--> | |
| 44 | -<!-- @click="handleUpdate"--> | |
| 45 | -<!-- v-hasPermi="['office:conference:edit']"--> | |
| 46 | -<!-- >修改--> | |
| 47 | -<!-- </el-button>--> | |
| 48 | -<!-- </el-col>--> | |
| 49 | -<!-- <el-col :span="1.5">--> | |
| 50 | -<!-- <el-button--> | |
| 51 | -<!-- type="danger"--> | |
| 52 | -<!-- icon="el-icon-delete"--> | |
| 53 | -<!-- size="mini"--> | |
| 54 | -<!-- :disabled="multiple"--> | |
| 55 | -<!-- @click="handleDelete"--> | |
| 56 | -<!-- v-hasPermi="['office:conference:remove']"--> | |
| 57 | -<!-- >删除--> | |
| 58 | -<!-- </el-button>--> | |
| 59 | -<!-- </el-col>--> | |
| 60 | - <el-col :span="1.5"> | |
| 61 | - <el-button | |
| 62 | - type="warning" | |
| 63 | - icon="el-icon-download" | |
| 64 | - size="mini" | |
| 65 | - @click="handleExport" | |
| 66 | - v-hasPermi="['office:conference:export']" | |
| 67 | - >导出 | |
| 68 | - </el-button> | |
| 69 | - </el-col> | |
| 70 | - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 71 | - </el-row> | |
| 72 | - | |
| 73 | - <el-table v-loading="loading" :data="conferenceList" @selection-change="handleSelectionChange"> | |
| 74 | - <el-table-column type="selection" width="55" align="center"/> | |
| 75 | - <el-table-column label="会议时间" align="center" prop="conferenceTime"/> | |
| 76 | - <el-table-column label="会议地点" align="center" prop="conferenceSite"/> | |
| 77 | - <el-table-column label="参会人员" align="center" prop="staff"/> | |
| 78 | - <el-table-column label="发起部门" align="center" prop="deptName"/> | |
| 79 | - <el-table-column label="审批状态" align="center"> | |
| 80 | - <template slot-scope="scope"> | |
| 81 | - <span>{{parseStatus(scope.row.status)}}</span> | |
| 82 | - </template> | |
| 83 | - </el-table-column> | |
| 84 | - <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |
| 85 | - <template slot-scope="scope"> | |
| 86 | - <el-button | |
| 87 | - size="mini" | |
| 88 | - type="text" | |
| 89 | - icon="el-icon-view" | |
| 90 | - @click="handleInfo(scope.row)" | |
| 91 | - v-hasPermi="['office:conference:edit']" | |
| 92 | - >详情 | |
| 93 | - </el-button> | |
| 94 | - <el-button | |
| 95 | - size="mini" | |
| 96 | - type="text" | |
| 97 | - icon="el-icon-edit" | |
| 98 | - @click="handleUpdate(scope.row)" | |
| 99 | - v-if="scope.row.status==2" | |
| 100 | - v-hasPermi="['office:conference:edit']" | |
| 101 | - >修改 | |
| 102 | - </el-button> | |
| 103 | -<!-- <el-button--> | |
| 104 | -<!-- size="mini"--> | |
| 105 | -<!-- type="text"--> | |
| 106 | -<!-- icon="el-icon-delete"--> | |
| 107 | -<!-- @click="handleDelete(scope.row)"--> | |
| 108 | -<!-- v-hasPermi="['office:conference:remove']"--> | |
| 109 | -<!-- >删除--> | |
| 110 | -<!-- </el-button>--> | |
| 111 | - </template> | |
| 112 | - </el-table-column> | |
| 113 | - </el-table> | |
| 114 | - | |
| 115 | - <pagination | |
| 116 | - v-show="total>0" | |
| 117 | - :total="total" | |
| 118 | - :page.sync="queryParams.pageNum" | |
| 119 | - :limit.sync="queryParams.pageSize" | |
| 120 | - @pagination="getList" | |
| 121 | - /> | |
| 122 | - | |
| 123 | - <!-- 添加或修改会议管理对话框 --> | |
| 124 | - <el-dialog :title="title" :visible.sync="open" width="850px" append-to-body :close-on-click-modal="false"> | |
| 125 | - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 126 | - <el-row :gutter="2"> | |
| 127 | - <el-col :span="11"> | |
| 128 | - <el-form-item label="会议时间" prop="conferenceTime"> | |
| 129 | - <el-date-picker size="small" style="width: 100%" | |
| 130 | - v-model="form.conferenceTime" | |
| 131 | - type="datetime" | |
| 132 | - value-format="yyyy-MM-dd HH:mm:ss" | |
| 133 | - placeholder="选择会议时间"> | |
| 134 | - </el-date-picker> | |
| 135 | - </el-form-item> | |
| 136 | - </el-col> | |
| 137 | - <el-col :span="11"> | |
| 138 | - <el-form-item label="会议地点" prop="conferenceSite"> | |
| 139 | - <el-input v-model="form.conferenceSite" placeholder="请输入会议地点"/> | |
| 140 | - </el-form-item> | |
| 141 | - </el-col> | |
| 142 | - </el-row> | |
| 143 | - <el-row :gutter="2"> | |
| 144 | - <el-col :span="22"> | |
| 145 | - <el-form-item label="参会人员" prop="staff"> | |
| 146 | - <el-input type="textarea" v-model="form.staff" placeholder="请输入参会人员" :rows="4"/> | |
| 147 | - </el-form-item> | |
| 148 | - </el-col> | |
| 149 | - </el-row> | |
| 150 | - <el-row :gutter="2"> | |
| 151 | - <el-col :span="22"> | |
| 152 | - <el-form-item label="会议议程" prop="content"> | |
| 153 | - <el-input type="textarea" v-model="form.content" placeholder="请输入会议议程" :rows="4"/> | |
| 154 | - </el-form-item> | |
| 155 | - </el-col> | |
| 156 | - </el-row> | |
| 157 | - <el-row :gutter="2"> | |
| 158 | - <el-col :span="22"> | |
| 159 | - <el-form-item label="会议要求" prop="requirement"> | |
| 160 | - <el-input type="textarea" v-model="form.requirement" placeholder="请输入会议要求" :rows="4"/> | |
| 161 | - </el-form-item> | |
| 162 | - </el-col> | |
| 163 | - </el-row> | |
| 164 | - <el-row :gutter="2"> | |
| 165 | - <el-col :span="11"> | |
| 166 | - <el-form-item prop="fileEntityList" label="附件"> | |
| 167 | - <el-upload | |
| 168 | - ref="upload" | |
| 169 | - action="" | |
| 170 | - accept=".docx,.xlsx,.xls,.ppt,.rar,.zip,.doc,.pdf,.png,.jpeg,.png,.jpg" | |
| 171 | - :on-change="fileChange" | |
| 172 | - :auto-upload="false" | |
| 173 | - :show-file-list="false" | |
| 174 | - multiple | |
| 175 | - :file-list="fileEntityList"> | |
| 176 | - <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 177 | - </el-upload> | |
| 178 | - </el-form-item> | |
| 179 | - </el-col> | |
| 180 | - </el-row> | |
| 181 | - <el-row> | |
| 182 | - <el-table :data="fileEntityList"> | |
| 183 | - <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | |
| 184 | - <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | |
| 185 | - <template slot-scope="scope"> | |
| 186 | - <el-button | |
| 187 | - size="small" type="success" | |
| 188 | - icon="el-icon-download" | |
| 189 | - @click="downloadFA(scope.row)" | |
| 190 | - v-hasPermi="['office:management:edit']" | |
| 191 | - v-if="form.id!=null" | |
| 192 | - round>下载 | |
| 193 | - </el-button> | |
| 194 | - <el-button | |
| 195 | - size="small" type="danger" | |
| 196 | - icon="el-icon-delete" | |
| 197 | - @click="handleDeleteFile(scope.$index)" | |
| 198 | - v-hasPermi="['office:management:remove']" | |
| 199 | - round>删除 | |
| 200 | - </el-button> | |
| 201 | - </template> | |
| 202 | - </el-table-column> | |
| 203 | - </el-table> | |
| 204 | - </el-row> | |
| 205 | - </el-form> | |
| 206 | - <div slot="footer" class="dialog-footer"> | |
| 207 | - <el-button type="primary" @click="submitForm">确 定</el-button> | |
| 208 | - <el-button @click="cancel">取 消</el-button> | |
| 209 | - </div> | |
| 210 | - </el-dialog> | |
| 211 | - <el-dialog :title="title" :visible.sync="openInfo" width="850px" append-to-body :close-on-click-modal="false"> | |
| 212 | - <conferenceInfo :idInfo="idInfo" v-if="openInfo"/> | |
| 213 | - <div slot="footer" class="dialog-footer"> | |
| 214 | - <el-button @click="cancel">取 消</el-button> | |
| 215 | - </div> | |
| 216 | - </el-dialog> | |
| 217 | - </div> | |
| 218 | -</template> | |
| 219 | - | |
| 220 | -<script> | |
| 221 | -import { | |
| 222 | - listConference, | |
| 223 | - getConference, | |
| 224 | - delConference, | |
| 225 | - addConference, | |
| 226 | - updateConference, | |
| 227 | - exportConference | |
| 228 | -} from "@/api/office/conference"; | |
| 229 | -import Editor from '@/components/ZcEditor'; | |
| 230 | -import conferenceInfo from "./conferenceInfo"; | |
| 231 | -import {getDict} from "@/api/dict"; | |
| 232 | - | |
| 233 | -export default { | |
| 234 | - name: "Conference", | |
| 235 | - components: {Editor,conferenceInfo}, | |
| 236 | - data() { | |
| 237 | - return { | |
| 238 | - // 遮罩层 | |
| 239 | - loading: true, | |
| 240 | - // 选中数组 | |
| 241 | - ids: [], | |
| 242 | - // 非单个禁用 | |
| 243 | - single: true, | |
| 244 | - // 非多个禁用 | |
| 245 | - multiple: true, | |
| 246 | - // 显示搜索条件 | |
| 247 | - showSearch: true, | |
| 248 | - // 总条数 | |
| 249 | - total: 0, | |
| 250 | - // 会议管理表格数据 | |
| 251 | - conferenceList: [], | |
| 252 | - // 弹出层标题 | |
| 253 | - title: "", | |
| 254 | - // 是否显示弹出层 | |
| 255 | - open: false, | |
| 256 | - // 查询参数 | |
| 257 | - queryParams: { | |
| 258 | - pageNum: 1, | |
| 259 | - pageSize: 10, | |
| 260 | - conferenceTime: null, | |
| 261 | - conferenceSite: null, | |
| 262 | - deptName: null, | |
| 263 | - staff: null, | |
| 264 | - subject: null, | |
| 265 | - content: null, | |
| 266 | - notify: null, | |
| 267 | - }, | |
| 268 | - // 表单参数 | |
| 269 | - form: { | |
| 270 | - notify:["1"] | |
| 271 | - }, | |
| 272 | - // 表单校验 | |
| 273 | - rules: { | |
| 274 | - conferenceTime: [ | |
| 275 | - {required: true, message: "必填", trigger: "blur"} | |
| 276 | - ], | |
| 277 | - conferenceSite: [ | |
| 278 | - {required: true, message: "必填", trigger: "blur"} | |
| 279 | - ], | |
| 280 | - staff: [ | |
| 281 | - {required: true, message: "必填", trigger: "blur"} | |
| 282 | - ], | |
| 283 | - content: [ | |
| 284 | - {required: true, message: "必填", trigger: "blur"} | |
| 285 | - ], | |
| 286 | - }, | |
| 287 | - fileEntityList: [], | |
| 288 | - openInfo:false, | |
| 289 | - idInfo:null, | |
| 290 | - depts:[] | |
| 291 | - }; | |
| 292 | - }, | |
| 293 | - created() { | |
| 294 | - let dep = {type:"CSUserDepartmentType"}; | |
| 295 | - getDict(dep).then(res=>{ | |
| 296 | - this.depts = res.result; | |
| 297 | - }); | |
| 298 | - this.getList(); | |
| 299 | - }, | |
| 300 | - methods: { | |
| 301 | - /** 查询会议管理列表 */ | |
| 302 | - getList() { | |
| 303 | - this.loading = true; | |
| 304 | - listConference(this.queryParams).then(response => { | |
| 305 | - this.conferenceList = response.rows; | |
| 306 | - this.total = response.total; | |
| 307 | - this.loading = false; | |
| 308 | - }); | |
| 309 | - }, | |
| 310 | - // 取消按钮 | |
| 311 | - cancel() { | |
| 312 | - this.open = false; | |
| 313 | - this.openInfo = false; | |
| 314 | - this.idInfo = null; | |
| 315 | - this.reset(); | |
| 316 | - }, | |
| 317 | - // 表单重置 | |
| 318 | - reset() { | |
| 319 | - this.fileEntityList = []; | |
| 320 | - this.form = { | |
| 321 | - id: null, | |
| 322 | - conferenceTime: null, | |
| 323 | - conferenceSite: null, | |
| 324 | - deptName: null, | |
| 325 | - staff: null, | |
| 326 | - subject: null, | |
| 327 | - content: null, | |
| 328 | - createTime: null, | |
| 329 | - createBy: null, | |
| 330 | - updateTime: null, | |
| 331 | - updateBy: null | |
| 332 | - }; | |
| 333 | - this.resetForm("form"); | |
| 334 | - }, | |
| 335 | - /** 搜索按钮操作 */ | |
| 336 | - handleQuery() { | |
| 337 | - this.queryParams.pageNum = 1; | |
| 338 | - this.getList(); | |
| 339 | - }, | |
| 340 | - /** 重置按钮操作 */ | |
| 341 | - resetQuery() { | |
| 342 | - this.resetForm("queryForm"); | |
| 343 | - this.handleQuery(); | |
| 344 | - }, | |
| 345 | - // 多选框选中数据 | |
| 346 | - handleSelectionChange(selection) { | |
| 347 | - this.ids = selection.map(item => item.id) | |
| 348 | - this.single = selection.length !== 1 | |
| 349 | - this.multiple = !selection.length | |
| 350 | - }, | |
| 351 | - /** 查看按钮操作 */ | |
| 352 | - handleInfo(row){ | |
| 353 | - this.reset(); | |
| 354 | - this.idInfo = row.id+""; | |
| 355 | - this.title = "会议管理详情"; | |
| 356 | - this.openInfo = true; | |
| 357 | - }, | |
| 358 | - /** 新增按钮操作 */ | |
| 359 | - handleAdd() { | |
| 360 | - this.reset(); | |
| 361 | - this.open = true; | |
| 362 | - this.title = "添加会议管理"; | |
| 363 | - }, | |
| 364 | - /** 修改按钮操作 */ | |
| 365 | - handleUpdate(row) { | |
| 366 | - this.reset(); | |
| 367 | - const id = row.id || this.ids | |
| 368 | - getConference(id).then(response => { | |
| 369 | - this.form = response.data.conference; | |
| 370 | - let files = JSON.stringify(response.data.uploadFiles); | |
| 371 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | |
| 372 | - this.open = true; | |
| 373 | - this.title = "修改会议管理"; | |
| 374 | - }); | |
| 375 | - }, | |
| 376 | - /** 提交按钮 */ | |
| 377 | - submitForm() { | |
| 378 | - this.$refs["form"].validate(valid => { | |
| 379 | - if (valid) { | |
| 380 | - let formData = new FormData(); | |
| 381 | - let form = this.form; | |
| 382 | - //去掉params属性 | |
| 383 | - delete form.params; | |
| 384 | - formData.append('fileList', null); | |
| 385 | - //将新增的文件放入formData | |
| 386 | - this.fileEntityList.forEach(item => { | |
| 387 | - if(item.id==null){ | |
| 388 | - formData.append('fileList', item.raw) | |
| 389 | - } | |
| 390 | - }) | |
| 391 | - if (this.form.id != null) { | |
| 392 | - formData.append("conference", JSON.stringify(form)); | |
| 393 | - formData.append("uploadFilesList", null); | |
| 394 | - this.fileEntityList.forEach(item => { | |
| 395 | - delete item.params; | |
| 396 | - if(item != "null" && item != null){ | |
| 397 | - formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); | |
| 398 | - } | |
| 399 | - }) | |
| 400 | - updateConference(formData).then(response => { | |
| 401 | - this.msgSuccess("修改成功"); | |
| 402 | - this.open = false; | |
| 403 | - this.fileEntityList = []; | |
| 404 | - this.getList(); | |
| 405 | - }); | |
| 406 | - } else { | |
| 407 | - for (let key in form) { | |
| 408 | - formData.append(key, form[key] == null ? "" : form[key]) | |
| 409 | - } | |
| 410 | - addConference(formData).then(response => { | |
| 411 | - this.msgSuccess("新增成功"); | |
| 412 | - this.open = false; | |
| 413 | - this.fileEntityList = []; | |
| 414 | - this.getList(); | |
| 415 | - }); | |
| 416 | - } | |
| 417 | - } | |
| 418 | - }); | |
| 419 | - }, | |
| 420 | - /** 删除按钮操作 */ | |
| 421 | - handleDelete(row) { | |
| 422 | - const ids = row.id || this.ids; | |
| 423 | - this.$confirm('是否确认删除会议管理编号为"' + ids + '"的数据项?', "警告", { | |
| 424 | - confirmButtonText: "确定", | |
| 425 | - cancelButtonText: "取消", | |
| 426 | - type: "warning" | |
| 427 | - }).then(function () { | |
| 428 | - return delConference(ids); | |
| 429 | - }).then(() => { | |
| 430 | - this.getList(); | |
| 431 | - this.msgSuccess("删除成功"); | |
| 432 | - }) | |
| 433 | - }, | |
| 434 | - /** 导出按钮操作 */ | |
| 435 | - handleExport() { | |
| 436 | - const queryParams = this.queryParams; | |
| 437 | - this.$confirm('是否确认导出所有会议管理数据项?', "警告", { | |
| 438 | - confirmButtonText: "确定", | |
| 439 | - cancelButtonText: "取消", | |
| 440 | - type: "warning" | |
| 441 | - }).then(function () { | |
| 442 | - return exportConference(queryParams); | |
| 443 | - }).then(response => { | |
| 444 | - this.download(response.message); | |
| 445 | - }) | |
| 446 | - }, | |
| 447 | - /** | |
| 448 | - * 文件改变时,限制文件上传格式和大小 | |
| 449 | - * 文件格式只能为docx/xlsx/xls/ppt/rar/zip/doc/pdf/png/jpeg/png/jpg | |
| 450 | - * 大小不超过5M | |
| 451 | - * */ | |
| 452 | - fileChange(file, fileList) { | |
| 453 | - let count = 0; | |
| 454 | - for (let i = 0; i < fileList.length; i++) { | |
| 455 | - // console.log(fileList.length) | |
| 456 | - // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 457 | - if (fileList[i].name == file.name) { | |
| 458 | - count++; | |
| 459 | - if (count == 2) { | |
| 460 | - this.$message({ | |
| 461 | - message: '已存在此文件!', | |
| 462 | - type: 'warning' | |
| 463 | - }); | |
| 464 | - for (let j = fileList.length; j > 0; j--) { | |
| 465 | - //如果存在此文件,去除新选择的重复文件 | |
| 466 | - if (fileList[j - 1].name == file.name) { | |
| 467 | - fileList.splice(j - 1, 1); | |
| 468 | - i--; | |
| 469 | - return false; | |
| 470 | - } | |
| 471 | - } | |
| 472 | - } | |
| 473 | - } | |
| 474 | - } | |
| 475 | - let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 476 | - //格式符合后判断大小 | |
| 477 | - if ("docx,xlsx,xls,ppt,rar,zip,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) { | |
| 478 | - let max5M = file.size / 1024 / 1024 < 5; | |
| 479 | - if (!max5M) { | |
| 480 | - this.$message({ | |
| 481 | - message: '上传文件大小不得超过5M!', | |
| 482 | - type: 'warning' | |
| 483 | - }); | |
| 484 | - } else { | |
| 485 | - //符合条件后进行添加 | |
| 486 | - this.fileEntityList = fileList | |
| 487 | - } | |
| 488 | - } else { | |
| 489 | - this.$message({ | |
| 490 | - message: '上传文件只能是 docx、xlsx、xls、ppt、rar、zip、doc、pdf、png、jpeg、png、jpg格式!', | |
| 491 | - type: 'warning' | |
| 492 | - }); | |
| 493 | - } | |
| 494 | - }, | |
| 495 | - // 删除文件 | |
| 496 | - handleDeleteFile(index) { | |
| 497 | - this.fileEntityList.splice(index, 1); | |
| 498 | - }, | |
| 499 | - /** 文件下载 */ | |
| 500 | - downloadFA(row) { | |
| 501 | - let name = row.name; | |
| 502 | - let url = row.url; | |
| 503 | - const a = document.createElement('a') | |
| 504 | - a.setAttribute('download', name) | |
| 505 | - a.setAttribute('target', '_blank') | |
| 506 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | |
| 507 | - a.click() | |
| 508 | - } | |
| 509 | - } | |
| 510 | -}; | |
| 511 | -</script> |
trash-ui/src/views/h5/office/handle/handleInfo.vue deleted
100644 → 0
| 1 | -<template> | |
| 2 | - <el-form ref="form" :model="form" label-width="110px"> | |
| 3 | - <el-form-item label="办文办事类型" prop="type"> | |
| 4 | - <el-select v-model="form.type" placeholder="请选择办文办事类型" style="width: 100%" :disabled="true"> | |
| 5 | - <el-option label="传阅学习类" value="0"/> | |
| 6 | - <el-option label="公文批办类" value="1"/> | |
| 7 | - <el-option label="热线举报类" value="2"/> | |
| 8 | - <el-option label="上级信访类" value="3"/> | |
| 9 | - <el-option label="现场信访类" value="4"/> | |
| 10 | - </el-select> | |
| 11 | - </el-form-item> | |
| 12 | - <!-- 公文类 --> | |
| 13 | - <el-form-item label="来文单位" prop="company" v-if="form.type==0 || form.type==1"> | |
| 14 | - <el-input v-model="form.company" placeholder="请输入来文单位" :disabled="true"/> | |
| 15 | - </el-form-item> | |
| 16 | - <el-form-item label="收文时间" prop="receiveTime" v-if="form.type==0 || form.type==1"> | |
| 17 | - <el-date-picker size="small" style="width: 100%" | |
| 18 | - v-model="form.receiveTime" | |
| 19 | - type="datetime" | |
| 20 | - :disabled="true" | |
| 21 | - value-format="yyyy-MM-dd HH:mm:ss" | |
| 22 | - placeholder="选择收文时间"> | |
| 23 | - </el-date-picker> | |
| 24 | - </el-form-item> | |
| 25 | - <el-form-item label="文件标题" prop="title" v-if="form.type==0 || form.type==1"> | |
| 26 | - <el-input v-model="form.title" placeholder="请输入文件标题" :disabled="true"/> | |
| 27 | - </el-form-item> | |
| 28 | - <!-- 信访类 --> | |
| 29 | - <el-form-item label="信访单位(人)" prop="sendPerson" v-if="form.type==2 || form.type==3|| form.type==4"> | |
| 30 | - <el-input v-model="form.sendPerson" placeholder="请输入信访单位(人)" :disabled="true"/> | |
| 31 | - </el-form-item> | |
| 32 | - <el-form-item label="信访日期" prop="sendDate" v-if="form.type==2 || form.type==3|| form.type==4"> | |
| 33 | - <el-date-picker size="small" style="width: 100%" | |
| 34 | - v-model="form.sendDate" | |
| 35 | - type="date" | |
| 36 | - :disabled="true" | |
| 37 | - value-format="yyyy-MM-dd" | |
| 38 | - placeholder="选择信访日期"> | |
| 39 | - </el-date-picker> | |
| 40 | - </el-form-item> | |
| 41 | - <el-form-item label="诉求" prop="appeal" v-if="form.type==2 || form.type==3|| form.type==4"> | |
| 42 | - <el-input v-model="form.appeal" type="textarea" placeholder="请输入内容" :rows="6" :disabled="true"/> | |
| 43 | - </el-form-item> | |
| 44 | - <el-form-item label="信访部门" prop="deptName" | |
| 45 | - v-if="((form.type==4 || form.type==2) && controlId=='FormProperty_214hj4h') || | |
| 46 | - (form.type==3 && controlId=='FormProperty_2vu2250') || | |
| 47 | - (form.deptName!=null && form.type!=1)"> | |
| 48 | - <el-select ref="formDeptNameRef" v-model="form.deptId" placeholder="请选择信访部门" style="width: 100%" | |
| 49 | - :disabled="controlId!='FormProperty_2vu2250' && controlId!='FormProperty_214hj4h'"> | |
| 50 | - <el-option v-for="item in depts" :label="item.name" :value="item.code" :key="item.code"/> | |
| 51 | - </el-select> | |
| 52 | - </el-form-item> | |
| 53 | - <el-form-item label="意见" prop="appeal" | |
| 54 | - v-if="((form.type==4 || form.type==2) && controlId=='FormProperty_0orjdou') || (form.type==3 && controlId=='FormProperty_05v7lct') || form.opinion!=null"> | |
| 55 | - <el-input type="textarea" v-model="form.opinion" :rows="4" | |
| 56 | - :disabled="controlId!='FormProperty_0orjdou' && controlId!='FormProperty_05v7lct'"/> | |
| 57 | - </el-form-item> | |
| 58 | - <el-form-item label="推送对象" v-if="controlId=='FormProperty_0aq22i0'"> | |
| 59 | - <el-radio-group v-model="form.sendObject" :disabled="controlId!='FormProperty_0aq22i0'"> | |
| 60 | - <el-radio :label="0">中心负责人</el-radio> | |
| 61 | - <el-radio :label="1">分管领导</el-radio> | |
| 62 | - </el-radio-group> | |
| 63 | - </el-form-item> | |
| 64 | - <el-form-item label="处理部门" prop="deptName" v-if="controlId=='FormProperty_11p96vq' || (businessKey=='gongwenchuli'&&form.type==1)"> | |
| 65 | - <el-select ref="formDeptNameRef" v-model="form.deptId" placeholder="请选择处理部门" style="width: 100%" | |
| 66 | - :disabled="controlId!='FormProperty_11p96vq'"> | |
| 67 | - <el-option v-for="item in depts" :label="item.name" :value="item.code" :key="item.code"/> | |
| 68 | - </el-select> | |
| 69 | - </el-form-item> | |
| 70 | - <el-form-item label="办理意见" prop="opinion" v-if="controlId=='FormProperty_11p96vq'"> | |
| 71 | - <el-input type="textarea" v-model="opinion" :rows="4" :disabled="controlId!='FormProperty_11p96vq'"/> | |
| 72 | - </el-form-item> | |
| 73 | - <el-form-item label="办理意见" prop="opinion" | |
| 74 | - v-if="form.type==1 && controlId!='FormProperty_11p96vq' && businessKey=='gongwenchuli'"> | |
| 75 | - <el-input type="textarea" v-model="opinion1" :rows="4" :disabled="true"/> | |
| 76 | - </el-form-item> | |
| 77 | - <el-form-item label="回复意见" prop="opinion" v-if="controlId=='FormProperty_2jvcgq8'"> | |
| 78 | - <el-input type="textarea" v-model="opinion" :rows="4" :disabled="controlId!='FormProperty_2jvcgq8'"/> | |
| 79 | - </el-form-item> | |
| 80 | - <el-form-item label="回复意见" prop="opinion" | |
| 81 | - v-if="form.type==1 && controlId!='FormProperty_2jvcgq8' && businessKey=='gongwenchuli' && controlId!='FormProperty_11p96vq'"> | |
| 82 | - <el-input type="textarea" v-model="opinion2" :rows="4" :disabled="true"/> | |
| 83 | - </el-form-item> | |
| 84 | - <el-form-item label="阅览人" prop="userNames" | |
| 85 | - v-if="form.type==0 && businessKey=='yuelanxuexi1'"> | |
| 86 | - <el-input v-model="form.userNames" :disabled="true"/> | |
| 87 | - </el-form-item> | |
| 88 | - <el-form-item label="已阅览人" prop="userNamesDone" | |
| 89 | - v-if="form.type==0 && businessKey=='yuelanxuexi1'"> | |
| 90 | - <el-input v-model="form.userNamesDone" :disabled="true"/> | |
| 91 | - </el-form-item> | |
| 92 | - <el-row> | |
| 93 | - <el-table :data="fileEntityList"> | |
| 94 | - <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | |
| 95 | - <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | |
| 96 | - <template slot-scope="scope"> | |
| 97 | - <el-button | |
| 98 | - size="small" type="success" | |
| 99 | - icon="el-icon-download" | |
| 100 | - @click="downloadFA(scope.row)" | |
| 101 | - v-hasPermi="['office:management:edit']" | |
| 102 | - v-if="form.id!=null" | |
| 103 | - round>下载 | |
| 104 | - </el-button> | |
| 105 | - </template> | |
| 106 | - </el-table-column> | |
| 107 | - </el-table> | |
| 108 | - </el-row> | |
| 109 | - </el-form> | |
| 110 | -</template> | |
| 111 | - | |
| 112 | -<script> | |
| 113 | -import {getHandle} from "@/api/office/handle"; | |
| 114 | -import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess"; | |
| 115 | - | |
| 116 | -export default { | |
| 117 | - name: "handleInfo", | |
| 118 | - props: { | |
| 119 | - businessKey: { | |
| 120 | - type: String | |
| 121 | - }, | |
| 122 | - idInfo: { | |
| 123 | - type: String | |
| 124 | - }, | |
| 125 | - depts: { | |
| 126 | - type: Array | |
| 127 | - }, | |
| 128 | - controlId: { | |
| 129 | - type: String | |
| 130 | - } | |
| 131 | - | |
| 132 | - }, | |
| 133 | - data() { | |
| 134 | - return { | |
| 135 | - form: {}, | |
| 136 | - fileEntityList: [], | |
| 137 | - opinion: null, | |
| 138 | - opinion1: null, | |
| 139 | - opinion2: null, | |
| 140 | - } | |
| 141 | - }, | |
| 142 | - created() { | |
| 143 | - this.init(); | |
| 144 | - }, | |
| 145 | - methods: { | |
| 146 | - init() { | |
| 147 | - getHandle(this.idInfo).then(response => { | |
| 148 | - this.form = response.data.handleAffairs; | |
| 149 | - let files = JSON.stringify(response.data.uploadFiles); | |
| 150 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")); | |
| 151 | - }); | |
| 152 | - listReplyApprovalProcess({tableName: 'handle_affairs', tableId: this.idInfo}).then(response => { | |
| 153 | - if(response.rows.length>0){ | |
| 154 | - this.opinion1 = response.rows[0].reply; | |
| 155 | - this.opinion2 = response.rows[1].reply; | |
| 156 | - } | |
| 157 | - }); | |
| 158 | - | |
| 159 | - }, | |
| 160 | - /** 文件下载 */ | |
| 161 | - downloadFA(row) { | |
| 162 | - let name = row.name; | |
| 163 | - let url = row.url; | |
| 164 | - const a = document.createElement('a') | |
| 165 | - a.setAttribute('download', name) | |
| 166 | - a.setAttribute('target', '_blank') | |
| 167 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | |
| 168 | - a.click() | |
| 169 | - }, | |
| 170 | - } | |
| 171 | -} | |
| 172 | -</script> | |
| 173 | - | |
| 174 | -<style scoped> | |
| 175 | - | |
| 176 | -</style> |
trash-ui/src/views/h5/office/handle/index.vue deleted
100644 → 0
| 1 | -<template> | |
| 2 | - <div class="app-container"> | |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="108px"> | |
| 4 | - <el-form-item label="办文办事类型" prop="type"> | |
| 5 | - <el-select v-model="queryParams.type" placeholder="请选择办文办事类型" size="small"> | |
| 6 | - <el-option label="全部" value=""/> | |
| 7 | - <el-option label="传阅学习类" value="0" /> | |
| 8 | - <el-option label="公文批办类" value="1" /> | |
| 9 | - <el-option label="热线举报类" value="2" /> | |
| 10 | - <el-option label="上级信访类" value="3" /> | |
| 11 | - <el-option label="现场信访类" value="4" /> | |
| 12 | - </el-select> | |
| 13 | - </el-form-item> | |
| 14 | - <el-form-item label="来文单位" prop="company"> | |
| 15 | - <el-input | |
| 16 | - v-model="queryParams.company" | |
| 17 | - placeholder="请输入来文单位" | |
| 18 | - | |
| 19 | - size="small" | |
| 20 | - | |
| 21 | - /> | |
| 22 | - </el-form-item> | |
| 23 | - <el-form-item label="收文时间" prop="receiveTime"> | |
| 24 | - <el-date-picker size="small" style="width: 200px" | |
| 25 | - v-model="queryParams.receiveTime" | |
| 26 | - type="date" | |
| 27 | - value-format="yyyy-MM-dd" | |
| 28 | - placeholder="选择收文时间"> | |
| 29 | - </el-date-picker> | |
| 30 | - </el-form-item> | |
| 31 | - <el-form-item label="文件标题" prop="title"> | |
| 32 | - <el-input | |
| 33 | - v-model="queryParams.title" | |
| 34 | - placeholder="请输入文件标题" | |
| 35 | - clearable | |
| 36 | - size="small" | |
| 37 | - | |
| 38 | - /> | |
| 39 | - </el-form-item> | |
| 40 | - <el-form-item label="信访单位(人)" prop="sendPerson"> | |
| 41 | - <el-input | |
| 42 | - v-model="queryParams.sendPerson" | |
| 43 | - placeholder="请输入信访单位(人)" | |
| 44 | - | |
| 45 | - size="small" | |
| 46 | - | |
| 47 | - /> | |
| 48 | - </el-form-item> | |
| 49 | - <el-form-item label="信访日期" prop="sendDate"> | |
| 50 | - <el-date-picker size="small" style="width: 200px" | |
| 51 | - v-model="queryParams.sendDate" | |
| 52 | - type="date" | |
| 53 | - value-format="yyyy-MM-dd" | |
| 54 | - placeholder="选择收文时间"> | |
| 55 | - </el-date-picker> | |
| 56 | - </el-form-item> | |
| 57 | - <el-form-item> | |
| 58 | - <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |
| 59 | - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |
| 60 | - </el-form-item> | |
| 61 | - </el-form> | |
| 62 | - | |
| 63 | - <el-row :gutter="10" class="mb8"> | |
| 64 | - <el-col :span="1.5"> | |
| 65 | - <el-button | |
| 66 | - type="primary" | |
| 67 | - icon="el-icon-plus" | |
| 68 | - size="mini" | |
| 69 | - @click="handleAdd" | |
| 70 | - v-hasPermi="['office:handle:add']" | |
| 71 | - >新增</el-button> | |
| 72 | - </el-col> | |
| 73 | -<!-- <el-col :span="1.5">--> | |
| 74 | -<!-- <el-button--> | |
| 75 | -<!-- type="success"--> | |
| 76 | -<!-- icon="el-icon-edit"--> | |
| 77 | -<!-- size="mini"--> | |
| 78 | -<!-- :disabled="single"--> | |
| 79 | -<!-- @click="handleUpdate"--> | |
| 80 | -<!-- v-hasPermi="['office:handle:edit']"--> | |
| 81 | -<!-- >修改</el-button>--> | |
| 82 | -<!-- </el-col>--> | |
| 83 | -<!-- <el-col :span="1.5">--> | |
| 84 | -<!-- <el-button--> | |
| 85 | -<!-- type="danger"--> | |
| 86 | -<!-- icon="el-icon-delete"--> | |
| 87 | -<!-- size="mini"--> | |
| 88 | -<!-- :disabled="multiple"--> | |
| 89 | -<!-- @click="handleDelete"--> | |
| 90 | -<!-- v-hasPermi="['office:handle:remove']"--> | |
| 91 | -<!-- >删除</el-button>--> | |
| 92 | -<!-- </el-col>--> | |
| 93 | - <el-col :span="1.5"> | |
| 94 | - <el-button | |
| 95 | - type="warning" | |
| 96 | - icon="el-icon-download" | |
| 97 | - size="mini" | |
| 98 | - @click="handleExport" | |
| 99 | - v-hasPermi="['office:handle:export']" | |
| 100 | - >导出</el-button> | |
| 101 | - </el-col> | |
| 102 | - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 103 | - </el-row> | |
| 104 | - | |
| 105 | - <el-table v-loading="loading" :data="handleList" @selection-change="handleSelectionChange"> | |
| 106 | - <el-table-column type="selection" width="55" align="center" /> | |
| 107 | - <el-table-column label="办文办事类型" align="center" prop="type" > | |
| 108 | - <template slot-scope="scope"> | |
| 109 | - <span>{{ typeOfName(scope.row.type) }}</span> | |
| 110 | - </template> | |
| 111 | - </el-table-column> | |
| 112 | - <el-table-column label="公文类" align="center"> | |
| 113 | - <el-table-column label="来文单位" align="center" prop="company" /> | |
| 114 | - <el-table-column label="收文时间" align="center" prop="receiveTime" width="180"> | |
| 115 | - <template slot-scope="scope"> | |
| 116 | - <span>{{ parseTime(scope.row.receiveTime, '{y}-{m}-{d}') }}</span> | |
| 117 | - </template> | |
| 118 | - </el-table-column> | |
| 119 | - <el-table-column label="文件标题" align="center" prop="title" /> | |
| 120 | - </el-table-column> | |
| 121 | - <el-table-column label="信访类" align="center"> | |
| 122 | - <el-table-column label="信访单位(人)" align="center" prop="sendPerson" /> | |
| 123 | - <el-table-column label="信访日期" align="center" prop="sendDate" /> | |
| 124 | - <el-table-column label="诉求" align="center" prop="appeal" /> | |
| 125 | - </el-table-column> | |
| 126 | - <el-table-column label="审批状态" align="center" prop="status"> | |
| 127 | - <template slot-scope="scope"> | |
| 128 | - <span>{{parseStatusz(scope.row.status)}}</span> | |
| 129 | - </template> | |
| 130 | - </el-table-column> | |
| 131 | - <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |
| 132 | - <template slot-scope="scope"> | |
| 133 | - <el-button | |
| 134 | - size="mini" | |
| 135 | - type="text" | |
| 136 | - icon="el-icon-view" | |
| 137 | - @click="handleInfo(scope.row)" | |
| 138 | - v-hasPermi="['office:handle:edit']" | |
| 139 | - >详情</el-button> | |
| 140 | - <el-button | |
| 141 | - size="mini" | |
| 142 | - type="text" | |
| 143 | - icon="el-icon-edit" | |
| 144 | - @click="handleUpdate(scope.row)" | |
| 145 | - v-if="scope.row.status==2" | |
| 146 | - v-hasPermi="['office:handle:edit']" | |
| 147 | - >修改</el-button> | |
| 148 | -<!-- <el-button--> | |
| 149 | -<!-- size="mini"--> | |
| 150 | -<!-- type="text"--> | |
| 151 | -<!-- icon="el-icon-delete"--> | |
| 152 | -<!-- @click="handleDelete(scope.row)"--> | |
| 153 | -<!-- v-hasPermi="['office:handle:remove']"--> | |
| 154 | -<!-- >删除</el-button>--> | |
| 155 | - </template> | |
| 156 | - </el-table-column> | |
| 157 | - </el-table> | |
| 158 | - | |
| 159 | - <pagination | |
| 160 | - v-show="total>0" | |
| 161 | - :total="total" | |
| 162 | - :page.sync="queryParams.pageNum" | |
| 163 | - :limit.sync="queryParams.pageSize" | |
| 164 | - @pagination="getList" | |
| 165 | - /> | |
| 166 | - | |
| 167 | - <!-- 添加或修改办文办事对话框 --> | |
| 168 | - <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> | |
| 169 | - <el-form ref="form" :model="form" :rules="rules" label-width="110px"> | |
| 170 | - <el-form-item label="办文办事类型" prop="type"> | |
| 171 | - <el-select v-model="form.type" placeholder="请选择办文办事类型" style="width: 100%" @change="changeType()"> | |
| 172 | - <el-option label="传阅学习类" value="0" /> | |
| 173 | - <el-option label="公文批办类" value="1" /> | |
| 174 | - <el-option label="热线举报类" value="2" /> | |
| 175 | - <el-option label="上级信访类" value="3" /> | |
| 176 | - <el-option label="现场信访类" value="4" /> | |
| 177 | - </el-select> | |
| 178 | - </el-form-item> | |
| 179 | - <!-- 公文类 --> | |
| 180 | - <el-form-item label="来文单位" prop="company" v-if="form.type==0 || form.type==1"> | |
| 181 | - <el-input v-model="form.company" placeholder="请输入来文单位" /> | |
| 182 | - </el-form-item> | |
| 183 | - <el-form-item label="收文时间" prop="receiveTime" v-if="form.type==0 || form.type==1"> | |
| 184 | - <el-date-picker size="small" style="width: 100%" | |
| 185 | - v-model="form.receiveTime" | |
| 186 | - type="datetime" | |
| 187 | - value-format="yyyy-MM-dd HH:mm:ss" | |
| 188 | - placeholder="选择收文时间"> | |
| 189 | - </el-date-picker> | |
| 190 | - </el-form-item> | |
| 191 | - <el-form-item label="文件标题" prop="title" v-if="form.type==0 || form.type==1"> | |
| 192 | - <el-input v-model="form.title" placeholder="请输入文件标题" /> | |
| 193 | - </el-form-item> | |
| 194 | - <!-- 信访类 --> | |
| 195 | - <el-form-item label="信访单位(人)" prop="sendPerson" v-if="form.type==2 || form.type==3|| form.type==4"> | |
| 196 | - <el-input v-model="form.sendPerson" placeholder="请输入信访单位(人)" /> | |
| 197 | - </el-form-item> | |
| 198 | - <el-form-item label="信访日期" prop="sendDate" v-if="form.type==2 || form.type==3|| form.type==4"> | |
| 199 | - <el-date-picker size="small" style="width: 100%" | |
| 200 | - v-model="form.sendDate" | |
| 201 | - type="date" | |
| 202 | - value-format="yyyy-MM-dd" | |
| 203 | - placeholder="选择信访日期"> | |
| 204 | - </el-date-picker> | |
| 205 | - </el-form-item> | |
| 206 | - <el-form-item label="诉求" prop="appeal" v-if="form.type==2 || form.type==3|| form.type==4"> | |
| 207 | - <el-input v-model="form.appeal" type="textarea" placeholder="请输入内容" :rows="6"/> | |
| 208 | - </el-form-item> | |
| 209 | - <!-- 意见处 --> | |
| 210 | -<!-- <el-form-item label="办理意见" prop="opinion">--> | |
| 211 | -<!-- <el-input v-model="form.opinion" placeholder="请输入办理意见" />--> | |
| 212 | -<!-- </el-form-item>--> | |
| 213 | -<!-- <el-form-item label="相关部门意见" prop="deptOpinion">--> | |
| 214 | -<!-- <el-input v-model="form.deptOpinion" placeholder="请输入相关部门意见" />--> | |
| 215 | -<!-- </el-form-item>--> | |
| 216 | - <el-row> | |
| 217 | - <el-col> | |
| 218 | - <el-form-item prop="fileEntityList" label="附件"> | |
| 219 | - <el-upload | |
| 220 | - ref="upload" | |
| 221 | - action="" | |
| 222 | - accept=".docx,.xlsx,.xls,.ppt,.rar,.zip,.doc,.pdf,.png,.jpeg,.png,.jpg" | |
| 223 | - :on-change="fileChange" | |
| 224 | - :auto-upload="false" | |
| 225 | - :show-file-list="false" | |
| 226 | - multiple | |
| 227 | - :file-list="fileEntityList"> | |
| 228 | - <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 229 | - </el-upload> | |
| 230 | - </el-form-item> | |
| 231 | - </el-col> | |
| 232 | - </el-row> | |
| 233 | - <el-row> | |
| 234 | - <el-table :data="fileEntityList"> | |
| 235 | - <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | |
| 236 | - <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | |
| 237 | - <template slot-scope="scope"> | |
| 238 | - <el-button | |
| 239 | - size="small" type="success" | |
| 240 | - icon="el-icon-download" | |
| 241 | - @click="downloadFA(scope.row)" | |
| 242 | - v-hasPermi="['office:management:edit']" | |
| 243 | - v-if="form.id!=null" | |
| 244 | - round>下载 | |
| 245 | - </el-button> | |
| 246 | - <el-button | |
| 247 | - size="small" type="danger" | |
| 248 | - icon="el-icon-delete" | |
| 249 | - @click="handleDeleteFile(scope.$index)" | |
| 250 | - v-hasPermi="['office:management:remove']" | |
| 251 | - round>删除 | |
| 252 | - </el-button> | |
| 253 | - </template> | |
| 254 | - </el-table-column> | |
| 255 | - </el-table> | |
| 256 | - </el-row> | |
| 257 | - </el-form> | |
| 258 | - <div slot="footer" class="dialog-footer"> | |
| 259 | - <el-button type="primary" @click="submitForm">确 定</el-button> | |
| 260 | - <el-button @click="cancel">取 消</el-button> | |
| 261 | - </div> | |
| 262 | - </el-dialog> | |
| 263 | - <el-dialog :title="title" :visible.sync="openInfo" width="600px" append-to-body> | |
| 264 | - <handleInfo :idInfo="idInfo" v-if="openInfo" :businessKey="businessKey" :depts="depts"/> | |
| 265 | - <div slot="footer" class="dialog-footer"> | |
| 266 | - <el-button @click="cancel">取 消</el-button> | |
| 267 | - </div> | |
| 268 | - </el-dialog> | |
| 269 | - </div> | |
| 270 | -</template> | |
| 271 | - | |
| 272 | -<script> | |
| 273 | -import { listHandle, getHandle, delHandle, addHandle, updateHandle, exportHandle } from "@/api/office/handle"; | |
| 274 | -import handleInfo from "./handleInfo"; | |
| 275 | -import {getDict} from "@/api/dict"; | |
| 276 | -export default { | |
| 277 | - name: "Handle", | |
| 278 | - components: { handleInfo }, | |
| 279 | - data() { | |
| 280 | - return { | |
| 281 | - // 遮罩层 | |
| 282 | - loading: true, | |
| 283 | - // 选中数组 | |
| 284 | - ids: [], | |
| 285 | - // 非单个禁用 | |
| 286 | - single: true, | |
| 287 | - // 非多个禁用 | |
| 288 | - multiple: true, | |
| 289 | - // 显示搜索条件 | |
| 290 | - showSearch: true, | |
| 291 | - // 总条数 | |
| 292 | - total: 0, | |
| 293 | - // 办文办事表格数据 | |
| 294 | - handleList: [], | |
| 295 | - // 弹出层标题 | |
| 296 | - title: "", | |
| 297 | - // 是否显示弹出层 | |
| 298 | - open: false, | |
| 299 | - // 查询参数 | |
| 300 | - queryParams: { | |
| 301 | - pageNum: 1, | |
| 302 | - pageSize: 10, | |
| 303 | - company: null, | |
| 304 | - receiveTime: null, | |
| 305 | - title: null, | |
| 306 | - type: null, | |
| 307 | - sendPerson: null, | |
| 308 | - sendDate:null, | |
| 309 | - }, | |
| 310 | - // 表单参数 | |
| 311 | - form: {}, | |
| 312 | - // 表单校验 | |
| 313 | - rules: { | |
| 314 | - company: [ | |
| 315 | - {required: true, message: "必填", trigger: "blur"} | |
| 316 | - ], | |
| 317 | - receiveTime: [ | |
| 318 | - {required: true, message: "必填", trigger: "blur"} | |
| 319 | - ], | |
| 320 | - title: [ | |
| 321 | - {required: true, message: "必填", trigger: "blur"} | |
| 322 | - ], | |
| 323 | - appeal: [ | |
| 324 | - {required: true, message: "必填", trigger: "blur"} | |
| 325 | - ], | |
| 326 | - sendPerson: [ | |
| 327 | - {required: true, message: "必填", trigger: "blur"} | |
| 328 | - ], | |
| 329 | - sendDate: [ | |
| 330 | - {required: true, message: "必填", trigger: "blur"} | |
| 331 | - ], | |
| 332 | - }, | |
| 333 | - fileEntityList: [], | |
| 334 | - idInfo: null, | |
| 335 | - openInfo: false, | |
| 336 | - businessKey:null, | |
| 337 | - depts:[], | |
| 338 | - }; | |
| 339 | - }, | |
| 340 | - created() { | |
| 341 | - let dep = {type:"CSUserDepartmentType"}; | |
| 342 | - getDict(dep).then(res=>{ | |
| 343 | - this.depts = res.result; | |
| 344 | - }); | |
| 345 | - this.getList(); | |
| 346 | - }, | |
| 347 | - methods: { | |
| 348 | - /** 查询办文办事列表 */ | |
| 349 | - getList() { | |
| 350 | - this.loading = true; | |
| 351 | - listHandle(this.queryParams).then(response => { | |
| 352 | - this.handleList = response.rows; | |
| 353 | - this.total = response.total; | |
| 354 | - this.loading = false; | |
| 355 | - }); | |
| 356 | - }, | |
| 357 | - // 取消按钮 | |
| 358 | - cancel() { | |
| 359 | - this.open = false; | |
| 360 | - this.openInfo = false; | |
| 361 | - this.businessKey = null; | |
| 362 | - this.reset(); | |
| 363 | - }, | |
| 364 | - // 表单重置 | |
| 365 | - reset() { | |
| 366 | - this.form = { | |
| 367 | - id: null, | |
| 368 | - company: null, | |
| 369 | - receiveTime: null, | |
| 370 | - title: null, | |
| 371 | - type: null, | |
| 372 | - appeal: null, | |
| 373 | - sendPerson: null, | |
| 374 | - sendDate: null, | |
| 375 | - isRead: null, | |
| 376 | - opinion: null, | |
| 377 | - deptOpinion: null, | |
| 378 | - }; | |
| 379 | - this.fileEntityList = []; | |
| 380 | - this.resetForm("form"); | |
| 381 | - }, | |
| 382 | - /** 搜索按钮操作 */ | |
| 383 | - handleQuery() { | |
| 384 | - this.queryParams.pageNum = 1; | |
| 385 | - this.getList(); | |
| 386 | - }, | |
| 387 | - /** 重置按钮操作 */ | |
| 388 | - resetQuery() { | |
| 389 | - this.resetForm("queryForm"); | |
| 390 | - this.handleQuery(); | |
| 391 | - }, | |
| 392 | - // 多选框选中数据 | |
| 393 | - handleSelectionChange(selection) { | |
| 394 | - this.ids = selection.map(item => item.id) | |
| 395 | - this.single = selection.length!==1 | |
| 396 | - this.multiple = !selection.length | |
| 397 | - }, | |
| 398 | - /** 新增按钮操作 */ | |
| 399 | - handleAdd() { | |
| 400 | - this.reset(); | |
| 401 | - this.open = true; | |
| 402 | - this.title = "添加办文办事"; | |
| 403 | - }, | |
| 404 | - /** 查看详情 */ | |
| 405 | - handleInfo(row){ | |
| 406 | - this.idInfo = row.id+""; | |
| 407 | - this.openInfo = true; | |
| 408 | - this.title = "办文办事详情"; | |
| 409 | - | |
| 410 | - console.log(row.type); | |
| 411 | - if(row.type==0){ | |
| 412 | - this.businessKey = 'yuelanxuexi1'; | |
| 413 | - }else if(row.type==1){ | |
| 414 | - this.businessKey = 'gongwenchuli'; | |
| 415 | - } | |
| 416 | - }, | |
| 417 | - /** 修改按钮操作 */ | |
| 418 | - handleUpdate(row) { | |
| 419 | - this.reset(); | |
| 420 | - const id = row.id || this.ids | |
| 421 | - getHandle(id).then(response => { | |
| 422 | - this.form = response.data.handleAffairs; | |
| 423 | - let files = JSON.stringify(response.data.uploadFiles); | |
| 424 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | |
| 425 | - this.open = true; | |
| 426 | - this.title = "修改办文办事"; | |
| 427 | - }); | |
| 428 | - }, | |
| 429 | - /** 提交按钮 */ | |
| 430 | - submitForm() { | |
| 431 | - this.$refs["form"].validate(valid => { | |
| 432 | - if (valid) { | |
| 433 | - let formData = new FormData(); | |
| 434 | - let form = this.form; | |
| 435 | - //去掉params属性 | |
| 436 | - delete form.params; | |
| 437 | - formData.append('fileList', null); | |
| 438 | - //将新增的文件放入formData | |
| 439 | - this.fileEntityList.forEach(item => { | |
| 440 | - if(item.id==null){ | |
| 441 | - formData.append('fileList', item.raw) | |
| 442 | - } | |
| 443 | - }) | |
| 444 | - if (this.form.id != null) { | |
| 445 | - formData.append("handleAffairs", JSON.stringify(form)); | |
| 446 | - formData.append("uploadFilesList", null); | |
| 447 | - this.fileEntityList.forEach(item => { | |
| 448 | - delete item.params; | |
| 449 | - if(item != "null" && item != null){ | |
| 450 | - formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); | |
| 451 | - } | |
| 452 | - }) | |
| 453 | - updateHandle(formData).then(response => { | |
| 454 | - this.msgSuccess("修改成功"); | |
| 455 | - this.open = false; | |
| 456 | - this.getList(); | |
| 457 | - }); | |
| 458 | - } else { | |
| 459 | - for (let key in form) { | |
| 460 | - formData.append(key, form[key] == null ? "" : form[key]) | |
| 461 | - } | |
| 462 | - addHandle(formData).then(response => { | |
| 463 | - this.msgSuccess("新增成功"); | |
| 464 | - this.open = false; | |
| 465 | - this.getList(); | |
| 466 | - }); | |
| 467 | - } | |
| 468 | - } | |
| 469 | - }); | |
| 470 | - }, | |
| 471 | - /** 删除按钮操作 */ | |
| 472 | - handleDelete(row) { | |
| 473 | - const ids = row.id || this.ids; | |
| 474 | - this.$confirm('是否确认删除办文办事编号为"' + ids + '"的数据项?', "警告", { | |
| 475 | - confirmButtonText: "确定", | |
| 476 | - cancelButtonText: "取消", | |
| 477 | - type: "warning" | |
| 478 | - }).then(function() { | |
| 479 | - return delHandle(ids); | |
| 480 | - }).then(() => { | |
| 481 | - this.getList(); | |
| 482 | - this.msgSuccess("删除成功"); | |
| 483 | - }) | |
| 484 | - }, | |
| 485 | - /** 导出按钮操作 */ | |
| 486 | - handleExport() { | |
| 487 | - const queryParams = this.queryParams; | |
| 488 | - this.$confirm('是否确认导出所有办文办事数据项?', "警告", { | |
| 489 | - confirmButtonText: "确定", | |
| 490 | - cancelButtonText: "取消", | |
| 491 | - type: "warning" | |
| 492 | - }).then(function() { | |
| 493 | - return exportHandle(queryParams); | |
| 494 | - }).then(response => { | |
| 495 | - this.download(response.message); | |
| 496 | - }) | |
| 497 | - }, | |
| 498 | - /** | |
| 499 | - * 文件改变时,限制文件上传格式和大小 | |
| 500 | - * 文件格式只能为docx/xlsx/xls/ppt/rar/zip/doc/pdf/png/jpeg/png/jpg | |
| 501 | - * 大小不超过5M | |
| 502 | - * */ | |
| 503 | - fileChange(file, fileList) { | |
| 504 | - let count = 0; | |
| 505 | - for (let i = 0; i < fileList.length; i++) { | |
| 506 | - // console.log(fileList.length) | |
| 507 | - // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 508 | - if (fileList[i].name == file.name) { | |
| 509 | - count++; | |
| 510 | - if (count == 2) { | |
| 511 | - this.$message({ | |
| 512 | - message: '已存在此文件!', | |
| 513 | - type: 'warning' | |
| 514 | - }); | |
| 515 | - for (let j = fileList.length; j > 0; j--) { | |
| 516 | - //如果存在此文件,去除新选择的重复文件 | |
| 517 | - if (fileList[j - 1].name == file.name) { | |
| 518 | - fileList.splice(j - 1, 1); | |
| 519 | - i--; | |
| 520 | - return false; | |
| 521 | - } | |
| 522 | - } | |
| 523 | - } | |
| 524 | - } | |
| 525 | - } | |
| 526 | - let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 527 | - //格式符合后判断大小 | |
| 528 | - if ("docx,xlsx,xls,ppt,rar,zip,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) { | |
| 529 | - let max5M = file.size / 1024 / 1024 < 5; | |
| 530 | - if (!max5M) { | |
| 531 | - this.$message({ | |
| 532 | - message: '上传文件大小不得超过5M!', | |
| 533 | - type: 'warning' | |
| 534 | - }); | |
| 535 | - } else { | |
| 536 | - //符合条件后进行添加 | |
| 537 | - this.fileEntityList = fileList | |
| 538 | - } | |
| 539 | - } else { | |
| 540 | - this.$message({ | |
| 541 | - message: '上传文件只能是 docx、xlsx、xls、ppt、rar、zip、doc、pdf、png、jpeg、png、jpg格式!', | |
| 542 | - type: 'warning' | |
| 543 | - }); | |
| 544 | - } | |
| 545 | - }, | |
| 546 | - // 删除文件 | |
| 547 | - handleDeleteFile(index) { | |
| 548 | - this.fileEntityList.splice(index, 1); | |
| 549 | - }, | |
| 550 | - /** 文件下载 */ | |
| 551 | - downloadFA(row) { | |
| 552 | - let name = row.name; | |
| 553 | - let url = row.url; | |
| 554 | - const a = document.createElement('a') | |
| 555 | - a.setAttribute('download', name) | |
| 556 | - a.setAttribute('target', '_blank') | |
| 557 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | |
| 558 | - a.click() | |
| 559 | - }, | |
| 560 | - typeOfName(type){ | |
| 561 | - if(type==0){ | |
| 562 | - return "传阅学习"; | |
| 563 | - }else if(type==1){ | |
| 564 | - return "公文批办"; | |
| 565 | - }else if(type==2){ | |
| 566 | - return "热线举报"; | |
| 567 | - }else if(type==3){ | |
| 568 | - return "上级信访" | |
| 569 | - }else if(type==4){ | |
| 570 | - return "现场信访" | |
| 571 | - } | |
| 572 | - }, | |
| 573 | - changeType(){ | |
| 574 | - if(this.form.type==0 || this.form.type==1){ | |
| 575 | - this.form.sendPerson = null; | |
| 576 | - this.form.sendDate = null; | |
| 577 | - this.form.appeal = null; | |
| 578 | - this.rules.title[0].required = true; | |
| 579 | - this.rules.company[0].required = true; | |
| 580 | - this.rules.receiveTime[0].required = true; | |
| 581 | - this.rules.sendPerson[0].required = false; | |
| 582 | - this.rules.sendDate[0].required = false; | |
| 583 | - this.rules.appeal[0].required = false; | |
| 584 | - }else if(this.form.type==2 || this.form.type==3 || this.form.type==4 ){ | |
| 585 | - this.form.title = null; | |
| 586 | - this.form.company = null; | |
| 587 | - this.form.receiveTime = null; | |
| 588 | - this.rules.title[0].required = false; | |
| 589 | - this.rules.company[0].required = false; | |
| 590 | - this.rules.receiveTime[0].required = false; | |
| 591 | - this.rules.sendPerson[0].required = true; | |
| 592 | - this.rules.sendDate[0].required = true; | |
| 593 | - this.rules.appeal[0].required = true; | |
| 594 | - } | |
| 595 | - }, | |
| 596 | - parseStatusz(status) { | |
| 597 | - if(status==1){ | |
| 598 | - return "审批通过"; | |
| 599 | - }else if(status==2){ | |
| 600 | - return "审批驳回"; | |
| 601 | - }else if(status==3){ | |
| 602 | - return "收文完成"; | |
| 603 | - }else{ | |
| 604 | - return "审批中"; | |
| 605 | - } | |
| 606 | - } | |
| 607 | - } | |
| 608 | -}; | |
| 609 | -</script> |
trash-ui/src/views/h5/office/handleAffairsCommon/handleAffairsCommonInfo.vue deleted
100644 → 0
| 1 | -<template> | |
| 2 | - <el-form ref="form" :model="form" label-width="80px"> | |
| 3 | - <el-form-item label="来文单位" prop="company"> | |
| 4 | - <el-input v-model="form.company" placeholder="请输入来文单位" :disabled="true"/> | |
| 5 | - </el-form-item> | |
| 6 | - <el-form-item label="收文时间" prop="receiveTime"> | |
| 7 | - <el-date-picker size="small" style="width: 100%" | |
| 8 | - v-model="form.receiveTime" | |
| 9 | - type="datetime" | |
| 10 | - value-format="yyyy-MM-dd HH:mm:ss" | |
| 11 | - :disabled="true" | |
| 12 | - placeholder="选择收文时间"> | |
| 13 | - </el-date-picker> | |
| 14 | - </el-form-item> | |
| 15 | - <el-form-item label="文件标题" prop="title"> | |
| 16 | - <el-input v-model="form.title" placeholder="请输入文件标题" :disabled="true"/> | |
| 17 | - </el-form-item> | |
| 18 | - <el-form-item label="相关部门意见" prop="deptOpinion"> | |
| 19 | - <el-input v-model="form.deptOpinion" type="textarea" placeholder="请输入内容"/> | |
| 20 | - </el-form-item> | |
| 21 | - <el-form-item label="综合部意见" prop="zhbOpinion"> | |
| 22 | - <el-input v-model="form.zhbOpinion" type="textarea" placeholder="请输入内容"/> | |
| 23 | - </el-form-item> | |
| 24 | - <el-row> | |
| 25 | - <el-table :data="fileEntityList"> | |
| 26 | - <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | |
| 27 | - <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | |
| 28 | - <template slot-scope="scope"> | |
| 29 | - <el-button | |
| 30 | - size="small" type="success" | |
| 31 | - icon="el-icon-download" | |
| 32 | - @click="downloadFA(scope.row)" | |
| 33 | - v-hasPermi="['office:management:edit']" | |
| 34 | - v-if="form.id!=null" | |
| 35 | - round>下载 | |
| 36 | - </el-button> | |
| 37 | - </template> | |
| 38 | - </el-table-column> | |
| 39 | - </el-table> | |
| 40 | - </el-row> | |
| 41 | - </el-form> | |
| 42 | -</template> | |
| 43 | - | |
| 44 | -<script> | |
| 45 | -import {getHandleAffairsCommon} from "@/api/office/handleAffairsCommon"; | |
| 46 | -import Editor from '@/components/ZcEditor'; | |
| 47 | -export default { | |
| 48 | - name: "handleAffairsCommonInfo", | |
| 49 | - components: {Editor}, | |
| 50 | - props: { | |
| 51 | - businessKey: { | |
| 52 | - type: String | |
| 53 | - }, | |
| 54 | - idInfo: { | |
| 55 | - type: String | |
| 56 | - } | |
| 57 | - }, | |
| 58 | - data() { | |
| 59 | - return { | |
| 60 | - form: {}, | |
| 61 | - fileEntityList:[] | |
| 62 | - } | |
| 63 | - }, | |
| 64 | - created() { | |
| 65 | - this.init(); | |
| 66 | - }, | |
| 67 | - methods:{ | |
| 68 | - init(){ | |
| 69 | - getHandleAffairsCommon(this.idInfo).then(response => { | |
| 70 | - this.form = response.data.handleAffairsCommon; | |
| 71 | - let files = JSON.stringify(response.data.uploadFiles); | |
| 72 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | |
| 73 | - }); | |
| 74 | - }, | |
| 75 | - /** 文件下载 */ | |
| 76 | - downloadFA(row) { | |
| 77 | - let name = row.name; | |
| 78 | - let url = row.url; | |
| 79 | - const a = document.createElement('a') | |
| 80 | - a.setAttribute('download', name) | |
| 81 | - a.setAttribute('target', '_blank') | |
| 82 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | |
| 83 | - a.click() | |
| 84 | - }, | |
| 85 | - } | |
| 86 | -} | |
| 87 | -</script> | |
| 88 | - | |
| 89 | -<style scoped> | |
| 90 | - | |
| 91 | -</style> |
trash-ui/src/views/h5/office/handleAffairsCommon/index.vue deleted
100644 → 0
| 1 | -<template> | |
| 2 | - <div class="app-container"> | |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | |
| 4 | - <el-form-item label="来文单位" prop="company"> | |
| 5 | - <el-input | |
| 6 | - v-model="queryParams.company" | |
| 7 | - placeholder="请输入来文单位" | |
| 8 | - | |
| 9 | - size="small" | |
| 10 | - | |
| 11 | - /> | |
| 12 | - </el-form-item> | |
| 13 | - <el-form-item label="收文时间" prop="receiveTime"> | |
| 14 | - <el-date-picker size="small" style="width: 200px" | |
| 15 | - v-model="queryParams.receiveTime" | |
| 16 | - type="date" | |
| 17 | - value-format="yyyy-MM-dd" | |
| 18 | - placeholder="选择收文时间"> | |
| 19 | - </el-date-picker> | |
| 20 | - </el-form-item> | |
| 21 | - <el-form-item label="审批状态" prop="status"> | |
| 22 | - <el-select v-model="queryParams.status" placeholder="请选择审批状态" size="small"> | |
| 23 | - <el-option label="审核中" value="0" /> | |
| 24 | - <el-option label="审核完成" value="1" /> | |
| 25 | - <el-option label="被驳回" value="2" /> | |
| 26 | - </el-select> | |
| 27 | - </el-form-item> | |
| 28 | - <el-form-item> | |
| 29 | - <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |
| 30 | - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |
| 31 | - </el-form-item> | |
| 32 | - </el-form> | |
| 33 | - | |
| 34 | - <el-row :gutter="10" class="mb8"> | |
| 35 | - <el-col :span="1.5"> | |
| 36 | - <el-button | |
| 37 | - type="primary" | |
| 38 | - icon="el-icon-plus" | |
| 39 | - size="mini" | |
| 40 | - @click="handleAdd" | |
| 41 | - v-hasPermi="['office:handleAffairsCommon:add']" | |
| 42 | - >新增</el-button> | |
| 43 | - </el-col> | |
| 44 | - <el-col :span="1.5"> | |
| 45 | - <el-button | |
| 46 | - type="success" | |
| 47 | - icon="el-icon-edit" | |
| 48 | - size="mini" | |
| 49 | - :disabled="single" | |
| 50 | - @click="handleUpdate" | |
| 51 | - v-hasPermi="['office:handleAffairsCommon:edit']" | |
| 52 | - >修改</el-button> | |
| 53 | - </el-col> | |
| 54 | -<!-- <el-col :span="1.5">--> | |
| 55 | -<!-- <el-button--> | |
| 56 | -<!-- type="danger"--> | |
| 57 | -<!-- icon="el-icon-delete"--> | |
| 58 | -<!-- size="mini"--> | |
| 59 | -<!-- :disabled="multiple"--> | |
| 60 | -<!-- @click="handleDelete"--> | |
| 61 | -<!-- v-hasPermi="['office:handleAffairsCommon:remove']"--> | |
| 62 | -<!-- >删除</el-button>--> | |
| 63 | -<!-- </el-col>--> | |
| 64 | - <el-col :span="1.5"> | |
| 65 | - <el-button | |
| 66 | - type="warning" | |
| 67 | - icon="el-icon-download" | |
| 68 | - size="mini" | |
| 69 | - @click="handleExport" | |
| 70 | - v-hasPermi="['office:handleAffairsCommon:export']" | |
| 71 | - >导出</el-button> | |
| 72 | - </el-col> | |
| 73 | - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 74 | - </el-row> | |
| 75 | - | |
| 76 | - <el-table v-loading="loading" :data="handleAffairsCommonList" @selection-change="handleSelectionChange"> | |
| 77 | - <el-table-column type="selection" width="55" align="center" /> | |
| 78 | - <el-table-column label="来文单位" align="center" prop="company" /> | |
| 79 | - <el-table-column label="收文时间" align="center" prop="receiveTime" width="180"> | |
| 80 | - <template slot-scope="scope"> | |
| 81 | - <span>{{ parseTime(scope.row.receiveTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> | |
| 82 | - </template> | |
| 83 | - </el-table-column> | |
| 84 | - <el-table-column label="是否已阅" align="center" prop="isRead" /> | |
| 85 | - <el-table-column label="审批状态" align="center" prop="status" > | |
| 86 | - <template slot-scope="scope"> | |
| 87 | - <span>{{ parseStatus(scope.row.status) }}</span> | |
| 88 | - </template> | |
| 89 | - </el-table-column> | |
| 90 | - <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |
| 91 | - <template slot-scope="scope"> | |
| 92 | - <el-button | |
| 93 | - size="mini" | |
| 94 | - type="text" | |
| 95 | - icon="el-icon-edit" | |
| 96 | - @click="handleInfo(scope.row)" | |
| 97 | - v-hasPermi="['office:handleAffairsCommon:edit']" | |
| 98 | - >详情</el-button> | |
| 99 | - <el-button | |
| 100 | - size="mini" | |
| 101 | - type="text" | |
| 102 | - icon="el-icon-edit" | |
| 103 | - @click="handleUpdate(scope.row)" | |
| 104 | - v-hasPermi="['office:handleAffairsCommon:edit']" | |
| 105 | - >修改</el-button> | |
| 106 | -<!-- <el-button--> | |
| 107 | -<!-- size="mini"--> | |
| 108 | -<!-- type="text"--> | |
| 109 | -<!-- icon="el-icon-delete"--> | |
| 110 | -<!-- @click="handleDelete(scope.row)"--> | |
| 111 | -<!-- v-hasPermi="['office:handleAffairsCommon:remove']"--> | |
| 112 | -<!-- >删除</el-button>--> | |
| 113 | - </template> | |
| 114 | - </el-table-column> | |
| 115 | - </el-table> | |
| 116 | - | |
| 117 | - <pagination | |
| 118 | - v-show="total>0" | |
| 119 | - :total="total" | |
| 120 | - :page.sync="queryParams.pageNum" | |
| 121 | - :limit.sync="queryParams.pageSize" | |
| 122 | - @pagination="getList" | |
| 123 | - /> | |
| 124 | - | |
| 125 | - <!-- 添加或修改办文办事-普通类对话框 --> | |
| 126 | - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false"> | |
| 127 | - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 128 | - <el-form-item label="来文单位" prop="company"> | |
| 129 | - <el-input v-model="form.company" placeholder="请输入来文单位" /> | |
| 130 | - </el-form-item> | |
| 131 | - <el-form-item label="收文时间" prop="receiveTime"> | |
| 132 | - <el-date-picker size="small" style="width: 100%" | |
| 133 | - v-model="form.receiveTime" | |
| 134 | - type="datetime" | |
| 135 | - value-format="yyyy-MM-dd HH:mm:ss" | |
| 136 | - placeholder="选择收文时间"> | |
| 137 | - </el-date-picker> | |
| 138 | - </el-form-item> | |
| 139 | - <el-form-item label="文件标题" prop="title"> | |
| 140 | - <el-input v-model="form.title" placeholder="请输入文件标题" /> | |
| 141 | - </el-form-item> | |
| 142 | -<!-- <el-form-item label="相关部门意见" prop="deptOpinion">--> | |
| 143 | -<!-- <el-input v-model="form.deptOpinion" type="textarea" placeholder="请输入内容" />--> | |
| 144 | -<!-- </el-form-item>--> | |
| 145 | -<!-- <el-form-item label="综合部意见" prop="zhbOpinion">--> | |
| 146 | -<!-- <el-input v-model="form.zhbOpinion" type="textarea" placeholder="请输入内容" />--> | |
| 147 | -<!-- </el-form-item>--> | |
| 148 | - <el-row :gutter="2"> | |
| 149 | - <el-col :span="11"> | |
| 150 | - <el-form-item prop="fileEntityList" label="附件"> | |
| 151 | - <el-upload | |
| 152 | - ref="upload" | |
| 153 | - action="" | |
| 154 | - accept=".docx,.xlsx,.xls,.ppt,.rar,.zip,.doc,.pdf,.png,.jpeg,.png,.jpg" | |
| 155 | - :on-change="fileChange" | |
| 156 | - :auto-upload="false" | |
| 157 | - :show-file-list="false" | |
| 158 | - multiple | |
| 159 | - :file-list="fileEntityList"> | |
| 160 | - <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 161 | - </el-upload> | |
| 162 | - </el-form-item> | |
| 163 | - </el-col> | |
| 164 | - </el-row> | |
| 165 | - <el-row> | |
| 166 | - <el-table :data="fileEntityList"> | |
| 167 | - <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | |
| 168 | - <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | |
| 169 | - <template slot-scope="scope"> | |
| 170 | - <el-button | |
| 171 | - size="small" type="success" | |
| 172 | - icon="el-icon-download" | |
| 173 | - @click="downloadFA(scope.row)" | |
| 174 | - v-hasPermi="['office:management:edit']" | |
| 175 | - v-if="form.id!=null" | |
| 176 | - round>下载 | |
| 177 | - </el-button> | |
| 178 | - <el-button | |
| 179 | - size="small" type="danger" | |
| 180 | - icon="el-icon-delete" | |
| 181 | - @click="handleDeleteFile(scope.$index)" | |
| 182 | - v-hasPermi="['office:management:remove']" | |
| 183 | - round>删除 | |
| 184 | - </el-button> | |
| 185 | - </template> | |
| 186 | - </el-table-column> | |
| 187 | - </el-table> | |
| 188 | - </el-row> | |
| 189 | - </el-form> | |
| 190 | - <div slot="footer" class="dialog-footer"> | |
| 191 | - <el-button type="primary" @click="submitForm">确 定</el-button> | |
| 192 | - <el-button @click="cancel">取 消</el-button> | |
| 193 | - </div> | |
| 194 | - </el-dialog> | |
| 195 | - <el-dialog :title="title" :visible.sync="openInfo" width="500px" append-to-body :close-on-click-modal="false"> | |
| 196 | - <handleAffairsCommonInfo :idInfo="idInfo" v-if="openInfo"/> | |
| 197 | - <div slot="footer" class="dialog-footer"> | |
| 198 | - <el-button @click="cancel">取 消</el-button> | |
| 199 | - </div> | |
| 200 | - </el-dialog> | |
| 201 | - </div> | |
| 202 | -</template> | |
| 203 | - | |
| 204 | -<script> | |
| 205 | -import { listHandleAffairsCommon, getHandleAffairsCommon, delHandleAffairsCommon, addHandleAffairsCommon, updateHandleAffairsCommon, exportHandleAffairsCommon } from "@/api/office/handleAffairsCommon"; | |
| 206 | -import handleAffairsCommonInfo from "./handleAffairsCommonInfo"; | |
| 207 | - | |
| 208 | -export default { | |
| 209 | - name: "HandleAffairsCommon", | |
| 210 | - components:{handleAffairsCommonInfo}, | |
| 211 | - data() { | |
| 212 | - return { | |
| 213 | - // 遮罩层 | |
| 214 | - loading: true, | |
| 215 | - // 选中数组 | |
| 216 | - ids: [], | |
| 217 | - // 非单个禁用 | |
| 218 | - single: true, | |
| 219 | - // 非多个禁用 | |
| 220 | - multiple: true, | |
| 221 | - // 显示搜索条件 | |
| 222 | - showSearch: true, | |
| 223 | - // 总条数 | |
| 224 | - total: 0, | |
| 225 | - // 办文办事-普通类表格数据 | |
| 226 | - handleAffairsCommonList: [], | |
| 227 | - // 弹出层标题 | |
| 228 | - title: "", | |
| 229 | - // 是否显示弹出层 | |
| 230 | - open: false, | |
| 231 | - // 查询参数 | |
| 232 | - queryParams: { | |
| 233 | - pageNum: 1, | |
| 234 | - pageSize: 10, | |
| 235 | - company: null, | |
| 236 | - receiveTime: null, | |
| 237 | - title: null, | |
| 238 | - deptOpinion: null, | |
| 239 | - zhbOpinion: null, | |
| 240 | - isRead: null, | |
| 241 | - status: null, | |
| 242 | - }, | |
| 243 | - // 表单参数 | |
| 244 | - form: {}, | |
| 245 | - // 表单校验 | |
| 246 | - rules: { | |
| 247 | - company: [ | |
| 248 | - { required: true, message: "必填", trigger: "blur" } | |
| 249 | - ], | |
| 250 | - receiveTime: [ | |
| 251 | - { required: true, message: "必填", trigger: "blur" } | |
| 252 | - ], | |
| 253 | - title: [ | |
| 254 | - { required: true, message: "必填", trigger: "blur" } | |
| 255 | - ], | |
| 256 | - }, | |
| 257 | - fileEntityList: [], | |
| 258 | - openInfo:false, | |
| 259 | - idInfo:null, | |
| 260 | - }; | |
| 261 | - }, | |
| 262 | - created() { | |
| 263 | - this.getList(); | |
| 264 | - }, | |
| 265 | - methods: { | |
| 266 | - /** 查询办文办事-普通类列表 */ | |
| 267 | - getList() { | |
| 268 | - this.loading = true; | |
| 269 | - listHandleAffairsCommon(this.queryParams).then(response => { | |
| 270 | - this.handleAffairsCommonList = response.rows; | |
| 271 | - this.total = response.total; | |
| 272 | - this.loading = false; | |
| 273 | - }); | |
| 274 | - }, | |
| 275 | - // 取消按钮 | |
| 276 | - cancel() { | |
| 277 | - this.open = false; | |
| 278 | - this.openInfo = false; | |
| 279 | - this.idInfo = null; | |
| 280 | - this.reset(); | |
| 281 | - }, | |
| 282 | - // 表单重置 | |
| 283 | - reset() { | |
| 284 | - this.fileEntityList=[]; | |
| 285 | - this.form = { | |
| 286 | - id: null, | |
| 287 | - company: null, | |
| 288 | - receiveTime: null, | |
| 289 | - title: null, | |
| 290 | - deptOpinion: null, | |
| 291 | - zhbOpinion: null, | |
| 292 | - isRead: null, | |
| 293 | - status: 0, | |
| 294 | - createTime: null, | |
| 295 | - createBy: null, | |
| 296 | - updateTime: null, | |
| 297 | - updateBy: null | |
| 298 | - }; | |
| 299 | - this.resetForm("form"); | |
| 300 | - }, | |
| 301 | - /** 搜索按钮操作 */ | |
| 302 | - handleQuery() { | |
| 303 | - this.queryParams.pageNum = 1; | |
| 304 | - this.getList(); | |
| 305 | - }, | |
| 306 | - /** 重置按钮操作 */ | |
| 307 | - resetQuery() { | |
| 308 | - this.resetForm("queryForm"); | |
| 309 | - this.handleQuery(); | |
| 310 | - }, | |
| 311 | - // 多选框选中数据 | |
| 312 | - handleSelectionChange(selection) { | |
| 313 | - this.ids = selection.map(item => item.id) | |
| 314 | - this.single = selection.length!==1 | |
| 315 | - this.multiple = !selection.length | |
| 316 | - }, | |
| 317 | - /** 查看按钮操作 */ | |
| 318 | - handleInfo(row){ | |
| 319 | - this.reset(); | |
| 320 | - this.idInfo = row.id; | |
| 321 | - this.title = "办文办事-普通类详情"; | |
| 322 | - this.openInfo = true; | |
| 323 | - }, | |
| 324 | - /** 新增按钮操作 */ | |
| 325 | - handleAdd() { | |
| 326 | - this.reset(); | |
| 327 | - this.open = true; | |
| 328 | - this.title = "添加办文办事-普通类"; | |
| 329 | - }, | |
| 330 | - /** 修改按钮操作 */ | |
| 331 | - handleUpdate(row) { | |
| 332 | - this.reset(); | |
| 333 | - const id = row.id || this.ids | |
| 334 | - getHandleAffairsCommon(id).then(response => { | |
| 335 | - this.form = response.data.handleAffairsCommon; | |
| 336 | - let files = JSON.stringify(response.data.uploadFiles); | |
| 337 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | |
| 338 | - this.open = true; | |
| 339 | - this.title = "修改办文办事-普通类"; | |
| 340 | - }); | |
| 341 | - }, | |
| 342 | - /** 提交按钮 */ | |
| 343 | - submitForm() { | |
| 344 | - this.$refs["form"].validate(valid => { | |
| 345 | - if (valid) { | |
| 346 | - let formData = new FormData(); | |
| 347 | - let form = this.form; | |
| 348 | - //去掉params属性 | |
| 349 | - delete form.params; | |
| 350 | - formData.append('fileList', null); | |
| 351 | - //将新增的文件放入formData | |
| 352 | - this.fileEntityList.forEach(item => { | |
| 353 | - if(item.id==null){ | |
| 354 | - formData.append('fileList', item.raw) | |
| 355 | - } | |
| 356 | - }) | |
| 357 | - if (this.form.id != null) { | |
| 358 | - formData.append("handleAffairsCommon", JSON.stringify(form)); | |
| 359 | - formData.append("uploadFilesList", null); | |
| 360 | - this.fileEntityList.forEach(item => { | |
| 361 | - delete item.params; | |
| 362 | - if(item != "null" && item != null){ | |
| 363 | - formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); | |
| 364 | - } | |
| 365 | - }) | |
| 366 | - updateHandleAffairsCommon(formData).then(response => { | |
| 367 | - this.msgSuccess("修改成功"); | |
| 368 | - this.open = false; | |
| 369 | - this.getList(); | |
| 370 | - }); | |
| 371 | - } else { | |
| 372 | - for (let key in form) { | |
| 373 | - formData.append(key, form[key] == null ? "" : form[key]) | |
| 374 | - } | |
| 375 | - addHandleAffairsCommon(formData).then(response => { | |
| 376 | - this.msgSuccess("新增成功"); | |
| 377 | - this.open = false; | |
| 378 | - this.getList(); | |
| 379 | - }); | |
| 380 | - } | |
| 381 | - } | |
| 382 | - }); | |
| 383 | - }, | |
| 384 | - /** 删除按钮操作 */ | |
| 385 | - handleDelete(row) { | |
| 386 | - const ids = row.id || this.ids; | |
| 387 | - this.$confirm('是否确认删除办文办事-普通类编号为"' + ids + '"的数据项?', "警告", { | |
| 388 | - confirmButtonText: "确定", | |
| 389 | - cancelButtonText: "取消", | |
| 390 | - type: "warning" | |
| 391 | - }).then(function() { | |
| 392 | - return delHandleAffairsCommon(ids); | |
| 393 | - }).then(() => { | |
| 394 | - this.getList(); | |
| 395 | - this.msgSuccess("删除成功"); | |
| 396 | - }) | |
| 397 | - }, | |
| 398 | - /** 导出按钮操作 */ | |
| 399 | - handleExport() { | |
| 400 | - const queryParams = this.queryParams; | |
| 401 | - this.$confirm('是否确认导出所有办文办事-普通类数据项?', "警告", { | |
| 402 | - confirmButtonText: "确定", | |
| 403 | - cancelButtonText: "取消", | |
| 404 | - type: "warning" | |
| 405 | - }).then(function() { | |
| 406 | - return exportHandleAffairsCommon(queryParams); | |
| 407 | - }).then(response => { | |
| 408 | - this.download(response.message); | |
| 409 | - }) | |
| 410 | - }, | |
| 411 | - /** | |
| 412 | - * 文件改变时,限制文件上传格式和大小 | |
| 413 | - * 文件格式只能为docx/xlsx/xls/ppt/rar/zip/doc/pdf/png/jpeg/png/jpg | |
| 414 | - * 大小不超过5M | |
| 415 | - * */ | |
| 416 | - fileChange(file, fileList) { | |
| 417 | - let count = 0; | |
| 418 | - for (let i = 0; i < fileList.length; i++) { | |
| 419 | - // console.log(fileList.length) | |
| 420 | - // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 421 | - if (fileList[i].name == file.name) { | |
| 422 | - count++; | |
| 423 | - if (count == 2) { | |
| 424 | - this.$message({ | |
| 425 | - message: '已存在此文件!', | |
| 426 | - type: 'warning' | |
| 427 | - }); | |
| 428 | - for (let j = fileList.length; j > 0; j--) { | |
| 429 | - //如果存在此文件,去除新选择的重复文件 | |
| 430 | - if (fileList[j - 1].name == file.name) { | |
| 431 | - fileList.splice(j - 1, 1); | |
| 432 | - i--; | |
| 433 | - return false; | |
| 434 | - } | |
| 435 | - } | |
| 436 | - } | |
| 437 | - } | |
| 438 | - } | |
| 439 | - let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 440 | - //格式符合后判断大小 | |
| 441 | - if ("docx,xlsx,xls,ppt,rar,zip,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) { | |
| 442 | - let max5M = file.size / 1024 / 1024 < 5; | |
| 443 | - if (!max5M) { | |
| 444 | - this.$message({ | |
| 445 | - message: '上传文件大小不得超过5M!', | |
| 446 | - type: 'warning' | |
| 447 | - }); | |
| 448 | - } else { | |
| 449 | - //符合条件后进行添加 | |
| 450 | - this.fileEntityList = fileList | |
| 451 | - } | |
| 452 | - } else { | |
| 453 | - this.$message({ | |
| 454 | - message: '上传文件只能是 docx、xlsx、xls、ppt、rar、zip、doc、pdf、png、jpeg、png、jpg格式!', | |
| 455 | - type: 'warning' | |
| 456 | - }); | |
| 457 | - } | |
| 458 | - }, | |
| 459 | - // 删除文件 | |
| 460 | - handleDeleteFile(index) { | |
| 461 | - this.fileEntityList.splice(index, 1); | |
| 462 | - }, | |
| 463 | - /** 文件下载 */ | |
| 464 | - downloadFA(row) { | |
| 465 | - let name = row.name; | |
| 466 | - let url = row.url; | |
| 467 | - const a = document.createElement('a') | |
| 468 | - a.setAttribute('download', name) | |
| 469 | - a.setAttribute('target', '_blank') | |
| 470 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | |
| 471 | - a.click() | |
| 472 | - }, | |
| 473 | - } | |
| 474 | -}; | |
| 475 | -</script> |
trash-ui/src/views/h5/office/handleAffairsXF/handleAffairsXFInfo.vue deleted
100644 → 0
| 1 | -<template> | |
| 2 | - <el-form ref="form" :model="form" label-width="80px"> | |
| 3 | - <el-form-item label="信访单位(人)" prop="company"> | |
| 4 | - <el-input v-model="form.company" placeholder="请输入信访单位(人)" :disabled="true"/> | |
| 5 | - </el-form-item> | |
| 6 | - <el-form-item label="信访日期" prop="receiveDate"> | |
| 7 | - <el-date-picker size="small" style="width: 100%" | |
| 8 | - v-model="form.receiveDate" | |
| 9 | - type="date" | |
| 10 | - value-format="yyyy-MM-dd" | |
| 11 | - :disabled="true" | |
| 12 | - placeholder="选择信访日期"> | |
| 13 | - </el-date-picker> | |
| 14 | - </el-form-item> | |
| 15 | - <el-form-item label="诉求" prop="appeal"> | |
| 16 | - <el-input v-model="form.appeal" type="textarea" placeholder="请输入内容" :disabled="true"/> | |
| 17 | - </el-form-item> | |
| 18 | - <el-form-item label="相关部门意见" prop="deptOpinion"> | |
| 19 | - <el-input v-model="form.deptOpinion" type="textarea" placeholder="请输入内容" /> | |
| 20 | - </el-form-item> | |
| 21 | - <el-form-item label="综合部意见" prop="zhbOpinion"> | |
| 22 | - <el-input v-model="form.zhbOpinion" type="textarea" placeholder="请输入内容" /> | |
| 23 | - </el-form-item> | |
| 24 | - <el-row> | |
| 25 | - <el-table :data="fileEntityList"> | |
| 26 | - <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | |
| 27 | - <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | |
| 28 | - <template slot-scope="scope"> | |
| 29 | - <el-button | |
| 30 | - size="small" type="success" | |
| 31 | - icon="el-icon-download" | |
| 32 | - @click="downloadFA(scope.row)" | |
| 33 | - v-hasPermi="['office:management:edit']" | |
| 34 | - v-if="form.id!=null" | |
| 35 | - round>下载 | |
| 36 | - </el-button> | |
| 37 | - </template> | |
| 38 | - </el-table-column> | |
| 39 | - </el-table> | |
| 40 | - </el-row> | |
| 41 | - </el-form> | |
| 42 | -</template> | |
| 43 | - | |
| 44 | -<script> | |
| 45 | -import {getHandleAffairsXF} from "@/api/office/handleAffairsXF"; | |
| 46 | -import Editor from '@/components/ZcEditor'; | |
| 47 | -export default { | |
| 48 | - name: "handleAffairsXFInfo", | |
| 49 | - components: {Editor}, | |
| 50 | - props: { | |
| 51 | - businessKey: { | |
| 52 | - type: String | |
| 53 | - }, | |
| 54 | - idInfo: { | |
| 55 | - type: String | |
| 56 | - } | |
| 57 | - }, | |
| 58 | - data() { | |
| 59 | - return { | |
| 60 | - form: {}, | |
| 61 | - fileEntityList:[] | |
| 62 | - } | |
| 63 | - }, | |
| 64 | - created() { | |
| 65 | - this.init(); | |
| 66 | - }, | |
| 67 | - methods:{ | |
| 68 | - init(){ | |
| 69 | - getHandleAffairsXF(this.idInfo).then(response => { | |
| 70 | - this.form = response.data.handleAffairsXf; | |
| 71 | - let files = JSON.stringify(response.data.uploadFiles); | |
| 72 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | |
| 73 | - }); | |
| 74 | - }, | |
| 75 | - /** 文件下载 */ | |
| 76 | - downloadFA(row) { | |
| 77 | - let name = row.name; | |
| 78 | - let url = row.url; | |
| 79 | - const a = document.createElement('a') | |
| 80 | - a.setAttribute('download', name) | |
| 81 | - a.setAttribute('target', '_blank') | |
| 82 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | |
| 83 | - a.click() | |
| 84 | - }, | |
| 85 | - } | |
| 86 | -} | |
| 87 | -</script> | |
| 88 | - | |
| 89 | -<style scoped> | |
| 90 | - | |
| 91 | -</style> |
trash-ui/src/views/h5/office/handleAffairsXF/index.vue deleted
100644 → 0
| 1 | -<template> | |
| 2 | - <div class="app-container"> | |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="98px"> | |
| 4 | - <el-form-item label="信访单位(人)" prop="company"> | |
| 5 | - <el-input | |
| 6 | - v-model="queryParams.company" | |
| 7 | - placeholder="请输入信访单位(人)" | |
| 8 | - | |
| 9 | - size="small" | |
| 10 | - | |
| 11 | - /> | |
| 12 | - </el-form-item> | |
| 13 | - <el-form-item label="信访日期" prop="receiveDate"> | |
| 14 | - <el-date-picker size="small" style="width: 200px" | |
| 15 | - v-model="queryParams.receiveDate" | |
| 16 | - type="date" | |
| 17 | - value-format="yyyy-MM-dd" | |
| 18 | - placeholder="选择信访日期"> | |
| 19 | - </el-date-picker> | |
| 20 | - </el-form-item> | |
| 21 | - <el-form-item label="审批状态" prop="status"> | |
| 22 | - <el-select v-model="queryParams.status" placeholder="请选择审批状态" size="small"> | |
| 23 | - <el-option label="审核中" value="0" /> | |
| 24 | - <el-option label="审核完成" value="1" /> | |
| 25 | - <el-option label="被驳回" value="2" /> | |
| 26 | - </el-select> | |
| 27 | - </el-form-item> | |
| 28 | - <el-form-item> | |
| 29 | - <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |
| 30 | - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |
| 31 | - </el-form-item> | |
| 32 | - </el-form> | |
| 33 | - | |
| 34 | - <el-row :gutter="10" class="mb8"> | |
| 35 | - <el-col :span="1.5"> | |
| 36 | - <el-button | |
| 37 | - type="primary" | |
| 38 | - icon="el-icon-plus" | |
| 39 | - size="mini" | |
| 40 | - @click="handleAdd" | |
| 41 | - v-hasPermi="['office:handleAffairsXF:add']" | |
| 42 | - >新增</el-button> | |
| 43 | - </el-col> | |
| 44 | - <el-col :span="1.5"> | |
| 45 | - <el-button | |
| 46 | - type="success" | |
| 47 | - icon="el-icon-edit" | |
| 48 | - size="mini" | |
| 49 | - :disabled="single" | |
| 50 | - @click="handleUpdate" | |
| 51 | - v-hasPermi="['office:handleAffairsXF:edit']" | |
| 52 | - >修改</el-button> | |
| 53 | - </el-col> | |
| 54 | -<!-- <el-col :span="1.5">--> | |
| 55 | -<!-- <el-button--> | |
| 56 | -<!-- type="danger"--> | |
| 57 | -<!-- icon="el-icon-delete"--> | |
| 58 | -<!-- size="mini"--> | |
| 59 | -<!-- :disabled="multiple"--> | |
| 60 | -<!-- @click="handleDelete"--> | |
| 61 | -<!-- v-hasPermi="['office:handleAffairsXF:remove']"--> | |
| 62 | -<!-- >删除</el-button>--> | |
| 63 | -<!-- </el-col>--> | |
| 64 | - <el-col :span="1.5"> | |
| 65 | - <el-button | |
| 66 | - type="warning" | |
| 67 | - icon="el-icon-download" | |
| 68 | - size="mini" | |
| 69 | - @click="handleExport" | |
| 70 | - v-hasPermi="['office:handleAffairsXF:export']" | |
| 71 | - >导出</el-button> | |
| 72 | - </el-col> | |
| 73 | - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 74 | - </el-row> | |
| 75 | - | |
| 76 | - <el-table v-loading="loading" :data="handleAffairsXFList" @selection-change="handleSelectionChange"> | |
| 77 | - <el-table-column type="selection" width="55" align="center" /> | |
| 78 | - <el-table-column label="信访单位(人)" align="center" prop="company" /> | |
| 79 | - <el-table-column label="信访日期" align="center" prop="receiveDate" width="180"> | |
| 80 | - <template slot-scope="scope"> | |
| 81 | - <span>{{ parseTime(scope.row.receiveDate, '{y}-{m}-{d}') }}</span> | |
| 82 | - </template> | |
| 83 | - </el-table-column> | |
| 84 | - <el-table-column label="诉求" align="center" prop="appeal" /> | |
| 85 | - <el-table-column label="审批状态" align="center" prop="status"> | |
| 86 | - <template slot-scope="scope"> | |
| 87 | - <span>{{ parseStatus(scope.row.status) }}</span> | |
| 88 | - </template> | |
| 89 | - </el-table-column> | |
| 90 | - <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |
| 91 | - <template slot-scope="scope"> | |
| 92 | - <el-button | |
| 93 | - size="mini" | |
| 94 | - type="text" | |
| 95 | - icon="el-icon-edit" | |
| 96 | - @click="handleInfo(scope.row)" | |
| 97 | - v-hasPermi="['office:handleAffairsCommon:edit']" | |
| 98 | - >详情</el-button> | |
| 99 | - <el-button | |
| 100 | - size="mini" | |
| 101 | - type="text" | |
| 102 | - icon="el-icon-edit" | |
| 103 | - @click="handleUpdate(scope.row)" | |
| 104 | - v-hasPermi="['office:handleAffairsXF:edit']" | |
| 105 | - >修改</el-button> | |
| 106 | -<!-- <el-button--> | |
| 107 | -<!-- size="mini"--> | |
| 108 | -<!-- type="text"--> | |
| 109 | -<!-- icon="el-icon-delete"--> | |
| 110 | -<!-- @click="handleDelete(scope.row)"--> | |
| 111 | -<!-- v-hasPermi="['office:handleAffairsXF:remove']"--> | |
| 112 | -<!-- >删除</el-button>--> | |
| 113 | - </template> | |
| 114 | - </el-table-column> | |
| 115 | - </el-table> | |
| 116 | - | |
| 117 | - <pagination | |
| 118 | - v-show="total>0" | |
| 119 | - :total="total" | |
| 120 | - :page.sync="queryParams.pageNum" | |
| 121 | - :limit.sync="queryParams.pageSize" | |
| 122 | - @pagination="getList" | |
| 123 | - /> | |
| 124 | - | |
| 125 | - <!-- 添加或修改办文办事信访类对话框 --> | |
| 126 | - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false"> | |
| 127 | - <el-form ref="form" :model="form" :rules="rules" label-width="105px"> | |
| 128 | - <el-form-item label="信访单位(人)" prop="company"> | |
| 129 | - <el-input v-model="form.company" placeholder="请输入信访单位(人)" /> | |
| 130 | - </el-form-item> | |
| 131 | - <el-form-item label="信访日期" prop="receiveDate"> | |
| 132 | - <el-date-picker size="small" style="width: 100%" | |
| 133 | - v-model="form.receiveDate" | |
| 134 | - type="date" | |
| 135 | - value-format="yyyy-MM-dd" | |
| 136 | - placeholder="选择信访日期"> | |
| 137 | - </el-date-picker> | |
| 138 | - </el-form-item> | |
| 139 | - <el-form-item label="诉求" prop="appeal"> | |
| 140 | - <el-input v-model="form.appeal" type="textarea" placeholder="请输入内容" /> | |
| 141 | - </el-form-item> | |
| 142 | -<!-- <el-form-item label="相关部门意见" prop="deptOpinion">--> | |
| 143 | -<!-- <el-input v-model="form.deptOpinion" type="textarea" placeholder="请输入内容" />--> | |
| 144 | -<!-- </el-form-item>--> | |
| 145 | -<!-- <el-form-item label="综合部意见" prop="zhbOpinion">--> | |
| 146 | -<!-- <el-input v-model="form.zhbOpinion" type="textarea" placeholder="请输入内容" />--> | |
| 147 | -<!-- </el-form-item>--> | |
| 148 | - <el-row :gutter="2"> | |
| 149 | - <el-col :span="11"> | |
| 150 | - <el-form-item prop="fileEntityList" label="附件"> | |
| 151 | - <el-upload | |
| 152 | - ref="upload" | |
| 153 | - action="" | |
| 154 | - accept=".docx,.xlsx,.xls,.ppt,.rar,.zip,.doc,.pdf,.png,.jpeg,.png,.jpg" | |
| 155 | - :on-change="fileChange" | |
| 156 | - :auto-upload="false" | |
| 157 | - :show-file-list="false" | |
| 158 | - multiple | |
| 159 | - :file-list="fileEntityList"> | |
| 160 | - <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 161 | - </el-upload> | |
| 162 | - </el-form-item> | |
| 163 | - </el-col> | |
| 164 | - </el-row> | |
| 165 | - <el-row> | |
| 166 | - <el-table :data="fileEntityList"> | |
| 167 | - <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | |
| 168 | - <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | |
| 169 | - <template slot-scope="scope"> | |
| 170 | - <el-button | |
| 171 | - size="small" type="success" | |
| 172 | - icon="el-icon-download" | |
| 173 | - @click="downloadFA(scope.row)" | |
| 174 | - v-hasPermi="['office:management:edit']" | |
| 175 | - v-if="form.id!=null" | |
| 176 | - round>下载 | |
| 177 | - </el-button> | |
| 178 | - <el-button | |
| 179 | - size="small" type="danger" | |
| 180 | - icon="el-icon-delete" | |
| 181 | - @click="handleDeleteFile(scope.$index)" | |
| 182 | - v-hasPermi="['office:management:remove']" | |
| 183 | - round>删除 | |
| 184 | - </el-button> | |
| 185 | - </template> | |
| 186 | - </el-table-column> | |
| 187 | - </el-table> | |
| 188 | - </el-row> | |
| 189 | - </el-form> | |
| 190 | - <div slot="footer" class="dialog-footer"> | |
| 191 | - <el-button type="primary" @click="submitForm">确 定</el-button> | |
| 192 | - <el-button @click="cancel">取 消</el-button> | |
| 193 | - </div> | |
| 194 | - </el-dialog> | |
| 195 | - | |
| 196 | - <el-dialog :title="title" :visible.sync="openInfo" width="500px" append-to-body :close-on-click-modal="false"> | |
| 197 | - <handleAffairsXFInfo :idInfo="idInfo" v-if="openInfo"/> | |
| 198 | - <div slot="footer" class="dialog-footer"> | |
| 199 | - <el-button @click="cancel">取 消</el-button> | |
| 200 | - </div> | |
| 201 | - </el-dialog> | |
| 202 | - </div> | |
| 203 | -</template> | |
| 204 | - | |
| 205 | -<script> | |
| 206 | -import { listHandleAffairsXF, getHandleAffairsXF, delHandleAffairsXF, addHandleAffairsXF, updateHandleAffairsXF, exportHandleAffairsXF } from "@/api/office/handleAffairsXF"; | |
| 207 | -import handleAffairsXFInfo from "./handleAffairsXFInfo"; | |
| 208 | -export default { | |
| 209 | - name: "HandleAffairsXF", | |
| 210 | - components:{handleAffairsXFInfo}, | |
| 211 | - data() { | |
| 212 | - return { | |
| 213 | - // 遮罩层 | |
| 214 | - loading: true, | |
| 215 | - // 选中数组 | |
| 216 | - ids: [], | |
| 217 | - // 非单个禁用 | |
| 218 | - single: true, | |
| 219 | - // 非多个禁用 | |
| 220 | - multiple: true, | |
| 221 | - // 显示搜索条件 | |
| 222 | - showSearch: true, | |
| 223 | - // 总条数 | |
| 224 | - total: 0, | |
| 225 | - // 办文办事信访类表格数据 | |
| 226 | - handleAffairsXFList: [], | |
| 227 | - // 弹出层标题 | |
| 228 | - title: "", | |
| 229 | - // 是否显示弹出层 | |
| 230 | - open: false, | |
| 231 | - // 查询参数 | |
| 232 | - queryParams: { | |
| 233 | - pageNum: 1, | |
| 234 | - pageSize: 10, | |
| 235 | - company: null, | |
| 236 | - receiveDate: null, | |
| 237 | - appeal: null, | |
| 238 | - deptOpinion: null, | |
| 239 | - zhbOpinion: null, | |
| 240 | - isRead: null, | |
| 241 | - status: null, | |
| 242 | - }, | |
| 243 | - // 表单参数 | |
| 244 | - form: {}, | |
| 245 | - // 表单校验 | |
| 246 | - rules: { | |
| 247 | - company:[ | |
| 248 | - { required: true, message: "必填", trigger: "blur" } | |
| 249 | - ], | |
| 250 | - receiveDate:[ | |
| 251 | - { required: true, message: "必填", trigger: "blur" } | |
| 252 | - ], | |
| 253 | - appeal:[ | |
| 254 | - { required: true, message: "必填", trigger: "blur" } | |
| 255 | - ] | |
| 256 | - }, | |
| 257 | - fileEntityList: [], | |
| 258 | - openInfo:false, | |
| 259 | - idInfo:null, | |
| 260 | - }; | |
| 261 | - }, | |
| 262 | - created() { | |
| 263 | - this.getList(); | |
| 264 | - }, | |
| 265 | - methods: { | |
| 266 | - /** 查询办文办事信访类列表 */ | |
| 267 | - getList() { | |
| 268 | - this.loading = true; | |
| 269 | - listHandleAffairsXF(this.queryParams).then(response => { | |
| 270 | - this.handleAffairsXFList = response.rows; | |
| 271 | - this.total = response.total; | |
| 272 | - this.loading = false; | |
| 273 | - }); | |
| 274 | - }, | |
| 275 | - // 取消按钮 | |
| 276 | - cancel() { | |
| 277 | - this.open = false; | |
| 278 | - this.openInfo = false; | |
| 279 | - this.idInfo = null; | |
| 280 | - this.reset(); | |
| 281 | - }, | |
| 282 | - // 表单重置 | |
| 283 | - reset() { | |
| 284 | - this.fileEntityList=[]; | |
| 285 | - this.form = { | |
| 286 | - company: null, | |
| 287 | - receiveDate: null, | |
| 288 | - appeal: null, | |
| 289 | - deptOpinion: null, | |
| 290 | - zhbOpinion: null, | |
| 291 | - isRead: null, | |
| 292 | - }; | |
| 293 | - this.resetForm("form"); | |
| 294 | - }, | |
| 295 | - /** 搜索按钮操作 */ | |
| 296 | - handleQuery() { | |
| 297 | - this.queryParams.pageNum = 1; | |
| 298 | - this.getList(); | |
| 299 | - }, | |
| 300 | - /** 重置按钮操作 */ | |
| 301 | - resetQuery() { | |
| 302 | - this.resetForm("queryForm"); | |
| 303 | - this.handleQuery(); | |
| 304 | - }, | |
| 305 | - // 多选框选中数据 | |
| 306 | - handleSelectionChange(selection) { | |
| 307 | - this.ids = selection.map(item => item.id) | |
| 308 | - this.single = selection.length!==1 | |
| 309 | - this.multiple = !selection.length | |
| 310 | - }, | |
| 311 | - /** 查看按钮操作 */ | |
| 312 | - handleInfo(row){ | |
| 313 | - this.reset(); | |
| 314 | - this.idInfo = row.id; | |
| 315 | - this.title = "办文办事-信访类详情"; | |
| 316 | - this.openInfo = true; | |
| 317 | - }, | |
| 318 | - /** 新增按钮操作 */ | |
| 319 | - handleAdd() { | |
| 320 | - this.reset(); | |
| 321 | - this.open = true; | |
| 322 | - this.title = "添加办文办事信访类"; | |
| 323 | - }, | |
| 324 | - /** 修改按钮操作 */ | |
| 325 | - handleUpdate(row) { | |
| 326 | - this.reset(); | |
| 327 | - const id = row.id || this.ids | |
| 328 | - getHandleAffairsXF(id).then(response => { | |
| 329 | - this.form = response.data.handleAffairsXf; | |
| 330 | - let files = JSON.stringify(response.data.uploadFiles); | |
| 331 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | |
| 332 | - this.open = true; | |
| 333 | - this.title = "修改办文办事信访类"; | |
| 334 | - }); | |
| 335 | - }, | |
| 336 | - /** 提交按钮 */ | |
| 337 | - submitForm() { | |
| 338 | - this.$refs["form"].validate(valid => { | |
| 339 | - if (valid) { | |
| 340 | - let formData = new FormData(); | |
| 341 | - let form = this.form; | |
| 342 | - //去掉params属性 | |
| 343 | - delete form.params; | |
| 344 | - formData.append('fileList', null); | |
| 345 | - //将新增的文件放入formData | |
| 346 | - this.fileEntityList.forEach(item => { | |
| 347 | - if(item.id==null){ | |
| 348 | - formData.append('fileList', item.raw) | |
| 349 | - } | |
| 350 | - }) | |
| 351 | - if (this.form.id != null) { | |
| 352 | - formData.append("handleAffairsXf", JSON.stringify(form)); | |
| 353 | - formData.append("uploadFilesList", null); | |
| 354 | - this.fileEntityList.forEach(item => { | |
| 355 | - delete item.params; | |
| 356 | - if(item != "null" && item != null){ | |
| 357 | - formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); | |
| 358 | - } | |
| 359 | - }) | |
| 360 | - updateHandleAffairsXF(formData).then(response => { | |
| 361 | - this.msgSuccess("修改成功"); | |
| 362 | - this.open = false; | |
| 363 | - this.getList(); | |
| 364 | - }); | |
| 365 | - } else { | |
| 366 | - for (let key in form) { | |
| 367 | - formData.append(key, form[key] == null ? "" : form[key]) | |
| 368 | - } | |
| 369 | - addHandleAffairsXF(formData).then(response => { | |
| 370 | - this.msgSuccess("新增成功"); | |
| 371 | - this.open = false; | |
| 372 | - this.getList(); | |
| 373 | - }); | |
| 374 | - } | |
| 375 | - } | |
| 376 | - }); | |
| 377 | - }, | |
| 378 | - /** 删除按钮操作 */ | |
| 379 | - handleDelete(row) { | |
| 380 | - const ids = row.id || this.ids; | |
| 381 | - this.$confirm('是否确认删除办文办事信访类编号为"' + ids + '"的数据项?', "警告", { | |
| 382 | - confirmButtonText: "确定", | |
| 383 | - cancelButtonText: "取消", | |
| 384 | - type: "warning" | |
| 385 | - }).then(function() { | |
| 386 | - return delHandleAffairsXF(ids); | |
| 387 | - }).then(() => { | |
| 388 | - this.getList(); | |
| 389 | - this.msgSuccess("删除成功"); | |
| 390 | - }) | |
| 391 | - }, | |
| 392 | - /** 导出按钮操作 */ | |
| 393 | - handleExport() { | |
| 394 | - const queryParams = this.queryParams; | |
| 395 | - this.$confirm('是否确认导出所有办文办事信访类数据项?', "警告", { | |
| 396 | - confirmButtonText: "确定", | |
| 397 | - cancelButtonText: "取消", | |
| 398 | - type: "warning" | |
| 399 | - }).then(function() { | |
| 400 | - return exportHandleAffairsXF(queryParams); | |
| 401 | - }).then(response => { | |
| 402 | - this.download(response.message); | |
| 403 | - }) | |
| 404 | - }, | |
| 405 | - /** | |
| 406 | - * 文件改变时,限制文件上传格式和大小 | |
| 407 | - * 文件格式只能为docx/xlsx/xls/ppt/rar/zip/doc/pdf/png/jpeg/png/jpg | |
| 408 | - * 大小不超过5M | |
| 409 | - * */ | |
| 410 | - fileChange(file, fileList) { | |
| 411 | - let count = 0; | |
| 412 | - for (let i = 0; i < fileList.length; i++) { | |
| 413 | - // console.log(fileList.length) | |
| 414 | - // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 415 | - if (fileList[i].name == file.name) { | |
| 416 | - count++; | |
| 417 | - if (count == 2) { | |
| 418 | - this.$message({ | |
| 419 | - message: '已存在此文件!', | |
| 420 | - type: 'warning' | |
| 421 | - }); | |
| 422 | - for (let j = fileList.length; j > 0; j--) { | |
| 423 | - //如果存在此文件,去除新选择的重复文件 | |
| 424 | - if (fileList[j - 1].name == file.name) { | |
| 425 | - fileList.splice(j - 1, 1); | |
| 426 | - i--; | |
| 427 | - return false; | |
| 428 | - } | |
| 429 | - } | |
| 430 | - } | |
| 431 | - } | |
| 432 | - } | |
| 433 | - let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 434 | - //格式符合后判断大小 | |
| 435 | - if ("docx,xlsx,xls,ppt,rar,zip,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) { | |
| 436 | - let max5M = file.size / 1024 / 1024 < 5; | |
| 437 | - if (!max5M) { | |
| 438 | - this.$message({ | |
| 439 | - message: '上传文件大小不得超过5M!', | |
| 440 | - type: 'warning' | |
| 441 | - }); | |
| 442 | - } else { | |
| 443 | - //符合条件后进行添加 | |
| 444 | - this.fileEntityList = fileList | |
| 445 | - } | |
| 446 | - } else { | |
| 447 | - this.$message({ | |
| 448 | - message: '上传文件只能是 docx、xlsx、xls、ppt、rar、zip、doc、pdf、png、jpeg、png、jpg格式!', | |
| 449 | - type: 'warning' | |
| 450 | - }); | |
| 451 | - } | |
| 452 | - }, | |
| 453 | - // 删除文件 | |
| 454 | - handleDeleteFile(index) { | |
| 455 | - this.fileEntityList.splice(index, 1); | |
| 456 | - }, | |
| 457 | - /** 文件下载 */ | |
| 458 | - downloadFA(row) { | |
| 459 | - let name = row.name; | |
| 460 | - let url = row.url; | |
| 461 | - const a = document.createElement('a') | |
| 462 | - a.setAttribute('download', name) | |
| 463 | - a.setAttribute('target', '_blank') | |
| 464 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | |
| 465 | - a.click() | |
| 466 | - }, | |
| 467 | - } | |
| 468 | -}; | |
| 469 | -</script> |
trash-ui/src/views/h5/office/logistics/articleRequest.vue deleted
100644 → 0
trash-ui/src/views/h5/office/logistics/goods.vue deleted
100644 → 0
trash-ui/src/views/h5/office/logistics/index.vue deleted
100644 → 0
| 1 | -<template> | |
| 2 | - <div class="app-container"> | |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="105px"> | |
| 4 | - <el-form-item label="申请部门" prop="deptName"> | |
| 5 | - <el-select v-model="queryParams.deptName" placeholder="请输入申请部门" style="width: 100%"> | |
| 6 | - <el-option label="全部" value=""/> | |
| 7 | - <el-option v-for="item in depts" :label="item.name" :value="item.name" :key="item.code"/> | |
| 8 | - </el-select> | |
| 9 | - </el-form-item> | |
| 10 | - <el-form-item label="用章类型" prop="sealType" v-if="type==0"> | |
| 11 | - <el-select v-model="queryParams.sealType" placeholder="请选择用章类型" size="small"> | |
| 12 | - <el-option label="党委用章" value="党委用章"/> | |
| 13 | - <el-option label="行政用章" value="行政用章"/> | |
| 14 | - <el-option label="工会用章" value="工会用章"/> | |
| 15 | - </el-select> | |
| 16 | - </el-form-item> | |
| 17 | - <el-form-item label="物品申请人" prop="staff" v-if="type!=0"> | |
| 18 | - <el-input | |
| 19 | - v-model="queryParams.staff" | |
| 20 | - placeholder="请输入申请人" | |
| 21 | - | |
| 22 | - size="small" | |
| 23 | - | |
| 24 | - /> | |
| 25 | - </el-form-item> | |
| 26 | - <el-form-item label="物品申请日期" prop="useDate" v-if="type!=0"> | |
| 27 | - <el-date-picker size="small" style="width: 200px" | |
| 28 | - v-model="queryParams.useDate" | |
| 29 | - type="date" | |
| 30 | - value-format="yyyy-MM-dd" | |
| 31 | - placeholder="选择申请日期"> | |
| 32 | - </el-date-picker> | |
| 33 | - </el-form-item> | |
| 34 | - <el-form-item label="物品名称" prop="goodsName" v-if="type!=0"> | |
| 35 | - <el-input | |
| 36 | - v-model="queryParams.goodsName" | |
| 37 | - placeholder="请输入物品名称" | |
| 38 | - | |
| 39 | - size="small" | |
| 40 | - | |
| 41 | - /> | |
| 42 | - </el-form-item> | |
| 43 | - <el-form-item> | |
| 44 | - <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |
| 45 | - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |
| 46 | - </el-form-item> | |
| 47 | - </el-form> | |
| 48 | - | |
| 49 | - <el-row :gutter="10" class="mb8"> | |
| 50 | - <el-col :span="1.5"> | |
| 51 | - <el-button | |
| 52 | - type="primary" | |
| 53 | - icon="el-icon-plus" | |
| 54 | - size="mini" | |
| 55 | - @click="handleAdd" | |
| 56 | - v-hasPermi="['office:logistics:add']" | |
| 57 | - >新增 | |
| 58 | - </el-button> | |
| 59 | - </el-col> | |
| 60 | -<!-- <el-col :span="1.5">--> | |
| 61 | -<!-- <el-button--> | |
| 62 | -<!-- type="success"--> | |
| 63 | -<!-- icon="el-icon-edit"--> | |
| 64 | -<!-- size="mini"--> | |
| 65 | -<!-- :disabled="single"--> | |
| 66 | -<!-- @click="handleUpdate"--> | |
| 67 | -<!-- v-hasPermi="['office:logistics:edit']"--> | |
| 68 | -<!-- >修改--> | |
| 69 | -<!-- </el-button>--> | |
| 70 | -<!-- </el-col>--> | |
| 71 | - <!-- <el-col :span="1.5">--> | |
| 72 | - <!-- <el-button--> | |
| 73 | - <!-- type="danger"--> | |
| 74 | - <!-- icon="el-icon-delete"--> | |
| 75 | - <!-- size="mini"--> | |
| 76 | - <!-- :disabled="multiple"--> | |
| 77 | - <!-- @click="handleDelete"--> | |
| 78 | - <!-- v-hasPermi="['office:logistics:remove']"--> | |
| 79 | - <!-- >删除</el-button>--> | |
| 80 | - <!-- </el-col>--> | |
| 81 | - <el-col :span="1.5"> | |
| 82 | - <el-button | |
| 83 | - type="warning" | |
| 84 | - icon="el-icon-download" | |
| 85 | - size="mini" | |
| 86 | - @click="handleExport" | |
| 87 | - v-hasPermi="['office:logistics:export']" | |
| 88 | - >导出 | |
| 89 | - </el-button> | |
| 90 | - </el-col> | |
| 91 | - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 92 | - </el-row> | |
| 93 | - | |
| 94 | - <el-table v-loading="loading" :data="logisticsList" @selection-change="handleSelectionChange"> | |
| 95 | - <el-table-column type="selection" width="55" align="center"/> | |
| 96 | - <el-table-column label="申请部门" align="center" prop="deptName"/> | |
| 97 | - <!-- 用章申请 --> | |
| 98 | - <el-table-column label="用章类型" align="center" prop="sealType" v-if="type==0"/> | |
| 99 | - <el-table-column label="更新时间" align="center" prop="sealUpdateTime" width="180" v-if="type==0"> | |
| 100 | - <template slot-scope="scope"> | |
| 101 | - <span>{{ parseTime(scope.row.sealUpdateTime, '{y}-{m}-{d}') }}</span> | |
| 102 | - </template> | |
| 103 | - </el-table-column> | |
| 104 | - <el-table-column label="结束时间" align="center" prop="sealEndTime" width="180" v-if="type==0"> | |
| 105 | - <template slot-scope="scope"> | |
| 106 | - <span>{{ parseTime(scope.row.sealEndTime, '{y}-{m}-{d}') }}</span> | |
| 107 | - </template> | |
| 108 | - </el-table-column> | |
| 109 | - <el-table-column label="用途" align="center" prop="purpose" v-if="type==0"/> | |
| 110 | - <!-- 物品申请或物品采购申请 --> | |
| 111 | - <el-table-column label="申请人" align="center" prop="staff" v-if="type!=0"/> | |
| 112 | - <el-table-column label="申请日期" align="center" prop="useDate" width="180" v-if="type!=0"> | |
| 113 | - <template slot-scope="scope"> | |
| 114 | - <span>{{ parseTime(scope.row.useDate, '{y}-{m}-{d}') }}</span> | |
| 115 | - </template> | |
| 116 | - </el-table-column> | |
| 117 | - <el-table-column label="物品名称" align="center" prop="goodsName" v-if="type!=0"/> | |
| 118 | - <el-table-column label="数量" align="center" prop="quantity" v-if="type!=0"/> | |
| 119 | - <el-table-column label="审批状态" align="center"> | |
| 120 | - <template slot-scope="scope"> | |
| 121 | - <span>{{parseStatus(scope.row.status)}}</span> | |
| 122 | - </template> | |
| 123 | - </el-table-column> | |
| 124 | - <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |
| 125 | - <template slot-scope="scope"> | |
| 126 | - <el-button | |
| 127 | - size="mini" | |
| 128 | - type="text" | |
| 129 | - icon="el-icon-view" | |
| 130 | - @click="handleInfo(scope.row)" | |
| 131 | - v-hasPermi="['office:logistics:edit']" | |
| 132 | - >详情 | |
| 133 | - </el-button> | |
| 134 | - <el-button | |
| 135 | - size="mini" | |
| 136 | - type="text" | |
| 137 | - icon="el-icon-edit" | |
| 138 | - @click="handleUpdate(scope.row)" | |
| 139 | - v-if="scope.row.status==2" | |
| 140 | - v-hasPermi="['office:logistics:edit']" | |
| 141 | - >修改 | |
| 142 | - </el-button> | |
| 143 | -<!-- <el-button--> | |
| 144 | -<!-- size="mini"--> | |
| 145 | -<!-- type="text"--> | |
| 146 | -<!-- icon="el-icon-delete"--> | |
| 147 | -<!-- @click="handleDelete(scope.row)"--> | |
| 148 | -<!-- v-hasPermi="['office:logistics:remove']"--> | |
| 149 | -<!-- >删除--> | |
| 150 | -<!-- </el-button>--> | |
| 151 | - </template> | |
| 152 | - </el-table-column> | |
| 153 | - </el-table> | |
| 154 | - | |
| 155 | - <pagination | |
| 156 | - v-show="total>0" | |
| 157 | - :total="total" | |
| 158 | - :page.sync="queryParams.pageNum" | |
| 159 | - :limit.sync="queryParams.pageSize" | |
| 160 | - @pagination="getList" | |
| 161 | - /> | |
| 162 | - | |
| 163 | - <!-- 添加或修改后勤管理对话框 --> | |
| 164 | - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false"> | |
| 165 | - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 166 | - <el-form-item label="申请部门" prop="deptName"> | |
| 167 | - <el-select v-model="form.deptName" placeholder="请输入申请部门" style="width: 100%"> | |
| 168 | - <el-option v-for="item in depts" :label="item.name" :value="item.name" :key="item.code"/> | |
| 169 | - </el-select> | |
| 170 | - </el-form-item> | |
| 171 | - <el-form-item label="用章类型" prop="sealType" v-if="type==0"> | |
| 172 | - <el-select v-model="form.sealType" placeholder="请选择用章类型" style="width: 100%"> | |
| 173 | - <el-option label="党委用章" value="党委用章"/> | |
| 174 | - <el-option label="行政用章" value="行政用章"/> | |
| 175 | - <el-option label="工会用章" value="工会用章"/> | |
| 176 | - </el-select> | |
| 177 | - </el-form-item> | |
| 178 | - <el-form-item label="更新时间" prop="sealUpdateTime" v-if="type==0"> | |
| 179 | - <el-date-picker size="small" style="width: 100%" | |
| 180 | - v-model="form.sealUpdateTime" | |
| 181 | - type="date" | |
| 182 | - value-format="yyyy-MM-dd" | |
| 183 | - placeholder="选择更新时间"> | |
| 184 | - </el-date-picker> | |
| 185 | - </el-form-item> | |
| 186 | - <el-form-item label="结束时间" prop="sealEndTime" v-if="type==0"> | |
| 187 | - <el-date-picker size="small" style="width: 100%" | |
| 188 | - v-model="form.sealEndTime" | |
| 189 | - type="date" | |
| 190 | - value-format="yyyy-MM-dd" | |
| 191 | - placeholder="选择结束时间"> | |
| 192 | - </el-date-picker> | |
| 193 | - </el-form-item> | |
| 194 | - <el-form-item label="用途" prop="purpose" v-if="type==0"> | |
| 195 | - <el-input v-model="form.purpose" type="textarea" placeholder="请输入内容" :row="4"/> | |
| 196 | - </el-form-item> | |
| 197 | - <el-form-item label="申请人" prop="staff" v-if="type!=0"> | |
| 198 | - <el-input v-model="form.staff" placeholder="请输入申请人"/> | |
| 199 | - </el-form-item> | |
| 200 | - <el-form-item label="申请日期" prop="useDate" v-if="type!=0"> | |
| 201 | - <el-date-picker size="small" style="width: 100%" | |
| 202 | - v-model="form.useDate" | |
| 203 | - type="date" | |
| 204 | - value-format="yyyy-MM-dd" | |
| 205 | - placeholder="选择申请日期"> | |
| 206 | - </el-date-picker> | |
| 207 | - </el-form-item> | |
| 208 | - <el-form-item label="物品名称" prop="goodsName" v-if="type!=0"> | |
| 209 | - <el-input v-model="form.goodsName" placeholder="请输入物品名称"/> | |
| 210 | - </el-form-item> | |
| 211 | - <el-form-item label="数量" prop="quantity" v-if="type!=0"> | |
| 212 | - <el-input v-model="form.quantity" placeholder="请输入数量" | |
| 213 | - @input="form.quantity=form.quantity.replace(/[^0-9]/g,'');" | |
| 214 | - /> | |
| 215 | - </el-form-item> | |
| 216 | - </el-form> | |
| 217 | - <div slot="footer" class="dialog-footer"> | |
| 218 | - <el-button type="primary" @click="submitForm">确 定</el-button> | |
| 219 | - <el-button @click="cancel">取 消</el-button> | |
| 220 | - </div> | |
| 221 | - </el-dialog> | |
| 222 | - <el-dialog :title="title" :visible.sync="openInfo" width="500px" append-to-body :close-on-click-modal="false"> | |
| 223 | - <logisticsInfo :idInfo="idInfo" @refresh="getList" v-if="openInfo"/> | |
| 224 | - <div slot="footer" class="dialog-footer"> | |
| 225 | - <el-button @click="cancel">取 消</el-button> | |
| 226 | - </div> | |
| 227 | - </el-dialog> | |
| 228 | - </div> | |
| 229 | -</template> | |
| 230 | - | |
| 231 | -<script> | |
| 232 | -import { | |
| 233 | - listLogistics, | |
| 234 | - getLogistics, | |
| 235 | - delLogistics, | |
| 236 | - addLogistics, | |
| 237 | - updateLogistics, | |
| 238 | - exportLogistics | |
| 239 | -} from "@/api/office/logistics"; | |
| 240 | -import logisticsInfo from "./logisticsInfo"; | |
| 241 | -import {getDict} from "@/api/dict"; | |
| 242 | - | |
| 243 | -export default { | |
| 244 | - name: "Logistics", | |
| 245 | - props: { | |
| 246 | - type: { | |
| 247 | - type: Number | |
| 248 | - } | |
| 249 | - }, | |
| 250 | - components: { | |
| 251 | - logisticsInfo | |
| 252 | - }, | |
| 253 | - data() { | |
| 254 | - return { | |
| 255 | - // 遮罩层 | |
| 256 | - loading: true, | |
| 257 | - // 选中数组 | |
| 258 | - ids: [], | |
| 259 | - // 非单个禁用 | |
| 260 | - single: true, | |
| 261 | - // 非多个禁用 | |
| 262 | - multiple: true, | |
| 263 | - // 显示搜索条件 | |
| 264 | - showSearch: true, | |
| 265 | - // 总条数 | |
| 266 | - total: 0, | |
| 267 | - // 后勤管理表格数据 | |
| 268 | - logisticsList: [], | |
| 269 | - // 弹出层标题 | |
| 270 | - title: "", | |
| 271 | - // 是否显示弹出层 | |
| 272 | - open: false, | |
| 273 | - // 查询参数 | |
| 274 | - queryParams: { | |
| 275 | - pageNum: 1, | |
| 276 | - pageSize: 10, | |
| 277 | - type: this.type, | |
| 278 | - deptName: null, | |
| 279 | - sealType: null, | |
| 280 | - staff: null, | |
| 281 | - useDate: null, | |
| 282 | - goodsName: null, | |
| 283 | - }, | |
| 284 | - // 表单参数 | |
| 285 | - form: {}, | |
| 286 | - // 表单校验 | |
| 287 | - rules: { | |
| 288 | - deptName: [ | |
| 289 | - {required: true, message: "必填", trigger: "blur"} | |
| 290 | - ], | |
| 291 | - sealType: [ | |
| 292 | - {required: true, message: "必填", trigger: "change"} | |
| 293 | - ], | |
| 294 | - sealUpdateTime: [ | |
| 295 | - {required: true, message: "必填", trigger: "blur"} | |
| 296 | - ], | |
| 297 | - sealEndTime: [ | |
| 298 | - {required: true, message: "必填", trigger: "blur"} | |
| 299 | - ], | |
| 300 | - purpose: [ | |
| 301 | - {required: true, message: "必填", trigger: "blur"} | |
| 302 | - ], | |
| 303 | - staff: [ | |
| 304 | - {required: true, message: "必填", trigger: "blur"} | |
| 305 | - ], | |
| 306 | - useDate: [ | |
| 307 | - {required: true, message: "必填", trigger: "blur"} | |
| 308 | - ], | |
| 309 | - goodsName: [ | |
| 310 | - {required: true, message: "必填", trigger: "blur"} | |
| 311 | - ], | |
| 312 | - quantity: [ | |
| 313 | - {required: true, message: "必填", trigger: "blur"} | |
| 314 | - ], | |
| 315 | - }, | |
| 316 | - openInfo: false, | |
| 317 | - idInfo: null, | |
| 318 | - depts:[] | |
| 319 | - }; | |
| 320 | - }, | |
| 321 | - created() { | |
| 322 | - let dep = {type:"CSUserDepartmentType"}; | |
| 323 | - getDict(dep).then(res=>{ | |
| 324 | - this.depts = res.result; | |
| 325 | - }); | |
| 326 | - this.getList(); | |
| 327 | - }, | |
| 328 | - methods: { | |
| 329 | - /** 查询后勤管理列表 */ | |
| 330 | - getList() { | |
| 331 | - this.loading = true; | |
| 332 | - listLogistics(this.queryParams).then(response => { | |
| 333 | - this.logisticsList = response.rows; | |
| 334 | - this.total = response.total; | |
| 335 | - this.loading = false; | |
| 336 | - }); | |
| 337 | - }, | |
| 338 | - // 取消按钮 | |
| 339 | - cancel() { | |
| 340 | - this.open = false; | |
| 341 | - this.openInfo = false; | |
| 342 | - this.reset(); | |
| 343 | - }, | |
| 344 | - // 表单重置 | |
| 345 | - reset() { | |
| 346 | - this.form = { | |
| 347 | - deptName: null, | |
| 348 | - sealType: null, | |
| 349 | - sealUpdateTime: null, | |
| 350 | - sealEndTime: null, | |
| 351 | - purpose: null, | |
| 352 | - staff: null, | |
| 353 | - useDate: null, | |
| 354 | - goodsName: null, | |
| 355 | - quantity: null, | |
| 356 | - status: 0, | |
| 357 | - createTime: null, | |
| 358 | - createBy: null, | |
| 359 | - updateTime: null, | |
| 360 | - updateBy: null | |
| 361 | - }; | |
| 362 | - this.resetForm("form"); | |
| 363 | - }, | |
| 364 | - /** 搜索按钮操作 */ | |
| 365 | - handleQuery() { | |
| 366 | - this.queryParams.pageNum = 1; | |
| 367 | - this.queryParams.type = this.type; | |
| 368 | - this.getList(); | |
| 369 | - }, | |
| 370 | - /** 重置按钮操作 */ | |
| 371 | - resetQuery() { | |
| 372 | - this.resetForm("queryForm"); | |
| 373 | - this.handleQuery(); | |
| 374 | - }, | |
| 375 | - // 多选框选中数据 | |
| 376 | - handleSelectionChange(selection) { | |
| 377 | - this.ids = selection.map(item => item.id) | |
| 378 | - this.single = selection.length !== 1 | |
| 379 | - this.multiple = !selection.length | |
| 380 | - }, | |
| 381 | - /** 新增按钮操作 */ | |
| 382 | - handleAdd() { | |
| 383 | - this.reset(); | |
| 384 | - this.open = true; | |
| 385 | - this.title = "添加后勤管理"; | |
| 386 | - }, | |
| 387 | - /** 查看按钮操作 */ | |
| 388 | - handleInfo(row) { | |
| 389 | - this.idInfo = row.id+""; | |
| 390 | - this.openInfo = true; | |
| 391 | - this.title = "查看后勤管理"; | |
| 392 | - }, | |
| 393 | - /** 修改按钮操作 */ | |
| 394 | - handleUpdate(row) { | |
| 395 | - this.reset(); | |
| 396 | - const id = row.id || this.ids | |
| 397 | - getLogistics(id).then(response => { | |
| 398 | - this.form = response.data; | |
| 399 | - this.open = true; | |
| 400 | - this.title = "修改后勤管理"; | |
| 401 | - }); | |
| 402 | - }, | |
| 403 | - /** 提交按钮 */ | |
| 404 | - submitForm() { | |
| 405 | - this.form.type = this.type; | |
| 406 | - this.$refs["form"].validate(valid => { | |
| 407 | - if (valid) { | |
| 408 | - if (this.form.id != null) { | |
| 409 | - updateLogistics(this.form).then(response => { | |
| 410 | - this.msgSuccess("修改成功"); | |
| 411 | - this.open = false; | |
| 412 | - this.getList(); | |
| 413 | - }); | |
| 414 | - } else { | |
| 415 | - addLogistics(this.form).then(response => { | |
| 416 | - this.msgSuccess("新增成功"); | |
| 417 | - this.open = false; | |
| 418 | - this.getList(); | |
| 419 | - }); | |
| 420 | - } | |
| 421 | - } | |
| 422 | - }); | |
| 423 | - }, | |
| 424 | - /** 删除按钮操作 */ | |
| 425 | - handleDelete(row) { | |
| 426 | - const ids = row.id || this.ids; | |
| 427 | - this.$confirm('是否确认删除后勤管理编号为"' + ids + '"的数据项?', "警告", { | |
| 428 | - confirmButtonText: "确定", | |
| 429 | - cancelButtonText: "取消", | |
| 430 | - type: "warning" | |
| 431 | - }).then(function () { | |
| 432 | - return delLogistics(ids); | |
| 433 | - }).then(() => { | |
| 434 | - this.getList(); | |
| 435 | - this.msgSuccess("删除成功"); | |
| 436 | - }) | |
| 437 | - }, | |
| 438 | - /** 导出按钮操作 */ | |
| 439 | - handleExport() { | |
| 440 | - const queryParams = this.queryParams; | |
| 441 | - this.$confirm('是否确认导出所有后勤管理数据项?', "警告", { | |
| 442 | - confirmButtonText: "确定", | |
| 443 | - cancelButtonText: "取消", | |
| 444 | - type: "warning" | |
| 445 | - }).then(function () { | |
| 446 | - return exportLogistics(queryParams); | |
| 447 | - }).then(response => { | |
| 448 | - this.download(response.message); | |
| 449 | - }) | |
| 450 | - }, | |
| 451 | - changeType() { | |
| 452 | - if (this.type == 0) { | |
| 453 | - this.form.staff = null; | |
| 454 | - this.form.useDate = null; | |
| 455 | - this.form.goodsName = null; | |
| 456 | - this.form.quantity = null; | |
| 457 | - this.rules.sealType[0].required = true; | |
| 458 | - this.rules.sealUpdateTime[0].required = true; | |
| 459 | - this.rules.sealEndTime[0].required = true; | |
| 460 | - this.rules.purpose[0].required = true; | |
| 461 | - this.rules.staff[0].required = false; | |
| 462 | - this.rules.useDate[0].required = false; | |
| 463 | - this.rules.goodsName[0].required = false; | |
| 464 | - this.rules.quantity[0].required = false; | |
| 465 | - } else { | |
| 466 | - this.form.sealType = null; | |
| 467 | - this.form.sealUpdateTime = null; | |
| 468 | - this.form.sealEndTime = null; | |
| 469 | - this.form.purpose = null; | |
| 470 | - this.rules.sealType[0].required = false; | |
| 471 | - this.rules.sealUpdateTime[0].required = false; | |
| 472 | - this.rules.sealEndTime[0].required = false; | |
| 473 | - this.rules.purpose[0].required = false; | |
| 474 | - this.rules.staff[0].required = true; | |
| 475 | - this.rules.useDate[0].required = true; | |
| 476 | - this.rules.goodsName[0].required = true; | |
| 477 | - this.rules.quantity[0].required = true; | |
| 478 | - } | |
| 479 | - } | |
| 480 | - } | |
| 481 | -}; | |
| 482 | -</script> |
trash-ui/src/views/h5/office/logistics/logisticsInfo.vue deleted
100644 → 0
| 1 | -<template> | |
| 2 | - <el-form ref="form" :model="form" label-width="80px"> | |
| 3 | - <el-form-item label="申请部门" prop="deptId"> | |
| 4 | - <el-select v-model="form.deptId" placeholder="请输入申请部门" style="width: 100%" :disabled="true"> | |
| 5 | - <el-option v-for="item in depts" :label="item.name" :value="item.name" :key="item.code"/> | |
| 6 | - </el-select> | |
| 7 | - </el-form-item> | |
| 8 | - <el-form-item label="用章类型" prop="sealType" v-if="type==0"> | |
| 9 | - <el-select v-model="form.sealType" placeholder="请选择用章类型" style="width: 100%" :disabled="true"> | |
| 10 | - <el-option label="党委用章" value="党委用章"/> | |
| 11 | - <el-option label="行政用章" value="行政用章"/> | |
| 12 | - <el-option label="工会用章" value="工会用章"/> | |
| 13 | - </el-select> | |
| 14 | - </el-form-item> | |
| 15 | - <el-form-item label="更新时间" prop="sealUpdateTime" v-if="type==0"> | |
| 16 | - <el-date-picker size="small" style="width: 100%" | |
| 17 | - v-model="form.sealUpdateTime" | |
| 18 | - type="date" | |
| 19 | - :disabled="true" | |
| 20 | - value-format="yyyy-MM-dd" | |
| 21 | - placeholder="选择更新时间"> | |
| 22 | - </el-date-picker> | |
| 23 | - </el-form-item> | |
| 24 | - <el-form-item label="结束时间" prop="sealEndTime" v-if="type==0"> | |
| 25 | - <el-date-picker size="small" style="width: 100%" | |
| 26 | - v-model="form.sealEndTime" | |
| 27 | - type="date" | |
| 28 | - value-format="yyyy-MM-dd" | |
| 29 | - :disabled="true" | |
| 30 | - placeholder="选择结束时间"> | |
| 31 | - </el-date-picker> | |
| 32 | - </el-form-item> | |
| 33 | - <el-form-item label="用途" prop="purpose" v-if="type==0"> | |
| 34 | - <el-input v-model="form.purpose" type="textarea" placeholder="请输入内容" :row="4" :disabled="true"/> | |
| 35 | - </el-form-item> | |
| 36 | - <el-form-item label="申请人" prop="staff" v-if="type!=0"> | |
| 37 | - <el-input v-model="form.staff" placeholder="请输入申请人" :disabled="true"/> | |
| 38 | - </el-form-item> | |
| 39 | - <el-form-item label="申请日期" prop="useDate" v-if="type!=0"> | |
| 40 | - <el-date-picker size="small" style="width: 100%" | |
| 41 | - v-model="form.useDate" | |
| 42 | - type="date" | |
| 43 | - value-format="yyyy-MM-dd" | |
| 44 | - :disabled="true" | |
| 45 | - placeholder="选择申请日期"> | |
| 46 | - </el-date-picker> | |
| 47 | - </el-form-item> | |
| 48 | - <el-form-item label="物品名称" prop="goodsName" v-if="type!=0"> | |
| 49 | - <el-input v-model="form.goodsName" placeholder="请输入物品名称" :disabled="true"/> | |
| 50 | - </el-form-item> | |
| 51 | - <el-form-item label="数量" prop="quantity" v-if="type!=0"> | |
| 52 | - <el-input v-model="form.quantity" | |
| 53 | - placeholder="请输入数量" | |
| 54 | - :disabled="true" | |
| 55 | - @input="form.quantity=form.quantity.replace(/[^0-9]/g,'');"/> | |
| 56 | - </el-form-item> | |
| 57 | - </el-form> | |
| 58 | -</template> | |
| 59 | - | |
| 60 | -<script> | |
| 61 | -import {getLogistics} from "@/api/office/logistics"; | |
| 62 | -import {getDict} from "@/api/dict"; | |
| 63 | -export default { | |
| 64 | - name: "logisticsInfo", | |
| 65 | - props: { | |
| 66 | - businessKey: { | |
| 67 | - type: String | |
| 68 | - }, | |
| 69 | - idInfo: { | |
| 70 | - type: String | |
| 71 | - } | |
| 72 | - }, | |
| 73 | - data() { | |
| 74 | - return { | |
| 75 | - form: {}, | |
| 76 | - type:null, | |
| 77 | - depts:[] | |
| 78 | - } | |
| 79 | - }, | |
| 80 | - created() { | |
| 81 | - let dep = {type:"CSUserDepartmentType"}; | |
| 82 | - getDict(dep).then(res=>{ | |
| 83 | - this.depts = res.result; | |
| 84 | - }); | |
| 85 | - this.init(); | |
| 86 | - }, | |
| 87 | - methods:{ | |
| 88 | - init(){ | |
| 89 | - getLogistics(this.idInfo).then(response => { | |
| 90 | - this.form = response.data | |
| 91 | - this.type = response.data.type; | |
| 92 | - }); | |
| 93 | - } | |
| 94 | - } | |
| 95 | -} | |
| 96 | -</script> | |
| 97 | - | |
| 98 | -<style scoped> | |
| 99 | - | |
| 100 | -</style> |
trash-ui/src/views/h5/office/logistics/seal.vue deleted
100644 → 0
trash-ui/src/views/h5/office/management/contractInfo.vue deleted
100644 → 0
| 1 | -<template> | |
| 2 | - <el-form ref="form" :model="form" label-width="105px"> | |
| 3 | - <el-row :gutter="2"> | |
| 4 | - <el-col :span="11"> | |
| 5 | - <el-form-item label="合同编号" prop="contractNumber"> | |
| 6 | - <el-input v-model="form.contractNumber" placeholder="请输入合同编号" :disabled="true"/> | |
| 7 | - </el-form-item> | |
| 8 | - </el-col> | |
| 9 | - <el-col :span="11"> | |
| 10 | - <el-form-item label="合同名称" prop="contractName"> | |
| 11 | - <el-input v-model="form.contractName" placeholder="请输入合同名称" :disabled="true"/> | |
| 12 | - </el-form-item> | |
| 13 | - </el-col> | |
| 14 | - </el-row> | |
| 15 | - <el-row :gutter="2"> | |
| 16 | - <el-col :span="11"> | |
| 17 | - <el-form-item label="甲方" prop="firstParty"> | |
| 18 | - <el-input v-model="form.firstParty" placeholder="请输入甲方" :disabled="true"/> | |
| 19 | - </el-form-item> | |
| 20 | - </el-col> | |
| 21 | - <el-col :span="11"> | |
| 22 | - <el-form-item label="乙方" prop="secondParty"> | |
| 23 | - <el-input v-model="form.secondParty" placeholder="请输入乙方" :disabled="true"/> | |
| 24 | - </el-form-item> | |
| 25 | - </el-col> | |
| 26 | - </el-row> | |
| 27 | - <el-row :gutter="2"> | |
| 28 | - <el-col :span="11"> | |
| 29 | - <el-form-item label="开始时间" prop="contractBeginDate"> | |
| 30 | - <el-date-picker size="small" style="width: 100%;" | |
| 31 | - v-model="form.contractBeginDate" | |
| 32 | - type="datetime" | |
| 33 | - value-format="yyyy-MM-dd HH:mm:ss" | |
| 34 | - :disabled="true" | |
| 35 | - placeholder="选择合同开始时间"> | |
| 36 | - </el-date-picker> | |
| 37 | - </el-form-item> | |
| 38 | - </el-col> | |
| 39 | - <el-col :span="11"> | |
| 40 | - <el-form-item label="结束时间" prop="contractEndDate"> | |
| 41 | - <el-date-picker size="small" style="width: 100%;" | |
| 42 | - v-model="form.contractEndDate" | |
| 43 | - type="datetime" | |
| 44 | - value-format="yyyy-MM-dd HH:mm:ss" | |
| 45 | - :disabled="true" | |
| 46 | - placeholder="选择合同结束时间"> | |
| 47 | - </el-date-picker> | |
| 48 | - </el-form-item> | |
| 49 | - </el-col> | |
| 50 | - </el-row> | |
| 51 | - <el-row :gutter="2"> | |
| 52 | - <el-col :span="11"> | |
| 53 | - <el-form-item label="合同金额" prop="contractMoney"> | |
| 54 | - <el-input v-model="form.contractMoney" | |
| 55 | - :disabled="true" | |
| 56 | - @input="form.contractMoney=form.contractMoney.replace(/[^0-9.]/g,'').replace(/^\./g, '').replace('.', 'dollar#dollar').replace(/\./g, '').replace('dollar#dollar', '.');" | |
| 57 | - placeholder="请输入合同金额"/> | |
| 58 | - </el-form-item> | |
| 59 | - </el-col> | |
| 60 | - <el-col :span="11"> | |
| 61 | - <el-form-item label="合同状态" prop="contractState"> | |
| 62 | - <el-select v-model="form.contractState" placeholder="请选择状态" style="width: 100%;" :disabled="true"> | |
| 63 | - <el-option label="已签订" value="已签订"/> | |
| 64 | - <el-option label="未签订" value="未签订"/> | |
| 65 | - <el-option label="已过期" value="已过期"/> | |
| 66 | - <el-option label="已终止" value="已终止"/> | |
| 67 | - <el-option label="已完结" value="已完结"/> | |
| 68 | - </el-select> | |
| 69 | - </el-form-item> | |
| 70 | - </el-col> | |
| 71 | - </el-row> | |
| 72 | - <el-row :gutter="2"> | |
| 73 | - <el-col :span="11"> | |
| 74 | - <el-form-item label="合同签订时间" prop="signTime"> | |
| 75 | - <el-date-picker size="small" style="width: 100%;" | |
| 76 | - v-model="form.signTime" | |
| 77 | - type="datetime" | |
| 78 | - value-format="yyyy-MM-dd HH:mm:ss" | |
| 79 | - :disabled="true" | |
| 80 | - placeholder="选择合同签订时间"> | |
| 81 | - </el-date-picker> | |
| 82 | - </el-form-item> | |
| 83 | - </el-col> | |
| 84 | - <el-col :span="11"> | |
| 85 | - <el-form-item label="责任部门" prop="deptid"> | |
| 86 | - <el-select v-model="form.deptName" placeholder="请选择科室" style="width: 100%;" :disabled="true"> | |
| 87 | - </el-select> | |
| 88 | - </el-form-item> | |
| 89 | - </el-col> | |
| 90 | - </el-row> | |
| 91 | - <el-row> | |
| 92 | - <el-table :data="fileEntityList"> | |
| 93 | - <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | |
| 94 | - <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | |
| 95 | - <template slot-scope="scope"> | |
| 96 | - <el-button | |
| 97 | - size="small" type="success" | |
| 98 | - icon="el-icon-download" | |
| 99 | - @click="downloadFA(scope.row)" | |
| 100 | - v-hasPermi="['office:management:edit']" | |
| 101 | - v-if="form.id!=null" | |
| 102 | - round>下载 | |
| 103 | - </el-button> | |
| 104 | - </template> | |
| 105 | - </el-table-column> | |
| 106 | - </el-table> | |
| 107 | - </el-row> | |
| 108 | - </el-form> | |
| 109 | -</template> | |
| 110 | - | |
| 111 | -<script> | |
| 112 | -import {getManagement} from "@/api/office/management"; | |
| 113 | -export default { | |
| 114 | - name: "contractInfo", | |
| 115 | - props: { | |
| 116 | - businessKey: { | |
| 117 | - type: String | |
| 118 | - }, | |
| 119 | - idInfo: { | |
| 120 | - type: Number | |
| 121 | - } | |
| 122 | - }, | |
| 123 | - data() { | |
| 124 | - return { | |
| 125 | - form: {}, | |
| 126 | - fileEntityList:[] | |
| 127 | - } | |
| 128 | - }, | |
| 129 | - created() { | |
| 130 | - this.init(); | |
| 131 | - }, | |
| 132 | - methods:{ | |
| 133 | - init(){ | |
| 134 | - getManagement(this.idInfo).then(response => { | |
| 135 | - this.form = response.data.contractManagement; | |
| 136 | - let files = JSON.stringify(response.data.uploadFiles); | |
| 137 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | |
| 138 | - }); | |
| 139 | - }, | |
| 140 | - /** 文件下载 */ | |
| 141 | - downloadFA(row) { | |
| 142 | - let name = row.name; | |
| 143 | - let url = row.url; | |
| 144 | - const a = document.createElement('a') | |
| 145 | - a.setAttribute('download', name) | |
| 146 | - a.setAttribute('target', '_blank') | |
| 147 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | |
| 148 | - a.click() | |
| 149 | - }, | |
| 150 | - } | |
| 151 | -} | |
| 152 | -</script> | |
| 153 | - | |
| 154 | -<style scoped> | |
| 155 | - | |
| 156 | -</style> |
trash-ui/src/views/h5/office/management/index.vue deleted
100644 → 0
| 1 | -<template> | |
| 2 | - <div class="app-container"> | |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="105px"> | |
| 4 | - <el-form-item label="合同名称" prop="contractName"> | |
| 5 | - <el-input | |
| 6 | - v-model="queryParams.contractName" | |
| 7 | - placeholder="请输入合同名称" | |
| 8 | - | |
| 9 | - size="small" | |
| 10 | - | |
| 11 | - /> | |
| 12 | - </el-form-item> | |
| 13 | - <el-form-item label="合同状态" prop="contractState"> | |
| 14 | - <el-select v-model="queryParams.contractState" placeholder="请选择状态" style="width: 100%;"> | |
| 15 | - <el-option label="全部" value=""></el-option> | |
| 16 | - <el-option label="已签订" value="已签订"/> | |
| 17 | - <el-option label="未签订" value="未签订"/> | |
| 18 | - <el-option label="已过期" value="已过期"/> | |
| 19 | - <el-option label="已终止" value="已终止"/> | |
| 20 | - <el-option label="已完结" value="已完结"/> | |
| 21 | - </el-select> | |
| 22 | - </el-form-item> | |
| 23 | - <el-form-item> | |
| 24 | - <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |
| 25 | - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |
| 26 | - </el-form-item> | |
| 27 | - </el-form> | |
| 28 | - | |
| 29 | - <el-row :gutter="10" class="mb8"> | |
| 30 | - <el-col :span="1.5"> | |
| 31 | - <el-button | |
| 32 | - type="primary" | |
| 33 | - icon="el-icon-plus" | |
| 34 | - size="mini" | |
| 35 | - @click="handleAdd" | |
| 36 | - v-hasPermi="['office:management:add']" | |
| 37 | - >新增 | |
| 38 | - </el-button> | |
| 39 | - </el-col> | |
| 40 | - <el-col :span="1.5"> | |
| 41 | - <el-button | |
| 42 | - type="success" | |
| 43 | - icon="el-icon-edit" | |
| 44 | - size="mini" | |
| 45 | - :disabled="single" | |
| 46 | - @click="handleUpdate" | |
| 47 | - v-hasPermi="['office:management:edit']" | |
| 48 | - >修改 | |
| 49 | - </el-button> | |
| 50 | - </el-col> | |
| 51 | - <el-col :span="1.5"> | |
| 52 | - <el-button | |
| 53 | - type="danger" | |
| 54 | - icon="el-icon-delete" | |
| 55 | - size="mini" | |
| 56 | - :disabled="multiple" | |
| 57 | - @click="handleDelete" | |
| 58 | - v-hasPermi="['office:management:remove']" | |
| 59 | - >删除 | |
| 60 | - </el-button> | |
| 61 | - </el-col> | |
| 62 | - <el-col :span="1.5"> | |
| 63 | - <el-button | |
| 64 | - type="warning" | |
| 65 | - icon="el-icon-download" | |
| 66 | - size="mini" | |
| 67 | - @click="handleExport" | |
| 68 | - v-hasPermi="['office:management:export']" | |
| 69 | - >导出 | |
| 70 | - </el-button> | |
| 71 | - </el-col> | |
| 72 | - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 73 | - </el-row> | |
| 74 | - | |
| 75 | - <el-table v-loading="loading" :data="managementList" @selection-change="handleSelectionChange"> | |
| 76 | - <el-table-column type="selection" width="55" align="center"/> | |
| 77 | - <el-table-column label="合同名称" align="center" prop="contractName"/> | |
| 78 | - <el-table-column label="乙方" align="center" prop="secondParty"/> | |
| 79 | - <el-table-column label="责任科室" align="center" prop="deptName"/> | |
| 80 | - <el-table-column label="合同金额" align="center" prop="contractMoney"/> | |
| 81 | - <el-table-column label="合同状态" align="center" prop="contractState"/> | |
| 82 | -<!-- <el-table-column label="审批状态" align="center" prop="status">--> | |
| 83 | -<!-- <template slot-scope="scope">--> | |
| 84 | -<!-- <span>{{parseStatus(scope.row.status) }}</span>--> | |
| 85 | -<!-- </template>--> | |
| 86 | -<!-- </el-table-column>--> | |
| 87 | - <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |
| 88 | - <template slot-scope="scope"> | |
| 89 | - <el-button | |
| 90 | - size="mini" | |
| 91 | - type="text" | |
| 92 | - icon="el-icon-view" | |
| 93 | - @click="handleInfo(scope.row)" | |
| 94 | - v-hasPermi="['office:management:edit']" | |
| 95 | - >详情 | |
| 96 | - </el-button> | |
| 97 | - <el-button | |
| 98 | - size="mini" | |
| 99 | - type="text" | |
| 100 | - icon="el-icon-edit" | |
| 101 | - @click="handleUpdate(scope.row)" | |
| 102 | - v-hasPermi="['office:management:edit']" | |
| 103 | - >编辑 | |
| 104 | - </el-button> | |
| 105 | - <el-button | |
| 106 | - size="mini" | |
| 107 | - type="text" | |
| 108 | - icon="el-icon-delete" | |
| 109 | - @click="handleDelete(scope.row)" | |
| 110 | - v-hasPermi="['office:management:remove']" | |
| 111 | - >删除 | |
| 112 | - </el-button> | |
| 113 | - </template> | |
| 114 | - </el-table-column> | |
| 115 | - </el-table> | |
| 116 | - | |
| 117 | - <pagination | |
| 118 | - v-show="total>0" | |
| 119 | - :total="total" | |
| 120 | - :page.sync="queryParams.pageNum" | |
| 121 | - :limit.sync="queryParams.pageSize" | |
| 122 | - @pagination="getList" | |
| 123 | - /> | |
| 124 | - | |
| 125 | - <!-- 添加或修改合同管理对话框 --> | |
| 126 | - <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body :close-on-click-modal="false"> | |
| 127 | - <el-form ref="form" :model="form" :rules="rules" label-width="125px"> | |
| 128 | - <el-row :gutter="2"> | |
| 129 | - <el-col :span="11"> | |
| 130 | - <el-form-item label="合同编号" prop="contractNumber"> | |
| 131 | - <el-input v-model="form.contractNumber" placeholder="请输入合同编号" :maxlength="50" show-word-limit/> | |
| 132 | - </el-form-item> | |
| 133 | - </el-col> | |
| 134 | - <el-col :span="11"> | |
| 135 | - <el-form-item label="合同名称" prop="contractName"> | |
| 136 | - <el-input v-model="form.contractName" placeholder="请输入合同名称" :maxlength="50" show-word-limit/> | |
| 137 | - </el-form-item> | |
| 138 | - </el-col> | |
| 139 | - </el-row> | |
| 140 | - <el-row :gutter="2"> | |
| 141 | - <el-col :span="11"> | |
| 142 | - <el-form-item label="甲方" prop="firstParty"> | |
| 143 | - <el-input v-model="form.firstParty" placeholder="请输入甲方" :maxlength="50" show-word-limit/> | |
| 144 | - </el-form-item> | |
| 145 | - </el-col> | |
| 146 | - <el-col :span="11"> | |
| 147 | - <el-form-item label="乙方" prop="secondParty"> | |
| 148 | - <el-input v-model="form.secondParty" placeholder="请输入乙方"/> | |
| 149 | - </el-form-item> | |
| 150 | - </el-col> | |
| 151 | - </el-row> | |
| 152 | - <el-row :gutter="2"> | |
| 153 | - <el-col :span="11"> | |
| 154 | - <el-form-item label="开始时间" prop="contractBeginDate"> | |
| 155 | - <el-date-picker size="small" style="width: 100%;" | |
| 156 | - v-model="form.contractBeginDate" | |
| 157 | - type="datetime" | |
| 158 | - value-format="yyyy-MM-dd HH:mm:ss" | |
| 159 | - placeholder="选择合同开始时间"> | |
| 160 | - </el-date-picker> | |
| 161 | - </el-form-item> | |
| 162 | - </el-col> | |
| 163 | - <el-col :span="11"> | |
| 164 | - <el-form-item label="结束时间" prop="contractEndDate"> | |
| 165 | - <el-date-picker size="small" style="width: 100%;" | |
| 166 | - v-model="form.contractEndDate" | |
| 167 | - type="datetime" | |
| 168 | - value-format="yyyy-MM-dd HH:mm:ss" | |
| 169 | - placeholder="选择合同结束时间"> | |
| 170 | - </el-date-picker> | |
| 171 | - </el-form-item> | |
| 172 | - </el-col> | |
| 173 | - </el-row> | |
| 174 | - <el-row :gutter="2"> | |
| 175 | - <el-col :span="11"> | |
| 176 | - <el-form-item label="合同金额" prop="contractMoney"> | |
| 177 | - <el-input v-model="form.contractMoney" | |
| 178 | - @input="form.contractMoney=form.contractMoney.replace(/[^0-9.]/g,'').replace(/^\./g, '').replace('.', 'dollar#dollar').replace(/\./g, '').replace('dollar#dollar', '.');" | |
| 179 | - :maxlength="10" show-word-limit | |
| 180 | - placeholder="请输入合同金额"/> | |
| 181 | - </el-form-item> | |
| 182 | - </el-col> | |
| 183 | - <el-col :span="11"> | |
| 184 | - <el-form-item label="合同状态" prop="contractState"> | |
| 185 | - <el-select v-model="form.contractState" placeholder="请选择状态" style="width: 100%;"> | |
| 186 | - <el-option label="已签订" value="已签订"/> | |
| 187 | - <el-option label="未签订" value="未签订"/> | |
| 188 | - <el-option label="已过期" value="已过期"/> | |
| 189 | - <el-option label="已终止" value="已终止"/> | |
| 190 | - <el-option label="已完结" value="已完结"/> | |
| 191 | - </el-select> | |
| 192 | - </el-form-item> | |
| 193 | - </el-col> | |
| 194 | - </el-row> | |
| 195 | - <el-row :gutter="2"> | |
| 196 | - <el-col :span="11"> | |
| 197 | - <el-form-item label="合同签订时间" prop="signTime"> | |
| 198 | - <el-date-picker size="small" style="width: 100%;" | |
| 199 | - v-model="form.signTime" | |
| 200 | - type="datetime" | |
| 201 | - value-format="yyyy-MM-dd HH:mm:ss" | |
| 202 | - placeholder="选择合同签订时间"> | |
| 203 | - </el-date-picker> | |
| 204 | - </el-form-item> | |
| 205 | - </el-col> | |
| 206 | - <el-col :span="11"> | |
| 207 | - <el-form-item label="责任部门" prop="deptid"> | |
| 208 | - <el-select v-model="form.deptName" placeholder="请选择科室" style="width: 100%;"> | |
| 209 | - <el-option v-for="item in depts" :label="item.name" :value="item.name" :key="item.name"/> | |
| 210 | - </el-select> | |
| 211 | - </el-form-item> | |
| 212 | - </el-col> | |
| 213 | - </el-row> | |
| 214 | - <el-row> | |
| 215 | - <el-col :span="11"> | |
| 216 | - <el-form-item prop="fileEntityList" label="附件"> | |
| 217 | - <el-upload | |
| 218 | - ref="upload" | |
| 219 | - action="" | |
| 220 | - accept=".docx,.xlsx,.xls,.ppt,.rar,.zip,.doc,.pdf,.png,.jpeg,.png,.jpg" | |
| 221 | - :on-change="fileChange" | |
| 222 | - :auto-upload="false" | |
| 223 | - :show-file-list="false" | |
| 224 | - multiple | |
| 225 | - :file-list="fileEntityList"> | |
| 226 | - <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 227 | - </el-upload> | |
| 228 | - </el-form-item> | |
| 229 | - </el-col> | |
| 230 | - </el-row> | |
| 231 | - <el-row> | |
| 232 | - <el-table :data="fileEntityList"> | |
| 233 | - <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | |
| 234 | - <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | |
| 235 | - <template slot-scope="scope"> | |
| 236 | - <el-button | |
| 237 | - size="small" type="success" | |
| 238 | - icon="el-icon-download" | |
| 239 | - @click="downloadFA(scope.row)" | |
| 240 | - v-hasPermi="['office:management:edit']" | |
| 241 | - v-if="form.id!=null" | |
| 242 | - round>下载 | |
| 243 | - </el-button> | |
| 244 | - <el-button | |
| 245 | - size="small" type="danger" | |
| 246 | - icon="el-icon-delete" | |
| 247 | - @click="handleDeleteFile(scope.$index)" | |
| 248 | - v-hasPermi="['office:management:remove']" | |
| 249 | - round>删除 | |
| 250 | - </el-button> | |
| 251 | - </template> | |
| 252 | - </el-table-column> | |
| 253 | - </el-table> | |
| 254 | - </el-row> | |
| 255 | - </el-form> | |
| 256 | - <div slot="footer" class="dialog-footer"> | |
| 257 | - <el-button type="primary" @click="submitForm">确 定</el-button> | |
| 258 | - <el-button @click="cancel">取 消</el-button> | |
| 259 | - </div> | |
| 260 | - </el-dialog> | |
| 261 | - <el-dialog :title="title" :visible.sync="openInfo" :close-on-click-modal="false"> | |
| 262 | - <contractInfo :idInfo="idInfo" v-if="openInfo"/> | |
| 263 | - <div slot="footer" class="dialog-footer"> | |
| 264 | - <el-button @click="cancel">取 消</el-button> | |
| 265 | - </div> | |
| 266 | - </el-dialog> | |
| 267 | - </div> | |
| 268 | -</template> | |
| 269 | - | |
| 270 | -<script> | |
| 271 | -import { | |
| 272 | - listManagement, | |
| 273 | - getManagement, | |
| 274 | - delManagement, | |
| 275 | - addManagement, | |
| 276 | - updateManagement, | |
| 277 | - exportManagement | |
| 278 | -} from "@/api/office/management"; | |
| 279 | -import FileUpload from '@/components/FileUpload'; | |
| 280 | -import contractInfo from './contractInfo'; | |
| 281 | -import {getDict} from "@/api/dict"; | |
| 282 | - | |
| 283 | -export default { | |
| 284 | - name: "Management", | |
| 285 | - components: { | |
| 286 | - FileUpload, | |
| 287 | - contractInfo | |
| 288 | - }, | |
| 289 | - data() { | |
| 290 | - return { | |
| 291 | - // 遮罩层 | |
| 292 | - loading: true, | |
| 293 | - // 选中数组 | |
| 294 | - ids: [], | |
| 295 | - // 非单个禁用 | |
| 296 | - single: true, | |
| 297 | - // 非多个禁用 | |
| 298 | - multiple: true, | |
| 299 | - // 显示搜索条件 | |
| 300 | - showSearch: true, | |
| 301 | - // 总条数 | |
| 302 | - total: 0, | |
| 303 | - // 合同管理表格数据 | |
| 304 | - managementList: [], | |
| 305 | - // 弹出层标题 | |
| 306 | - title: "", | |
| 307 | - // 是否显示弹出层 | |
| 308 | - open: false, | |
| 309 | - // 查询参数 | |
| 310 | - queryParams: { | |
| 311 | - pageNum: 1, | |
| 312 | - pageSize: 10, | |
| 313 | - contractNumber: null, | |
| 314 | - contractName: null, | |
| 315 | - firstParty: null, | |
| 316 | - secondParty: null, | |
| 317 | - contractBeginDate: null, | |
| 318 | - contractEndDate: null, | |
| 319 | - contractMoney: null, | |
| 320 | - contractState: null, | |
| 321 | - deptName: null, | |
| 322 | - attachments: null | |
| 323 | - }, | |
| 324 | - // 表单参数 | |
| 325 | - form: {}, | |
| 326 | - // 表单校验 | |
| 327 | - rules: { | |
| 328 | - contractNumber: [ | |
| 329 | - {required: true, message: "必填", trigger: "blur"} | |
| 330 | - ], | |
| 331 | - contractName: [ | |
| 332 | - {required: true, message: "必填", trigger: "blur"} | |
| 333 | - ], | |
| 334 | - firstParty: [ | |
| 335 | - {required: true, message: "必填", trigger: "blur"} | |
| 336 | - ], | |
| 337 | - secondParty: [ | |
| 338 | - {required: true, message: "必填", trigger: "blur"} | |
| 339 | - ], | |
| 340 | - contractBeginDate: [ | |
| 341 | - {required: true, message: "必填", trigger: "blur"} | |
| 342 | - ], | |
| 343 | - contractEndDate: [ | |
| 344 | - {required: true, message: "必填", trigger: "blur"} | |
| 345 | - ], | |
| 346 | - contractMoney: [ | |
| 347 | - {required: true, message: "必填", trigger: "blur"} | |
| 348 | - ], | |
| 349 | - contractState: [ | |
| 350 | - {required: true, message: "必填", trigger: "blur"} | |
| 351 | - ], | |
| 352 | - deptName: [ | |
| 353 | - {required: true, message: "必填", trigger: "blur"} | |
| 354 | - ], | |
| 355 | - }, | |
| 356 | - fileEntityList: [], | |
| 357 | - openInfo: false, | |
| 358 | - idInfo:null, | |
| 359 | - depts:[] | |
| 360 | - }; | |
| 361 | - }, | |
| 362 | - created() { | |
| 363 | - let dep = {type:"CSUserDepartmentType"}; | |
| 364 | - | |
| 365 | - getDict(dep).then(res=>{ | |
| 366 | - this.depts = res.result; | |
| 367 | - }); | |
| 368 | - this.getList(); | |
| 369 | - }, | |
| 370 | - methods: { | |
| 371 | - /** 查询合同管理列表 */ | |
| 372 | - getList() { | |
| 373 | - this.loading = true; | |
| 374 | - listManagement(this.queryParams).then(response => { | |
| 375 | - this.managementList = response.rows; | |
| 376 | - this.total = response.total; | |
| 377 | - this.loading = false; | |
| 378 | - }); | |
| 379 | - }, | |
| 380 | - // 取消按钮 | |
| 381 | - cancel() { | |
| 382 | - this.open = false; | |
| 383 | - this.openInfo = false; | |
| 384 | - this.reset(); | |
| 385 | - }, | |
| 386 | - // 表单重置 | |
| 387 | - reset() { | |
| 388 | - this.form = { | |
| 389 | - id: null, | |
| 390 | - contractNumber: null, | |
| 391 | - contractName: null, | |
| 392 | - firstParty: null, | |
| 393 | - secondParty: null, | |
| 394 | - contractBeginDate: null, | |
| 395 | - contractEndDate: null, | |
| 396 | - contractMoney: null, | |
| 397 | - contractState: null, | |
| 398 | - deptName: null, | |
| 399 | - attachments: null | |
| 400 | - }; | |
| 401 | - this.fileEntityList = []; | |
| 402 | - this.resetForm("form"); | |
| 403 | - }, | |
| 404 | - /** 搜索按钮操作 */ | |
| 405 | - handleQuery() { | |
| 406 | - this.queryParams.pageNum = 1; | |
| 407 | - this.getList(); | |
| 408 | - }, | |
| 409 | - /** 重置按钮操作 */ | |
| 410 | - resetQuery() { | |
| 411 | - this.resetForm("queryForm"); | |
| 412 | - this.handleQuery(); | |
| 413 | - }, | |
| 414 | - // 多选框选中数据 | |
| 415 | - handleSelectionChange(selection) { | |
| 416 | - this.ids = selection.map(item => item.id) | |
| 417 | - this.single = selection.length !== 1 | |
| 418 | - this.multiple = !selection.length | |
| 419 | - }, | |
| 420 | - /** 查看按钮操作 */ | |
| 421 | - handleInfo(row){ | |
| 422 | - this.reset(); | |
| 423 | - this.idInfo = row.id+""; | |
| 424 | - this.title = "请假申请详情"; | |
| 425 | - this.openInfo = true; | |
| 426 | - }, | |
| 427 | - /** 新增按钮操作 */ | |
| 428 | - handleAdd() { | |
| 429 | - this.reset(); | |
| 430 | - this.form.firstParty = "长沙市渣土事务中心"; | |
| 431 | - this.open = true; | |
| 432 | - this.title = "添加合同管理"; | |
| 433 | - }, | |
| 434 | - /** 修改按钮操作 */ | |
| 435 | - handleUpdate(row) { | |
| 436 | - this.reset(); | |
| 437 | - const id = row.id || this.ids | |
| 438 | - getManagement(id).then(response => { | |
| 439 | - this.form = response.data.contractManagement; | |
| 440 | - let files = JSON.stringify(response.data.uploadFiles); | |
| 441 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | |
| 442 | - this.open = true; | |
| 443 | - this.title = "修改合同管理"; | |
| 444 | - }); | |
| 445 | - }, | |
| 446 | - /** 提交按钮 */ | |
| 447 | - submitForm() { | |
| 448 | - this.$refs["form"].validate(valid => { | |
| 449 | - if (valid) { | |
| 450 | - let formData = new FormData(); | |
| 451 | - let form = this.form; | |
| 452 | - let beginDate = form.contractBeginDate; | |
| 453 | - let endDate = form.contractEndDate; | |
| 454 | - if(beginDate>endDate){ | |
| 455 | - this.$message.error("开始时间不能大于结束时间!"); | |
| 456 | - return; | |
| 457 | - } | |
| 458 | - //去掉params属性 | |
| 459 | - delete form.params; | |
| 460 | - formData.append('fileList', null); | |
| 461 | - //将新增的文件放入formData | |
| 462 | - this.fileEntityList.forEach(item => { | |
| 463 | - if(item.id==null){ | |
| 464 | - formData.append('fileList', item.raw) | |
| 465 | - } | |
| 466 | - }) | |
| 467 | - if (form.id != null) { | |
| 468 | - formData.append("contractManagement", JSON.stringify(form)); | |
| 469 | - formData.append("uploadFilesList", null); | |
| 470 | - this.fileEntityList.forEach(item => { | |
| 471 | - delete item.params; | |
| 472 | - if(item != "null" && item != null){ | |
| 473 | - formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); | |
| 474 | - } | |
| 475 | - }) | |
| 476 | - | |
| 477 | - updateManagement(formData).then(response => { | |
| 478 | - this.msgSuccess("修改成功"); | |
| 479 | - this.open = false; | |
| 480 | - this.fileEntityList = []; | |
| 481 | - this.getList(); | |
| 482 | - }); | |
| 483 | - } else { | |
| 484 | - for (let key in form) { | |
| 485 | - formData.append(key, form[key] == null ? "" : form[key]) | |
| 486 | - } | |
| 487 | - addManagement(formData).then(response => { | |
| 488 | - this.msgSuccess("新增成功"); | |
| 489 | - this.open = false; | |
| 490 | - this.fileEntityList = []; | |
| 491 | - this.getList(); | |
| 492 | - }); | |
| 493 | - } | |
| 494 | - } | |
| 495 | - }); | |
| 496 | - }, | |
| 497 | - /** 删除按钮操作 */ | |
| 498 | - handleDelete(row) { | |
| 499 | - const ids = row.id || this.ids; | |
| 500 | - this.$confirm('是否确认删除合同管理编号为"' + ids + '"的数据项?', "警告", { | |
| 501 | - confirmButtonText: "确定", | |
| 502 | - cancelButtonText: "取消", | |
| 503 | - type: "warning" | |
| 504 | - }).then(function () { | |
| 505 | - return delManagement(ids); | |
| 506 | - }).then(() => { | |
| 507 | - this.getList(); | |
| 508 | - this.msgSuccess("删除成功"); | |
| 509 | - }) | |
| 510 | - }, | |
| 511 | - /** 导出按钮操作 */ | |
| 512 | - handleExport() { | |
| 513 | - const queryParams = this.queryParams; | |
| 514 | - this.$confirm('是否确认导出所有合同管理数据项?', "警告", { | |
| 515 | - confirmButtonText: "确定", | |
| 516 | - cancelButtonText: "取消", | |
| 517 | - type: "warning" | |
| 518 | - }).then(function () { | |
| 519 | - return exportManagement(queryParams); | |
| 520 | - }).then(response => { | |
| 521 | - this.download(response.message); | |
| 522 | - }) | |
| 523 | - }, | |
| 524 | - /** | |
| 525 | - * 文件改变时,限制文件上传格式和大小 | |
| 526 | - * 文件格式只能为docx/xlsx/xls/ppt/rar/zip/doc/pdf/png/jpeg/png/jpg | |
| 527 | - * 大小不超过5M | |
| 528 | - * */ | |
| 529 | - fileChange(file, fileList) { | |
| 530 | - console.log(fileList) | |
| 531 | - let count = 0; | |
| 532 | - for (let i = 0; i < fileList.length; i++) { | |
| 533 | - // console.log(fileList.length) | |
| 534 | - // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 535 | - if (fileList[i].name == file.name) { | |
| 536 | - count++; | |
| 537 | - if (count == 2) { | |
| 538 | - this.$message({ | |
| 539 | - message: '已存在此文件!', | |
| 540 | - type: 'warning' | |
| 541 | - }); | |
| 542 | - for (let j = fileList.length; j > 0; j--) { | |
| 543 | - //如果存在此文件,去除新选择的重复文件 | |
| 544 | - if (fileList[j - 1].name == file.name) { | |
| 545 | - fileList.splice(j - 1, 1); | |
| 546 | - i--; | |
| 547 | - return false; | |
| 548 | - } | |
| 549 | - } | |
| 550 | - } | |
| 551 | - } | |
| 552 | - } | |
| 553 | - let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 554 | - //格式符合后判断大小 | |
| 555 | - if ("docx,xlsx,xls,ppt,rar,zip,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) { | |
| 556 | - let max5M = file.size / 1024 / 1024 < 5; | |
| 557 | - if (!max5M) { | |
| 558 | - this.$message({ | |
| 559 | - message: '上传文件大小不得超过5M!', | |
| 560 | - type: 'warning' | |
| 561 | - }); | |
| 562 | - } else { | |
| 563 | - //符合条件后进行添加 | |
| 564 | - this.fileEntityList = fileList | |
| 565 | - } | |
| 566 | - } else { | |
| 567 | - this.$message({ | |
| 568 | - message: '上传文件只能是 docx、xlsx、xls、ppt、rar、zip、doc、pdf、png、jpeg、png、jpg格式!', | |
| 569 | - type: 'warning' | |
| 570 | - }); | |
| 571 | - } | |
| 572 | - }, | |
| 573 | - // 删除文件 | |
| 574 | - handleDeleteFile(index) { | |
| 575 | - this.fileEntityList.splice(index, 1); | |
| 576 | - }, | |
| 577 | - /** 文件下载 */ | |
| 578 | - downloadFA(row) { | |
| 579 | - let name = row.name; | |
| 580 | - let url = row.url; | |
| 581 | - const a = document.createElement('a') | |
| 582 | - a.setAttribute('download', name) | |
| 583 | - a.setAttribute('target', '_blank') | |
| 584 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | |
| 585 | - a.click() | |
| 586 | - }, | |
| 587 | - } | |
| 588 | -}; | |
| 589 | -</script> | |
| 590 | -<style scoped lang="scss"> | |
| 591 | -.upload-file-uploader { | |
| 592 | - margin-bottom: 5px; | |
| 593 | -} | |
| 594 | - | |
| 595 | -.upload-file-list .el-upload-list__item { | |
| 596 | - border: 1px solid #e4e7ed; | |
| 597 | - line-height: 2; | |
| 598 | - margin-bottom: 10px; | |
| 599 | - position: relative; | |
| 600 | -} | |
| 601 | - | |
| 602 | -.upload-file-list .ele-upload-list__item-content { | |
| 603 | - display: flex; | |
| 604 | - justify-content: space-between; | |
| 605 | - align-items: center; | |
| 606 | - color: inherit; | |
| 607 | -} | |
| 608 | - | |
| 609 | -.ele-upload-list__item-content-action .el-link { | |
| 610 | - margin-right: 10px; | |
| 611 | -} | |
| 612 | -</style> |
trash-ui/src/views/h5/task/index.vue
| ... | ... | @@ -18,7 +18,7 @@ |
| 18 | 18 | @pagination="getList" /> |
| 19 | 19 | |
| 20 | 20 | <!-- 审批对话框 --> |
| 21 | - <el-dialog :title="title" :visible.sync="open" v-if="open" width="500px" append-to-body> | |
| 21 | + <el-dialog :title="title" :visible.sync="open" v-if="open" width="300px" append-to-body> | |
| 22 | 22 | |
| 23 | 23 | <div slot="footer" class="dialog-footer"> |
| 24 | 24 | <el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button> |
| ... | ... | @@ -168,10 +168,10 @@ |
| 168 | 168 | </el-dialog> |
| 169 | 169 | |
| 170 | 170 | <el-dialog title="示意图" :visible.sync="picSample" append-to-body> |
| 171 | - <img src="../../../assets/logo/logo.jpg" width="100%" height="540px" /> | |
| 171 | + <img src="../../../assets/logo/logo.jpg" width="100%" height="300px" /> | |
| 172 | 172 | </el-dialog> |
| 173 | 173 | <!-- 会议管理 --> |
| 174 | - <el-dialog :title="title" :visible.sync="conferenceOpen" width="850px" append-to-body> | |
| 174 | + <el-dialog :title="title" :visible.sync="conferenceOpen" width="300px" append-to-body> | |
| 175 | 175 | <conferenceInfo :idInfo="idInfo" v-if="conferenceOpen"/> |
| 176 | 176 | <div slot="footer" class="dialog-footer"> |
| 177 | 177 | <div slot="footer" class="dialog-footer"> |
| ... | ... | @@ -182,7 +182,7 @@ |
| 182 | 182 | </el-dialog> |
| 183 | 183 | |
| 184 | 184 | <!-- 请假申请 --> |
| 185 | - <el-dialog :title="title" :visible.sync="leaveApplicationOpen" width="500px" append-to-body> | |
| 185 | + <el-dialog :title="title" :visible.sync="leaveApplicationOpen" width="300px" append-to-body> | |
| 186 | 186 | <leaveApplicationInfo :idInfo="idInfo" v-if="leaveApplicationOpen"/> |
| 187 | 187 | <div slot="footer" class="dialog-footer"> |
| 188 | 188 | <div slot="footer" class="dialog-footer"> |
| ... | ... | @@ -193,7 +193,7 @@ |
| 193 | 193 | </el-dialog> |
| 194 | 194 | |
| 195 | 195 | |
| 196 | - <el-dialog :title="title" :visible.sync="construct" width="540px" append-to-body> | |
| 196 | + <el-dialog :title="title" :visible.sync="construct" width="300px" append-to-body> | |
| 197 | 197 | <constructsiteInfo :businessKey="businessKey" :signData="signData" v-if="construct" /> |
| 198 | 198 | <el-row> |
| 199 | 199 | |
| ... | ... | @@ -206,7 +206,7 @@ |
| 206 | 206 | </el-dialog> |
| 207 | 207 | |
| 208 | 208 | |
| 209 | - <el-dialog :title="title" :visible.sync="earthsites" width="540px" append-to-body> | |
| 209 | + <el-dialog :title="title" :visible.sync="earthsites" width="300px" append-to-body> | |
| 210 | 210 | <earthsitesInfo :businessKey="businessKey" v-if="earthsites" /> |
| 211 | 211 | <div slot="footer" class="dialog-footer"> |
| 212 | 212 | <el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button> |
| ... | ... | @@ -214,7 +214,7 @@ |
| 214 | 214 | </div> |
| 215 | 215 | </el-dialog> |
| 216 | 216 | |
| 217 | - <el-dialog :title="title" :visible.sync="contract" width="540px" append-to-body> | |
| 217 | + <el-dialog :title="title" :visible.sync="contract" width="300px" append-to-body> | |
| 218 | 218 | <contractInfo :businessKey="businessKey" v-if="contract" /> |
| 219 | 219 | <div slot="footer" class="dialog-footer"> |
| 220 | 220 | <el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button> |
| ... | ... | @@ -225,9 +225,7 @@ |
| 225 | 225 | </div> |
| 226 | 226 | </template> |
| 227 | 227 | |
| 228 | -<style> | |
| 229 | - @import '../../../assets/css/task.css' | |
| 230 | -</style> | |
| 228 | + | |
| 231 | 229 | |
| 232 | 230 | <script> |
| 233 | 231 | import { |
| ... | ... | @@ -252,14 +250,14 @@ import { getSignByObjId, addSign, updateSign } from "@/api/sign/sign"; |
| 252 | 250 | import leaveHistoryForm from "@/views/workflow/leaveHistoryForm"; |
| 253 | 251 | import threestepInfo from "@/views/h5/task/threestepInfo"; |
| 254 | 252 | import taskCard from "@/views/h5/task/taskCard"; |
| 255 | - import { | |
| 256 | - getToken | |
| 257 | - } from "@/utils/auth"; | |
| 253 | + import { getToken} from "@/utils/auth"; | |
| 258 | 254 | import conferenceInfo from "@/views/office/conference/conferenceInfo"; |
| 259 | - import leaveApplicationInfo from "@/views/office/leaveApplication/leaveApplicationInfo"; | |
| 260 | - import constructsiteInfo from "@/views/activiti/task/constructsiteInfo"; | |
| 261 | - import earthsitesInfo from "@/views/activiti/task/earthsitesInfo"; | |
| 262 | - import contractInfo from "@/views/activiti/task/contractInfo"; | |
| 255 | + import leaveApplicationInfo from "@/views/h5/leaveApplication/leaveApplicationInfo"; | |
| 256 | + import constructsiteInfo from "@/views/h5/task/constructsiteInfo"; | |
| 257 | + import earthsitesInfo from "@/views/h5/task/earthsitesInfo"; | |
| 258 | + import contractInfo from "@/views/h5/task/contractInfo"; | |
| 259 | + | |
| 260 | + import pagination from '../Pagination'; | |
| 263 | 261 | |
| 264 | 262 | export default { |
| 265 | 263 | name: "task", |
| ... | ... | @@ -272,6 +270,7 @@ import { getSignByObjId, addSign, updateSign } from "@/api/sign/sign"; |
| 272 | 270 | constructsiteInfo, |
| 273 | 271 | earthsitesInfo, |
| 274 | 272 | contractInfo, |
| 273 | + pagination, | |
| 275 | 274 | }, |
| 276 | 275 | data() { |
| 277 | 276 | return { |
| ... | ... | @@ -639,10 +638,13 @@ import { getSignByObjId, addSign, updateSign } from "@/api/sign/sign"; |
| 639 | 638 | }; |
| 640 | 639 | </script> |
| 641 | 640 | |
| 642 | - | |
| 643 | 641 | <style scoped> |
| 644 | 642 | div{ |
| 645 | 643 | font-size:12px; |
| 646 | 644 | } |
| 647 | 645 | |
| 648 | 646 | </style> |
| 647 | + | |
| 648 | +<style> | |
| 649 | + @import '../../../assets/css/task.css' | |
| 650 | +</style> | |
| 649 | 651 | \ No newline at end of file | ... | ... |
trash-ui/src/views/h5/task/threestepInfo.vue
| ... | ... | @@ -74,7 +74,7 @@ |
| 74 | 74 | </el-col> |
| 75 | 75 | <el-col :span="20"> |
| 76 | 76 | <el-row v-for="img,index in infoData.img0.split(',')" style="margin-bottom:10px;"> |
| 77 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 77 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 78 | 78 | </el-row> |
| 79 | 79 | </el-col> |
| 80 | 80 | </el-row> |
| ... | ... | @@ -85,7 +85,7 @@ |
| 85 | 85 | </el-col> |
| 86 | 86 | <el-col :span="20"> |
| 87 | 87 | <el-row v-for="img,index in infoData.img1.split(',')" style="margin-bottom:10px;"> |
| 88 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 88 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 89 | 89 | </el-row> |
| 90 | 90 | </el-col> |
| 91 | 91 | </el-row> |
| ... | ... | @@ -96,7 +96,7 @@ |
| 96 | 96 | </el-col> |
| 97 | 97 | <el-col :span="20"> |
| 98 | 98 | <el-row v-for="img,index in infoData.img2.split(',')" style="margin-bottom:10px;"> |
| 99 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 99 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 100 | 100 | |
| 101 | 101 | </el-row> |
| 102 | 102 | </el-col> |
| ... | ... | @@ -108,7 +108,7 @@ |
| 108 | 108 | </el-col> |
| 109 | 109 | <el-col :span="20"> |
| 110 | 110 | <el-row v-for="img,index in infoData.img3.split(',')" style="margin-bottom:10px;"> |
| 111 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 111 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 112 | 112 | |
| 113 | 113 | </el-row> |
| 114 | 114 | </el-col> |
| ... | ... | @@ -120,7 +120,7 @@ |
| 120 | 120 | </el-col> |
| 121 | 121 | <el-col :span="20"> |
| 122 | 122 | <el-row v-for="img,index in infoData.img4.split(',')" style="margin-bottom:10px;"> |
| 123 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 123 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 124 | 124 | |
| 125 | 125 | </el-row> |
| 126 | 126 | </el-col> |
| ... | ... | @@ -132,7 +132,7 @@ |
| 132 | 132 | </el-col> |
| 133 | 133 | <el-col :span="20"> |
| 134 | 134 | <el-row v-for="img,index in infoData.img5.split(',')" style="margin-bottom:10px;"> |
| 135 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 135 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 136 | 136 | |
| 137 | 137 | </el-row> |
| 138 | 138 | </el-col> |
| ... | ... | @@ -144,7 +144,7 @@ |
| 144 | 144 | </el-col> |
| 145 | 145 | <el-col :span="20"> |
| 146 | 146 | <el-row v-for="img,index in infoData.img6.split(',')" style="margin-bottom:10px;"> |
| 147 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 147 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 148 | 148 | |
| 149 | 149 | </el-row> |
| 150 | 150 | </el-col> |
| ... | ... | @@ -156,7 +156,7 @@ |
| 156 | 156 | </el-col> |
| 157 | 157 | <el-col :span="20"> |
| 158 | 158 | <el-row v-for="img,index in infoData.img7.split(',')" style="margin-bottom:10px;"> |
| 159 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 159 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 160 | 160 | |
| 161 | 161 | </el-row> |
| 162 | 162 | </el-col> |
| ... | ... | @@ -168,7 +168,7 @@ |
| 168 | 168 | </el-col> |
| 169 | 169 | <el-col :span="20"> |
| 170 | 170 | <el-row v-for="img,index in infoData.img8.split(',')" style="margin-bottom:10px;"> |
| 171 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 171 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 172 | 172 | |
| 173 | 173 | </el-row> |
| 174 | 174 | </el-col> |
| ... | ... | @@ -180,7 +180,7 @@ |
| 180 | 180 | </el-col> |
| 181 | 181 | <el-col :span="20"> |
| 182 | 182 | <el-row v-for="img,index in infoData.img9.split(',')" style="margin-bottom:10px;"> |
| 183 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 183 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 184 | 184 | |
| 185 | 185 | </el-row> |
| 186 | 186 | </el-col> |
| ... | ... | @@ -192,7 +192,7 @@ |
| 192 | 192 | </el-col> |
| 193 | 193 | <el-col :span="20"> |
| 194 | 194 | <el-row v-for="img,index in infoData.img10.split(',')" style="margin-bottom:10px;"> |
| 195 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 195 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 196 | 196 | |
| 197 | 197 | </el-row> |
| 198 | 198 | </el-col> |
| ... | ... | @@ -204,7 +204,7 @@ |
| 204 | 204 | </el-col> |
| 205 | 205 | <el-col :span="20"> |
| 206 | 206 | <el-row v-for="img,index in infoData.img11.split(',')" style="margin-bottom:10px;"> |
| 207 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 207 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 208 | 208 | |
| 209 | 209 | </el-row> |
| 210 | 210 | </el-col> |
| ... | ... | @@ -216,26 +216,20 @@ |
| 216 | 216 | </el-col> |
| 217 | 217 | <el-col :span="20"> |
| 218 | 218 | <el-row v-for="img,index in infoData.img12.split(',')" style="margin-bottom:10px;"> |
| 219 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 219 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 220 | 220 | |
| 221 | 221 | </el-row> |
| 222 | 222 | </el-col> |
| 223 | 223 | |
| 224 | 224 | </el-row> |
| 225 | 225 | |
| 226 | - <el-row type="flex" justify="center" v-if="infoData.checkTime"> | |
| 227 | - <el-col> | |
| 228 | - <el-form-item label="巡查时间"> | |
| 226 | + <el-form-item label="巡查时间" v-if="infoData.checkTime"> | |
| 229 | 227 | |
| 230 | - <el-input v-model="infoData.checkTime" :maxlength="20" show-word-limit disabled /> | |
| 231 | - </el-form-item> | |
| 232 | - </el-col> | |
| 233 | - <el-col> | |
| 234 | - <el-form-item label="渣管负责人"> | |
| 228 | + <el-input v-model="infoData.checkTime" :maxlength="20" show-word-limit disabled /> | |
| 229 | + </el-form-item> | |
| 230 | + <el-form-item label="渣管负责人" v-if="infoData.checkTime"> | |
| 235 | 231 | <el-input v-model="infoData.earthPipPerson" :maxlength="20" show-word-limit disabled /> |
| 236 | 232 | </el-form-item> |
| 237 | - </el-col> | |
| 238 | - </el-row> | |
| 239 | 233 | |
| 240 | 234 | |
| 241 | 235 | <el-row type="flex" justify="center" v-if="infoData.checkTime"> |
| ... | ... | @@ -244,10 +238,6 @@ |
| 244 | 238 | <el-input v-model="infoData.enforcePerson" :maxlength="20" show-word-limit disabled /> |
| 245 | 239 | </el-form-item> |
| 246 | 240 | </el-col> |
| 247 | - <el-col> | |
| 248 | - <el-form-item label=""> | |
| 249 | - </el-form-item> | |
| 250 | - </el-col> | |
| 251 | 241 | </el-row> |
| 252 | 242 | |
| 253 | 243 | <el-row type="flex" justify="center" v-if="infoData.subReason"> |
| ... | ... | @@ -265,7 +255,7 @@ |
| 265 | 255 | </el-col> |
| 266 | 256 | <el-col :span="20"> |
| 267 | 257 | <el-row v-for="img,index in infoData.sub_img0.split(',')" style="margin-bottom:10px;"> |
| 268 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 258 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 269 | 259 | |
| 270 | 260 | </el-row> |
| 271 | 261 | </el-col> |
| ... | ... | @@ -277,7 +267,7 @@ |
| 277 | 267 | </el-col> |
| 278 | 268 | <el-col :span="20"> |
| 279 | 269 | <el-row v-for="img,index in infoData.sub_img1.split(',')" style="margin-bottom:10px;"> |
| 280 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 270 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 281 | 271 | |
| 282 | 272 | </el-row> |
| 283 | 273 | </el-col> |
| ... | ... | @@ -289,7 +279,7 @@ |
| 289 | 279 | </el-col> |
| 290 | 280 | <el-col :span="20"> |
| 291 | 281 | <el-row v-for="img,index in infoData.sub_img2.split(',')" style="margin-bottom:10px;"> |
| 292 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 282 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 293 | 283 | |
| 294 | 284 | </el-row> |
| 295 | 285 | </el-col> |
| ... | ... | @@ -301,7 +291,7 @@ |
| 301 | 291 | </el-col> |
| 302 | 292 | <el-col :span="20"> |
| 303 | 293 | <el-row v-for="img,index in infoData.sub_img3.split(',')" style="margin-bottom:10px;"> |
| 304 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 294 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 305 | 295 | |
| 306 | 296 | </el-row> |
| 307 | 297 | </el-col> |
| ... | ... | @@ -313,7 +303,7 @@ |
| 313 | 303 | </el-col> |
| 314 | 304 | <el-col :span="20"> |
| 315 | 305 | <el-row v-for="img,index in infoData.sub_img4.split(',')" style="margin-bottom:10px;"> |
| 316 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 306 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 317 | 307 | |
| 318 | 308 | </el-row> |
| 319 | 309 | </el-col> |
| ... | ... | @@ -325,7 +315,7 @@ |
| 325 | 315 | </el-col> |
| 326 | 316 | <el-col :span="20"> |
| 327 | 317 | <el-row v-for="img,index in infoData.sub_img5.split(',')" style="margin-bottom:10px;"> |
| 328 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 318 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 329 | 319 | |
| 330 | 320 | </el-row> |
| 331 | 321 | </el-col> |
| ... | ... | @@ -337,7 +327,7 @@ |
| 337 | 327 | </el-col> |
| 338 | 328 | <el-col :span="20"> |
| 339 | 329 | <el-row v-for="img,index in infoData.sub_img6.split(',')" style="margin-bottom:10px;"> |
| 340 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 330 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 341 | 331 | |
| 342 | 332 | </el-row> |
| 343 | 333 | </el-col> |
| ... | ... | @@ -349,7 +339,7 @@ |
| 349 | 339 | </el-col> |
| 350 | 340 | <el-col :span="20"> |
| 351 | 341 | <el-row v-for="img,index in infoData.sub_img7.split(',')" style="margin-bottom:10px;"> |
| 352 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 342 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 353 | 343 | |
| 354 | 344 | </el-row> |
| 355 | 345 | </el-col> |
| ... | ... | @@ -361,7 +351,7 @@ |
| 361 | 351 | </el-col> |
| 362 | 352 | <el-col :span="20"> |
| 363 | 353 | <el-row v-for="img,index in infoData.sub_img8.split(',')" style="margin-bottom:10px;"> |
| 364 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 354 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 365 | 355 | |
| 366 | 356 | </el-row> |
| 367 | 357 | </el-col> |
| ... | ... | @@ -373,7 +363,7 @@ |
| 373 | 363 | </el-col> |
| 374 | 364 | <el-col :span="20"> |
| 375 | 365 | <el-row v-for="img,index in infoData.sub_img9.split(',')" style="margin-bottom:10px;"> |
| 376 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 366 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 377 | 367 | |
| 378 | 368 | </el-row> |
| 379 | 369 | </el-col> |
| ... | ... | @@ -385,7 +375,7 @@ |
| 385 | 375 | </el-col> |
| 386 | 376 | <el-col :span="20"> |
| 387 | 377 | <el-row v-for="img,index in infoData.sub_img10.split(',')" style="margin-bottom:10px;"> |
| 388 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 378 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 389 | 379 | |
| 390 | 380 | </el-row> |
| 391 | 381 | </el-col> |
| ... | ... | @@ -397,7 +387,7 @@ |
| 397 | 387 | </el-col> |
| 398 | 388 | <el-col :span="20"> |
| 399 | 389 | <el-row v-for="img,index in infoData.sub_img11.split(',')" style="margin-bottom:10px;"> |
| 400 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 390 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 401 | 391 | |
| 402 | 392 | </el-row> |
| 403 | 393 | </el-col> |
| ... | ... | @@ -409,7 +399,7 @@ |
| 409 | 399 | </el-col> |
| 410 | 400 | <el-col :span="20"> |
| 411 | 401 | <el-row v-for="img,index in infoData.sub_img12.split(',')" style="margin-bottom:10px;"> |
| 412 | - <a @click="downloadFile(img);" style="color: blue;">{{img}}</a> | |
| 402 | + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a> | |
| 413 | 403 | |
| 414 | 404 | </el-row> |
| 415 | 405 | </el-col> |
| ... | ... | @@ -417,17 +407,10 @@ |
| 417 | 407 | |
| 418 | 408 | |
| 419 | 409 | |
| 420 | - <el-row type="flex" justify="center" v-if="infoData.checkEndTime"> | |
| 421 | - <el-col> | |
| 422 | - <el-form-item label="抽查时间"> | |
| 410 | + <el-form-item label="抽查时间" v-if="infoData.checkEndTime"> | |
| 423 | 411 | <el-input v-model="infoData.checkEndTime" :maxlength="20" show-word-limit disabled /> |
| 424 | 412 | </el-form-item> |
| 425 | - </el-col> | |
| 426 | - <el-col> | |
| 427 | - <el-form-item label=""> | |
| 428 | - </el-form-item> | |
| 429 | - </el-col> | |
| 430 | - </el-row> | |
| 413 | + | |
| 431 | 414 | |
| 432 | 415 | |
| 433 | 416 | <el-row type="flex" justify="center" v-if="infoData.subSubReason"> | ... | ... |
trash-ui/src/views/h5/threestep/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + | |
| 4 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | |
| 5 | + <el-form-item label="项目名称" prop="name"> | |
| 6 | + <el-input v-model="queryParams.name" placeholder="请输入项目类型 " size="small" /> | |
| 7 | + </el-form-item> | |
| 8 | + <el-form-item label="项目类型" prop="type"> | |
| 9 | + <el-select v-model="queryParams.type" placeholder="请选择项目类型 " size="small"> | |
| 10 | + <el-option label="工地" value="0" /> | |
| 11 | + <el-option label="消纳场" value="1" /> | |
| 12 | + </el-select> | |
| 13 | + </el-form-item> | |
| 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.code" :key="item.code" /> | |
| 17 | + </el-select> | |
| 18 | + </el-form-item> | |
| 19 | + <el-form-item label="开始时间" prop="workStartTime" v-if="this.queryParams.status==1"> | |
| 20 | + <el-date-picker size="small" style="width: 200px" v-model="queryParams.workStartTime" type="date" value-format="yyyy-MM-dd" placeholder="开始时间"> | |
| 21 | + </el-date-picker> | |
| 22 | + </el-form-item> | |
| 23 | + <el-form-item label="结束时间" prop="workEndTime" v-if="this.queryParams.status==1"> | |
| 24 | + <el-date-picker size="small" style="width: 200px" v-model="queryParams.workEndTime" type="date" value-format="yyyy-MM-dd" placeholder="开始时间"> | |
| 25 | + </el-date-picker> | |
| 26 | + </el-form-item> | |
| 27 | + | |
| 28 | + | |
| 29 | + <el-form-item> | |
| 30 | + <el-button type="primary" size="mini" @click="handleQuery">搜索</el-button> | |
| 31 | + <el-button size="mini" @click="resetQuery">重置</el-button> | |
| 32 | + </el-form-item> | |
| 33 | + </el-form> | |
| 34 | + | |
| 35 | + <el-row :gutter="10" class="mb8"> | |
| 36 | + <el-col :span="1.5"> | |
| 37 | + <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['business:threestep:add']" v-if="this.queryParams.pageStatus==0 && new Date().getHours() > 7 && new Date().getHours() < 24">新增</el-button> | |
| 38 | + </el-col> | |
| 39 | + <el-col :span="1.5"> | |
| 40 | + <el-button size="mini" @click="handleExport" v-hasPermi="['business:threestep:export']">导出</el-button> | |
| 41 | + </el-col> | |
| 42 | + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 43 | + </el-row> | |
| 44 | + | |
| 45 | + | |
| 46 | + <el-card class="box-card" v-for="item in threestepList" style="margin-bottom: 10px;"> | |
| 47 | + <p>{{ item.type==0?"工地":"消纳场"}}</p> | |
| 48 | + <el-row class="card_row"> | |
| 49 | + <el-col :span="12" class="card_grid"> | |
| 50 | + <div class="card_title" style="font-weight: bold;">{{item.name}}</div> | |
| 51 | + </el-col> | |
| 52 | + | |
| 53 | + <el-col :span="12" class="card_grid" > | |
| 54 | + <span >{{item.place}}</span> | |
| 55 | + </el-col> | |
| 56 | + </el-row> | |
| 57 | + | |
| 58 | + <el-row class="card_row" style="margin-top: 5px;"> | |
| 59 | + <el-col :span="24"> | |
| 60 | + <div>自查时间:{{item.selfCheckTime}}</div> | |
| 61 | + </el-col> | |
| 62 | + </el-row> | |
| 63 | + | |
| 64 | + <el-row class="card_row" style="margin-top: 20px;"> | |
| 65 | + <el-col :span="24"> | |
| 66 | + <div>巡查时间:{{item.checkTime}}</div> | |
| 67 | + </el-col> | |
| 68 | + </el-row> | |
| 69 | + | |
| 70 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(item)" v-hasPermi="['business:threestep:edit']" v-if="queryParams.pageStatus==1 && item.status==1">抽查 | |
| 71 | + </el-button> | |
| 72 | + | |
| 73 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="reSub(item)" v-hasPermi="['business:threestep:add']" v-if="item.status==2">被驳回</el-button> | |
| 74 | + | |
| 75 | + <el-button size="mini" type="text" @click="handleUpdate(item)" v-hasPermi="['business:threestep:edit']">查看详情</el-button> | |
| 76 | + | |
| 77 | + </el-card> | |
| 78 | + | |
| 79 | + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | |
| 80 | + @pagination="getList" /> | |
| 81 | + | |
| 82 | + <el-dialog :title="title" :visible.sync="open" width="330px" append-to-body v-loading="loading"> | |
| 83 | + <el-form ref="form" :model="form" :rules="rules" label-width="100px" v-if="open"> | |
| 84 | + | |
| 85 | + <el-form-item label="项目类型" prop="type"> | |
| 86 | + <el-select v-model="form.type" placeholder="请选择项目类型" @change="selectType"> | |
| 87 | + <el-option label="工地" value="0" /> | |
| 88 | + <el-option label="消纳场" value="1" /> | |
| 89 | + </el-select> | |
| 90 | + </el-form-item> | |
| 91 | + | |
| 92 | + <el-form-item label="所属区域" prop="place" > | |
| 93 | + <el-select v-model="form.place" placeholder="请选择所属区域" filterable reserve-keyword @clear="areaClear" @change="selectArea"> | |
| 94 | + <el-option v-for="item in areas" :label="item.name" :value="item.code" :key="item.code"> | |
| 95 | + </el-option> | |
| 96 | + </el-select> | |
| 97 | + </el-form-item> | |
| 98 | + <el-form-item :label="labelName" prop="name" v-if="form.type!=null"> | |
| 99 | + <el-select v-model="form.name" filterable reserve-keyword> | |
| 100 | + <el-option @click.native="getObjId(item)" v-for="item in remoteData" :label="item.name" | |
| 101 | + :value="item.name" :key="item.id" v-if="!form.place || item.areaCode == form.place"> | |
| 102 | + </el-option> | |
| 103 | + </el-select> | |
| 104 | + </el-form-item> | |
| 105 | + | |
| 106 | + <el-form-item :label="labelName2" prop="place" v-if="form.type!=null"> | |
| 107 | + <el-select v-model="bindname" filterable reserve-keyword > | |
| 108 | + <el-option @click.native="getEarthsiteId(item)" | |
| 109 | + v-if="item.show" | |
| 110 | + v-for="item in bindData" | |
| 111 | + :label="item.name" | |
| 112 | + :value="item.name" | |
| 113 | + :key="item.id"> | |
| 114 | + </el-option> | |
| 115 | + </el-select> | |
| 116 | + </el-form-item> | |
| 117 | + | |
| 118 | + <el-form-item label="消纳合同" prop="contract" v-if="form.type!=null"> | |
| 119 | + <el-select v-model="form.contract" filterable reserve-keyword> | |
| 120 | + <el-option @click.native="conractCheck(item)" v-for="item in filterContract" :label="item.contractNo" :value="item.contractNo" :key="item.id"> | |
| 121 | + </el-option> | |
| 122 | + </el-select> | |
| 123 | + </el-form-item> | |
| 124 | + | |
| 125 | + <el-form-item label="运输企业" prop="companys" v-if="form.type==0"> | |
| 126 | + <el-select v-model="form.companys" filterable multiple @change="checkCompany" > | |
| 127 | + <el-option v-for="item in companyList" :label="item.name" :value="item.name" :key="item.id" | |
| 128 | + /> | |
| 129 | + </el-select> | |
| 130 | + </el-form-item> | |
| 131 | + | |
| 132 | + <el-form-item label="运输车辆" prop="companyTrucks" v-if="form.type==0"> | |
| 133 | + <el-select v-model="form.companyTrucks" filterable multiple reserve-keyword > | |
| 134 | + <el-option v-for="item in truckList" :label="item.licenseplateNo" :value="item.id" :key="item.id" | |
| 135 | + v-if="form.companys && (form.companys.indexOf(item.companyName) > -1)"></el-option> | |
| 136 | + </el-select> | |
| 137 | + </el-form-item> | |
| 138 | + | |
| 139 | + <el-form-item label="现场负责人" prop="person" v-if="form.type!=null"> | |
| 140 | + <el-input v-model="form.person" :maxlength="20" show-word-limit /> | |
| 141 | + </el-form-item> | |
| 142 | + | |
| 143 | + <el-form-item label="联系电话" prop="phone" v-if="form.type!=null"> | |
| 144 | + <el-input v-model="form.phone" :maxlength="11" show-word-limit /> | |
| 145 | + </el-select> | |
| 146 | + </el-form-item> | |
| 147 | + | |
| 148 | + 上传附件:<a style="color:blue;font-size: 12px;" @click="picSample=true">示意图</a> | |
| 149 | + | |
| 150 | + <el-row type="flex" justify="center" style="margin-top: 20px;" v-if="form.type != null"> | |
| 151 | + <el-col :span="12"> | |
| 152 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(0)">过水槽照片</a> | |
| 153 | + <el-input v-model="form.img0" type="hidden"></el-input> | |
| 154 | + <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> | |
| 155 | + </el-col> | |
| 156 | + <el-col :span="12"> | |
| 157 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(1)">洗车平台照片</a> | |
| 158 | + <el-input v-model="form.img1" type="hidden"></el-input> | |
| 159 | + <p v-for="img,index in form.img1">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(1,img)" style="color:red"> x</a></p> | |
| 160 | + </el-col> | |
| 161 | + </el-row> | |
| 162 | + <el-row type="flex" justify="center" style="margin-top: 20px;" v-if="form.type != null"> | |
| 163 | + <el-col :span="12"> | |
| 164 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(2)">出入口照片</a> | |
| 165 | + <el-input v-model="form.img2" type="hidden"></el-input> | |
| 166 | + <p v-for="img,index in form.img2">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(2,img)" style="color:red"> x</a></p> | |
| 167 | + </el-col> | |
| 168 | + <el-col :span="12"> | |
| 169 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(3)">沉淀池照片</a> | |
| 170 | + <el-input v-model="form.img3" type="hidden"></el-input> | |
| 171 | + <p v-for="img,index in form.img3">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(3,img)" style="color:red"> x</a></p> | |
| 172 | + </el-col> | |
| 173 | + </el-row> | |
| 174 | + <el-row type="flex" justify="center" v-if="form.type != null"> | |
| 175 | + <el-col :span="12"> | |
| 176 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(4)">硬质路面照片</a> | |
| 177 | + <el-input v-model="form.img4" type="hidden"></el-input> | |
| 178 | + <p v-for="img,index in form.img4">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(4,img)" style="color:red"> x</a></p> | |
| 179 | + </el-col> | |
| 180 | + <el-col :span="12"> | |
| 181 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(5)">{{form.type==0?"摄像头视频截图1":"洗车设施照片"}}</a> | |
| 182 | + <el-input v-model="form.img5" type="hidden"></el-input> | |
| 183 | + <p v-for="img,index in form.img5">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(5,img)" style="color:red"> x</a></p> | |
| 184 | + </el-col> | |
| 185 | + </el-row> | |
| 186 | + <el-row type="flex" justify="center" style="margin-top: 20px;" v-if="form.type != null"> | |
| 187 | + <el-col :span="12"> | |
| 188 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(6)">{{form.type==0?"摄像头视频截图2":"雾炮机"}}</a> | |
| 189 | + <el-input v-model="form.img6" type="hidden"></el-input> | |
| 190 | + <p v-for="img,index in form.img6">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(6,img)" style="color:red"> x</a></p> | |
| 191 | + </el-col> | |
| 192 | + <el-col :span="12"> | |
| 193 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(7)">{{form.type==0?"摄像头视频截图3":"裸露黄土覆盖照片"}}</a> | |
| 194 | + <el-input v-model="form.img7" type="hidden"></el-input> | |
| 195 | + <p v-for="img,index in form.img7">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(7,img)" style="color:red"> x</a></p> | |
| 196 | + </el-col> | |
| 197 | + </el-row> | |
| 198 | + <el-row type="flex" justify="center" v-if="form.type != null"> | |
| 199 | + <el-col :span="12"> | |
| 200 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(8)">其他1</a> | |
| 201 | + <el-input v-model="form.img8" type="hidden"></el-input> | |
| 202 | + <p v-for="img,index in form.img8">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(8,img)" style="color:red"> x</a></p> | |
| 203 | + </el-col> | |
| 204 | + <el-col :span="12"> | |
| 205 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(9)">其他2</a> | |
| 206 | + <el-input v-model="form.img9" type="hidden"></el-input> | |
| 207 | + <p v-for="img,index in form.img9">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(9,img)" style="color:red"> x</a></p> | |
| 208 | + </el-col> | |
| 209 | + </el-row> | |
| 210 | + <el-row type="flex" justify="center" style="margin-top: 20px;" v-if="form.type != null"> | |
| 211 | + <el-col :span="12"> | |
| 212 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(10)">其他3</a> | |
| 213 | + <el-input v-model="form.img10" type="hidden"></el-input> | |
| 214 | + <p v-for="img,index in form.img10">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(10,img)" style="color:red"> x</a> | |
| 215 | + </p> | |
| 216 | + </el-col> | |
| 217 | + <el-col :span="12"> | |
| 218 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(11)">其他4</a> | |
| 219 | + <el-input v-model="form.img11" type="hidden"></el-input> | |
| 220 | + <p v-for="img,index in form.img11">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(11,img)" style="color:red"> x</a> | |
| 221 | + </p> | |
| 222 | + </el-col> | |
| 223 | + </el-row> | |
| 224 | + <el-row type="flex" justify="center" style="margin-top: 20px;" v-if="form.type != null"> | |
| 225 | + <el-col :span="12"> | |
| 226 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(12)">其他5</a> | |
| 227 | + <el-input v-model="form.img12" type="hidden"></el-input> | |
| 228 | + <p v-for="img,index in form.img12">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(12,img)" style="color:red"> x</a> | |
| 229 | + </p> | |
| 230 | + </el-col> | |
| 231 | + </el-row> | |
| 232 | + | |
| 233 | + <el-input v-model="form.earthsitesId" type="hidden" /> | |
| 234 | + <el-input v-model="form.objectId" type="hidden" /> | |
| 235 | + </el-form> | |
| 236 | + | |
| 237 | + <div slot="footer" class="dialog-footer"> | |
| 238 | + <el-button type="primary" @click="submitForm" >确 定</el-button> | |
| 239 | + <el-button @click="cancel">取 消</el-button> | |
| 240 | + </div> | |
| 241 | + </el-dialog> | |
| 242 | + | |
| 243 | + | |
| 244 | + <el-dialog title="查看详情" width="400px" append-to-body :visible.sync="info" > | |
| 245 | + <threestepInfo :businessKey="businessKey" v-if="info"/> | |
| 246 | + | |
| 247 | + <el-form ref="form" :model="form" :rules="rules" label-width="100px" v-if="this.queryParams.pageStatus==1"> | |
| 248 | + <el-form-item label="补充说明"> | |
| 249 | + <el-input type="textarea" v-model="form.subSubReason" ></el-input> | |
| 250 | + </el-form-item> | |
| 251 | + | |
| 252 | + <el-row type="flex" justify="center"> | |
| 253 | + <el-col :span="8"> | |
| 254 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(91)">附件1</a> | |
| 255 | + <el-input v-model="form.attchItem1" type="hidden"></el-input> | |
| 256 | + <p v-for="img,index in form.attchItem1">{{img.split("/")[img.split("/").length -1]}}<a @click="removeAttchItem(1,img)" style="color:red"> x</a></p> | |
| 257 | + </el-col> | |
| 258 | + <el-col :span="8"> | |
| 259 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(92)">附件2</a> | |
| 260 | + <el-input v-model="form.attchItem2" type="hidden"></el-input> | |
| 261 | + <p v-for="img,index in form.attchItem2">{{img.split("/")[img.split("/").length -1]}}<a @click="removeAttchItem(2,img)" style="color:red"> x</a></p> | |
| 262 | + </el-col> | |
| 263 | + <el-col :span="8"> | |
| 264 | + <a style="color:blue;font-size: 12px;" @click="showFileUpload(93)">附件3</a> | |
| 265 | + <el-input v-model="form.attchItem3" type="hidden"></el-input> | |
| 266 | + <p v-for="img,index in form.attchItem3">{{img.split("/")[img.split("/").length -1]}}<a @click="removeAttchItem(3,img)" style="color:red"> x</a></p> | |
| 267 | + </el-col> | |
| 268 | + </el-row> | |
| 269 | + </el-form> | |
| 270 | + | |
| 271 | + <div slot="footer" class="dialog-footer"> | |
| 272 | + <el-button type="primary" @click="checkEndSuccess()" v-if="this.queryParams.pageStatus==1">抽查通过</el-button> | |
| 273 | + <el-button type="danger" @click="checkEndError()" v-if="this.queryParams.pageStatus==1">异常</el-button> | |
| 274 | + <el-button @click="info=false;">关 闭</el-button> | |
| 275 | + </div> | |
| 276 | + </el-dialog> | |
| 277 | + | |
| 278 | + <el-dialog title="附件" :visible.sync="uploadImageDialog" append-to-body :beforeClose="handleClose" width="330px"> | |
| 279 | + <el-upload multiple :headers="upload.headers" :action="upload.url" :file-list="fileList" | |
| 280 | + :on-success="uploadSuccess" :before-upload="beforeUpload"> | |
| 281 | + <el-button size="small" type="primary">选择附件</el-button> | |
| 282 | + <div slot="tip" class="el-upload__tip">只能上传不超过 20MB 的jpg pdf word文件</div> | |
| 283 | + </el-upload> | |
| 284 | + <div style="height: 40px;width:100%;"> | |
| 285 | + <el-button type="primary" style="margin-top: 20px;float:right;" @click="handleClose">关闭</el-button> | |
| 286 | + </div> | |
| 287 | + </el-dialog> | |
| 288 | + | |
| 289 | + <el-dialog title="示意图" :visible.sync="picSample" append-to-body width="400px"> | |
| 290 | + <img src="../../../assets/logo/logo.jpg" width="100%" height="400px" /> | |
| 291 | + </el-dialog> | |
| 292 | + </div> | |
| 293 | + | |
| 294 | +</template> | |
| 295 | + | |
| 296 | +<script> | |
| 297 | + import { | |
| 298 | + listThreestep, | |
| 299 | + getThreestep, | |
| 300 | + delThreestep, | |
| 301 | + addThreestep, | |
| 302 | + updateThreestep, | |
| 303 | + exportThreestep, | |
| 304 | + getNames | |
| 305 | + } from "@/api/business/threestep"; | |
| 306 | + | |
| 307 | + import threestepInfo from "@/views/h5/task/threestepInfo"; | |
| 308 | + | |
| 309 | + import { | |
| 310 | + Upload | |
| 311 | + } from "element-ui"; | |
| 312 | + import { | |
| 313 | + getToken | |
| 314 | + } from "@/utils/auth"; | |
| 315 | + | |
| 316 | + import { | |
| 317 | + earthsitesList, | |
| 318 | + constructionsitesList, | |
| 319 | + getDict, | |
| 320 | + getArea, | |
| 321 | + mainworkcompany, | |
| 322 | + truckList, | |
| 323 | + companyList, | |
| 324 | + contractList, | |
| 325 | + getConstructionTruck, | |
| 326 | + } from "@/api/dict"; | |
| 327 | + | |
| 328 | + | |
| 329 | + import pagination from '../Pagination'; | |
| 330 | + | |
| 331 | + export default { | |
| 332 | + name: "Threestep", | |
| 333 | + components: { | |
| 334 | + threestepInfo, | |
| 335 | + pagination | |
| 336 | + }, | |
| 337 | + data() { | |
| 338 | + return { | |
| 339 | + // 遮罩层 | |
| 340 | + loading: true, | |
| 341 | + reUpdate : false, | |
| 342 | + info: false, | |
| 343 | + infoData: null, | |
| 344 | + businessKey:null, | |
| 345 | + picSample: false, | |
| 346 | + uploadImageDialog: false, | |
| 347 | + // 选中数组 | |
| 348 | + ids: [], | |
| 349 | + // 非单个禁用 | |
| 350 | + single: true, | |
| 351 | + // 非多个禁用 | |
| 352 | + multiple: true, | |
| 353 | + // 显示搜索条件 | |
| 354 | + showSearch: true, | |
| 355 | + // 总条数 | |
| 356 | + total: 0, | |
| 357 | + // 报工自查表格数据 | |
| 358 | + names:[], | |
| 359 | + threestepList: [], | |
| 360 | + fileList: [], | |
| 361 | + companyList:[], | |
| 362 | + truckList:[], | |
| 363 | + contractList:[], | |
| 364 | + // 弹出层标题 | |
| 365 | + title: "", | |
| 366 | + labelName: "工地名称", | |
| 367 | + labelName2: "绑定消纳场", | |
| 368 | + upload: { | |
| 369 | + // 是否显示弹出层(用户导入) | |
| 370 | + open: false, | |
| 371 | + // 弹出层标题(用户导入) | |
| 372 | + title: "", | |
| 373 | + // 是否禁用上传 | |
| 374 | + isUploading: false, | |
| 375 | + // 设置上传的请求头部 | |
| 376 | + headers: { | |
| 377 | + Authorization: "Bearer " + getToken() | |
| 378 | + }, | |
| 379 | + // 上传的地址 | |
| 380 | + url: process.env.VUE_APP_BASE_API + "/business/threestep/upload", | |
| 381 | + }, | |
| 382 | + // 是否显示弹出层 | |
| 383 | + open: false, | |
| 384 | + // 查询参数 | |
| 385 | + queryParams: { | |
| 386 | + pageStatus:0,//当前处于哪一个tag | |
| 387 | + pageNum: 1, | |
| 388 | + pageSize: 10, | |
| 389 | + name: null, | |
| 390 | + type: null, | |
| 391 | + place: null, | |
| 392 | + selfCheckTime: null, | |
| 393 | + objectId: null, | |
| 394 | + earthsitesId: null, | |
| 395 | + checkTime: null, | |
| 396 | + earthsitesName: null, | |
| 397 | + contract: null, | |
| 398 | + companys: null, | |
| 399 | + companyTrucks: null, | |
| 400 | + status:null, | |
| 401 | + workStartTime:null, | |
| 402 | + workEndTime:null, | |
| 403 | + }, | |
| 404 | + // 表单参数 | |
| 405 | + form: { | |
| 406 | + companys:null, | |
| 407 | + companyTrucks:null, | |
| 408 | + | |
| 409 | + }, | |
| 410 | + picIndex: null, | |
| 411 | + // 表单校验 | |
| 412 | + rules: { | |
| 413 | + name: [{ | |
| 414 | + required: true, | |
| 415 | + message: '请填写完整', | |
| 416 | + trigger: 'change' | |
| 417 | + }, ], | |
| 418 | + contract: [{ | |
| 419 | + required: true, | |
| 420 | + message: '请填写完整', | |
| 421 | + trigger: 'change' | |
| 422 | + }, ], | |
| 423 | + objectId: [{ | |
| 424 | + required: true, | |
| 425 | + message: '请填写完整', | |
| 426 | + trigger: 'change' | |
| 427 | + }, ], | |
| 428 | + type: [{ | |
| 429 | + required: true, | |
| 430 | + message: '请填写完整', | |
| 431 | + trigger: 'change' | |
| 432 | + }, ], | |
| 433 | + place: [{ | |
| 434 | + required: true, | |
| 435 | + message: '请填写完整', | |
| 436 | + trigger: 'change' | |
| 437 | + }, ], | |
| 438 | + companys: [{ | |
| 439 | + required: false, | |
| 440 | + message: '请填写完整', | |
| 441 | + trigger: 'change' | |
| 442 | + }, ], | |
| 443 | + companyTrucks: [{ | |
| 444 | + required: false, | |
| 445 | + message: '请填写完整', | |
| 446 | + trigger: 'change' | |
| 447 | + }, ], | |
| 448 | + objectId: [{ | |
| 449 | + required: true, | |
| 450 | + message: '请填写完整', | |
| 451 | + trigger: 'change' | |
| 452 | + }, ], | |
| 453 | + person: [{ | |
| 454 | + required: true, | |
| 455 | + message: '请填写完整', | |
| 456 | + trigger: 'change' | |
| 457 | + }, ], | |
| 458 | + phone: [{ | |
| 459 | + required: true, | |
| 460 | + message: '请填写完整', | |
| 461 | + trigger: 'change' | |
| 462 | + }, | |
| 463 | + { | |
| 464 | + pattern: /^1(3|4|5|7|8|9)\d{9}$/, | |
| 465 | + message: '手机号格式错误', | |
| 466 | + trigger: 'change' | |
| 467 | + }, | |
| 468 | + ] | |
| 469 | + }, | |
| 470 | + SiteWorkAreaCodeType: [], | |
| 471 | + remoteData: [], | |
| 472 | + remoteQueryData: { | |
| 473 | + "page": 1, | |
| 474 | + "size": 9999, | |
| 475 | + "auditStatus":1, | |
| 476 | + "creditStatus":0, | |
| 477 | + }, | |
| 478 | + areas: [], | |
| 479 | + areaCode: null, | |
| 480 | + bindData: [], | |
| 481 | + bindname:null, | |
| 482 | + | |
| 483 | + }; | |
| 484 | + }, | |
| 485 | + created() { | |
| 486 | + | |
| 487 | + if(window.location.search){ | |
| 488 | + let arr = window.location.search.split("&"); | |
| 489 | + this.queryParams.pageStatus = arr[0].split("=")[1]; | |
| 490 | + } | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + getArea().then(res => { | |
| 495 | + this.areas = res.result; | |
| 496 | + for(let i =0;i< this.threestepList.length;i++){ | |
| 497 | + this.threestepList[i].place = this.getAreaName(this.threestepList[i].place); | |
| 498 | + } | |
| 499 | + }); | |
| 500 | + | |
| 501 | + let query = { | |
| 502 | + 'page':1, | |
| 503 | + 'size':9999, | |
| 504 | + } | |
| 505 | + | |
| 506 | + companyList(query).then(response => { | |
| 507 | + | |
| 508 | + let companys = response.result.list; | |
| 509 | + this.companyList = companys; | |
| 510 | + let ids = []; | |
| 511 | + | |
| 512 | + for(let i = 0 ;i<companys.length;i++){ | |
| 513 | + ids.push(companys[i].id); | |
| 514 | + } | |
| 515 | + query.companyID = ids + ""; | |
| 516 | + query.valid = 0; | |
| 517 | + | |
| 518 | + truckList(query).then(res=>{ | |
| 519 | + this.truckList = res.result.list; | |
| 520 | + }); | |
| 521 | + }); | |
| 522 | + | |
| 523 | + if(this.queryParams.pageStatus ==0){ | |
| 524 | + | |
| 525 | + this.getList(0); | |
| 526 | + }else{ | |
| 527 | + | |
| 528 | + this.getList(1); | |
| 529 | + } | |
| 530 | + | |
| 531 | + }, | |
| 532 | + methods: { | |
| 533 | + conractCheck(item){ | |
| 534 | + if(new Date(item.endTime).getTime() < new Date().getTime()){ | |
| 535 | + this.form.contract = null; | |
| 536 | + this.$message("合同已过期"); | |
| 537 | + return; | |
| 538 | + } | |
| 539 | + if(new Date(item.startTime).getTime() > new Date().getTime()){ | |
| 540 | + this.form.contract = null; | |
| 541 | + this.$message("合同未生效"); | |
| 542 | + return; | |
| 543 | + } | |
| 544 | + | |
| 545 | + if(this.form.type == 0){ | |
| 546 | + this.form.name = item.constructionSiteName; | |
| 547 | + this.form.objectId = item.constructionSiteID; | |
| 548 | + this.form.earthsitesName = item.earthSiteName; | |
| 549 | + this.form.earthsitesId = item.earthSiteID; | |
| 550 | + }else{ | |
| 551 | + this.form.earthsitesName = item.constructionSiteName; | |
| 552 | + this.form.earthsitesId = item.constructionSiteID; | |
| 553 | + this.form.name = item.earthSiteName; | |
| 554 | + this.form.objectId = item.earthSiteID; | |
| 555 | + } | |
| 556 | + | |
| 557 | + for(let i =0;i<this.remoteData.length ;i++){ | |
| 558 | + | |
| 559 | + if(this.remoteData[i].name == this.form.name){ | |
| 560 | + this.form.place = Number(this.remoteData[i].areaCode); | |
| 561 | + break; | |
| 562 | + } | |
| 563 | + } | |
| 564 | + | |
| 565 | + this.form.contractId = item.id; | |
| 566 | + this.bindname = this.form.earthsitesName; | |
| 567 | + }, | |
| 568 | + checkCompany(item){ | |
| 569 | + | |
| 570 | + let arr = []; | |
| 571 | + | |
| 572 | + for(var i in this.form.companyTrucks){ | |
| 573 | + let truck = this.form.companyTrucks[i]; | |
| 574 | + for(let j in this.truckList){ | |
| 575 | + if(truck == this.truckList[j].id && item.indexOf(this.truckList[j].companyName) > -1){ | |
| 576 | + arr.push(truck) | |
| 577 | + break; | |
| 578 | + } | |
| 579 | + } | |
| 580 | + } | |
| 581 | + | |
| 582 | + this.form.companyTrucks = arr; | |
| 583 | + // for(let i = 0;) | |
| 584 | + | |
| 585 | + // let arr = []; | |
| 586 | + // for(var i in this.form.companyTrucks){ | |
| 587 | + // if(this.form.companys.indexOf(this.form.companyTrucks[i]) > -1){ | |
| 588 | + // arr.push(this.form.companyTrucks[i]); | |
| 589 | + // } | |
| 590 | + // } | |
| 591 | + | |
| 592 | + // this.form.companyTrucks = arr; | |
| 593 | + }, | |
| 594 | + | |
| 595 | + areaClear() { | |
| 596 | + this.areaCode = null; | |
| 597 | + }, | |
| 598 | + selectArea(a) { | |
| 599 | + this.areaCode = a; | |
| 600 | + this.form.name = ""; | |
| 601 | + }, | |
| 602 | + getObjId(item) { | |
| 603 | + this.form.objectId = item.id; | |
| 604 | + this.form.place = Number(item.areaCode); | |
| 605 | + this.filterConract(); | |
| 606 | + | |
| 607 | + if(this.form.type == 0){ | |
| 608 | + let query = { | |
| 609 | + 'page':1, | |
| 610 | + 'size':9999, | |
| 611 | + } | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + // mainworkcompany(item.id).then(response => { | |
| 616 | + | |
| 617 | + // let companys = response.result.list; | |
| 618 | + // this.companyList = companys; | |
| 619 | + // let ids = []; | |
| 620 | + | |
| 621 | + // for(let i = 0 ;i<companys.length;i++){ | |
| 622 | + // ids.push(companys[i].id); | |
| 623 | + // } | |
| 624 | + | |
| 625 | + // let query = { | |
| 626 | + // 'page':1, | |
| 627 | + // 'size':9999, | |
| 628 | + // 'creditStatus':0 | |
| 629 | + // } | |
| 630 | + | |
| 631 | + // query.companyID = ids + ""; | |
| 632 | + // query.valid = 0; | |
| 633 | + | |
| 634 | + // getConstructionTruck(item.id).then(res=>{ | |
| 635 | + // for(let i in res.result){ | |
| 636 | + | |
| 637 | + // this.companyList.push({id:res.result[i].companyId , name: res.result[i].companyName}); | |
| 638 | + | |
| 639 | + // ids.push(res.result[i].companyId); | |
| 640 | + | |
| 641 | + // truckList(query).then(res=>{ | |
| 642 | + // this.truckList = res.result.list; | |
| 643 | + // }); | |
| 644 | + | |
| 645 | + // } | |
| 646 | + // }); | |
| 647 | + | |
| 648 | + | |
| 649 | + // }); | |
| 650 | + | |
| 651 | + | |
| 652 | + } | |
| 653 | + | |
| 654 | + }, | |
| 655 | + filterConract(){ | |
| 656 | + let cId; | |
| 657 | + let eId; | |
| 658 | + if(this.form.type == 0){ | |
| 659 | + cId = this.form.objectId; | |
| 660 | + eId = this.form.earthsitesId; | |
| 661 | + }else{ | |
| 662 | + cId = this.form.earthsitesId; | |
| 663 | + eId = this.form.objectId; | |
| 664 | + } | |
| 665 | + this.filterContract = []; | |
| 666 | + for(let i in this.contractList){ | |
| 667 | + | |
| 668 | + let obj = this.contractList[i]; | |
| 669 | + let canId = true; | |
| 670 | + | |
| 671 | + if(!cId && !eId){ | |
| 672 | + this.filterContract = this.contractList; | |
| 673 | + return; | |
| 674 | + } | |
| 675 | + | |
| 676 | + //constructionSiteID //earthSiteID | |
| 677 | + if(cId && cId != obj.constructionSiteID){ | |
| 678 | + continue; | |
| 679 | + } | |
| 680 | + | |
| 681 | + if(eId && eId != obj.earthSiteID){ | |
| 682 | + continue; | |
| 683 | + } | |
| 684 | + | |
| 685 | + this.filterContract.push(obj); | |
| 686 | + } | |
| 687 | + | |
| 688 | + | |
| 689 | + for(let j in this.bindData){ | |
| 690 | + | |
| 691 | + this.bindData[j].show = false; | |
| 692 | + | |
| 693 | + for(let i in this.filterContract){ | |
| 694 | + | |
| 695 | + if(this.form.type == 0 && this.filterContract[i].earthSiteID == this.bindData[j].id){ | |
| 696 | + this.bindData[j].show = true; | |
| 697 | + } | |
| 698 | + | |
| 699 | + if(this.form.type == 1 && this.filterContract[i].constructionSiteID == this.bindData[j].id){ | |
| 700 | + this.bindData[j].show = true; | |
| 701 | + } | |
| 702 | + | |
| 703 | + } | |
| 704 | + } | |
| 705 | + }, | |
| 706 | + getEarthsiteId(item) { | |
| 707 | + this.form.earthsitesName = item.name; | |
| 708 | + this.form.earthsitesId = item.id; | |
| 709 | + this.filterConract(); | |
| 710 | + }, | |
| 711 | + downloadFile(path) { | |
| 712 | + window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path); | |
| 713 | + }, | |
| 714 | + removeImage(index, img) { | |
| 715 | + let target = "img" + index; | |
| 716 | + this.form[target].splice(this.form[target].indexOf(img), 1); | |
| 717 | + this.$forceUpdate(); | |
| 718 | + | |
| 719 | + }, | |
| 720 | + removeAttchItem(index, img) { | |
| 721 | + let target = "attchItem" + index; | |
| 722 | + this.form[target].splice(this.form[target].indexOf(img), 1); | |
| 723 | + this.$forceUpdate(); | |
| 724 | + }, | |
| 725 | + | |
| 726 | + uploadSuccess(res, file, fileList) { | |
| 727 | + if(res.code){ | |
| 728 | + this.$message(res.message); | |
| 729 | + return; | |
| 730 | + } | |
| 731 | + if(this.picIndex > 90){ | |
| 732 | + let target = "attchItem" + (this.picIndex-90); | |
| 733 | + if (!this.form[target]) { | |
| 734 | + this.form[target] = []; | |
| 735 | + } | |
| 736 | + this.form[target].push(res); | |
| 737 | + return; | |
| 738 | + } | |
| 739 | + let target = "img" + this.picIndex; | |
| 740 | + | |
| 741 | + if (!this.form[target]) { | |
| 742 | + this.form[target] = []; | |
| 743 | + } | |
| 744 | + | |
| 745 | + this.form[target].push(res); | |
| 746 | + | |
| 747 | + }, | |
| 748 | + showFileUpload(i) { | |
| 749 | + this.uploadImageDialog = true; | |
| 750 | + this.picIndex = i; | |
| 751 | + }, | |
| 752 | + beforeUpload(file) { | |
| 753 | + let isRightSize = file.size / 1024 / 1024 < 20 | |
| 754 | + if (!isRightSize) { | |
| 755 | + this.$message.error('文件大小超过 20MB') | |
| 756 | + return isRightSize; | |
| 757 | + } | |
| 758 | + let isAccept = false; | |
| 759 | + if (file.name.indexOf('.docx') > -1 || file.name.indexOf(".jpg") > -1 || file.name.indexOf('.doc') > -1 || file | |
| 760 | + .name.indexOf('.pdf') > -1) { | |
| 761 | + isAccept = true; | |
| 762 | + } | |
| 763 | + if (!isAccept) { | |
| 764 | + this.$message.error('应该选择PDF、JPG、WORD类型的文件') | |
| 765 | + return isAccept; | |
| 766 | + } | |
| 767 | + | |
| 768 | + }, | |
| 769 | + handleClose() { | |
| 770 | + this.uploadImageDialog = false; | |
| 771 | + this.fileList = []; | |
| 772 | + }, | |
| 773 | + selectType(value) { | |
| 774 | + | |
| 775 | + this.rules.companys[0].required = false; | |
| 776 | + this.rules.companyTrucks[0].required = false; | |
| 777 | + if (value == "0") { | |
| 778 | + this.labelName = "工地名称"; | |
| 779 | + this.labelName2 = "绑定消纳场"; | |
| 780 | + | |
| 781 | + } else { | |
| 782 | + this.labelName = "消纳场名称"; | |
| 783 | + this.labelName2 = "绑定工地"; | |
| 784 | + } | |
| 785 | + | |
| 786 | + this.form.name = null; | |
| 787 | + this.bindname = null; | |
| 788 | + constructionsitesList(this.remoteQueryData).then(res => { | |
| 789 | + if (value == 0) { | |
| 790 | + this.remoteData = res.result.list; | |
| 791 | + } else { | |
| 792 | + this.bindData = res.result.list; | |
| 793 | + | |
| 794 | + for(let i in this.bindData){ | |
| 795 | + this.bindData[i].show = true; | |
| 796 | + } | |
| 797 | + } | |
| 798 | + }); | |
| 799 | + | |
| 800 | + earthsitesList(this.remoteQueryData).then(res => { | |
| 801 | + if (value == 0) { | |
| 802 | + this.bindData = res.result.list; | |
| 803 | + for(let i in this.bindData){ | |
| 804 | + this.bindData[i].show = true; | |
| 805 | + } | |
| 806 | + this.rules.companys[0].required = true; | |
| 807 | + this.rules.companyTrucks[0].required = true; | |
| 808 | + } else { | |
| 809 | + this.remoteData = res.result.list; | |
| 810 | + } | |
| 811 | + }); | |
| 812 | + | |
| 813 | + | |
| 814 | + }, | |
| 815 | + | |
| 816 | + getAreaName(code){ | |
| 817 | + for(let i =0;i<this.areas.length;i++){ | |
| 818 | + if(Number(code) == this.areas[i].code){ | |
| 819 | + return this.areas[i].name; | |
| 820 | + break; | |
| 821 | + } | |
| 822 | + } | |
| 823 | + return code; | |
| 824 | + }, | |
| 825 | + | |
| 826 | + /** 查询报工自查列表 */ | |
| 827 | + getList(tabIdx) { | |
| 828 | + if(tabIdx == 1){ | |
| 829 | + this.resetQuery(); | |
| 830 | + this.queryParams.pageStatus = tabIdx; | |
| 831 | + this.queryParams.status = tabIdx; | |
| 832 | + | |
| 833 | + getNames(this.queryParams).then(res=>{ | |
| 834 | + | |
| 835 | + this.names = res; | |
| 836 | + }) | |
| 837 | + | |
| 838 | + }else if(tabIdx == 0){ | |
| 839 | + this.resetQuery(); | |
| 840 | + this.queryParams.pageStatus = tabIdx; | |
| 841 | + this.queryParams.status = null; | |
| 842 | + | |
| 843 | + getNames(this.queryParams).then(res=>{ | |
| 844 | + | |
| 845 | + this.names = res; | |
| 846 | + }) | |
| 847 | + } | |
| 848 | + | |
| 849 | + let query = { | |
| 850 | + "page": 1, | |
| 851 | + "size": 9999, | |
| 852 | + "auditStatus":1, | |
| 853 | + }; | |
| 854 | + | |
| 855 | + contractList(query).then(res=>{ | |
| 856 | + this.contractList = res.result.list; | |
| 857 | + this.filterContract = this.contractList | |
| 858 | + }); | |
| 859 | + | |
| 860 | + this.loading = true; | |
| 861 | + listThreestep(this.queryParams).then(response => { | |
| 862 | + this.threestepList = response.rows; | |
| 863 | + this.total = response.total; | |
| 864 | + this.loading = false; | |
| 865 | + for(let i =0;i< this.threestepList.length;i++){ | |
| 866 | + this.threestepList[i].place = this.getAreaName(this.threestepList[i].place); | |
| 867 | + } | |
| 868 | + }); | |
| 869 | + | |
| 870 | + | |
| 871 | + companyList(query).then(response => { | |
| 872 | + | |
| 873 | + let companys = response.result.list; | |
| 874 | + this.companyList = companys; | |
| 875 | + let ids = []; | |
| 876 | + | |
| 877 | + for(let i = 0 ;i<companys.length;i++){ | |
| 878 | + ids.push(companys[i].id); | |
| 879 | + } | |
| 880 | + query.companyID = ids + ""; | |
| 881 | + query.valid = 0; | |
| 882 | + | |
| 883 | + truckList(query).then(res=>{ | |
| 884 | + this.truckList = res.result.list; | |
| 885 | + }); | |
| 886 | + }); | |
| 887 | + | |
| 888 | + | |
| 889 | + }, | |
| 890 | + // 取消按钮 | |
| 891 | + cancel() { | |
| 892 | + this.open = false; | |
| 893 | + this.reset(); | |
| 894 | + }, | |
| 895 | + // 表单重置 | |
| 896 | + reset() { | |
| 897 | + this.form = { | |
| 898 | + id: null, | |
| 899 | + name: null, | |
| 900 | + type: null, | |
| 901 | + place: null, | |
| 902 | + selfCheckTime: null, | |
| 903 | + objectId: null, | |
| 904 | + earthsitesId: null, | |
| 905 | + createTime: null, | |
| 906 | + checkTime: null, | |
| 907 | + earthsitesName: null, | |
| 908 | + contract: null, | |
| 909 | + companys: null, | |
| 910 | + companyTrucks: null, | |
| 911 | + img0: null, | |
| 912 | + img1: null, | |
| 913 | + img2: null, | |
| 914 | + img3: null, | |
| 915 | + img4: null, | |
| 916 | + img5: null, | |
| 917 | + img6: null, | |
| 918 | + img7: null, | |
| 919 | + img8: null, | |
| 920 | + img9: null, | |
| 921 | + img10: null, | |
| 922 | + img11: null, | |
| 923 | + img12: null, | |
| 924 | + person: null, | |
| 925 | + phone: null | |
| 926 | + }; | |
| 927 | + this.resetForm("form"); | |
| 928 | + this.filterConract(); | |
| 929 | + }, | |
| 930 | + /** 搜索按钮操作 */ | |
| 931 | + handleQuery() { | |
| 932 | + this.queryParams.pageNum = 1; | |
| 933 | + this.getList(); | |
| 934 | + }, | |
| 935 | + /** 重置按钮操作 */ | |
| 936 | + resetQuery() { | |
| 937 | + this.resetForm("queryForm"); | |
| 938 | + this.queryParams.workStartTime = null; | |
| 939 | + this.queryParams.workEndTime = null; | |
| 940 | + this.handleQuery(); | |
| 941 | + }, | |
| 942 | + // 多选框选中数据 | |
| 943 | + handleSelectionChange(selection) { | |
| 944 | + this.ids = selection.map(item => item.id) | |
| 945 | + this.single = selection.length !== 1 | |
| 946 | + this.multiple = !selection.length | |
| 947 | + }, | |
| 948 | + /** 新增按钮操作 */ | |
| 949 | + handleAdd() { | |
| 950 | + this.reset(); | |
| 951 | + this.open = true; | |
| 952 | + this.title = "报工自查"; | |
| 953 | + }, | |
| 954 | + /** 修改按钮操作 */ | |
| 955 | + handleUpdate(row) { | |
| 956 | + this.reset(); | |
| 957 | + this.businessKey = row.id +""; | |
| 958 | + this.info = true; | |
| 959 | + }, | |
| 960 | + reSub(row){ | |
| 961 | + this.reset(); | |
| 962 | + | |
| 963 | + this.open = true; | |
| 964 | + this.title = "再次提交"; | |
| 965 | + getThreestep(row.id).then(res=>{ | |
| 966 | + this.form = res.data; | |
| 967 | + this.form.type = this.form.type + ""; | |
| 968 | + this.form.place = Number(this.form.place); | |
| 969 | + this.bindname = res.data.earthsitesName; | |
| 970 | + if(res.data.companys){ | |
| 971 | + this.form.companys = res.data.companys.split(","); | |
| 972 | + } | |
| 973 | + if(res.data.companyTrucks){ | |
| 974 | + this.form.companyTrucks = res.data.companyTrucks.split(","); | |
| 975 | + } | |
| 976 | + for (let i = 0; i < 13; i++) { | |
| 977 | + if (this.form["img" + i]) { | |
| 978 | + this.form["img" + i] = this.form["img" + i].split(","); | |
| 979 | + } | |
| 980 | + } | |
| 981 | + }); | |
| 982 | + }, | |
| 983 | + | |
| 984 | + checkEndSuccess(){ | |
| 985 | + | |
| 986 | + let year = new Date().getFullYear(); | |
| 987 | + let month = (new Date().getMonth() + 1) < 10 ? "0" + (new Date().getMonth() + 1) : (new Date().getMonth() + 1); | |
| 988 | + let date = new Date().getDate() < 10 ? "0" + new Date().getDate() : new Date().getDate(); | |
| 989 | + let hour = new Date().getHours() < 10 ? "0" + new Date().getHours() : new Date().getHours(); | |
| 990 | + let minute = new Date().getMinutes() < 10 ? "0" + new Date().getMinutes() : new Date().getMinutes(); | |
| 991 | + let second = new Date().getSeconds() < 10 ? "0" + new Date().getSeconds() : new Date().getSeconds(); | |
| 992 | + | |
| 993 | + | |
| 994 | + this.form.checkEndTime = year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second; | |
| 995 | + this.form.id = this.businessKey; | |
| 996 | + for (let i = 1; i < 4; i++) { | |
| 997 | + if (this.form["attchItem" + i]) { | |
| 998 | + this.form["attchItem" + i] = this.form["attchItem" + i] + ""; | |
| 999 | + } | |
| 1000 | + } | |
| 1001 | + this.submitForm(); | |
| 1002 | + }, | |
| 1003 | + checkEndError(){ | |
| 1004 | + this.$router.push({path:"/other/caseOffline/" ,query:{businessKey:this.businessKey}}); | |
| 1005 | + //发起案卷 | |
| 1006 | + }, | |
| 1007 | + /** 提交按钮 */ | |
| 1008 | + submitForm() { | |
| 1009 | + | |
| 1010 | + this.$refs["form"].validate(valid => { | |
| 1011 | + if (valid) { | |
| 1012 | + this.loading = true; | |
| 1013 | + if (this.form.id != null) { | |
| 1014 | + if(this.queryParams.pageStatus==1){ | |
| 1015 | + updateThreestep(this.form).then(response => { | |
| 1016 | + this.msgSuccess("提交成功"); | |
| 1017 | + this.open = false; | |
| 1018 | + this.open2 = false; | |
| 1019 | + this.info = false; | |
| 1020 | + this.getList(); | |
| 1021 | + this.loading = false; | |
| 1022 | + },error=>{ | |
| 1023 | + this.loading = false; | |
| 1024 | + this.form.companys = this.form.companys.split(","); | |
| 1025 | + this.form.companyTrucks = this.form.companyTrucks.split(","); | |
| 1026 | + | |
| 1027 | + for (let i = 0; i < 13; i++) { | |
| 1028 | + if (this.form["img" + i]) { | |
| 1029 | + this.form["img" + i] = this.form["img" + i].split(","); | |
| 1030 | + } | |
| 1031 | + } | |
| 1032 | + }); | |
| 1033 | + }else{ | |
| 1034 | + this.form.companys = this.form.companys + ""; | |
| 1035 | + this.form.companyTrucks = this.form.companyTrucks + ""; | |
| 1036 | + | |
| 1037 | + for (let i = 0; i < 13; i++) { | |
| 1038 | + if (this.form["img" + i]) { | |
| 1039 | + this.form["img" + i] = this.form["img" + i] + ""; | |
| 1040 | + } | |
| 1041 | + } | |
| 1042 | + | |
| 1043 | + addThreestep(this.form).then(response => { | |
| 1044 | + this.msgSuccess("修改成功"); | |
| 1045 | + this.open = false; | |
| 1046 | + this.open2 = false; | |
| 1047 | + this.info = false; | |
| 1048 | + this.getList(); | |
| 1049 | + this.loading = false; | |
| 1050 | + },error=>{ | |
| 1051 | + this.loading = false; | |
| 1052 | + this.form.companys = this.form.companys.split(","); | |
| 1053 | + this.form.companyTrucks = this.form.companyTrucks.split(","); | |
| 1054 | + | |
| 1055 | + for (let i = 0; i < 13; i++) { | |
| 1056 | + if (this.form["img" + i]) { | |
| 1057 | + this.form["img" + i] = this.form["img" + i].split(","); | |
| 1058 | + } | |
| 1059 | + } | |
| 1060 | + }); | |
| 1061 | + } | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + } else { | |
| 1066 | + this.form.companys = this.form.companys + ""; | |
| 1067 | + this.form.companyTrucks = this.form.companyTrucks + ""; | |
| 1068 | + | |
| 1069 | + for (let i = 0; i < 13; i++) { | |
| 1070 | + if (this.form["img" + i]) { | |
| 1071 | + this.form["img" + i] = this.form["img" + i] + ""; | |
| 1072 | + } | |
| 1073 | + } | |
| 1074 | + addThreestep(this.form).then(response => { | |
| 1075 | + this.msgSuccess("新增成功"); | |
| 1076 | + this.open = false; | |
| 1077 | + this.open2 = false; | |
| 1078 | + this.getList(); | |
| 1079 | + },error=>{ | |
| 1080 | + this.loading = false; | |
| 1081 | + this.form.companys = this.form.companys.split(","); | |
| 1082 | + this.form.companyTrucks = this.form.companyTrucks.split(","); | |
| 1083 | + | |
| 1084 | + for (let i = 0; i < 13; i++) { | |
| 1085 | + if (this.form["img" + i]) { | |
| 1086 | + this.form["img" + i] = this.form["img" + i].split(","); | |
| 1087 | + } | |
| 1088 | + } | |
| 1089 | + }) | |
| 1090 | + } | |
| 1091 | + } | |
| 1092 | + }); | |
| 1093 | + }, | |
| 1094 | + /** 删除按钮操作 */ | |
| 1095 | + handleDelete(row) { | |
| 1096 | + const ids = row.id || this.ids; | |
| 1097 | + this.$confirm('是否确认删除报工自查编号为"' + ids + '"的数据项?', "警告", { | |
| 1098 | + confirmButtonText: "确定", | |
| 1099 | + cancelButtonText: "取消", | |
| 1100 | + type: "warning" | |
| 1101 | + }).then(function() { | |
| 1102 | + return delThreestep(ids); | |
| 1103 | + }).then(() => { | |
| 1104 | + this.getList(); | |
| 1105 | + this.msgSuccess("删除成功"); | |
| 1106 | + }) | |
| 1107 | + }, | |
| 1108 | + /** 导出按钮操作 */ | |
| 1109 | + handleExport() { | |
| 1110 | + const queryParams = this.queryParams; | |
| 1111 | + this.$confirm('是否确认导出所有报工数据项?', "警告", { | |
| 1112 | + confirmButtonText: "确定", | |
| 1113 | + cancelButtonText: "取消", | |
| 1114 | + type: "warning" | |
| 1115 | + }).then(function() { | |
| 1116 | + return exportThreestep(queryParams); | |
| 1117 | + }).then(response => { | |
| 1118 | + this.download(response.message); | |
| 1119 | + }) | |
| 1120 | + } | |
| 1121 | + } | |
| 1122 | + }; | |
| 1123 | +</script> | ... | ... |
trash-ui/src/views/h5/truckActivate/index.vue
| 1 | 1 | <template> |
| 2 | 2 | <div class="app-container"> |
| 3 | + <el-row :gutter="10" class="mb8"> | |
| 4 | + <el-col :span="1.5"> | |
| 5 | + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.pageStatus==0}" size="mini" | |
| 6 | + @click="getList(0);">车辆激活</el-button> | |
| 7 | + </el-col> | |
| 8 | + <el-col :span="1.5"> | |
| 9 | + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.pageStatus==1}" size="mini" | |
| 10 | + @click="getList(1);">车辆激活历史</el-button> | |
| 11 | + </el-col> | |
| 12 | + </el-row> | |
| 13 | + | |
| 14 | + | |
| 3 | 15 | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 4 | - <el-row> | |
| 5 | - <el-col :span="18"> | |
| 16 | + <el-form-item label="所属企业" prop="company"> | |
| 6 | 17 | <el-input |
| 7 | - v-model="queryParams.licensePlate" | |
| 8 | - placeholder="请输入车牌号搜索" | |
| 9 | - | |
| 18 | + v-model="queryParams.company" | |
| 19 | + placeholder="请输入所属企业" | |
| 20 | + | |
| 10 | 21 | size="small" |
| 11 | - | |
| 22 | + | |
| 12 | 23 | /> |
| 13 | - </el-form-item></el-col> | |
| 24 | + </el-form-item> | |
| 25 | + <el-form-item label="车牌号" prop="licensePlate"> | |
| 26 | + <el-input | |
| 27 | + v-model="queryParams.licensePlate" | |
| 28 | + placeholder="请输入车牌号" | |
| 14 | 29 | |
| 15 | - <el-col :span="6"> | |
| 16 | - <el-form-item style="float: right;"> | |
| 17 | - <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> | |
| 30 | + size="small" | |
| 31 | + | |
| 32 | + /> | |
| 33 | + </el-form-item> | |
| 34 | + <el-form-item label="激活时间" prop="activateTime"> | |
| 35 | + <el-date-picker size="small" style="width: 200px" | |
| 36 | + v-model="queryParams.activateTime" | |
| 37 | + type="date" | |
| 38 | + value-format="yyyy-MM-dd" | |
| 39 | + placeholder="选择激活时间"> | |
| 40 | + </el-date-picker> | |
| 41 | + </el-form-item> | |
| 42 | + <el-form-item> | |
| 43 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |
| 44 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |
| 18 | 45 | </el-form-item> |
| 19 | - </el-col> | |
| 20 | - </el-row> | |
| 21 | 46 | </el-form> |
| 22 | 47 | |
| 23 | 48 | <el-row :gutter="10" class="mb8"> |
| ... | ... | @@ -30,6 +55,14 @@ |
| 30 | 55 | v-hasPermi="['business:truckActivate:add']" |
| 31 | 56 | >添加车辆并激活</el-button> |
| 32 | 57 | </el-col> |
| 58 | + <el-col :span="1.5"> | |
| 59 | + <el-button | |
| 60 | + type="warning" | |
| 61 | + size="mini" | |
| 62 | + @click="handleExport" | |
| 63 | + v-hasPermi="['business:truckActivate:export']" | |
| 64 | + >导出</el-button> | |
| 65 | + </el-col> | |
| 33 | 66 | </el-row> |
| 34 | 67 | |
| 35 | 68 | <el-card class="box-card" v-for="item in truckActivateList" style="margin-bottom: 10px;"> |
| ... | ... | @@ -45,7 +78,6 @@ |
| 45 | 78 | @click="handleUpdate(item)" |
| 46 | 79 | >手动激活</el-button> |
| 47 | 80 | </el-col> |
| 48 | - | |
| 49 | 81 | </el-row> |
| 50 | 82 | |
| 51 | 83 | <el-row class="card_row" style="margin-top: 5px;"> |
| ... | ... | @@ -61,34 +93,6 @@ |
| 61 | 93 | </el-row> |
| 62 | 94 | </el-card> |
| 63 | 95 | |
| 64 | - | |
| 65 | - | |
| 66 | -<!-- <el-table v-loading="loading" :data="truckActivateList" @selection-change="handleSelectionChange"> | |
| 67 | - <el-table-column label="序号" align="center" type="index" /> | |
| 68 | - <el-table-column label="所属企业" align="center" prop="company" /> | |
| 69 | - <el-table-column label="车牌号" align="center" prop="licensePlate" /> | |
| 70 | - <el-table-column label="所属工地" align="center" prop="construction" /> | |
| 71 | - <el-table-column label="消纳场" align="center" prop="earthsite" /> | |
| 72 | - <el-table-column label="激活时间" align="center" prop="activateTime" width="180"> | |
| 73 | - <template slot-scope="scope"> | |
| 74 | - <span>{{ parseTime(scope.row.activateTime, '{y}-{m}-{d}') }}</span> | |
| 75 | - </template> | |
| 76 | - </el-table-column> | |
| 77 | - <el-table-column label="激活状态" prop="objectId"> | |
| 78 | - <template slot-scope="scope"> | |
| 79 | - <span v-if="scope.row.activateTime!=null">已激活</span> | |
| 80 | - | |
| 81 | - <el-button v-if="scope.row.activateTime==null" | |
| 82 | - size="mini" | |
| 83 | - type="text" | |
| 84 | - @click="handleUpdate(scope.row)" | |
| 85 | - v-hasPermi="['business:truckActivate:edit']" | |
| 86 | - >手动激活</el-button> | |
| 87 | - </template> | |
| 88 | - </el-table-column> | |
| 89 | - | |
| 90 | - </el-table> --> | |
| 91 | - | |
| 92 | 96 | <pagination |
| 93 | 97 | v-show="total>0" |
| 94 | 98 | :total="total" |
| ... | ... | @@ -126,6 +130,7 @@ |
| 126 | 130 | <el-button @click="cancel">取 消</el-button> |
| 127 | 131 | </div> |
| 128 | 132 | </el-dialog> |
| 133 | + | |
| 129 | 134 | </div> |
| 130 | 135 | </template> |
| 131 | 136 | |
| ... | ... | @@ -136,6 +141,8 @@ import { listTruckActivate, getTruckActivate, delTruckActivate, addTruckActivate |
| 136 | 141 | todayDataList, |
| 137 | 142 | } from "@/api/business/threestep"; |
| 138 | 143 | |
| 144 | + import pagination from '../Pagination'; | |
| 145 | + | |
| 139 | 146 | import { |
| 140 | 147 | truckList, |
| 141 | 148 | companyList, |
| ... | ... | @@ -143,6 +150,7 @@ import { |
| 143 | 150 | |
| 144 | 151 | export default { |
| 145 | 152 | name: "TruckActivate", |
| 153 | + components: {pagination}, | |
| 146 | 154 | data() { |
| 147 | 155 | return { |
| 148 | 156 | // 遮罩层 |
| ... | ... | @@ -384,10 +392,3 @@ export default { |
| 384 | 392 | } |
| 385 | 393 | }; |
| 386 | 394 | </script> |
| 387 | - | |
| 388 | -<style scope> | |
| 389 | - div{ | |
| 390 | - font-size:12px; | |
| 391 | - } | |
| 392 | - | |
| 393 | -</style> | ... | ... |
trash-ui/src/views/h5/violationCaseFile/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | |
| 4 | + | |
| 5 | + <el-form-item label="所属区域" prop="owningRegion"> | |
| 6 | + <el-select v-model="queryParams.owningRegion" placeholder="请选择违规类型" size="small"> | |
| 7 | + <el-option v-for="item in areas" :label="item.name" :value="item.name" /> | |
| 8 | + </el-select> | |
| 9 | + | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="违规类型" prop="violationType"> | |
| 12 | + <el-select v-model="queryParams.violationType" placeholder="请选择违规类型" size="small"> | |
| 13 | + <el-option v-for="item in caseType" :label="item.name" :value="item.name" /> | |
| 14 | + </el-select> | |
| 15 | + </el-form-item> | |
| 16 | + | |
| 17 | + | |
| 18 | + <el-form-item label="违规对象类型" prop="violationObjectType"> | |
| 19 | + <el-select v-model="queryParams.violationObjectType" placeholder="请选择违规对象类型" size="small"> | |
| 20 | + <el-option label="工地" value="0" /> | |
| 21 | + <el-option label="消纳场" value="1" /> | |
| 22 | + <el-option label="企业" value="2" /> | |
| 23 | + </el-select> | |
| 24 | + </el-form-item> | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + <el-form-item label="项目名称" prop="projectName"> | |
| 29 | + <el-input | |
| 30 | + v-model="queryParams.projectName" | |
| 31 | + placeholder="请输入项目名称" | |
| 32 | + | |
| 33 | + size="small" | |
| 34 | + | |
| 35 | + /> | |
| 36 | + </el-form-item> | |
| 37 | + | |
| 38 | + <el-form-item label="日期" prop="createTime"> | |
| 39 | + <el-date-picker size="small" style="width: 200px" v-model="queryParams.createTime" type="date" | |
| 40 | + value-format="yyyy-MM-dd" placeholder="开始时间"> | |
| 41 | + </el-date-picker> | |
| 42 | + </el-form-item> | |
| 43 | + <el-form-item> | |
| 44 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |
| 45 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |
| 46 | + </el-form-item> | |
| 47 | + </el-form> | |
| 48 | + | |
| 49 | + <a @click="handleInfo(item)" v-for="item in violationCaseFileList"> | |
| 50 | + <el-card class="box-card" style="margin-bottom: 10px;" | |
| 51 | + > | |
| 52 | + <el-row class="card_row"> | |
| 53 | + <el-col :span="24" class="card_grid"> | |
| 54 | + <div class="card_title" style="font-weight: bold;">违规类型:{{item.violationType}}</div> | |
| 55 | + </el-col> | |
| 56 | + </el-row> | |
| 57 | + <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;"> | |
| 58 | + <el-col :span="24"> | |
| 59 | + <span >项目名称:{{item.projectName}}</span> | |
| 60 | + </el-col> | |
| 61 | + </el-row> | |
| 62 | + | |
| 63 | + <el-row class="card_row"> | |
| 64 | + <el-col :span="24" class="card_grid" > | |
| 65 | + <span >企业名称:{{item.companyName}}</span> | |
| 66 | + </el-col> | |
| 67 | + </el-row> | |
| 68 | + | |
| 69 | + <el-row class="card_row"> | |
| 70 | + <el-col :span="12"> | |
| 71 | + <span >违规对象类型:{{item.violationObjectType == 0 ? "工地" :item.violationObjectType == 1 ?"消纳场":"企业"}}</span> | |
| 72 | + </el-col> | |
| 73 | + <el-col :span="12" class="card_grid" > | |
| 74 | + <span >所属区域:{{item.owningRegion}}</span> | |
| 75 | + </el-col> | |
| 76 | + </el-row> | |
| 77 | + <el-row class="card_row"> | |
| 78 | + <el-col :span="24" class="card_grid" > | |
| 79 | + <div>时间:{{item.createTime}}</div> | |
| 80 | + </el-col> | |
| 81 | + </el-row> | |
| 82 | + <span>{{parseStatus(item.status) }}</span> | |
| 83 | + | |
| 84 | + </el-card> | |
| 85 | + </a> | |
| 86 | + | |
| 87 | + | |
| 88 | + <pagination | |
| 89 | + v-show="total>0" | |
| 90 | + :total="total" | |
| 91 | + :page.sync="queryParams.pageNum" | |
| 92 | + :limit.sync="queryParams.pageSize" | |
| 93 | + @pagination="getList" | |
| 94 | + /> | |
| 95 | + | |
| 96 | + <!-- 添加或修改平台违规案卷对话框 --> | |
| 97 | + <el-dialog :title="title" :visible.sync="open" width="300px" append-to-body :close-on-click-modal="false"> | |
| 98 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 99 | + <el-row :gutter="2"> | |
| 100 | + <el-col :span="11"> | |
| 101 | + <el-form-item label="案卷编号" prop="number"> | |
| 102 | + <el-input v-model="form.number" placeholder="请输入案卷编号" :disabled="true"/> | |
| 103 | + </el-form-item> | |
| 104 | + </el-col> | |
| 105 | + <el-col :span="11"> | |
| 106 | + <el-form-item label="违规对象类型" prop="violationObjectType"> | |
| 107 | + <el-select v-model="form.violationObjectType" placeholder="请选择违规对象类型" size="small"> | |
| 108 | + <el-option label="工地" value="0" /> | |
| 109 | + <el-option label="消纳场" value="1" /> | |
| 110 | + <el-option label="企业" value="2" /> | |
| 111 | + </el-select> | |
| 112 | + </el-form-item> | |
| 113 | + </el-col> | |
| 114 | + </el-row> | |
| 115 | + <el-row :gutter="2"> | |
| 116 | + <el-col :span="11"> | |
| 117 | + <el-form-item label="所属区域" prop="owningRegion"> | |
| 118 | + <el-select v-model="form.place" placeholder="请输入所属区域" style="width: 100%;"> | |
| 119 | + <el-option v-for="item in areas" :label="item.name" :value="item.code" @click.native="selectArea(item)"/> | |
| 120 | + </el-select> | |
| 121 | + </el-form-item> | |
| 122 | + </el-col> | |
| 123 | + <el-col :span="11"> | |
| 124 | + <el-form-item label="违规类型" prop="violationType"> | |
| 125 | + <el-select v-model="form.violationType" placeholder="请选择违规类型" style="width: 100%;"> | |
| 126 | + <el-option v-for="item in caseType" :label="item.name" :value="item.name" /> | |
| 127 | + </el-select> | |
| 128 | + </el-form-item> | |
| 129 | + </el-col> | |
| 130 | + </el-row> | |
| 131 | + <el-row :gutter="2"> | |
| 132 | + <el-col :span="11"> | |
| 133 | + <el-form-item label="违规等级" prop="violationGrade"> | |
| 134 | + <el-select v-model="form.violationGrade" placeholder="请选择违规等级" style="width: 100%;"> | |
| 135 | + <el-option label="一般类" value="一般类"/> | |
| 136 | + <el-option label="重点类" value="重点类" /> | |
| 137 | + </el-select> | |
| 138 | + </el-form-item> | |
| 139 | + </el-col> | |
| 140 | + <el-col :span="11"> | |
| 141 | + <el-form-item label="违规对象" prop="projectName"> | |
| 142 | + <el-select v-model="form.projectName" :filterable="true" placeholder="请输入项目名称" style="width: 100%;"> | |
| 143 | + <el-option v-for="item in data" :key="item.name" :label="item.name" :value="item.name" @click.native="getObjId(item)" | |
| 144 | + v-if="form.place == item.areaCode" | |
| 145 | + /> | |
| 146 | + </el-select> | |
| 147 | + </el-form-item> | |
| 148 | + </el-col> | |
| 149 | + </el-row> | |
| 150 | + <el-row :gutter="2"> | |
| 151 | + <el-col :span="11"> | |
| 152 | + <el-form-item label="公司" prop="violationGrade"> | |
| 153 | + <el-select v-model="form.companyName" placeholder="请选择公司" style="width: 100%;"> | |
| 154 | + <el-option v-for="item in companyList" :label="item.name" :value="item.name" /> | |
| 155 | + </el-select> | |
| 156 | + </el-form-item> | |
| 157 | + </el-col> | |
| 158 | + <el-col :span="11"> | |
| 159 | + </el-col> | |
| 160 | + </el-row> | |
| 161 | + | |
| 162 | + | |
| 163 | + <el-row :gutter="2"> | |
| 164 | + <el-col :span="8" :offset="3"> | |
| 165 | + <el-button type="primary" @click="createDescribe">生成违规描述</el-button> | |
| 166 | + </el-col> | |
| 167 | + </el-row> | |
| 168 | + <el-row> | |
| 169 | + <el-col :span="22"> | |
| 170 | + <el-form-item label="违规描述" prop="describe"> | |
| 171 | + <el-input v-model="form.describe" type="textarea" placeholder="请输入内容" :row="4"/> | |
| 172 | + </el-form-item> | |
| 173 | + </el-col> | |
| 174 | + </el-row> | |
| 175 | + <el-form-item label="推送对象"> | |
| 176 | + <el-radio-group v-model="form.sendObject"> | |
| 177 | + <el-radio label="区管理部门(治)">区管理部门(治)</el-radio> | |
| 178 | + <el-radio label="区管理部门(消)">区管理部门(消)</el-radio> | |
| 179 | + <el-radio label="运输企业">运输企业</el-radio> | |
| 180 | + </el-radio-group> | |
| 181 | + </el-form-item> | |
| 182 | + <el-form-item prop="fileEntityList" label="附件"> | |
| 183 | + <el-upload | |
| 184 | + ref="upload" | |
| 185 | + action="" | |
| 186 | + accept=".docx,.xlsx,.xls,.ppt,.doc,.pdf,.png,.jpeg,.png,.jpg" | |
| 187 | + :on-change="fileChange" | |
| 188 | + :auto-upload="false" | |
| 189 | + :show-file-list="false" | |
| 190 | + multiple | |
| 191 | + :file-list="fileEntityList"> | |
| 192 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 193 | + </el-upload> | |
| 194 | + </el-form-item> | |
| 195 | + <el-table :data="fileEntityList"> | |
| 196 | + <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | |
| 197 | + <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | |
| 198 | + <template slot-scope="scope"> | |
| 199 | + <el-button | |
| 200 | + size="small" type="success" | |
| 201 | + icon="el-icon-download" | |
| 202 | + @click="downloadFA(scope.row)" | |
| 203 | + v-hasPermi="['office:management:edit']" | |
| 204 | + v-if="form.id!=null" | |
| 205 | + round>下载 | |
| 206 | + </el-button> | |
| 207 | + <el-button | |
| 208 | + size="small" type="danger" | |
| 209 | + icon="el-icon-delete" | |
| 210 | + @click="handleDeleteFile(scope.$index)" | |
| 211 | + v-hasPermi="['office:management:remove']" | |
| 212 | + round>删除 | |
| 213 | + </el-button> | |
| 214 | + </template> | |
| 215 | + </el-table-column> | |
| 216 | + </el-table> | |
| 217 | + </el-form> | |
| 218 | + <div slot="footer" class="dialog-footer"> | |
| 219 | + <el-button type="primary" @click="submitForm">确 定</el-button> | |
| 220 | + <el-button @click="cancel">取 消</el-button> | |
| 221 | + </div> | |
| 222 | + </el-dialog> | |
| 223 | + <el-dialog :title="title" :visible.sync="openInfo" width="300px" append-to-body :close-on-click-modal="false"> | |
| 224 | + <violationCaseFileInfo :idInfo="idInfo" v-if="openInfo" :entryType="0"/> | |
| 225 | + <div slot="footer" class="dialog-footer"> | |
| 226 | + <el-button @click="cancel">取 消</el-button> | |
| 227 | + </div> | |
| 228 | + </el-dialog> | |
| 229 | + </div> | |
| 230 | +</template> | |
| 231 | + | |
| 232 | +<script> | |
| 233 | +import { listViolationCaseFile, getViolationCaseFile, | |
| 234 | + delViolationCaseFile, addViolationCaseFile, | |
| 235 | + updateViolationCaseFile, exportViolationCaseFile } from "@/api/casefile/violationCaseFile"; | |
| 236 | +import violationCaseFileInfo from "./violationCaseFileInfo"; | |
| 237 | + | |
| 238 | + import { | |
| 239 | + earthsitesList, | |
| 240 | + constructionsitesList, | |
| 241 | + getDict, | |
| 242 | + getArea, | |
| 243 | + companyList, | |
| 244 | + truckList, | |
| 245 | + } from "@/api/dict"; | |
| 246 | + | |
| 247 | + | |
| 248 | + import pagination from '../Pagination'; | |
| 249 | +export default { | |
| 250 | + name: "ViolationCaseFile", | |
| 251 | + components: { violationCaseFileInfo,pagination }, | |
| 252 | + data() { | |
| 253 | + return { | |
| 254 | + // 遮罩层 | |
| 255 | + loading: true, | |
| 256 | + // 选中数组 | |
| 257 | + ids: [], | |
| 258 | + // 非单个禁用 | |
| 259 | + single: true, | |
| 260 | + // 非多个禁用 | |
| 261 | + multiple: true, | |
| 262 | + // 显示搜索条件 | |
| 263 | + showSearch: true, | |
| 264 | + // 总条数 | |
| 265 | + total: 0, | |
| 266 | + // 平台违规案卷表格数据 | |
| 267 | + violationCaseFileList: [], | |
| 268 | + // 弹出层标题 | |
| 269 | + title: "", | |
| 270 | + // 是否显示弹出层 | |
| 271 | + open: false, | |
| 272 | + // 查询参数 | |
| 273 | + queryParams: { | |
| 274 | + pageNum: 1, | |
| 275 | + pageSize: 10, | |
| 276 | + number: null, | |
| 277 | + violationObjectType: null, | |
| 278 | + owningRegion: null, | |
| 279 | + violationType: null, | |
| 280 | + violationGrade: null, | |
| 281 | + projectName: null, | |
| 282 | + companyName: null, | |
| 283 | + describe: null, | |
| 284 | + sendObject: null, | |
| 285 | + status: null, | |
| 286 | + receive: null, | |
| 287 | + receiveStatus: null, | |
| 288 | + readBy: null, | |
| 289 | + readTime: null | |
| 290 | + }, | |
| 291 | + // 表单参数 | |
| 292 | + form: { | |
| 293 | + | |
| 294 | + }, | |
| 295 | + place:null, | |
| 296 | + // 表单校验 | |
| 297 | + rules: { | |
| 298 | + number :[ | |
| 299 | + { required: true, message: "必填", trigger: "blur" } | |
| 300 | + ], | |
| 301 | + violationObjectType :[ | |
| 302 | + { required: true, message: "必填", trigger: "blur" } | |
| 303 | + ], | |
| 304 | + owningRegion :[ | |
| 305 | + { required: true, message: "必填", trigger: "blur" } | |
| 306 | + ], | |
| 307 | + violationType :[ | |
| 308 | + { required: true, message: "必填", trigger: "blur" } | |
| 309 | + ], | |
| 310 | + }, | |
| 311 | + caseType:[{code:0,name:"进入非专用车辆"}, | |
| 312 | + {code:1,name:"无许可手续(工)"}, | |
| 313 | + {code:2,name:"无许可手续(消)"}, | |
| 314 | + {code:3,name:"黄土覆盖情况"}, | |
| 315 | + {code:4,name:"出入口路面污染"}, | |
| 316 | + {code:5,name:"出入口道路硬化"}, | |
| 317 | + {code:6,name:"车辆冲洗是否到位"}, | |
| 318 | + {code:7,name:"雾炮机是否正常开启"}, | |
| 319 | + {code:8,name:"使用费专用车运输"}, | |
| 320 | + {code:9,name:"监控点位未对准"}, | |
| 321 | + {code:10,name:"未报开工作业"}, | |
| 322 | + {code:11,name:"视频设备离线超时报警"}, | |
| 323 | + {code:12,name:"三无车辆进入工地"}, | |
| 324 | + {code:13,name:"未按时间作业"}, | |
| 325 | + {code:14,name:"未报开工作业"}, | |
| 326 | + {code:15,name:"视频设备离线超时报警"}, | |
| 327 | + {code:16,name:"三无车辆进入消纳场"}, | |
| 328 | + {code:17,name:"未到指定的消纳场作业"}, | |
| 329 | + {code:18,name:"离线运输报警(工)"}, | |
| 330 | + {code:19,name:"离线运输报警(消)"}, | |
| 331 | + {code:20,name:"未激活车辆作业"}, | |
| 332 | + {code:21,name:"未核准作业车辆作业"}, | |
| 333 | + {code:22,name:"未按线路行驶"}, | |
| 334 | + {code:23,name:"闯禁行驶"}, | |
| 335 | + {code:24,name:"失信车辆作业"}, | |
| 336 | + {code:25,name:"其他1"}, | |
| 337 | + {code:26,name:"其他2"}, | |
| 338 | + {code:27,name:"其他3"}, | |
| 339 | + {code:28,name:"其他4"}, | |
| 340 | + {code:29,name:"其他5"}], | |
| 341 | + | |
| 342 | + projectNameList:[ | |
| 343 | + ], | |
| 344 | + isLoading: false, | |
| 345 | + fileEntityList:[], | |
| 346 | + companyList:[ | |
| 347 | + ], | |
| 348 | + remoteQueryData: { | |
| 349 | + "page": 1, | |
| 350 | + "size": 9999 | |
| 351 | + }, | |
| 352 | + areas:[], | |
| 353 | + data:{}, | |
| 354 | + isLoadingCompany: false, | |
| 355 | + idInfo:null, | |
| 356 | + openInfo:false, | |
| 357 | + }; | |
| 358 | + }, | |
| 359 | + created() { | |
| 360 | + getArea().then(res=>{ | |
| 361 | + | |
| 362 | + this.areas = res.result; | |
| 363 | + }); | |
| 364 | + | |
| 365 | + | |
| 366 | + constructionsitesList(this.remoteQueryData).then(res => { | |
| 367 | + this.projectNameList = res.result.list; | |
| 368 | + earthsitesList(this.remoteQueryData).then(res => { | |
| 369 | + for(var i in res.result.list){ | |
| 370 | + this.projectNameList.push(res.result.list[i]); | |
| 371 | + } | |
| 372 | + }); | |
| 373 | + }); | |
| 374 | + | |
| 375 | + | |
| 376 | + companyList(this.remoteQueryData).then(res => { | |
| 377 | + this.companyList = res.result.list; | |
| 378 | + }); | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + this.getList(); | |
| 383 | + }, | |
| 384 | + methods: { | |
| 385 | + selectArea(item){ | |
| 386 | + | |
| 387 | + this.form.owningRegion = item.name; | |
| 388 | + this.form.projectName = null; | |
| 389 | + | |
| 390 | + }, | |
| 391 | + /** 查询平台违规案卷列表 */ | |
| 392 | + getList() { | |
| 393 | + this.loading = true; | |
| 394 | + listViolationCaseFile(this.queryParams).then(response => { | |
| 395 | + this.violationCaseFileList = response.rows; | |
| 396 | + this.total = response.total; | |
| 397 | + this.loading = false; | |
| 398 | + }); | |
| 399 | + }, | |
| 400 | + // 取消按钮 | |
| 401 | + cancel() { | |
| 402 | + this.open = false; | |
| 403 | + this.openInfo = false; | |
| 404 | + this.reset(); | |
| 405 | + }, | |
| 406 | + // 表单重置 | |
| 407 | + reset() { | |
| 408 | + this.fileEntityList = []; | |
| 409 | + this.form = { | |
| 410 | + id: null, | |
| 411 | + number: null, | |
| 412 | + violationObjectType: null, | |
| 413 | + owningRegion: null, | |
| 414 | + violationType: null, | |
| 415 | + violationGrade: null, | |
| 416 | + projectName: null, | |
| 417 | + companyName: null, | |
| 418 | + describe: null, | |
| 419 | + sendObject: null, | |
| 420 | + createTime: null, | |
| 421 | + createBy: null, | |
| 422 | + updateTime: null, | |
| 423 | + updateBy: null, | |
| 424 | + status: 0, | |
| 425 | + receive: null, | |
| 426 | + receiveStatus: 0, | |
| 427 | + readBy: null, | |
| 428 | + readTime: null | |
| 429 | + }; | |
| 430 | + this.resetForm("form"); | |
| 431 | + }, | |
| 432 | + /** 搜索按钮操作 */ | |
| 433 | + handleQuery() { | |
| 434 | + this.queryParams.pageNum = 1; | |
| 435 | + this.getList(); | |
| 436 | + }, | |
| 437 | + /** 重置按钮操作 */ | |
| 438 | + resetQuery() { | |
| 439 | + this.resetForm("queryForm"); | |
| 440 | + this.handleQuery(); | |
| 441 | + }, | |
| 442 | + // 多选框选中数据 | |
| 443 | + handleSelectionChange(selection) { | |
| 444 | + this.ids = selection.map(item => item.id) | |
| 445 | + this.single = selection.length!==1 | |
| 446 | + this.multiple = !selection.length | |
| 447 | + }, | |
| 448 | + handleInfo(row){ | |
| 449 | + this.idInfo = row.id + ""; | |
| 450 | + this.openInfo = true; | |
| 451 | + this.title = "平台违规案卷详情"; | |
| 452 | + }, | |
| 453 | + /** 新增按钮操作 */ | |
| 454 | + handleAdd() { | |
| 455 | + this.reset(); | |
| 456 | + this.open = true; | |
| 457 | + this.form.number = this.getNumber(); | |
| 458 | + this.form.violationGrade = "一般类"; | |
| 459 | + this.form.sendObject = "区管理部门(治)"; | |
| 460 | + this.title = "添加平台违规案卷"; | |
| 461 | + }, | |
| 462 | + /** 修改按钮操作 */ | |
| 463 | + handleUpdate(row) { | |
| 464 | + this.reset(); | |
| 465 | + const id = row.id || this.ids | |
| 466 | + getViolationCaseFile(id).then(response => { | |
| 467 | + this.form = response.data.violationCaseFile; | |
| 468 | + let files = JSON.stringify(response.data.uploadFiles); | |
| 469 | + this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | |
| 470 | + this.open = true; | |
| 471 | + this.title = "修改平台违规案卷"; | |
| 472 | + }); | |
| 473 | + }, | |
| 474 | + /** 提交按钮 */ | |
| 475 | + submitForm() { | |
| 476 | + this.$refs["form"].validate(valid => { | |
| 477 | + if (valid) { | |
| 478 | + | |
| 479 | + if(this.form.sendObject == "运输企业" && this.form.companyName == null){ | |
| 480 | + | |
| 481 | + this.$message("请选择相关企业"); | |
| 482 | + | |
| 483 | + return; | |
| 484 | + } | |
| 485 | + | |
| 486 | + | |
| 487 | + let formData = new FormData(); | |
| 488 | + let form = this.form; | |
| 489 | + //去掉params属性 | |
| 490 | + delete form.params; | |
| 491 | + formData.append('fileList', null); | |
| 492 | + //将新增的文件放入formData | |
| 493 | + this.fileEntityList.forEach(item => { | |
| 494 | + if(item.id==null){ | |
| 495 | + formData.append('fileList', item.raw) | |
| 496 | + } | |
| 497 | + }) | |
| 498 | + if (this.form.id != null) { | |
| 499 | + formData.append("violationCaseFile", JSON.stringify(form)); | |
| 500 | + formData.append("uploadFilesList", null); | |
| 501 | + this.fileEntityList.forEach(item => { | |
| 502 | + delete item.params; | |
| 503 | + if(item != "null" && item != null){ | |
| 504 | + formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); | |
| 505 | + } | |
| 506 | + }) | |
| 507 | + updateViolationCaseFile(formData).then(response => { | |
| 508 | + this.msgSuccess("修改成功"); | |
| 509 | + this.open = false; | |
| 510 | + this.getList(); | |
| 511 | + }); | |
| 512 | + } else { | |
| 513 | + for (let key in form) { | |
| 514 | + formData.append(key, form[key] == null ? "" : form[key]) | |
| 515 | + } | |
| 516 | + addViolationCaseFile(formData).then(response => { | |
| 517 | + this.msgSuccess("新增成功"); | |
| 518 | + this.open = false; | |
| 519 | + this.getList(); | |
| 520 | + }); | |
| 521 | + } | |
| 522 | + } | |
| 523 | + }); | |
| 524 | + }, | |
| 525 | + /** 删除按钮操作 */ | |
| 526 | + handleDelete(row) { | |
| 527 | + const ids = row.id || this.ids; | |
| 528 | + this.$confirm('是否确认删除平台违规案卷编号为"' + ids + '"的数据项?', "警告", { | |
| 529 | + confirmButtonText: "确定", | |
| 530 | + cancelButtonText: "取消", | |
| 531 | + type: "warning" | |
| 532 | + }).then(function() { | |
| 533 | + return delViolationCaseFile(ids); | |
| 534 | + }).then(() => { | |
| 535 | + this.getList(); | |
| 536 | + this.msgSuccess("删除成功"); | |
| 537 | + }) | |
| 538 | + }, | |
| 539 | + /** 导出按钮操作 */ | |
| 540 | + handleExport() { | |
| 541 | + const queryParams = this.queryParams; | |
| 542 | + this.$confirm('是否确认导出所有平台违规案卷数据项?', "警告", { | |
| 543 | + confirmButtonText: "确定", | |
| 544 | + cancelButtonText: "取消", | |
| 545 | + type: "warning" | |
| 546 | + }).then(function() { | |
| 547 | + return exportViolationCaseFile(queryParams); | |
| 548 | + }).then(response => { | |
| 549 | + this.download(response.message); | |
| 550 | + }) | |
| 551 | + }, | |
| 552 | + /** 生成案卷编号 */ | |
| 553 | + getNumber(){ | |
| 554 | + const now = new Date(); | |
| 555 | + const year = now.getFullYear().toString().slice(-2); // 提取后两位数 | |
| 556 | + const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1; | |
| 557 | + const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate(); | |
| 558 | + const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours(); | |
| 559 | + const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes(); | |
| 560 | + const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds(); | |
| 561 | + const millisecond = now.getMilliseconds(); | |
| 562 | + const code = `${year}${month}${day}${hour}${minute}${second}${millisecond}`; | |
| 563 | + return code; | |
| 564 | + }, | |
| 565 | + projectNameLoadOptions(query) { | |
| 566 | + // 根据输入的关键字query异步加载选项数据 | |
| 567 | + this.isLoading = true | |
| 568 | + setTimeout(() => { | |
| 569 | + // 模拟异步加载数据 | |
| 570 | + const data = [ | |
| 571 | + { name:'项目1' }, | |
| 572 | + { name:'项目2' }, | |
| 573 | + { name:'项目3' } | |
| 574 | + ].filter(item => item.name.includes(query)) | |
| 575 | + this.projectNameList = data | |
| 576 | + this.isLoading = false | |
| 577 | + }, 200) | |
| 578 | + }, | |
| 579 | + companyLoadOptions(query) { | |
| 580 | + // 根据输入的关键字query异步加载选项数据 | |
| 581 | + this.isLoadingCompany = true | |
| 582 | + setTimeout(() => { | |
| 583 | + // 模拟异步加载数据 | |
| 584 | + const data = [ | |
| 585 | + { name:'公司1' }, | |
| 586 | + { name:'公司2' }, | |
| 587 | + { name:'公司3' } | |
| 588 | + ].filter(item => item.name.includes(query)) | |
| 589 | + this.companyList = data | |
| 590 | + this.isLoadingCompany = false | |
| 591 | + }, 200) | |
| 592 | + }, | |
| 593 | + /** | |
| 594 | + * 文件改变时,限制文件上传格式和大小 | |
| 595 | + * 文件格式只能为docx/xlsx/xls/ppt/doc/pdf/png/jpeg/png/jpg | |
| 596 | + * 大小不超过20M | |
| 597 | + * */ | |
| 598 | + fileChange(file, fileList) { | |
| 599 | + let count = 0; | |
| 600 | + for (let i = 0; i < fileList.length; i++) { | |
| 601 | + // console.log(fileList.length) | |
| 602 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 603 | + if (fileList[i].name == file.name) { | |
| 604 | + count++; | |
| 605 | + if (count == 2) { | |
| 606 | + this.$message({ | |
| 607 | + message: '已存在此文件!', | |
| 608 | + type: 'warning' | |
| 609 | + }); | |
| 610 | + for (let j = fileList.length; j > 0; j--) { | |
| 611 | + //如果存在此文件,去除新选择的重复文件 | |
| 612 | + if (fileList[j - 1].name == file.name) { | |
| 613 | + fileList.splice(j - 1, 1); | |
| 614 | + i--; | |
| 615 | + return false; | |
| 616 | + } | |
| 617 | + } | |
| 618 | + } | |
| 619 | + } | |
| 620 | + } | |
| 621 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 622 | + //格式符合后判断大小 | |
| 623 | + if ("docx,xlsx,xls,ppt,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) { | |
| 624 | + let max5M = file.size / 1024 / 1024 < 20; | |
| 625 | + if (!max5M) { | |
| 626 | + this.$message({ | |
| 627 | + message: '上传文件大小不得超过20M!', | |
| 628 | + type: 'warning' | |
| 629 | + }); | |
| 630 | + } else { | |
| 631 | + //符合条件后进行添加 | |
| 632 | + this.fileEntityList = fileList | |
| 633 | + } | |
| 634 | + } else { | |
| 635 | + this.$message({ | |
| 636 | + message: '上传文件只能是 docx、xlsx、xls、ppt、doc、pdf、png、jpeg、png、jpg格式!', | |
| 637 | + type: 'warning' | |
| 638 | + }); | |
| 639 | + } | |
| 640 | + }, | |
| 641 | + // 删除文件 | |
| 642 | + handleDeleteFile(index) { | |
| 643 | + this.fileEntityList.splice(index, 1); | |
| 644 | + }, | |
| 645 | + /** 文件下载 */ | |
| 646 | + downloadFA(row) { | |
| 647 | + let name = row.name; | |
| 648 | + let url = row.url; | |
| 649 | + const a = document.createElement('a') | |
| 650 | + a.setAttribute('download', name) | |
| 651 | + a.setAttribute('target', '_blank') | |
| 652 | + a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | |
| 653 | + a.click() | |
| 654 | + }, | |
| 655 | + /** 生成违规描述 */ | |
| 656 | + createDescribe(){ | |
| 657 | + this.rules.companyName = [{ required: true, message: "必填", trigger: "blur" }] | |
| 658 | + this.rules.projectName = [{ required: true, message: "必填", trigger: "blur" }] | |
| 659 | + this.$refs["form"].validate(valid => { | |
| 660 | + if (valid) { | |
| 661 | + let formData = this.form; | |
| 662 | + const now = new Date(); | |
| 663 | + const year = now.getFullYear(); | |
| 664 | + const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1; | |
| 665 | + const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate(); | |
| 666 | + const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours(); | |
| 667 | + const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes(); | |
| 668 | + const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds(); | |
| 669 | + const code = `${year}/${month}/${day} ${hour}:${minute}:${second}`; | |
| 670 | + this.form.describe =code + formData.companyName + "在" + formData.projectName + "出现" + formData.violationType; | |
| 671 | + this.rules.companyName = null; | |
| 672 | + this.rules.projectName = null; | |
| 673 | + } | |
| 674 | + }); | |
| 675 | + | |
| 676 | + } | |
| 677 | + } | |
| 678 | +}; | |
| 679 | +</script> | ... | ... |
trash-ui/src/views/h5/violationCaseFile/violationCaseFileInfo.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 3 | + | |
| 4 | + <el-form-item label="案卷编号" prop="number"> | |
| 5 | + <el-input v-model="form.number" placeholder="请输入案卷编号" :disabled="true"/> | |
| 6 | + </el-form-item> | |
| 7 | + | |
| 8 | + <el-form-item label="违规对象类型" prop="violationObjectType"> | |
| 9 | + <el-select v-model="form.violationObjectType" placeholder="请选择违规对象类型" style="width: 100%;" :disabled="true"> | |
| 10 | + <el-option label="工地" value="0" /> | |
| 11 | + <el-option label="消纳场" value="1" /> | |
| 12 | + <el-option label="企业" value="2" /> | |
| 13 | + </el-select> | |
| 14 | + </el-form-item> | |
| 15 | + | |
| 16 | + | |
| 17 | + <el-form-item label="所属区域" prop="owningRegion"> | |
| 18 | + <el-select v-model="form.owningRegion" placeholder="请输入所属区域" style="width: 100%;" :disabled="true"> | |
| 19 | + <el-option label="区域1" value="区域1" /> | |
| 20 | + <el-option label="区域2" value="区域2" /> | |
| 21 | + </el-select> | |
| 22 | + </el-form-item> | |
| 23 | + | |
| 24 | + <el-form-item label="违规类型" prop="violationType"> | |
| 25 | + <el-select v-model="form.violationType" placeholder="请选择违规类型" style="width: 100%;" :disabled="true"> | |
| 26 | + <el-option label="违规1" value="违规1" /> | |
| 27 | + <el-option label="违规2" value="违规2" /> | |
| 28 | + </el-select> | |
| 29 | + </el-form-item> | |
| 30 | + | |
| 31 | + | |
| 32 | + <el-form-item label="违规等级" prop="violationGrade"> | |
| 33 | + <el-select v-model="form.violationGrade" placeholder="请选择企业名称" style="width: 100%;" :disabled="true"> | |
| 34 | + <el-option label="一般类" value="一般类"/> | |
| 35 | + <el-option label="重点类" value="重点类" /> | |
| 36 | + </el-select> | |
| 37 | + </el-form-item> | |
| 38 | + | |
| 39 | + <el-form-item label="项目名称" prop="projectName"> | |
| 40 | + <el-select v-model="form.projectName" :disabled="true" style="width: 100%;"> | |
| 41 | + | |
| 42 | + </el-select> | |
| 43 | + </el-form-item> | |
| 44 | + | |
| 45 | + | |
| 46 | + <el-form-item label="企业名称" prop="companyName"> | |
| 47 | + <el-select v-model="form.companyName" :disabled="true" style="width: 100%;"> | |
| 48 | + </el-select> | |
| 49 | + </el-form-item> | |
| 50 | + | |
| 51 | + <el-form-item label="发送时间" prop="createTime"> | |
| 52 | + <el-input :value="form.createTime" :disabled="true"/> | |
| 53 | + </el-form-item> | |
| 54 | + | |
| 55 | + | |
| 56 | + <el-form-item label="发送人" prop="createBy"> | |
| 57 | + <el-input :value="form.createBy" :disabled="true"/> | |
| 58 | + </el-form-item> | |
| 59 | + | |
| 60 | + <el-form-item label="接收人" prop="receive"> | |
| 61 | + <el-input :value="form.readBy" :disabled="true"/> | |
| 62 | + </el-form-item> | |
| 63 | + | |
| 64 | + | |
| 65 | + <el-form-item label="阅读时间" prop="createBy"> | |
| 66 | + <el-input :value="form.readTime" :disabled="true"/> | |
| 67 | + </el-form-item> | |
| 68 | + | |
| 69 | + | |
| 70 | + <el-form-item label="违规描述" prop="describe"> | |
| 71 | + <el-input v-model="form.describe" type="textarea" placeholder="请输入内容" :row="4" :disabled="true"/> | |
| 72 | + </el-form-item> | |
| 73 | + | |
| 74 | + <el-form-item label="推送对象"> | |
| 75 | + <el-radio-group v-model="form.sendObject" :disabled="true"> | |
| 76 | + <el-radio label="区管理部门(治)">区管理部门(治)</el-radio> | |
| 77 | + <el-radio label="区管理部门(消)">区管理部门(消)</el-radio> | |
| 78 | + <el-radio label="运输企业">运输企业</el-radio> | |
| 79 | + </el-radio-group> | |
| 80 | + </el-form-item> | |
| 81 | + <el-row> | |
| 82 | + <el-col :offset="3"><el-button type="primary" @click="open = true">查看附件({{fileEntityList.length}})</el-button></el-col> | |
| 83 | + </el-row> | |
| 84 | + <el-table :data="replyApprovalProcessList" v-if="entryType==0"> | |
| 85 | + <el-table-column property="replyPeople" label="操作人" header-align="center" align="center"></el-table-column> | |
| 86 | + <el-table-column property="reply" label="意见" header-align="center" align="center"></el-table-column> | |
| 87 | + <el-table-column property="replyTime" label="操作时间" header-align="center" align="center"></el-table-column> | |
| 88 | + <el-table-column property="replyImg" label="图片预览" header-align="center" align="center"> | |
| 89 | + <template slot-scope="scope"> | |
| 90 | + <el-button | |
| 91 | + size="mini" | |
| 92 | + type="text" | |
| 93 | + icon="el-icon-view" | |
| 94 | + @click="openImage(scope.row.replyImg)" | |
| 95 | + v-hasPermi="['casefile:violationWarningInformation:view']" | |
| 96 | + >查看</el-button> | |
| 97 | + </template> | |
| 98 | + </el-table-column> | |
| 99 | + </el-table> | |
| 100 | + <el-dialog title="查看附件" :visible.sync="open" append-to-body> | |
| 101 | + <el-table :data="fileEntityList"> | |
| 102 | + <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | |
| 103 | + <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | |
| 104 | + <template slot-scope="scope"> | |
| 105 | + <el-button | |
| 106 | + size="small" type="success" | |
| 107 | + icon="el-icon-download" | |
| 108 | + @click="downloadFA(scope.row)" | |
| 109 | + v-hasPermi="['office:management:edit']" | |
| 110 | + v-if="form.id!=null" | |
| 111 | + round>下载 | |
| 112 | + </el-button> | |
| 113 | + </template> | |
| 114 | + </el-table-column> | |
| 115 | + </el-table> | |
| 116 | + <div slot="footer" class="dialog-footer"> | |
| 117 | + <el-button @click="open = false">取 消</el-button> | |
| 118 | + </div> | |
| 119 | + </el-dialog> | |
| 120 | + <el-dialog title="预览" :visible.sync="openImg" append-to-body v-if="entryType==0"> | |
| 121 | + <img :src="img" width="100%" height="750px" /> | |
| 122 | + </el-dialog> | |
| 123 | + </el-form> | |
| 124 | +</template> | |
| 125 | + | |
| 126 | +<script> | |
| 127 | +import {getViolationCaseFile} from "@/api/casefile/violationCaseFile"; | |
| 128 | +import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess"; | |
| 129 | +export default { | |
| 130 | + name: "violationWarningInformationInfo", | |
| 131 | + props: { | |
| 132 | + businessKey: { | |
| 133 | + type: String | |
| 134 | + }, | |
| 135 | + idInfo: { | |
| 136 | + type: String | |
| 137 | + }, | |
| 138 | + entryType: { | |
| 139 | + type: Number | |
| 140 | + }, | |
| 141 | + }, | |
| 142 | + data() { | |
| 143 | + return { | |
| 144 | + form: {}, | |
| 145 | + fileEntityList: [], | |
| 146 | + open: false, | |
| 147 | + replyApprovalProcessList:[], | |
| 148 | + openImg:false, | |
| 149 | + img:null, | |
| 150 | + } | |
| 151 | + }, | |
| 152 | + created() { | |
| 153 | + let id = this.idInfo.split(":"); | |
| 154 | + | |
| 155 | + if(id.length == 2){ | |
| 156 | + this.idInfo = id[1]; | |
| 157 | + }else{ | |
| 158 | + this.idInfo = id; | |
| 159 | + } | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + this.init(); | |
| 165 | + }, | |
| 166 | + methods:{ | |
| 167 | + init(){ | |
| 168 | + getViolationCaseFile(this.idInfo).then(response => { | |
| 169 | + this.form = response.data.violationCaseFile; | |
| 170 | + let files = JSON.stringify(response.data.uploadFiles); | |
| 171 | + this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")); | |
| 172 | + }); | |
| 173 | + | |
| 174 | + | |
| 175 | + listReplyApprovalProcess({tableName:"workflow_casefile" + ":" + this.idInfo}).then(response => { | |
| 176 | + this.replyApprovalProcessList = response.rows; | |
| 177 | + }); | |
| 178 | + }, | |
| 179 | + /** 文件下载 */ | |
| 180 | + downloadFA(row) { | |
| 181 | + let name = row.name; | |
| 182 | + let url = row.url; | |
| 183 | + const a = document.createElement('a') | |
| 184 | + a.setAttribute('download', name) | |
| 185 | + a.setAttribute('target', '_blank') | |
| 186 | + a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | |
| 187 | + a.click() | |
| 188 | + }, | |
| 189 | + openImage(base64){ | |
| 190 | + this.openImg = true; | |
| 191 | + this.img = base64; | |
| 192 | + }, | |
| 193 | + } | |
| 194 | +} | |
| 195 | +</script> | |
| 196 | + | |
| 197 | +<style scoped> | |
| 198 | + | |
| 199 | +</style> | ... | ... |
trash-ui/src/views/h5/violationWarningInformation/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="105px"> | |
| 4 | + <el-form-item label="违规对象类型" prop="violationObjectType"> | |
| 5 | + <el-select v-model="queryParams.violationObjectType" placeholder="请选择违规对象类型" clearable size="small"> | |
| 6 | + <el-option label="工地" value="0" /> | |
| 7 | + <el-option label="消纳场" value="1" /> | |
| 8 | + <el-option label="企业" value="2" /> | |
| 9 | + </el-select> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="所属区域" prop="owningRegion"> | |
| 12 | + <el-select v-model="queryParams.owningRegion" placeholder="请选择违规类型" clearable size="small"> | |
| 13 | + <el-option v-for="item in areas" :label="item.name" :value="item.name" /> | |
| 14 | + </el-select> | |
| 15 | + </el-form-item> | |
| 16 | + <el-form-item label="违规类型" prop="violationType"> | |
| 17 | + <el-select v-model="queryParams.violationType" placeholder="请选择违规类型" clearable size="small"> | |
| 18 | + <el-option v-for="item in caseType" :label="item.name" :value="item.name" /> | |
| 19 | + </el-select> | |
| 20 | + </el-form-item> | |
| 21 | + <el-form-item label="项目名称" prop="projectName"> | |
| 22 | + <el-input | |
| 23 | + v-model="queryParams.projectName" | |
| 24 | + placeholder="请输入项目名称" | |
| 25 | + clearable | |
| 26 | + size="small" | |
| 27 | + @keyup.enter.native="handleQuery" | |
| 28 | + /> | |
| 29 | + </el-form-item> | |
| 30 | + <el-form-item label="日期" prop="createTime"> | |
| 31 | + <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.createTime" type="date" | |
| 32 | + value-format="yyyy-MM-dd" placeholder="开始时间"> | |
| 33 | + </el-date-picker> | |
| 34 | + </el-form-item> | |
| 35 | + <el-form-item> | |
| 36 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |
| 37 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |
| 38 | + </el-form-item> | |
| 39 | + </el-form> | |
| 40 | + | |
| 41 | + <a @click="handleInfo(item)" v-for="item in violationWarningInformationList"> | |
| 42 | + <el-card class="box-card" style="margin-bottom: 10px;" | |
| 43 | + > | |
| 44 | + <el-row class="card_row"> | |
| 45 | + <el-col :span="24" class="card_grid"> | |
| 46 | + <div class="card_title" style="font-weight: bold;">违规类型:{{item.violationType}}</div> | |
| 47 | + </el-col> | |
| 48 | + </el-row> | |
| 49 | + <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;"> | |
| 50 | + <el-col :span="24"> | |
| 51 | + <span >项目名称:{{item.projectName}}</span> | |
| 52 | + </el-col> | |
| 53 | + </el-row> | |
| 54 | + | |
| 55 | + <el-row class="card_row"> | |
| 56 | + <el-col :span="24" class="card_grid" > | |
| 57 | + <span >企业名称:{{item.companyName}}</span> | |
| 58 | + </el-col> | |
| 59 | + </el-row> | |
| 60 | + | |
| 61 | + <el-row class="card_row"> | |
| 62 | + <el-col :span="12"> | |
| 63 | + <span >违规对象类型:{{item.violationObjectType == 0 ? "工地" :item.violationObjectType == 1 ?"消纳场":"企业"}}</span> | |
| 64 | + </el-col> | |
| 65 | + <el-col :span="12" class="card_grid" > | |
| 66 | + <span >所属区域:{{item.owningRegion}}</span> | |
| 67 | + </el-col> | |
| 68 | + </el-row> | |
| 69 | + <el-row class="card_row"> | |
| 70 | + <el-col :span="24" class="card_grid" > | |
| 71 | + <div>时间:{{item.createTime}}</div> | |
| 72 | + </el-col> | |
| 73 | + </el-row> | |
| 74 | + <span>{{parseStatus(item.status) }}</span> | |
| 75 | + | |
| 76 | + </el-card> | |
| 77 | + </a> | |
| 78 | + | |
| 79 | + <pagination | |
| 80 | + v-show="total>0" | |
| 81 | + :total="total" | |
| 82 | + :page.sync="queryParams.pageNum" | |
| 83 | + :limit.sync="queryParams.pageSize" | |
| 84 | + @pagination="getList" | |
| 85 | + /> | |
| 86 | + | |
| 87 | + <!-- 添加或修改违规预警信息对话框 --> | |
| 88 | + <el-dialog :title="title" :visible.sync="open" width="300px" append-to-body :close-on-click-modal="false"> | |
| 89 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 90 | + | |
| 91 | + <el-form-item label="案卷编号" prop="number"> | |
| 92 | + <el-input v-model="form.number" placeholder="请输入案卷编号" :disabled="true"/> | |
| 93 | + </el-form-item> | |
| 94 | + <el-form-item label="违规对象类型" prop="violationObjectType"> | |
| 95 | + <el-select v-model="form.violationObjectType" placeholder="请选择违规对象类型" style="width: 100%;"> | |
| 96 | + <el-option label="工地" value="0" /> | |
| 97 | + <el-option label="消纳场" value="1" /> | |
| 98 | + <el-option label="企业" value="2" /> | |
| 99 | + </el-select> | |
| 100 | + </el-form-item> | |
| 101 | + | |
| 102 | + <el-form-item label="所属区域" prop="owningRegion"> | |
| 103 | + <el-select v-model="form.place" placeholder="请输入所属区域" style="width: 100%;"> | |
| 104 | + <el-option v-for="item in areas" :label="item.name" :value="item.code" @click.native="selectArea(item)"/> | |
| 105 | + </el-select> | |
| 106 | + </el-form-item> | |
| 107 | + <el-form-item label="违规类型" prop="violationType"> | |
| 108 | + <el-select v-model="form.violationType" placeholder="请选择违规类型" style="width: 100%;"> | |
| 109 | + <el-option v-for="item in caseType" :label="item.name" :value="item.name" /> | |
| 110 | + </el-select> | |
| 111 | + </el-form-item> | |
| 112 | + | |
| 113 | + <el-form-item label="违规等级" prop="violationGrade"> | |
| 114 | + <el-select v-model="form.violationGrade" placeholder="请选择企业名称" style="width: 100%;"> | |
| 115 | + <el-option label="一般类" value="一般类"/> | |
| 116 | + <el-option label="重点类" value="重点类" /> | |
| 117 | + </el-select> | |
| 118 | + </el-form-item> | |
| 119 | + <el-form-item label="项目名称" prop="projectName"> | |
| 120 | + <el-select v-model="form.projectName" :filterable="true" :remote-method="projectNameLoadOptions" :loading="isLoading" placeholder="请输入项目名称" style="width: 100%;"> | |
| 121 | + <el-option v-for="item in projectNameList" :key="item.name" :label="item.name" :value="item.name"></el-option> | |
| 122 | + </el-select> | |
| 123 | + </el-form-item> | |
| 124 | + | |
| 125 | + <el-button type="primary" @click="createDescribe">生成违规描述</el-button> | |
| 126 | + <el-form-item label="企业名称" prop="companyName"> | |
| 127 | + <el-select v-model="form.companyName" :filterable="true" :remote-method="companyLoadOptions" :loading="isLoadingCompany" placeholder="请输入项目名称" style="width: 100%;"> | |
| 128 | + <el-option v-for="item in companyList" :key="item.name" :label="item.name" :value="item.name"></el-option> | |
| 129 | + </el-select> | |
| 130 | + </el-form-item> | |
| 131 | + | |
| 132 | + <el-form-item label="违规描述" prop="describe"> | |
| 133 | + <el-input v-model="form.describe" type="textarea" placeholder="请输入内容" :rows="4"/> | |
| 134 | + </el-form-item> | |
| 135 | + <el-form-item label="推送对象"> | |
| 136 | + <el-radio-group v-model="form.sendObject"> | |
| 137 | + <el-radio label="区管理部门(治)">区管理部门(治)</el-radio> | |
| 138 | + <el-radio label="区管理部门(消)">区管理部门(消)</el-radio> | |
| 139 | + <el-radio label="运输企业">运输企业</el-radio> | |
| 140 | + </el-radio-group> | |
| 141 | + </el-form-item> | |
| 142 | + <el-form-item prop="fileEntityList" label="附件"> | |
| 143 | + <el-upload | |
| 144 | + ref="upload" | |
| 145 | + action="" | |
| 146 | + accept=".docx,.xlsx,.xls,.ppt,.doc,.pdf,.png,.jpeg,.png,.jpg" | |
| 147 | + :on-change="fileChange" | |
| 148 | + :auto-upload="false" | |
| 149 | + :show-file-list="false" | |
| 150 | + multiple | |
| 151 | + :file-list="fileEntityList"> | |
| 152 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 153 | + </el-upload> | |
| 154 | + </el-form-item> | |
| 155 | + <el-table :data="fileEntityList"> | |
| 156 | + <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | |
| 157 | + <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | |
| 158 | + <template slot-scope="scope"> | |
| 159 | + <el-button | |
| 160 | + size="small" type="success" | |
| 161 | + icon="el-icon-download" | |
| 162 | + @click="downloadFA(scope.row)" | |
| 163 | + v-hasPermi="['office:management:edit']" | |
| 164 | + v-if="form.id!=null" | |
| 165 | + round>下载 | |
| 166 | + </el-button> | |
| 167 | + <el-button | |
| 168 | + size="small" type="danger" | |
| 169 | + icon="el-icon-delete" | |
| 170 | + @click="handleDeleteFile(scope.$index)" | |
| 171 | + v-hasPermi="['office:management:remove']" | |
| 172 | + round>删除 | |
| 173 | + </el-button> | |
| 174 | + </template> | |
| 175 | + </el-table-column> | |
| 176 | + </el-table> | |
| 177 | + </el-form> | |
| 178 | + <div slot="footer" class="dialog-footer"> | |
| 179 | + <el-button type="primary" @click="submitForm">确 定</el-button> | |
| 180 | + <el-button @click="cancel">取 消</el-button> | |
| 181 | + </div> | |
| 182 | + </el-dialog> | |
| 183 | + | |
| 184 | + <el-dialog :title="title" :visible.sync="openInfo" width="300px" append-to-body :close-on-click-modal="false"> | |
| 185 | + <violationWarningInformationInfo :idInfo="idInfo" v-if="openInfo" :entryType="0"/> | |
| 186 | + <div slot="footer" class="dialog-footer"> | |
| 187 | + <el-button @click="cancel">取 消</el-button> | |
| 188 | + </div> | |
| 189 | + </el-dialog> | |
| 190 | + </div> | |
| 191 | +</template> | |
| 192 | + | |
| 193 | +<script> | |
| 194 | +import { listViolationWarningInformation, getViolationWarningInformation, delViolationWarningInformation, addViolationWarningInformation, updateViolationWarningInformation, exportViolationWarningInformation } from "@/api/casefile/violationWarningInformation"; | |
| 195 | +import violationWarningInformationInfo from "./violationWarningInformationInfo"; | |
| 196 | +import { | |
| 197 | + earthsitesList, | |
| 198 | + constructionsitesList, | |
| 199 | + getDict, | |
| 200 | + getArea, | |
| 201 | + companyList, | |
| 202 | + truckList, | |
| 203 | +} from "@/api/dict"; | |
| 204 | + | |
| 205 | + import pagination from '../Pagination'; | |
| 206 | +export default { | |
| 207 | + name: "ViolationWarningInformation", | |
| 208 | + components: { violationWarningInformationInfo ,pagination}, | |
| 209 | + data() { | |
| 210 | + return { | |
| 211 | + // 遮罩层 | |
| 212 | + loading: true, | |
| 213 | + // 选中数组 | |
| 214 | + ids: [], | |
| 215 | + // 非单个禁用 | |
| 216 | + single: true, | |
| 217 | + // 非多个禁用 | |
| 218 | + multiple: true, | |
| 219 | + // 显示搜索条件 | |
| 220 | + showSearch: true, | |
| 221 | + // 总条数 | |
| 222 | + total: 0, | |
| 223 | + // 违规预警信息表格数据 | |
| 224 | + violationWarningInformationList: [], | |
| 225 | + // 弹出层标题 | |
| 226 | + title: "", | |
| 227 | + // 是否显示弹出层 | |
| 228 | + open: false, | |
| 229 | + // 查询参数 | |
| 230 | + queryParams: { | |
| 231 | + pageNum: 1, | |
| 232 | + pageSize: 10, | |
| 233 | + number: null, | |
| 234 | + violationObjectType: null, | |
| 235 | + owningRegion: null, | |
| 236 | + violationType: null, | |
| 237 | + violationGrade: null, | |
| 238 | + projectName: null, | |
| 239 | + companyName: null, | |
| 240 | + describe: null, | |
| 241 | + sendObject: null, | |
| 242 | + receive: null, | |
| 243 | + receiveStatus: null, | |
| 244 | + readBy: null, | |
| 245 | + readTime: null, | |
| 246 | + replyOne: null, | |
| 247 | + replyTwo: null, | |
| 248 | + replyThree: null | |
| 249 | + }, | |
| 250 | + // 表单参数 | |
| 251 | + form: {}, | |
| 252 | + // 表单校验 | |
| 253 | + rules: { | |
| 254 | + number :[ | |
| 255 | + { required: true, message: "必填", trigger: "blur" } | |
| 256 | + ], | |
| 257 | + violationObjectType :[ | |
| 258 | + { required: true, message: "必填", trigger: "blur" } | |
| 259 | + ], | |
| 260 | + owningRegion :[ | |
| 261 | + { required: true, message: "必填", trigger: "blur" } | |
| 262 | + ], | |
| 263 | + violationType :[ | |
| 264 | + { required: true, message: "必填", trigger: "blur" } | |
| 265 | + ], | |
| 266 | + }, | |
| 267 | + caseType:[{code:0,name:"工地预警-未报开工作业"}, | |
| 268 | + {code:1,name:"工地预警-视频设备离线超时报警"}, | |
| 269 | + {code:2,name:"工地预警-三无车辆进入工地"}, | |
| 270 | + {code:3,name:"工地预警未按时间作业"}, | |
| 271 | + {code:4,name:"消纳场预警-未报开工作业"}, | |
| 272 | + {code:5,name:"消纳场预警-视频设备离线超时报警"}, | |
| 273 | + {code:6,name:"消纳场预警-三无车辆进入消纳场"}, | |
| 274 | + {code:7,name:"消纳场预警-未到指定的消纳场作业"}, | |
| 275 | + {code:8,name:"离线运输报警(工)"}, | |
| 276 | + {code:9,name:"离线运输报警(消)"}, | |
| 277 | + {code:10,name:"未激活车辆作业"}, | |
| 278 | + {code:11,name:"未核准作业车辆作业"}, | |
| 279 | + {code:12,name:"未按线路行驶"}, | |
| 280 | + {code:13,name:"闯禁行驶"}, | |
| 281 | + {code:14,name:"失信车辆作业"}], | |
| 282 | + projectNameList:[ | |
| 283 | + ], | |
| 284 | + isLoading: false, | |
| 285 | + fileEntityList:[], | |
| 286 | + companyList:[ | |
| 287 | + ], | |
| 288 | + remoteQueryData: { | |
| 289 | + "page": 1, | |
| 290 | + "size": 9999 | |
| 291 | + }, | |
| 292 | + isLoadingCompany: false, | |
| 293 | + idInfo:null, | |
| 294 | + openInfo:false, | |
| 295 | + areas:[], | |
| 296 | + data:{}, | |
| 297 | + }; | |
| 298 | + }, | |
| 299 | + created() { | |
| 300 | + getArea().then(res=>{ | |
| 301 | + | |
| 302 | + this.areas = res.result; | |
| 303 | + }); | |
| 304 | + | |
| 305 | + | |
| 306 | + constructionsitesList(this.remoteQueryData).then(res => { | |
| 307 | + this.projectNameList = res.result.list; | |
| 308 | + earthsitesList(this.remoteQueryData).then(res => { | |
| 309 | + for(var i in res.result.list){ | |
| 310 | + this.projectNameList.push(res.result.list[i]); | |
| 311 | + } | |
| 312 | + }); | |
| 313 | + }); | |
| 314 | + | |
| 315 | + console.log(this.data); | |
| 316 | + | |
| 317 | + companyList(this.remoteQueryData).then(res => { | |
| 318 | + this.companyList = res.result.list; | |
| 319 | + }); | |
| 320 | + this.getList(); | |
| 321 | + }, | |
| 322 | + methods: { | |
| 323 | + selectArea(item){ | |
| 324 | + | |
| 325 | + this.form.owningRegion = item.name; | |
| 326 | + this.form.projectName = null; | |
| 327 | + | |
| 328 | + }, | |
| 329 | + /** 查询违规预警信息列表 */ | |
| 330 | + getList() { | |
| 331 | + this.loading = true; | |
| 332 | + listViolationWarningInformation(this.queryParams).then(response => { | |
| 333 | + this.violationWarningInformationList = response.rows; | |
| 334 | + this.total = response.total; | |
| 335 | + this.loading = false; | |
| 336 | + }); | |
| 337 | + }, | |
| 338 | + // 取消按钮 | |
| 339 | + cancel() { | |
| 340 | + this.open = false; | |
| 341 | + this.openInfo = false; | |
| 342 | + this.reset(); | |
| 343 | + }, | |
| 344 | + // 表单重置 | |
| 345 | + reset() { | |
| 346 | + this.fileEntityList = []; | |
| 347 | + this.form = { | |
| 348 | + id: null, | |
| 349 | + number: null, | |
| 350 | + violationObjectType: null, | |
| 351 | + owningRegion: null, | |
| 352 | + violationType: null, | |
| 353 | + violationGrade: null, | |
| 354 | + projectName: null, | |
| 355 | + companyName: null, | |
| 356 | + describe: null, | |
| 357 | + sendObject: null, | |
| 358 | + createTime: null, | |
| 359 | + createBy: null, | |
| 360 | + updateTime: null, | |
| 361 | + updateBy: null, | |
| 362 | + receive: null, | |
| 363 | + receiveStatus: 0, | |
| 364 | + readBy: null, | |
| 365 | + readTime: null, | |
| 366 | + replyOne: null, | |
| 367 | + replyTwo: null, | |
| 368 | + replyThree: null | |
| 369 | + }; | |
| 370 | + this.resetForm("form"); | |
| 371 | + }, | |
| 372 | + /** 搜索按钮操作 */ | |
| 373 | + handleQuery() { | |
| 374 | + this.queryParams.pageNum = 1; | |
| 375 | + this.getList(); | |
| 376 | + }, | |
| 377 | + /** 重置按钮操作 */ | |
| 378 | + resetQuery() { | |
| 379 | + this.resetForm("queryForm"); | |
| 380 | + this.handleQuery(); | |
| 381 | + }, | |
| 382 | + // 多选框选中数据 | |
| 383 | + handleSelectionChange(selection) { | |
| 384 | + this.ids = selection.map(item => item.id) | |
| 385 | + this.single = selection.length!==1 | |
| 386 | + this.multiple = !selection.length | |
| 387 | + }, | |
| 388 | + handleInfo(row){ | |
| 389 | + this.idInfo = row.id+""; | |
| 390 | + this.openInfo = true; | |
| 391 | + this.title = "平台违规案卷详情"; | |
| 392 | + }, | |
| 393 | + /** 新增按钮操作 */ | |
| 394 | + handleAdd() { | |
| 395 | + this.reset(); | |
| 396 | + this.open = true; | |
| 397 | + this.form.number = this.getNumber(); | |
| 398 | + this.form.violationGrade = "一般类"; | |
| 399 | + this.form.sendObject = "区管理部门(治)"; | |
| 400 | + this.title = "添加违规预警信息"; | |
| 401 | + }, | |
| 402 | + /** 修改按钮操作 */ | |
| 403 | + handleUpdate(row) { | |
| 404 | + this.reset(); | |
| 405 | + const id = row.id || this.ids | |
| 406 | + getViolationWarningInformation(id).then(response => { | |
| 407 | + this.form = response.data.violationWarningInformation; | |
| 408 | + let files = JSON.stringify(response.data.uploadFiles); | |
| 409 | + this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | |
| 410 | + this.open = true; | |
| 411 | + this.title = "修改违规预警信息"; | |
| 412 | + }); | |
| 413 | + | |
| 414 | + }, | |
| 415 | + /** 提交按钮 */ | |
| 416 | + submitForm() { | |
| 417 | + this.$refs["form"].validate(valid => { | |
| 418 | + if (valid) { | |
| 419 | + if(this.form.sendObject == "运输企业" && this.form.companyName == null){ | |
| 420 | + | |
| 421 | + this.$message("请选择相关企业"); | |
| 422 | + | |
| 423 | + return; | |
| 424 | + } | |
| 425 | + let formData = new FormData(); | |
| 426 | + let form = this.form; | |
| 427 | + //去掉params属性 | |
| 428 | + delete form.params; | |
| 429 | + formData.append('fileList', null); | |
| 430 | + //将新增的文件放入formData | |
| 431 | + this.fileEntityList.forEach(item => { | |
| 432 | + if(item.id==null){ | |
| 433 | + formData.append('fileList', item.raw) | |
| 434 | + } | |
| 435 | + }) | |
| 436 | + if (this.form.id != null) { | |
| 437 | + formData.append("violationWarningInformation", JSON.stringify(form)); | |
| 438 | + formData.append("uploadFilesList", null); | |
| 439 | + this.fileEntityList.forEach(item => { | |
| 440 | + delete item.params; | |
| 441 | + if(item != "null" && item != null){ | |
| 442 | + formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); | |
| 443 | + } | |
| 444 | + }) | |
| 445 | + updateViolationWarningInformation(formData).then(response => { | |
| 446 | + this.msgSuccess("修改成功"); | |
| 447 | + this.open = false; | |
| 448 | + this.getList(); | |
| 449 | + }); | |
| 450 | + } else { | |
| 451 | + for (let key in form) { | |
| 452 | + formData.append(key, form[key] == null ? "" : form[key]) | |
| 453 | + } | |
| 454 | + addViolationWarningInformation(formData).then(response => { | |
| 455 | + this.msgSuccess("新增成功"); | |
| 456 | + this.open = false; | |
| 457 | + this.getList(); | |
| 458 | + }); | |
| 459 | + } | |
| 460 | + } | |
| 461 | + }); | |
| 462 | + }, | |
| 463 | + /** 删除按钮操作 */ | |
| 464 | + handleDelete(row) { | |
| 465 | + const ids = row.id || this.ids; | |
| 466 | + this.$confirm('是否确认删除违规预警信息编号为"' + ids + '"的数据项?', "警告", { | |
| 467 | + confirmButtonText: "确定", | |
| 468 | + cancelButtonText: "取消", | |
| 469 | + type: "warning" | |
| 470 | + }).then(function() { | |
| 471 | + return delViolationWarningInformation(ids); | |
| 472 | + }).then(() => { | |
| 473 | + this.getList(); | |
| 474 | + this.msgSuccess("删除成功"); | |
| 475 | + }) | |
| 476 | + }, | |
| 477 | + /** 导出按钮操作 */ | |
| 478 | + handleExport() { | |
| 479 | + const queryParams = this.queryParams; | |
| 480 | + this.$confirm('是否确认导出所有违规预警信息数据项?', "警告", { | |
| 481 | + confirmButtonText: "确定", | |
| 482 | + cancelButtonText: "取消", | |
| 483 | + type: "warning" | |
| 484 | + }).then(function() { | |
| 485 | + return exportViolationWarningInformation(queryParams); | |
| 486 | + }).then(response => { | |
| 487 | + this.download(response.message); | |
| 488 | + }) | |
| 489 | + }, | |
| 490 | + /** 生成案卷编号 */ | |
| 491 | + getNumber(){ | |
| 492 | + const now = new Date(); | |
| 493 | + const year = now.getFullYear().toString().slice(-2); // 提取后两位数 | |
| 494 | + const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1; | |
| 495 | + const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate(); | |
| 496 | + const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours(); | |
| 497 | + const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes(); | |
| 498 | + const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds(); | |
| 499 | + const millisecond = now.getMilliseconds(); | |
| 500 | + const code = `${year}${month}${day}${hour}${minute}${second}${millisecond}`; | |
| 501 | + return code; | |
| 502 | + }, | |
| 503 | + projectNameLoadOptions(query) { | |
| 504 | + // 根据输入的关键字query异步加载选项数据 | |
| 505 | + this.isLoading = true | |
| 506 | + setTimeout(() => { | |
| 507 | + // 模拟异步加载数据 | |
| 508 | + const data = [ | |
| 509 | + { name:'项目1' }, | |
| 510 | + { name:'项目2' }, | |
| 511 | + { name:'项目3' } | |
| 512 | + ].filter(item => item.name.includes(query)) | |
| 513 | + this.projectNameList = data | |
| 514 | + this.isLoading = false | |
| 515 | + }, 200) | |
| 516 | + }, | |
| 517 | + companyLoadOptions(query) { | |
| 518 | + // 根据输入的关键字query异步加载选项数据 | |
| 519 | + this.isLoadingCompany = true | |
| 520 | + setTimeout(() => { | |
| 521 | + // 模拟异步加载数据 | |
| 522 | + const data = [ | |
| 523 | + { name:'公司1' }, | |
| 524 | + { name:'公司2' }, | |
| 525 | + { name:'公司3' } | |
| 526 | + ].filter(item => item.name.includes(query)) | |
| 527 | + this.companyList = data | |
| 528 | + this.isLoadingCompany = false | |
| 529 | + }, 200) | |
| 530 | + }, | |
| 531 | + /** | |
| 532 | + * 文件改变时,限制文件上传格式和大小 | |
| 533 | + * 文件格式只能为docx/xlsx/xls/ppt/doc/pdf/png/jpeg/png/jpg | |
| 534 | + * 大小不超过20M | |
| 535 | + * */ | |
| 536 | + fileChange(file, fileList) { | |
| 537 | + let count = 0; | |
| 538 | + for (let i = 0; i < fileList.length; i++) { | |
| 539 | + // console.log(fileList.length) | |
| 540 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 541 | + if (fileList[i].name == file.name) { | |
| 542 | + count++; | |
| 543 | + if (count == 2) { | |
| 544 | + this.$message({ | |
| 545 | + message: '已存在此文件!', | |
| 546 | + type: 'warning' | |
| 547 | + }); | |
| 548 | + for (let j = fileList.length; j > 0; j--) { | |
| 549 | + //如果存在此文件,去除新选择的重复文件 | |
| 550 | + if (fileList[j - 1].name == file.name) { | |
| 551 | + fileList.splice(j - 1, 1); | |
| 552 | + i--; | |
| 553 | + return false; | |
| 554 | + } | |
| 555 | + } | |
| 556 | + } | |
| 557 | + } | |
| 558 | + } | |
| 559 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 560 | + //格式符合后判断大小 | |
| 561 | + if ("docx,xlsx,xls,ppt,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) { | |
| 562 | + let max5M = file.size / 1024 / 1024 < 20; | |
| 563 | + if (!max5M) { | |
| 564 | + this.$message({ | |
| 565 | + message: '上传文件大小不得超过20M!', | |
| 566 | + type: 'warning' | |
| 567 | + }); | |
| 568 | + } else { | |
| 569 | + //符合条件后进行添加 | |
| 570 | + this.fileEntityList = fileList | |
| 571 | + } | |
| 572 | + } else { | |
| 573 | + this.$message({ | |
| 574 | + message: '上传文件只能是 docx、xlsx、xls、ppt、doc、pdf、png、jpeg、png、jpg格式!', | |
| 575 | + type: 'warning' | |
| 576 | + }); | |
| 577 | + } | |
| 578 | + }, | |
| 579 | + // 删除文件 | |
| 580 | + handleDeleteFile(index) { | |
| 581 | + this.fileEntityList.splice(index, 1); | |
| 582 | + }, | |
| 583 | + /** 文件下载 */ | |
| 584 | + downloadFA(row) { | |
| 585 | + let name = row.name; | |
| 586 | + let url = row.url; | |
| 587 | + const a = document.createElement('a') | |
| 588 | + a.setAttribute('download', name) | |
| 589 | + a.setAttribute('target', '_blank') | |
| 590 | + a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | |
| 591 | + a.click() | |
| 592 | + }, | |
| 593 | + /** 生成违规描述 */ | |
| 594 | + createDescribe(){ | |
| 595 | + this.rules.companyName = [{ required: true, message: "必填", trigger: "blur" }] | |
| 596 | + this.rules.projectName = [{ required: true, message: "必填", trigger: "blur" }] | |
| 597 | + this.$refs["form"].validate(valid => { | |
| 598 | + if (valid) { | |
| 599 | + let formData = this.form; | |
| 600 | + const now = new Date(); | |
| 601 | + const year = now.getFullYear(); | |
| 602 | + const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1; | |
| 603 | + const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate(); | |
| 604 | + const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours(); | |
| 605 | + const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes(); | |
| 606 | + const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds(); | |
| 607 | + const code = `${year}/${month}/${day} ${hour}:${minute}:${second}`; | |
| 608 | + this.form.describe =code + formData.companyName + "在" + formData.projectName + "出现" + formData.violationType; | |
| 609 | + this.rules.companyName = null; | |
| 610 | + this.rules.projectName = null; | |
| 611 | + } | |
| 612 | + }); | |
| 613 | + | |
| 614 | + } | |
| 615 | + } | |
| 616 | +}; | |
| 617 | +</script> | ... | ... |
trash-ui/src/views/h5/violationWarningInformation/violationWarningInformationInfo.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 3 | + | |
| 4 | + <el-form-item label="案卷编号" prop="number"> | |
| 5 | + <el-input v-model="form.number" placeholder="请输入案卷编号" :disabled="true"/> | |
| 6 | + </el-form-item> | |
| 7 | + | |
| 8 | + <el-form-item label="违规对象类型" prop="violationObjectType"> | |
| 9 | + <el-select v-model="form.violationObjectType" placeholder="请选择违规对象类型" style="width: 100%;" :disabled="true"> | |
| 10 | + <el-option label="工地" value="0" /> | |
| 11 | + <el-option label="消纳场" value="1" /> | |
| 12 | + <el-option label="企业" value="2" /> | |
| 13 | + </el-select> | |
| 14 | + </el-form-item> | |
| 15 | + | |
| 16 | + | |
| 17 | + <el-form-item label="所属区域" prop="owningRegion"> | |
| 18 | + <el-select v-model="form.owningRegion" placeholder="请输入所属区域" style="width: 100%;" :disabled="true"> | |
| 19 | + </el-select> | |
| 20 | + </el-form-item> | |
| 21 | + | |
| 22 | + <el-form-item label="违规类型" prop="violationType"> | |
| 23 | + <el-select v-model="form.violationType" placeholder="请选择违规类型" style="width: 100%;" :disabled="true"> | |
| 24 | + </el-select> | |
| 25 | + </el-form-item> | |
| 26 | + | |
| 27 | + <el-form-item label="违规等级" prop="violationGrade"> | |
| 28 | + <el-select v-model="form.violationGrade" placeholder="请选择企业名称" style="width: 100%;" :disabled="true"> | |
| 29 | + <el-option label="一般类" value="一般类"/> | |
| 30 | + <el-option label="重点类" value="重点类"/> | |
| 31 | + </el-select> | |
| 32 | + </el-form-item> | |
| 33 | + | |
| 34 | + <el-form-item label="项目名称" prop="projectName"> | |
| 35 | + <el-select v-model="form.projectName" :disabled="true" style="width: 100%;"> | |
| 36 | + | |
| 37 | + </el-select> | |
| 38 | + </el-form-item> | |
| 39 | + | |
| 40 | + | |
| 41 | + <el-form-item label="企业名称" prop="companyName"> | |
| 42 | + <el-select v-model="form.companyName" :disabled="true" style="width: 100%;"> | |
| 43 | + </el-select> | |
| 44 | + </el-form-item> | |
| 45 | + | |
| 46 | + <el-form-item label="发送时间" prop="createTime"> | |
| 47 | + <el-input :value="form.createTime" :disabled="true"/> | |
| 48 | + </el-form-item> | |
| 49 | + | |
| 50 | + | |
| 51 | + <el-form-item label="发送人" prop="createBy"> | |
| 52 | + <el-input :value="form.createBy" :disabled="true"/> | |
| 53 | + </el-form-item> | |
| 54 | + | |
| 55 | + <el-form-item label="接收人" prop="receive"> | |
| 56 | + <el-input :value="form.readBy!=null?form.readBy:''" | |
| 57 | + :disabled="true"/> | |
| 58 | + </el-form-item> | |
| 59 | + | |
| 60 | + | |
| 61 | + <el-form-item label="阅读时间" prop="createBy"> | |
| 62 | + <el-input :value="form.readTime" :disabled="true"/> | |
| 63 | + </el-form-item> | |
| 64 | + | |
| 65 | + | |
| 66 | + <el-form-item label="违规描述" prop="describe"> | |
| 67 | + <el-input v-model="form.describe" type="textarea" placeholder="请输入内容" :rows="5" :disabled="true"/> | |
| 68 | + </el-form-item> | |
| 69 | + | |
| 70 | + <el-form-item label="推送对象"> | |
| 71 | + <el-radio-group v-model="form.sendObject" :disabled="true"> | |
| 72 | + <el-radio label="区管理部门(治)">区管理部门(治)</el-radio> | |
| 73 | + <el-radio label="区管理部门(消)">区管理部门(消)</el-radio> | |
| 74 | + <el-radio label="运输企业">运输企业</el-radio> | |
| 75 | + </el-radio-group> | |
| 76 | + </el-form-item> | |
| 77 | + | |
| 78 | + <el-button type="primary" @click="open = true">查看附件({{ fileEntityList.length }})</el-button> | |
| 79 | + | |
| 80 | + <el-table :data="replyApprovalProcessList" v-if="entryType==0" width="300px"> | |
| 81 | + <el-table-column property="replyPeople" label="操作人" header-align="center" align="center"></el-table-column> | |
| 82 | + <el-table-column property="reply" label="意见" header-align="center" align="center"></el-table-column> | |
| 83 | + <el-table-column property="replyTime" label="操作时间" header-align="center" align="center"></el-table-column> | |
| 84 | + <el-table-column property="replyImg" label="图片预览" header-align="center" align="center"> | |
| 85 | + <template slot-scope="scope"> | |
| 86 | + <el-button | |
| 87 | + size="mini" | |
| 88 | + type="text" | |
| 89 | + icon="el-icon-view" | |
| 90 | + @click="openImage(scope.row.replyImg)" | |
| 91 | + v-hasPermi="['casefile:violationWarningInformation:edit']" | |
| 92 | + >查看</el-button> | |
| 93 | + </template> | |
| 94 | + </el-table-column> | |
| 95 | + </el-table> | |
| 96 | + <el-dialog title="查看附件" :visible.sync="open" append-to-body> | |
| 97 | + <el-table :data="fileEntityList"> | |
| 98 | + <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | |
| 99 | + <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | |
| 100 | + <template slot-scope="scope"> | |
| 101 | + <el-button | |
| 102 | + size="small" type="success" | |
| 103 | + icon="el-icon-download" | |
| 104 | + @click="downloadFA(scope.row)" | |
| 105 | + v-hasPermi="['office:management:edit']" | |
| 106 | + v-if="form.id!=null" | |
| 107 | + round>下载 | |
| 108 | + </el-button> | |
| 109 | + </template> | |
| 110 | + </el-table-column> | |
| 111 | + </el-table> | |
| 112 | + <div slot="footer" class="dialog-footer"> | |
| 113 | + <el-button @click="open = false">取 消</el-button> | |
| 114 | + </div> | |
| 115 | + </el-dialog> | |
| 116 | + <el-dialog title="预览" :visible.sync="openImg" append-to-body v-if="entryType==0"> | |
| 117 | + <img :src="img" width="100%" height="750px" /> | |
| 118 | + </el-dialog> | |
| 119 | + </el-form> | |
| 120 | +</template> | |
| 121 | + | |
| 122 | +<script> | |
| 123 | +import {getViolationWarningInformation} from "@/api/casefile/violationWarningInformation"; | |
| 124 | +import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess"; | |
| 125 | +export default { | |
| 126 | + name: "violationWarningInformationInfo", | |
| 127 | + props: { | |
| 128 | + businessKey: { | |
| 129 | + type: String | |
| 130 | + }, | |
| 131 | + idInfo: { | |
| 132 | + type: String | |
| 133 | + }, | |
| 134 | + entryType: { | |
| 135 | + type: Number | |
| 136 | + }, | |
| 137 | + }, | |
| 138 | + data() { | |
| 139 | + return { | |
| 140 | + form: {}, | |
| 141 | + fileEntityList: [], | |
| 142 | + open:false, | |
| 143 | + replyApprovalProcessList:[], | |
| 144 | + openImg:false, | |
| 145 | + img:null, | |
| 146 | + } | |
| 147 | + }, | |
| 148 | + created() { | |
| 149 | + let id = this.idInfo.split(":"); | |
| 150 | + | |
| 151 | + if(id.length == 2){ | |
| 152 | + this.idInfo = id[1]; | |
| 153 | + }else{ | |
| 154 | + this.idInfo = id; | |
| 155 | + } | |
| 156 | + this.init(); | |
| 157 | + }, | |
| 158 | + methods: { | |
| 159 | + init() { | |
| 160 | + getViolationWarningInformation(this.idInfo).then(response => { | |
| 161 | + this.form = response.data.violationWarningInformation; | |
| 162 | + let files = JSON.stringify(response.data.uploadFiles); | |
| 163 | + this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")); | |
| 164 | + }); | |
| 165 | + listReplyApprovalProcess({tableName:"violation_warning" + ":" + this.idInfo}).then(response => { | |
| 166 | + this.replyApprovalProcessList = response.rows; | |
| 167 | + }); | |
| 168 | + }, | |
| 169 | + /** 文件下载 */ | |
| 170 | + downloadFA(row) { | |
| 171 | + let name = row.name; | |
| 172 | + let url = row.url; | |
| 173 | + const a = document.createElement('a') | |
| 174 | + a.setAttribute('download', name) | |
| 175 | + a.setAttribute('target', '_blank') | |
| 176 | + a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | |
| 177 | + a.click() | |
| 178 | + }, | |
| 179 | + openImage(base64){ | |
| 180 | + this.openImg = true; | |
| 181 | + this.img = base64; | |
| 182 | + } | |
| 183 | + } | |
| 184 | +} | |
| 185 | +</script> | |
| 186 | + | |
| 187 | +<style scoped> | |
| 188 | + | |
| 189 | +</style> | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/CompanyCreditController.java
| ... | ... | @@ -80,7 +80,16 @@ public class CompanyCreditController extends BaseController |
| 80 | 80 | @GetMapping("/export") |
| 81 | 81 | public AjaxResult export(CompanyCredit companyCredit) |
| 82 | 82 | { |
| 83 | - List<CompanyCredit> list = companyCreditService.selectCompanyCreditList(companyCredit); | |
| 83 | + List<CompanyCredit> list = null; | |
| 84 | + | |
| 85 | + List<String> withOut = new ArrayList<String>(); | |
| 86 | + | |
| 87 | + if(companyCredit.getStatus() == 1){ | |
| 88 | + withOut.add("time"); | |
| 89 | + companyCreditService.selectCompanyCreditHistory(companyCredit); | |
| 90 | + }else{ | |
| 91 | + companyCreditService.selectCompanyCreditList(companyCredit); | |
| 92 | + } | |
| 84 | 93 | |
| 85 | 94 | for(int i = 0;i<list.size();i++){ |
| 86 | 95 | list.get(i).setId((long)i+1); |
| ... | ... | @@ -89,11 +98,7 @@ public class CompanyCreditController extends BaseController |
| 89 | 98 | ExcelUtil<CompanyCredit> util = new ExcelUtil<CompanyCredit>(CompanyCredit.class); |
| 90 | 99 | |
| 91 | 100 | |
| 92 | - List<String> withOut = new ArrayList<String>(); | |
| 93 | - | |
| 94 | - if(companyCredit.getStatus() == 1){ | |
| 95 | - withOut.add("time"); | |
| 96 | - } | |
| 101 | + | |
| 97 | 102 | |
| 98 | 103 | return util.exportExcel(list, "企业失信",withOut); |
| 99 | 104 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/DriverCreditController.java
| ... | ... | @@ -73,16 +73,21 @@ public class DriverCreditController extends BaseController |
| 73 | 73 | @Log(title = "驾驶员失信", businessType = BusinessType.EXPORT) |
| 74 | 74 | @GetMapping("/export") |
| 75 | 75 | public AjaxResult export(DriverCredit driverCredit) |
| 76 | - { | |
| 77 | - List<DriverCredit> list = driverCreditService.selectDriverCreditList(driverCredit); | |
| 78 | - | |
| 79 | - for(int i = 0;i<list.size();i++){ | |
| 80 | - list.get(i).setId((long)i+1); | |
| 81 | - } | |
| 76 | + { | |
| 77 | + | |
| 78 | + List<DriverCredit> list = null; | |
| 82 | 79 | List<String> withOut = new ArrayList<String>(); |
| 83 | 80 | |
| 84 | 81 | if(driverCredit.getStatus() == 1){ |
| 85 | 82 | withOut.add("time"); |
| 83 | + list = driverCreditService.selectDriverCreditHistory(driverCredit); | |
| 84 | + }else{ | |
| 85 | + | |
| 86 | + list = driverCreditService.selectDriverCreditList(driverCredit); | |
| 87 | + | |
| 88 | + } | |
| 89 | + for(int i = 0;i<list.size();i++){ | |
| 90 | + list.get(i).setId((long)i+1); | |
| 86 | 91 | } |
| 87 | 92 | ExcelUtil<DriverCredit> util = new ExcelUtil<DriverCredit>(DriverCredit.class); |
| 88 | 93 | return util.exportExcel(list, "驾驶员失信",withOut); | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/SupervisionThreestepController.java
| ... | ... | @@ -34,6 +34,7 @@ import com.trash.business.domain.SupervisionThreestep; |
| 34 | 34 | import com.trash.business.domain.dayWork; |
| 35 | 35 | import com.trash.business.service.ISupervisionThreestepService; |
| 36 | 36 | import com.trash.common.utils.RemoteServerUtils; |
| 37 | +import com.trash.common.utils.SecurityUtils; | |
| 37 | 38 | import com.trash.common.utils.StringUtils; |
| 38 | 39 | import com.trash.common.utils.file.FileUtils; |
| 39 | 40 | import com.trash.common.utils.poi.ExcelUtil; |
| ... | ... | @@ -60,6 +61,8 @@ public class SupervisionThreestepController extends BaseController |
| 60 | 61 | public TableDataInfo list(SupervisionThreestep supervisionThreestep) |
| 61 | 62 | { |
| 62 | 63 | startPage(); |
| 64 | + if(supervisionThreestep.getStatus() == null) | |
| 65 | + supervisionThreestep.setCreateBy(SecurityUtils.getUsername()); | |
| 63 | 66 | List<SupervisionThreestep> list = supervisionThreestepService.selectSupervisionThreestepList(supervisionThreestep); |
| 64 | 67 | return getDataTable(list); |
| 65 | 68 | } |
| ... | ... | @@ -77,6 +80,15 @@ public class SupervisionThreestepController extends BaseController |
| 77 | 80 | } |
| 78 | 81 | |
| 79 | 82 | |
| 83 | + @PostMapping("/exportDayWorkHistoryList") | |
| 84 | + public AjaxResult exportDayWorkHistoryList(@RequestBody List<dayWork> list) | |
| 85 | + { | |
| 86 | + | |
| 87 | + ExcelUtil<dayWork> util = new ExcelUtil<dayWork>(dayWork.class); | |
| 88 | + return util.exportExcel(list, "历史开工报表"); | |
| 89 | + | |
| 90 | + } | |
| 91 | + | |
| 80 | 92 | @PostMapping("/exportDayWorkList") |
| 81 | 93 | public AjaxResult exportDayWorkList(@RequestBody List<dayWork> list) |
| 82 | 94 | { |
| ... | ... | @@ -136,10 +148,10 @@ public class SupervisionThreestepController extends BaseController |
| 136 | 148 | } |
| 137 | 149 | } |
| 138 | 150 | List<String> withOut = new ArrayList<String>(); |
| 139 | - String str ="报工自查"; | |
| 151 | + String str ="报工抽查"; | |
| 140 | 152 | if(supervisionThreestep.getStatus() == null){ |
| 141 | 153 | withOut.add("checkEndTime"); |
| 142 | - str ="报工抽查"; | |
| 154 | + str ="报工自查"; | |
| 143 | 155 | } |
| 144 | 156 | |
| 145 | 157 | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/TruckCreditController.java
| ... | ... | @@ -81,16 +81,21 @@ public class TruckCreditController extends BaseController |
| 81 | 81 | @GetMapping("/export") |
| 82 | 82 | public AjaxResult export(TruckCredit truckCredit) |
| 83 | 83 | { |
| 84 | - List<TruckCredit> list = truckCreditService.selectTruckCreditList(truckCredit); | |
| 85 | - | |
| 86 | - for(int i = 0;i<list.size();i++){ | |
| 87 | - list.get(i).setId((long)i+1); | |
| 88 | - } | |
| 84 | + List<TruckCredit> list = null; | |
| 89 | 85 | List<String> withOut = new ArrayList<String>(); |
| 90 | 86 | |
| 91 | 87 | if(truckCredit.getStatus() == 1){ |
| 92 | 88 | withOut.add("time"); |
| 89 | + list = truckCreditService.selectTruckCreditHistory(truckCredit); | |
| 90 | + }else{ | |
| 91 | + list = truckCreditService.selectTruckCreditList(truckCredit); | |
| 93 | 92 | } |
| 93 | + | |
| 94 | + | |
| 95 | + for(int i = 0;i<list.size();i++){ | |
| 96 | + list.get(i).setId((long)i+1); | |
| 97 | + } | |
| 98 | + | |
| 94 | 99 | ExcelUtil<TruckCredit> util = new ExcelUtil<TruckCredit>(TruckCredit.class); |
| 95 | 100 | return util.exportExcel(list, "车辆失信",withOut); |
| 96 | 101 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/impl/SupervisionThreestepServiceImpl.java
| ... | ... | @@ -237,6 +237,11 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 237 | 237 | |
| 238 | 238 | for(SupervisionThreestep e:earthsites){ |
| 239 | 239 | if(s.getEarthsitesId().equals(e.getObjectId()) && yearFomat.format(s.getCreateTime()).equals(yearFomat.format(e.getCreateTime()))){ |
| 240 | + | |
| 241 | + if(s.getStatus() != 1 && e.getStatus() != 1){ | |
| 242 | + continue; | |
| 243 | + } | |
| 244 | + | |
| 240 | 245 | map.put("eid", e.getObjectId()); |
| 241 | 246 | map.put("ename", e.getName()); |
| 242 | 247 | map.put("eplace", e.getPlace()); |
| ... | ... | @@ -274,7 +279,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 274 | 279 | |
| 275 | 280 | map.put("eid", s.getEarthsitesId()); |
| 276 | 281 | map.put("ename", s.getEarthsitesName()); |
| 277 | - map.put("estatus", "未报工"); | |
| 282 | + map.put("estatus", "消纳场未开工"); | |
| 278 | 283 | map.put("descript", "未开工"); |
| 279 | 284 | map.put("etype", ""); |
| 280 | 285 | |
| ... | ... | @@ -285,6 +290,10 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 285 | 290 | List newList = new ArrayList<>(); |
| 286 | 291 | |
| 287 | 292 | for(SupervisionThreestep e:earthsites){ |
| 293 | + if(e.getStatus() != 1){ | |
| 294 | + continue; | |
| 295 | + } | |
| 296 | + | |
| 288 | 297 | Map map = new HashMap(); |
| 289 | 298 | boolean needAdd = true; |
| 290 | 299 | for(Map<String,String> m:list){ |
| ... | ... | @@ -303,14 +312,14 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 303 | 312 | map.put("createTime", yearFomat.format(e.getCreateTime())); |
| 304 | 313 | map.put("name", e.getEarthsitesName()); |
| 305 | 314 | map.put("place", con.getString("areaCode")); |
| 306 | - map.put("status", "未报工"); | |
| 315 | + map.put("status", "工地未开工"); | |
| 307 | 316 | map.put("objectId", e.getEarthsitesId()); |
| 308 | 317 | map.put("eid", e.getObjectId()); |
| 309 | 318 | map.put("etype", ""); |
| 310 | 319 | map.put("type", ""); |
| 311 | 320 | map.put("ename", e.getName()); |
| 312 | 321 | map.put("eplace", e.getPlace()); |
| 313 | - map.put("estatus", e.getStatus() == 1 ? "开工" : "未开工"); | |
| 322 | + map.put("estatus", "开工"); | |
| 314 | 323 | map.put("eselfCheckTime", dateTime.format(e.getSelfCheckTime())); |
| 315 | 324 | map.put("descript", "未开工"); |
| 316 | 325 | ... | ... |