头像、班级管理

init
zhusiyu 3 years ago
parent 39b1952f46
commit 3737731de6

@ -3,12 +3,24 @@ export default {
*获得某个单位的本单位机构树
* org_id 必填 number 机构ID
* */
"changeModifyPhoto": {
// "changeModifyPhoto": {
// //url:"admin/new_base/depinfo_getOrgTree",
// url: "intellioa/java/sys/cloudPlatform/plupload",
// method: "post",
// isTestLogin: true
// },
"savePersonIDPhoto": {
//url:"admin/new_base/depinfo_getOrgTree",
url: "intellioa/java/sys/cloudPlatform/plupload",
url: "intellioa/sys/cloudPlatform/savePersonIDPhoto",
method: "post",
isTestLogin: true
},
"getModifyPhoto": {
//url:"admin/new_base/depinfo_getOrgTree",
url: "intellioa/sys/cloudPlatform/getPersonIDPhoto",
method: "get",
isTestLogin: true
},
//获取头像
// "personTx": {
// url: "intellioa/sys/cloudPlatform/getPersonTxByYw",

@ -41,8 +41,8 @@
<img src="./images/search-minus.png" alt="" @click="searchPlusFn(1)">
</div>
<a-upload maxCount="1" accept=".jpg,.jpeg,.png,.bmp" list-type="picture"
v-model:file-list="fileListPic" :before-upload="beforeUpload"
class="fixBtnChange" @change="picFileChange">更换图片
v-model:file-list="fileListPic"
class="fixBtnChange" @change="setPersonTx">更换图片
</a-upload>
<a-button class="fixBtnSave" type="primary" @click="saveTx"></a-button>
<span>仅支持.jpg.jpeg.png.bmp图片格式</span>
@ -50,15 +50,18 @@
<div class="colRightBbox">
<div class="titleLogo">证件照信息</div>
<div class="mypicture">
<img :src="personIdPic" ref="IDphoto" alt=""
<!--<img-preview :imgObj="modifyPhotoObj"-->
<!--style="display:inline-block;width: 100%;height: 100%;"/>-->
<img ref="modifyPhoto" alt=""
style="display:inline-block;width: 100%;height: 100%;">
</div>
<!--<a-upload maxCount="1" accept=".jpg,.jpeg,.png,.bmp" list-type="picture" class="fixBtn"-->
<!--@change="modifyIDphoto">修改证件照-->
<!--</a-upload>-->
<Uploader :type="2" :canUpload="true" :option="{}" :multiple="false" title="修改证件照"
@uploadComplete="uploadComplete" class="Uploader" :fileData="fileList"
></Uploader>
<a-upload maxCount="1" accept=".jpg,.jpeg,.png,.bmp"
list-type="picture" class="Uploader"
@change="savePersonIDPhoto" v-show="saveModifyPhotoSuc">修改证件照
</a-upload>
<!--<Uploader :type="2" :canUpload="true" :option="{}" :multiple="false" title="修改证件照"-->
<!--@uploadComplete="uploadComplete" class="Uploader" :fileData="fileList"-->
<!--&gt;</Uploader>-->
</div>
</a-col>
</a-row>
@ -69,6 +72,7 @@
<script>
import {Modal, Row, Col, Button, Icon, Upload, message} from 'ant-design-vue';
import InterConfig from './interConfig'
import ImgPreview from '../../../common/imgPreview.vue';
import GUID_UUID from '../../../../../global-llibs/guid-uuid'
import BaseConfig from '../../../../../global-llibs/base-config'
import Uploader from '../../../../../components/common/uploader/Upload.vue'
@ -89,9 +93,11 @@
file: '',
fileList: [],
fileListPic: [],
personIdPic: '',
txfull: true,
imgSrc: '',
modifyPhotoObj: {},
idPhotoJson: {},
saveModifyPhotoSuc: true,
}
},
components: {
@ -103,12 +109,14 @@
AUpload: Upload,
// AMessage: message,
Uploader,
ImgPreview,
},
created() {
this.uploadComplete()
},
mounted() {
this.getPersonTx()
this.getModifyPhoto()
},
methods: {
cancelModal() {
@ -132,39 +140,69 @@
}
this.$refs.imgChange.style.transform = 'scale(' + this.plusMinus + ')'
},
beforeUpload() {
//this.$refs.imgChange.src = ''
},
modifyIDphoto(val) {
console.log('图片信息', val)
this.name = val.file.name
let split = this.name.split('.');
let guid = GUID_UUID.guid();
this.key = BaseConfig.url_path_suffix + guid.substring(0, 2) + "/" + guid + "." + split[1]
this.file = val;
this.$refs.IDphoto.src = val.file.thumbUrl
this.changeModifyPhoto()
},
// modifyIDphoto(val) {
// console.log('', val)
// this.name = val.file.name
// let split = this.name.split('.');
// let guid = GUID_UUID.guid();
// this.key = BaseConfig.url_path_suffix + guid.substring(0, 2) + "/" + guid + "." + split[1]
// this.file = val;
// this.$refs.IDphoto.src = val.file.thumbUrl
// this.changeModifyPhoto()
// },
uploadComplete: function (file) {
this.fileList = file
//console.log('uploadComplete', file)
},
//
getModifyPhoto() {
let param = {
person_id: this.BaseConfig.userInfo.person_id,//ID
identity_id: this.BaseConfig.userInfo.identity_id,//"ID
org_id: this.BaseConfig.person_info_my.bureau_id, //ID
}
this.InterfaceConfig.callInterface([{
url: InterConfig.getModifyPhoto.url,
params: param,
method: InterConfig.getModifyPhoto.method,
isTestLogin: InterConfig.getModifyPhoto.isTestLogin,
}], (result) => {
console.log('获取证件照', result)
if (result[0].data.code === 2000 && result[0].data.id_photo_json !== "") {
this.modifyPhotoObj = JSON.parse(result[0].data.id_photo_json)
}
})
},
//
changeModifyPhoto() {
savePersonIDPhoto(val) {
// let param = {
// name: this.name,
// key: this.key,
// chunk: 0,
// chunks: 1,
// file: this.file,
// }
let targetUrl = val.fileList[val.fileList.length - 1]
this.$refs.modifyPhoto.src = targetUrl.thumbUrl
let param = {
name: this.name,
key: this.key,
chunk: 0,
chunks: 1,
file: this.file,
person_id: this.BaseConfig.userInfo.person_id,//ID
identity_id: this.BaseConfig.userInfo.identity_id,//"ID
org_id: this.BaseConfig.person_info_my.bureau_id, //ID
id_photo_json: val.file,
}
this.InterfaceConfig.callInterface([{
url: InterConfig.changeModifyPhoto.url,
url: InterConfig.savePersonIDPhoto.url,
params: param,
method: InterConfig.changeModifyPhoto.method,
isTestLogin: InterConfig.changeModifyPhoto.isTestLogin,
method: InterConfig.savePersonIDPhoto.method,
isTestLogin: InterConfig.savePersonIDPhoto.isTestLogin,
}], (result) => {
// console.log('1', result)
// console.log('', result)
if (result[0].data.code === 2000) {
message.success('修改成功')
this.saveModifyPhotoSuc = false
} else {
message.error('修改失败')
}
})
},
//
@ -179,7 +217,7 @@
method: InterConfig.getPersonTxByYw.method,
isTestLogin: InterConfig.getPersonTxByYw.isTestLogin,
}], (result) => {
console.log('获取头像', result)
//console.log('', result)
if (result[0].data.file_id !== "") {
this.imgSrc = result[0].data.file_id + ',' + result[0].data.extension
// console.log('fileId', this.$refs.imgChange.src)
@ -189,7 +227,7 @@
})
},
//
picFileChange(val) {
setPersonTx(val) {
this.txfull = true
let targetUrl = val.fileList[val.fileList.length - 1]
this.$refs.imgChange.src = targetUrl.thumbUrl
@ -456,18 +494,19 @@
overflow: hidden;
}
.Uploader {
cursor: pointer;
position: absolute;
width: 110px !important;
height: 39px;
/*line-height: 39px;*/
line-height: 39px;
top: 50%;
right: 70px;
margin-top: -24px;
/*display: inline-block;*/
/*border: 1px solid #03EFFD;*/
border: 1px solid #03EFFD;
/*border-radius: 5px;*/
/*cursor: pointer;*/
.img-style {
/*.img-style {
border: none;
top: -37px;
left: -208px;
@ -482,7 +521,7 @@
font-size: 30px;
}
}
}*/
.upload-btn {
/*display: block !important;*/
.upload-Image-style {

@ -83,26 +83,54 @@
<span>班级文化</span>
</div>
<a-empty description="暂无数据" v-if="classCultureEmpty" class="classManage-pic-empty"/>
<a-carousel ref="imgs" class="classManage-pic-pic" :dot-position="dotposition" easing="linear"
:dots="false" v-if="classCulture.length != 0">
<p class="classCulture" v-for="(item,i) in classCulture" :key="i">
<img style="width: 165px;height: 120px; margin-bottom: 10px;margin-right: 10px;left: 0;top: 0;"
:src="item[0].src" alt="">
<img style="width: 95px;height: 55px;margin-bottom: 10px; top: 0;right: 0;"
:src="item[1].src" alt="">
<img style="width: 95px;height: 55px; right: 0;top: 64px;" :src="item[2].src" alt="">
<img style="width: 85px;height: 60px;left: 0;bottom: 0; " :src="item[3].src" alt="">
<img style="width: 85px;height: 60px; bottom: 0;left: 34%;" :src="item[4].src" alt="">
<img style="width: 85px;height: 60px; bottom: 0;right: 0;" :src="item[5].src" alt="">
</p>
</a-carousel>
<a-row @click.native="nextP" v-if="classCulture.length != 0"
style="cursor: pointer;width: 50px;height: 20px;margin-top: 10px;')"
>
<a-col style="cursor: pointer;">
<img src="../images/classCULtureNext.png" alt="" style="cursor: pointer;">
</a-col>
</a-row>
<!--<a-carousel ref="imgs" class="classManage-pic-pic" :dot-position="dotposition" easing="linear"-->
<!--:dots="false" v-if="classCulture.length != 0">-->
<!--<p class="classCulture">-->
<!--<img style="width: 165px;height: 120px; margin-bottom: 10px;margin-right: 10px;left: 0;top: 0;"-->
<!--:src="item[0].src" alt="">-->
<!--<img style="width: 95px;height: 55px;margin-bottom: 10px; top: 0;right: 0;"-->
<!--:src="item[1].src" alt="">-->
<!--<img style="width: 95px;height: 55px; right: 0;top: 64px;" :src="item[2].src" alt="">-->
<!--<img style="width: 85px;height: 60px;left: 0;bottom: 0; " :src="item[3].src" alt="">-->
<!--<img style="width: 85px;height: 60px; bottom: 0;left: 34%;" :src="item[4].src" alt="">-->
<!--<img style="width: 85px;height: 60px; bottom: 0;right: 0;" :src="item[5].src" alt="">-->
<!--</p>-->
<!--</a-carousel>-->
<div ref="imgs" class="classManage-pic-pic" v-if="classCulture.length != 0">
<div class="classCulture">
<div v-if="classCulture[0]"
style="position:absolute;display:inline-block;width: 165px;height: 120px; margin-bottom: 10px;margin-right: 10px;left: 0;top: 0;">
<img-preview :imgObj="JSON.parse(classCulture[0].attachment_json)"/>
</div>
<div v-if="classCulture[1]"
style="position:absolute;display:inline-block;width: 95px;height: 55px;margin-bottom: 10px; top: 0;right: 0;">
<img-preview :imgObj="JSON.parse(classCulture[1].attachment_json)"/>
</div>
<div v-if="classCulture[2]"
style="position:absolute;display:inline-block;width: 95px;height: 55px; right: 0;top: 64px;">
<img-preview :imgObj="JSON.parse(classCulture[2].attachment_json)"/>
</div>
<div v-if="classCulture[3]"
style="position:absolute;display:inline-block;width: 85px;height: 60px;left: 0;bottom: 0;">
<img-preview :imgObj="JSON.parse(classCulture[3].attachment_json)"/>
</div>
<div v-if="classCulture[4]"
style="position:absolute;display:inline-block;width: 85px;height: 60px; bottom: 0;left: 34%;">
<img-preview :imgObj="JSON.parse(classCulture[4].attachment_json)"/>
</div>
<div v-if="classCulture[5]"
style="position:absolute;display:inline-block;width: 85px;height: 60px; bottom: 0;right: 0;">
<img-preview :imgObj="JSON.parse(classCulture[5].attachment_json)"/>
</div>
</div>
</div>
<!--<a-row @click.native="nextP" v-if="classCulture.length != 0"-->
<!--style="cursor: pointer;width: 50px;height: 20px;margin-top: 10px;')"-->
<!--&gt;-->
<!--<a-col style="cursor: pointer;">-->
<!--<img src="../images/classCULtureNext.png" alt="" style="cursor: pointer;">-->
<!--</a-col>-->
<!--</a-row>-->
</a-col>
<!--时事新闻-->
<a-col :span="12" class="classManage-event">
@ -113,24 +141,27 @@
<div class="classManage-event-scroll">
<carousel-3d width="320" height="100" space="80">
<slide v-for="(slide, i) in carousel3dData" :index="i" :key="i">
<img :src="slide.src" alt="">
<img :src="slide" alt="">
<!--<img-preview :imgObj="slide"/>-->
</slide>
</carousel-3d>
</div>
<a-empty description="暂无数据" v-if="factualNewsEmpty" class="classManage-event-list-empty"/>
<div class="classManage-event-list">
<a-row v-for="(item,i) in factualNews" class="classManage-event-listRow" :key="i"
type="flex"
justify="center" align="middle" @click="showInfo(item)">
<a-col :span="1"
style="width: 5px;height: 5px;border-radius: 50%;background: #00FFFF"></a-col>
<a-col :span="17" offset="1"
style="overflow: hidden;white-space: nowrap; text-overflow: ellipsis;">
{{item.content}}
</a-col>
<a-col :span="5" style="color: #fff;margin-left: 5px;">{{item.date}}</a-col>
</a-row>
</div>
<vue-scroll :ops="listScroll" style="width: 100%;height:130px">
<div class="classManage-event-list">
<a-row v-for="(item,i) in factualNews" class="classManage-event-listRow" :key="i"
type="flex"
justify="center" align="middle" @click="showInfo(item)">
<a-col :span="1"
style="width: 5px;height: 5px;border-radius: 50%;background: #00FFFF;margin-right: 10px;"></a-col>
<a-col :span="17"
style="overflow: hidden;white-space: nowrap; text-overflow: ellipsis;width: 200px;">
{{item.info_title}}
</a-col>
<a-col :span="5" style="color: #fff;margin-left: 5px;">{{item.create_time}}</a-col>
</a-row>
</div>
</vue-scroll>
</a-col>
</a-row>
</div>
@ -144,6 +175,9 @@
import {Carousel, Table, Row, Col, Empty, Spin} from 'ant-design-vue';
import {Carousel3d, Slide} from 'vue-carousel-3d'
import CommonInfo from '../../../common/centerCommonInfo.vue'
import ImgPreview from '../../../common/imgPreview.vue';
import BaseConfig from "../../../../../global-llibs/base-config";
export default {
data() {
return {
@ -231,11 +265,11 @@
],
//
carousel3dData: [
{src: require('../images/newsPic1.png')},
{src: require('../images/newsPic2.png')},
{src: require('../images/newsPic3.png')},
{src: require('../images/newsPic4.png')},
{src: require('../images/newsPic5.png')},
// {src: require('../images/newsPic1.png')},
// {src: require('../images/newsPic2.png')},
// {src: require('../images/newsPic3.png')},
// {src: require('../images/newsPic4.png')},
// {src: require('../images/newsPic5.png')},
],
swiperOption: {
speed: 400,
@ -374,8 +408,12 @@
"access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
"query": {
"query_id": "query_deyu_wenhua",
// "query_param": [
// this.BaseConfig.person_info_my.bureau_id + ""
// ]
"query_param": [
this.BaseConfig.person_info_my.bureau_id + ""
//this.BaseConfig.person_info_my.bureau_id + ""
"900008135"
]
},
"query_cache": 0,
@ -388,12 +426,26 @@
params: param,
method: "post",
}], (result) => {
// console.log('', result)
this.spinning = false;
if (result[0].data.result.length != 0) {
this.classCulture = JSON.parse(result[0].data.result)
let res = JSON.parse(result[0].data.result)
if (res.length != 0) {
res.forEach(item => {
item.attachment_json = item.attachment_json.substr(1)
})
this.classCulture = res
} else {
this.classCultureEmpty = true
}
// if (result[0].data.result.length != 0) {
// this.classCulture = JSON.parse(result[0].data.result)
// this.classCulture.forEach(item => {
// item.attachment_json = JSOn.parse(item.attachment_json)
// })
// } else {
// this.classCultureEmpty = true
// }
})
},
//
@ -402,8 +454,12 @@
"access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
"query": {
"query_id": "query_deyu_xinwen",
// "query_param": [
// this.BaseConfig.person_info_my.bureau_id + ""
// ]
"query_param": [
this.BaseConfig.person_info_my.bureau_id + ""
//this.BaseConfig.person_info_my.bureau_id + ""
"900008135"
]
},
"query_cache": 0,
@ -416,15 +472,28 @@
params: param,
method: "post",
}], (result) => {
this.spinning = false;
// console.log('', result)
if (result[0].data.result.length != 0) {
this.factualNews = JSON.parse(result[0].data.result)
let res = JSON.parse(result[0].data.result)
res.forEach(item => {
item.create_time = item.create_time.substr(0, 10)
// this.carousel3dData.push(JSON.parse(item.cover_json)[0])
// console.log('JSON.parse', JSON.parse(item.cover_json))
this.carousel3dData.push('https://www.edusoa.com/dsideal_yy' + this.BaseConfig.url_path_down + JSON.parse(item.cover_json)[0].key)
})
this.factualNews = res
// this.BaseConfig.url_path_down + this.img.key;
// console.log('this.carousel3dData', this.carousel3dData)
// this.carousel3dData.forEach(item => {
// item = require(item)
// })
} else {
this.factualNewsEmpty = true
}
this.spinning = false;
})
},
showInfo(item){
showInfo(item) {
let param = {
"access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
"query": {
@ -461,7 +530,7 @@
}
})
},
closeInfo(){
closeInfo() {
this.infoId = "";
this.visible = false
}
@ -478,6 +547,7 @@
Carousel3d,
Slide,
CommonInfo,
ImgPreview,
}
}
</script>
@ -703,7 +773,7 @@
}
.classManage-event-list {
height: 110px;
height: 130px;
.classManage-event-listRow {
font-size: 12px;

Loading…
Cancel
Save