flx:优化选中省市区问题
This commit is contained in:
parent
a98ab6c9ec
commit
81488ac595
@ -995,6 +995,28 @@
|
|||||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="项目图标"
|
||||||
|
prop="projectIcon"
|
||||||
|
>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
:action="$store.state.UPLOADURL"
|
||||||
|
:show-file-list="false"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-success="handleUploadSuccess1"
|
||||||
|
name="files"
|
||||||
|
>
|
||||||
|
<div v-if="addProjectForm.projectIcon" class="imgBox">
|
||||||
|
<img :src="addProjectForm.projectIcon" class="avatar" />
|
||||||
|
<i
|
||||||
|
class="el-icon-error redText"
|
||||||
|
@click.stop="addProjectForm.projectIcon = ''"
|
||||||
|
></i>
|
||||||
|
</div>
|
||||||
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button
|
<el-button
|
||||||
class="cancleBtn"
|
class="cancleBtn"
|
||||||
@ -1570,6 +1592,7 @@ export default {
|
|||||||
households: "",
|
households: "",
|
||||||
latitude: "",
|
latitude: "",
|
||||||
layoutImage: "",
|
layoutImage: "",
|
||||||
|
projectIcon: "",
|
||||||
longitude: "",
|
longitude: "",
|
||||||
projectAcreage: "",
|
projectAcreage: "",
|
||||||
projectAddress: "",
|
projectAddress: "",
|
||||||
@ -3571,19 +3594,24 @@ export default {
|
|||||||
console.log("编辑页有值吗", item);
|
console.log("编辑页有值吗", item);
|
||||||
this.projectDialogTitle = this.$t("message.companyDiagram.editProject"); //编辑项目
|
this.projectDialogTitle = this.$t("message.companyDiagram.editProject"); //编辑项目
|
||||||
this.isAdd = false;
|
this.isAdd = false;
|
||||||
this.addProjectForm = JSON.parse(JSON.stringify(item));
|
this.addProjectForm = JSON.parse(JSON.stringify({
|
||||||
|
...item,
|
||||||
|
projectIcon: item.projectIcon ? item.projectIcon : "",
|
||||||
|
}));
|
||||||
this.addProjectDialog = true;
|
this.addProjectDialog = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$refs["addProjectForm"].clearValidate();
|
this.$refs["addProjectForm"].clearValidate();
|
||||||
this.$refs.cascader.$refs.panel.activePath = [];
|
this.$refs.cascader.$refs.panel.activePath = [];
|
||||||
|
if (item.areaCode) {
|
||||||
this.provincesCityArr = [
|
this.provincesCityArr = [
|
||||||
item.provincesCode,
|
item.provincesCode,
|
||||||
item.cityCode,
|
item.cityCode,
|
||||||
item.areaCode,
|
item.areaCode,
|
||||||
].filter((item) => item);
|
];
|
||||||
|
} else {
|
||||||
console.log(this.provincesCityArr);
|
this.provincesCityArr = [item.provincesCode, item.cityCode];
|
||||||
|
}
|
||||||
}, 200);
|
}, 200);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -3597,8 +3625,8 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$refs["addProjectForm"].validate((valid) => {
|
this.$refs["addProjectForm"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log(this.addProjectForm);
|
|
||||||
if (this.isAdd) {
|
if (this.isAdd) {
|
||||||
|
console.log(this.addProjectForm);
|
||||||
addProjectApi(this.addProjectForm).then((res) => {
|
addProjectApi(this.addProjectForm).then((res) => {
|
||||||
console.log("添加成功", res);
|
console.log("添加成功", res);
|
||||||
this.addProjectDialog = false;
|
this.addProjectDialog = false;
|
||||||
@ -3608,12 +3636,7 @@ export default {
|
|||||||
); //添加成功!
|
); //添加成功!
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
editProjectApi({
|
editProjectApi(this.addProjectForm).then((res) => {
|
||||||
...this.addProjectForm,
|
|
||||||
areaCode: this.addProjectForm.areaCode
|
|
||||||
? this.addProjectForm.areaCode
|
|
||||||
: "",
|
|
||||||
}).then((res) => {
|
|
||||||
console.log("信息编辑", res);
|
console.log("信息编辑", res);
|
||||||
this.addProjectDialog = false;
|
this.addProjectDialog = false;
|
||||||
this.initData();
|
this.initData();
|
||||||
@ -3655,7 +3678,7 @@ export default {
|
|||||||
console.log(val);
|
console.log(val);
|
||||||
this.addProjectForm.provincesCode = val[0];
|
this.addProjectForm.provincesCode = val[0];
|
||||||
this.addProjectForm.cityCode = val[1];
|
this.addProjectForm.cityCode = val[1];
|
||||||
this.addProjectForm.areaCode = val[2];
|
this.addProjectForm.areaCode = val[2] || "";
|
||||||
},
|
},
|
||||||
// handleRemove(){
|
// handleRemove(){
|
||||||
// this.addProjectForm.layoutImage=''
|
// this.addProjectForm.layoutImage=''
|
||||||
@ -3682,6 +3705,12 @@ export default {
|
|||||||
this.addProjectForm.layoutImage =
|
this.addProjectForm.layoutImage =
|
||||||
this.$store.state.FILEURL + res.data[0].imageUrl;
|
this.$store.state.FILEURL + res.data[0].imageUrl;
|
||||||
},
|
},
|
||||||
|
handleUploadSuccess1(res) {
|
||||||
|
// console.log(res);
|
||||||
|
this.addProjectForm.projectIcon =
|
||||||
|
this.$store.state.FILEURL + res.data[0].imageUrl;
|
||||||
|
console.log(this.addProjectForm.projectIcon);
|
||||||
|
},
|
||||||
openAuthorizedConfig(type) {
|
openAuthorizedConfig(type) {
|
||||||
this.authorizedConfig = {
|
this.authorizedConfig = {
|
||||||
type: type,
|
type: type,
|
||||||
|
|||||||
@ -4,14 +4,14 @@
|
|||||||
<vue-scroll style="width: 100%">
|
<vue-scroll style="width: 100%">
|
||||||
<div class="btn_wrap">
|
<div class="btn_wrap">
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
v-if="projectAuditStatus != 2"
|
v-if="projectAuditStatus != 2"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="medium"
|
size="medium"
|
||||||
@click="uploadThirdParty"
|
@click="uploadThirdParty"
|
||||||
>
|
>
|
||||||
{{$t('message.projectInfo.updateToThirdParty')}}
|
{{$t('message.projectInfo.updateToThirdParty')}}
|
||||||
</el-button
|
</el-button
|
||||||
> -->
|
> -->
|
||||||
<el-button
|
<el-button
|
||||||
v-if="company == 'zhengwu'"
|
v-if="company == 'zhengwu'"
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -22,22 +22,25 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<!-- 编辑 -->
|
<!-- 编辑 -->
|
||||||
<el-button
|
<el-button
|
||||||
v-permission="{key: 'xmjbxx_edit', menuPath: '/project/summary/baseInfo'}"
|
v-permission="{
|
||||||
|
key: 'xmjbxx_edit',
|
||||||
|
menuPath: '/project/summary/baseInfo',
|
||||||
|
}"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="medium"
|
size="medium"
|
||||||
@click="addProjectDialog = true"
|
@click="addProjectDialog = true"
|
||||||
>{{ $t('message.companyDiagram.Table.edit') }}</el-button
|
>{{ $t("message.companyDiagram.Table.edit") }}</el-button
|
||||||
>
|
>
|
||||||
<!-- <el-button type="primary" size="medium">{{$t('message.companyDiagram.projectSchedule')}}</el-button> -->
|
<!-- <el-button type="primary" size="medium">{{$t('message.companyDiagram.projectSchedule')}}</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="custom_tab">
|
<div class="custom_tab">
|
||||||
<div class="title">{{ $t('message.companyDiagram.sheet') }}</div>
|
<div class="title">{{ $t("message.companyDiagram.sheet") }}</div>
|
||||||
<div class="flex4">
|
<div class="flex4">
|
||||||
<div class="type_content" style="z-index: 2">
|
<div class="type_content" style="z-index: 2">
|
||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35">{{
|
<span class="width_35">{{
|
||||||
$t('message.companyDiagram.entryName1')
|
$t("message.companyDiagram.entryName1")
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="width_65" style="white-space: nowrap">{{
|
<span class="width_65" style="white-space: nowrap">{{
|
||||||
projectDetail.projectName
|
projectDetail.projectName
|
||||||
@ -45,7 +48,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35">{{
|
<span class="width_35">{{
|
||||||
$t('message.companyDiagram.Table.projectAddress')
|
$t("message.companyDiagram.Table.projectAddress")
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="width_65 bg_color" style="white-space: nowrap">{{
|
<span class="width_65 bg_color" style="white-space: nowrap">{{
|
||||||
projectDetail.projectAddress
|
projectDetail.projectAddress
|
||||||
@ -54,18 +57,18 @@
|
|||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35">{{
|
<span class="width_35">{{
|
||||||
$t(
|
$t(
|
||||||
'message.companyDiagram.dialog_ProjectPop_up.provincesCode'
|
"message.companyDiagram.dialog_ProjectPop_up.provincesCode"
|
||||||
)
|
)
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="width_65"
|
<span class="width_65"
|
||||||
>{{ projectDetail.provinceName
|
>{{ projectDetail.provinceName }}{{ projectDetail.cityName
|
||||||
}}{{projectDetail.cityName}}{{ projectDetail.areaName }}</span
|
}}{{ projectDetail.areaName }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35">{{
|
<span class="width_35">{{
|
||||||
$t(
|
$t(
|
||||||
'message.companyDiagram.dialog_ProjectPop_up.projectManage'
|
"message.companyDiagram.dialog_ProjectPop_up.projectManage"
|
||||||
)
|
)
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="width_65 bg_color">{{
|
<span class="width_65 bg_color">{{
|
||||||
@ -74,34 +77,24 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35">{{
|
<span class="width_35">{{
|
||||||
$t('message.companyDiagram.dialog_ProjectPop_up.longitude')
|
$t("message.companyDiagram.dialog_ProjectPop_up.longitude")
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="width_65">{{ projectDetail.longitude }}</span>
|
<span class="width_65">{{ projectDetail.longitude }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35">{{
|
<span class="width_35">{{
|
||||||
$t(
|
$t(
|
||||||
'message.companyDiagram.dialog_ProjectPop_up.projectNumber'
|
"message.companyDiagram.dialog_ProjectPop_up.projectNumber"
|
||||||
)
|
)
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="width_65 bg_color">{{
|
<span class="width_65 bg_color">{{
|
||||||
projectDetail.projectNumber
|
projectDetail.projectNumber
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex3" v-if="company == 'gsgs'">
|
<div class="flex3">
|
||||||
<span class="width_35">{{
|
<span class="width_35">{{
|
||||||
$t(
|
$t(
|
||||||
'message.companyDiagram.dialog_ProjectPop_up.bridgeLength'
|
"message.companyDiagram.dialog_ProjectPop_up.projectAcreage"
|
||||||
)
|
|
||||||
}}</span>
|
|
||||||
<span class="width_65"
|
|
||||||
>{{ projectDetail.bridgeLength }}(m)</span
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="flex3" v-else>
|
|
||||||
<span class="width_35">{{
|
|
||||||
$t(
|
|
||||||
'message.companyDiagram.dialog_ProjectPop_up.projectAcreage'
|
|
||||||
)
|
)
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="width_65"
|
<span class="width_65"
|
||||||
@ -111,7 +104,7 @@
|
|||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35">{{
|
<span class="width_35">{{
|
||||||
$t(
|
$t(
|
||||||
'message.companyDiagram.dialog_ProjectPop_up.startWorkDate'
|
"message.companyDiagram.dialog_ProjectPop_up.startWorkDate"
|
||||||
)
|
)
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="width_65 bg_color">{{
|
<span class="width_65 bg_color">{{
|
||||||
@ -120,13 +113,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35">{{
|
<span class="width_35">{{
|
||||||
$t('message.companyDiagram.dialog_ProjectPop_up.saleAcreage')
|
$t("message.companyDiagram.dialog_ProjectPop_up.saleAcreage")
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="width_65">{{ projectDetail.saleAcreage }}</span>
|
<span class="width_65">{{ projectDetail.saleAcreage }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35">{{
|
<span class="width_35">{{
|
||||||
$t('message.companyDiagram.dialog_ProjectPop_up.buildingNum')
|
$t("message.companyDiagram.dialog_ProjectPop_up.buildingNum")
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="width_65 bg_color">{{
|
<span class="width_65 bg_color">{{
|
||||||
projectDetail.buildingNum
|
projectDetail.buildingNum
|
||||||
@ -134,14 +127,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35">{{
|
<span class="width_35">{{
|
||||||
$t('message.companyDiagram.dialog_ProjectPop_up.projectTel')
|
$t("message.companyDiagram.dialog_ProjectPop_up.projectTel")
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="width_65">{{ projectDetail.projectTel }}</span>
|
<span class="width_65">{{ projectDetail.projectTel }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35">
|
<span class="width_35">
|
||||||
<!-- 项目唯一标识(SN) -->
|
<!-- 项目唯一标识(SN) -->
|
||||||
{{ $t('message.projectInfo.projectOnlyMark') }}
|
{{ $t("message.projectInfo.projectOnlyMark") }}
|
||||||
</span>
|
</span>
|
||||||
<span class="width_65 bg_color" style="white-space: nowrap">{{
|
<span class="width_65 bg_color" style="white-space: nowrap">{{
|
||||||
projectDetail.projectSn
|
projectDetail.projectSn
|
||||||
@ -166,7 +159,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35 border_l">{{
|
<span class="width_35 border_l">{{
|
||||||
$t('message.companyDiagram.dialog_ProjectPop_up.latitude')
|
$t("message.companyDiagram.dialog_ProjectPop_up.latitude")
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="width_65 bg_color">{{
|
<span class="width_65 bg_color">{{
|
||||||
projectDetail.latitude
|
projectDetail.latitude
|
||||||
@ -174,7 +167,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35 border_l">{{
|
<span class="width_35 border_l">{{
|
||||||
$t('message.companyDiagram.dialog_ProjectPop_up.projectType')
|
$t("message.companyDiagram.dialog_ProjectPop_up.projectType")
|
||||||
}}</span>
|
}}</span>
|
||||||
<span
|
<span
|
||||||
class="width_65"
|
class="width_65"
|
||||||
@ -187,7 +180,7 @@
|
|||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35 border_l">{{
|
<span class="width_35 border_l">{{
|
||||||
$t(
|
$t(
|
||||||
'message.companyDiagram.dialog_ProjectPop_up.structureType'
|
"message.companyDiagram.dialog_ProjectPop_up.structureType"
|
||||||
)
|
)
|
||||||
}}</span>
|
}}</span>
|
||||||
<span
|
<span
|
||||||
@ -200,7 +193,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35 border_l">{{
|
<span class="width_35 border_l">{{
|
||||||
$t('message.companyDiagram.dialog_ProjectPop_up.bulidStatus')
|
$t("message.companyDiagram.dialog_ProjectPop_up.bulidStatus")
|
||||||
}}</span>
|
}}</span>
|
||||||
<span
|
<span
|
||||||
class="width_65"
|
class="width_65"
|
||||||
@ -215,7 +208,7 @@
|
|||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35 border_l">{{
|
<span class="width_35 border_l">{{
|
||||||
$t(
|
$t(
|
||||||
'message.companyDiagram.dialog_ProjectPop_up.constructionStage'
|
"message.companyDiagram.dialog_ProjectPop_up.constructionStage"
|
||||||
)
|
)
|
||||||
}}</span>
|
}}</span>
|
||||||
<span
|
<span
|
||||||
@ -226,24 +219,24 @@
|
|||||||
>{{ item.name }}</span
|
>{{ item.name }}</span
|
||||||
>
|
>
|
||||||
<!-- <span
|
<!-- <span
|
||||||
class="width_65 bg_color"
|
class="width_65 bg_color"
|
||||||
v-for="(item, index) in $t(
|
v-for="(item, index) in $t(
|
||||||
'message.companyDiagram.CONSTRUCTIONSTAGE'
|
'message.companyDiagram.CONSTRUCTIONSTAGE'
|
||||||
)"
|
)"
|
||||||
:key="index"
|
:key="index"
|
||||||
v-if="projectDetail.constructionStage == item.id"
|
v-if="projectDetail.constructionStage == item.id"
|
||||||
>{{ item.name }}</span
|
>{{ item.name }}</span
|
||||||
> -->
|
> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35 border_l">{{
|
<span class="width_35 border_l">{{
|
||||||
$t('message.companyDiagram.dialog_ProjectPop_up.households')
|
$t("message.companyDiagram.dialog_ProjectPop_up.households")
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="width_65">{{ projectDetail.households }}</span>
|
<span class="width_65">{{ projectDetail.households }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35 border_l">{{
|
<span class="width_35 border_l">{{
|
||||||
$t('message.companyDiagram.dialog_ProjectPop_up.layoutImage')
|
$t("message.companyDiagram.dialog_ProjectPop_up.layoutImage")
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="width_65 bg_color">
|
<span class="width_65 bg_color">
|
||||||
<img
|
<img
|
||||||
@ -255,15 +248,15 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
"
|
"
|
||||||
@click="
|
@click="
|
||||||
bigImageDialog = true
|
bigImageDialog = true;
|
||||||
bigImageUrl = projectDetail.layoutImage
|
bigImageUrl = projectDetail.layoutImage;
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex3">
|
<div class="flex3">
|
||||||
<span class="width_35 border_l" style="height: 44px">{{
|
<span class="width_35 border_l" style="height: 44px">{{
|
||||||
$t('message.companyDiagram.dialog_ProjectPop_up.shopDrawing')
|
$t("message.companyDiagram.dialog_ProjectPop_up.shopDrawing")
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="width_65">
|
<span class="width_65">
|
||||||
<img
|
<img
|
||||||
@ -275,8 +268,8 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
"
|
"
|
||||||
@click="
|
@click="
|
||||||
bigImageDialog = true
|
bigImageDialog = true;
|
||||||
bigImageUrl = projectDetail.constructionMapUrl
|
bigImageUrl = projectDetail.constructionMapUrl;
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
@ -382,7 +375,7 @@
|
|||||||
<template slot="append">
|
<template slot="append">
|
||||||
<el-link type="primary" @click="toGetLocalFn">{{
|
<el-link type="primary" @click="toGetLocalFn">{{
|
||||||
$t(
|
$t(
|
||||||
'message.companyDiagram.dialog_ProjectPop_up.coordinatePicking'
|
"message.companyDiagram.dialog_ProjectPop_up.coordinatePicking"
|
||||||
)
|
)
|
||||||
}}</el-link>
|
}}</el-link>
|
||||||
</template>
|
</template>
|
||||||
@ -466,20 +459,6 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="company == 'gsgs'"
|
|
||||||
:label="
|
|
||||||
$t('message.companyDiagram.dialog_ProjectPop_up.bridgeLength')
|
|
||||||
"
|
|
||||||
prop="bridgeLength"
|
|
||||||
>
|
|
||||||
<el-input
|
|
||||||
v-model="addProjectForm.bridgeLength"
|
|
||||||
:placeholder="$t('message.companyDiagram.PleaseEnter')"
|
|
||||||
type="number"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
|
||||||
v-else
|
|
||||||
:label="
|
:label="
|
||||||
$t('message.companyDiagram.dialog_ProjectPop_up.projectAcreage')
|
$t('message.companyDiagram.dialog_ProjectPop_up.projectAcreage')
|
||||||
"
|
"
|
||||||
@ -491,7 +470,6 @@
|
|||||||
type="number"
|
type="number"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="
|
:label="
|
||||||
$t('message.companyDiagram.dialog_ProjectPop_up.bulidStatus')
|
$t('message.companyDiagram.dialog_ProjectPop_up.bulidStatus')
|
||||||
@ -546,11 +524,11 @@
|
|||||||
:value="Number(item.data)"
|
:value="Number(item.data)"
|
||||||
></el-option>
|
></el-option>
|
||||||
<!-- <el-option
|
<!-- <el-option
|
||||||
v-for="item in $t('message.companyDiagram.CONSTRUCTIONSTAGE')"
|
v-for="item in $t('message.companyDiagram.CONSTRUCTIONSTAGE')"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option> -->
|
></el-option> -->
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
@ -600,10 +578,10 @@
|
|||||||
<div style="width: 280px">
|
<div style="width: 280px">
|
||||||
<el-radio v-model="addProjectForm.majorProjectType" :label="1">
|
<el-radio v-model="addProjectForm.majorProjectType" :label="1">
|
||||||
<!-- 是 -->
|
<!-- 是 -->
|
||||||
{{ $t('message.projectInfo.is') }}
|
{{ $t("message.projectInfo.is") }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
<el-radio v-model="addProjectForm.majorProjectType" :label="0">
|
<el-radio v-model="addProjectForm.majorProjectType" :label="0">
|
||||||
{{ $t('message.projectInfo.isNot') }}
|
{{ $t("message.projectInfo.isNot") }}
|
||||||
<!-- 否 -->
|
<!-- 否 -->
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</div>
|
</div>
|
||||||
@ -665,14 +643,14 @@
|
|||||||
@click="addProjectDialog = false"
|
@click="addProjectDialog = false"
|
||||||
icon="el-icon-circle-close"
|
icon="el-icon-circle-close"
|
||||||
size="medium"
|
size="medium"
|
||||||
>{{ $t('message.companyDiagram.cancel') }}</el-button
|
>{{ $t("message.companyDiagram.cancel") }}</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-circle-check"
|
icon="el-icon-circle-check"
|
||||||
@click="saveProjectFn"
|
@click="saveProjectFn"
|
||||||
size="medium"
|
size="medium"
|
||||||
>{{ $t('message.companyDiagram.determine') }}</el-button
|
>{{ $t("message.companyDiagram.determine") }}</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -695,15 +673,18 @@
|
|||||||
></gd-map>
|
></gd-map>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { checkPhone } from "@/assets/js/util.js";
|
||||||
checkPhone
|
|
||||||
} from '@/assets/js/util.js'
|
|
||||||
import {
|
import {
|
||||||
sendSafetyHatProjectDataApi,
|
sendSafetyHatProjectDataApi,
|
||||||
getDictionaryItemApi
|
getDictionaryItemApi,
|
||||||
} from "@/assets/js/api/companyDiagram.js";
|
} from "@/assets/js/api/companyDiagram.js";
|
||||||
import { getProjectDetail, editProjectInfo, sendProjectInfo, getProjectConfigListApi } from "@/assets/js/api/baseInfo.js";
|
import {
|
||||||
|
getProjectDetail,
|
||||||
|
editProjectInfo,
|
||||||
|
sendProjectInfo,
|
||||||
|
getProjectConfigListApi,
|
||||||
|
} from "@/assets/js/api/baseInfo.js";
|
||||||
import { selectProvincesCityListApi } from "@/assets/js/api/project.js";
|
import { selectProvincesCityListApi } from "@/assets/js/api/project.js";
|
||||||
import scroll from "vue-seamless-scroll";
|
import scroll from "vue-seamless-scroll";
|
||||||
import gdMap from "../../../components/map/gd-map";
|
import gdMap from "../../../components/map/gd-map";
|
||||||
@ -726,7 +707,9 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
projectDialogTitle: /* "编辑项目", */ this.$t('message.projectInfo.editProject'),
|
projectDialogTitle: /* "编辑项目", */ this.$t(
|
||||||
|
"message.projectInfo.editProject"
|
||||||
|
),
|
||||||
addProjectDialog: false,
|
addProjectDialog: false,
|
||||||
addProjectForm: {
|
addProjectForm: {
|
||||||
areaCode: "",
|
areaCode: "",
|
||||||
@ -739,10 +722,9 @@ export default {
|
|||||||
households: "",
|
households: "",
|
||||||
latitude: "",
|
latitude: "",
|
||||||
layoutImage: "",
|
layoutImage: "",
|
||||||
constructionMapUrl: '',
|
constructionMapUrl: "",
|
||||||
longitude: "",
|
longitude: "",
|
||||||
projectAcreage: "",
|
projectAcreage: "",
|
||||||
bridgeLength: "",
|
|
||||||
projectAddress: "",
|
projectAddress: "",
|
||||||
projectName: "",
|
projectName: "",
|
||||||
projectNumber: "",
|
projectNumber: "",
|
||||||
@ -753,7 +735,7 @@ export default {
|
|||||||
structureType: "",
|
structureType: "",
|
||||||
projectManage: "",
|
projectManage: "",
|
||||||
projectTel: "",
|
projectTel: "",
|
||||||
majorProjectType: 0
|
majorProjectType: 0,
|
||||||
},
|
},
|
||||||
projectDetail: {
|
projectDetail: {
|
||||||
areaCode: "",
|
areaCode: "",
|
||||||
@ -766,10 +748,9 @@ export default {
|
|||||||
households: "",
|
households: "",
|
||||||
latitude: "",
|
latitude: "",
|
||||||
layoutImage: "",
|
layoutImage: "",
|
||||||
constructionMapUrl: '',
|
constructionMapUrl: "",
|
||||||
longitude: "",
|
longitude: "",
|
||||||
projectAcreage: "",
|
projectAcreage: "",
|
||||||
bridgeLength: "",
|
|
||||||
projectAddress: "",
|
projectAddress: "",
|
||||||
projectName: "",
|
projectName: "",
|
||||||
projectNumber: "",
|
projectNumber: "",
|
||||||
@ -894,8 +875,8 @@ export default {
|
|||||||
value: "code",
|
value: "code",
|
||||||
},
|
},
|
||||||
showMap: false,
|
showMap: false,
|
||||||
projectAuditStatus: '',//审核状态
|
projectAuditStatus: "", //审核状态
|
||||||
company: '',
|
company: "",
|
||||||
constructionStageList: [],
|
constructionStageList: [],
|
||||||
structureTypeList: [],
|
structureTypeList: [],
|
||||||
projectTypeList: [],
|
projectTypeList: [],
|
||||||
@ -904,78 +885,77 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.projectSn = this.$store.state.projectSn;
|
this.projectSn = this.$store.state.projectSn;
|
||||||
this.company = COMPANY
|
this.company = COMPANY;
|
||||||
this.getDataDateils();
|
this.getDataDateils();
|
||||||
this.loadProvincesCityList();
|
this.loadProvincesCityList();
|
||||||
this.getProjectConfigList();
|
this.getProjectConfigList();
|
||||||
this.getDictionaryList();
|
this.getDictionaryList();
|
||||||
this.getDictionaryByStructure();
|
this.getDictionaryByStructure();
|
||||||
this.getDicProjectTypeList();
|
this.getDicProjectTypeList();
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log('编辑表示:',this.$store.state.userInfo);
|
console.log("编辑表示:", this.$store.state.userInfo);
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
// 获取字典工程类别列表
|
// 获取字典工程类别列表
|
||||||
// 获取字典工程类别列表
|
// 获取字典工程类别列表
|
||||||
getDicProjectTypeList(){
|
getDicProjectTypeList() {
|
||||||
getDictionaryItemApi({
|
getDictionaryItemApi({
|
||||||
dictionaryEncoding: 'project_type',
|
dictionaryEncoding: "project_type",
|
||||||
projectSn: this.projectSn
|
projectSn: this.projectSn,
|
||||||
}).then(res => {
|
}).then((res) => {
|
||||||
if (res.result.length > 0) {
|
if (res.result.length > 0) {
|
||||||
this.projectTypeList = res.result
|
this.projectTypeList = res.result;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//获取字典施工阶段
|
//获取字典施工阶段
|
||||||
getDictionaryList() {
|
getDictionaryList() {
|
||||||
getDictionaryItemApi({
|
getDictionaryItemApi({
|
||||||
dictionaryEncoding: 'project_construction_stage',
|
dictionaryEncoding: "project_construction_stage",
|
||||||
projectSn: this.projectSn
|
projectSn: this.projectSn,
|
||||||
}).then(res => {
|
}).then((res) => {
|
||||||
if (res.result.length > 0) {
|
if (res.result.length > 0) {
|
||||||
this.constructionStageList = res.result
|
this.constructionStageList = res.result;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
})
|
|
||||||
},
|
},
|
||||||
//获取字典 结构类型
|
//获取字典 结构类型
|
||||||
getDictionaryByStructure() {
|
getDictionaryByStructure() {
|
||||||
getDictionaryItemApi({
|
getDictionaryItemApi({
|
||||||
dictionaryEncoding: 'project_structure_type',
|
dictionaryEncoding: "project_structure_type",
|
||||||
projectSn: this.projectSn
|
projectSn: this.projectSn,
|
||||||
}).then(res => {
|
}).then((res) => {
|
||||||
if (res.result.length > 0) {
|
if (res.result.length > 0) {
|
||||||
this.structureTypeList = res.result
|
this.structureTypeList = res.result;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
})
|
|
||||||
},
|
},
|
||||||
sendSafetyHatProject() {
|
sendSafetyHatProject() {
|
||||||
sendSafetyHatProjectDataApi({ projectSn: this.projectSn }).then(res => {
|
sendSafetyHatProjectDataApi({ projectSn: this.projectSn }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$message.success('上传成功!')
|
this.$message.success("上传成功!");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
getProjectConfigList() {
|
getProjectConfigList() {
|
||||||
getProjectConfigListApi({ projectSn: this.projectSn }).then(res => {
|
getProjectConfigListApi({ projectSn: this.projectSn }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.projectAuditStatus = res.result[0].projectAuditStatus
|
this.projectAuditStatus = res.result[0].projectAuditStatus;
|
||||||
console.log(res.result[0].projectAuditStatus);
|
console.log(res.result[0].projectAuditStatus);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
uploadThirdParty() {
|
uploadThirdParty() {
|
||||||
sendProjectInfo({ projectSn: this.projectSn }).then(res => {
|
sendProjectInfo({ projectSn: this.projectSn }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$message.success(this.$t('message.projectInfo.updateSuccess') + '!')
|
this.$message.success(
|
||||||
this.getProjectConfigList()
|
this.$t("message.projectInfo.updateSuccess") + "!"
|
||||||
|
);
|
||||||
|
this.getProjectConfigList();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
closeMap(val) {
|
closeMap(val) {
|
||||||
this.showMap = val;
|
this.showMap = val;
|
||||||
@ -992,14 +972,22 @@ export default {
|
|||||||
};
|
};
|
||||||
getProjectDetail(data).then((res) => {
|
getProjectDetail(data).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.projectDetail = res.result != null ? res.result : this.projectDetail;
|
this.projectDetail =
|
||||||
this.provincesCityArr = [
|
res.result != null ? res.result : this.projectDetail;
|
||||||
res.result.provincesCode,
|
if (res.result.areaCode) {
|
||||||
res.result.cityCode,
|
this.provincesCityArr = [
|
||||||
res.result.areaCode,
|
res.result.provincesCode,
|
||||||
];
|
res.result.cityCode,
|
||||||
|
res.result.areaCode,
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
this.provincesCityArr = [
|
||||||
|
res.result.provincesCode,
|
||||||
|
res.result.cityCode,
|
||||||
|
];
|
||||||
|
}
|
||||||
this.addProjectForm = JSON.parse(JSON.stringify(res.result));
|
this.addProjectForm = JSON.parse(JSON.stringify(res.result));
|
||||||
this.$store.commit('setProDetail', res.result)
|
this.$store.commit("setProDetail", res.result);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -1020,12 +1008,13 @@ export default {
|
|||||||
},
|
},
|
||||||
//文件上传成功
|
//文件上传成功
|
||||||
handleUploadSuccess(res, type) {
|
handleUploadSuccess(res, type) {
|
||||||
console.log(res)
|
console.log(res);
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
this.addProjectForm.layoutImage =
|
this.addProjectForm.layoutImage =
|
||||||
this.$store.state.FILEURL + res.data[0].imageUrl;
|
this.$store.state.FILEURL + res.data[0].imageUrl;
|
||||||
} else {
|
} else {
|
||||||
this.addProjectForm.constructionMapUrl = this.$store.state.FILEURL + res.data[0].imageUrl;
|
this.addProjectForm.constructionMapUrl =
|
||||||
|
this.$store.state.FILEURL + res.data[0].imageUrl;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1039,9 +1028,12 @@ export default {
|
|||||||
saveProjectFn() {
|
saveProjectFn() {
|
||||||
if (this.addProjectForm.projectTel) {
|
if (this.addProjectForm.projectTel) {
|
||||||
if (!checkPhone(this.addProjectForm.projectTel)) {
|
if (!checkPhone(this.addProjectForm.projectTel)) {
|
||||||
console.log('this.addProjectForm.projectTel', this.addProjectForm.projectTel);
|
console.log(
|
||||||
this.$message.error('请输入正确的联系电话')
|
"this.addProjectForm.projectTel",
|
||||||
return
|
this.addProjectForm.projectTel
|
||||||
|
);
|
||||||
|
this.$message.error("请输入正确的联系电话");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$refs["addProjectForm"].validate((valid) => {
|
this.$refs["addProjectForm"].validate((valid) => {
|
||||||
@ -1069,12 +1061,12 @@ export default {
|
|||||||
changeProvincesCity(val) {
|
changeProvincesCity(val) {
|
||||||
this.addProjectForm.provincesCode = val[0];
|
this.addProjectForm.provincesCode = val[0];
|
||||||
this.addProjectForm.cityCode = val[1];
|
this.addProjectForm.cityCode = val[1];
|
||||||
this.addProjectForm.areaCode = val[2];
|
this.addProjectForm.areaCode = val[2] || "";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.flex {
|
.flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -1211,4 +1203,4 @@ export default {
|
|||||||
line-height: 1px !important;
|
line-height: 1px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user