8a1d878a by xiaomiao

Merge branch 'dev' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web into dev

2 parents 156a53a1 89b40e5f
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-06-16 11:12:13
* @LastEditTime: 2023-06-21 16:35:04
-->
<template>
<div class="rlPopup">
......@@ -22,7 +22,7 @@
<!--缩略图-->
<div class="thumb-wrap">
<div class="thumb-wrap-button">
<el-button type="primary" @click="clickImage">(放大) 显示(缩小)</el-button>
<el-button type="primary" @click="clickImage" v-if="previewImg.imgList.length>0">(放大) 显示(缩小)</el-button>
<el-upload class="fileUpdate" ref="upload" action="" :show-file-list="false" :multiple="true" :auto-upload="false"
:on-change="handleChange"
accept=".JPG, .PNG, .JPEG,.jpg, .png, .jpeg" :before-upload="beforeUpload">
......@@ -30,9 +30,11 @@
</el-upload>
<el-button type="primary" icon="el-icon-delete-solid" @click="handleDelete"
v-if="!this.$route.query.viewtype && thumbnailImages.length>0">删除</el-button>
<div v-if="!this.$route.query.viewtype" class="pl-5">
<el-button type="primary" @click="handleOpenScan">{{scanTitle}}</el-button>
<el-button type="primary" @click="handleViewScan" v-if="isScan">拍照</el-button>
</div>
</div>
<ul>
<li v-for="(img, index) in thumbnailImages" :key="index" :class="{ active: previewImg.index === index }"
@click="showCurrent(index)">
......@@ -46,8 +48,8 @@
</div>
</template>
<script>
import { getAltimeterInfo } from '@/utils/operation.js'
import PhotoZoom from '@/components/PhotoZoom'
import { getAltimeterInfo, getUuid } from '@/utils/operation.js'
import { uploadSjClmx, deleteClmx } from "@/api/clxx.js";
import publicPicture from '@/components/publicPicture/index.vue'
export default {
......@@ -82,12 +84,16 @@
watch: {
previewImg: {
handler (newValue, oldValue) {
if (newValue.imgList.length > 0) {
if (newValue.imgList && newValue.imgList.length > 0) {
this.allLi = _.cloneDeep(newValue.imgList).map(item => item.fjurl)
this.thumbnailImages = newValue.imgList
} else {
this.allLi = []
this.thumbnailImages = []
}
},
deep: true
deep: true,
immediate: true
}
},
created () {
......@@ -145,8 +151,8 @@
return new Blob([u8arr], { type: mime });
}
function blobToFile (blob) {
const options = { type: blob.type };
const file = new File([blob], options);
let name = getUuid(8) + '.jpg'
const file = new File([blob], name);
return file;
}
getAltimeterInfo().then(res => {
......@@ -242,9 +248,11 @@
type: 'warning'
}).then(async () => {
let bsmClmx = this.previewImg.imgList[this.previewImg.index].bsmClmx
let bsmSj = this.previewImg.imgList[this.previewImg.index].bsmSj
this.previewImg.imgList = this.previewImg.imgList.filter(item => item.bsmClmx != bsmClmx)
deleteClmx(bsmClmx).then(res => {
if (res.code == 200) {
that.$emit('updateList', res.result)
that.$emit('updateList', { children: this.previewImg.imgList, bsmSj: bsmSj })
that.$message({
message: '删除成功!',
type: 'success'
......
<template>
<div id="login">
<div class="login-content-wrap">
<div class="login-logo"><img src="./images/logo-login.svg" /></div>
<div class="login-con">
<div class="login-img">
......@@ -81,6 +82,7 @@
</div>
</div>
</div>
</div>
</template>
<script>
import axios from "axios";
......@@ -211,6 +213,11 @@ export default {
};
</script>
<style lang="scss" scoped>
input::placeholder{
color: #878787;
font-size: 14px;
font-family:Arial, Helvetica, sans-serif
}
#login {
width: 100vw;
height: 100vh;
......@@ -218,17 +225,24 @@ export default {
background-size: 100%;
overflow: hidden;
position: relative;
.login-content-wrap{
position: absolute;
left: 50%;
top: calc(50% + 10px);
transform: translate(-50%, -50%);
}
.login-logo {
margin-top: 18vh;
height: 70px;
width: 100%;
text-align: center;
position: absolute;
top: -140px;
}
.login-logo img {
height: 100%;
}
.login-con {
margin: 70px auto;
margin: 0 auto;
width: 936px;
height: 450px;
.login-img{
......@@ -284,15 +298,15 @@ export default {
}
.login-user {
width: 100%;
height: 46px;
height: 40px;
border: 1px solid #E5E5E5;
box-sizing: border-box;
margin-top: 30px;
margin-top: 34px;
border-radius: 2px;
position: relative;
.user-icon {
float: left;
margin: 13px auto auto 10px;
margin: 10px auto auto 10px;
width: 28px;
height: 18px;
}
......@@ -303,7 +317,8 @@ export default {
outline: 0;
border: none;
color: #4a4a4a;
line-height: 260%;
height: 38px;
line-height: 40px;
}
.password-eye {
float: right;
......@@ -339,13 +354,14 @@ export default {
}
.login-btn {
width: 100%;
height: 40px;
height: 48px;
background: #74A3F5;
border-radius: 4px;
border-radius: 2px;
margin: 0 auto;
margin-top: 40px;
font-size: 16px;
line-height: 40px;
font-size: 20px;
font-weight: 500;
line-height: 48px;
text-align: center;
color: #fff;
cursor: pointer;
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-06-16 11:12:40
* @LastEditTime: 2023-06-21 15:34:44
-->
<template>
<div class="clxx">
......@@ -384,7 +384,7 @@
this.previewImg.index = 0
this.treeCheckId = item?.bsmSj
this.treeCheckIndex = index
this.previewImg.imgList = item?.children
this.previewImg.imgList = item.children ? item.children : []
this.previewImg.bsmSj = item?.bsmSj
},
// 小图片点击
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-06-19 13:15:13
* @LastEditTime: 2023-06-21 16:29:37
-->
<template>
<div class="clxx">
......@@ -120,8 +120,9 @@
this.previewImg.bsmSj = item.bsmSj;
},
updateList (val) {
console.log(val, 'valvalvalval');
let that = this
if (val != null) { //删除最后一张图片时 val=null
if (val.children.length != []) { //删除最后一张图片时 val=null
this.tableData.forEach(item => {
if (item.bsmSj === val.bsmSj) {
item.children = val.children
......@@ -140,7 +141,6 @@
}
})
}
},
// 添加材料目录
handleAdd () {
......@@ -173,7 +173,7 @@
this.previewImg.index = 0
this.treeCheckId = item?.bsmSj
this.treeCheckIndex = index
this.previewImg.imgList = item?.children
this.previewImg.imgList = item.children ? item.children : []
this.previewImg.bsmSj = item?.bsmSj
},
// 小图片点击
......