8a1d878a by xiaomiao

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

2 parents 156a53a1 89b40e5f
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-06-16 11:12:13 4 * @LastEditTime: 2023-06-21 16:35:04
5 --> 5 -->
6 <template> 6 <template>
7 <div class="rlPopup"> 7 <div class="rlPopup">
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
22 <!--缩略图--> 22 <!--缩略图-->
23 <div class="thumb-wrap"> 23 <div class="thumb-wrap">
24 <div class="thumb-wrap-button"> 24 <div class="thumb-wrap-button">
25 <el-button type="primary" @click="clickImage">(放大) 显示(缩小)</el-button> 25 <el-button type="primary" @click="clickImage" v-if="previewImg.imgList.length>0">(放大) 显示(缩小)</el-button>
26 <el-upload class="fileUpdate" ref="upload" action="" :show-file-list="false" :multiple="true" :auto-upload="false" 26 <el-upload class="fileUpdate" ref="upload" action="" :show-file-list="false" :multiple="true" :auto-upload="false"
27 :on-change="handleChange" 27 :on-change="handleChange"
28 accept=".JPG, .PNG, .JPEG,.jpg, .png, .jpeg" :before-upload="beforeUpload"> 28 accept=".JPG, .PNG, .JPEG,.jpg, .png, .jpeg" :before-upload="beforeUpload">
...@@ -30,8 +30,10 @@ ...@@ -30,8 +30,10 @@
30 </el-upload> 30 </el-upload>
31 <el-button type="primary" icon="el-icon-delete-solid" @click="handleDelete" 31 <el-button type="primary" icon="el-icon-delete-solid" @click="handleDelete"
32 v-if="!this.$route.query.viewtype && thumbnailImages.length>0">删除</el-button> 32 v-if="!this.$route.query.viewtype && thumbnailImages.length>0">删除</el-button>
33 <el-button type="primary" @click="handleOpenScan">{{scanTitle}}</el-button> 33 <div v-if="!this.$route.query.viewtype" class="pl-5">
34 <el-button type="primary" @click="handleViewScan" v-if="isScan">拍照</el-button> 34 <el-button type="primary" @click="handleOpenScan">{{scanTitle}}</el-button>
35 <el-button type="primary" @click="handleViewScan" v-if="isScan">拍照</el-button>
36 </div>
35 </div> 37 </div>
36 <ul> 38 <ul>
37 <li v-for="(img, index) in thumbnailImages" :key="index" :class="{ active: previewImg.index === index }" 39 <li v-for="(img, index) in thumbnailImages" :key="index" :class="{ active: previewImg.index === index }"
...@@ -46,8 +48,8 @@ ...@@ -46,8 +48,8 @@
46 </div> 48 </div>
47 </template> 49 </template>
48 <script> 50 <script>
49 import { getAltimeterInfo } from '@/utils/operation.js'
50 import PhotoZoom from '@/components/PhotoZoom' 51 import PhotoZoom from '@/components/PhotoZoom'
52 import { getAltimeterInfo, getUuid } from '@/utils/operation.js'
51 import { uploadSjClmx, deleteClmx } from "@/api/clxx.js"; 53 import { uploadSjClmx, deleteClmx } from "@/api/clxx.js";
52 import publicPicture from '@/components/publicPicture/index.vue' 54 import publicPicture from '@/components/publicPicture/index.vue'
53 export default { 55 export default {
...@@ -82,12 +84,16 @@ ...@@ -82,12 +84,16 @@
82 watch: { 84 watch: {
83 previewImg: { 85 previewImg: {
84 handler (newValue, oldValue) { 86 handler (newValue, oldValue) {
85 if (newValue.imgList.length > 0) { 87 if (newValue.imgList && newValue.imgList.length > 0) {
86 this.allLi = _.cloneDeep(newValue.imgList).map(item => item.fjurl) 88 this.allLi = _.cloneDeep(newValue.imgList).map(item => item.fjurl)
87 this.thumbnailImages = newValue.imgList 89 this.thumbnailImages = newValue.imgList
90 } else {
91 this.allLi = []
92 this.thumbnailImages = []
88 } 93 }
89 }, 94 },
90 deep: true 95 deep: true,
96 immediate: true
91 } 97 }
92 }, 98 },
93 created () { 99 created () {
...@@ -145,8 +151,8 @@ ...@@ -145,8 +151,8 @@
145 return new Blob([u8arr], { type: mime }); 151 return new Blob([u8arr], { type: mime });
146 } 152 }
147 function blobToFile (blob) { 153 function blobToFile (blob) {
148 const options = { type: blob.type }; 154 let name = getUuid(8) + '.jpg'
149 const file = new File([blob], options); 155 const file = new File([blob], name);
150 return file; 156 return file;
151 } 157 }
152 getAltimeterInfo().then(res => { 158 getAltimeterInfo().then(res => {
...@@ -242,9 +248,11 @@ ...@@ -242,9 +248,11 @@
242 type: 'warning' 248 type: 'warning'
243 }).then(async () => { 249 }).then(async () => {
244 let bsmClmx = this.previewImg.imgList[this.previewImg.index].bsmClmx 250 let bsmClmx = this.previewImg.imgList[this.previewImg.index].bsmClmx
251 let bsmSj = this.previewImg.imgList[this.previewImg.index].bsmSj
252 this.previewImg.imgList = this.previewImg.imgList.filter(item => item.bsmClmx != bsmClmx)
245 deleteClmx(bsmClmx).then(res => { 253 deleteClmx(bsmClmx).then(res => {
246 if (res.code == 200) { 254 if (res.code == 200) {
247 that.$emit('updateList', res.result) 255 that.$emit('updateList', { children: this.previewImg.imgList, bsmSj: bsmSj })
248 that.$message({ 256 that.$message({
249 message: '删除成功!', 257 message: '删除成功!',
250 type: 'success' 258 type: 'success'
......
1 <template> 1 <template>
2 <div id="login"> 2 <div id="login">
3 <div class="login-logo"><img src="./images/logo-login.svg" /></div> 3 <div class="login-content-wrap">
4 <div class="login-con"> 4 <div class="login-logo"><img src="./images/logo-login.svg" /></div>
5 <div class="login-img"> 5 <div class="login-con">
6 <div class="content"></div> 6 <div class="login-img">
7 </div> 7 <div class="content"></div>
8 <div class="login-wrap">
9 <p>账号登录</p>
10 <div class="login-user" :class="{ 'select-border': change.user }">
11 <img class="user-icon" src="./images/user.svg" />
12 <input
13 type="text"
14 class="user-input"
15 placeholder="请输入账号"
16 v-model="userInfo.username"
17 @focus="reduceBorder('user')"
18 @blur="addBorder('user')"
19 />
20 <span class="warning" v-show="warning.user">账号不能为空</span>
21 </div>
22 <div
23 class="login-user user-mt"
24 :class="{ 'select-border': change.pass }"
25 >
26 <img class="user-icon" src="./images/password.svg" />
27 <input
28 type="password"
29 class="user-input"
30 placeholder="请输入密码"
31 v-model="userInfo.password"
32 v-show="!selectEye"
33 @focus="reduceBorder('pass')"
34 @blur="addBorder('pass')"
35 />
36 <input
37 type="text"
38 class="user-input"
39 placeholder="请输入密码"
40 v-model="userInfo.password"
41 v-show="selectEye"
42 @focus="reduceBorder('pass')"
43 @blur="addBorder('pass')"
44 />
45 <img
46 class="password-eye"
47 src="./images/open.svg"
48 @click="selectEyes"
49 v-show="selectEye"
50 />
51 <img
52 class="password-eye"
53 src="./images/close.svg"
54 @click="selectEyes"
55 v-show="!selectEye"
56 />
57 <span class="warning" v-show="warning.pass">密码不能为空</span>
58 </div> 8 </div>
59 <div 9 <div class="login-wrap">
60 class="login-user login-valid" 10 <p>账号登录</p>
61 :class="{ 'select-border': change.valid }" 11 <div class="login-user" :class="{ 'select-border': change.user }">
62 > 12 <img class="user-icon" src="./images/user.svg" />
63 <img class="user-icon" src="./images/valid.svg" /> 13 <input
64 <input 14 type="text"
65 type="text" 15 class="user-input"
66 class="user-input" 16 placeholder="请输入账号"
67 placeholder="请输入验证码" 17 v-model="userInfo.username"
68 v-model="userInfo.captchaCode" 18 @focus="reduceBorder('user')"
69 @focus="reduceBorder('valid')" 19 @blur="addBorder('user')"
70 @blur="addBorder('valid')" 20 />
71 /> 21 <span class="warning" v-show="warning.user">账号不能为空</span>
72 <img 22 </div>
73 class="valid-img" 23 <div
74 :src="codeSrc" 24 class="login-user user-mt"
75 alt="暂无验证码" 25 :class="{ 'select-border': change.pass }"
76 @click="reloadCaptcha" 26 >
77 /> 27 <img class="user-icon" src="./images/password.svg" />
78 <span class="warning" v-show="warning.valid">验证码不能为空</span> 28 <input
29 type="password"
30 class="user-input"
31 placeholder="请输入密码"
32 v-model="userInfo.password"
33 v-show="!selectEye"
34 @focus="reduceBorder('pass')"
35 @blur="addBorder('pass')"
36 />
37 <input
38 type="text"
39 class="user-input"
40 placeholder="请输入密码"
41 v-model="userInfo.password"
42 v-show="selectEye"
43 @focus="reduceBorder('pass')"
44 @blur="addBorder('pass')"
45 />
46 <img
47 class="password-eye"
48 src="./images/open.svg"
49 @click="selectEyes"
50 v-show="selectEye"
51 />
52 <img
53 class="password-eye"
54 src="./images/close.svg"
55 @click="selectEyes"
56 v-show="!selectEye"
57 />
58 <span class="warning" v-show="warning.pass">密码不能为空</span>
59 </div>
60 <div
61 class="login-user login-valid"
62 :class="{ 'select-border': change.valid }"
63 >
64 <img class="user-icon" src="./images/valid.svg" />
65 <input
66 type="text"
67 class="user-input"
68 placeholder="请输入验证码"
69 v-model="userInfo.captchaCode"
70 @focus="reduceBorder('valid')"
71 @blur="addBorder('valid')"
72 />
73 <img
74 class="valid-img"
75 :src="codeSrc"
76 alt="暂无验证码"
77 @click="reloadCaptcha"
78 />
79 <span class="warning" v-show="warning.valid">验证码不能为空</span>
80 </div>
81 <div id="loginBtn" class="login-btn" @click="goHome">登录</div>
79 </div> 82 </div>
80 <div id="loginBtn" class="login-btn" @click="goHome">登录</div>
81 </div> 83 </div>
82 </div> 84 </div>
83 </div> 85 </div>
...@@ -211,6 +213,11 @@ export default { ...@@ -211,6 +213,11 @@ export default {
211 }; 213 };
212 </script> 214 </script>
213 <style lang="scss" scoped> 215 <style lang="scss" scoped>
216 input::placeholder{
217 color: #878787;
218 font-size: 14px;
219 font-family:Arial, Helvetica, sans-serif
220 }
214 #login { 221 #login {
215 width: 100vw; 222 width: 100vw;
216 height: 100vh; 223 height: 100vh;
...@@ -218,17 +225,24 @@ export default { ...@@ -218,17 +225,24 @@ export default {
218 background-size: 100%; 225 background-size: 100%;
219 overflow: hidden; 226 overflow: hidden;
220 position: relative; 227 position: relative;
228 .login-content-wrap{
229 position: absolute;
230 left: 50%;
231 top: calc(50% + 10px);
232 transform: translate(-50%, -50%);
233 }
221 .login-logo { 234 .login-logo {
222 margin-top: 18vh;
223 height: 70px; 235 height: 70px;
224 width: 100%; 236 width: 100%;
225 text-align: center; 237 text-align: center;
238 position: absolute;
239 top: -140px;
226 } 240 }
227 .login-logo img { 241 .login-logo img {
228 height: 100%; 242 height: 100%;
229 } 243 }
230 .login-con { 244 .login-con {
231 margin: 70px auto; 245 margin: 0 auto;
232 width: 936px; 246 width: 936px;
233 height: 450px; 247 height: 450px;
234 .login-img{ 248 .login-img{
...@@ -284,15 +298,15 @@ export default { ...@@ -284,15 +298,15 @@ export default {
284 } 298 }
285 .login-user { 299 .login-user {
286 width: 100%; 300 width: 100%;
287 height: 46px; 301 height: 40px;
288 border: 1px solid #E5E5E5; 302 border: 1px solid #E5E5E5;
289 box-sizing: border-box; 303 box-sizing: border-box;
290 margin-top: 30px; 304 margin-top: 34px;
291 border-radius: 2px; 305 border-radius: 2px;
292 position: relative; 306 position: relative;
293 .user-icon { 307 .user-icon {
294 float: left; 308 float: left;
295 margin: 13px auto auto 10px; 309 margin: 10px auto auto 10px;
296 width: 28px; 310 width: 28px;
297 height: 18px; 311 height: 18px;
298 } 312 }
...@@ -303,7 +317,8 @@ export default { ...@@ -303,7 +317,8 @@ export default {
303 outline: 0; 317 outline: 0;
304 border: none; 318 border: none;
305 color: #4a4a4a; 319 color: #4a4a4a;
306 line-height: 260%; 320 height: 38px;
321 line-height: 40px;
307 } 322 }
308 .password-eye { 323 .password-eye {
309 float: right; 324 float: right;
...@@ -339,13 +354,14 @@ export default { ...@@ -339,13 +354,14 @@ export default {
339 } 354 }
340 .login-btn { 355 .login-btn {
341 width: 100%; 356 width: 100%;
342 height: 40px; 357 height: 48px;
343 background: #74A3F5; 358 background: #74A3F5;
344 border-radius: 4px; 359 border-radius: 2px;
345 margin: 0 auto; 360 margin: 0 auto;
346 margin-top: 40px; 361 margin-top: 40px;
347 font-size: 16px; 362 font-size: 20px;
348 line-height: 40px; 363 font-weight: 500;
364 line-height: 48px;
349 text-align: center; 365 text-align: center;
350 color: #fff; 366 color: #fff;
351 cursor: pointer; 367 cursor: pointer;
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-06-16 11:12:40 4 * @LastEditTime: 2023-06-21 15:34:44
5 --> 5 -->
6 <template> 6 <template>
7 <div class="clxx"> 7 <div class="clxx">
...@@ -384,7 +384,7 @@ ...@@ -384,7 +384,7 @@
384 this.previewImg.index = 0 384 this.previewImg.index = 0
385 this.treeCheckId = item?.bsmSj 385 this.treeCheckId = item?.bsmSj
386 this.treeCheckIndex = index 386 this.treeCheckIndex = index
387 this.previewImg.imgList = item?.children 387 this.previewImg.imgList = item.children ? item.children : []
388 this.previewImg.bsmSj = item?.bsmSj 388 this.previewImg.bsmSj = item?.bsmSj
389 }, 389 },
390 // 小图片点击 390 // 小图片点击
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-06-19 13:15:13 4 * @LastEditTime: 2023-06-21 16:29:37
5 --> 5 -->
6 <template> 6 <template>
7 <div class="clxx"> 7 <div class="clxx">
...@@ -120,8 +120,9 @@ ...@@ -120,8 +120,9 @@
120 this.previewImg.bsmSj = item.bsmSj; 120 this.previewImg.bsmSj = item.bsmSj;
121 }, 121 },
122 updateList (val) { 122 updateList (val) {
123 console.log(val, 'valvalvalval');
123 let that = this 124 let that = this
124 if (val != null) { //删除最后一张图片时 val=null 125 if (val.children.length != []) { //删除最后一张图片时 val=null
125 this.tableData.forEach(item => { 126 this.tableData.forEach(item => {
126 if (item.bsmSj === val.bsmSj) { 127 if (item.bsmSj === val.bsmSj) {
127 item.children = val.children 128 item.children = val.children
...@@ -140,7 +141,6 @@ ...@@ -140,7 +141,6 @@
140 } 141 }
141 }) 142 })
142 } 143 }
143
144 }, 144 },
145 // 添加材料目录 145 // 添加材料目录
146 handleAdd () { 146 handleAdd () {
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
173 this.previewImg.index = 0 173 this.previewImg.index = 0
174 this.treeCheckId = item?.bsmSj 174 this.treeCheckId = item?.bsmSj
175 this.treeCheckIndex = index 175 this.treeCheckIndex = index
176 this.previewImg.imgList = item?.children 176 this.previewImg.imgList = item.children ? item.children : []
177 this.previewImg.bsmSj = item?.bsmSj 177 this.previewImg.bsmSj = item?.bsmSj
178 }, 178 },
179 // 小图片点击 179 // 小图片点击
......