项目基本信息管理
项目总览 消息 17512009894 公司管理员
This commit is contained in:
parent
bd78ce9184
commit
e0b13afdaf
@ -18,7 +18,7 @@ var PROJECT = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var PROJECT_TYPE = PROJECT.online_zjsj
|
var PROJECT_TYPE = PROJECT.local_test
|
||||||
|
|
||||||
var headerShow = true; // 是否显示头部
|
var headerShow = true; // 是否显示头部
|
||||||
var tabsShow = true; // 是否显示tabs
|
var tabsShow = true; // 是否显示tabs
|
||||||
|
|||||||
@ -45,8 +45,8 @@ export default new Vuex.Store({
|
|||||||
// UPLOADURL:'http://10.0.1.43:6023/upload/image',//测试
|
// UPLOADURL:'http://10.0.1.43:6023/upload/image',//测试
|
||||||
// FILEURL:'http://10.0.1.43:6023/image/',//测试
|
// FILEURL:'http://10.0.1.43:6023/image/',//测试
|
||||||
BASEURL: baseUrl ? baseUrl : window.location.protocol + '//' + window.location.host + '/', //
|
BASEURL: baseUrl ? baseUrl : window.location.protocol + '//' + window.location.host + '/', //
|
||||||
UPLOADURL: window.location.protocol + '//' + window.location.host + '/upload/image', //
|
// UPLOADURL: window.location.protocol + '//' + window.location.host + '/upload/image', //
|
||||||
FILEURL: window.location.protocol + '//' + window.location.host + '/image/', //测试 // tag: 本地测试接口
|
// FILEURL: window.location.protocol + '//' + window.location.host + '/image/', //测试 // tag: 本地测试接口
|
||||||
/* 2022-05-16 */
|
/* 2022-05-16 */
|
||||||
// tag: 部署河南项目时,需要打开这两行代码
|
// tag: 部署河南项目时,需要打开这两行代码
|
||||||
// UPLOADURL: 'http://139.9.66.234:6324/upload/image',
|
// 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',
|
// UPLOADURL: 'http://182.90.224.237:7000/upload/image',
|
||||||
// FILEURL: 'http://182.90.224.237:7000/image/',
|
// FILEURL: 'http://182.90.224.237:7000/image/',
|
||||||
// 邱平毅的
|
// 邱平毅的
|
||||||
// UPLOADURL: 'http://192.168.34.116:6023/upload/image',
|
UPLOADURL: 'http://192.168.34.116:6023/upload/image',
|
||||||
// FILEURL: 'http://192.168.34.116:6023/image/',
|
FILEURL: 'http://192.168.34.116:6023/image/',
|
||||||
// UPLOADURL: 'http://124.71.67.160:8088/upload/image',
|
// UPLOADURL: 'http://124.71.67.160:8088/upload/image',
|
||||||
// FILEURL: 'http://124.71.67.160:8088/image/',
|
// FILEURL: 'http://124.71.67.160:8088/image/',
|
||||||
|
|
||||||
|
|||||||
@ -89,22 +89,32 @@
|
|||||||
:label="$t('message.cooperationUnit.aptitudeFile')"
|
:label="$t('message.cooperationUnit.aptitudeFile')"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<a
|
<img
|
||||||
:href="url"
|
v-for="(url,index) in getUrl(scope.row.fileUrl, 2)"
|
||||||
download
|
:key="index"
|
||||||
v-for="url in getUrl(scope.row.fileUrl, 2)"
|
:src="url[index]"
|
||||||
:key="url"
|
|
||||||
target="blank"
|
|
||||||
class="qualificationHref"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
v-if="scope.row.fileUrl && matchResult"
|
|
||||||
:key="url"
|
|
||||||
:src="url"
|
|
||||||
class="showImg"
|
class="showImg"
|
||||||
|
@click="
|
||||||
|
bigImageDialog = true;
|
||||||
|
bigImageUrl = url[index];
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
{{ matchResult ? "" : url.substr(fileUrl.length) }}
|
<!-- <a
|
||||||
</a>
|
:href="url[index]"
|
||||||
|
download
|
||||||
|
v-for="(url,index) in getUrl(scope.row.fileUrl, 2)"
|
||||||
|
:key="index"
|
||||||
|
target="self"
|
||||||
|
class="qualificationHref"
|
||||||
|
> -->
|
||||||
|
<!-- <img
|
||||||
|
v-if="scope.row.fileUrl && matchResult"
|
||||||
|
:key="index"
|
||||||
|
:src="url[index]"
|
||||||
|
class="showImg"
|
||||||
|
/> -->
|
||||||
|
<!-- {{ matchResult ? "" : url[index]}}
|
||||||
|
</a> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -149,8 +159,10 @@
|
|||||||
:on-preview="showImgBtn"
|
:on-preview="showImgBtn"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
:on-success="handleSuccess"
|
:on-success="handleSuccess"
|
||||||
multiple
|
accept="image/jpg,image/jpeg,image/png"
|
||||||
|
:before-upload="handleBeforeUpload"
|
||||||
name="files"
|
name="files"
|
||||||
|
multiple
|
||||||
ref="upload"
|
ref="upload"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
>
|
>
|
||||||
@ -491,7 +503,7 @@ export default {
|
|||||||
// 新增企业资质
|
// 新增企业资质
|
||||||
addQualification() {
|
addQualification() {
|
||||||
this.$refs.qualificationForm.validate((valid) => {
|
this.$refs.qualificationForm.validate((valid) => {
|
||||||
console.log(this.qualificationForm);
|
console.log('新增的参数',this.qualificationForm);
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let data = this.qualificationForm;
|
let data = this.qualificationForm;
|
||||||
(data.enterpriseId = this.$props.projectEnterpriseId),
|
(data.enterpriseId = this.$props.projectEnterpriseId),
|
||||||
@ -546,7 +558,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 资质文件上传成功
|
// 资质文件上传成功
|
||||||
handleSuccess(file) {
|
handleSuccess(file) {
|
||||||
|
console.log('上传成功放回的值',file)
|
||||||
let data = { name: file.data[0].filename, url: file.data[0].imageUrl };
|
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.fileList.push(data);
|
||||||
this.qualificationForm.fileUrl =
|
this.qualificationForm.fileUrl =
|
||||||
this.fileList.length > 0 ? JSON.stringify(this.fileList) : "";
|
this.fileList.length > 0 ? JSON.stringify(this.fileList) : "";
|
||||||
@ -564,6 +578,23 @@ export default {
|
|||||||
}
|
}
|
||||||
console.log(this.fileList);
|
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) {
|
getUrl(url, type) {
|
||||||
@ -576,16 +607,32 @@ export default {
|
|||||||
showArr.push(this.fileUrl + showUrl);
|
showArr.push(this.fileUrl + showUrl);
|
||||||
}
|
}
|
||||||
return showArr;
|
return showArr;
|
||||||
} else {
|
} else if(type == 2) {
|
||||||
let arr = JSON.parse(JSON.stringify(url));
|
let arr = JSON.parse(url);
|
||||||
this.matchResult = arr.match("(.+?).(png|jpg|gif)");
|
// this.matchResult = arr.match("(.+?).(png|jpg|gif)");
|
||||||
arr = arr.split(",");
|
// console.log('this.matchResult',this.matchResult)
|
||||||
|
// arr = arr.split(",");
|
||||||
let showArr = [];
|
let showArr = [];
|
||||||
for (let i = 0; i < JSON.parse(arr).length; i++) {
|
showArr = arr.map((item)=>{
|
||||||
let showUrl = JSON.parse(arr)[i].url;
|
let showUrl = item.url
|
||||||
showArr.push(this.fileUrl + showUrl);
|
let showArray = []
|
||||||
}
|
showArray.push(this.fileUrl + showUrl);
|
||||||
|
return showArray
|
||||||
|
})
|
||||||
return showArr;
|
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)
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user