diff --git a/public/index.html b/public/index.html
index cc97211..36c495d 100644
--- a/public/index.html
+++ b/public/index.html
@@ -9,7 +9,7 @@
diff --git a/src/global-llibs/axios-config.js b/src/global-llibs/axios-config.js
index d6efb73..946edd7 100644
--- a/src/global-llibs/axios-config.js
+++ b/src/global-llibs/axios-config.js
@@ -8,10 +8,14 @@ function getContextHtmlPath (){//获取桶名信息
if (result != "/dsideal_yy") {
result = pathName.substr(0, 0);
}
- console.log("result:",result)
return result;
}
axios.defaults.baseURL = getContextHtmlPath();
+//axios.defaults.baseURL = '/dsideal_yy/'
+axios.defaults.timeout = 800000
+axios.defaults.withCredentials = false
+// axios.defaults.headers['Content-Type'] = 'application/json;charset=UTF-8';
+//axios.defaults.headers["Access-Control-Allow-Origin-Type"] = "*";
function createRandomNum(){
let random_num = 0;
@@ -60,7 +64,7 @@ export default {
let result = arguments[i].data;
if (result.code && result.code !== 2000){
Modal.warning({
- title:"接口调用错误",
+ title:"提示",
content:result.code === 5000?"请联系管理员":result.msg,
centered:true
})
diff --git a/src/global-llibs/base-config.js b/src/global-llibs/base-config.js
index dd71cfc..edc0a23 100644
--- a/src/global-llibs/base-config.js
+++ b/src/global-llibs/base-config.js
@@ -267,6 +267,7 @@ const ConfigFn = {
//素材服务器IP地址
// BaseConfig.url_path_down = "http://dsideal-yy.oss-cn-qingdao.aliyuncs.com/";
BaseConfig.url_path_down = window.location.protocol + "//video.edusoa.com/";
+
//资源上传地址
// BaseConfig.url_path = "http://dsideal-yy.oss-cn-qingdao.aliyuncs.com";
BaseConfig.url_path = "https://dsideal.obs.cn-north-1.myhuaweicloud.com";
diff --git a/src/global-llibs/dataex-report-axios.js b/src/global-llibs/dataex-report-axios.js
index 3494cac..ecd299e 100644
--- a/src/global-llibs/dataex-report-axios.js
+++ b/src/global-llibs/dataex-report-axios.js
@@ -65,7 +65,7 @@ export default {
let result = arguments[i].data;
if (!result.success){
Modal.warning({
- title:"接口调用错误",
+ title:"提示",
content:result.message,
centered:true
})
diff --git a/src/global-llibs/staticParams.js b/src/global-llibs/staticParams.js
index e49e988..6c11181 100644
--- a/src/global-llibs/staticParams.js
+++ b/src/global-llibs/staticParams.js
@@ -74,6 +74,7 @@ if (document.body.clientWidth > document.body.clientHeight) {
StaticParams.selectPanelContainer = null;
StaticParams.scrollOption = {
+ sizeStrategy:"percent",
vuescroll: {},
scrollPanel: {},
rail: {
@@ -679,8 +680,12 @@ StaticParams.closePopModal = (com) => {
* 不通过上传组件上传文件
* file 要上传的文件
* callback (result)=>{} 上传完毕后的回调函数 result:{success:boolean,data:{}} success为true是上传成功false上传失败 data 返回的信息
+* insert:是否调插入资源表接口 默认true
* */
-StaticParams.uploadFile = (file, callback = null) => {
+StaticParams.uploadFile = (file, callback = null,insert = true) => {
+ console.log("file:",file)
+ console.log("callback:",callback)
+ console.log("insert:",insert)
let split = file.name.split('.');
let guid = GUID_UUID.guid();
let key = BaseConfig.url_path_suffix + guid.substring(0, 2) + "/" + guid + "." + split[1]
@@ -712,7 +717,12 @@ StaticParams.uploadFile = (file, callback = null) => {
},
}).then((rsp) => {
//rsp云上传这里传的值和局上传不一样
- StaticParams.insertResource(rsp, file, guid, split[0], split[1], callback)
+ console.log("insert111:",insert)
+ if(insert === true){
+ StaticParams.insertResource(rsp, file, guid, split[0], split[1], callback)
+ }else {
+ callback({ success: true, data: rsp })
+ }
}).catch((error) => {
if (callback) {
callback({ success: false, data: error })
@@ -738,7 +748,11 @@ StaticParams.uploadFile = (file, callback = null) => {
'Content-Type': 'multipart/form-data;boundary=' + new Date().getTime(),
},
}).then((rsp) => {
- StaticParams.insertResource(rsp.data, file, guid, split[0], split[1], callback)
+ if(insert === true){
+ StaticParams.insertResource(rsp.data, file, guid, split[0], split[1], callback)
+ }else {
+ callback({ success: true, data: rsp })
+ }
}).catch((error) => {
if (callback) {
callback({ success: false, data: error })
diff --git a/src/views/screenAdaptation/pages/adminCenter/AccessSubsystem.vue b/src/views/screenAdaptation/pages/adminCenter/AccessSubsystem.vue
index fe4b053..e52db7a 100644
--- a/src/views/screenAdaptation/pages/adminCenter/AccessSubsystem.vue
+++ b/src/views/screenAdaptation/pages/adminCenter/AccessSubsystem.vue
@@ -38,9 +38,24 @@
beforeRouteEnter(to, from, next) {
//to.query.oneLevel = 'newsInformation_two';
//store存储query到本地 防止页面刷新后 query丢失问题
+ //console.log("to:",to)
next(vm => {
vm.$store.commit('userStore/setQueryStore', to.query);
})
+// console.log("to:",to)
+//
+// let queryStore = vm.$store.state.userStore.query;
+// console.log("queryStore:",queryStore)
+// if(queryStore){
+// console.log("keys",Object.keys(queryStore))
+// let keys = Object.keys(queryStore);
+// if(keys && keys.length > 0){
+// for(let i = 0,len = keys.length;i < len;i ++){
+// to.query[keys[i]] = queryStore[keys[i]];
+// }
+// }
+// }
+ //console.log("重组后的toquery:",to.query)
if (to.query.oneLevel) {
oneLevel = to.query.oneLevel;
} else {
diff --git a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/news/viewNews.vue b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/news/viewNews.vue
index 335b568..b21a64e 100644
--- a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/news/viewNews.vue
+++ b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/news/viewNews.vue
@@ -113,7 +113,11 @@
let thumbnail = newsList[i].thumbnail;
let src = "";
if(thumbnail && thumbnail.length > 0){
- src = StaticParams.getThumbUrl(JSON.parse(thumbnail)[0].file_id +"."+JSON.parse(thumbnail)[0].resource_format,100,100,100);
+ if(thumbnail[0].indexOf("http") === 0){
+ src = thumbnail[0]
+ }else{
+ src = StaticParams.getThumbUrl(JSON.parse(thumbnail)[0].file_id +"."+JSON.parse(thumbnail)[0].resource_format,100,100,100);
+ }
if(this.BaseConfig.pt_type + "" === "1"){
src = src.substring(0, src.indexOf("?"))
}else{
diff --git a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/news/viewNewsLarge.vue b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/news/viewNewsLarge.vue
index 4174ec2..77a26ca 100644
--- a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/news/viewNewsLarge.vue
+++ b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/news/viewNewsLarge.vue
@@ -116,7 +116,11 @@
let thumbnail = item.thumbnail;
let src = "";
if (thumbnail && thumbnail.length > 0 && thumbnail !== '0') {
- src = StaticParams.getThumbUrl(JSON.parse(thumbnail)[0].file_id + "." + JSON.parse(thumbnail)[0].resource_format, 100, 100, 100);
+ if(thumbnail[0].indexOf("http") === 0){
+ src = thumbnail[0]
+ }else {
+ src = StaticParams.getThumbUrl(JSON.parse(thumbnail)[0].file_id + "." + JSON.parse(thumbnail)[0].resource_format, 100, 100, 100);
+ }
if(this.BaseConfig.pt_type + "" === "1"){
src = src.substring(0, src.indexOf("?"))
}else{
diff --git a/src/views/screenAdaptation/pages/homePages/menuTop/personMsgModal.vue b/src/views/screenAdaptation/pages/homePages/menuTop/personMsgModal.vue
index 41d4348..4d6fa09 100644
--- a/src/views/screenAdaptation/pages/homePages/menuTop/personMsgModal.vue
+++ b/src/views/screenAdaptation/pages/homePages/menuTop/personMsgModal.vue
@@ -50,22 +50,20 @@
证件照信息
-
-
-
修改证件照
-
-
-
-
+
修改证件照
+
保存证件照
+
+
+
@@ -75,14 +73,30 @@
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'
import StaticParams from '../../../../../global-llibs/staticParams';
-
+ import IDPhoto from '../../../../teacherInfo/fieldComponent/IDPhoto.vue'
+ import ModalPanel from '../../../../../components/common/modal/ModalPanel';
+ import ImgCropper from '../../../../../components/common/imgCropper/ImgCropper';
export default {
name: "PersonMsgModal",
props: ['login_name', 'person_name', 'identity', 'bureau_name', 'district_name', 'id_number', 'TEL', 'visible'],
data() {
return {
+ destroyOnClose: false,
+ show:false,
+ photoTitle:"",
+ option: {
+ img: "",
+ outputType: 'png',
+ autoCrop: true,
+ autoCropWidth: 99,
+ autoCropHeight: 139,
+ full: false,
+ fixedBox: true,
+ original: true,
+ centerBox: true,
+ maxImgSize: 500,
+ },
bodyStyle: {
background: '#01366B !important',
},
@@ -97,6 +111,8 @@
imgSrc: '',
modifyPhotoObj: {},
idPhotoJson: {},
+ idPhotoUrl:'',
+ fileSize:""
}
},
watch: {
@@ -114,8 +130,10 @@
AIcon: Icon,
AUpload: Upload,
// AMessage: message,
- Uploader,
ImgPreview,
+ IDPhoto,
+ ModalPanel,
+ ImgCropper
},
created() {
this.uploadComplete()
@@ -124,6 +142,31 @@
this.getPersonTx()
},
methods: {
+ onShowCropper: function () {
+ this.show = true;
+ },
+ onCallback: function ([type]) {
+ if (type === 'ok'){
+ this.destroyOnClose = false;
+// if (this.$refs.cropper.file){
+// this.spinning = true;
+// }
+ this.$refs.cropper.getFile((file)=>{
+ // this.data.props.imgFile = file
+ if(this.$refs.cropper.file){
+ StaticParams.uploadFile(file,(data)=>{
+ if (data.success === true){
+ this.idPhotoUrl = this.BaseConfig.url_path_down + data.data.data.url;
+ this.fileSize = data.data.data.file_size;
+ }
+ },false)//不插入资源库
+ }
+ });
+ }else{
+ this.destroyOnClose = true;
+ }
+ this.show = false;
+ },
cancelModal() {
this.$emit('cancelModal')
},
@@ -172,22 +215,31 @@
method: InterConfig.getModifyPhoto.method,
isTestLogin: InterConfig.getModifyPhoto.isTestLogin,
}], (result) => {
- if (result[0].data.code === 2000 && result[0].data.id_photo_json !== "") {
- this.modifyPhotoObj = JSON.parse(result[0].data.id_photo_json)
+ let res = result[0].data;
+ if (res.code === 2000) {
+ let file = res.data.id_photo_json;
+ console.log("file",file)
+ console.log("JSON.parse(file)",JSON.parse(file))
+ if(file && file !== ""){
+ this.idPhotoUrl = JSON.parse(file).url;
+ this.fileSize = JSON.parse(file).file_size;
+ this.option.img = this.idPhotoUrl;
+ }
+ console.log("idPhotoUrl:",this.idPhotoUrl)
+ console.log("fileSize:",this.fileSize)
}
})
},
- //修改证件照
- savePersonIDPhoto(val) {
- // let targetUrl = val.file//List[val.fileList.length - 1]
- // this.$refs.modifyPhoto.src = targetUrl.thumbUrl
- console.log('val', val)
- // if (val.file.percent === 100 && val.event) {
+ //保存证件照
+ saveIdPhoto:function () {
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
- id_photo_json: val.file,
+ id_photo_json: JSON.stringify({
+ file_size:this.fileSize,
+ url:this.idPhotoUrl
+ }),
}
this.InterfaceConfig.callInterface([{
url: InterConfig.savePersonIDPhoto.url,
@@ -195,22 +247,12 @@
method: InterConfig.savePersonIDPhoto.method,
isTestLogin: InterConfig.savePersonIDPhoto.isTestLogin,
}], (result) => {
- console.log('修改证件照', param)
- // if (result[0].data.code === 2000 && val.file.percent === 100 && !val.event) {
if (result[0].data.code === 2000) {
message.success('修改成功')
- } else if (result[0].data.code !== 2000) {
+ } else {
message.error('修改失败')
}
})
- // }
- // let param = {
- // name: this.name,
- // key: this.key,
- // chunk: 0,
- // chunks: 1,
- // file: this.file,
- // }
},
//获取头像信息
getPersonTx() {
@@ -266,6 +308,28 @@