diff --git a/public/js/config.js b/public/js/config.js
index 93f5448a..9210af6b 100644
--- a/public/js/config.js
+++ b/public/js/config.js
@@ -18,7 +18,7 @@ var PROJECT = {
}
-var PROJECT_TYPE = PROJECT.online_zjsj
+var PROJECT_TYPE = PROJECT.local_test
var headerShow = true; // 是否显示头部
var tabsShow = true; // 是否显示tabs
diff --git a/src/store/index.js b/src/store/index.js
index ddf9e6f0..94f56cab 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -45,8 +45,8 @@ export default new Vuex.Store({
// UPLOADURL:'http://10.0.1.43:6023/upload/image',//测试
// FILEURL:'http://10.0.1.43:6023/image/',//测试
BASEURL: baseUrl ? baseUrl : window.location.protocol + '//' + window.location.host + '/', //
- UPLOADURL: window.location.protocol + '//' + window.location.host + '/upload/image', //
- FILEURL: window.location.protocol + '//' + window.location.host + '/image/', //测试 // tag: 本地测试接口
+ // UPLOADURL: window.location.protocol + '//' + window.location.host + '/upload/image', //
+ // FILEURL: window.location.protocol + '//' + window.location.host + '/image/', //测试 // tag: 本地测试接口
/* 2022-05-16 */
// tag: 部署河南项目时,需要打开这两行代码
// UPLOADURL: 'http://139.9.66.234:6324/upload/image',
@@ -56,8 +56,8 @@ export default new Vuex.Store({
// UPLOADURL: 'http://182.90.224.237:7000/upload/image',
// FILEURL: 'http://182.90.224.237:7000/image/',
// 邱平毅的
- // UPLOADURL: 'http://192.168.34.116:6023/upload/image',
- // FILEURL: 'http://192.168.34.116:6023/image/',
+ UPLOADURL: 'http://192.168.34.116:6023/upload/image',
+ FILEURL: 'http://192.168.34.116:6023/image/',
// UPLOADURL: 'http://124.71.67.160:8088/upload/image',
// FILEURL: 'http://124.71.67.160:8088/image/',
diff --git a/src/views/projectFront/projectSummary/cooperatorDatails.vue b/src/views/projectFront/projectSummary/cooperatorDatails.vue
index 84d7d90a..8ece5954 100644
--- a/src/views/projectFront/projectSummary/cooperatorDatails.vue
+++ b/src/views/projectFront/projectSummary/cooperatorDatails.vue
@@ -89,22 +89,32 @@
:label="$t('message.cooperationUnit.aptitudeFile')"
>
-
-
- {{ matchResult ? "" : url.substr(fileUrl.length) }}
-
+
+
+
@@ -491,7 +503,7 @@ export default {
// 新增企业资质
addQualification() {
this.$refs.qualificationForm.validate((valid) => {
- console.log(this.qualificationForm);
+ console.log('新增的参数',this.qualificationForm);
if (valid) {
let data = this.qualificationForm;
(data.enterpriseId = this.$props.projectEnterpriseId),
@@ -546,7 +558,9 @@ export default {
},
// 资质文件上传成功
handleSuccess(file) {
+ console.log('上传成功放回的值',file)
let data = { name: file.data[0].filename, url: file.data[0].imageUrl };
+ // let data = { name: file.data[0].fileInfo.attr.originalFilename, url: file.data[0].imageUrl };
this.fileList.push(data);
this.qualificationForm.fileUrl =
this.fileList.length > 0 ? JSON.stringify(this.fileList) : "";
@@ -564,6 +578,23 @@ export default {
}
console.log(this.fileList);
},
+ // 判断上传的是否为图片
+ handleBeforeUpload(file) {
+ var img = file.name.substring(file.name.lastIndexOf('.') + 1)
+ const suffix = img === 'jpg'
+ const suffix2 = img === 'png'
+ const suffix3 = img === 'jpeg'
+ const isLt1M = file.size / 1024 / 1024 < 1;
+ if (!suffix && !suffix2 && !suffix3) {
+ this.$message.error("只能上传图片!");
+ return false
+ }
+ // 可以限制图片的大小
+ if (!isLt1M) {
+ this.$message.error('上传图片大小不能超过 1MB!');
+ }
+ return suffix || suffix2 || suffix3
+ },
//截取图片地址
getUrl(url, type) {
@@ -576,16 +607,32 @@ export default {
showArr.push(this.fileUrl + showUrl);
}
return showArr;
- } else {
- let arr = JSON.parse(JSON.stringify(url));
- this.matchResult = arr.match("(.+?).(png|jpg|gif)");
- arr = arr.split(",");
+ } else if(type == 2) {
+ let arr = JSON.parse(url);
+ // this.matchResult = arr.match("(.+?).(png|jpg|gif)");
+ // console.log('this.matchResult',this.matchResult)
+ // arr = arr.split(",");
let showArr = [];
- for (let i = 0; i < JSON.parse(arr).length; i++) {
- let showUrl = JSON.parse(arr)[i].url;
- showArr.push(this.fileUrl + showUrl);
- }
+ showArr = arr.map((item)=>{
+ let showUrl = item.url
+ let showArray = []
+ showArray.push(this.fileUrl + showUrl);
+ return showArray
+ })
return showArr;
+
+ // for (let i = 0; i < arr.length; i++) {
+ // let showUrl = arr[i].url;
+ // // showArr.push(this.fileUrl + showUrl);
+ // let a = showUrl.split(".")[1]
+ // if( a === 'png'|| a === 'jpg' || a ==='gif'){
+ // showArr.push(this.fileUrl + showUrl);
+ // }else{
+ // this.matchResult = showUrl
+ // }
+ // }
+ // console.log('showArr',showArr)
+
}
},