This commit is contained in:
”Rain“ 2024-05-25 20:12:36 +08:00
parent 6d481a4239
commit 1c2009ee6a
2 changed files with 121 additions and 20 deletions

View File

@ -98,6 +98,17 @@
></el-input ></el-input
> >
</el-form-item> </el-form-item>
<el-form-item>
<el-select v-model="companyTypeId" placeholder="请选择项目类型">
<el-option
v-for="item in companyTypeList"
:key="item.id"
:label="item.companyTypeName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<!-- 查询 --> <!-- 查询 -->
<el-button <el-button
@ -114,7 +125,7 @@
<div class="list_wrap flex"> <div class="list_wrap flex">
<div <div
class="list" class="list"
@click="goDetailPage(item.id, item.projectEnterpriseId)" @click="goDetailPage(item.id, item.projectEnterpriseId,item.projectSn)"
v-for="(item, index) in listData" v-for="(item, index) in listData"
:key="index" :key="index"
> >
@ -247,10 +258,10 @@
v-model="enterpriseForm.companyTypeName" v-model="enterpriseForm.companyTypeName"
:placeholder="$t('message.laborMange.pleaseChoose')" :placeholder="$t('message.laborMange.pleaseChoose')"
style="width: 100%" style="width: 100%"
:disabled="true" :disabled="enterpriseTypeName == '全部' ? false : true"
> >
<el-option <el-option
v-for="item in enterpriseTypeList" v-for="item in companyTypeList"
:key="item.id" :key="item.id"
:label="item.companyTypeName" :label="item.companyTypeName"
:value="item.companyTypeName" :value="item.companyTypeName"
@ -674,7 +685,7 @@
{{ $t('message.cooperationUnit.companyDetails') }} {{ $t('message.cooperationUnit.companyDetails') }}
</div> </div>
</div> </div>
<Detail :detailId="detailId" :projectEnterpriseId="projectEnterpriseId" /> <Detail :detailId="detailId" :projectEnterpriseId="projectEnterpriseId" :enterpriseSn="enterpriseSn" />
</div> </div>
</template> </template>
<script> <script>
@ -694,13 +705,17 @@ import {
CheckSocialCreditCode, CheckSocialCreditCode,
checkPhone checkPhone
} from '@/assets/js/util.js' } from '@/assets/js/util.js'
export default { export default {
components: { components: {
Detail, Detail,
}, },
data() { data() {
return { return {
checkedId: 1, checkedId: "",
companyTypeId:"",
companyTypeList:[],
enterpriseTypeSelectId:"",
enterpriseTypeId: '', enterpriseTypeId: '',
enterpriseTypeName: '', enterpriseTypeName: '',
projectSn: '', projectSn: '',
@ -752,6 +767,7 @@ export default {
noDataList: false, noDataList: false,
detailId: '', detailId: '',
projectEnterpriseId: '', projectEnterpriseId: '',
enterpriseSn:"",
pageType: 1, //12 pageType: 1, //12
moveEnterpriseDialog: false, moveEnterpriseDialog: false,
enterpriseType: '', enterpriseType: '',
@ -819,11 +835,22 @@ export default {
getEnterpriseTypeList(data).then((res) => { getEnterpriseTypeList(data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
console.log('获取企业类型列表', res) console.log('获取企业类型列表', res)
this.enterpriseTypeList = res.result this.enterpriseTypeList = [{
this.enterpriseTypeId = res.result[0].id id: "",
companyTypeName:"全部",
},...res.result];
// this.enterpriseTypeId = res.result[0].id
// console.log('==========', res)
// this.enterpriseTypeName = res.result[0].companyTypeName
// this.enterpriseForm.companyTypeName = res.result[0].companyTypeName
console.log('==========单位名称', res) console.log('==========单位名称', res)
this.enterpriseTypeName = res.result[0].companyTypeName this.enterpriseTypeSelectId = this.enterpriseTypeList[0].id;
this.enterpriseForm.companyTypeName = res.result[0].companyTypeName this.enterpriseTypeName = this.enterpriseTypeList[0].companyTypeName;
this.enterpriseTypeId = res.result[0].id;
this.enterpriseForm.companyTypeName = res.result[0].companyTypeName;
this.companyTypeList = res.result;
console.log(this.enterpriseTypeList) console.log(this.enterpriseTypeList)
this.getCooperatorList() this.getCooperatorList()
} }
@ -835,7 +862,7 @@ export default {
projectSn: this.$store.state.projectSn, projectSn: this.$store.state.projectSn,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
enterpriseTypeId: this.enterpriseTypeId, enterpriseTypeId: this.enterpriseTypeSelectId,
enterpriseName: this.enterpriseName, enterpriseName: this.enterpriseName,
} }
getCooperatorListApi(data).then((res) => { getCooperatorListApi(data).then((res) => {
@ -877,9 +904,12 @@ export default {
selectMenu(value) { selectMenu(value) {
console.log('切换菜单', value) console.log('切换菜单', value)
this.checkedId = value.id this.checkedId = value.id
this.enterpriseTypeName = value.companyTypeName this.enterpriseTypeName = value.companyTypeName;
this.enterpriseTypeId = value.id this.enterpriseTypeSelectId = value.id;
this.enterpriseForm.companyTypeName = value.companyTypeName if(!(value.id == '' && value.companyTypeName == '全部')){
this.enterpriseTypeId = value.id
this.enterpriseForm.companyTypeName = value.companyTypeName
}
this.getCooperatorList() this.getCooperatorList()
}, },
// //
@ -1159,9 +1189,10 @@ export default {
// //
getDeleteList(value) { }, getDeleteList(value) { },
// //
goDetailPage(id, projectEnterpriseId) { goDetailPage(id, projectEnterpriseId,enterpriseSn) {
this.detailId = id this.detailId = id;
this.projectEnterpriseId = projectEnterpriseId this.projectEnterpriseId = projectEnterpriseId;
this.enterpriseSn = enterpriseSn;
this.showDetail = true this.showDetail = true
this.checkedDeleteList = [] this.checkedDeleteList = []
}, },

View File

@ -57,7 +57,7 @@
</el-table> </el-table>
</vue-scroll> </vue-scroll>
</div> </div>
<div v-if="activeIndex == '2'" class="content_wrap"> <div v-show="activeIndex == '2'" class="content_wrap">
<el-button <el-button
class="addQualificationBtn" class="addQualificationBtn"
type="primary" type="primary"
@ -198,7 +198,7 @@
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
<div v-if="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"
@ -319,8 +319,12 @@ import {
addEnterpriseQualification, addEnterpriseQualification,
addEnterpriseBadRecord, addEnterpriseBadRecord,
} from "@/assets/js/api/cooperationUnit"; } from "@/assets/js/api/cooperationUnit";
import {
getProjectDetail
} from '@/assets/js/api/baseInfo.js'
export default { export default {
props: ["detailId", "projectEnterpriseId"], props: ["detailId", "projectEnterpriseId","enterpriseSn"],
data() { data() {
return { return {
activeIndex: "1", activeIndex: "1",
@ -389,7 +393,72 @@ export default {
}, 200); }, 200);
} }
}, },
//
getDataDateils(){
getProjectDetail({
projectSn: this.$props.enterpriseSn,
}).then((res) => {
if (res.code == 200) {
if(!res.result) return;
console.log('~~~~~~~~~~~~~~~~~~~~',res)
this.enterpriseInfo = [
...this.enterpriseInfo,
{
fieldName: "承包商名称",
fieldName2: "项目施工区域",
value: res.result.projectDirectorName,
value2: res.result.projectDirectorPhone,
},
{
fieldName: "竣工日期",
fieldName2: "项目类型",
value: res.result.projectDirectorName,
value2: res.result.projectDirectorPhone,
},
{
fieldName: "项目经理",
fieldName2: "维度位置",
value: res.result.projectManage,
value2: res.result.latitude,
},
{
fieldName: "经度位置",
fieldName2: "工程类别",
value: res.result.longitude,
value2: res.result.engineeringPurpose,
},
{
fieldName: "项目编号",
fieldName2: "结构类型",
value: res.result.projectNumber,
value2: res.result.structureType,
},
{
fieldName: "项目面积(m²)",
fieldName2: "工程状态",
value: res.result.projectAcreage,
value2: res.result.bulidStatus,
},
{
fieldName: "开工日期",
fieldName2: "施工阶段",
value: res.result.startWorkDate,
value2: res.result.constructionStage,
},
{
fieldName: "现场布置图",
fieldName2: "现场施工图",
value: res.result.layoutImage,
value2: res.result.constructionMapUrl,
},
{
fieldName: "联系电话",
value: res.result.projectTel,
},
]
}
});
},
// //
getEnterpriseInfoById() { getEnterpriseInfoById() {
let data = { let data = {
@ -493,6 +562,7 @@ export default {
}, },
]; ];
this.infoEnterpriseId = res.result.id; this.infoEnterpriseId = res.result.id;
this.getDataDateils();
console.log(this.enterpriseInfo,666777888) console.log(this.enterpriseInfo,666777888)
} }
}); });