Merge branch 'bjxz-dev' of http://139.9.66.234:18023/dhp/zhgdyun into bjxz-dev

This commit is contained in:
kun 2024-06-28 16:45:05 +08:00
commit 08bd8171a6
4 changed files with 267 additions and 134 deletions

View File

@ -183,7 +183,7 @@ if (process.env.NODE_ENV == "development") {
// axios.defaults.baseURL = 'http://125.88.207.86:8099/'//中建四局(沙湖)线上(最新)地址 // axios.defaults.baseURL = 'http://125.88.207.86:8099/'//中建四局(沙湖)线上(最新)地址
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:15551/'//测试地址 // axios.defaults.baseURL = 'http://jxj.zhgdyun.com:15551/'//测试地址
// axios.defaults.baseURL = 'http://47.93.215.234:9809/'//鞍钢正式地址(弃用) // axios.defaults.baseURL = 'http://47.93.215.234:9809/'//鞍钢正式地址(弃用)
// axios.defaults.baseURL = 'http://42.180.188.17:9809/'//鞍钢正式地址 // axios.defaults.baseURL = 'http://42.180.188.17:9809/' //鞍钢正式地址
// axios.defaults.baseURL = 'http://47.93.215.234:11211/'//鞍钢测试地址(弃用) // axios.defaults.baseURL = 'http://47.93.215.234:11211/'//鞍钢测试地址(弃用)
// axios.defaults.baseURL = 'http://42.180.188.17:11211/' //鞍钢测试地址 // axios.defaults.baseURL = 'http://42.180.188.17:11211/' //鞍钢测试地址
// axios.defaults.baseURL = 'http://8.136.222.164:8808/' //中科安信正式地址 // axios.defaults.baseURL = 'http://8.136.222.164:8808/' //中科安信正式地址

View File

@ -52,22 +52,21 @@ export default new Vuex.Store({
// FILEURL:'http://182.90.224.237:51234/image/', // FILEURL:'http://182.90.224.237:51234/image/',
// UPLOADURL: "http://http://192.168.34.155:19111/upload/image/", // 洁本地 // UPLOADURL: "http://http://192.168.34.155:19111/upload/image/", // 洁本地
// FILEURL: "http://http://192.168.34.155:19111/image/", //洁本地 // FILEURL: "http://http://192.168.34.155:19111/image/", //洁本地
// UPLOADURL: 'http://192.168.34.221:9111/upload/image/', // 郭圣雄本地 UPLOADURL: 'http://192.168.34.221:9111/upload/image/', // 郭圣雄本地
// FILEURL: 'http://192.168.34.221:9111/image/', //郭圣雄本地 FILEURL: 'http://192.168.34.221:9111/image/', //郭圣雄本地
// WORKFLOWURL: "http://192.168.34.138:88/#/workspace/forms", //坤工作流地址(本地) // WORKFLOWURL: "http://192.168.34.138:88/#/workspace/forms", //坤工作流地址(本地)
// WORKFLOWURL: "http://192.168.34.129:88/#/workspace/forms", //罗峰工作流地址(本地) WORKFLOWURL: "http://192.168.34.129:88/#/workspace/forms", //罗峰工作流地址(本地)
// UPLOADURL:'http://182.90.224.237:51234/upload/image/',// 郭圣雄远程 // UPLOADURL:'http://182.90.224.237:51234/upload/image/',// 郭圣雄远程
// FILEURL:'http://182.90.224.237:51234/image/',//郭圣雄远程 // FILEURL:'http://182.90.224.237:51234/image/',//郭圣雄远程
// UPLOADURL:'http://42.180.188.17:11211/upload/image',//测试 // UPLOADURL: 'http://42.180.188.17:11211/upload/image', //测试
// FILEURL:'http://42.180.188.17:11211/image/',//测试 // FILEURL: 'http://42.180.188.17:11211/image/', //测试
BASEURL: baseUrl ? // BASEURL: baseUrl ?
baseUrl : // baseUrl : window.location.protocol + "//" + window.location.host + "/", //正式环境
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/", //正式环境
FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境
// // WORKFLOWURL: 'http://47.93.215.234:19998/#/workspace/forms',//鞍钢平台工作流地址(弃用) // // WORKFLOWURL: 'http://47.93.215.234:19998/#/workspace/forms',//鞍钢平台工作流地址(弃用)
// // WORKFLOWURL: 'http://47.93.215.234:19098/#/workspace/forms',//鞍钢测试平台工作流地址(弃用) // // WORKFLOWURL: 'http://47.93.215.234:19098/#/workspace/forms',//鞍钢测试平台工作流地址(弃用)
// WORKFLOWURL: 'http://42.180.188.17:19998/#/workspace/forms',//鞍钢平台工作流地址 // WORKFLOWURL: 'http://42.180.188.17:19998/#/workspace/forms', //鞍钢平台工作流地址
// WORKFLOWURL: "http://42.180.188.17:19098/#/workspace/forms", //鞍钢测试平台工作流地址 // WORKFLOWURL: "http://42.180.188.17:19098/#/workspace/forms", //鞍钢测试平台工作流地址
//--------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------
// BASEURL: baseUrl // BASEURL: baseUrl

View File

@ -59,7 +59,7 @@
</div> </div>
<div class="table_wrap whiteBlock"> <div class="table_wrap whiteBlock">
<el-tabs <el-tabs
v-model="activeName" :value="activeName"
@tab-click="handleClick" @tab-click="handleClick"
style="padding: 0 15px" style="padding: 0 15px"
> >
@ -68,6 +68,7 @@
<el-tab-pane label="人员照片" name="3"></el-tab-pane> <el-tab-pane label="人员照片" name="3"></el-tab-pane>
<el-tab-pane label="车辆信息" name="4"></el-tab-pane> <el-tab-pane label="车辆信息" name="4"></el-tab-pane>
</el-tabs> </el-tabs>
<!-- v-loading="loading" -->
<el-table <el-table
ref="multipleTable" ref="multipleTable"
class="tables" class="tables"
@ -163,6 +164,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- -->
<el-pagination <el-pagination
class="pagerBox" class="pagerBox"
@size-change="sizeChange" @size-change="sizeChange"
@ -205,6 +207,7 @@ export default {
pageSize: 10, pageSize: 10,
total: 0, total: 0,
}, },
loading: false,
tableList: [], tableList: [],
multipleSelection: [], multipleSelection: [],
topicName: "topic", topicName: "topic",
@ -257,7 +260,7 @@ export default {
}); });
// //
client.on("message", (topic, message) => { client.on("message", (topic, message) => {
console.log(message); // console.log(message);
this.getHikvisionPage(); this.getHikvisionPage();
}); });
// //
@ -276,7 +279,7 @@ export default {
return; return;
} }
console.log(this.multipleSelection); // console.log(this.multipleSelection);
const ids = this.multipleSelection.map((item) => item.id).join(","); const ids = this.multipleSelection.map((item) => item.id).join(",");
this.onHikvisionSync(ids); this.onHikvisionSync(ids);
}, },
@ -316,7 +319,7 @@ export default {
projectSn: this.projectSn, projectSn: this.projectSn,
type: Number(this.activeName), type: Number(this.activeName),
}).then((res) => { }).then((res) => {
console.log(res); // console.log(res);
if (res.code == 200) { if (res.code == 200) {
this.getHikvisionPage(); this.getHikvisionPage();
} else { } else {
@ -326,6 +329,8 @@ export default {
}, },
// //
getHikvisionPage() { getHikvisionPage() {
this.loading = true;
console.log(1111111111, this.activeName)
getHikvisionPageApi({ getHikvisionPageApi({
projectSn: this.projectSn, projectSn: this.projectSn,
pageNo: this.pagInfo.pageNo, pageNo: this.pagInfo.pageNo,
@ -346,6 +351,8 @@ export default {
} }
} }
} }
}).finally(() => {
this.loading = false;
}); });
}, },

View File

@ -30,7 +30,9 @@
<el-table-column prop="value" min-width="35%"> <el-table-column prop="value" min-width="35%">
<template slot-scope="scope"> <template slot-scope="scope">
<div <div
v-if="scope.row.value instanceof Array && scope.row.value.length > 0" v-if="
scope.row.value instanceof Array && scope.row.value.length > 0
"
class="showImg_wrap" class="showImg_wrap"
> >
<!-- <img <!-- <img
@ -48,7 +50,11 @@
/> />
</div> </div>
<div <div
v-else-if="scope.row.value && typeof(scope.row.value) == 'string' && scope.row.value.indexOf('http://') >= 0" v-else-if="
scope.row.value &&
typeof scope.row.value == 'string' &&
scope.row.value.indexOf('http://') >= 0
"
class="showImg_wrap" class="showImg_wrap"
> >
<!-- <img <!-- <img
@ -74,7 +80,10 @@
<el-table-column prop="value2" min-width="35%"> <el-table-column prop="value2" min-width="35%">
<template slot-scope="scope"> <template slot-scope="scope">
<div <div
v-if="scope.row.value2 instanceof Array && scope.row.value2.length > 0" v-if="
scope.row.value2 instanceof Array &&
scope.row.value2.length > 0
"
class="showImg_wrap" class="showImg_wrap"
> >
<!-- <img <!-- <img
@ -92,7 +101,11 @@
/> />
</div> </div>
<div <div
v-else-if="scope.row.value2 && typeof(scope.row.value2) == 'string' && scope.row.value2.indexOf('http://') >= 0" v-else-if="
scope.row.value2 &&
typeof scope.row.value2 == 'string' &&
scope.row.value2.indexOf('http://') >= 0
"
class="showImg_wrap" class="showImg_wrap"
> >
<!-- <img <!-- <img
@ -123,10 +136,13 @@
type="primary" type="primary"
size="medium" size="medium"
@click="addBtn(1)" @click="addBtn(1)"
v-permission="{key: 'hzdw_add_qualifications', menuPath: '/project/summary/cooperationUnit'}" v-permission="{
key: 'hzdw_add_qualifications',
menuPath: '/project/summary/cooperationUnit',
}"
>新增</el-button >新增</el-button
> >
<vue-scroll style="height: 600px">
<el-table <el-table
:data="qualificationList" :data="qualificationList"
stripe stripe
@ -166,14 +182,38 @@
bigImageUrl = url[index]; bigImageUrl = url[index];
" "
/> --> /> -->
<!-- <div
v-for="item in scope.row.fileUrl && JSON.parse(scope.row.fileUrl)"
:key="index"
>
</div> -->
<a
v-if="!scope.row.flag"
:href="scope.row.fileUrl"
:download="scope.row.fileNameNew.substring(0, scope.row.fileNameNew.indexOf('.'))"
target="self"
class="qualificationHref"
>{{ scope.row.fileNameNew }}</a
>
<img <img
v-else
:src="scope.row.fileUrl"
class="showImg"
@click="showImgBtn(scope.row.fileUrl)"
/>
<!-- <img
v-else
:src="scope.row.fileUrl" :src="scope.row.fileUrl"
class="showImg" class="showImg"
@click=" @click="
bigImageDialog = true; bigImageDialog = true;
bigImageUrl = scope.row.fileUrl; bigImageUrl = scope.row.fileUrl;
" "
/> /> -->
<!-- <a <!-- <a
:href="url[index]" :href="url[index]"
download download
@ -198,6 +238,7 @@
> >
</el-table-column> </el-table-column>
</el-table> </el-table>
</vue-scroll>
</div> </div>
<div class="qualificationDialog"> <div class="qualificationDialog">
<el-dialog <el-dialog
@ -220,27 +261,25 @@
autocomplete="off" autocomplete="off"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="资质文件编号" prop="fileNumber">
label="资质文件编号"
prop="fileNumber"
>
<el-input <el-input
v-model="qualificationForm.fileNumber" v-model="qualificationForm.fileNumber"
autocomplete="off" autocomplete="off"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上传资质文件" prop="fileUrl"> <el-form-item label="上传资质文件" prop="fileUrl">
<!-- accept="image/jpg,image/jpeg,image/png" -->
<el-upload <el-upload
class="upload-demo" class="upload-demo"
:action="$store.state.UPLOADURL" :action="$store.state.UPLOADURL"
:on-preview="showImgBtn" :on-preview="showImgBtn"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-success="handleSuccess" :on-success="handleSuccess"
accept="image/jpg,image/jpeg,image/png"
:before-upload="handleBeforeUpload" :before-upload="handleBeforeUpload"
name="files" name="files"
multiple multiple
ref="upload" ref="upload"
:limit="1"
:file-list="fileList" :file-list="fileList"
> >
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary">点击上传</el-button>
@ -261,13 +300,17 @@
</div> </div>
<div v-show="activeIndex == '3'" class="content_wrap"> <div v-show="activeIndex == '3'" class="content_wrap">
<el-button <el-button
v-permission="{key: 'hzdw_add_bad', menuPath: '/project/summary/cooperationUnit'}" v-permission="{
key: 'hzdw_add_bad',
menuPath: '/project/summary/cooperationUnit',
}"
class="addBadRecordBtn" class="addBadRecordBtn"
type="primary" type="primary"
size="medium" size="medium"
@click="addBtn(2)" @click="addBtn(2)"
>新增</el-button >新增</el-button
> >
<vue-scroll style="height: 600px">
<el-table <el-table
:data="badRecordList" :data="badRecordList"
stripe stripe
@ -307,6 +350,7 @@
> >
</el-table-column> </el-table-column>
</el-table> </el-table>
</vue-scroll>
</div> </div>
<div class="badRecordDialog"> <div class="badRecordDialog">
<el-dialog <el-dialog
@ -381,11 +425,9 @@ import {
addEnterpriseBadRecord, addEnterpriseBadRecord,
} from "@/assets/js/api/cooperationUnit"; } from "@/assets/js/api/cooperationUnit";
import { import { getProjectDetail } from "@/assets/js/api/baseInfo.js";
getProjectDetail
} from '@/assets/js/api/baseInfo.js'
export default { export default {
props: ["detailId", "projectEnterpriseId","enterpriseSn"], props: ["detailId", "projectEnterpriseId", "enterpriseSn"],
data() { data() {
return { return {
activeIndex: "1", activeIndex: "1",
@ -432,7 +474,7 @@ export default {
{ required: true, message: "请选择发生时间", trigger: "blur" }, { required: true, message: "请选择发生时间", trigger: "blur" },
], ],
}, },
infoEnterpriseId: "" infoEnterpriseId: "",
}; };
}, },
created() { created() {
@ -455,13 +497,13 @@ export default {
} }
}, },
// //
getDataDateils(){ getDataDateils() {
getProjectDetail({ getProjectDetail({
projectSn: this.$props.enterpriseSn, projectSn: this.$props.enterpriseSn,
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
if(!res.result) return; if (!res.result) return;
console.log('~~~~~~~~~~~~~~~~~~~~',res) console.log("~~~~~~~~~~~~~~~~~~~~", res);
} }
}); });
}, },
@ -480,13 +522,20 @@ export default {
fieldName2: this.$t("message.laborMange.photosOfQualification"), fieldName2: this.$t("message.laborMange.photosOfQualification"),
value: res.result.enterpriseName, value: res.result.enterpriseName,
value2: value2:
res.result.enterpriseQualificationUrl && res.result.enterpriseQualificationUrl.split(',').length > 0? res.result.enterpriseQualificationUrl &&
res.result.enterpriseQualificationUrl.split(',').map(item => { res.result.enterpriseQualificationUrl.split(",").length > 0
? res.result.enterpriseQualificationUrl
.split(",")
.map((item) => {
return { return {
name: item.split('*')[0], name: item.split("*")[0],
url: this.$store.state.FILEURL + item.split('*')[1], url: this.$store.state.FILEURL + item.split("*")[1],
} };
}) : res.result.enterpriseQualificationUrl.indexOf('http://') >= 0 ? res.result.enterpriseQualificationUrl: res.result.enterpriseQualificationUrl, })
: res.result.enterpriseQualificationUrl.indexOf("http://") >=
0
? res.result.enterpriseQualificationUrl
: res.result.enterpriseQualificationUrl,
}, },
{ {
fieldName: this.$t("message.laborMange.formOfBusiness"), fieldName: this.$t("message.laborMange.formOfBusiness"),
@ -514,7 +563,9 @@ export default {
? this.$t("message.cooperationUnit.subpackage10") ? this.$t("message.cooperationUnit.subpackage10")
: res.result.enterpriseTypeId == 11 : res.result.enterpriseTypeId == 11
? this.$t("message.cooperationUnit.subpackage11") ? this.$t("message.cooperationUnit.subpackage11")
: res.result.enterpriseTypeId == 12 ? this.$t("message.cooperationUnit.subpackage12") : '', : res.result.enterpriseTypeId == 12
? this.$t("message.cooperationUnit.subpackage12")
: "",
value2: res.result.enterpriseLegalPerson, value2: res.result.enterpriseLegalPerson,
}, },
{ {
@ -551,7 +602,9 @@ export default {
fieldName: this.$t("message.laborMange.laborCertificateNo"), fieldName: this.$t("message.laborMange.laborCertificateNo"),
fieldName2: this.$t("message.laborMange.safetyProductionLicense"), fieldName2: this.$t("message.laborMange.safetyProductionLicense"),
value: res.result.qualificationNumber, value: res.result.qualificationNumber,
value2: res.result.enterpriseSafeAllow && res.result.enterpriseSafeAllow, value2:
res.result.enterpriseSafeAllow &&
res.result.enterpriseSafeAllow,
}, },
{ {
fieldName: this.$t("message.laborMange.natureOfUnit"), fieldName: this.$t("message.laborMange.natureOfUnit"),
@ -564,12 +617,17 @@ export default {
: res.result.enterpriseProperty == 3 : res.result.enterpriseProperty == 3
? this.$t("message.laborMange.collectiveEnterprises") ? this.$t("message.laborMange.collectiveEnterprises")
: this.$t("message.laborMange.privateEnterprise"), : this.$t("message.laborMange.privateEnterprise"),
value2: res.result.logo && res.result.logo.split(',').length > 0 ? res.result.logo.split(',').map(item => { value2:
res.result.logo && res.result.logo.split(",").length > 0
? res.result.logo.split(",").map((item) => {
return { return {
name: item.split('*')[0], name: item.split("*")[0],
url: this.$store.state.FILEURL + item.split('*')[1], url: this.$store.state.FILEURL + item.split("*")[1],
} };
}) : res.result.logo.indexOf('http://') >= 0 || !res.result.logo ? res.result.logo : this.$store.state.FILEURL + res.result.logo })
: res.result.logo.indexOf("http://") >= 0 || !res.result.logo
? res.result.logo
: this.$store.state.FILEURL + res.result.logo,
// res.result.logo ? this.$store.state.FILEURL +res.result.logo : "", // res.result.logo ? this.$store.state.FILEURL +res.result.logo : "",
}, },
{ {
@ -581,70 +639,117 @@ export default {
{ {
fieldName: "承包商名称", fieldName: "承包商名称",
fieldName2: "项目施工区域", fieldName2: "项目施工区域",
value: res.result.projectEnterprise.cbsName ? res.result.projectEnterprise.cbsName : "", value: res.result.projectEnterprise.cbsName
value2: res.result.projectEnterprise.projectBuildArea ? res.result.projectEnterprise.projectBuildArea : "", ? res.result.projectEnterprise.cbsName
: "",
value2: res.result.projectEnterprise.projectBuildArea
? res.result.projectEnterprise.projectBuildArea
: "",
}, },
{ {
fieldName: "项目经理", fieldName: "项目经理",
fieldName2: "项目类型", fieldName2: "项目类型",
value: res.result.projectEnterprise.projectManage ? res.result.projectEnterprise.projectManage :"", value: res.result.projectEnterprise.projectManage
value2: res.result.projectEnterprise.cbsProjectTypeName ? res.result.projectEnterprise.cbsProjectTypeName:"", ? res.result.projectEnterprise.projectManage
: "",
value2: res.result.projectEnterprise.cbsProjectTypeName
? res.result.projectEnterprise.cbsProjectTypeName
: "",
}, },
{ {
fieldName: "施工阶段", fieldName: "施工阶段",
fieldName2: "纬度位置", fieldName2: "纬度位置",
value: res.result.projectEnterprise.constructionStageName?res.result.projectEnterprise.constructionStageName:"", value: res.result.projectEnterprise.constructionStageName
value2: res.result.projectEnterprise.latitude ? res.result.projectEnterprise.latitude :"", ? res.result.projectEnterprise.constructionStageName
: "",
value2: res.result.projectEnterprise.latitude
? res.result.projectEnterprise.latitude
: "",
}, },
{ {
fieldName: "经度位置", fieldName: "经度位置",
fieldName2: "工程类别", fieldName2: "工程类别",
value: res.result.projectEnterprise.longitude ? res.result.projectEnterprise.longitude:"", value: res.result.projectEnterprise.longitude
value2: res.result.projectEnterprise.projectTypeName?res.result.projectEnterprise.projectTypeName:"", ? res.result.projectEnterprise.longitude
: "",
value2: res.result.projectEnterprise.projectTypeName
? res.result.projectEnterprise.projectTypeName
: "",
}, },
{ {
fieldName: "项目编号", fieldName: "项目编号",
fieldName2: "结构类型", fieldName2: "结构类型",
value: res.result.projectEnterprise.projectNumber ? res.result.projectEnterprise.projectNumber:"", value: res.result.projectEnterprise.projectNumber
value2: res.result.projectEnterprise.structureTypeName ? res.result.projectEnterprise.structureTypeName:"", ? res.result.projectEnterprise.projectNumber
: "",
value2: res.result.projectEnterprise.structureTypeName
? res.result.projectEnterprise.structureTypeName
: "",
}, },
{ {
fieldName: "项目面积(m²)", fieldName: "项目面积(m²)",
fieldName2: "工程状态", fieldName2: "工程状态",
value: res.result.projectEnterprise.projectAcreage ? res.result.projectEnterprise.projectAcreage:"", value: res.result.projectEnterprise.projectAcreage
value2: this.$t('message.companyDiagram.BUILDSTATUS')[res.result.projectEnterprise.bulidStatus].name, ? res.result.projectEnterprise.projectAcreage
: "",
value2: this.$t("message.companyDiagram.BUILDSTATUS")[
res.result.projectEnterprise.bulidStatus
].name,
}, },
{ {
fieldName: "开工日期", fieldName: "开工日期",
fieldName2: "竣工日期", fieldName2: "竣工日期",
value: res.result.projectEnterprise.startWorkDate?res.result.projectEnterprise.startWorkDate:"", value: res.result.projectEnterprise.startWorkDate
value2: res.result.projectEnterprise.completionDate ? res.result.projectEnterprise.completionDate :"", ? res.result.projectEnterprise.startWorkDate
: "",
value2: res.result.projectEnterprise.completionDate
? res.result.projectEnterprise.completionDate
: "",
}, },
{ {
fieldName: "现场布置图", fieldName: "现场布置图",
fieldName2: "现场施工图", fieldName2: "现场施工图",
value: res.result.projectEnterprise.layoutImage && JSON.parse(res.result.projectEnterprise.layoutImage) instanceof Array && JSON.parse(res.result.projectEnterprise.layoutImage).length > 0? JSON.parse(res.result.projectEnterprise.layoutImage).map(item => { value:
res.result.projectEnterprise.layoutImage &&
JSON.parse(res.result.projectEnterprise.layoutImage) instanceof
Array &&
JSON.parse(res.result.projectEnterprise.layoutImage).length > 0
? JSON.parse(res.result.projectEnterprise.layoutImage).map(
(item) => {
return { return {
name: item.name, name: item.name,
url: this.$store.state.FILEURL + item.url, url: this.$store.state.FILEURL + item.url,
};
} }
}) :"", )
value2: res.result.projectEnterprise.constructionMapUrl && JSON.parse(res.result.projectEnterprise.constructionMapUrl) instanceof Array && JSON.parse(res.result.projectEnterprise.constructionMapUrl).length > 0 ? JSON.parse(res.result.projectEnterprise.constructionMapUrl).map(item => { : "",
value2:
res.result.projectEnterprise.constructionMapUrl &&
JSON.parse(
res.result.projectEnterprise.constructionMapUrl
) instanceof Array &&
JSON.parse(res.result.projectEnterprise.constructionMapUrl)
.length > 0
? JSON.parse(
res.result.projectEnterprise.constructionMapUrl
).map((item) => {
return { return {
name: item.name, name: item.name,
url: this.$store.state.FILEURL + item.url, url: this.$store.state.FILEURL + item.url,
} };
}):"", })
: "",
}, },
{ {
fieldName: "联系电话", fieldName: "联系电话",
value: res.result.projectEnterprise.projectTel?res.result.projectEnterprise.projectTel:"", value: res.result.projectEnterprise.projectTel
? res.result.projectEnterprise.projectTel
: "",
}, },
]; ];
this.infoEnterpriseId = res.result.id; this.infoEnterpriseId = res.result.id;
// this.getDataDateils(); // this.getDataDateils();
console.log(this.enterpriseInfo,666777888) console.log(this.enterpriseInfo, 666777888);
} }
}); });
}, },
@ -652,20 +757,34 @@ export default {
getQueryById() { getQueryById() {
let data = { let data = {
// enterpriseId: this.$props.projectEnterpriseId, // enterpriseId: this.$props.projectEnterpriseId,
enterpriseId: this.infoEnterpriseId enterpriseId: this.infoEnterpriseId,
}; };
getQueryByIdListApi(data).then((res) => { getQueryByIdListApi(data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.qualificationList = res.result; // console.log(22222222, res.result)
this.qualificationList.map(item => { this.qualificationList = res.result.map((item) => {
// console.log(!item.fileUrl.includes(this.$store.state.FILEURL))
if (!item.fileUrl.includes(this.$store.state.FILEURL)) { if (!item.fileUrl.includes(this.$store.state.FILEURL)) {
if(item.fileUrl.includes("name")){ // console.log(item.fileUrl.includes("name"))
const imageType = [ '.jpg','.png', '.jpeg']
if (item.fileUrl.includes("name")) {
const name = JSON.parse(item.fileUrl)[0].name;
const type = name.substring(name.indexOf('.'),name.length);
console.log(type)
item.flag = imageType.includes(type);
console.log(item.flag)
item.fileNameNew = name;
item.fileUrl = this.$store.state.FILEURL + JSON.parse(item.fileUrl)[0].url; item.fileUrl = this.$store.state.FILEURL + JSON.parse(item.fileUrl)[0].url;
// // this.$set(item, "fileNameNew", JSON.parse(item.fileUrl)[0].name)
} else { } else {
item.fileUrl = this.$store.state.FILEURL + item.fileUrl; item.fileUrl = this.$store.state.FILEURL + item.fileUrl;
} }
} }
}) return {
...item
}
});
// console.log(111111111, this.qualificationList)
} }
}); });
}, },
@ -674,6 +793,7 @@ export default {
// type 1 2 // type 1 2
if (type === 1) { if (type === 1) {
this.qualificationDialog = true; this.qualificationDialog = true;
this.fileList = [];
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.qualificationForm.resetFields(); this.$refs.qualificationForm.resetFields();
}); });
@ -687,7 +807,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),
@ -743,8 +863,13 @@ export default {
}, },
// //
handleSuccess(file) { handleSuccess(file) {
console.log('上传成功放回的值',file) console.log("上传成功放回的值", file);
let data = { name: file.data[0].filename, url: file.data[0].imageUrl }; let data = {
name: file.data[0].fileInfo.originalFilename
? file.data[0].fileInfo.originalFilename
: file.data[0].filename,
url: file.data[0].imageUrl,
};
// let data = { name: file.data[0].fileInfo.attr.originalFilename, 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 =
@ -765,20 +890,20 @@ export default {
}, },
// //
handleBeforeUpload(file) { handleBeforeUpload(file) {
var img = file.name.substring(file.name.lastIndexOf('.') + 1) // var img = file.name.substring(file.name.lastIndexOf('.') + 1)
const suffix = img === 'jpg' // const suffix = img === 'jpg'
const suffix2 = img === 'png' // const suffix2 = img === 'png'
const suffix3 = img === 'jpeg' // const suffix3 = img === 'jpeg'
const isLt1M = file.size / 1024 / 1024 < 1; // const isLt1M = file.size / 1024 / 1024 < 1;
if (!suffix && !suffix2 && !suffix3) { // if (!suffix && !suffix2 && !suffix3) {
this.$message.error("只能上传图片!"); // this.$message.error("");
return false // return false
} // }
// // //
if (!isLt1M) { // if (!isLt1M) {
this.$message.error('上传图片大小不能超过 1MB!'); // this.$message.error(' 1MB!');
} // }
return suffix || suffix2 || suffix3 // return suffix || suffix2 || suffix3
}, },
// //
@ -792,18 +917,18 @@ export default {
showArr.push(this.fileUrl + showUrl); showArr.push(this.fileUrl + showUrl);
} }
return showArr; return showArr;
} else if(type == 2) { } else if (type == 2) {
let arr = JSON.parse(url); let arr = JSON.parse(url);
// this.matchResult = arr.match("(.+?).(png|jpg|gif)"); // this.matchResult = arr.match("(.+?).(png|jpg|gif)");
// console.log('this.matchResult',this.matchResult) // console.log('this.matchResult',this.matchResult)
// arr = arr.split(","); // arr = arr.split(",");
let showArr = []; let showArr = [];
showArr = arr.map((item)=>{ showArr = arr.map((item) => {
let showUrl = item.url let showUrl = item.url;
let showArray = [] let showArray = [];
showArray.push(this.fileUrl + showUrl); showArray.push(this.fileUrl + showUrl);
return showArray return showArray;
}) });
return showArr; return showArr;
// for (let i = 0; i < arr.length; i++) { // for (let i = 0; i < arr.length; i++) {
@ -817,7 +942,6 @@ export default {
// } // }
// } // }
// console.log('showArr',showArr) // console.log('showArr',showArr)
} }
}, },
@ -830,6 +954,9 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.pageDataContainer {
overflow: initial;
}
.el-menu--horizontal > .el-menu-item { .el-menu--horizontal > .el-menu-item {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;