| | |
| | | </el-form-item> |
| | | <!-- 现场情况说明 --> |
| | | <el-form-item label="现场情况说明:" prop="situationExplain"> |
| | | <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="arrive.situationExplain" placeholder="请输入情况说明,限制200字以内"></el-input> |
| | | </el-form-item> |
| | | <!-- 信访回复说明 --> |
| | | <el-form-item label="信访回复说明:" prop="replyExplain"> |
| | | <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="arrive.replyExplain" placeholder="请输入回访说明,限制200字以内"></el-input> |
| | | </el-form-item> |
| | | <!-- 现场情况照片 --> |
| | | <el-form-item label="现场情况照片:" prop="situationPic"> |
| | | <div class="upImg"> |
| | | <div class="img-list" v-if="arrive.situationPic.length!==0"> |
| | | <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> |
| | | <div class="upload" v-if="arrive.situationPic.length<4"> |
| | | </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> --> |
| | | <div class="tip">{{ arrive.situationPic.length }} / 4</div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import MyUpload from "@/components/myUpload" |
| | | export default { |
| | | components: { |
| | | MyUpload |
| | | }, |
| | | data() { |
| | | const checkTime = (rule, value, callback) => { |
| | | if (value) { |
| | |
| | | }, |
| | | // 删除图片 |
| | | handleRemove(index) { |
| | | this.arrive.situationPic.splice(index,1); |
| | | this.arrive.situationPic.splice(index, 1); |
| | | }, |
| | | // 设置上传成功之后的图片地址 |
| | | setPicUrl({ url }) { |
| | | const baseUrl = 'http://140.143.152.226:8410/'; |
| | | if (this.arrive.situationPic.length < 4) { |
| | | this.arrive.situationPic.push(baseUrl + url) |
| | | } |
| | | console.log(url); |
| | | }, |
| | | //删除图片 |
| | | delPicUrl({url}){ |
| | | const baseUrl = 'http://140.143.152.226:8410/'; |
| | | console.log(url); |
| | | this.arrive.situationPic.splice(this.arrive.situationPic.indexOf(baseUrl + url),1); |
| | | console.log(this.arrive.situationPic); |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | height: 60px; |
| | | position: relative; |
| | | display: flex; |
| | | |
| | | img { |
| | | width: 60px; |
| | | height: 60px; |
| | | margin-right: 10px; |
| | | } |
| | | .img{ |
| | | |
| | | .img { |
| | | height: 60px; |
| | | position: relative; |
| | | } |
| | | |
| | | .myicon { |
| | | position: absolute; |
| | | top: 0px; |