From 35c30ecf074b292e955d96df7a713a2166daff0e Mon Sep 17 00:00:00 2001 From: luobisheng <727299681@qq.com> Date: 星期二, 22 十一月 2022 18:32:06 +0800 Subject: [PATCH] 上传处置结果处理 --- src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/arrive/index.vue | 30 - src/components/myUpload/index.vue | 43 +- src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/vio/index.vue | 19 src/views/layout/components/Header/index.vue | 7 src/views/operate/fivepack/threepack/components/content.vue | 2 src/views/operate/disposal/casepool/dispatch/index.vue | 64 +--- /dev/null | 234 ------------------- src/api/operate/casequery.js | 4 src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/ill/index.vue | 6 src/http/index.js | 2 src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/evidence/index.vue | 300 +++--------------------- src/views/operate/fivepack/threepack/index.vue | 2 src/views/operate/rectification/taskList/components/viewInterface/index.vue | 7 13 files changed, 112 insertions(+), 608 deletions(-) diff --git a/src/api/operate/casequery.js b/src/api/operate/casequery.js index 0091ec9..91d42c9 100644 --- a/src/api/operate/casequery.js +++ b/src/api/operate/casequery.js @@ -3,5 +3,9 @@ export default { baseCaseQuery: (params) => { return http.get('/sccg/base_case/query_case', params); + }, + + getBaseCaseDetail: (id) => { + return http.get('/sccg/base_case/baseCaseDetail/' + id); } } \ No newline at end of file diff --git a/src/components/myUpload/index.vue b/src/components/myUpload/index.vue index c5930f0..a7f4acb 100644 --- a/src/components/myUpload/index.vue +++ b/src/components/myUpload/index.vue @@ -1,9 +1,8 @@ <template> <div class="my-upload"> - <el-upload + <el-upload :file-list="fileList" - class="upload-demo" - action="/sccg/file/medias" + action="/sccg/file/medias" :multiple="multiple" :show-file-list="flag" :before-upload="beforeUpload" @@ -13,9 +12,9 @@ :list-type="listType" :on-remove="handleRemove" :headers="getToken()"> - <div class="upload-btn" :style="{'height':btnHeight,'width':btnWidth}"> - <i class="el-icon-plus"></i> - <span>涓婁紶鍥剧墖</span> + <div class="upload-btn"> + <i class="el-icon-plus"></i> + <span>涓婁紶鍥剧墖</span> </div> </el-upload> </div> @@ -32,10 +31,6 @@ multiple: false, // 闄愬埗 limit: 4, - // 鎸夐挳楂樺害 - btnHeight: '100px', - // 鎸夐挳瀹藉害 - btnWidth: '100px', // 鏂囦欢鍒楄〃绫诲瀷 listType: 'picture-card' }; @@ -69,7 +64,6 @@ }, // 涓婁紶澶辫触鍥炶皟 handleError(err, file, fileList) { - console.log(err); this.$message({ type:'error', message:err @@ -82,10 +76,6 @@ if (token && tokenHead) { return { Authorization: tokenHead + token } } - }, - // 棰勮 - handlePreview(file){ - console.log(file) }, // 绉婚櫎鏂囦欢 handleRemove(file, fileList){ @@ -101,15 +91,16 @@ delPictureUrl:{ type:Function, default:()=>{} - } - } + }, + pictureList: { + type: Array, + default: () => [] + } + }, } </script> <style lang="scss" scoped> .my-upload { - .upload-demo { - display: flex; - } :deep(.el-upload--picture-card) { width: 100px; @@ -119,13 +110,18 @@ width: 100px; height: 100px; } + //.file-list { + // display: flex; + // flex-wrap: nowrap; + //} .upload-btn { - // background-color: rgba(249, 249, 249, 1); display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 4px; + width: 100px; + height: 100px; &:hover i{ color: #409eff; @@ -140,5 +136,10 @@ line-height: 22px; } } + .uploaded-image { + width: 0; + height: 100px; + display: flex; + } } </style> \ No newline at end of file diff --git a/src/http/index.js b/src/http/index.js index 64dace5..9dee29b 100644 --- a/src/http/index.js +++ b/src/http/index.js @@ -17,7 +17,7 @@ * @return {string} */ function addVersion(url) { - return url.includes('?') ? `${url}&v=${Date.now()}` : `${url}?v=${Date.now()}` + return url.includes('?') ? `${url}&v=${Date.now()}` : url; } export default { diff --git a/src/views/layout/components/Header/index.vue b/src/views/layout/components/Header/index.vue index 37c5b62..de1b36d 100644 --- a/src/views/layout/components/Header/index.vue +++ b/src/views/layout/components/Header/index.vue @@ -182,13 +182,13 @@ // 璁剧疆鐢ㄦ埛鍩烘湰淇℃伅 async setLoginInfo() { const info = JSON.parse(sessionStorage.getItem('user')); - this.getMessage(); if (info) { this.user = info; } else { this.user = await this.getLoginInfo(); } - this.show = true + this.show = true; + this.getMessage(); }, // 鑾峰彇鐧诲綍鐢ㄦ埛淇℃伅 async getLoginInfo(){ @@ -201,8 +201,7 @@ return res.data; }, getMessage() { - const userInfo = JSON.parse(sessionStorage.getItem('user')); - users.getMessageAuditList({ userId: userInfo.user.id }) + users.getMessageAuditList({ userId: this.user.user.id }) .then(res => { this.menuMessageList = res; this.menuMessageList.forEach(item => { diff --git a/src/views/operate/disposal/casepool/dispatch/index.vue b/src/views/operate/disposal/casepool/dispatch/index.vue index 3c0252b..7b5c19e 100644 --- a/src/views/operate/disposal/casepool/dispatch/index.vue +++ b/src/views/operate/disposal/casepool/dispatch/index.vue @@ -81,14 +81,14 @@ <!-- 璇︽儏椤靛睍绀� --> <el-dialog :visible.sync="dialogView" width="80%" title="鍩虹淇℃伅(浜哄伐)" v-if="dialogView" :before-close="handleClose"> - <MyDetail :info=info v-if="mystatus==1 ? true:false"></MyDetail> + <MyDetail :info=info v-if="mystatus===1"></MyDetail> <MyIllDetail :info=info v-else></MyIllDetail> </el-dialog> <!-- 涓婁紶椤甸潰 --> <el-dialog :visible.sync="dialogUpload" width="80%" title="涓婁紶澶勭疆缁撴灉" v-if="dialogUpload" :before-close="handleClose"> - <uploadVio v-if="mystatus === 1" :caseId="caseId" :mycode="caseCode" @closeDialog="closeDialog"></uploadVio> - <uploadIll v-else :caseId="caseId" :mycode="caseCode" @closeDialog="closeDialog"></uploadIll> + <uploadVio v-if="mystatus === 1" :caseId="caseId" :mycode="caseCode" :vioData="vioData" @closeDialog="closeDialog"></uploadVio> + <uploadIll v-else :caseId="caseId" :mycode="caseCode" @closeDialog="closeDialog" :illData="illData"></uploadIll> </el-dialog> <!-- tools --> <div class="tools"> @@ -109,8 +109,7 @@ </div> <div class="pagination"> <el-pagination background :current-page="currentPage" layout="prev, pager, next" - :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage" - @prev-click="handlePrev" @next-click="handleNext"> + :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage"> </el-pagination> </div> </div> @@ -123,10 +122,10 @@ import uploadIll from "./updateUser/uploadResult/ill" import MyDetail from '@/components/detail' import MyIllDetail from '@/components/illdetail' +import casequery from "@/api/operate/casequery"; import helper from '@/utils/mydate' export default { components: { - // updateUser, uploadVio, uploadIll, MyDetail,MyIllDetail }, data() { @@ -134,7 +133,6 @@ tableData: [], context: "", dialogUpload: false, - // dialogUpdate: false, dialogView: false, info: {}, totalNum: null, @@ -179,7 +177,9 @@ statusArr: [], mystatus: 1, caseId: '', - caseCode:null, + caseCode: null, + vioData: null, + illData: null } }, created() { @@ -194,14 +194,12 @@ methods: { // 椤堕儴涓嬫媺妗� setMystatus(value) { - console.log(value); this.statusArr[1] = value; this.changeTypeChecked(value - 1); this.getUserList(); }, // 鎵归噺鍒犻櫎 mulDelete(idArr) { - console.log(idArr); this.$axios({ method: 'delete', url: 'sccg/violations/batch_delete?ids=' + idArr, @@ -215,7 +213,6 @@ }, // 鎵ц涓嬫媺妗嗘搷浣� selectChange(list) { - console.log(this.tempList); if (this.tempList.length !== 0) { if (list === 3) { this.preMyIdx = list; @@ -235,11 +232,7 @@ list.forEach(item => { this.tempList.push(item.code); }) - if (list.length === this.tableData.length) { - this.all = true; - } else { - this.all = false - } + this.all = list.length === this.tableData.length; }, // 鍏ㄩ�� selectAll() { @@ -253,10 +246,8 @@ }, // 鍒犻櫎鍗曟潯鏁版嵁 handleDelete({ number }) { - console.log(number); this.$confirm('纭鍒犻櫎锛�') .then(_ => { - console.log(1); this.$axios({ method: 'delete', url: `sccg/violations/delete?id=${number}`, @@ -286,38 +277,22 @@ // 鏇存敼杩濊/杩濆缓 changeTypeChecked(idx) { this.typeList.forEach((item, index) => { - if (index === idx) { - item.checked = true; - } else { - item.checked = false; - } + item.checked = index === idx; }) this.mystatus = idx + 1; - console.log(this.mystatus); this.statusArr[1] = this.typeList[idx].value; this.getUserList(); }, // 璁剧疆琛ㄦ牸鏂戦┈绾� tableRowClassName({ row, rowIndex }) { - if ((rowIndex + 1) % 2 == 0) { + if ((rowIndex + 1) % 2 === 0) { return 'warning-row'; } else { return 'success-row'; } - return ''; }, // 褰撳墠椤垫敼鍙樿Е鍙戜簨浠� changeCurrentPage(page) { - this.currentPage = page; - this.getUserList(); - }, - // 涓婁竴椤电偣鍑讳簨浠� - handlePrev(page) { - this.currentPage = page; - this.getUserList(); - }, - // 涓嬩竴椤电偣鍑讳簨浠� - handleNext(page) { this.currentPage = page; this.getUserList(); }, @@ -325,7 +300,6 @@ this.$confirm('纭鍏抽棴锛�') .then(_ => { this.dialogUpload = false; - // this.dialogUpdate = false; done(); }) .catch(_ => { }); @@ -344,11 +318,15 @@ this.dialogView = true; }) }, - opernDialog(data) { - this.dialogUpload = true; - this.caseId = data.id; - this.caseCode = data.code - // console.log(data); + async opernDialog(data) { + await casequery.getBaseCaseDetail(data.code) + .then(({ baseCase, currentSitVo, filesPictureVo, handlePassVo }) => { + this.vioData = currentSitVo; + }) + .catch(err => this.$message.error(err)) + this.dialogUpload = true; + this.caseId = data.id; + this.caseCode = data.code; }, // 鍏抽棴涓婁紶鐣岄潰 closeDialog({ flag }) { @@ -370,7 +348,6 @@ header { background-color: #09152f; - border: 1pox solid #fff; .headerContent { padding: 0 40px; @@ -430,7 +407,6 @@ background-color: #09152f; margin-top: 20px; padding-bottom: 50px; - border: 1pox solid #fff; .btn span:hover { cursor: pointer; diff --git a/src/views/operate/disposal/casepool/dispatch/updateUser/index.vue b/src/views/operate/disposal/casepool/dispatch/updateUser/index.vue deleted file mode 100644 index 47a6bad..0000000 --- a/src/views/operate/disposal/casepool/dispatch/updateUser/index.vue +++ /dev/null @@ -1,234 +0,0 @@ -<template> - <div class="view"> - <div class="view-data"> - <div class="data-item"> - <div class="data-item__left"> - <label class="data-title"> - 闂绫诲瀷: - </label> - <span class="data-detail">杩濊</span> - </div> - <div class="data-item__right"> - <label class="data-title"> - 澶х被鍚嶇О: - </label> - <span class="data-detail">xxx</span> - </div> - </div> - <div class="data-item"> - <div class="data-item__left"> - <label class="data-title"> - 灏忕被鍚嶇О: - </label> - <span class="data-detail">xxx</span> - </div> - <div class="data-item__right"> - <label class="data-title"> - 浜嬩欢绛夌骇: - </label> - <span class="data-detail">xxx</span> - </div> - </div> - <div class="data-item"> - <div class="data-item__left"> - <label class="data-title"> - 妗堢敱: - </label> - <span class="data-detail">xxx</span> - </div> - </div> - <div class="data-item"> - <div class="data-item__left"> - <label class="data-title"> - 鎵�灞炲尯鍘�: - </label> - <span class="data-detail">xxx</span> - </div> - <div class="data-item__right"> - <label class="data-title"> - 鎵�灞炵ぞ鍖�: - </label> - <span class="data-detail">xxx</span> - </div> - </div> - <div class="data-item"> - <div class="data-item__left"> - <label class="data-title"> - 鎵�灞炶閬�: - </label> - <span class="data-detail">xxx</span> - </div> - </div> - <div class="data-item"> - <div class="data-item__left"> - <label class="data-title"> - 浜嬪彂鍦扮偣: - </label> - <span class="data-detail">xxx</span> - </div> - </div> - <div class="data-item"> - <div class="data-item__left"> - <label class="data-title"> - 鍏宠仈鍟嗛摵鍚嶇О: - </label> - <span class="data-detail">xxx</span> - </div> - </div> - <div class="data-item"> - <div class="data-item__left"> - <label class="data-title"> - 闂鎻忚堪: - </label> - <span class="data-detail">xxx</span> - </div> - </div> - <div class="data-user"> - <div class="data-item"> - <div class="data-item__left"> - <label class="data-title"> - 鍙嶆槧浜�: - </label> - <span class="data-detail">寮犱簩</span> - </div> - <div class="data-item__right"> - <label class="data-title"> - 鑱旂郴鏂瑰紡: - </label> - <span class="data-detail">12345678901</span> - </div> - </div> - <div class="data-item"> - <div class="data-item__left"> - <label class="data-title"> - 韬唤璇佸彿: - </label> - <span class="data-detail">123456789987654321</span> - </div> - </div> - </div> - </div> - <div class="view-process"> - <div class="process-header"> - <div class="process-title-item" v-for="item in titleList" :key="item.title" - @click="changeComponent(item.index)"> - <div :class="['process-title',activeIndex===item.index ? 'title-active' : '' ]">{{item.title}}</div> - <div :class="['under-line',activeIndex===item.index ? 'line-active' : '' ]"></div> - </div> - </div> - <div class="show-item"> - <div class="show-wrap"> - <MyProcess v-if="activeIndex === 1"></MyProcess> - <MyFilePicture v-else-if="activeIndex === 2"></MyFilePicture> - <MySovleProblem v-else-if="activeIndex === 3"></MySovleProblem> - <MyScene v-else></MyScene> - </div> - </div> - </div> - </div> -</template> -<script> -import MyProcess from './process' -import MyFilePicture from './filePictrue' -import MySovleProblem from './solveProblem' -import MyScene from './scene' -export default { - components: { - MyProcess, MyFilePicture, MySovleProblem, MyScene - }, - data() { - return { - myInfo: { - - }, - activeIndex: 1, - titleList: [ - { - title: '鍔炵悊缁忚繃', - index: 1, - }, - { - title: '妗堝嵎鍥剧墖', - index: 2, - }, - { - title: '闂澶勭悊', - index: 3, - }, - { - title: '鐜板満鎯呭喌', - index: 4, - }, - ] - } - }, - created() { - - }, - methods: { - changeComponent(index) { - this.activeIndex = index; - } - }, - props: ['info'] -} -</script> -<style lang="scss" scoped> -.view { - display: flex; - padding: 20px; - - .view-data { - color: #4b9bb7; - flex: 4; - padding: 0 30px 0 20px; - - .data-item { - display: flex; - justify-content: space-between; - line-height: 40px; - } - - border: 1px solid #17324c; - } - - .view-process { - flex: 6; - margin-left: 20px; - - .process-header { - display: flex; - line-height: 40px; - - .process-title-item { - width: 120px; - text-align: center; - - .under-line { - height: 2px; - width: 100%; - } - - .title-active { - color: #4b9bb7; - } - - .line-active { - background-color: #4b9bb7; - border-radius: 20px; - } - } - } - - .show-item { - overflow: hidden; - height: 600px; - position: relative; - .show-wrap{ - overflow: scroll; - height: 600px; - } - } - } -} -</style> \ No newline at end of file diff --git a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/arrive/index.vue b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/arrive/index.vue index 4a76757..7597782 100644 --- a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/arrive/index.vue +++ b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/arrive/index.vue @@ -25,22 +25,7 @@ <!-- 鐜板満鎯呭喌鐓х墖 --> <el-form-item label="鐜板満鎯呭喌鐓х墖:" prop="situationPic"> <div class="upImg" > - <!-- <div class="img-list" v-if="arrive.situationPic.length!==0"> - <div class="img" v-for="(item,index) in arrive.situationPic" :key="index"> - <img :src="item" alt=""> - <i class="el-icon-close myicon" @click="handleRemove(index)"></i> - </div> - </div> --> - <MyUpload @setPictureUrl="setPicUrl" @delPictureUrl="delPicUrl"></MyUpload> - - <!-- <div class="upload" v-if="arrive.situationPic.length<4"> - <el-upload :file-list="fileList" class="upload-demo" - action="/sccg/file/medias" multiple :show-file-list="false" - :limit="50" :on-success="handleSuccess" list-type="picture" :headers="getToken()"> - <i class="el-icon-plus"></i> - </el-upload> - </div> --> <div class="tip">{{ arrive.situationPic.length }} / 4</div> </div> </el-form-item> @@ -54,6 +39,12 @@ components: { MyUpload }, + props: { + arriveData: { + type: Object, + default: () => null + } + }, data() { const checkTime = (rule, value, callback) => { if (value) { @@ -104,9 +95,6 @@ situationExplain: [ { trigger: 'blur', validator: checkSit } ], - // replyExplain: [ - // { trigger: 'blur', validator: checkReplay } - // ], situationPic: [ { trigger: 'blur', validator: checkSitPic } ], @@ -114,10 +102,12 @@ fileList: [], } }, - methods: { + created() { + this.arrive = this.arriveData; + }, + methods: { handleSuccess(res, file, filelist) { const baseUrl = 'http://140.143.152.226:8410/'; - console.log(this.fileList); if (this.arrive.situationPic.length < 4) { this.arrive.situationPic.push(baseUrl + res.data.url1) } diff --git a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/evidence/index.vue b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/evidence/index.vue index dfad1d3..b4327cb 100644 --- a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/evidence/index.vue +++ b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/evidence/index.vue @@ -32,26 +32,13 @@ </el-form-item> <!-- 鎯呭喌鎻忚堪 --> <el-form-item label="澶勭疆缁撴灉:" prop="description"> - <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" maxlength="200" show-word-limit + <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="200" show-word-limit v-model="evidence.description" placeholder="璇疯緭鍏ュ缃粨鏋�,闄愬埗200瀛椾互鍐�"></el-input> </el-form-item> <!-- 鐓х墖闄勪欢 --> <el-form-item label="鐓х墖闄勪欢:" prop="pic"> <div class="upImg"> - <!-- <div class="img-list" v-if="evidence.pic.length!==0"> - <div class="img" v-for="(item,index) in evidence.pic" :key="index"> - <img :src="item" alt=""> - <i class="el-icon-close myicon" @click="handleRemove(index)"></i> - </div> - </div> --> - <MyUpload @setPictureUrl="setPicUrl" @delPictureUrl="delPicUrl"></MyUpload> - <!-- <div class="upload" v-if="evidence.pic.length<4"> - <el-upload :file-list="fileList" class="upload-demo" - action="/sccg/file/medias" multiple :show-file-list="false" - :limit="4" :on-success="handleSuccess2" :headers="getToken()"> - <i class="el-icon-plus"></i> - </el-upload> - </div> --> + <MyUpload :picture-list="evidence.pic" @setPictureUrl="setPicUrl" @delPictureUrl="delPicUrl"></MyUpload> <div class="tip">{{evidence.pic.length}} / 4</div> </div> </el-form-item> @@ -115,13 +102,11 @@ <div class="user-item"> <!-- 姘戞棌 --> <el-form-item label="姘戞棌:" prop="nation"> - <!-- <el-select v-model="user.nation" placeholder="璇烽�夋嫨姘戞棌"> --> <el-select v-model="user.nation" placeholder="璇烽�夋嫨"> <el-option v-for="item in nationOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> - <!-- <el-input v-model="user.nation"></el-input> --> </el-form-item> <!-- 绫嶈疮 --> <el-form-item label="绫嶈疮:" prop="nativePlace"> @@ -140,7 +125,7 @@ </div> <div class="user-form-footer"> <el-button type="primary" @click="checkUser">纭畾</el-button> - <el-button>杩斿洖</el-button> + <el-button @click="userFlag = false">杩斿洖</el-button> </div> </div> </div> @@ -154,48 +139,6 @@ MyUpload }, data() { - const checkName = (rule, value, callback) => { - if (value) { - callback() - } else { - callback(new Error('鎵垮姙闃熷憳鍚嶅瓧涓嶈兘涓虹┖')); - } - } - const checkName2 = (rule, value, callback) => { - if (value) { - callback() - } else { - callback(new Error('鍗忓姙闃熷憳鍚嶅瓧涓嶈兘涓虹┖')); - } - } - const checkTime2 = (rule, value, callback) => { - if (value) { - callback() - } else { - callback(new Error('姝ゅ鏃堕棿涓嶈兘涓虹┖')); - } - } - const checkAddress2 = (rule, value, callback) => { - if (value) { - callback() - } else { - callback(new Error('姝ゅ鍦板潃涓嶈兘涓虹┖')); - } - } - const checkCase = (rule, value, callback) => { - if (value) { - callback() - } else { - callback(new Error('妗堢敱涓嶈兘绌�')); - } - } - const checkDesc = (rule, value, callback) => { - if (value) { - callback() - } else { - callback(new Error('鎯呭喌鎻忚堪涓嶈兘涓虹┖')); - } - } const checkPic = (rule, value, callback) => { if (value.length !== 0) { callback() @@ -203,14 +146,7 @@ callback(new Error('璇蜂笂浼犵収鐗囬檮浠�')); } } - const checkIll = (rule, value, callback) => { - if (value) { - callback() - } else { - callback(new Error('妗堜欢绫诲瀷涓嶈兘涓虹┖')); - } - } - const checkName3 = (rule, value, callback) => { + const checkUserName = (rule, value, callback) => { if (value) { validateName(value) ? callback() : callback(new Error('璇疯緭鍏ユ纭殑濮撳悕')) } else { @@ -238,55 +174,6 @@ callback(new Error('璇佷欢鍙风爜涓嶈兘涓虹┖')); } } - const checkWh = (rule, value, callback) => { - if (value) { - callback() - } else { - callback(new Error('鏂囧寲绋嬪害涓嶈兘涓虹┖')); - } - } - // const checkCareer = (rule, value, callback) => { - // if (value) { - // callback() - // } else { - // callback(); - // } - // } - // const checkWork = (rule, value, callback) => { - // if (value) { - // callback() - // } else { - // callback(new Error('宸ヤ綔鍗曚綅鍙婅亴鍔′笉鑳戒负绌�')); - // } - // } - const checkNation = (rule, value, callback) => { - if (value) { - callback() - } else { - callback(new Error('姘戞棌涓嶈兘涓虹┖')); - } - } - // const checkNaP = (rule, value, callback) => { - // if (value) { - // callback() - // } else { - // callback(new Error('绫嶈疮涓嶈兘涓虹┖')); - // } - // } - const checkLiveAdd = (rule, value, callback) => { - if (value) { - callback() - } else { - callback(new Error('鐜颁綇鍧�涓嶈兘涓虹┖')); - } - } - // const checkRegAdd = (rule, value, callback) => { - // if (value) { - // callback() - // } else { - // callback(new Error('鎴风睄鎵�鍦ㄥ湴涓嶈兘涓虹┖')); - // } - // } const checkFlag = (rule, value, callback) => { if (value) { callback(); @@ -296,48 +183,24 @@ } return { evidence: { + undertaker: null, + assistant: null, + investigationTime: null, + address: null, + caseAction: null, + description: null, pic: [], - userInfo: '', + userInfo: null }, evidenceRules: { - userInfo: [ - { trigger: 'change', validator: checkFlag } - ], - undertaker: [ - { - trigger: 'blur', validator: checkName - } - ], - assistant: [ - { - trigger: 'blur', validator: checkName2 - } - ], - investigationTime: [ - { - trigger: 'change', validator: checkTime2 - } - ], - address: [ - { - trigger: 'blur', validator: checkAddress2 - } - ], - caseAction: [ - { - trigger: 'blur', validator: checkCase - } - ], - description: [ - { - trigger: 'blur', validator: checkDesc - } - ], - pic: [ - { - trigger: 'blur', validator: checkPic - } - ], + userInfo: [{ trigger: ['change', 'blur'], validator: checkFlag }], + undertaker: [{ trigger: ['change', 'blur'], message: '鎵垮姙闃熷憳鍚嶅瓧涓嶈兘涓虹┖', required: true }], + assistant: [{ trigger: ['change', 'blur'], message: '鍗忓姙闃熷憳鍚嶅瓧涓嶈兘涓虹┖', required: true }], + investigationTime: [{ trigger: ['change', 'blur'], message: '姝ゅ鏃堕棿涓嶈兘涓虹┖', required: true }], + address: [{ trigger: ['change', 'blur'], message: '姝ゅ鍦板潃涓嶈兘涓虹┖', required: true }], + caseAction: [{ trigger: ['change', 'blur'], message: '妗堢敱涓嶈兘绌�', required: true }], + description: [{ trigger: ['change', 'blur'], message: '鎯呭喌鎻忚堪涓嶈兘涓虹┖', required: true }], + pic: [{ trigger: ['change', 'blur'], validator: checkPic }], }, fileList: [], user: { @@ -355,66 +218,14 @@ registerAddress: '', }, userRules: { - illegalType: [ - { - trigger: 'change', validator: checkIll, - } - ], - name: [ - { - required:true,trigger: 'blur', validator: checkName3 - } - ], - phoneCode: [ - { - required:true,trigger: 'blur', validator: checkPhone - } - ], - certificateType: [ - { - trigger: 'change', validator: checkCard - } - ], - certificateCode: [ - { - required:true,trigger: 'blur', validator: checkCode - } - ], - educationDegree: [ - { - trigger: 'change', validator: checkWh - } - ], - // career: [ - // { - // trigger: 'blur', validator: checkCareer - // } - // ], - // work: [ - // { - // trigger: 'blur', validator: checkWork - // } - // ], - nation: [ - { - trigger: 'change', validator: checkNation - } - ], - // nativePlace: [ - // { - // trigger: 'blur', validator: checkNaP - // } - // ], - liveAddress: [ - { - required:true,trigger: 'blur', validator: checkLiveAdd - } - ], - // registerAddress: [ - // { - // trigger: 'blur', validator: checkRegAdd - // } - // ], + illegalType: [{ trigger: ['change', 'blur'], message: '妗堜欢绫诲瀷涓嶈兘涓虹┖', required: true }], + name: [{ required: true,trigger: ['change', 'blur'], validator: checkUserName }], + phoneCode: [{ required: true,trigger: ['change', 'blur'], validator: checkPhone }], + certificateType: [{ trigger: ['change', 'blur'], validator: checkCard }], + certificateCode: [{ required: true,trigger: ['change', 'blur'], validator: checkCode }], + educationDegree: [{ required: true, trigger: ['change', 'blur'], message: '鏂囧寲绋嬪害涓嶈兘涓虹┖' }], + nation: [{ required: true, trigger: ['change', 'blur'], message: '姘戞棌涓嶈兘涓虹┖' }], + liveAddress: [{ required: true, trigger: ['change', 'blur'], message: '鐜颁綇鍧�涓嶈兘涓虹┖' }], }, userFlag: false, typeOptions: [ @@ -456,34 +267,23 @@ value: 4 }, ], - basecase:"" + basecase: null } }, - created() { - this.getCardTypeList(); - this.getSchoolList(); - this.getNationList(); - console.log(this.mytype); + async created() { + await this.getCardTypeList(); + await this.getSchoolList(); + await this.getNationList(); this.user.illegalType = JSON.parse(JSON.stringify(this.mytype)); - const {mycode}=this; - this.getEventInfo(mycode) + if (this.evienceData) { + this.evidence = this.evienceData; + this.evidence.pic = this.evidence.pic.split(','); + this.user = this.evidence.partyInfo; + this.evidence.investigationTime = this.evidence.createTime; + this.evidence.userInfo = this.evidence.partyInfo.name; + } }, methods: { - // 鑾峰彇妗堜欢淇℃伅 - async getEventInfo(mycode) { - await this.$axios({ - method: 'get', - url: `sccg/base_case/baseCaseDetail/${mycode}` - }) - .then(res => { - if(this.mytype == 1){ - this.basecase = res.data.baseCase.violations.typeText; - }else{ - this.basecase = res.data.baseCase.illegalBuilding.categoryText; - } - console.log(this.basecase) - }) - }, handleSuccess2(res, file, filelist) { const baseUrl = 'http://140.143.152.226:8410/'; if (this.evidence.pic.length < 4) { @@ -504,11 +304,8 @@ }, // 妫�楠寀ser checkUser() { - // console.log(this.$refs.userForm.validate); this.$refs.userForm.validate((valid) => { - console.log(valid); if (valid) { - this.evidence.userInfo = this.user.name; this.userFlag = false; } else { this.evidence.userInfo = false; @@ -547,31 +344,14 @@ if (this.evidence.pic.length < 4) { this.evidence.pic.push(baseUrl + url) } - console.log(url); }, //鍒犻櫎鍥剧墖 delPicUrl({url}){ const baseUrl = 'http://140.143.152.226:8410/'; - console.log(url); this.evidence.pic.splice(this.evidence.pic.indexOf(baseUrl + url),1); - console.log(this.evidence.pic); } }, - watch: { - 'evidence.pic.length': { - handler(newLen, oldLen) { - if (newLen !== 0) { - this.$refs.evidenceForm.validate((valid) => { - if (valid) { - - } else { return false } - }) - } - }, - deep: true, - } - }, - props:['mytype','mycode'] + props:['mytype','mycode', 'evienceData'] } </script> <style lang="scss" scoped> diff --git a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/ill/index.vue b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/ill/index.vue index 4d65cf7..297bc13 100644 --- a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/ill/index.vue +++ b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/ill/index.vue @@ -6,10 +6,7 @@ <MyEvidence ref="evidence" :mytype="2" :mycode="mycode"></MyEvidence> <!-- 鏂囩涔︾被 --> <MyBook ref="book" :mycode="mycode"></MyBook> - <!-- <div class="result"> - <el-input v-model="result" placeholder="璇疯緭鍏ュ鐞嗘剰瑙�"></el-input> - </div> --> - <!-- 搴曢儴鎸夐挳 --> + <div class="footer"> <el-button @click="handleSubmit" type="primary">纭畾</el-button> <el-button @click="handleBack">杩斿洖</el-button> @@ -32,7 +29,6 @@ }, props: ['caseId','closeDialog','mycode'], created() { - console.log(this.caseId); this.getUserId(); }, methods: { diff --git a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/vio/index.vue b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/vio/index.vue index ccc1dd1..6b1f6fc 100644 --- a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/vio/index.vue +++ b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/vio/index.vue @@ -1,9 +1,9 @@ <template> <div class="vio"> <!-- 鍒拌揪鐜板満鎯呭喌 --> - <MyArrive ref="arrive"></MyArrive> + <MyArrive ref="arrive" :arriveData="arriveData"></MyArrive> <!-- 璋冩煡鍙栬瘉 --> - <MyEvidence ref="evidence" :mytype="1" :mycode="mycode"></MyEvidence> + <MyEvidence ref="evidence" :evienceData="evienceData" :mytype="1" :mycode="mycode"></MyEvidence> <!-- 搴曢儴鎸夐挳 --> <div class="footer"> <el-button @click="handleSubmit" type="primary">纭畾</el-button> @@ -14,32 +14,32 @@ <script> import MyArrive from '../components/arrive' import MyEvidence from "../components/evidence" -import {parseTime} from '@/utils/index' +import { parseTime } from '@/utils/index' + export default { components: { MyArrive, MyEvidence }, data() { return { - + arriveData: null, + evienceData: null } }, - props: ['caseId', 'closeDialog','mycode'], + props: ['caseId', 'closeDialog','mycode', 'vioData'], created() { - console.log(this.caseId); + this.arriveData = this.vioData.arrivalSituation; + this.evienceData = this.vioData.investigation; }, methods: { handleSubmit() { const { arrive, evidence } = this.$refs; const { arriveForm } = arrive.$refs; const { evidenceForm } = evidence.$refs; - // console.log(evidence.$refs); arriveForm.validate((valid) => { - // console.log(valid); if (valid) { evidenceForm.validate((flag) => { if (flag) { - // arrive.arrive;evidence.user;evidence.evidence; this.$axios({ method: 'post', url: `sccg/dispatch_handle/addition_dispose_result?caseId=`+this.caseId+'&type=1', @@ -58,7 +58,6 @@ description: evidence.evidence.description, pic: `${evidence.evidence.pic}`, // - // illegalType: evidence.user.illegalType, name: evidence.user.name, phoneCode: evidence.user.phoneCode, certificateType: evidence.user.certificateType, diff --git a/src/views/operate/fivepack/threepack/components/content.vue b/src/views/operate/fivepack/threepack/components/content.vue index 766c2ce..64c158d 100644 --- a/src/views/operate/fivepack/threepack/components/content.vue +++ b/src/views/operate/fivepack/threepack/components/content.vue @@ -91,7 +91,7 @@ return { storeCode: null, storeStatus: null, - options: [{ label: '缁忚惀', value: 1 }, { label: '鍊掗棴', value: 2 }], + options: [{ label: '鍏ㄩ儴', value: 0 }, { label: '缁忚惀', value: 1 }, { label: '鍊掗棴', value: 2 }], tableData: [], dialogUpdate: false, currentPage: 1, diff --git a/src/views/operate/fivepack/threepack/index.vue b/src/views/operate/fivepack/threepack/index.vue index 188f628..3febe5a 100644 --- a/src/views/operate/fivepack/threepack/index.vue +++ b/src/views/operate/fivepack/threepack/index.vue @@ -21,7 +21,7 @@ return { storeCode: null, storeStatus: null, - options: [{ label: '缁忚惀', value: 1 }, { label: '鍊掗棴', value: 2 }], + options: [{ label: '鍏ㄩ儴', value: 0 }, { label: '缁忚惀', value: 1 }, { label: '鍊掗棴', value: 2 }], tableData: [], dialogUpdate: false, currentPage: 1, diff --git a/src/views/operate/rectification/taskList/components/viewInterface/index.vue b/src/views/operate/rectification/taskList/components/viewInterface/index.vue index 6b28ebb..f15b866 100644 --- a/src/views/operate/rectification/taskList/components/viewInterface/index.vue +++ b/src/views/operate/rectification/taskList/components/viewInterface/index.vue @@ -40,13 +40,6 @@ <el-input v-model="myInterface.description" placeholder="璇峰~鍐欐弿杩�"></el-input> </el-form-item> <!-- 鎸夐挳 --> - <!-- <el-form-item> - <div class="optionBtn"> - <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">鎻愪氦 - </el-button> - <el-button class="btn reset">閲嶇疆</el-button> - </div> - </el-form-item> --> </el-form> </div> </main> -- Gitblit v1.8.0