From bcdf2616b1f925c52ccab495f35d1137f30ef709 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期三, 06 十二月 2023 15:38:04 +0800
Subject: [PATCH] 修改标题
---
ruoyi-ui/src/views/self/show.vue | 325 +++++++++++++++++++++++++++++------------------------
1 files changed, 176 insertions(+), 149 deletions(-)
diff --git a/ruoyi-ui/src/views/self/show.vue b/ruoyi-ui/src/views/self/show.vue
index 2889f83..fa51a96 100644
--- a/ruoyi-ui/src/views/self/show.vue
+++ b/ruoyi-ui/src/views/self/show.vue
@@ -1,5 +1,5 @@
<template>
- <div class="app-container">
+ <div class="app-container" id="printable-content">
<!-- 鍒锋柊椤甸潰 -->
<!-- <MyComponent :key="componentKey" />-->
<!-- 鍥炲埌椤堕儴-->
@@ -35,6 +35,7 @@
size="mini"
style=" width: 67px;height: 27px;background: #FFDDE3;
border-radius: 7px 7px 7px 7px;opacity: 1; margin-left: 20px;"
+ v-print="'#printable-content'"
v-hasPermi="['family:note:export']"
>鎵撳嵃</el-button>
</div>
@@ -147,47 +148,29 @@
<div style="padding-left:100px;padding-top:30px">
<el-col :span="6" :data="individualList">
<div class="block" :model="individualList">
- <div v-if="!isEditing">
- <el-avatar shape="square" style="width: 200px; height: 150px;">
- <el-image
- class="el-upload-list__item-thumbnail"
- v-if="!individualList.img"
- src="default-avatar-url"
- :fit="fit"
- style="width: 100%; height: 100%;"
- ></el-image>
- <el-image
- v-else
- :src="'http://47.93.189.255:8080/' + individualList.img"
- :fit="fit"
- style="width: 100%; height: 100%;"
- ></el-image>
- </el-avatar>
- </div>
- <el-upload v-else
- class="upload-demo"
- action="#"
- :auto-upload="false"
- :http-request="requestUpload"
- :limit="1"
- :file-list="fileList"
- >
- <el-avatar shape="square" style="width: 200px; height: 150px;">
- <el-image
- class="el-upload-list__item-thumbnail"
- v-if="!individualList.img"
- src="default-avatar-url"
- :fit="fit"
- style="width: 100%; height: 100%;"
- ></el-image>
- <el-image
- v-else
- :src="'http://47.93.189.255:8080/' + individualList.img"
- :fit="fit"
- style="width: 100%; height: 100%;"
- ></el-image>
- </el-avatar>
- </el-upload>
+
+
+
+
+ <el-upload ref="uploadDemo"
+ action=""
+ :file-list="fileList1"
+ list-type="picture-card"
+ accept="image/*"
+ :multiple="false"
+ :http-request="requestUpload"
+ :on-success="handleSucess"
+ :limit="1">
+
+ <el-avatar shape="square" style="width: 200px;;height: 200px;" >
+ <el-image
+ :src="'https://www.bendudu.com:8080/'+ individualList.url"
+ :fit="fit" style="width: 100%;height: 100%;border-radius: 0px 0px 0px 0px;opacity: 1;border: 1px solid rgba(0,0,0,0.5);"
+ ></el-image>
+
+
+ </el-avatar>
+ </el-upload>
<div class="edit-text" v-if="isEditing" @click="uploadImage">鐐瑰嚮鏇存崲鍥剧墖</div>
</div>
</el-col>
@@ -204,24 +187,26 @@
<el-container>
<el-col v-loading="loading" :data="individualList" @selection-change="handleSelectionChange">
<el-form ref="elForm" :model="individualList" :rules="rules" size="medium" label-position="left">
- <el-row :span="16">
- <el-form-item label="鎴风睄鍦板潃" prop="locationAddress" label-width="70px">
- <el-input v-model="individualList.locationAddress" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
- </el-form-item>
- </el-row>
- <el-row :span="16">
- <el-form-item label="甯镐綇鍦板潃" prop="alwaysAddress" label-width="70px">
- <el-input v-model="individualList.alwaysAddress" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
- </el-form-item>
- </el-row>
<el-row :span="16" >
<el-form-item label="鍗曚綅" prop="unit" label-width="40px">
<el-input v-model="individualList.unit" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
</el-input>
</el-form-item>
</el-row>
+ <el-row :span="16">
+ <el-form-item label="鎴风睄鍦板潃" prop="locationAddress" label-width="70px">
+ <el-input type="textarea" v-model="individualList.locationAddress" placeholder="" clearable :style="{width: '280px'}" :disabled="dsb">
+ </el-input>
+ </el-form-item>
+ </el-row>
+
+ <el-row :span="28">
+ <el-form-item label="甯镐綇鍦板潃" prop="alwaysAddress" label-width="70px">
+ <el-input type="textarea" v-model="individualList.alwaysAddress" placeholder="" clearable :style="{width: '280px'}" :disabled="dsb">
+ </el-input>
+ </el-form-item>
+ </el-row>
+
</el-form>
</el-col>
@@ -231,24 +216,25 @@
<el-container>
<el-col v-loading="loading" :data="individualList" @selection-change="handleSelectionChange">
<el-form ref="elForm" :model="individualList" :rules="rules" size="medium" label-position="left">
- <el-row :span="12">
- <el-form-item label="鎴风睄鍦板叕瀹夋満鍏�" prop="locationPolice" label-width="110px">
- <el-input v-model="individualList.locationPolice" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
- </el-form-item>
- </el-row>
- <el-row :span="12">
- <el-form-item label="甯镐綇鍦板叕瀹夋満鍏�" prop="alwaysPolice" label-width="110px">
- <el-input v-model="individualList.alwaysPolice" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
- </el-form-item>
- </el-row>
<el-row :span="12" >
<el-form-item label="鑱屽姟鑱岀О" prop="position" label-width="70px">
<el-input v-model="individualList.position" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
</el-input>
</el-form-item>
</el-row>
+ <el-row :span="12">
+ <el-form-item label="鎴风睄鍦板叕瀹夋満鍏�" prop="locationPolice" label-width="110px">
+ <el-input type="textarea" v-model="individualList.locationPolice" placeholder="" clearable :style="{width: '280px'}" :disabled="dsb">
+ </el-input>
+ </el-form-item>
+ </el-row>
+ <el-row :span="12">
+ <el-form-item label="甯镐綇鍦板叕瀹夋満鍏�" prop="alwaysPolice" label-width="110px">
+ <el-input type="textarea" v-model="individualList.alwaysPolice" placeholder="" clearable :style="{width: '280px'}" :disabled="dsb">
+ </el-input>
+ </el-form-item>
+ </el-row>
+
</el-form>
</el-col>
</el-container>
@@ -286,7 +272,7 @@
<el-collapse-item name="1" >
<template v-slot:title>
<div class="title-wrapper">
- 涓昏瀛︿範鍙婂伐浣滅粡鍘�
+ <div class="left-content">涓昏瀛︿範鍙婂伐浣滅粡鍘�</div>
<div>
<el-button class="button" size="mini" type="text" @click="showDialog('open')" >
<sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn></el-button>
@@ -340,9 +326,9 @@
<el-collapse-item name="2" >
<template v-slot:title>
<div class="title-wrapper">
- 瀹跺涵鎴愬憳鍙婁富瑕佺ぞ浼氬叧绯绘儏鍐�
+ <div class="left-content">瀹跺涵鎴愬憳鍙婁富瑕佺ぞ浼氬叧绯绘儏鍐�</div>
<div>
- <el-button class="button2" size="mini" type="text" @click="showDialog('relation1')">
+ <el-button class="button" size="mini" type="text" @click="showDialog('relation1')">
<sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn></el-button>
</div>
</div>
@@ -395,8 +381,8 @@
<el-collapse-item name="4">
<template v-slot:title>
<div class="title-wrapper">
- 鎸佹湁璇佷欢鎯呭喌
- <el-button class="button4" size="mini" type="text" @click="showDialog('certificate')">
+ <div class="left-content">鎸佹湁璇佷欢鎯呭喌</div>
+ <el-button class="button" size="mini" type="text" @click="showDialog('certificate')">
<sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn></el-button>
</div>
</template>
@@ -460,8 +446,8 @@
<el-collapse-item name="5">
<template v-slot:title>
<div class="title-wrapper">
- 鍑哄浗锛堝锛夋儏鍐�
- <el-button class="button5" size="mini" type="text" @click="showDialog('abroad')">
+ <div class="left-content">鍑哄浗锛堝锛夋儏鍐�</div>
+ <el-button class="button" size="mini" type="text" @click="showDialog('abroad')">
<sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn></el-button>
</div>
</template>
@@ -513,9 +499,9 @@
<el-collapse-item name="6">
<template v-slot:title>
<div class="title-wrapper">
- 鑷紶
+ <div class="left-content">鑷紶</div>
<div>
- <el-button size='mini' type="text" class="btn_autobiography" @click="showDialog('autobiography')" >
+ <el-button size='mini' type="text" class="button" @click="showDialog('autobiography')" >
<sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn>
</el-button>
</div>
@@ -527,18 +513,15 @@
v-loading="loading" :data="AutobiographyList" >
<el-tab-pane v-for="(item, index) in AutobiographyList"
:key='item.id' :label="item.ageBegin+'~'+item.ageEnd+'宀�'+'('+item.term+')'">
- <div v-if="item.term === '濠村効'"> {{item.content}}</div>
- <div v-if="item.term === '骞煎効'"> {{item.content}}</div>
- <div v-if="item.term === '灏忓'"> {{item.content}}</div>
- <div v-if="item.term === '鍒濅腑'"> {{item.content}}</div>
- <div v-if="item.term === '楂樹腑'"> {{item.content}}</div>
- <div v-if="item.term === '澶у'"> {{item.content}}</div>
- <div v-if="item.term === '鐮旂┒鐢�'"> {{item.content}}</div>
- <div v-if="item.term === '宸ヤ綔'"> {{item.content}}</div>
- <div v-if="item.term === '缁撳鍚�'"> {{item.content}}</div>
- <el-button size='mini' type="text" class="btn_edit" @click="editData(item)" style='position: absolute;right:10px;top:5px;'>
+ <div>{{ item.content }}</div>
+ <el-button size='mini' type="text" class="btn_edit" @click="editAutobiography(item)" style='position: absolute;right:40px;top:5px;'>
<sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn>
</el-button>
+
+ <el-button size="mini" type="text" class="btn_del" @click="handleAutobiography(item)" style='position: absolute;right:10px;top:5px;'>
+ <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn>
+ </el-button>
+
</el-tab-pane>
</el-tabs></div>
</el-contain>
@@ -707,10 +690,12 @@
<span> 宀� </span>
</el-form-item>
<el-form-item label="鏃舵湡锛�" prop="term">
- <el-select v-model="formDat.term" placeholder="璇烽�夋嫨鏃舵湡" clearable :style="{width: '50%'}" >
- <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"
- ></el-option>
- </el-select>
+<!-- <el-select v-model="formDat.term" placeholder="璇烽�夋嫨鏃舵湡" clearable :style="{width: '50%'}" >-->
+<!-- <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"-->
+<!-- ></el-option>-->
+<!-- </el-select>-->
+ <el-input v-model="formDat.term" placeholder="璇疯緭鍏ユ椂鏈�" clearable :style="{width: '100%'}" >
+ </el-input>
</el-form-item>
<el-form-item label="鍐呭缂栬緫锛�" prop="content">
<el-input v-model="formDat.content" type="textarea" :rows="5" placeholder="" clearable :style="{width: '100%'}" >
@@ -736,12 +721,13 @@
import axios from 'axios';
//鍦╯ystem/note/index.js涓鍏ユ帴鍙e嚱鏁� --鎺ュソ浜�
-import {getIndividualList, addIndividual, updateIndividual, delIndividual,
+import {
+ getIndividualList, addIndividual, updateIndividual, delIndividual,
listExperience, addExperience, updateExperience, delExperience,
getIndividualRelation, addRelation, updateRelation, delRelation,
getCertificateList, addCertificate, updateCertificate, delCertificate,
- getAbroadList, addAbroad, updateAbroad, delAbroad,listType,
- getAutobiographyList, getAutobiographyTermList, addAutobiography,updateAutobiography,
+ getAbroadList, addAbroad, updateAbroad, delAbroad, listType,
+ getAutobiographyList, getAutobiographyTermList, addAutobiography, updateAutobiography,delAutobiography,
getCategory,
} from "@/api/self/index";
import { delFamilyevent, uploadPic } from '../../api/bignote'
@@ -835,7 +821,10 @@
// 鏃ユ湡鑼冨洿
dateRange: [],
// 鏁版嵁鑼冨洿閫夐」
- fot:[".jpg",".jif"],
+ // 鏁版嵁鑼冨洿閫夐」
+ fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx',
+ '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
+
fileList:[],
fileListOther:[],
dsb:true,
@@ -1001,7 +990,7 @@
//鑷紶
term: [{
required: true,
- message: '璇烽�夋嫨鏃舵湡',
+ message: '璇疯緭鍏ユ椂鏈�',
trigger: 'blur'
}],
ageBegin: [{
@@ -1075,6 +1064,11 @@
// 鎵撳紑寮圭獥
this.dialogVisible.autobiography = true;
},
+ editAutobiography(item) {
+ this.isEdit1 = true;
+ this.dialogVisible.autobiography = true;
+ this.formDat = { ...item };
+ },
//闅旇鍙樿壊
tableRowClassName({ row, rowIndex }) {
@@ -1110,57 +1104,59 @@
// console.log(this.queryParams)
// listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
//涓汉缁忓巻
+ let _this = this;
listExperience(this.queryParams).then(response => {
// alert(123)
// console.log(response.data)
- this.experienceList = response.data;
- this.total = response.data.total;
- this.loading = false;
+ _this.experienceList = response.data;
+ // this.total = response.data.total;
+ _this.loading = false;
}
);
//鎴愬憳鍏崇郴
getIndividualRelation(this.queryParams).then(response => {
// alert(123)
// console.log(response.data)
- this.relationList = response.data;
- this.total = response.data.total;
- this.loading = false;
+ _this.relationList = response.data;
+ // this.total = response.data.total;
+ _this.loading = false;
}
);
//涓汉淇℃伅
getIndividualList(this.queryParams).then(response => {
// alert(123)
// console.log(response.data)
- this.individualList = response.data;
- this.total = response.data.total;
- this.loading = false;
+ _this.individualList = response.data;
+
+ // this.total = response.data.total;
+ _this.loading = false;
}
);
//鍑哄叆澧冭瘉浠舵儏鍐�
getCertificateList(this.queryParams).then(response => {
// alert(123)
// console.log(response.data)
- this.certificateList = response.data;
- this.total = response.data.total;
- this.loading = false;
+ _this.certificateList = response.data;
+ // this.total = response.data.total;
+ _this.loading = false;
}
);
//鍑哄浗鎯呭喌
getAbroadList(this.queryParams).then(response => {
// alert(123)
// console.log(response.data)
- this.AbroadList = response.data;
- this.total = response.data.total;
- this.loading = false;
+ _this.AbroadList = response.data;
+ // this.total = response.data.total;
+ _this.loading = false;
}
);
//鏌ヨ涓汉鎵�鏈夎嚜浼�
getAutobiographyList(this.queryParams).then(response => {
// alert(123)
// console.log(response.data)
- this.AutobiographyList = response.data;
- this.total = response.data.total;
- this.loading = false;
+ _this.AutobiographyList = response.data;
+ // this.total = response.data.total;
+ _this.loading = false;
});
//鏍规嵁涓嶅悓鏃舵鐨勪釜浜鸿嚜浼�
@@ -1172,12 +1168,12 @@
// this.loading = false;
// });
listType(this.queryParams).then(response => {
- this.typeList = response.data;
- this.total = response.data.total;
+ _this.typeList = response.data;
+ // this.total = response.data.total;
// console.log( this.typeList )
// 鍦ㄥ洖璋冨嚱鏁颁腑璋冪敤 getTypeOptions()
- this.getTypeOptions();
- this.loading = false;
+ _this.getTypeOptions();
+ _this.loading = false;
}
);
},
@@ -1337,12 +1333,13 @@
/** 鎻愪氦鎸夐挳锛堟暟鎹潈闄愶級 */
//鏂板涓昏缁忓巻鐨勪繚瀛�
submitDataScope: function() {
+ let _this = this
this.$refs["elForm"].validate(valid => {
if (valid) {
- addExperience(this.formDat).then(response => {
- this.$modal.msgSuccess("鏂板鎴愬姛");
- this.dialogVisible.open = false;
- this.getList();
+ addExperience(_this.formDat).then(response => {
+ _this.$modal.msgSuccess("鏂板鎴愬姛");
+ _this.dialogVisible.open = false;
+ _this.getList();
});
}
});
@@ -1404,14 +1401,14 @@
this.$refs["elForm"].validate(valid => {
if (valid) {
// 鏍规嵁鍊兼壘鍒伴�変腑鐨勯�夐」瀵硅薄
- const selectedOption = this.typeOptions.find(option => option.value === this.formDat.term);
+ // const selectedOption = this.typeOptions.find(option => option.value === this.formDat.term);
if (this.isEdit1) {
// 鎵ц淇敼鎿嶄綔
updateAutobiography(this.formDat).then(response => {
// 灏嗛�変腑閫夐」鐨勬枃鏈缃负"term"瀛楁鐨勫��
- this.formDat.term = selectedOption.label;
- this.formDat.id = selectedOption.id;
+ // this.formDat.term = selectedOption.value;
+ // this.formDat.id = selectedOption.id;
console.log("1")
this.$modal.msgSuccess("淇敼鎴愬姛");
this.dialogVisible.autobiography = false;
@@ -1425,7 +1422,7 @@
} else {
// 鎵ц鏂板鎿嶄綔
addAutobiography(this.formDat).then(response => {
- this.formDat.term = selectedOption.label;
+ // this.formDat.term = selectedOption.label;
this.$modal.msgSuccess("鏂板鎴愬姛");
this.dialogVisible.autobiography = false;
this.getList();
@@ -1461,14 +1458,14 @@
this.individualList.maritalStatus = 1
else
this.individualList.maritalStatus = 2
- let ul = this.fileList.map(function (elem){
- return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
- }).join(",")
- let uls = this.fileListOther.map(function (elem){
- return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
- }).join(",")
- this.individualList.url = ul+","+uls
-
+ // let ul = this.fileList.map(function (elem){
+ // return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
+ // }).join(",")
+ // let uls = this.fileListOther.map(function (elem){
+ // return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
+ // }).join(",")
+ // // this.individualList.url = ul+","+uls
+ // console.log(this.individualList)
this.$refs['elForm'].validate(valid => {
if (valid) {
if (this.individualList.userId !== undefined) {
@@ -1629,7 +1626,12 @@
formData.append('uploadFile', file);
let _this = this
+ // 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)
if(_this.fot.includes(pth) === true)
@@ -1639,9 +1641,25 @@
}
else{
- _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
+ _this.fileList.push({name:response.data.fileName, url:response.data.url})
}
+ _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,"")
+ updateIndividual(_this.individualList).then(response => {
+ // 灏嗛�変腑閫夐」鐨勬枃鏈缃负"term"瀛楁鐨勫��
+ // this.formDat.term = selectedOption.value;
+ // this.formDat.id = selectedOption.id;
+ console.log("1")
+ _this.$modal.msgSuccess("淇敼鎴愬姛");
+ _this.dialogVisible.autobiography = false;
+ _this.isEdit1 = false;
+ _this.getList();
+ }).catch(error => {
+ console.log(error);
+ _this.isEdit1 = false;
+ _this.dialogVisible.autobiography = false;
+ });
})
},
@@ -1686,6 +1704,16 @@
this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
}).catch(() => {});
},
+ /** 鍒犻櫎涓汉鑷紶鎸夐挳鎿嶄綔 */
+ handleAutobiography(row) {
+ const Ids = row.id || this.ids;
+ this.$modal.confirm('鏄惁纭鍒犻櫎鏁版嵁椤癸紵').then(function() {
+ return delAutobiography(Ids);
+ }).then(() => {
+ this.getList();
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ }).catch(() => {});
+ },
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
@@ -1697,7 +1725,7 @@
};
</script>
-<style >
+<style scoped="">
/*.uoloadSty {*/
/* width:110px;*/
/* height:110px;*/
@@ -1724,10 +1752,17 @@
.el-collapse-item__header {
background-color:#FEF7FC;
+ width: 100%;
}
.title-wrapper {
display: flex;
justify-content: space-between;
+ align-items: center;
+ width: calc(100% - 50px);
+}
+.left-content {
+
+ width: 100%;
}
.btn_autobiography{
background:center no-repeat url('../../assets/icons/add1.png') ;
@@ -1736,7 +1771,9 @@
.btn_edit{
background:center no-repeat url('../../assets/icons/edit.png') ;
}
-
+.btn_del{
+ background:center no-repeat url('../../assets/images/鍒犻櫎2.png') ;
+}
.button-container {
text-align: right;
display: flex;
@@ -1746,20 +1783,10 @@
}
.button {
background:center no-repeat url('../../assets/icons/add1.png') ;
- margin-left: 69.5vw;
-
-}
-.button2 {
- background: center no-repeat url('../../assets/icons/add1.png') ;
- margin-left: 66vw;
-}
-.button4 {
- background: center no-repeat url('../../assets/icons/add1.png') ;
- margin-left: 71.5vw;
-}
-.button5 {
- background:center no-repeat url('../../assets/icons/add1.png') ;
- margin-left: 71vw;
+ /*margin-right: -10px ;*/
+ flex-shrink: 0;
+ width: 30px;
+ height: 28px;
}
.form{
background:center/11% no-repeat url('../../assets/icons/form.png') ;
--
Gitblit v1.9.1