Commit 36cbb902 authored by danfuman's avatar danfuman

修改

parent d67de5eb
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
></head-form-new> ></head-form-new>
<span class="check">查看集团招标<i class="el-icon-arrow-right"></i></span> <span class="check">查看集团招标<i class="el-icon-arrow-right"></i></span>
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton> <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 class="fixed-table" :data="tableData" border max-height="235">
<el-table-column label="项目名称" prop="title" min-width="350"> <el-table-column label="项目名称" prop="title" min-width="350">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</el-table-column> </el-table-column>
<el-table-column label="招标金额" prop="projectAmount" width="110"> <el-table-column label="招标金额" prop="projectAmount" width="110">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="项目类型" prop="projectCategory" width="110"></el-table-column> <el-table-column label="项目类型" prop="projectCategory" width="110"></el-table-column>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</el-table-column> </el-table-column>
<el-table-column label="历史发包总金额" prop="sum" width="140"> <el-table-column label="历史发包总金额" prop="sum" width="140">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="发包金额最高成员" prop="companyName" min-width="200"> <el-table-column label="发包金额最高成员" prop="companyName" min-width="200">
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
</el-table-column> </el-table-column>
<el-table-column label="发包总金额" prop="sum" width="140"> <el-table-column label="发包总金额" prop="sum" width="140">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="发包金额最大成员" prop="companyName" min-width="200"> <el-table-column label="发包金额最大成员" prop="companyName" min-width="200">
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
:isExcel="false" :isExcel="false"
></head-form> ></head-form>
<skeleton v-if="isSkeleton6" style="padding: 16px"></skeleton> <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 class="fixed-table" :data="peojectTopData" border max-height="235">
<el-table-column label="项目名称" prop="projectName" min-width="350"> <el-table-column label="项目名称" prop="projectName" min-width="350">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -231,7 +231,7 @@ ...@@ -231,7 +231,7 @@
<el-table-column label="中标日期" prop="winBidTime" width="100"></el-table-column> <el-table-column label="中标日期" prop="winBidTime" width="100"></el-table-column>
<el-table-column label="中标金额" prop="winBidAmount" width="130"> <el-table-column label="中标金额" prop="winBidAmount" width="130">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="项目类型" prop="projectTypeNew" width="100"></el-table-column> <el-table-column label="项目类型" prop="projectTypeNew" width="100"></el-table-column>
......
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
v-html="scope.row.projectName"></router-link> v-html="scope.row.projectName"></router-link>
<div v-else v-html="scope.row.projectName || '--'"></div> <div v-else v-html="scope.row.projectName || '--'"></div>
</template> </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"> <template slot="province" slot-scope="scope">
{{scope.row.province}}{{`${scope.row.city?'-'+scope.row.city:''}`}}{{`${scope.row.area?'-'+scope.row.area:''}`}} {{scope.row.province}}{{`${scope.row.city?'-'+scope.row.city:''}`}}{{`${scope.row.area?'-'+scope.row.area:''}`}}
</template> </template>
...@@ -48,7 +52,7 @@ export default { ...@@ -48,7 +52,7 @@ export default {
{label: '招标阶段', prop: 'tenderStage', width: '90'}, {label: '招标阶段', prop: 'tenderStage', width: '90'},
{label: '招采单位联系人', prop: 'contact', width: '120'}, {label: '招采单位联系人', prop: 'contact', width: '120'},
{label: '招采单位联系方式', prop: 'contactTel', width: '130'}, {label: '招采单位联系方式', prop: 'contactTel', width: '130'},
{label: '代理单位', prop: 'agency', minWidth: '170'}, {label: '代理单位', prop: 'agency', minWidth: '170', slot: true},
{label: '代理单位联系人', prop: 'agencyContact', width: '120'}, {label: '代理单位联系人', prop: 'agencyContact', width: '120'},
{label: '代理单位联系方式', prop: 'agencyContactTel', width: '130'}, {label: '代理单位联系方式', prop: 'agencyContactTel', width: '130'},
{label: '报名截止日期', prop: 'overTime', width: '110'} {label: '报名截止日期', prop: 'overTime', width: '110'}
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
</template> </template>
</head-form-new> </head-form-new>
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton> <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"> :queryParams="queryParams" @handle-current-change="handleCurrentChange" @sort-change="sortChange">
<template slot="companyName" slot-scope="scope"> <template slot="companyName" slot-scope="scope">
<router-link :to="scope.row.uipId?`/enterprise/${encodeStr(scope.row.companyId)}`:`/company/${encodeStr(scope.row.companyId)}`" tag="a" <router-link :to="scope.row.uipId?`/enterprise/${encodeStr(scope.row.companyId)}`:`/company/${encodeStr(scope.row.companyId)}`" tag="a"
...@@ -139,7 +139,7 @@ export default { ...@@ -139,7 +139,7 @@ export default {
pageSize: 20 pageSize: 20
}, },
forData: [ 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: 'area', width: '120', slot: true },
{ label: '招标数量', prop: 'biddingCount', width: '100', sortable: true }, { label: '招标数量', prop: 'biddingCount', width: '100', sortable: true },
{ label: '城投拿地', prop: 'landInfoCount', width: '100', sortable: true }, { label: '城投拿地', prop: 'landInfoCount', width: '100', sortable: true },
......
...@@ -6,17 +6,18 @@ ...@@ -6,17 +6,18 @@
<span class="common-title">全国经济大全</span> <span class="common-title">全国经济大全</span>
<el-form ref="queryForm" :model="queryParams" :inline="true" size="small"> <el-form ref="queryForm" :model="queryParams" :inline="true" size="small">
<el-form-item prop="year"> <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-option v-for="(item, index) in yearOptions" :key="index" :label="item.year" :value="item.year" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="area"> <el-form-item prop="area">
<el-cascader <el-cascader
ref="address" ref="address"
:class="[`select-adaptive-${inputID2}`]"
:options="addressList" :options="addressList"
:props="props" :props="props"
v-model="queryParams.address" v-model="queryParams.address"
@change="handleSearch" @change="iptAdaptive(inputID2,true)"
placeholder="地区选择" placeholder="地区选择"
collapse-tags collapse-tags
clearable></el-cascader> clearable></el-cascader>
...@@ -124,6 +125,7 @@ ...@@ -124,6 +125,7 @@
import dataRegion from '@/assets/json/dataRegion' import dataRegion from '@/assets/json/dataRegion'
import economiesDetail from './economies-detail' import economiesDetail from './economies-detail'
import skeleton from '../../component/skeleton' import skeleton from '../../component/skeleton'
import { v4 } from "uuid";
export default { export default {
name: 'NationalEconomies', name: 'NationalEconomies',
components: { components: {
...@@ -149,7 +151,9 @@ ...@@ -149,7 +151,9 @@
tableDataTotal: null, tableDataTotal: null,
show_page:true, show_page:true,
MaxPage:500, MaxPage:500,
isSkeleton:true isSkeleton:true,
inputID1:this.getUid(),
inputID2:this.getUid()
} }
}, },
created() { created() {
...@@ -353,7 +357,89 @@ ...@@ -353,7 +357,89 @@
path: '/macro/economies', path: '/macro/economies',
query:params 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> </script>
...@@ -361,6 +447,7 @@ ...@@ -361,6 +447,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.qgjjdq{ .qgjjdq{
@import "@/assets/styles/search-common.scss";
.query-box{ .query-box{
margin: -8px 0 8px 0; margin: -8px 0 8px 0;
.a-link:hover{ .a-link:hover{
...@@ -370,15 +457,42 @@ ...@@ -370,15 +457,42 @@
.el-form{ .el-form{
margin-left: 24px; 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{ .form-content-width{
width: 110px; width: 90px;
} }
::v-deep .el-cascader{ ::v-deep .el-cascader{
width: 200px; width: 180px;
.el-cascader__tags{ .el-cascader__tags{
flex-wrap: inherit; flex-wrap: inherit;
.el-tag{ .el-tag{
max-width: 130px; /*max-width: 130px;*/
} }
} }
} }
......
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