头像、班级管理

init
zhusiyu 3 years ago
parent 39b1952f46
commit 3737731de6

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

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

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

Loading…
Cancel
Save