Commit 8140b78c authored by tianhongyang's avatar tianhongyang

Merge branch 'V20230915' of http://192.168.60.201/root/dsk-operate-sys into V20230915

parents 453eac9d 0ee1bbd3
......@@ -77,7 +77,7 @@ public class CustomerController extends BaseController {
@PostMapping("/claim")
@RepeatSubmit
public R<Map<String, Object>> claim(@RequestBody Customer customer) {
if (ObjectUtils.isEmpty(customer.getUipId())) throw new BeanException("城投uipId不能为空");
// if (ObjectUtils.isEmpty(customer.getUipId())) throw new BeanException("城投uipId不能为空");
boolean add = baseService.add(customer);
if (add) {
Map<String, Object> map = new HashMap<>();
......
......@@ -277,7 +277,7 @@ public class EnterpriseProjectService {
}
public TableDataInfo importantList(EnterpriseProjectImportantListDto dto) throws Exception{
if(ObjectUtil.isEmpty(dto.getCompanyId())) throw new BeanException("企业id不能为空!");
if(ObjectUtil.isEmpty(dto.getCid())) throw new BeanException("企业id不能为空!");
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/enterpriseProject/importantList", BeanUtil.beanToMap(dto, false, false));
return dskOpenApiUtil.responsePage(map);
}
......
......@@ -91,29 +91,27 @@ public class BusinessOpportunityRadarService {
}
ArrayList<String> companyNames = new ArrayList<>();
ArrayList<Long> cIds = new ArrayList<>();
for (Object dataMap : list) {
String name = MapUtils.getString(CommonUtils.assertAsMap(dataMap), "companyName");
String name = MapUtils.getString(CommonUtils.assertAsMap(dataMap), "name");
if (ObjectUtil.isNotEmpty(name) && name.contains("font")) {
name = name.replaceAll("<font color='red'>", "");
name = name.replaceAll("<font color='#FF204E'>", "");
name = name.replaceAll("</font>", "");
companyNames.add(name);
} else {
companyNames.add(name);
}
cIds.add(MapUtils.getLong(CommonUtils.assertAsMap(dataMap), "companyId"));
}
List<CustomerStatusListVo> claimStatusList = iCustomerService.selectStatusListByCompanyName(companyNames);
for (Object enterprise : list) {
Map<String, Object> companyMap = CommonUtils.assertAsMap(enterprise);
String companyName = MapUtils.getString(companyMap, "companyName", "");
String companyName = MapUtils.getString(companyMap, "name", "");
if (ObjectUtil.isNotEmpty(companyName) && companyName.contains("font")) {
companyName = companyName.replace("<font color='red'>", "");
companyName = companyName.replace("<font color='#FF204E'>", "");
companyName = companyName.replace("</font>", "");
}
companyMap.put("claimStatus", null);
companyMap.put("claimStatus", 0);
for (CustomerStatusListVo vo : claimStatusList) {
if (companyName.equals(vo.getCompanyName())) {
companyMap.put("claimStatus", vo.getStatus());
......
......@@ -127,8 +127,8 @@ public class MarketAnalysisService {
if (!ObjectUtils.isEmpty(map.get("data"))) {
List<Map<String, Object>> list = (List<Map<String, Object>>) map.get("data");
list.parallelStream().forEach(res -> {
Integer companyId = MapUtils.getInteger(res, "companyId");
String companyName = MapUtils.getString(res, "companyName");
Integer companyId = MapUtils.getInteger(res, "tendereeId");
String companyName = MapUtils.getString(res, "tenderee");
res.put("uipId", enterpriseService.getUipIdByCompanyNameOrCompanyId(companyName, companyId));
});
}
......@@ -140,8 +140,8 @@ public class MarketAnalysisService {
if (!ObjectUtils.isEmpty(map.get("data"))) {
List<Map<String, Object>> list = (List<Map<String, Object>>) map.get("data");
list.parallelStream().forEach(res -> {
Integer companyId = MapUtils.getInteger(res, "tendereeId");
String companyName = MapUtils.getString(res, "tenderee");
Integer companyId = MapUtils.getInteger(res, "companyId");
String companyName = MapUtils.getString(res, "companyName");
res.put("uipId", enterpriseService.getUipIdByCompanyNameOrCompanyId(companyName, companyId));
});
}
......
......@@ -228,9 +228,12 @@ ul, li {
border-color: #D9D9D9;
color: #232323;
&::placeholder {
color: rgba(35,35,35,0.5);
color: rgba(35,35,35,0.4);
}
}
.el-input__inner::placeholder{
color: rgba(35,35,35,0.4) !important;
}
.el-select .el-input .el-select__caret{
color: #232323;
}
......
......@@ -70,7 +70,7 @@ export const constantRoutes = [
path: 'index',
component: () => import('@/views/index'),
name: 'Index',
meta: { title: '首页', icon: 'index',noCache: true }
meta: { title: '首页', icon: 'index',noCache: false }
}
]
},
......
......@@ -17,40 +17,54 @@
<div class="table_search">
<div>
<el-form ref="queryForm" :model="searchParam" :inline="true" size="small">
<el-form-item prop="companyName">
<div class="newSearch">
<el-input type="text" v-model="searchParam.companyName" clearable placeholder="输入企业名称查询" @change="clearname" >
<i slot="prefix" class="el-input__icon"><img src="@/assets/images/project/sousuo.png" width="16px" @click="handleCurrentChange(1)"></i>
</el-input>
</div>
</el-form-item>
<el-form-item>
<el-cascader
ref="address1"
:class="[`select-adaptive-${inputID1}`]"
:options="addressList"
:props="addressProps"
v-model="address"
@change="handleSearch"
@change="iptAdaptive(inputID1,true)"
placeholder="地区选择"
collapse-tags
style="width: 200px;"
style="width: 130px;"
clearable></el-cascader>
</el-form-item>
<el-form-item prop="companyNatures">
<el-select v-model="searchParam.companyNatures" style="width: 175px;" @change="handleSearch" filterable collapse-tags multiple class="form-content-width" placeholder="客户性质">
<el-select v-model="searchParam.companyNatures" :class="[`select-adaptive-${inputID2}`]" style="width: 130px;" @change="iptAdaptive(inputID2,true)" multiple collapse-tags clearable class="form-content-width" placeholder="客户性质">
<el-option v-for="(item, index) in companyNaturelist" :key="index" :label="item.dictLabel" :value="item.dictValue" />
</el-select>
</el-form-item>
<el-form-item prop="isOn">
<el-select v-model="searchParam.isOn" filterable clearable style="width: 175px;" @change="handleSearch" class="form-content-width" placeholder="上市公司">
<el-select v-model="searchParam.isOn" :class="[`select-adaptive-${inputID3}`]" filterable clearable style="width: 130px;" @change="iptAdaptive(inputID3)" class="form-content-width" placeholder="上市公司">
<el-option v-for="(item, index) in isMajorlist" :key="index" :label="item.dictLabel" :value="item.dictValue" />
</el-select>
</el-form-item>
<el-form-item prop="creditLevels">
<el-select v-model="searchParam.creditLevels" style="width: 175px;" @change="handleSearch" multiple filterable collapse-tags class="form-content-width" placeholder="资信评级">
<el-select v-model="searchParam.creditLevels" :class="[`select-adaptive-${inputID4}`]" style="width: 130px;" @change="iptAdaptive(inputID4,true)" multiple collapse-tags clearable class="form-content-width" placeholder="资信评级">
<el-option v-for="(item, index) in creditLevellist" :key="index" :label="item.dictLabel" :value="item.dictValue" />
</el-select>
</el-form-item>
<el-form-item prop="companyName">
<!--<div class="newSearch">-->
<!--<el-input type="text" v-model="searchParam.companyName" clearable placeholder="输入企业名称查询" @change="clearname" >-->
<!--<i slot="prefix" class="el-input__icon"><img src="@/assets/images/project/sousuo.png" width="16px" @click="handleCurrentChange(1)"></i>-->
<!--</el-input>-->
<!--</div>-->
<!-- 未点击前的输入框样式 -->
<div class="normal-search-container" @click="showSearchBox = true" v-if="!showSearchBox">
<img src="@/assets/images/enterprise/enterprise-search-icon.svg" alt="">
<span>搜索</span>
</div>
<!-- 输入框展开后样式 -->
<transition @enter="onEnter" appear mode="out-in">
<div class="cooperate-name enterprise-search-container" id="focus1" v-if="showSearchBox">
<el-input clearable @clear="handleSearch" @focus="clickFocus('focus1')" @blur="clickFocus('focus1')" v-model="searchParam.companyName"
placeholder="输入关键词查询"></el-input>
<span @click="handleSearch">搜索</span>
</div>
</transition>
</el-form-item>
</el-form>
</div>
......@@ -296,6 +310,8 @@
import batchimport from '../../project/projectList/component/batchImport'
import skeleton from '../../project/projectList/component/skeleton'
import { encodeStr } from '@/assets/js/common'
import { v4 } from "uuid";
import gsap from "gsap";
export default {
name: 'CustomList',
components:{batchimport,skeleton},
......@@ -366,6 +382,11 @@
isSkeleton:true,
companypage:1,
isscroll:false,
inputID1:this.getUid(),
inputID2:this.getUid(),
inputID3:this.getUid(),
inputID4:this.getUid(),
showSearchBox: false
}
},
created() {
......@@ -394,6 +415,21 @@
)
},
methods:{
onEnter(el, done) {
gsap.from(el, {
opacity: 0,
width: 0,
});
gsap.to(el, {
opacity: 1,
width: 242,
onComplete() {
// 完成动画聚焦输入框
el.querySelector("input").focus();
done();
}
});
},
async handleQuery() {
let [type1,type2] = await Promise.all([
getDictType('company_nature_type'),
......@@ -703,6 +739,98 @@
this.queryParam.registerCapital = value
else
this.queryParam.registerCapital = value.replace(/^\D*(\d*(?:\.\d{0,6})?).*$/g, '$1')//输入6位小数
},
iptAdaptive(uid, multiple = false) {
multiple ? this.multipleAdaptiveHandle(uid) : this.iptAdaptiveHandle(uid);
},
getUid() {
return v4();
},
// 多选处理
async multipleAdaptiveHandle(uid) {
try {
await this.$nextTick();
const dom = document.querySelector(`.select-adaptive-${uid}`);
const iptChild = dom.querySelector(".el-input__inner");
if (dom) {
const textContainer = document.createElement("span");
const textName = `text-${uid}`;
textContainer.classList.add(textName);
const selectChildren = dom.querySelectorAll(".el-tag");
if (selectChildren.length) {
let width = 0;
selectChildren.forEach(item => {
const text = item.textContent;
const itemInfo = window.getComputedStyle(item);
textContainer.style.setProperty("visibility", "hidden");
textContainer.style.setProperty("display", "inline-block");
textContainer.style.setProperty("font-size", "14px");
textContainer.style.setProperty("padding", itemInfo.padding);
textContainer.style.setProperty("box-sizing", "border-box");
textContainer.textContent = text;
document.body.append(textContainer);
width += textContainer.offsetWidth + parseInt(itemInfo.marginLeft) + parseInt(itemInfo.marginRight);
textContainer.remove();
});
dom.style.setProperty("width", `${width + 50}px`);
this.handleSearch();
return;
}
textContainer.style.setProperty("visibility", "hidden");
textContainer.style.setProperty("display", "inline-block");
textContainer.style.setProperty("font-size", "14px");
textContainer.style.setProperty("padding", "0px 8px");
textContainer.style.setProperty("box-sizing", "border-box");
textContainer.textContent = iptChild.getAttribute("placeholder");
document.body.append(textContainer);
// let containerWidth = textContainer.offsetWidth + 12 + 8;
let containerWidth = 130;
textContainer.remove();
dom.style.setProperty("width", `${containerWidth}px`);
this.handleSearch();
}
} catch (error) {
console.log(error);
}
},
// 单选处理
async iptAdaptiveHandle(uid) {
try {
await this.$nextTick();
const dom = document.querySelector(`.select-adaptive-${uid}`);
const realStyles = window.getComputedStyle(dom);
if (dom) {
const iptChild = dom.querySelector(".el-input__inner");
const textContainer = document.createElement("span");
const textName = `text-${uid}`;
textContainer.classList.add(textName);
textContainer.style.setProperty("visibility", "hidden");
textContainer.style.setProperty("display", "inline-block");
textContainer.style.setProperty("font-size", "14px");
const hasPadding = (parseInt(realStyles.paddingLeft) || parseInt(realStyles.paddingRight)) ? true : false;
hasPadding ? textContainer.style.setProperty("padding", "0px 8px") : null;
textContainer.style.setProperty("box-sizing", "border-box");
textContainer.textContent = iptChild.value ? iptChild.value : iptChild.getAttribute("placeholder");
document.body.append(textContainer);
// let containerWidth = textContainer.offsetWidth + 12 + 8;
let containerWidth=0
if(iptChild.value){
containerWidth = 70;
}else {
containerWidth = 130;
}
textContainer.remove();
dom.style.setProperty("width", `${containerWidth}px`);
}
this.handleSearch();
} catch (error) {
}
},
clickFocus(e) {
document.getElementById(e).classList.toggle('span-ba');
}
}
}
......@@ -713,9 +841,28 @@
height: calc(100vh - 134px)
}
.box-card{
@import "@/assets/styles/search-common.scss";
padding-top: 16px;
width: 100%;
height: 100%;
::v-deep .el-form{
.el-input{
line-height: 32px;
.el-input__inner{
height: 32px;
line-height: 32px;
border-radius: 4px;
border: 0;
}
}
.is-focus{
.el-input__inner{
background: #F4F6F9;
}
}
}
}
.box{
position: relative;
......@@ -785,13 +932,82 @@
flex-wrap: inherit;
margin-top: 1px;
.el-tag{
max-width: 120px;
/*max-width: 120px;*/
}
}
.el-input__suffix{
top: 1px;
}
}
.normal-search-container {
margin-left: 12px;
display: flex;
align-items: center;
cursor: pointer;
height: 34px;
&:hover {
& > span {
color: #0081ff;
}
}
& > img {
width: 16px;
height: 16px;
margin-left: 12px;
}
& > span {
color: #232323;
color: rgba(35, 35, 35, 0.4);
font-weight: 400;
margin-left: 8px;
line-height: 22px;
font-size: 14px;
}
}
.cooperate-name {
margin-left: 12px;
display: flex;
border-radius: 2px;
border: 1px solid #d9d9d9;
line-height: 34px;
height: 34px;
float: left;
span {
width: 60px;
height: 32px;
line-height: 32px;
font-size: 14px;
background: #f5f5f5;
text-align: center;
color: #0081ff;
border: 1px solid #efefef;
border-left: 0;
cursor: pointer;
}
&.span-ba {
border: 1px solid #0081ff;
span {
color: #ffffff;
background: #0081ff;
border: 1px solid #0081ff;
}
}
::v-deep .el-input {
flex: 1;
}
::v-deep .el-input__inner {
border: 0;
line-height: 32px;
height: 32px;
position: absolute;
top: 0;
padding-right: 28px;
font-size: 12px;
padding-left: 8px;
}
}
}
}
.ps1{
......
<template>
<div class="members">
<head-form
<head-form-new
ref="headForm"
title="集团成员"
:form-data="formData"
:query-params="queryParams"
......@@ -44,7 +45,7 @@
</div>
</div>
</template>
</head-form>
</head-form-new>
<skeleton style="margin-left:16px;" v-if="isSkeleton"></skeleton>
<tables
v-if="!isSkeleton"
......@@ -101,12 +102,12 @@
{label: '企业地区', prop: 'address', minWidth: '200'},
],
formData: [
{ type: 4, fieldName: 'combineMemberLevels', value: '', placeholder: '成员层级', options:[]},
{ type: 1, fieldName: 'businessType', value: '', placeholder: '主营业务', options:[]},
{ type: 7, fieldName: 'province', value: '',props: {multiple: true,value: 'id',expandTrigger: 'hover'}, placeholder: '地区', options:[]},
{ type: 6, fieldName: 'money', value: '', placeholder: '注册资本', startMoney: 'minAmount', endMoney: 'maxAmount',moneyList:[] },
{ type: 0, fieldName: 'penalizeReasonType', value: '', placeholder: '筛选', options: []},
{ type: 3, fieldName: 'searchValue', value: '', placeholder: '输入关键词查询'},
{ type: 4, fieldName: 'combineMemberLevels', value: '', placeholder: '成员层级', options:[], uid: this.getUid()},
{ type: 1, fieldName: 'businessType', value: '', placeholder: '主营业务', options:[], uid: this.getUid()},
{ type: 7, fieldName: 'province', value: '',props: {multiple: true,value: 'id',expandTrigger: 'hover'}, placeholder: '地区', options:[], uid: this.getUid()},
{ type: 6, fieldName: 'money', value: '', placeholder: '注册资本', startMoney: 'minAmount', endMoney: 'maxAmount',moneyList:[], uid: this.getUid() },
{ type: 0, fieldName: 'penalizeReasonType', value: '', placeholder: '筛选', options: [], uid: this.getUid()},
{ type: 3, fieldName: 'searchValue', value: '', placeholder: '输入关键词查询', uid: this.getUid()},
],
cycj:[
{
......@@ -548,5 +549,6 @@
font-size: 14px;
color:#232323 !important;
}
@import "@/assets/styles/search-common.scss";
}
</style>
<template>
<div class="performance">
<head-form
<head-form-new
ref="headForm"
title="集团业绩"
:form-data="formData"
:query-params="queryParams"
......@@ -12,7 +13,7 @@
<template slot="slot">
</template>
</head-form>
</head-form-new>
<skeleton style="margin-left:16px;" v-if="isSkeleton"></skeleton>
<tables
v-if="!isSkeleton"
......@@ -84,14 +85,14 @@
{label: '业主单位', prop: 'projectUnit', slot: true,minWidth: '190'},
],
formData: [
{ type: 7, fieldName: 'province', value: '',props: {multiple: true,value: 'id',expandTrigger: 'hover'}, placeholder: '项目地区', options:[]},
{ type: 5, fieldName: 'time', value: '', placeholder: '中标时间', startTime: 'startBidTime', endTime: 'endBidTime',timeList:[],dateTo:this.formatDate(new Date()) },
{ type: 6, fieldName: 'money', value: '', placeholder: '中标金额', startMoney: 'minAmount', endMoney: 'maxAmount',moneyList:[] },
{ type: 4, fieldName: 'boundTypes', value: '', placeholder: '业绩类型', options: [],width:150},
{ type: 4, fieldName: 'projectTypes', value: '', placeholder: '项目类型', options: [],width:150},
{ type: 1, fieldName: 'cgbl', value: '', placeholder: '持股比例', options: [],width:100},
{ type: 7, fieldName: 'province', value: '',props: {multiple: true,value: 'id',expandTrigger: 'hover'}, placeholder: '项目地区', options:[], uid: this.getUid()},
{ type: 5, fieldName: 'time', value: '', placeholder: '中标时间', startTime: 'startBidTime', endTime: 'endBidTime',timeList:[],dateTo:this.formatDate(new Date()) , uid: this.getUid()},
{ type: 6, fieldName: 'money', value: '', placeholder: '中标金额', startMoney: 'minAmount', endMoney: 'maxAmount',moneyList:[], uid: this.getUid() },
{ type: 4, fieldName: 'boundTypes', value: '', placeholder: '业绩类型', options: [],width:150, uid: this.getUid()},
{ type: 4, fieldName: 'projectTypes', value: '', placeholder: '项目类型', options: [],width:150, uid: this.getUid()},
{ type: 1, fieldName: 'cgbl', value: '', placeholder: '持股比例', options: [],width:100, uid: this.getUid()},
// { type: 3, fieldName: 'searchValue', value: '', placeholder: '搜索中标成员名称/项目名称'},
{ type: 3, fieldName: 'searchValue', value: '', placeholder: '查询'},
{ type: 3, fieldName: 'searchValue', value: '', placeholder: '输入关键词查询', uid: this.getUid()},
],
tableData:[],
tableDataTotal:0,
......@@ -323,5 +324,6 @@
background: #F0F3FA;
}
}
@import "@/assets/styles/search-common.scss";
}
</style>
......@@ -2,6 +2,7 @@
<div class="performance">
<div class="content">
<head-form
ref="headForm"
title="集团施工项目最新招标"
:form-data="formData"
:query-params="queryParams"
......@@ -9,9 +10,9 @@
:slots="true"
:isExcel="false"
></head-form>
<span class="check">查看集团招标<i class="el-icon-arrow-right"></i></span>
<span class="check" @click="check">查看集团招标<i class="el-icon-arrow-right"></i></span>
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
<div class="table-item" v-if="!isSkeleton">
<div class="table-item" v-if="!isSkeleton && tableData.length >0">
<el-table class="fixed-table" :data="tableData" border max-height="235">
<el-table-column label="项目名称" prop="title" min-width="350">
<template slot-scope="scope">
......@@ -28,7 +29,7 @@
</el-table-column>
<el-table-column label="招标金额" prop="projectAmount" width="110">
<template slot-scope="scope">
{{scope.row.projectAmount ? scope.row.projectAmount : '0.00'}}{{scope.row.projectAmount ? '万元':''}}
{{scope.row.projectAmount ? scope.row.projectAmount : '--'}}{{scope.row.projectAmount ? '万元':''}}
</template>
</el-table-column>
<el-table-column label="项目类型" prop="projectCategory" width="110"></el-table-column>
......@@ -47,20 +48,21 @@
</div>
<div class="content">
<head-form
title="集团施工项目年度招标"
title="集团年度发包统计"
:form-data="[]"
:query-params="{}"
:slots="true"
:isExcel="false"
></head-form>
<el-row>
<skeleton v-if="isSkeleton2" style="padding: 16px"></skeleton>
<el-row v-if="!isSkeleton2">
<el-col :span="12">
<div id="ndzb-echarts" style="height: 300px;"></div>
<div id="ndzb-echarts" style="height: 280px;"></div>
</el-col>
<el-col :span="12">
<div class="box-right">
<div class="table-item">
<el-table class="fixed-table" :data="ndzbList" border max-height="270">
<el-table class="fixed-table" :data="ndzbList" border max-height="260">
<el-table-column label="年度" prop="type" min-width="70"></el-table-column>
<el-table-column label="历史发包数量" prop="count" width="120">
<template slot-scope="scope">
......@@ -69,7 +71,7 @@
</el-table-column>
<el-table-column label="历史发包总金额" prop="sum" width="140">
<template slot-scope="scope">
{{scope.row.sum ? scope.row.sum : '0.00'}}{{scope.row.sum ? '万元':''}}
{{scope.row.sum ? scope.row.sum : '--'}}{{scope.row.sum ? '万元':''}}
</template>
</el-table-column>
<el-table-column label="发包金额最高成员" prop="companyName" min-width="200">
......@@ -96,12 +98,14 @@
<el-select
v-model="year1"
clearable
@change="changeSelect1"
class="form-content-width"
style="width: 80px">
<el-option v-for="(item, index) in yearOptions" :key="index" :label="item.name" :value="item.value"/>
</el-select>
</div>
<el-row>
<skeleton v-if="isSkeleton3" style="padding: 16px"></skeleton>
<el-row v-if="!isSkeleton3">
<el-col :span="12">
<div id="fbje-echarts" style="height: 280px;"></div>
</el-col>
......@@ -133,12 +137,14 @@
<el-select
v-model="year2"
clearable
@change="changeSelect2"
class="form-content-width"
style="width: 80px">
<el-option v-for="(item, index) in yearOptions" :key="index" :label="item.name" :value="item.value"/>
</el-select>
</div>
<el-row>
<skeleton v-if="isSkeleton4" style="padding: 16px"></skeleton>
<el-row v-if="!isSkeleton4">
<el-col :span="12">
<div id="lxtj-echarts" style="height: 280px;"></div>
</el-col>
......@@ -154,7 +160,7 @@
</el-table-column>
<el-table-column label="发包总金额" prop="sum" width="140">
<template slot-scope="scope">
{{scope.row.sum ? scope.row.sum : '0.00'}}{{scope.row.sum ? '万元':''}}
{{scope.row.sum ? scope.row.sum : '--'}}{{scope.row.sum ? '万元':''}}
</template>
</el-table-column>
<el-table-column label="发包金额最大成员" prop="companyName" min-width="200">
......@@ -181,12 +187,14 @@
<el-select
v-model="year3"
clearable
@change="changeSelect3"
class="form-content-width"
style="width: 80px">
<el-option v-for="(item, index) in yearOptions" :key="index" :label="item.name" :value="item.value"/>
</el-select>
</div>
<el-row>
<skeleton v-if="isSkeleton5" style="padding: 16px"></skeleton>
<el-row v-if="!isSkeleton5">
<el-col :span="12">
<div id="xfl-echarts" style="height: 280px;"></div>
</el-col>
......@@ -195,6 +203,11 @@
<div class="table-item">
<el-table class="fixed-table" :data="xflList" border max-height="270">
<el-table-column label="项目类型" prop="type" min-width="120"></el-table-column>
<el-table-column label="统计项目数量" prop="count" min-width="150">
<template slot-scope="scope">
{{scope.row.count}}{{scope.row.count ? '个':''}}
</template>
</el-table-column>
<el-table-column label="下浮率区间" prop="lowerRate"></el-table-column>
</el-table>
</div>
......@@ -212,24 +225,24 @@
:isExcel="false"
></head-form>
<skeleton v-if="isSkeleton6" style="padding: 16px"></skeleton>
<div class="table-item" v-if="!isSkeleton6">
<div class="table-item" v-if="!isSkeleton6 && peojectTopData.length > 0">
<el-table class="fixed-table" :data="peojectTopData" border max-height="235">
<el-table-column label="项目名称" prop="projectName" min-width="350">
<template slot-scope="scope">
<router-link :to="`/biddetail/${item.id}`" tag="a" class="a-link" v-if="scope.row.bid" v-html="scope.row.projectName"></router-link>
<router-link :to="`/biddetail/${scope.row.id}`" tag="a" class="a-link" v-if="scope.row.id" v-html="scope.row.projectName"></router-link>
<div v-else v-html="scope.row.projectName || '--'"></div>
</template>
</el-table-column>
<el-table-column label="中标日期" prop="winBidTime" width="100"></el-table-column>
<el-table-column label="中标金额" prop="winBidAmount" width="130">
<template slot-scope="scope">
{{scope.row.winBidAmount ? scope.row.winBidAmount : '0.00'}}{{scope.row.winBidAmount ? '万元':''}}
{{scope.row.winBidAmount ? scope.row.winBidAmount : '--'}}{{scope.row.winBidAmount ? '万元':''}}
</template>
</el-table-column>
<el-table-column label="项目类型" prop="projectTypeNew" width="100"></el-table-column>
<el-table-column label="招标成员" prop="projectUnit" min-width="250">
<template slot-scope="scope">
<router-link :to="scope.row.uipId?`/enterprise/${encodeStr(scope.row.projectUnitId)}`:`/company/${encodeStr(scope.row.projectUnitId)}`" tag="a" class="a-link" v-if="scope.row.projectUnitId&&scope.row.projectUnit" v-html="scope.row.projectUnit"></router-link>
<router-link :to="scope.row.uipId?`/enterprise/${encodeStr(scope.row.projectUnitId)}`:`/company/${encodeStr(scope.row.projectUnitId)}`" tag="a" class="a-link" v-if="scope.row.projectUnitId&&scope.row.projectUnit" v-html="scope.row.projectUnit"></router-link :to="scope.row.uipId?`/enterprise/${encodeStr(scope.row.projectUnitId)}`:`/company/${encodeStr(scope.row.projectUnitId)}`">
<div v-else v-html="scope.row.projectUnit || '--'"></div>
</template>
</el-table-column>
......@@ -270,14 +283,16 @@
return{
queryParams: {
combineId: this.customerId,
year:'2023年'
},
queryParams1: {
combineId: this.customerId,
year:'2023年'
},
formData: [
{ type: 4, fieldName: 'type', value: '', placeholder: '项目类型', options: [],width:150},
{ type: 1, fieldName: 'cgbl', value: '', placeholder: '持股比例', options: [],width:110},
{ type: 1, fieldName: 'year', value: '', placeholder: '年份', options: [],width:80},
{ type: 4, fieldName: 'type', value: '', placeholder: '项目类型', options: [],width:150, uid: this.getUid()},
{ type: 1, fieldName: 'cgbl', value: '', placeholder: '持股比例', options: [],width:110, uid: this.getUid()},
{ type: 1, fieldName: 'year', value: '2023年', placeholder: '年份', options: [],width:100, uid: this.getUid()},
],
cgblList: [
{name:'100%',value:'100%'},
......@@ -293,9 +308,9 @@
peojectTopData:[],
ndzbList:[],
yearOptions:[],
year1:'2023',
year2:'2023',
year3:'2023',
year1:'2023',
year2:'2023',
year3:'2023',
isSkeleton:true,
isSkeleton2:true,
isSkeleton3:true,
......@@ -335,14 +350,15 @@
let Years=[];
for(var i=startyear;i<=Year;i++){
Years.push({
name: i,
value: i,
name: i+'年',
value: i+'年',
})
}
this.yearOptions=Years.reverse()
this.formData[2].options=Years
},
handleQuery(params){
// this.isSkeleton = true
let data = params || this.queryParams;
if(data.cgbl){
if(data.cgbl === '100%'){
......@@ -364,7 +380,7 @@
delete data.cgbl
}
if(data.year){
data.year=[data.year.toString()]
data.year=[data.year.toString().substr(0, 4)]
}
delete data.pageNum
recentlyBid(data).then(res=>{
......@@ -378,7 +394,7 @@
},
getBidByYear(){
bidByYear({combineId:this.customerId}).then(res=>{
// this.isSkeleton = false
this.isSkeleton2 = false
if(res.code === 200){
this.ndzbList=res.data;
if(res.data.length > 0){
......@@ -388,9 +404,12 @@
})
},
getGroupByMoney(){
let year=[this.year1.toString()]
let year=''
if(this.year1){
year=[this.year1.toString().substr(0, 4)]
}
groupByMoney({combineId:this.customerId,year:year}).then(res=>{
// this.isSkeleton = false
this.isSkeleton3 = false
if(res.code === 200){
this.jeqjList=res.data;
......@@ -408,9 +427,12 @@
})
},
getGroupByType(){
let year=[this.year2.toString()]
let year=''
if(this.year2){
year=[this.year2.toString().substr(0, 4)]
}
groupByType({combineId:this.customerId,year:year}).then(res=>{
// this.isSkeleton = false
this.isSkeleton4 = false
if(res.code === 200){
this.lxtjList=res.data;
if(res.data.length > 0){
......@@ -420,9 +442,12 @@
})
},
getGroupByLowerRate(){
let year=[this.year3.toString()]
let year=''
if(this.year3){
year=[this.year3.toString().substr(0, 4)]
}
groupByLowerRate({combineId:this.customerId,year:year}).then(res=>{
// this.isSkeleton = false
this.isSkeleton5 = false
if(res.code === 200){
this.xflList=res.data;
if(res.data.length > 0){
......@@ -453,7 +478,7 @@
delete data.cgbl
}
if(data.year){
data.year=[data.year.toString()]
data.year=[data.year.toString().substr(0, 4)]
}
delete data.pageNum
peojectTop(data).then(res=>{
......@@ -469,11 +494,19 @@
let params = this.formParams()
this.getPeojectTop(params)
},
changeSelect(){
changeSelect1(){
this.getGroupByMoney()
},
changeSelect2(){
this.getGroupByType()
},
changeSelect3(){
this.getGroupByLowerRate()
},
initChart(data) {
this.$nextTick(()=>{
// 让 指定id 的 div 的_echarts_instance_属性值 为 空状态
document.getElementById("ndzb-echarts").removeAttribute('_echarts_instance_');
let myChart = echarts.init(document.getElementById("ndzb-echarts"))
let option ={
tooltip: {
......@@ -482,6 +515,25 @@
type: 'cross'
}
},
legend: {
data: [
{
name: '招标数量',
// icon: 'rect',
},
{
name: '招标金额(万元)',
// icon: 'circle',
}
],
top: 0,
right:30,
itemHeight: 10,
itemWidth: 10,
textStyle: {
fontSize: 12
},
},
xAxis: {
type: 'category',
axisLabel: { //坐标轴刻度标签的相关设置
......@@ -526,7 +578,7 @@
}
],
grid: {
top:30,
top:40,
left:80,
right:130,
bottom:30,
......@@ -540,7 +592,7 @@
yAxisIndex: 1,
tooltip: {
valueFormatter: function (value) {
return value + '万元'
return value
}
},
itemStyle: {
......@@ -586,6 +638,7 @@
},
initChart2(data) {
this.$nextTick(() => {
document.getElementById("fbje-echarts").removeAttribute('_echarts_instance_');
let myChart = echarts.init(document.getElementById("fbje-echarts"))
let option ={
tooltip: {
......@@ -635,14 +688,42 @@
},
initChart3(data) {
this.$nextTick(()=>{
document.getElementById("lxtj-echarts").removeAttribute('_echarts_instance_');
let myChart = echarts.init(document.getElementById("lxtj-echarts"))
let option ={
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross'
},
formatter: function (params) {
var relVal = params[0].name;
// relVal+='<br/>' +"<span style=\"display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:#f17f0a;\"></span>" + '次数' +": "+ array[0][relVal.replace(/"/g, '')]
for (var i = 0, l = params.length; i < l; i++) {
relVal += '<br/>' + params[i].marker + params[i].seriesName +": "+ params[i].value
}
return relVal
}
},
legend: {
data: [
{
name: '招标数量',
// icon: 'rect',
},
{
name: '招标金额(万元)',
// icon: 'circle',
}
],
top: 0,
right:30,
itemHeight: 10,
itemWidth: 10,
textStyle: {
fontSize: 12
},
},
xAxis: {
type: 'category',
axisLabel: { //坐标轴刻度标签的相关设置
......@@ -687,7 +768,7 @@
}
],
grid: {
top:30,
top:40,
left:80,
right:130,
bottom:30,
......@@ -701,7 +782,7 @@
yAxisIndex: 1,
tooltip: {
valueFormatter: function (value) {
return value + '万元'
return value
}
},
itemStyle: {
......@@ -747,13 +828,14 @@
},
initChart4(data) {
this.$nextTick(()=>{
document.getElementById("xfl-echarts").removeAttribute('_echarts_instance_');
let myChart = echarts.init(document.getElementById("xfl-echarts"))
let option ={
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross'
}
// axisPointer: {
// type: 'cross'
// }
},
xAxis: {
type: 'category',
......@@ -767,6 +849,21 @@
},
data: data.map(item => item.type),
},
legend: {
data: [
{
name: '统计项目数量',
// icon: 'rect',
},
],
top: 0,
right:30,
itemHeight: 10,
itemWidth: 10,
textStyle: {
fontSize: 12
},
},
yAxis: [
{
type: 'value',
......@@ -805,29 +902,29 @@
bottom:30,
},
series: [
// {
// name:'统计项目数量',
// smooth: false, //平滑
// type:"line",
// symbolSize: 6,
// yAxisIndex: 1,
// tooltip: {
// valueFormatter: function (value) {
// return value
// }
// },
// itemStyle: {
// normal:{
// color: '#14C9C9',
// lineStyle: {
// width:2
// },
// }
// },
// data:data.map(item => item.lowerRate),
// },
{
name:'下浮率区间',
smooth: false, //平滑
type:"line",
symbolSize: 6,
yAxisIndex: 1,
// tooltip: {
// valueFormatter: function (value) {
// return value + '万元'
// }
// },
itemStyle: {
normal:{
color: '#14C9C9',
lineStyle: {
width:2
},
}
},
data:data.map(item => item.lowerRate),
},
{
name:'招标数量',
name:'统计项目数量',
type: 'bar',
barWidth: 20,
tooltip: {
......@@ -863,6 +960,7 @@
<style lang="scss" scoped>
.performance{
@import "@/assets/styles/search-common.scss";
/*height: calc(100% - 64px);*/
.content{
background: #ffffff;
......
<template>
<div class="performance">
<head-form
<head-form-new
ref="headForm"
title=""
:form-data="formData"
:query-params="queryParams"
:total="tableDataTotal"
:isExcel="false"
@handle-search="handleSearch"
></head-form>
></head-form-new>
<skeleton style="margin-left:16px;" v-if="isSkeleton"></skeleton>
<tables
v-if="!isSkeleton"
......@@ -129,13 +130,13 @@
{label: '代理单位', prop: 'agency',minWidth: '160',slot: true},
],
formData: [
{ type: 7, fieldName: 'province', value: '',props: {multiple: true,value: 'id',expandTrigger: 'hover'}, placeholder: '项目地区', options:[]},
{ type: 5, fieldName: 'time', value: '', placeholder: '招标发布时间', startTime: 'startTime', endTime: 'endTime',timeList:[] },
{ type: 6, fieldName: 'money', value: '', placeholder: '预算金额', startMoney: 'minAmount', endMoney: 'maxAmount',moneyList:[] },
{ type: 1, fieldName: 'subjectMatters', value: '', placeholder: '招标采购分类', options: [],width:125},
{ type: 4, fieldName: 'projectTypes', value: '', placeholder: '项目类型', options: [],width:150},
{ type: 1, fieldName: 'cgbl', value: '', placeholder: '持股比例', options: [],width:110},
{ type: 3, fieldName: 'keys', value: '', placeholder: '查询'},
{ type: 7, fieldName: 'province', value: '',props: {multiple: true,value: 'id',expandTrigger: 'hover'}, placeholder: '项目地区', options:[], uid: this.getUid()},
{ type: 5, fieldName: 'time', value: '', placeholder: '招标发布时间', startTime: 'startTime', endTime: 'endTime',timeList:[], uid: this.getUid() },
{ type: 6, fieldName: 'money', value: '', placeholder: '预算金额', startMoney: 'minAmount', endMoney: 'maxAmount',moneyList:[], uid: this.getUid() },
{ type: 1, fieldName: 'subjectMatters', value: '', placeholder: '招标采购分类', options: [],width:125, uid: this.getUid()},
{ type: 4, fieldName: 'projectTypes', value: '', placeholder: '项目类型', options: [],width:150, uid: this.getUid()},
{ type: 1, fieldName: 'cgbl', value: '', placeholder: '持股比例', options: [],width:110, uid: this.getUid()},
{ type: 3, fieldName: 'keys', value: '', placeholder: '输入关键词查询'},
],
tableData:[],
tableDataTotal:0,
......@@ -373,6 +374,7 @@
<style lang="scss" scoped>
.performance{
@import "@/assets/styles/search-common.scss";
background: #ffffff;
border-radius: 4px;
padding: 16px;
......
......@@ -30,8 +30,10 @@
},
methods: {
handleClick() {
handleClick(key) {
if(key === 'second'){
this.activeName=key
}
}
}
}
......
......@@ -493,7 +493,7 @@ export default {
& > span {
color: #232323;
color: rgba(35, 35, 35, 0.8);
color: rgba(35, 35, 35, 0.4);
font-weight: 400;
margin-left: 8px;
line-height: 22px;
......@@ -549,4 +549,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -21,6 +21,9 @@ export default {
},
methods: {
check(){
this.$parent.handleClick('second');
},
getUid() {
return v4();
},
......
......@@ -10,6 +10,10 @@
v-html="scope.row.projectName"></router-link>
<div v-else v-html="scope.row.projectName || '--'"></div>
</template>
<template slot="agency" slot-scope="scope">
<router-link :to="`/company/${encodeStr(scope.row.agencyId)}`" tag="a" class="a-link" v-if="scope.row.agencyId&&scope.row.agency" v-html="scope.row.agency"></router-link>
<div v-else v-html="scope.row.agency || '--'"></div>
</template>
<template slot="province" slot-scope="scope">
{{scope.row.province}}{{`${scope.row.city?'-'+scope.row.city:''}`}}{{`${scope.row.area?'-'+scope.row.area:''}`}}
</template>
......@@ -40,21 +44,21 @@ export default {
},
defaultSort: { prop: 'issueTime', order: 'descending' },
forData: [
{ label: '项目名称', prop: 'projectName', minWidth: '300', slot: true, fixed: true },
{ label: '发布日期', prop: 'issueTime', sortable: 'custom', descending: '3', ascending: '4', width: '120' },
{ label: '预算金额(万元)', prop: 'projectAmount', sortable: 'custom', descending: '1', ascending: '2', width: '140' },
{ label: '项目类型', prop: 'projectCategory', width: '110' },
{ label: '项目地区', prop: 'province', width: '120', slot: true },
{ label: '招标阶段', prop: 'tenderStage', width: '90' },
{ label: '招采单位联系人', prop: 'contact', width: '120' },
{ label: '招采单位联系方式', prop: 'contactTel', width: '130' },
{ label: '代理单位', prop: 'agency', minWidth: '170' },
{ label: '代理单位联系人', prop: 'agencyContact', width: '120' },
{ label: '代理单位联系方式', prop: 'agencyContactTel', width: '130' },
{ label: '报名截止日期', prop: 'overTime', width: '110' }
{label: '项目名称', prop: 'projectName', minWidth: '300', slot: true, fixed: true},
{label: '发布日期', prop: 'issueTime', sortable: 'custom', descending: '3', ascending: '4', width: '120'},
{label: '预算金额(万元)', prop: 'projectAmount', sortable: 'custom', descending: '1', ascending: '2', width: '140'},
{label: '项目类型', prop: 'projectCategory', width: '110'},
{label: '项目地区', prop: 'province', width: '120', slot: true},
{label: '招标阶段', prop: 'tenderStage', width: '90'},
{label: '招采单位联系人', prop: 'contact', width: '120'},
{label: '招采单位联系方式', prop: 'contactTel', width: '130'},
{label: '代理单位', prop: 'agency', minWidth: '170', slot: true},
{label: '代理单位联系人', prop: 'agencyContact', width: '120'},
{label: '代理单位联系方式', prop: 'agencyContactTel', width: '130'},
{label: '报名截止日期', prop: 'overTime', width: '110'}
],
formData: [
{ type: 7, fieldName: 'province', value: '', props: { multiple: true }, placeholder: '项目地区', options: [], uid: this.getUid() },
{ type: 7, fieldName: 'province', value: '',props: {multiple: true}, placeholder: '项目地区', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'projectCategory', value: '', placeholder: '项目类型', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'tenderStage', value: '', placeholder: '招标阶段', options: [], uid: this.getUid() },
{ type: 3, fieldName: 'keys', value: '', placeholder: '输入关键词查询', options: [], uid: this.getUid() }
......
......@@ -86,7 +86,7 @@
</template>
</head-form-new>
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
<tables v-if="!isSkeleton" :tableLoading="tableLoading" :tableData="tableData" :forData="forData" :tableDataTotal="tableDataTotal"
<tables v-if="!isSkeleton" :indexFixed="true" :tableLoading="tableLoading" :tableData="tableData" :forData="forData" :tableDataTotal="tableDataTotal"
:queryParams="queryParams" @handle-current-change="handleCurrentChange" @sort-change="sortChange">
<template slot="companyName" slot-scope="scope">
<router-link :to="scope.row.uipId?`/enterprise/${encodeStr(scope.row.companyId)}`:`/company/${encodeStr(scope.row.companyId)}`" tag="a"
......@@ -139,7 +139,7 @@ export default {
pageSize: 20
},
forData: [
{ label: '企业名称', prop: 'companyName', width: '369', slot: true },
{ label: '企业名称', prop: 'companyName', width: '369', slot: true,fixed:true },
{ label: '区域', prop: 'area', width: '120', slot: true },
{ label: '招标数量', prop: 'biddingCount', width: '100', sortable: true },
{ label: '城投拿地', prop: 'landInfoCount', width: '100', sortable: true },
......
......@@ -882,6 +882,8 @@ export default {
data.push(list[i])
}
this.$nextTick(()=>{
// 让 指定id 的 div 的_echarts_instance_属性值 为 空状态
document.getElementById("zbtj-echarts").removeAttribute('_echarts_instance_');
let myChart = echarts.init(document.getElementById("zbtj-echarts"))
let option ={
tooltip: {
......@@ -1020,6 +1022,8 @@ export default {
require('@/assets/images/index/10.png'),
]
this.$nextTick(()=>{
// 让 指定id 的 div 的_echarts_instance_属性值 为 空状态
document.getElementById("zbph-echarts").removeAttribute('_echarts_instance_');
let myChart = echarts.init(document.getElementById("zbph-echarts"))
// let option ={
// legend: {
......
......@@ -14,21 +14,37 @@
ref="aptitudeCode"
:options="aptitudeCodeList"
:props="props"
:class="[`select-adaptive-${inputID1}`]"
v-model="queryParams.codeStr"
@change="handleChange"
@change="iptAdaptive(inputID1,true,'handleChange')"
placeholder="资质资格"
collapse-tags
clearable></el-cascader>
<custom-time-select
style="display: inline-block"
:timeList="timeList"
:class="[`select-adaptive-${inputID2}`,'custom-select']"
v-model="queryParams.time"
:placeholder="timePlaceholder"
@handle-search="changeSelect" />
<el-input placeholder="输入关键词查询" v-model="queryParams.ename" clearable @clear="handleSearch()">
<i slot="prefix" class="el-icon-search"></i>
<el-button slot="append" @click="handleSearch()">搜索</el-button>
</el-input>
@handle-search="iptAdaptive(inputID2,'','changeSelect')"
/>
<!--<el-input placeholder="输入关键词查询" v-model="queryParams.ename" clearable @clear="handleSearch()">-->
<!--<i slot="prefix" class="el-icon-search"></i>-->
<!--<el-button slot="append" @click="handleSearch()">搜索</el-button>-->
<!--</el-input>-->
<!-- 未点击前的输入框样式 -->
<div class="normal-search-container" @click="showSearchBox = true" v-if="!showSearchBox">
<img src="@/assets/images/enterprise/enterprise-search-icon.svg" alt="">
<span>搜索</span>
</div>
<!-- 输入框展开后样式 -->
<transition @enter="onEnter" appear mode="out-in">
<div class="cooperate-name enterprise-search-container" id="focus1" v-if="showSearchBox">
<el-input clearable @clear="handleSearch" @focus="clickFocus('focus1')" @blur="clickFocus('focus1')" v-model="queryParams.ename"
placeholder="输入关键词查询"></el-input>
<span @click="handleSearch">搜索</span>
</div>
</transition>
<span class="total">{{tableDataTotal}}</span>
</div>
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
......@@ -102,6 +118,8 @@
import { enterprise,location,getUipIdByCid } from '@/api/macro/macro'
import Region from '../component/region'
import skeleton from '../component/skeleton'
import { v4 } from "uuid";
import gsap from "gsap";
export default {
name: 'Enterprises',
components: {Region,skeleton,CustomTimeSelect},
......@@ -137,6 +155,9 @@ export default {
isSkeleton:true,
timeList: ['近半月', '近一月', '近半年', '近一年', '自定义'],
timePlaceholder:'中标时间',
inputID1:this.getUid(),
inputID2:this.getUid(),
showSearchBox: false
}
},
created() {
......@@ -155,6 +176,21 @@ export default {
// window.removeEventListener("scroll", this.scrolling);
},
methods: {
onEnter(el, done) {
gsap.from(el, {
opacity: 0,
width: 0,
});
gsap.to(el, {
opacity: 1,
width: 242,
onComplete() {
// 完成动画聚焦输入框
el.querySelector("input").focus();
done();
}
});
},
scrolling() {
let el = document.getElementsByClassName("el-table__fixed-header-wrapper")[0]
let scrollTop =window.pageYOffset ||document.documentElement.scrollTop ||document.body.scrollTop;
......@@ -267,12 +303,17 @@ export default {
codeStr:'',
time:'',
}
this.showSearchBox=false;
this.pageIndex=1;
this.querySubmit()
},
handleSearch(){
this.pageIndex=1;
this.querySubmit()
handleSearch(name){
if(name === 'handleChange'){
this.handleChange()
}else {
this.pageIndex=1;
this.querySubmit()
}
},
formatStatus: function(row, column, cellValue) {
return cellValue? cellValue : '-'
......@@ -326,6 +367,91 @@ export default {
this.pageIndex=1;
this.querySubmit()
},
getUid() {
return v4();
},
iptAdaptive(uid, multiple = false,name) {
multiple ? this.multipleAdaptiveHandle(uid,name) : this.iptAdaptiveHandle(uid);
},
// 多选处理
async multipleAdaptiveHandle(uid,name) {
try {
await this.$nextTick();
const dom = document.querySelector(`.select-adaptive-${uid}`);
const iptChild = dom.querySelector(".el-input__inner");
if (dom) {
const textContainer = document.createElement("span");
const textName = `text-${uid}`;
textContainer.classList.add(textName);
const selectChildren = dom.querySelectorAll(".el-tag");
if (selectChildren.length) {
let width = 0;
selectChildren.forEach(item => {
const text = item.textContent;
const itemInfo = window.getComputedStyle(item);
textContainer.style.setProperty("visibility", "hidden");
textContainer.style.setProperty("display", "inline-block");
textContainer.style.setProperty("font-size", "14px");
textContainer.style.setProperty("padding", itemInfo.padding);
textContainer.style.setProperty("box-sizing", "border-box");
textContainer.textContent = text;
document.body.append(textContainer);
width += textContainer.offsetWidth + parseInt(itemInfo.marginLeft) + parseInt(itemInfo.marginRight);
textContainer.remove();
});
dom.style.setProperty("width", `${width + 60}px`);
this.handleSearch(name);
return;
}
textContainer.style.setProperty("visibility", "hidden");
textContainer.style.setProperty("display", "inline-block");
textContainer.style.setProperty("font-size", "14px");
textContainer.style.setProperty("padding", "0px 8px");
textContainer.style.setProperty("box-sizing", "border-box");
textContainer.textContent = iptChild.getAttribute("placeholder");
document.body.append(textContainer);
// let containerWidth = textContainer.offsetWidth + 12 + 8;
let containerWidth = 120;
textContainer.remove();
dom.style.setProperty("width", `${containerWidth}px`);
this.handleSearch(name);
}
} catch (error) {
console.log(error);
}
},
// 单选处理
async iptAdaptiveHandle(uid) {
try {
await this.$nextTick();
const dom = document.querySelector(`.select-adaptive-${uid}`);
const realStyles = window.getComputedStyle(dom);
if (dom) {
const iptChild = dom.querySelector(".el-input__inner");
const textContainer = document.createElement("span");
const textName = `text-${uid}`;
textContainer.classList.add(textName);
textContainer.style.setProperty("visibility", "hidden");
textContainer.style.setProperty("display", "inline-block");
textContainer.style.setProperty("font-size", "14px");
const hasPadding = (parseInt(realStyles.paddingLeft) || parseInt(realStyles.paddingRight)) ? true : false;
hasPadding ? textContainer.style.setProperty("padding", "0px 8px") : null;
textContainer.style.setProperty("box-sizing", "border-box");
textContainer.textContent = iptChild.value ? iptChild.value : iptChild.getAttribute("placeholder");
document.body.append(textContainer);
let containerWidth = textContainer.offsetWidth + 50;
textContainer.remove();
dom.style.setProperty("width", `${containerWidth}px`);
}
this.changeSelect();
} catch (error) {
}
},
clickFocus(e) {
document.getElementById(e).classList.toggle('span-ba');
}
}
}
</script>
......@@ -335,6 +461,7 @@ export default {
padding: 0;
}
.enterprises{
@import "@/assets/styles/search-common.scss";
.eco-header{
justify-content: space-between;
height: 48px;
......@@ -377,8 +504,12 @@ export default {
margin-top: 12px;
padding: 16px;
.search{
height: 34px;
>div{
float: left;
}
::v-deep .el-cascader{
width: 180px;
width: 120px;
margin-right: 12px;
height: 34px;
line-height: 34px !important;
......@@ -386,14 +517,20 @@ export default {
width: 100%;
height: 100%;
.el-input__inner{
border: 0;
width: 100%;
height: 100%;
}
}
.is-focus{
.el-input__inner {
background: #F4F6F9;
}
}
.el-cascader__tags{
flex-wrap: inherit;
.el-tag{
max-width: 100px;
/*max-width: 100px;*/
margin: 5px 0 2px 6px;
}
}
......@@ -456,6 +593,75 @@ export default {
margin-bottom: 3px;
}
}
.normal-search-container {
margin-left: 12px;
display: flex;
align-items: center;
cursor: pointer;
height: 34px;
&:hover {
& > span {
color: #0081ff;
}
}
& > img {
width: 16px;
height: 16px;
margin-left: 12px;
}
& > span {
color: #232323;
color: rgba(35, 35, 35, 0.4);
font-weight: 400;
margin-left: 8px;
line-height: 22px;
font-size: 14px;
}
}
.cooperate-name {
margin-left: 12px;
display: flex;
border-radius: 2px;
border: 1px solid #d9d9d9;
line-height: 34px;
height: 34px;
float: left;
span {
width: 60px;
height: 32px;
line-height: 32px;
font-size: 14px;
background: #f5f5f5;
text-align: center;
color: #0081ff;
border: 1px solid #efefef;
border-left: 0;
cursor: pointer;
}
&.span-ba {
border: 1px solid #0081ff;
span {
color: #ffffff;
background: #0081ff;
border: 1px solid #0081ff;
}
}
::v-deep .el-input {
flex: 1;
}
::v-deep .el-input__inner {
border: 0;
line-height: 32px;
height: 32px;
position: absolute;
top: 0;
padding-right: 28px;
font-size: 12px;
padding-left: 8px;
}
}
}
.table-item{
margin-top: 14px;
......
......@@ -6,17 +6,18 @@
<span class="common-title">全国经济大全</span>
<el-form ref="queryForm" :model="queryParams" :inline="true" size="small">
<el-form-item prop="year">
<el-select v-model="queryParams.year" filterable class="form-content-width" placeholder="请选择" @change="handleSearch" :popper-append-to-body='false'>
<el-select v-model="queryParams.year" filterable class="form-content-width same-select-com" placeholder="请选择" :class="[`select-adaptive-${inputID1}`]" @change="handleSearch" :popper-append-to-body='false'>
<el-option v-for="(item, index) in yearOptions" :key="index" :label="item.year" :value="item.year" />
</el-select>
</el-form-item>
<el-form-item prop="area">
<el-cascader
ref="address"
:class="[`select-adaptive-${inputID2}`]"
:options="addressList"
:props="props"
v-model="queryParams.address"
@change="handleSearch"
@change="iptAdaptive(inputID2,true)"
placeholder="地区选择"
collapse-tags
clearable></el-cascader>
......@@ -124,6 +125,7 @@
import dataRegion from '@/assets/json/dataRegion'
import economiesDetail from './economies-detail'
import skeleton from '../../component/skeleton'
import { v4 } from "uuid";
export default {
name: 'NationalEconomies',
components: {
......@@ -149,7 +151,9 @@
tableDataTotal: null,
show_page:true,
MaxPage:500,
isSkeleton:true
isSkeleton:true,
inputID1:this.getUid(),
inputID2:this.getUid()
}
},
created() {
......@@ -353,7 +357,89 @@
path: '/macro/economies',
query:params
})
}
},
iptAdaptive(uid, multiple = false) {
multiple ? this.multipleAdaptiveHandle(uid) : this.iptAdaptiveHandle(uid);
},
getUid() {
return v4();
},
// 多选处理
async multipleAdaptiveHandle(uid) {
try {
await this.$nextTick();
const dom = document.querySelector(`.select-adaptive-${uid}`);
const iptChild = dom.querySelector(".el-input__inner");
if (dom) {
const textContainer = document.createElement("span");
const textName = `text-${uid}`;
textContainer.classList.add(textName);
const selectChildren = dom.querySelectorAll(".el-tag");
if (selectChildren.length) {
let width = 0;
selectChildren.forEach(item => {
const text = item.textContent;
const itemInfo = window.getComputedStyle(item);
textContainer.style.setProperty("visibility", "hidden");
textContainer.style.setProperty("display", "inline-block");
textContainer.style.setProperty("font-size", "14px");
textContainer.style.setProperty("padding", itemInfo.padding);
textContainer.style.setProperty("box-sizing", "border-box");
textContainer.textContent = text;
document.body.append(textContainer);
width += textContainer.offsetWidth + parseInt(itemInfo.marginLeft) + parseInt(itemInfo.marginRight);
textContainer.remove();
});
dom.style.setProperty("width", `${width + 20}px`);
this.handleSearch();
return;
}
textContainer.style.setProperty("visibility", "hidden");
textContainer.style.setProperty("display", "inline-block");
textContainer.style.setProperty("font-size", "14px");
textContainer.style.setProperty("padding", "0px 8px");
textContainer.style.setProperty("box-sizing", "border-box");
textContainer.textContent = iptChild.getAttribute("placeholder");
document.body.append(textContainer);
// let containerWidth = textContainer.offsetWidth + 12 + 8;
let containerWidth = 150;
textContainer.remove();
dom.style.setProperty("width", `${containerWidth}px`);
this.handleSearch();
}
} catch (error) {
console.log(error);
}
},
// 单选处理
async iptAdaptiveHandle(uid) {
try {
await this.$nextTick();
const dom = document.querySelector(`.select-adaptive-${uid}`);
const realStyles = window.getComputedStyle(dom);
if (dom) {
const iptChild = dom.querySelector(".el-input__inner");
const textContainer = document.createElement("span");
const textName = `text-${uid}`;
textContainer.classList.add(textName);
textContainer.style.setProperty("visibility", "hidden");
textContainer.style.setProperty("display", "inline-block");
textContainer.style.setProperty("font-size", "14px");
const hasPadding = (parseInt(realStyles.paddingLeft) || parseInt(realStyles.paddingRight)) ? true : false;
hasPadding ? textContainer.style.setProperty("padding", "0px 8px") : null;
textContainer.style.setProperty("box-sizing", "border-box");
textContainer.textContent = iptChild.value ? iptChild.value : iptChild.getAttribute("placeholder");
document.body.append(textContainer);
let containerWidth = textContainer.offsetWidth + 12 + 8;
textContainer.remove();
dom.style.setProperty("width", `${containerWidth}px`);
}
this.handleSearch();
} catch (error) {
}
},
}
}
</script>
......@@ -361,6 +447,7 @@
<style lang="scss" scoped>
.qgjjdq{
@import "@/assets/styles/search-common.scss";
.query-box{
margin: -8px 0 8px 0;
.a-link:hover{
......@@ -370,15 +457,42 @@
.el-form{
margin-left: 24px;
}
::v-deep .el-form{
.el-form-item--small.el-form-item{
margin-top: 0;
margin-bottom: 0;
}
.el-form-item{
height: 32px;
}
.el-form-item__content{
line-height: 32px;
}
.el-input{
line-height: 32px;
.el-input__inner{
height: 32px;
line-height: 32px;
border-radius: 4px;
border: 0;
}
}
.is-focus{
.el-input__inner{
background: #F4F6F9;
}
}
}
.form-content-width{
width: 110px;
width: 90px;
}
::v-deep .el-cascader{
width: 200px;
width: 180px;
.el-cascader__tags{
flex-wrap: inherit;
.el-tag{
max-width: 130px;
/*max-width: 130px;*/
}
}
}
......
......@@ -343,10 +343,11 @@
companyName:"",
// accendant:"",
}
console.log(this.$route.query.projectname)
if(this.thistype == 'project'){
this.queryParam.businessId = this.searchParam.businessId
this.companyName = ""
this.queryParam.companyName=this.$route.query.projectname
this.queryParam.companyName=''
}
if(this.thistype == 'custom'){
this.queryParam.customerId = this.searchParam.customerId
......
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