code init

This commit is contained in:
chenxiaoxi
2021-05-25 18:06:45 +08:00
parent 02698d6dab
commit f54a8d4fa1
1367 changed files with 540755 additions and 21713 deletions
+567
View File
@@ -0,0 +1,567 @@
<!-- 搜索中心 -->
<template>
<div class="search-center">
<div class="main">
<section class="home-section">
<!-- 搜索框 -->
<div class="search-box">
<div class="search-option">
<el-select v-model="searchInfoEO.selectKey" @on-change="selectKeyChange">
<el-option v-for="opt in fuzzySearchOption" :key="opt.value" :value="opt.value" :title="opt.label">{{ opt.label }}</el-option>
</el-select>
</div>
<div class="search-input">
<el-input type="text" v-model="searchInfoEO.selectValue" autofocus id="search-input" :placeholder="$t('m.pleaseEnterTheQueryInformation')" clearable v-if="!searchinputflag"></el-input>
<el-date-picker type="daterange" v-model="dateRangeData" placement="bottom-end" :placeholder="$t('m.pleaseSelectTheDate')" style="width: 260px;margin: 11px" :editable="false" v-if="searchinputflag"></el-date-picker>
</div>
<div class="search-btn" @click="fuzzySearch">
<i class="el-icon-search" :size="34" color="rgba(0,0,0,.8)" />
</div>
</div>
<nav class="section-nav">
<div class="nav-content">
<div class="nav-content-left">
<div style="width: auto;height: 31px" ><h5 style="display: inline" v-if="seniorShowFlag"><span>{{this.$t('m.standardAdvancedSearch')}}</span><small><a v-text="kindtext" @click="seniorSearch"></a></small></h5>
<el-button type="info" style="float: right;padding-bottom: 2px" @click="exportSelectFlag">{{this.$t('m.export')}}</el-button>
</div>
<div class="box-line"></div>
<!-- 国内外标准法规库 -->
<div class="searchbox" v-if="seniorSearchFlag && seniorShowFlag" >
<table-tools-bar>
<div slot="left">
<label-multi-select v-model="searchInfoEO.nature" :options="standNatureOptions" :placeholder="$t('m.findByStandardNature')" :clearable=false label="标准性质" />
<label-multi-select v-model="searchInfoEO.country" :options="countryOptions" :placeholder="$t('m.findByCountryAndRegion')" :clearable=false label="国家/地区" />
<label-multi-select v-model="searchInfoEO.standSort" :options="standSortOptions" :placeholder="$t('m.searchByStandardCategory')" :clearable=false label="标准类别"/>
<br><br>
<label-input v-model="searchInfoEO.numberShow" :placeholder="$t('m.searchByNumber')" clearable :label="this.$t('m.standardOrFileNo')" class="my-input"/>
<label-input v-model="searchInfoEO.nameShow" :placeholder="$t('m.searchBytName')" clearable :label="this.$t('m.name')" class="my-input" />
<label-multi-select v-model="searchInfoEO.applyArctic" :options="applyArcticOptions" :placeholder="$t('m.searchByProductCategory')" :clearable=false :label="this.$t('m.productCategory')" />
<br><br>
<label-multi-select v-model="searchInfoEO.applyAuth" :options="applyAuthOptions" :placeholder="$t('m.searchByAuthenticationType')" :clearable=false :label="this.$t('m.authenticationType')"/>
<label-multi-select v-model="searchInfoEO.category" :options="categoryOptions" :placeholder="$t('m.searchByCategory')" :clearable=false :label="this.$t('m.category')"/>
<label-multi-select v-model="searchInfoEO.energyKind" :options="energyKindOptions" :placeholder="$t('m.searchByEnergyType')" :clearable=false :label="this.$t('m.energyType')"/>
<br><br>
<label-multi-select v-model="searchInfoEO.adoptExtent" :options="adoptExtentOptions" :placeholder="$t('m.searchAccordingToTheDegreeOfBidding')" :clearable=false :label="this.$t('m.degreeOfBidding')" />
<label-multi-select v-model="searchInfoEO.standState" :options="standStateOptions" :placeholder="$t('m.lookupByStandardStatus')" :clearable=false :label="this.$t('m.standardState')"/>
<label-select v-model="searchInfoEO.issueTime" :options="issueTimeOptions" :placeholder="$t('m.searchByReleaseDate')" clearable :label="this.$t('m.releaseDate')" />
<br><br>
<el-button type="primary" @click="searchSeniorClick">{{$t('m.advancedSearch')}}</el-button>
<el-button type="primary" @click="clearAllSearch">{{$t('m.clearQuery')}}</el-button>
</div>
</table-tools-bar>
<div class="searchbox-item" v-for="(item, key) in conditionShowlist" :key="key">
<div class="l" >{{ item.key }}<i></i></div>
<div class="c" >
<div class="filter_option" style="padding-right:20px;">
<span v-for="(spanitem, index) in item.value" :title="spanitem.label" :value="spanitem.value" :key="index">{{ spanitem.label}}(<font style="color: red">{{ spanitem.number}}</font>)</span>
</div>
</div>
<!--<a href="javascript:;" class="r" id="searchitem_G_ICS_NAME_r"><span class="text">展开</span></a>-->
</div>
</div>
<!-- 待办任务 -->
<div class="nav-left-bottom" v-if="nodataFlag">
<!-- no-data-text="{{$t('m.noQueryResult')}}"-->
<el-table v-if="standTableShowFlag" border ref="" :columns="domesticStandColumn" :data="selectinfoList" no-data-text="$t('m.noQueryResult')"></el-table>
<el-table v-if="!standTableShowFlag" border ref="" :columns="dynamicTableColumn" :data="dynamicTableList" no-data-text="$t('m.noQueryResult')"></el-table>
<!-- -->
<loading :loading="loading">{{$t('m.getting')}}</loading>
<pagination :page="searchInfoEO.page" :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
</div>
<div class="nav-left-bottom noData" v-else>
<div class="nav-left-bottom-no-data-content">
<span>{{$t('m.noQueryResult')}}</span>
<div class="button-wrapper">
<el-button type="primary" ghost @click="applyPurchase">{{$t('m.applyForPurchase')}}</el-button>
</div>
</div>
</div>
<!-- 检索历史,浏览记录 -->
<div class="searchbox" >
<div class="nav-search-recommend" id="">
<h5>{{$t('m.recommendItToMe')}}</h5>
<span class="more"></span>
<ul>
<li v-for="(item, index) in recommendList" :key="index">
<div class="res-type-content">
<span :title="item.numberShow" @click="showRecommendDetials(item)">{{index+1}}- {{item.numberShow }} &nbsp;&nbsp; {{item.nameShow}}</span>
</div>
</li>
</ul>
</div>
<div class="nav-search-history" id="informationCenter">
<h5>{{$t('m.searchHistory')}}</h5>
<span class="more" @click="deleteSearchHistory(1)" >{{$t('m.clearQuery')}}</span>
<ul>
<li v-for="(item, index) in searchHistotyData" :key="index">
<div class="res-type-content">
<span :title="item.searchContent">{{index+1}}- {{ item.searchContent }}</span>
</div>
<i class="el-icon-close" size="24" @click="deleteSearchHistory(2,item)"/>
<!--<Button class="time" icon="ios-close"></Button>-->
</li>
</ul>
</div>
</div>
</div>
</div>
</nav>
</section>
<!--分享模态框-->
<el-modal title="this.$t('m.pleaseSelectThePersonYouWantToShare')" v-model="shareStandardModal" :closable="false" width="360">
<el-form>
<!--multiple-->
<el-select v-model="shareStandardSelect" style="width:200px" multiple>
<el-option v-for="shareUser in shareUserInfoList" :value="shareUser.usid" :key="shareUser.usid">
{{ shareUser.account }}
</el-option>
</el-select>
</el-form>
<div slot="footer">
<el-button type="text" size="large" @click="shareStandardModal=false">{{$t('m.cancel')}}</el-button>
<el-button type="primary" size="large" @click="sureShareStandardLaws">{{$t('m.sure')}}</el-button>
</div>
</el-modal>
<!-- 分享 -->
<el-radio title="this.$t('m.sharingStandard')" v-model="drawerModal" width="300" :styles="drawerModalstyles" @on-close="treeCancel">
<dept-tree treeDivId="drawerModalTree"
ref="drawerModalTree"
@treeClick="selcetTree"
allDept
showUser
:editable="false"
style="padding: 0 15px">
</dept-tree>
<div class="demo-drawer-footer">
<el-button style="margin-right: 8px" @click="treeCancel">{{$t('m.cancel')}}</el-button>
<el-button type="primary" @click="sureShareStandardLaws">{{$t('m.sure')}}</el-button>
</div>
</el-radio>
<!-- 导出文件改名字模态框 -->
<el-modal v-model="exportModelFlag" title="this.$t('m.exportFile')" width="700" :closable="false">
<label-input v-model="exportName" :placeholder="$t('m.pleaseEnterThNameOfTheExportFile')" clearable :label="this.$t('m.exportName')"/>
<div slot="footer">
<el-button size="small" @click="exportTestItem">{{$t('m.sure')}}</el-button>
<el-button size="small" @click="cancal">{{$t('m.cancel')}}</el-button>
</div>
</el-modal>
</div>
</div>
</template>
<script src="./js/searchCenter.js"></script>
<style lang="less">
@import '~@/assets/styles/style';
@import '~@/assets/styles/mixins';
.search-center{
.main {
overflow-y: auto;
.home-section{
background: @homeSectionBgColor;
padding-top: 1.6%;
min-height: 92.2%;
.search-box{
width: 57.95%;
height: 42px;
margin: 0 auto;
display: flex;
margin-bottom: 1.65%;
&>div{
height: 100%;
}
.search-option{
flex: 0 0 13.63%;
color: #515151;
font-size: 16px;
background: rgba(255,255,255,.8);
border: 1px solid #B3C3C7;
.flex-center;
.ivu-select{
height: 100%;
background: transparent;
border: none;
.ivu-select-selection{
height: 100%;
border: none;
border-radius: 0;
box-shadow: none;
& > div{
height: 100%;
.flex();
align-items: center;
justify-content: center;
}
}
}
}
.search-input{
flex: 0 0 55%;
background: rgba(255,255,255,.8);
border: 1px solid #B3C3C7;
border-left: transparent;
.ivu-input-wrapper{
height: 100%;
display: flex;
align-items: center;
.ivu-input{
height: 100%;
background: transparent;
border: none !important;
box-shadow: none;
padding: 0 20px;
font-size: 16px;
}
}
}
.search-btn{
flex: 0 0 13.63%;
background: @homeHeaderBgColor;
cursor: pointer;
&:hover{
opacity: .8;
}
.flex-center;
.ivu-icon{
color: #FFF !important;
}
}
.search-text{
.flex-center;
color: #2A639B;
font-weight: bold;
font-size: 16px;
flex: 0 0 calc(~'100% - 82.26%');
position: relative;
top: 5px;
}
}
.search-type{
width: 30.95%;
margin: 0 auto;
display: flex;
margin-bottom: 1.65%;
label{
width: 95px;
text-align: center;
}
}
.section-nav{
width: 90%;
margin: 0 auto;
max-width: 1600px;
.nav-content{
width: 100%;
height: 100%;
position: relative;
.nav-content-left {
width: 100%;
font-size: 17px;
h5{
font-size: 18px;
line-height: 30px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
font-weight: 600;
margin-top: 10px;
}
.nav-left-top{
width: 100%;
height: 30%;
}
.nav-left-bottom{
.ivu-table-tip{
table{
/*min-height: 600px;*/
}
}
.pagination{
position: inherit;
}
&.noData{
min-height: 300px;
.flex();
justify-content: center;
align-items: center;
background: #FFF;
.nav-left-bottom-no-data-content{
&>span{
display: block;
color: #DDD;
}
.button-wrapper{
.flex();
justify-content: center;
margin-top: 10px;
}
}
}
}
small{
display: inline;
margin-left: 10px;
cursor: pointer;
font-size: 75%;
font-weight: lighter
}
.nav-search-history{
width: 50%;
position: absolute;
top: auto;
right: 0;
.res-type-content{
width: calc(~'100% - 80px');
.flex();
align-items: center;
&>a{
padding-left: 4px;
flex: 1;
.ellipsis();
}
}
h5{
font-size: 14px;
line-height: 30px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
font-weight: 600;
}
ul{
width: 100%;
height: 85%;
overflow-y: auto;
li{
padding: 0 0.1rem;
margin-bottom: 0.15rem;
position: relative;
display: flex;
display: -ms-flex;
align-items: center;
font-size: 14px;
&:last-child{
margin-bottom: 0;
}
.type{
position: relative;
display: inline-block;
padding-right: 7.5px;
&::before{
content: '';
display: inline-block;
width: 2px;
height: 80%;
position: absolute;
top: 7.5%;
right: 0;
background: #AAA;
}
}
.time{
position: absolute;
top: 0;
right: 0.1rem;
}
a{
color: #333;
display: inline-block;
}
&:hover{
a{
color: #12508E;
font-weight: bold;
text-decoration: underline;
}
.time{
color: #12508E;
}
}
}
}
.more{
cursor: pointer;
color: #12508E;
position: absolute;
top: 0;
right: 0;
z-index: 100;
padding: 5px 10px;
font-size: 10px;
&:hover{
color: #FFF;
background: #12508E;
transition: all .2s linear;
}
}
}
.nav-search-recommend{
width: 50%;
position: absolute;
top: auto;
left: 0;
.res-type-content{
width: calc(~'100% - 80px');
.flex();
align-items: center;
&>a{
padding-left: 4px;
flex: 1;
.ellipsis();
}
}
h5{
font-size: 14px;
line-height: 30px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
font-weight: 600;
}
ul{
width: 100%;
height: 85%;
overflow-y: auto;
li{
padding: 0 0.1rem;
margin-bottom: 0.15rem;
position: relative;
cursor: pointer;
display: flex;
display: -ms-flex;
align-items: center;
font-size: 14px;
&:last-child{
margin-bottom: 0;
}
.type{
position: relative;
display: inline-block;
padding-right: 7.5px;
&::before{
content: '';
display: inline-block;
width: 2px;
height: 80%;
position: absolute;
top: 7.5%;
right: 0;
background: #AAA;
}
}
.time{
position: absolute;
top: 0;
right: 0.1rem;
}
a{
color: #333;
display: inline-block;
}
&:hover{
a{
color: #12508E;
font-weight: bold;
text-decoration: underline;
}
.time{
color: #12508E;
}
}
}
}
.more{
cursor: pointer;
color: #12508E;
position: absolute;
top: 0;
right: 0;
z-index: 100;
padding: 5px 10px;
font-size: 10px;
&:hover{
color: #FFF;
background: #12508E;
transition: all .2s linear;
}
}
}
}
#informationCenter{color: #333;}
}
}
}
.searchbox {
border: 1px solid #e3e3e3;
padding-left: 10px;
padding-right: 10px;
overflow: hidden;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.searchbox-item {
border-bottom: 1px dashed #e3e3e3;
padding-bottom: 8px;
overflow: hidden;
position: relative;
color: black;
}
.searchbox .l {
box-sizing: content-box;
padding: 0;
border-radius: 3px;
text-align: center;
background: none;
color: #333;
font-weight: bold;
font-size: 14px;
position: absolute;
left: 0;
top: 8px;
width: 72px;
line-height: 22px;
}
.searchbox .c {
width: auto !important;
padding-left: 90px;
padding-right: 70px;
overflow: hidden;
font-size: 14px;
}
.searchbox .c .control-type {
color: #5CB85C;
width: 44px;
height: 30px;
padding-top: 10px;
float: left;
}
.searchbox-item .selected {
background: #18a689;
color: #fff;
}
.filter_option span {
display: inline-block;
line-height: 22px;
border-radius: 3px;
padding-left: 6px;
padding-right: 6px;
cursor: pointer;
margin-right: 17px;
margin-top: 8px;
}
.searchbox .r {
line-height: 22px;
position: absolute;
right: 0;
top: 8px;
}
}
}
</style>
+936
View File
@@ -0,0 +1,936 @@
import '../../../assets/zTree/js/jquery.ztree.core.js'
import '../../../assets/zTree/js/jquery.ztree.excheck.js'
import '../../../assets/zTree/js/jquery.ztree.exedit.js'
import deptTree from '../../processCenter/pages/components/deptTree'
import { mapState } from 'vuex'
export default {
name: 'SearchCenter',
data () {
return {
selectinfoList: [], // 记录查询出来的结果
total: 0,
loading: false,
searching: false,
countryOptions: [],
standSortOptions: [], // 标准类别下拉框
applyArcticOptions: [], // 适用车型下拉框
standStateOptions: [], // 标准状态下拉框
standNatureOptions: [], // 标准性质下拉框
adoptExtentOptions: [], // 采标程度下拉框
energyKindOptions: [], // 能源种类下拉框
applyAuthOptions: [], // 适用认证(认证类型)下拉框
categoryOptions: [], // 所属类别下拉框
issueTimeOptions: [{label: '全部', value: '0'}, {label: '本月', value: '1'}, {label: '近三个月', value: '2'},
{label: '近一年', value: '3'},
{label: '近两年', value: '4'}, {label: '近三年', value: '5'}, {label: '三年以上', value: '6'}], // 高级搜索条件中的发布日期
conditionShowlist: {},
searchinputflag: false, // 控制搜索框是时间日期,还是普通搜索框
dateRangeData: [], // 记录时间选择框的前后时间
seniorSearchFlag: false, // 控制高级搜索模态框显示
searchInfoEO: {
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
selectIndex: '', // 记录从哪张表中查数据
nature: [],
country: [],
standSort: [],
numberShow: '',
nameShow: '',
applyArctic: [],
applyAuth: [],
category: [],
energyKind: [],
adoptExtent: [],
standState: [],
selectValue: ''
}, // 分页查询过程中用到的对象
seniortype: ['nature', 'country', 'stand_sort', 'apply_arctic', 'apply_auth', 'category', 'energy_kind', 'adopt_extent', 'statecode', 'issue_time'],
kindtext: '展开条件',
domesticStandColumn: [
{
title: '序号',
type: 'index',
width: 60,
align: 'center',
indexMethod: (row) => {
return ((this.searchInfoEO.page - 1) * this.searchInfoEO.pageSize + row._index + 1)
}
},
{
title: '标准号/政策编号',
key: 'numbershow',
width: 150,
render: (h, params) => {
return h('a', {
props: {},
on: {
click: () => {
this.detailsStandardLaws(params.row)
}
},
class: {
'text-overflow-hidden': true
},
attrs: {
title: params.row.numbershow
}
}, params.row.numbershow)
}
},
{
title: '标准/文件名称',
key: 'nameshow',
render: (h, params) => {
return h('span', {
class: {
'text-overflow-hidden': true
},
attrs: {
title: params.row.nameshow
}
}, params.row.nameshow)
}
},
{
title: '发布日期',
width: 150,
align: 'center',
key: 'issue_time',
render: (h, params) => {
return h('span', {}, this.$dateFormat(new Date(params.row.issue_time), 'yyyy-MM-dd'))
}
},
{
title: '实施日期',
width: 150,
align: 'center',
key: 'put_time',
render: (h, params) => {
return h('span', {}, this.$dateFormat(new Date(params.row.put_time), 'yyyy-MM-dd'))
}
},
{
title: '标准/政策状态',
width: 150,
align: 'center',
key: 'standstateshow',
render: (h, params) => {
if (this.searchInfoEO.selectIndex === 'laws') {
return h('span', {}, params.row.lawsstateshow)
} else {
return h('span', {}, params.row.standstateshow)
}
}
},
{
title: '操作',
key: 'action',
width: 230,
align: 'center',
render: (h, params) => {
let showtyo = ''
if (params.row.collectBtn) {
showtyo = '收藏'
} else {
showtyo = '取消收藏'
}
return h('div', [
h('Button', {
props: {
type: 'primary',
size: 'small',
ghost: true
},
style: {
marginRight: '5px'
},
on: {
click: () => {
if (params.row.collectBtn) {
this.collectStandard(params.row)
} else {
this.cancelCollectStandard(params.row)
}
}
}
}, showtyo),
h('Button', {
props: {
type: 'primary',
size: 'small',
ghost: true
},
style: {
marginRight: '5px'
},
on: {
click: () => {
// this.shareStandardLaws(params.row) 之前是弹出模态框,可以多选人,后修改成有组织部门的
this.drawerModal = true
this.selectNowObjResult = JSON.parse(JSON.stringify(params.row))
}
}
}, '分享'),
h('Button', {
props: {
type: 'primary',
size: 'small',
ghost: true
},
style: {
marginRight: '5px'
},
on: {
click: () => {
this.goProcess(params.row)
}
}
}, '流程')
])
}
}
],
seniorShowFlag: true,
selectTypeRedio: 'stand',
// 动态消息列表
dynamicTableColumn: [
{
title: '序号',
type: 'index',
width: 60,
align: 'center',
indexMethod: (row) => {
return ((this.searchInfoEO.page - 1) * this.searchInfoEO.pageSize + row._index + 1)
}
},
{
title: '消息模块',
key: 'msgType',
width: 180,
align: 'center',
render: (h, params) => {
// let _this = this
let texts = ''
switch (params.row.msg_type) {
case 'INLAND' :
texts = '国内动态'
break
case 'FOREIGN' :
texts = '国外动态'
break
case 'RESOURCE' :
texts = '资料中心'
break
}
return h('div', {
props: {}
}, texts)
}
},
{
title: '标题',
key: 'title',
align: 'left'
},
{
title: '发布日期',
key: 'pub_time',
width: 180,
align: 'center',
render: (h, params) => {
return h('span', {}, this.$dateFormat(new Date(params.row.pub_time), 'yyyy-MM-dd hh:mm:ss'))
}
},
{
title: '操作',
key: 'action',
width: 180,
align: 'center',
render: (h, params) => {
return h('div', [
h('Button', {
props: {
type: 'warning',
size: 'small'
},
style: {
marginRight: '5px'
},
on: {
click: () => {
this.showMsgPage(params.row.id)
}
}
}, '查看')
])
}
}
],
standTableShowFlag: true,
dynamicTableList: [],
shareStandardModal: false, // 分享模态框显示
selectNowObjResult: {}, // 记录选择的数据
shareStandardSelect: [],
shareUserInfoList: [],
// 模糊搜索下拉框数据
fuzzySearchOption: [{value: 'standNumber', label: '标准编号'},
{value: 'standName', label: '标准名称'},
{value: 'standState', label: '标准状态'},
{value: 'standFile', label: '标准正文内容'},
{value: 'applyArctic', label: '适用车型'},
{value: 'issueTime', label: '发布日期'},
{value: 'putTime', label: '实施日期'},
{value: 'draftUser', label: '起草人'},
{value: 'draftingUnit', label: '起草部门'},
{value: 'replaceStandNum', label: '代替标准'},
{value: 'replacedStandNum', label: '被代替标准'},
{value: 'lawsName', label: '文件名称'},
{value: 'lawsNumber', label: '文件编号'},
{value: 'bussstandName', label: '企业标准名称'},
{value: 'bussstandsNumber', label: '企业标准编号'},
{value: 'msgTitle', label: '动态标题'}
],
// 记录检索历史
searchHistotyData: [],
// 记录为我推荐
recommendList: [],
nodataFlag: false, // 记录是否有查询到数据
// 分享抽屉状态
drawerModal: false,
drawerModalstyles: {
height: 'calc(100% - 55px)',
overflow: 'auto',
paddingBottom: '53px',
position: 'static'
},
idList: [], // 记录所有查询出来的id
exportName: '',
exportModelFlag: false
}
},
methods: {
// 分页查询标准法规
getStandardLawsTable () {
if (this.searchInfoEO.selectKey === 'issueTime' || this.searchInfoEO.selectKey === 'putTime') {
if (this.dateRangeData[0] !== '' && this.dateRangeData[1] !== '') {
this.searchInfoEO.selectStartTime = this.$dateFormat(this.dateRangeData[0], 'yyyy-MM-dd hh:mm:ss')
this.searchInfoEO.selectEndTime = this.$dateFormat(this.dateRangeData[1], 'yyyy-MM-dd hh:mm:ss')
this.searchInfoEO.selectValue = this.dateRangeData[0]
} else {
this.searchInfoEO.selectValue = ''
}
}
// 判断显示标准表格还是动态信息表格
if (this.searchInfoEO.selectIndex === 'msgdyinfo') {
this.standTableShowFlag = false
} else {
this.standTableShowFlag = true
}
this.$http.post('search/searchCenter/searchSarBykey', this.searchInfoEO, {
_this: this, loading: 'loading'
}, res => {
if (this.searchInfoEO.selectIndex === 'msgdyinfo') {
this.nodataFlag = true
} else if (res.data.list.length > 0) {
this.nodataFlag = true
} else {
this.nodataFlag = false
}
if (this.searchInfoEO.selectIndex === 'stand') {
this.selectinfoList = res.data.list
this.total = res.data.count
for (let i = 0; i < res.data.list.length; i++) {
if (res.data.list[i].collectId != null && res.data.list[i].collectId !== '') {
res.data.list[i].collectBtn = false
res.data.list[i].cancelCollectBtn = true
} else {
res.data.list[i].collectBtn = true
res.data.list[i].cancelCollectBtn = false
}
}
// 国内标准处理
this.selectGroupdata(res.data)
} else if (this.searchInfoEO.selectIndex === 'msgdyinfo') {
// 动态消息
this.dynamicTableList = res.data.list
this.total = res.data.count
} else {
// 企业标准,国内外法规
this.selectinfoList = res.data.list
this.total = res.data.count
for (let i = 0; i < res.data.list.length; i++) {
if (res.data.list[i].collectId != null && res.data.list[i].collectId !== '') {
res.data.list[i].collectBtn = false
res.data.list[i].cancelCollectBtn = true
} else {
res.data.list[i].collectBtn = true
res.data.list[i].cancelCollectBtn = false
}
}
}
// 查询为我推荐
if (res.data.list.length > 0) {
this.getRecommend(res.data.list[0])
} else {
this.getRecommend()
}
}, e => {
})
},
// 分页点击后方法
pageChange (page) {
this.searchInfoEO.page = page
this.getStandardLawsTable()
},
// 分页每页显示数改变后方法
pageSizeChange (pageSize) {
this.searchInfoEO.pageSize = pageSize
this.getStandardLawsTable()
},
// 模糊搜索中下拉框数据改变
selectKeyChange (keyvalue) {
if (keyvalue === 'issueTime' || keyvalue === 'putTime') {
this.searchinputflag = true
this.dateRangeData = []
} else {
this.searchinputflag = false
this.searchInfoEO.selectValue = ''
}
},
// 点击高级搜索按钮
seniorSearch () {
if (this.seniorSearchFlag) {
this.seniorSearchFlag = false
this.kindtext = '展开条件'
this.searchInfoEO.nature = []
this.searchInfoEO.country = []
this.searchInfoEO.standSort = []
this.searchInfoEO.numberShow = ''
this.searchInfoEO.nameShow = ''
this.searchInfoEO.applyArctic = []
this.searchInfoEO.applyAuth = []
this.searchInfoEO.category = []
this.searchInfoEO.energyKind = []
this.searchInfoEO.adoptExtent = []
this.searchInfoEO.standState = []
this.searchInfoEO.issueTime = ''
} else {
this.seniorSearchFlag = true
this.kindtext = '收起条件'
}
},
// 点击高级搜索模态框中的确认按钮
searchSeniorClick () {
this.searchInfoEO.page = 1
this.seniorShowFlag = true
this.selectTypeRedio = 'stand'
this.searchInfoEO.selectIndex = 'stand'
this.getStandardLawsTable()
},
// 查看 查看跳转详情页
detailsStandardLaws (item) {
let routername = ''
let pagetype = ''
if (item.type === 'stand') {
routername = 'OtherStandardDetails'
if (item.stand_type === 'INLAND') {
pagetype = 'INLAND_STAND'
} else {
pagetype = 'FOREIGN_STAND'
}
} else if (item.type === 'laws') {
routername = 'OtherLawsDetails'
if (item.laws_type === 'INLAND') {
pagetype = 'INLAND_LAWS'
} else {
pagetype = 'FOREIGN_LAWS'
}
} else {
routername = 'OtherBussStandardDetails'
pagetype = 'BUSINESS_STAND '
}
// 详情跳到新页
let routeUrl = this.$router.resolve({
name: routername,
params: {
id: item.id,
pageType: pagetype
}
})
window.open(routeUrl.href, '_blank')
},
// 收藏
collectStandard (item) {
let personCollect = {}
personCollect.collectResId = item.id
personCollect.collectTitle = item.nameshow + '(编号:' + item.numbershow + ')'
let pagetype = ''
if (item.type === 'stand') {
if (item.stand_type === 'INLAND') {
pagetype = 'INLAND_STAND'
} else {
pagetype = 'FOREIGN_STAND'
}
} else if (item.type === 'laws') {
if (item.laws_type === 'INLAND') {
pagetype = 'INLAND_LAWS'
} else {
pagetype = 'FOREIGN_LAWS'
}
} else {
pagetype = 'BUSINESS_STAND'
}
personCollect.collectType = pagetype
this.$http.postData('person/personCollect', personCollect, {
_this: this
}, res => {
item.collectBtn = !item.collectBtn
item.cancelCollectBtn = !item.cancelCollectBtn
item.collectId = res.data.id
}, e => {
})
},
// 取消收藏
cancelCollectStandard (item) {
this.$http.put('person/personCollect/updateByUserId', {
id: item.collectId
}, {
_this: this
}, res => {
item.collectBtn = !item.collectBtn
item.cancelCollectBtn = !item.cancelCollectBtn
item.collectId = ''
}, e => {
})
},
// 分享标准
shareStandardLaws (item) {
this.selectNowObjResult = JSON.parse(JSON.stringify(item))
this.shareStandardModal = true
this.$http.get('/sys/user/userEoList', '', {
_this: this
}, res => {
this.shareUserInfoList = res.data
}, e => {
})
},
// 消息推送
sureShareStandardLaws () {
if (this.shareStandardSelect.length === 0) {
this.$Message.warning('请选择要分享的人!')
} else {
let pagetype = ''
if (this.selectNowObjResult.type === 'stand') {
if (this.selectNowObjResult.stand_type === 'INLAND') {
pagetype = 'INLAND_STAND'
} else {
pagetype = 'FOREIGN_STAND'
}
} else if (this.selectNowObjResult.type === 'laws') {
if (this.selectNowObjResult.laws_type === 'INLAND') {
pagetype = 'INLAND_LAWS'
} else {
pagetype = 'FOREIGN_LAWS'
}
} else {
pagetype = 'BUSINESS_STAND'
}
let personShareEO = {}
personShareEO.resType = pagetype
personShareEO.resTitle = this.selectNowObjResult.nameshow + ' ( 编号:' + this.selectNowObjResult.numbershow + ' )'
personShareEO.resId = this.selectNowObjResult.id
personShareEO.recipientId = this.shareStandardSelect.join(',')
this.$http.post('/person/personShare/savePersonShare', personShareEO, {
_this: this
}, res => {
this.$Message.success('分享成功!')
this.shareStandardModal = false
this.drawerModal = false
this.shareStandardSelect = []
this.$refs.drawerModalTree.treeReload()
}, e => {
this.$Message.error('分享失败!')
})
}
},
// 取消
treeCancel () {
this.drawerModal = false
this.$refs.drawerModalTree.treeReload()
},
// 树点击
selcetTree (treeId, treeNode) {
this.shareStandardSelect.push(treeNode.id)
},
// 流程
goProcess (item) {
this.$store.commit('setSearchInfoEO', JSON.stringify(this.searchInfoEO))
let obj = {}
obj.id = item.id
obj.showName = item.nameshow
obj.showNumber = item.numbershow
obj.natureShow = item.nature
let pagetype = ''
this.$store.commit('setDetailMap', this.$route.path)
if (item.type === 'stand') {
if (item.stand_type === 'INLAND') {
pagetype = 'INLAND_STAND'
} else {
pagetype = 'FOREIGN_STAND'
}
} else if (item.type === 'laws') {
if (item.laws_type === 'INLAND') {
pagetype = 'INLAND_LAWS'
} else {
pagetype = 'FOREIGN_LAWS'
}
} else {
pagetype = 'BUSINESS_STAND'
}
obj.typeShow = pagetype
sessionStorage.setItem('processStandLaws', JSON.stringify(obj))
this.$router.push({
path: '/newProcess'
})
},
// 高级搜索后,返回各分组数据
selectGroupdata (data) {
if (data.list.length > 0) {
let resultdata = data.list[0]['groupdata']
for (let i = 0; i < this.seniortype.length; i++) {
let nowdata = this.conditionShowlist[this.seniortype[i]].value
let resultsubdata = resultdata[this.seniortype[i]]
for (let j = 0; j < nowdata.length; j++) {
if (resultsubdata[nowdata[j].value] === undefined) {
nowdata[j].number = 0
} else {
nowdata[j].number = resultsubdata[nowdata[j].value]
}
}
}
} else {
for (let i = 0; i < this.seniortype.length; i++) {
let nowdata = this.conditionShowlist[this.seniortype[i]].value
for (let j = 0; j < nowdata.length; j++) {
nowdata[j].number = 0
}
}
}
},
selectTypeRedioChange () {
this.searchInfoEO.page = 1
if (this.selectTypeRedio === 'stand') {
this.seniorShowFlag = true
} else {
this.seniorShowFlag = false
}
switch (this.selectTypeRedio) {
case 'stand': this.searchInfoEO.selectIndex = 'stand'; break
case 'laws': this.searchInfoEO.selectIndex = 'laws'; break
case 'bussstand': this.searchInfoEO.selectIndex = 'bussstand'; break
case 'msgdyinfo': this.searchInfoEO.selectIndex = 'msgdyinfo'; break
}
this.getStandardLawsTable()
},
// 模糊搜索按钮点击事件
fuzzySearch () {
this.searchInfoEO.page = 1
if (this.searchInfoEO.selectKey === 'lawsName' || this.searchInfoEO.selectKey === 'lawsNumber') {
this.seniorShowFlag = false
this.selectTypeRedio = 'laws'
this.searchInfoEO.selectIndex = 'laws'
} else if (this.searchInfoEO.selectKey === 'bussstandName' || this.searchInfoEO.selectKey === 'bussstandsNumber') {
this.seniorShowFlag = false
this.selectTypeRedio = 'bussstand'
this.searchInfoEO.selectIndex = 'bussstand'
} else if (this.searchInfoEO.selectKey === 'msgTitle') {
this.seniorShowFlag = false
this.selectTypeRedio = 'msgdyinfo'
this.searchInfoEO.selectIndex = 'msgdyinfo'
} else {
this.seniorShowFlag = true
this.selectTypeRedio = 'stand'
this.searchInfoEO.selectIndex = 'stand'
}
this.getStandardLawsTable()
},
// 查看消息内容
showMsgPage (id) {
// 详情跳到新页
let routeUrl = this.$router.resolve({
name: 'OtherDomesticDynamicsDetails',
params: {
id: id
}
})
window.open(routeUrl.href, '_blank')
},
// 标准查询条件搜索按钮
clearAllSearch () {
this.searchInfoEO.nature = []
this.searchInfoEO.country = []
this.searchInfoEO.standSort = []
this.searchInfoEO.numberShow = ''
this.searchInfoEO.nameShow = ''
this.searchInfoEO.applyArctic = []
this.searchInfoEO.applyAuth = []
this.searchInfoEO.category = []
this.searchInfoEO.energyKind = []
this.searchInfoEO.adoptExtent = []
this.searchInfoEO.standState = []
this.searchInfoEO.issueTime = ''
this.getStandardLawsTable()
},
// 查询检索历史记录
getSearchHistoty () {
this.$http.get('person/personSearch/selectPersonSearch', this.searchInfoEO, {
_this: this
}, res => {
this.searchHistotyData = res.data
}, e => {
})
},
getDate (date) {
return date != null ? date.substring(0, date.indexOf(' ')) : ''
},
deleteSearchHistory (flag, item) {
let type = ''
let id = ''
if (flag === 1) {
type = 'all'
} else {
id = item.id
}
this.$http.post('person/personSearch/deletePersonSearch', {id: id, type: type}, {
_this: this, loading: 'loading'
}, res => {
this.getSearchHistoty()
}, e => {
})
},
// 查询为我推荐
getRecommend (item) {
let obj = {}
obj.id = item.id
let url = ''
if (item.type === 'stand') {
// 为我推荐查询
url = 'lawss/sarStandardsInfo/selectRecommendStand'
} else if (item.type === 'laws') {
url = 'lawss/sarLawsInfo/selectRecommendLaws'
} else if (item.type === 'bussstand') {
url = 'lawss/sarBussionessStand/selectRecommendStand'
} else {
url = 'lawss/msgDynamicInfo/selectRecommendMsgDynamicInfo'
}
this.$http.get(url, obj, {
_this: this
}, res => {
this.recommendList = res.data
}, e => {
})
},
showRecommendDetials (item) {
if (item.typeShow !== 'MSG_DYNAMIC') {
let routername = ''
let pagetype = ''
pagetype = item.typeShow
if (item.typeShow === 'INLAND_STAND' || item.typeShow === 'FOREIGN_STAND') {
routername = 'OtherStandardDetails'
} else if (item.typeShow === 'INLAND_LAWS' || item.typeShow === 'FOREIGN_LAWS') {
routername = 'OtherLawsDetails'
} else if (item.typeShow === 'BUSINESS_STAND') {
routername = 'OtherBussStandardDetails'
}
// 详情跳到新页
let routeUrl = this.$router.resolve({
name: routername,
params: {
id: item.id,
pageType: pagetype
}
})
window.open(routeUrl.href, '_blank')
} else {
this.showMsgPage(item.id)
}
},
// 没有数据的时候申请购买
applyPurchase () {
this.$store.commit('setSearchInfoEO', JSON.stringify(this.searchInfoEO))
this.$store.commit('setDetailMap', this.$route.path)
this.$router.push({
name: 'NewProcess',
params: {
type: '10',
state: 1
}
})
},
// 导出查询数据模态框控制
exportSelectFlag () {
if (this.total > 0) {
this.exportName = ''
this.exportModelFlag = true
// 将所有的搜索条件传回去,没有分页去查询所有的id
this.$http.post('search/searchCenter/searchIdToImport', this.searchInfoEO, {
_this: this, loading: 'loading'
}, res => {
if (res.ok) {
this.idList = res.data
} else {
this.$Message.warning(res.message)
}
}, e => {
})
} else {
this.$Message.warning('没有查询到任何数据')
}
},
// 导出确定功能
exportTestItem () {
if (this.exportName === '') {
this.exportName = '查询信息导出'
}
if (this.searchInfoEO.selectIndex === 'stand') {
window.open('/api/lawss/sarStandardsInfo/exportStandardsInfoExcel?idList=' + this.idList.join(',') + '&exportName=' + this.exportName)
} else if (this.searchInfoEO.selectIndex === 'laws') {
window.open('/api/lawss/sarLawsInfo/exportLawsInfos?ids=' + this.idList.join(',') + '&exportNameGet=' + this.exportName)
} else if (this.searchInfoEO.selectIndex === 'bussstand') {
window.open('/api/lawss/sarBussionessStand/exportSarBussionessStand?idList=' + this.idList.join(',') + '&exportName=' + this.exportName)
} else {
window.open('/api/lawss/msgDynamicInfo/exportMsgDynamicInfoExcel?idList=' + this.idList.join(',') + '&exportName=' + this.exportName)
}
this.$Message.success('导出信息成功..')
this.exportModelFlag = false
},
// 导出取消按钮关闭模态、置空
cancal () {
this.exportModelFlag = false
}
},
components: {
ComHeader,
SideBar,
deptTree
},
props: {},
computed: {
...mapState(['process'])
},
watch: {},
mounted () {
if (this.$route.params.selectKey === undefined || this.$route.params.selectKey === '') {
this.searchInfoEO.selectKey = 'standNumber'
} else {
this.searchInfoEO.selectKey = this.$route.params.selectKey
}
// 如果从首页进来,输入框中没有输入任何数据,传递allvalue
if (this.$route.params.selectValue === 'allvalue' || this.$route.params.selectValue === undefined || this.$route.params.selectValue === '') {
this.searchInfoEO.selectValue = ''
} else {
this.searchInfoEO.selectValue = this.$route.params.selectValue
}
if (this.searchInfoEO.selectKey === 'issueTime' || this.searchInfoEO.selectKey === 'putTime') {
let datarange = JSON.parse(this.searchInfoEO.selectValue)
this.dateRangeData[0] = new Date(datarange[0])
this.dateRangeData[1] = new Date(datarange[1])
this.searchInfoEO.selectValue = ''
this.searchinputflag = true
}
// 判断selectKey 从而确定从哪个索引表中查询数据
if (this.searchInfoEO.selectKey === 'lawsName' || this.searchInfoEO.selectKey === 'lawsNumber') {
this.selectTypeRedio = 'laws'
} else if (this.searchInfoEO.selectKey === 'bussstandName' || this.searchInfoEO.selectKey === 'bussstandsNumber') {
this.selectTypeRedio = 'bussstand'
} else if (this.searchInfoEO.selectKey === 'msgTitle') {
this.selectTypeRedio = 'msgdyinfo'
} else {
this.selectTypeRedio = 'stand'
}
this.selectTypeRedioChange()
// 从数据库中查询各下拉框数据
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
}, res => {
let obj = {}
obj['key'] = '标准性质'
obj['value'] = JSON.parse(JSON.stringify(res.data.SARPROPERTY))
this.conditionShowlist.nature = JSON.parse(JSON.stringify(obj)) // 标准性质
obj['key'] = '国家/地区'
obj['value'] = JSON.parse(JSON.stringify(res.data.COUNTRY))
this.conditionShowlist.country = JSON.parse(JSON.stringify(obj)) // 标准性质
obj['key'] = '标准类别'
obj['value'] = JSON.parse(JSON.stringify(res.data.STANDCLASSIFY))
this.conditionShowlist.stand_sort = JSON.parse(JSON.stringify(obj)) // 标准性质
obj['key'] = '产品类别'
obj['value'] = JSON.parse(JSON.stringify(res.data.PRODUCTTYPE)) // 根据需求文档,产品类别对应标准属性中的“适用车型”
this.conditionShowlist.apply_arctic = JSON.parse(JSON.stringify(obj)) // 标准性质
obj['key'] = '认证类型'
obj['value'] = JSON.parse(JSON.stringify(res.data.PROVETYPE)) // 适用认证下拉框
this.conditionShowlist.apply_auth = JSON.parse(JSON.stringify(obj)) // 标准性质
obj['key'] = '所属类别'
obj['value'] = JSON.parse(JSON.stringify(res.data.CATEGORY))
this.conditionShowlist.category = JSON.parse(JSON.stringify(obj)) // 标准性质
obj['key'] = '能源种类'
obj['value'] = JSON.parse(JSON.stringify(res.data.ENERGYTYPES))
this.conditionShowlist.energy_kind = JSON.parse(JSON.stringify(obj)) // 标准性质
obj['key'] = '采标程度'
obj['value'] = JSON.parse(JSON.stringify(res.data.DEGREESTANDARD))
this.conditionShowlist.adopt_extent = JSON.parse(JSON.stringify(obj)) // 标准性质
obj['key'] = '标准状态'
obj['value'] = JSON.parse(JSON.stringify(res.data.STANDSTATE))
this.conditionShowlist.statecode = JSON.parse(JSON.stringify(obj)) // 标准性质
obj['key'] = '发布时间'
obj['value'] = [
{label: '本月', value: '1'}, {label: '近三个月', value: '2'},
{label: '近一年', value: '3'}, {label: '近两年', value: '4'},
{label: '近三年', value: '5'}, {label: '三年以上', value: '6'}]
this.conditionShowlist.issue_time = JSON.parse(JSON.stringify(obj)) // 发布时间
// 设置高级搜索下拉框
this.standNatureOptions = res.data.SARPROPERTY // 标准性质
this.standNatureOptions.splice(0, 0, {'label': '全部', 'value': 'all'})
this.countryOptions = res.data.COUNTRY
this.countryOptions.splice(0, 0, {'label': '全部', 'value': 'all'})
this.standSortOptions = res.data.STANDCLASSIFY
this.standSortOptions.splice(0, 0, {'label': '全部', 'value': 'all'})
this.applyArcticOptions = res.data.PRODUCTTYPE // 根据需求文档,产品类别对应标准属性中的“适用车型”
this.applyArcticOptions.splice(0, 0, {'label': '全部', 'value': 'all'})
this.applyAuthOptions = res.data.PROVETYPE // 适用认证下拉框
this.applyAuthOptions.splice(0, 0, {'label': '全部', 'value': 'all'})
this.categoryOptions = res.data.CATEGORY
this.categoryOptions.splice(0, 0, {'label': '全部', 'value': 'all'})
this.standStateOptions = res.data.STANDSTATE
this.standStateOptions.splice(0, 0, {'label': '全部', 'value': 'all'})
this.adoptExtentOptions = res.data.DEGREESTANDARD
this.adoptExtentOptions.splice(0, 0, {'label': '全部', 'value': 'all'})
this.energyKindOptions = res.data.ENERGYTYPES
this.energyKindOptions.splice(0, 0, {'label': '全部', 'value': 'all'})
}, e => {
})
// 查询检索历史
this.getSearchHistoty()
},
// 路由进入之前
beforeRouteEnter (to, from, next) {
if (from.name === 'NewProcess') {
// 从vuex里读取暂存记录
next(vm => {
if (vm.$store.getters.searchInfoEO !== '') {
vm.searchInfoEO = vm.$store.getters.getSearchInfoEO
}
})
} else {
next()
}
},
beforeRouteLeave (to, from, next) {
// 清除流程缓存
if (to.name !== 'NewProcess' && this.$store.state.searchInfoEO !== '') {
this.$store.commit('setSearchInfoEO', '')
}
sessionStorage.removeItem('searchInfoEO')
next()
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff