Commit 136743d3 authored by tyn's avatar tyn

fix

parent b4d107ec
...@@ -2,13 +2,24 @@ import request from '@/utils/request'; ...@@ -2,13 +2,24 @@ import request from '@/utils/request';
/** /**
* 获取咨询机构合作列表 * 获取咨询机构合作列表
* @param {*} data * @param {*} params
* @returns * @returns
*/ */
export const getConsultingAgencyCooperationListApi = (data) => request({ export const getConsultingAgencyCooperationListApi = (params) => request({
url: "/customerInfo/advisoryList", url: "/customerInfo/advisoryList",
method: "get", method: "get",
data params
});
/**
* 获取咨询机构合作工程类型
* @param {*} params
* @returns
*/
export const getConsultingAgencyCooperationTypesApi = (params) => request({
url: "/dProjectType/getAll",
method: "get",
params
}); });
/** /**
......
<template>
<div class="consulting-agency-container">
<el-form :model="comProjectDetailInfo" :rules="rules" :show-message="false" class="basic-engineering-information-inner"
ref="comProjectDetailForm">
<!-- 基础信息 -->
<div class="project-basic-information project-detault-module">
<div class="info-module-title"><span>基础信息</span></div>
<table>
<!-- <colgroup>
<col>
<col :style="{width : tableKeyWidth}">
<col>
<col :style="{width : tableKeyWidth}">
</colgroup> -->
<tr>
<td class="table-key">咨询机构名称</td>
<td :class="[comIsModify ? 'td-none-padding' : '']">
<div class="normal-value" v-if="!comIsModify">
{{comProjectDetailInfo.advisoryBody && comProjectDetailInfo.advisoryBody.advisoryBodyName ? comProjectDetailInfo.advisoryBody.advisoryBodyName : "-"}}
</div>
<el-form-item label="" v-if="comIsModify" prop="advisoryBody.advisoryBodyName">
<el-input v-model="comProjectDetailInfo.advisoryBody.advisoryBodyName" clearable v-focus placeholder="请输入完整咨询机构名称"
@input="searchConsulting"></el-input>
</el-form-item>
</td>
<td class="table-key">法人代表</td>
<td>
{{comProjectDetailInfo.corporatePerson ? comProjectDetailInfo.corporatePerson : "-"}}
</td>
</tr>
<tr>
<!-- <td class="table-key">法人联系电话</td>
<td>
{{comProjectDetailInfo.corporatePerson ? comProjectDetailInfo.corporatePerson : "-"}}
</td> -->
<td class="table-key">注册地址</td>
<td colspan="3">
{{comProjectDetailInfo.regAddress ? comProjectDetailInfo.regAddress : "-"}}
</td>
</tr>
</table>
</div>
<!-- 项目联系人 -->
<div class="project-contact project-detault-module">
<div class="info-module-title"><span>项目联系人</span></div>
<table>
<!-- <colgroup>
<col>
<col :style="{width : tableKeyWidth}">
<col>
<col :style="{width : tableKeyWidth}">
</colgroup> -->
<tr>
<td class="table-key">项目负责人</td>
<td :class="[comIsModify ? 'td-none-padding' : '']">
<div class="normal-value" v-if="!comIsModify">
{{comProjectDetailInfo.advisoryBodyProject && comProjectDetailInfo.advisoryBodyProject.projectLeader ? comProjectDetailInfo.advisoryBodyProject.projectLeader : "-"}}
</div>
<el-form-item label="" v-if="comIsModify" prop="advisoryBodyProject.projectLeader">
<el-input v-model="comProjectDetailInfo.advisoryBodyProject.projectLeader" clearable placeholder="请输入项目负责人"></el-input>
</el-form-item>
</td>
<td class="table-key">项目负责人专业</td>
<td :class="[comIsModify ? 'td-none-padding' : '']">
<div class="normal-value" v-if="!comIsModify">
{{comProjectDetailInfo.advisoryBodyProject && comProjectDetailInfo.advisoryBodyProject.projectLeaderMajor ? comProjectDetailInfo.advisoryBodyProject.projectLeaderMajor : "-"}}
</div>
<el-form-item label="" v-if="comIsModify" prop="advisoryBodyProject.projectLeaderMajor">
<el-input v-model="comProjectDetailInfo.advisoryBodyProject.projectLeaderMajor" clearable placeholder="请输入项目负责人专业"></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td class="table-key">联系电话</td>
<td colspan="3" :class="[comIsModify ? 'td-none-padding' : '']">
<div class="normal-value" v-if="!comIsModify">
{{comProjectDetailInfo.advisoryBodyProject && comProjectDetailInfo.advisoryBodyProject.projectLeaderPhone ? comProjectDetailInfo.advisoryBodyProject.projectLeaderPhone : "-"}}
</div>
<el-form-item label="" v-if="comIsModify" prop="advisoryBodyProject.projectLeaderPhone">
<el-input v-model="comProjectDetailInfo.advisoryBodyProject.projectLeaderPhone" clearable placeholder="请输入项目负责人联系电话"></el-input>
</el-form-item>
</td>
</tr>
</table>
</div>
<!-- 项目结算信息 -->
<div class="project-settlement-information project-detault-module">
<div class="info-module-title"><span>项目结算信息</span></div>
<table>
<!-- <colgroup>
<col>
<col :style="{width : tableKeyWidth}">
<col>
<col :style="{width : tableKeyWidth}">
</colgroup> -->
<tr>
<td class="table-key">结算开始时间</td>
<td :class="[comIsModify ? 'td-none-padding' : '']">
<div class="normal-value" v-if="!comIsModify">
{{comProjectDetailInfo.advisoryBodyProject && comProjectDetailInfo.advisoryBodyProject.settleStartTime ? comProjectDetailInfo.advisoryBodyProject.settleStartTime : "-"}}
</div>
<el-form-item label="" v-if="comIsModify" prop="advisoryBodyProject.settleStartTime">
<el-date-picker v-model="comProjectDetailInfo.advisoryBodyProject.settleStartTime" type="datetime" placeholder="选择结算开始时间"
:value-format="'yyyy-MM-dd HH:mm:ss'">
</el-date-picker>
</el-form-item>
</td>
<td class="table-key">结算完成时间</td>
<td :class="[comIsModify ? 'td-none-padding' : '']">
<div class="normal-value" v-if="!comIsModify">
{{comProjectDetailInfo.advisoryBodyProject && comProjectDetailInfo.advisoryBodyProject.settleFinishTime ? comProjectDetailInfo.advisoryBodyProject.settleFinishTime : "-"}}
</div>
<el-form-item label="" v-if="comIsModify" prop="advisoryBodyProject.settleFinishTime">
<el-date-picker v-model="comProjectDetailInfo.advisoryBodyProject.settleFinishTime" type="datetime" placeholder="选择结算完成时间"
:value-format="'yyyy-MM-dd HH:mm:ss'">
</el-date-picker>
</el-form-item>
</td>
</tr>
<tr>
<td class="table-key">是否为终审单位</td>
<td colspan="3">
<div class="normal-value" v-if="!comIsModify">
{{comProjectDetailInfo.advisoryBodyProject && statusCheck(comProjectDetailInfo.advisoryBodyProject.isFinalJudgeUnit) ? statusCheck(comProjectDetailInfo.advisoryBodyProject.isFinalJudgeUnit) : "-"}}
</div>
<el-form-item label="" v-if="comIsModify" prop="advisoryBodyProject.isFinalJudgeUnit">
<el-radio-group v-model="comProjectDetailInfo.advisoryBodyProject.isFinalJudgeUnit">
<el-radio :label="'0'"></el-radio>
<el-radio :label="'1'"></el-radio>
</el-radio-group>
</el-form-item>
</td>
</tr>
</table>
</div>
<!-- 自定义表单部分 -->
<el-form :model="form" class="custom-design-form-template" ref="customDesignFormTemplate" v-if="form.subfieldModuleList.length">
<div class="custom-design-form-module" v-for="(item,index) of form.subfieldModuleList" :key="item.uid">
<div class="info-module-title"><span>{{item.subfieldModuleName}}</span></div>
<div class="custom-module-content">
<!-- 生成行 -->
<div class="custom-module-row" v-for="(row,rowIndex) of item.childrentGroup" :key="rowIndex">
<div class="custom-module-item" v-for="(column,columnIndex) of row" :key="column.uid" :style="itemStyles(column,rowIndex,columnIndex)">
<div class="custom-item-key">
<div class="custom-item-key-inner" :class="{'is-required-key' : column.formAttribute.required}">
{{column.formAttribute.label}}
</div>
</div>
<!-- 组件容器 -->
<div class="custom-item-com-box">
<dsk-custom-item-render :custom-item="column" :custom-module-index="index" :custom-row-index="rowIndex"
:custom-item-index="columnIndex" :isModify="comIsModify"></dsk-custom-item-render>
</div>
</div>
</div>
</div>
</div>
</el-form>
</el-form>
</div>
</template>
<script>
import { searchConsultingApi, getCustomFormDetailApi, getCustomFormDataByProjectKeyApi } from "@/api/consultingOrgManagement";
import { elementMessageSingleton, jsonStrToObject, groupArray } from "@/utils";
import { cloneDeep } from "lodash-es";
import DskTextOverFlowTip from "@/components/DskTextOverFlowTip";
import DskCustomItemRender from "@/components/DskCustomItemRender";
export default {
name: "consultingAgency",
components: {
DskCustomItemRender,
DskTextOverFlowTip
},
props: {
projectDetailInfo: Object,
isModify: {
type: Boolean,
default: false
},
projectKey: {
type: String,
default: ""
}
},
directives: {
focus: {
inserted(el) {
el.querySelector(".el-input__inner").focus();
}
}
},
watch: {
projectDetailInfo: {
handler(newValue, oldValue) {
this.setInitData(this.comProjectDetailInfo, JSON.parse(JSON.stringify(newValue)), "comProjectDetailInfo");
this.setInitData(this.oldComProjectDetailInfo, JSON.parse(JSON.stringify(oldValue)), "oldComProjectDetailInfo");
},
deep: true
},
isModify: {
handler(newValue) {
this.comIsModify = newValue;
}
}
},
data() {
const phoneValidator = (rule, value, callback) => {
const phoneReg = /^1[3-9]\d{9}$/;
// if (!value && !value?.toString()?.trim()) {
// return callback(new Error(`请输入项目负责人联系电话`));
// }
if (value && !phoneReg.test(value)) {
return callback(new Error(`请输入正确的联系电话`));
}
return callback();
};
return {
comIsModify: this.isModify,
comProjectDetailInfo: {},
oldComProjectDetailInfo: {},
rules: {
"advisoryBody.advisoryBodyName": [{ required: true, trigger: ["blur", "change"], message: "咨询机构名称不能为空" }],
"advisoryBodyProject.projectLeaderPhone": [{ required: true, trigger: ["blur", "change"], validator: phoneValidator }],
},
tableKeyWidth: 0,
searchTimer: null,
loading: false,
formTemplate: {},
formTemplateData: {},
form: {
subfieldModuleList: []
},
oldSubfieldModuleList: []
};
},
//可访问data属性
created() {
this.setInitData(this.comProjectDetailInfo, JSON.parse(JSON.stringify(this.projectDetailInfo)), "comProjectDetailInfo");
this.setInitData(this.oldComProjectDetailInfo, JSON.parse(JSON.stringify(this.projectDetailInfo)), "oldComProjectDetailInfo");
this.setTableKeyWidth();
this.formTemplateInit();
},
//计算集
computed: {
},
//方法集
methods: {
itemStyles(item, index, selfIndex) {
const styles = {
width: `${item.formAttribute.width}%`
};
if (index > 0) {
styles["border-top"] = "unset";
}
if (selfIndex > 0) {
styles["border-left"] = "unset";
}
return styles;
},
setInitData(originData, mergeData, mergeKey) {
if (!mergeData.advisoryBody) mergeData.advisoryBody = {};
if (!mergeData.advisoryBodyProject) mergeData.advisoryBodyProject = {};
// 响应更新
this.$set(this, mergeKey, { ...this[mergeKey], ...mergeData });
},
statusCheck(status) {
if (status == "0") {
return "是";
}
if (status == "1") {
return "否";
}
return "";
},
async formTemplateInit() {
try {
this.loading = true;
this.$emit("searchLoadingChange", this.loading);
const _formTemplate = await this.getCustomFormDetail();
this.formTemplate = cloneDeep(_formTemplate);
let _formTemplateData = await this.getCustomFormDataByProjectKey(this.projectKey);
_formTemplateData ? this.formTemplateData = cloneDeep(_formTemplateData) : null;
await this.customFormRender(_formTemplate, _formTemplateData);
} catch (error) {
} finally {
this.loading = false;
this.$emit("searchLoadingChange", this.loading);
}
},
async customFormRender(formTemplate, formData) {
try {
// 缺失模板不渲染
if (!formTemplate || !formTemplate.jsonData) return;
const template = jsonStrToObject(formTemplate.jsonData);
const templateFormData = formData && formData.jsonData ? JSON.parse(formData.jsonData) : null;
if (template) {
// 模板
let subfieldModuleListTemplate = template.subfieldModuleList;
// 有表单数据先处理数据
if (templateFormData) {
subfieldModuleListTemplate = this.hasCustomFormDataHandle(subfieldModuleListTemplate, templateFormData);
}
// 渲染模板
this.renderTemplate(subfieldModuleListTemplate);
}
} catch (error) {
this.$message.error(`解析模板失败,${error.message}`);
console.log(error);
}
},
hasCustomFormDataHandle(formTemplate, formData) {
// console.log(formTemplate);
// console.log(formData);
formData.forEach(item => {
this.interComTemplateParent(formTemplate, item);
});
return cloneDeep(formTemplate);
},
interComTemplateParent(formTemplate, comItem) {
const module = formTemplate.find(item => item.uid === comItem.pid);
if (module) {
const index = module.children.findIndex(child => child.uid === comItem.uid);
// 找到模板 插入数据
if (index > -1) {
module.children[index].componentAttribute.value = comItem.componentAttribute.value;
}
}
},
renderTemplate(template) {
const table = this.createTemplateTable(template);
this.oldSubfieldModuleList = cloneDeep(table);
this.$set(this.form, "subfieldModuleList", table);
},
// 创建渲染table展示格式
createTemplateTable(list) {
/**
* @type {Array<any>}
*/
const tableList = list;
for (const iterator of tableList) {
const len = iterator?.children?.length;
if (len) {
const _childrentGroup = groupArray(iterator?.children, 100, "formAttribute.width");
// 分组过后的值
iterator["childrentGroup"] = cloneDeep(_childrentGroup);
}
}
return tableList;
},
async getCustomFormDataByProjectKey(projectKey) {
try {
const result = await getCustomFormDataByProjectKeyApi(projectKey);
if (result.code == 200 && result.data) {
return result.data;
}
return null;
} catch (error) {
}
},
async getCustomFormDetail() {
try {
const result = await getCustomFormDetailApi();
if (result.code == 200) {
return result.data ? result.data : {};
}
} catch (error) {
}
},
async setTableKeyWidth() {
try {
await this.$nextTick();
/**
* @type {HTMLDivElement}
*/
// const inner = this.$el.querySelector(".basic-engineering-information-inner");
// if (inner) {
// const td = parseInt((inner.offsetWidth - 140 * 2) / 2);
// this.tableKeyWidth = `${parseInt(parseFloat(td / inner.offsetWidth) * 100)}%`;
// }
this.tableKeyWidth = "180px";
} catch (error) {
}
},
cancelModify() {
this.comProjectDetailInfo = JSON.parse(JSON.stringify(this.oldComProjectDetailInfo));
this.$set(this.form, "subfieldModuleList", cloneDeep(this.oldSubfieldModuleList));
},
async searchConsulting(keywords) {
try {
if ((keywords || keywords == "0") && keywords?.toString()?.trim() && keywords?.toString()?.trim()?.length >= 1) {
this.clearSearchTimer();
this.loading = true;
this.$emit("searchLoadingChange", this.loading);
await new Promise((resolve, reject) => {
this.searchTimer = setTimeout(async () => {
try {
const result = await this.searchConsultingHandle(keywords.toString().trim());
if (result) {
this.updateTemplate(result);
}
resolve();
} catch (error) {
reject(error);
}
}, 1000);
});
}
} catch (error) {
console.log(error);
} finally {
this.loading = false;
this.$emit("searchLoadingChange", this.loading);
}
},
async searchConsultingHandle(keywords) {
try {
const searchResult = await searchConsultingApi(keywords);
if (searchResult.code == 200 && searchResult.data) {
return searchResult.data;
}
} catch (error) {
console.log(error);
}
},
updateTemplate(data) {
const updateMap = new Map([
["advisoryBody.advisoryBodyName", "advisoryBodyName"],
["advisoryBody.advisoryBodyCid", "advisoryBodyCid"],
["advisoryBody.businessScope", "businessScope"],
["isNewAdvisoryBody", "isNewAdvisoryBody"],
["corporatePerson", "corporatePerson"],
["regAddress", "regAddress"],
]);
this.setTemplateData(updateMap, data);
console.log(this.comProjectDetailInfo);
},
setTemplateData(mapData, data) {
/**
* @type {Map<string,string>}
*/
const _mapTemp = mapData;
// 寻找对应的赋值对象
for (const [key, value] of _mapTemp) {
const keys = key.split(".");
const len = keys.length;
if (len == 1) {
this.$set(this.comProjectDetailInfo, key, data[value]);
continue;
}
const currentObjectKey = keys[len - 2];
const currentKey = keys[len - 1];
const currentObject = this.findCurrent(this.comProjectDetailInfo, currentObjectKey);
this.$set(currentObject, currentKey, data[value]);
}
},
findCurrent(originData, key) {
for (const _key in originData) {
if (_key == key) {
return originData[_key];
}
if (Object.prototype.toString.call(originData[_key]) == "[object Object]") {
return this.findCurrent(originData[_key], key);
}
}
},
clearSearchTimer() {
clearTimeout(this.searchTimer);
this.searchTimer = null;
},
async updateConsultingDetail() {
try {
const flag = await this.$refs["comProjectDetailForm"].validate();
const customFormFlag = await this.$refs["customDesignFormTemplate"].validate();
if (flag && customFormFlag) {
// 通过验证校验咨询机构是否存在
const result = await this.searchConsultingHandle(this.comProjectDetailInfo.advisoryBody.advisoryBodyName);
if (result.advisoryBodyCid) {
const _temp = JSON.parse(JSON.stringify(this.comProjectDetailInfo));
const paramsData = {
isNewAdvisoryBody: _temp.isNewAdvisoryBody ? _temp.isNewAdvisoryBody : result.isNewAdvisoryBody,
projectKey: this.projectKey,
advisoryBodyCid: _temp.advisoryBody.advisoryBodyCid,
advisoryBodyName: _temp.advisoryBody.advisoryBodyName ?? "",
businessScope: _temp.advisoryBody.businessScope ?? "",
projectLeader: _temp.advisoryBodyProject.projectLeader ?? "",
projectLeaderMajor: _temp.advisoryBodyProject.projectLeaderMajor ?? "",
projectLeaderPhone: _temp.advisoryBodyProject.projectLeaderPhone ?? "",
projectLeaderPhone: _temp.advisoryBodyProject.projectLeaderPhone ?? "",
settleStartTime: _temp.advisoryBodyProject.settleStartTime ?? "",
settleFinishTime: _temp.advisoryBodyProject.settleFinishTime ?? "",
isFinalJudgeUnit: _temp.advisoryBodyProject.isFinalJudgeUnit ?? "",
};
const customFormData = this.saveCutomFormData();
const customFormParamsData = {
projectKey: this.projectKey,
templateId: this.formTemplate.templateId,
jsonData: JSON.stringify(customFormData)
};
// 处理自定义表单数据
this.$emit("editComProjectDetailSuccess", paramsData, customFormParamsData);
}
}
} catch (error) {
if (error) {
for (const key in error) {
const _temp = error[key];
_temp instanceof Array ? elementMessageSingleton("error", `${_temp[0].message}`) : null;
break;
}
}
}
},
saveCutomFormData() {
/**
* @type {Array<any>}
*/
let _array = cloneDeep(this.form.subfieldModuleList);
function flatCustomForm(arr) {
const _temp = [];
function flagArray(array) {
array.forEach(item => {
if (item?.length) {
flagArray(item);
} else {
_temp.push(item);
}
});
}
arr.forEach(item => {
flagArray(item.childrentGroup);
});
return _temp;
}
const _result = flatCustomForm(_array);
return _result;
}
},
}
</script>
<style lang="scss" scoped>
.consulting-agency-container {
width: 100%;
height: 100%;
background: #fff;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
padding: 16px;
box-sizing: border-box;
overflow: auto;
::v-deep .basic-engineering-information-inner {
width: 100%;
.project-detault-module,
.custom-design-form-module {
.info-module-title {
line-height: 24px;
color: #232323;
font-weight: bold;
font-size: 16px;
margin-bottom: 16px;
display: flex;
align-items: center;
& > span {
display: inline-block;
position: relative;
padding-left: 8px;
box-sizing: border-box;
&::before {
content: "";
position: absolute;
left: 0px;
top: 50%;
transform: translateY(-50%);
background: rgba(35, 35, 35, 0.8);
width: 2px;
height: 14px;
}
}
}
.el-form-item {
position: relative;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
margin-bottom: 0px;
z-index: 9;
&.is-error {
.el-form-item__content {
.el-input {
.el-input__inner {
border-color: #ff4949;
}
}
}
}
.el-form-item__content {
height: 100%;
font-size: 12px;
line-height: unset;
.el-input {
height: 100%;
font-size: 12px;
}
.el-input__inner {
height: 40px;
line-height: 40px;
border-radius: unset;
border-color: transparent;
color: #232323;
font-size: 12px;
font-weight: 400;
padding-left: 12px;
outline: unset;
box-sizing: border-box;
&:focus {
border: 1px solid #0081ff;
}
}
.el-date-editor {
width: 100%;
.el-input__prefix {
display: none;
}
}
.el-radio-group {
display: flex;
height: 100%;
align-items: center;
padding-left: 12px;
box-sizing: border-box;
.el-radio__input.is-checked .el-radio__inner {
border-color: #0081ff;
background: #0081ff;
}
.el-radio__input.is-checked + .el-radio__label {
color: #0081ff;
}
.el-radio__inner:hover {
border-color: #0081ff;
}
}
.el-textarea {
.el-textarea__inner {
resize: unset;
padding-left: 12px;
min-height: 76px !important;
border-radius: unset;
border-color: transparent;
color: #232323;
&:focus {
border: 1px solid #0081ff;
}
&::placeholder {
font-family: Arial, Helvetica, sans-serif !important;
font-size: 12px;
}
}
}
.el-select {
width: 100%;
}
}
}
table {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
table-layout: fixed;
&,
th,
td {
border: 1px solid #e6eaf1;
box-sizing: border-box;
}
td {
padding: 9px 12px;
line-height: 22px;
color: #232323;
font-size: 12px;
position: relative;
.normal-value {
vertical-align: middle;
line-height: 22px;
}
}
.table-key {
background: #f0f3fa;
color: rgba(35, 35, 35, 0.8);
width: 180px;
&.lot {
height: 62px;
}
}
.td-none-padding {
padding: 0px;
}
.data-td {
width: calc(100% - 180px);
}
}
}
.project-contact,
.project-settlement-information {
margin-top: 24px;
}
.custom-design-form-template {
width: 100%;
.custom-design-form-module {
margin-top: 24px;
.custom-module-content {
display: flex;
flex-direction: column;
width: 100%;
/* border: 1px solid #e6eaf1; */
box-sizing: border-box;
.custom-module-row {
display: flex;
align-items: center;
}
.custom-module-item {
display: flex;
border: 1px solid #e6eaf1;
box-sizing: border-box;
.custom-item-key {
width: 180px;
min-height: 40px;
font-size: 12px;
background: #f0f3fa;
color: rgba(35, 35, 35, 0.8);
padding: 9px 12px;
border-right: 1px solid #e6eaf1;
box-sizing: border-box;
display: flex;
align-items: center;
.custom-item-key-inner {
width: 100%;
// white-space: nowrap;
// overflow: hidden;
// text-overflow: ellipsis;
&.is-required-key {
&::before {
content: "*";
color: #f56c6c;
margin-right: 4px;
}
}
}
}
.custom-item-com-box {
width: calc(100% - 180px);
min-height: 40px;
display: flex;
align-items: center;
}
}
}
}
}
}
}
</style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="head-form-new" :class="headerFixed ? 'headerFixed':''"> <div class="head-form-new" :class="headerFixed ? 'headerFixed':''">
<div class="common-title" v-if="title && title !='集团招标'">{{ title }}</div> <div class="common-title" v-if="title && title !='集团招标'">{{ title }}</div>
<div class="flex-box query-box"> <div class="flex-box query-box">
<div class="flex-box query-params"> <div class="flex-box query-params" v-if="comFormData && comFormData.length">
<div class="headForm-from"> <div class="headForm-from">
<div class="from-item" :key="i" v-for="(form, i) in comFormData"> <div class="from-item" :key="i" v-for="(form, i) in comFormData">
<!-- 单选 --> <!-- 单选 -->
......
...@@ -224,7 +224,7 @@ export default { ...@@ -224,7 +224,7 @@ export default {
} }
.el-table { .el-table {
.cell { .cell {
font-size: 14px; font-size: 12px;
} }
.el-table__header-wrapper { .el-table__header-wrapper {
min-height: 40px; min-height: 40px;
......
...@@ -64,7 +64,12 @@ ...@@ -64,7 +64,12 @@
<!-- 2、准入情况 --> <!-- 2、准入情况 -->
<access-condition v-if="currentPath.pathName=='accessCondition'" :company-id="companyId" :companyInfo="companyInfo"></access-condition> <access-condition v-if="currentPath.pathName=='accessCondition'" :company-id="companyId" :companyInfo="companyInfo"></access-condition>
<!-- 3、供应商合作记录 --> <!-- 3、供应商合作记录 -->
<cooperation-record v-if="currentPath.pathName=='cooperationRecord'" :company-id="companyId" :company-name="companyName"></cooperation-record> <cooperation-record v-if="currentPath.pathName=='cooperationRecord'" :company-id="companyId"
:company-name="companyName"></cooperation-record>
<!-- 4、施工业绩 -->
<construction-performance v-if="currentPath.pathName=='constructionPerformance'" :company-id="companyId"></construction-performance>
<!-- 5、在施工程情况 -->
<construction-situation v-if="currentPath.pathName=='constructionSituation'" :company-id="companyId"></construction-situation>
</template> </template>
<template v-if="customerId && isCustomer"> <template v-if="customerId && isCustomer">
<!-- 商务信息 --> <!-- 商务信息 -->
...@@ -138,6 +143,8 @@ import Gjjl from "../../project/projectList/component/gjjl"; //跟进记录 ...@@ -138,6 +143,8 @@ import Gjjl from "../../project/projectList/component/gjjl"; //跟进记录
import ConsultingAgencyCooperation from "@/views/detail/party-a/internalCooperation/consultingAgencyCooperation"; //内部合作 咨询机构合作 import ConsultingAgencyCooperation from "@/views/detail/party-a/internalCooperation/consultingAgencyCooperation"; //内部合作 咨询机构合作
import AccessCondition from "@/views/detail/party-a/internalCooperation/accessCondition"; //内部合作 准入情况 import AccessCondition from "@/views/detail/party-a/internalCooperation/accessCondition"; //内部合作 准入情况
import CooperationRecord from "@/views/detail/party-a/internalCooperation/cooperationRecord"; //内部合作 准入情况 import CooperationRecord from "@/views/detail/party-a/internalCooperation/cooperationRecord"; //内部合作 准入情况
import ConstructionPerformance from "@/views/detail/party-a/internalCooperation/constructionPerformance"; //内部合作 施工业绩
import ConstructionSituation from "@/views/detail/party-a/internalCooperation/constructionSituation"; //内部合作 在施工程情况
import { import {
urbanInvestmentPage, urbanInvestmentPage,
} from '@/api/detail/party-a/urbanLnvestment'; } from '@/api/detail/party-a/urbanLnvestment';
...@@ -189,7 +196,9 @@ export default { ...@@ -189,7 +196,9 @@ export default {
AccessCondition, AccessCondition,
CooperationRecord, CooperationRecord,
CooperativeConstructionUnit, CooperativeConstructionUnit,
CooperativeGroup CooperativeGroup,
ConstructionPerformance,
ConstructionSituation
}, },
data() { data() {
return { return {
......
<template>
<div class="construction-performance-container">
<head-form-new title="施工业绩" :query-params="queryParams" :total="tableDataTotal" :isExcel="false" @handle-search="handleSearch"
ref="searchFormNew" />
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
<tables v-if="!isSkeleton" :indexFixed="true" :tableData="tableData" :forData="forData" :tableDataTotal="tableDataTotal"
:queryParams="queryParams" @handle-current-change="handleCurrentChange">
</tables>
</div>
</template>
<script>
import skeleton from '../component/skeleton';
import mixin from '@/views/detail/party-a/mixins/mixin';
import { } from "@/api/internalCooperation";
import { } from "@/api/common";
export default {
name: "constructionPerformance",
mixins: [mixin],
components: {
skeleton
},
props: ['companyId'],
data() {
return {
queryParams: {
advisoryBodyCid: this.companyId,
pageNum: 1,
pageSize: 10,
},
forData: [
{ label: '标志性工程', prop: 'bzxgc', width: '245', showOverflowTooltip: true },
{ label: '年度', prop: 'nd', width: '122' },
{ label: '所在区域', prop: 'szqy', width: '101' },
{ label: '所属省份', prop: 'sssf', width: '101' },
{ label: '施工面积(㎡)', prop: 'sgmj', width: '109' },
{ label: '年施工产值(亿)', prop: 'nsgcz', width: '121' },
{ label: '所获荣誉', prop: 'shry', width: '73' },
{ label: '备注说明', prop: 'bzsm', minWidth: '121' },
{ label: '考察项目', prop: 'kcxm', minWidth: '245', showOverflowTooltip: true },
{ label: '考察公司', prop: 'kcgs', minWidth: '192', showOverflowTooltip: true },
],
//列表
tableLoading: false,
tableData: [
{
bzxgc: "黄阁水厂二期扩建工程设计咨询服务项目",
nd: "2023年",
szqy: "华北地区",
sssf: "河北省",
sgmj: "231.25",
nsgcz: "12",
shry: "优质工程",
bzsm: "",
kcxm : "黄阁水厂二期扩建工程设计咨询服务项目",
kcgs : "中国建筑一局第二建筑有限公司"
},
{
bzxgc: "黄阁水厂二期扩建工程设计咨询服务项目",
nd: "2023年",
szqy: "华北地区",
sssf: "河北省",
sgmj: "231.25",
nsgcz: "23",
shry: "优质工程",
bzsm: "",
kcxm : "黄阁水厂二期扩建工程设计咨询服务项目",
kcgs : "中国建筑一局第二建筑有限公司"
},
],
tableDataTotal: 2,
isSkeleton: true,
};
},
//可访问data属性
created() {
this.initDetail();
},
//计算集
computed: {
},
//方法集
methods: {
async initDetail() {
try {
await this.handleQuery();
} catch (error) {
}
},
async handleQuery(params) {
try {
// let data = params ? params : this.queryParams;
// this.isSkeleton = true;
// const res = await getConsultingAgencyCooperationListApi(data);
// this.tableData = res.rows ? res.rows : [];
// this.tableDataTotal = res.total ? res.total : 0;
} catch (error) {
console.log(error);
} finally {
this.isSkeleton = false;
}
},
async handleSearch() {
try {
} catch (error) {
}
}
},
}
</script>
<style lang="scss" scoped>
.construction-performance-container {
background: #ffffff;
border-radius: 4px;
padding: 16px;
input {
border: 1px solid #efefef;
}
::v-deep .el-form-item {
margin-right: 8px !important;
}
.query-box {
margin: 10px 0 20px;
}
.cell-span {
display: inline-block;
position: relative;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
cursor: pointer;
> span {
display: inline-block;
width: 37px;
position: absolute;
right: 0;
bottom: 0;
background-color: #fff;
z-index: 1;
}
}
@import "@/assets/styles/search-common.scss";
}
</style>
<template>
<div class="construction-situation-container">
<head-form-new title="在施工程情况" :query-params="queryParams" :total="tableDataTotal" :isExcel="false" @handle-search="handleSearch"
ref="searchFormNew" />
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
<tables v-if="!isSkeleton" :indexFixed="true" :tableData="tableData" :forData="forData" :tableDataTotal="tableDataTotal"
:queryParams="queryParams" @handle-current-change="handleCurrentChange">
</tables>
</div>
</template>
<script>
import skeleton from '../component/skeleton';
import mixin from '@/views/detail/party-a/mixins/mixin';
import { } from "@/api/internalCooperation";
import { } from "@/api/common";
export default {
name: "constructionSituation",
mixins: [mixin],
components: {
skeleton
},
props: ['companyId'],
data() {
return {
queryParams: {
advisoryBodyCid: this.companyId,
pageNum: 1,
pageSize: 10,
},
forData: [
{ label: '工程名称', prop: 'gcmc', width: '245', showOverflowTooltip: true },
{ label: '施工承包范围', prop: 'sgcbfw', width: '101' },
{ label: '建筑平面(㎡)', prop: 'szqy', width: '109' },
{ label: '队长名称', prop: 'dzmc', width: '73' },
{ label: '管理人员数量(人)', prop: 'glrysl', width: '130' },
{ label: '施工人员数量(人)', prop: 'sgrysl', width: '130' },
{ label: '质量目标', prop: 'zlmb', width: '121' },
{ label: '考察项目', prop: 'kcxm', minWidth: '245', showOverflowTooltip: true },
{ label: '考察公司', prop: 'kcgs', minWidth: '192', showOverflowTooltip: true },
],
//列表
tableLoading: false,
tableData: [
{
gcmc: "黄阁水厂二期扩建工程设计咨询服务项目",
sgcbfw: "2023年",
szqy: "233.33",
dzmc: "张林",
glrysl: "32",
sgrysl: "21233",
zlmb: "优质工程",
kcxm: "黄阁水厂二期扩建工程设计咨询服务项目",
kcgs: "中国建筑一局第二建筑有限公司"
},
{
gcmc: "黄阁水厂二期扩建工程设计咨询服务项目",
sgcbfw: "2023年",
szqy: "233.33",
dzmc: "张林",
glrysl: "32",
sgrysl: "21233",
zlmb: "优质工程",
kcxm: "黄阁水厂二期扩建工程设计咨询服务项目",
kcgs: "中国建筑一局第二建筑有限公司"
},
],
tableDataTotal: 2,
isSkeleton: true,
};
},
//可访问data属性
created() {
this.initDetail();
},
//计算集
computed: {
},
//方法集
methods: {
async initDetail() {
try {
await this.handleQuery();
} catch (error) {
}
},
async handleQuery(params) {
try {
// let data = params ? params : this.queryParams;
// this.isSkeleton = true;
// const res = await getConsultingAgencyCooperationListApi(data);
// this.tableData = res.rows ? res.rows : [];
// this.tableDataTotal = res.total ? res.total : 0;
} catch (error) {
console.log(error);
} finally {
this.isSkeleton = false;
}
},
async handleSearch() {
try {
} catch (error) {
}
}
},
}
</script>
<style lang="scss" scoped>
.construction-situation-container {
background: #ffffff;
border-radius: 4px;
padding: 16px;
input {
border: 1px solid #efefef;
}
::v-deep .el-form-item {
margin-right: 8px !important;
}
.query-box {
margin: 10px 0 20px;
}
.cell-span {
display: inline-block;
position: relative;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
cursor: pointer;
> span {
display: inline-block;
width: 37px;
position: absolute;
right: 0;
bottom: 0;
background-color: #fff;
z-index: 1;
}
}
@import "@/assets/styles/search-common.scss";
}
</style>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<script> <script>
import skeleton from '../component/skeleton'; import skeleton from '../component/skeleton';
import mixin from '@/views/detail/party-a/mixins/mixin'; import mixin from '@/views/detail/party-a/mixins/mixin';
import { getConsultingAgencyCooperationListApi, exportRecordOfCooperationExcelApi } from "@/api/internalCooperation"; import { getConsultingAgencyCooperationListApi, getConsultingAgencyCooperationTypesApi, exportRecordOfCooperationExcelApi } from "@/api/internalCooperation";
import { getAllAreaApi } from "@/api/common"; import { getAllAreaApi } from "@/api/common";
import { getTreeSelectAreaList } from "@/utils"; import { getTreeSelectAreaList } from "@/utils";
export default { export default {
...@@ -73,15 +73,15 @@ export default { ...@@ -73,15 +73,15 @@ export default {
], ],
formData: [ formData: [
{ {
type: 7, fieldName: 'businessTypes', value: '', placeholder: '项目省市', uid: this.getUid(), options: [], props: { type: 7, fieldName: 'projectProvince', value: '', placeholder: '项目省市', uid: this.getUid(), options: [], props: {
multiple: true, multiple: true,
value: "value", value: "value",
label: "value", label: "value",
// checkStrictly: true // checkStrictly: true
} }
}, },
{ type: 4, fieldName: 'causeAction', value: '', placeholder: '项目承接类型', options: [], uid: this.getUid() }, { type: 4, fieldName: 'projectUndertakingType', value: '', placeholder: '项目承接类型', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'causeAction', value: '', placeholder: '工程类别明细', options: [], uid: this.getUid() }, { type: 4, fieldName: 'detailOfWorksCategory', value: '', placeholder: '工程类别明细', options: [], uid: this.getUid() },
{ type: 3, fieldName: 'advisoryBodyName', value: '', placeholder: '请输入', uid: this.getUid() }, { type: 3, fieldName: 'advisoryBodyName', value: '', placeholder: '请输入', uid: this.getUid() },
], ],
//列表 //列表
...@@ -106,6 +106,7 @@ export default { ...@@ -106,6 +106,7 @@ export default {
try { try {
await this.handleQuery(); await this.handleQuery();
await this.getAllArea(); await this.getAllArea();
await this.getConsultingAgencyCooperationTypes();
} catch (error) { } catch (error) {
} }
...@@ -122,6 +123,23 @@ export default { ...@@ -122,6 +123,23 @@ export default {
} }
}, },
async getConsultingAgencyCooperationTypes(projectTypeId) {
try {
const params = {};
if (projectTypeId) params["projectTypeId"] = projectTypeId;
const types = await getConsultingAgencyCooperationTypesApi(params);
// if (types.code == 200 && types.data instanceof Array) {
// const _temp = types.data.map(item => {
// item.name = item.projectTypeName;
// item.value = item.projectTypeId;
// return item;
// });
// this.$set(this.formData[1], "options", _temp);
// }
} catch (error) {
}
},
async handleQuery(params) { async handleQuery(params) {
try { try {
let data = params ? params : this.queryParams; let data = params ? params : this.queryParams;
...@@ -135,14 +153,11 @@ export default { ...@@ -135,14 +153,11 @@ export default {
this.isSkeleton = false; this.isSkeleton = false;
} }
}, },
async handleSearch() { async handleSearch(params) {
try { try {
console.log(params);
const areaSearchList = this.$refs["searchFormNew"].$refs["cascader"][0].getCheckedNodes(); const areaSearchList = this.$refs["searchFormNew"].$refs["cascader"][0].getCheckedNodes();
if (areaSearchList?.length) { console.log(areaSearchList);
const valueList = areaSearchList.map(item => item.value);
const result = getTreeSelectAreaList(valueList, this.areaList, "value");
console.log(result);
}
} catch (error) { } catch (error) {
} }
......
...@@ -134,7 +134,6 @@ export default { ...@@ -134,7 +134,6 @@ export default {
if (area.code == 200) { if (area.code == 200) {
this.areaList = area.data; this.areaList = area.data;
this.$set(this.formData[0], "options", this.areaList); this.$set(this.formData[0], "options", this.areaList);
console.log();
} }
} catch (error) { } catch (error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment