From fcd9788f561b8b81bf5aa45bbc3db035b9786f2c Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期五, 08 十一月 2024 11:10:00 +0800
Subject: [PATCH] 修改图像bug
---
ruoyi-ui/src/views/self/memo.vue | 89 +++++++++++++++--------------
ruoyi-ui/vue.config.js | 2
ruoyi-ui/src/api/self/index.js | 2
ruoyi-ui/src/api/memo/index.js | 9 ++
ruoyi-ui/src/views/login.vue | 72 ++++++++++++-----------
5 files changed, 93 insertions(+), 81 deletions(-)
diff --git a/ruoyi-ui/src/api/memo/index.js b/ruoyi-ui/src/api/memo/index.js
index 3b67d07..56650d4 100644
--- a/ruoyi-ui/src/api/memo/index.js
+++ b/ruoyi-ui/src/api/memo/index.js
@@ -43,7 +43,14 @@
data: data
})
}
-
+//涓婁紶鏂囦欢
+export function uploadPics(data) {
+ return request({
+ url: '/common/upload',
+ method: 'post',
+ data: data
+ })
+}
//涓婁紶鏂囦欢
export function uploadPic(data) {
return request({
diff --git a/ruoyi-ui/src/api/self/index.js b/ruoyi-ui/src/api/self/index.js
index d8a1ae5..c473ba0 100644
--- a/ruoyi-ui/src/api/self/index.js
+++ b/ruoyi-ui/src/api/self/index.js
@@ -10,7 +10,7 @@
//鏇存柊涓汉淇℃伅
export function updateIndividual(data) {
return request({
- url: '/self/user',
+ url: '/self/user/updateInfo',
method: 'put',
data: data
})
diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue
index e1fb05a..16e5d83 100644
--- a/ruoyi-ui/src/views/login.vue
+++ b/ruoyi-ui/src/views/login.vue
@@ -1,18 +1,18 @@
<template>
<div>
-
+
<div class="login Group_132">
<div class="navbar topHeight">
<!-- <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
-
+
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
-->
<div class="right-menu">
-
-
-
+
+
+
<div class="avatar-wrapper">
<el-button @click="login">
<img :src="avatar" class="user-avatar">
@@ -20,14 +20,14 @@
<span>鐧诲綍</span>
</el-button>
<el-button @click="openReg">
-
+
<span>娉ㄥ唽</span>
</el-button>
</div>
-
+
</div>
</div>
-
+
<el-dialog :visible.sync="open" style="margin: 0px;" customClass="customWidth" width="620px">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" style="margin: 0px;">
<h3 class="title">鐧诲綍鏈兘閮藉缃�</h3>
@@ -107,7 +107,7 @@
</div>
<div class="code" @click="getCode" style="width: 24px;
-
+
height: 16px;
font-size: 12px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
@@ -134,18 +134,18 @@
<span v-if="!loading" style="width: 97px;height: 62px;">鐧诲綍</span>
<span v-else>鐧� 褰� 涓�...</span>
</el-button>
-
+
</el-form-item>
<el-form-item>
<a href="https://www.bendudu.com:8080/profile/upload/2023/10/10/Bendudu20231010_20231010203358A033.apk">鐐瑰嚮姝ゅ涓嬭浇搴旂敤绋嬪簭</a>
-
+
</el-form-item>
</el-form>
</el-dialog>
-
-
-
-
+
+
+
+
<el-dialog :visible.sync="openRegister" customClass="customWidth" width="450px">
<div class="register">
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
@@ -202,11 +202,11 @@
<span v-if="!loading">娉� 鍐�</span>
<span v-else>娉� 鍐� 涓�...</span>
</el-button>
-
+
</el-form-item>
</el-form>
<!-- 搴曢儴 -->
-
+
</div>
</el-dialog>
<!-- 搴曢儴 -->
@@ -215,7 +215,7 @@
<a href="https://beian.miit.gov.cn/" target="_blank" style="color: black; ">绮CP澶�2023050334鍙�<span v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></span>鍏畨澶囨鍙�44010402003045</a>
</div>
</div>
-
+
<div class="gpr">
<!-- <img :key="url" :src="url" style="width:100%;height:30%"></img> -->
</div>
@@ -235,11 +235,13 @@
callback(new Error("涓ゆ杈撳叆鐨勫瘑鐮佷笉涓�鑷�"));
} else {
callback();
+
}
};
return {
url: require('../assets/images/index.png'),
openRegister: false,
+ avatar: undefined,
open: false,
codeUrl: "",
loginForm: {
@@ -266,9 +268,9 @@
// 娉ㄥ唽寮�鍏�
// register: true,
redirect: undefined,
-
-
-
+
+
+
registerForm: {
nickname: "",
@@ -320,7 +322,7 @@
dangerouslyUseHTMLString: true,
type: 'success'
}).then(() => {
- this.openRegister = false;
+ this.openRegister = false;
// this.$router.push("/login");
}).catch(() => {});
}).catch(() => {
@@ -333,7 +335,7 @@
});
},
openReg(){
- this.openRegister = true;
+ this.openRegister = true;
},
login(){
this.open = true;
@@ -341,7 +343,7 @@
getCode() {
getCodeImg().then(res => {
-
+
this.captchaEnabled = res.data.captchaEnabled === undefined ? true : res.captchaEnabled;
if (this.captchaEnabled) {
this.codeUrl = "data:image/gif;base64," + res.data.img;
@@ -393,7 +395,7 @@
.gpr{
width:100%;
// height:1000px;
-
+
//background: no-repeat center/100% url("../assets/images/index.png");
}
.customWidth{
@@ -401,22 +403,22 @@
}
.topHeight{
height: 40px;
-
+
margin-right: 20px;
- top:5px;
+ top:5px;
position: absolute;
}
.Group_132{
// background-image: url("../assets/images/index.png");
-
+
// background: no-repeat center/40% url("../assets/images/Group 132.png");
// height: 1200px;
min-width: 1300px;
width: 100vw;
height: 100vh;
-
+
background-color: #FEF7FC;
//background-position: 49.5% 16.2% ;
// background-position: 81.7px 71.3px;
@@ -433,12 +435,12 @@
background: no-repeat center/100% url("../assets/images/index.png");
background-color: #FEF7FC;
-
+
//background-image: url("../assets/images/login-background.jpg");
//background-size: cover;
}
.title {
-
+
width:355px;
height: 58px;
font-size: 44px;
@@ -534,7 +536,7 @@
width: 108px;
height: 48px;
float: right;
-
+
img {
@@ -562,7 +564,7 @@
}
.code {
-
+
}
.register {
@@ -571,10 +573,10 @@
align-items: center;
height: 100%;
//background-image: url("../assets/images/login-background.jpg");
-
+
width:400px;
background-color: #FEF7FC;
-
+
//background-size: cover;
}
.title {
diff --git a/ruoyi-ui/src/views/self/memo.vue b/ruoyi-ui/src/views/self/memo.vue
index 24212d6..053cb1e 100644
--- a/ruoyi-ui/src/views/self/memo.vue
+++ b/ruoyi-ui/src/views/self/memo.vue
@@ -149,7 +149,7 @@
accept="image/*"
:multiple="false"
:http-request="requestUpload"
-
+
:limit="1">
<el-avatar shape="square" style="width: 200px;;height: 200px;" >
@@ -278,11 +278,11 @@
</el-container>
</el-form-item>
</el-form>
-
+
</div>
-
+
</el-collapse-item> -->
-
+
<!--涓昏瀛︿範鍙婂伐浣滅粡鍘�-->
<el-collapse-item name="1" >
<template v-slot:title>
@@ -533,7 +533,7 @@
<el-button size='mini' type="text" class="btn_edit" @click="editAutobiography(item)" style='right:40px;top:5px;'>
<span v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></span>
</el-button>
-
+
<el-button size="mini" type="text" class="btn_del" @click="handleAutobiography(item)" style='right:10px;top:5px;'>
<span v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></span>
</el-button>
@@ -542,12 +542,12 @@
</el-tabs></div>
</el-container>
</el-collapse-item>
-
+
</el-collapse>
-
-
-
-
+
+
+
+
<pagination
v-show="total>0"
:total="total"
@@ -555,7 +555,7 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
-
+
<!-- 鏂板涓昏缁忓巻淇℃伅閰嶇疆瀵硅瘽妗� -->
<el-dialog title="鏂板涓昏缁忓巻淇℃伅" :visible.sync="dialogVisible.open" width="900px" append-to-body>
<el-form ref="elForm1" :model="formDat" :rules="rules" size="medium" label-width="140px">
@@ -577,10 +577,10 @@
<el-input v-model="formDat.witness" placeholder="璇疯緭鍏ヨ瘉鏄庝汉" clearable :style="{width: '100%'}" >
</el-input>
</el-form-item>
-
+
</el-form>
<h4 class="form-header"> </h4>
-
+
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitDataScope">淇� 瀛�</el-button>
<el-button @click="cancelData">鍙� 娑�</el-button>
@@ -608,10 +608,10 @@
<el-input v-model="formDat.otherPolitical" placeholder="璇疯緭鍏ユ斂娌婚潰璨�" clearable :style="{width: '100%'}" >
</el-input>
</el-form-item>
-
+
</el-form>
<h4 class="form-header"> </h4>
-
+
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitDataScope2">淇� 瀛�</el-button>
<el-button @click="cancelData">鍙� 娑�</el-button>
@@ -630,7 +630,7 @@
></el-option>
</el-select>
<el-input v-model="newOption" placeholder="鑻ユ湭鍦ㄤ笂杩伴�夐」涓壘鍒板搴旂被鍨嬶紝璇峰湪姝よ緭鍏ユ柊鐨勮瘉浠剁被鍨�" ></el-input>
-
+
</el-form-item>
<el-form-item label="鎸佹湁鎯呭喌" prop="ownStatus">
<el-input v-model="formDat.ownStatus" placeholder="璇疯緭鍏ユ寔鏈夋儏鍐�" clearable :style="{width: '100%'}" >
@@ -651,7 +651,7 @@
></el-date-picker></el-form-item>
</el-form>
<h4 class="form-header"> </h4>
-
+
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitDataScope4">淇� 瀛�</el-button>
<el-button @click="cancelData">鍙� 娑�</el-button>
@@ -677,10 +677,10 @@
<el-input v-model="formDat.cause" placeholder="璇疯緭鍏ヤ簨鐢�(鏃呮父銆佽蛋璁裤�佹帰浜层�佺户鎵胯储浜с�佸叾浠�)" clearable :style="{width: '100%'}" >
</el-input>
</el-form-item>
-
+
</el-form>
<h4 class="form-header"> </h4>
-
+
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitDataScope5">淇� 瀛�</el-button>
<el-button @click="cancelData">鍙� 娑�</el-button>
@@ -721,13 +721,13 @@
</el-form>
</el-col>
<h4 class="form-header"> </h4>
-
+
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitDataScope6">淇� 瀛�</el-button>
<el-button @click="cancelData">鍙� 娑�</el-button>
</div>
</el-dialog>
-
+
</div>
</template>
@@ -743,7 +743,7 @@
} from "@/api/self/index";
import {getAllInfo} from "@/api/system/user"
import {showShareUser} from "@/api/bignote/index";
-import {listNote,enload,getNote, addNote,updateNote, delNote,uploadPic} from "@/api/memo/index";
+import {listNote,enload,getNote, addNote,updateNote, delNote,uploadPic,uploadPics} from "@/api/memo/index";
import { Notification, MessageBox, Message, Loading } from 'element-ui'
export default {
@@ -797,7 +797,7 @@
abroad:false,
autobiography:false
},
-
+
// 涓汉缁忓巻鏁版嵁
experienceList: undefined,
// isEdit:true,
@@ -809,7 +809,7 @@
typeList:[],
//鍑哄浗鎯呭喌
AbroadList:[],
-
+
uploading: false,
uploading1: false,
fit1: ['fill'],
@@ -911,8 +911,8 @@
}],
},
-
-
+
+
open:false,
formDat6: {},
formDat: {
@@ -1014,7 +1014,7 @@
this.loading1 = true;
let userId = this.$store.state.user.userId
// alert(userId)
-
+
showShareUser(userId, 2062).then(response=>{
console.log("===========ddddddddddddd")
console.log(response.data)
@@ -1213,17 +1213,19 @@
requestUpload(params)
{
var file = params.file;
+ console.log(file)
var formData = new FormData();
formData.append('uploadFile', file);
let _this = this
-
+console.log(formData)
+ console.log('dddddddd===========')
// console.log(this.individualList)
this.$refs.uploadDemo.clearFiles();
// alert(234)
- uploadPic(formData).then(response => {
- // alert(response.data.url)
- // alert(response.data.originalFilename)
- let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
+ uploadPics(formData).then(response => {
+ alert(response.data.url)
+ // // alert(response.data.originalFilename)
+ let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
if(_this.fot.includes(pth) === true)
{
@@ -1237,6 +1239,7 @@
}
_this.individualList.img = response.data.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
_this.individualList.url = response.data.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
+ console.log(_this.individualList)
updateIndividual(_this.individualList).then(response => {
// 灏嗛�変腑閫夐」鐨勬枃鏈缃负"term"瀛楁鐨勫��
// this.formDat.term = selectedOption.value;
@@ -1380,7 +1383,7 @@
if (this.isEdit1) {
// 鎵ц淇敼鎿嶄綔
-
+
console.log(this.formDat6)
updateAutobiography(this.formDat6).then(response => {
// 灏嗛�変腑閫夐」鐨勬枃鏈缃负"term"瀛楁鐨勫��
@@ -1395,7 +1398,7 @@
Object.keys(this.formDat6).forEach(key => {
this.formDat6[key] = '';
});
-
+
}).catch(error => {
// alert(24)
console.log(error);
@@ -1422,7 +1425,7 @@
}
}
});
-
+
},
editRow(row) {
@@ -1578,7 +1581,7 @@
response.data.itemValues.replace("{", "").replace("}", "").split(",").map(elem => {
const label = elem.split(":")[0].trim();
const value = parseInt(elem.split(":")[1].trim());
-
+
// 鍒ゆ柇 typeOptions 鏁扮粍涓槸鍚﹀凡瀛樺湪鐩稿悓鐨� value
if (!_this.typeOptions.some(option => option.value === value)) {
_this.typeOptions.push({ "label": label, "value": value });
@@ -1587,9 +1590,9 @@
// _this.getSrc1(value)
});
});
-
+
},
-
+
// 鍙栨秷鎸夐挳
cancelData() {
// alert(23)
@@ -1609,13 +1612,13 @@
Object.keys(this.formDat6).forEach(key => {
this.formDat6[key] = '';
});
-
+
},
handleUploadSuccess(response, file) {
// 澶勭悊鏂囦欢涓婁紶鎴愬姛鍚庣殑鍥炶皟
this.individualList.img = response.url;
},
-
+
//涓嬫媺
handleChange5(activeNames) {
// console.log(activeNames);
@@ -1629,7 +1632,7 @@
// alert(123)
// }
},
-
+
//涓汉鑷紶
handleClick(tab, event) {
// console.log(tab, event);
@@ -1642,7 +1645,7 @@
// alert(1234)
this.isEdit1 = true; // 璁剧疆涓虹紪杈戞搷浣�
// 灏嗚淇敼鐨勬暟鎹~鍏呭埌formDat瀵硅薄涓�
-
+
this.formDat6.ageBegin = data.ageBegin;
this.formDat6.ageEnd = data.ageEnd;
this.formDat6.term = data.term;
@@ -1680,7 +1683,7 @@
}
return options;
}, []);
-
+
},
//闅旇鍙樿壊
tableRowClassName({row, rowIndex}) {
diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js
index 0b0cb0e..961b73a 100644
--- a/ruoyi-ui/vue.config.js
+++ b/ruoyi-ui/vue.config.js
@@ -36,7 +36,7 @@
proxy: {
// detail: https://cli.vuewww.bendudu.comjs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
- //target: `https://10.39.18.174:8080/`,
+ // target: `https://10.39.18.174:8080/`,
// target: `https://192.168.1.7:8080/`,
target: 'https://www.bendudu.com:8080/',
changeOrigin: true,
--
Gitblit v1.9.1