Files
foton-laws-system-front/src/pages/searchCenter/pages/standardSearch.vue
T
2021-09-27 15:38:18 +08:00

3135 lines
150 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- 标准检索 -->
<template>
<div class="standard-search" id="standardSearch">
<personal-center></personal-center>
<div class="standard-search-content">
<div style="position: absolute;left: 0;right: 0;top: 0;bottom: 0;">
<div class="content-left">
<div class="search">
<div class="search-box">
<div class="home-input">
<el-input
placeholder="请输入查询条件"
clearable
v-model.trim="keywords"
@keyup.enter.native="searchSarByInputKeyByCondition">
</el-input>
</div>
<div class="search-btn-box">
<div class="search-btn" @click="searchSarByInputKeyByCondition"></div>
</div>
</div>
<router-link to="/advancedSearch" class="router-link">
<div>高级检索</div>
</router-link>
<router-link to="/home1" class="router-link1">
<div>首页</div>
</router-link>
</div>
<div class="search-content__wrap">
<!-- 检索条件 -->
<div class="search-condition">
<div class="condition-btn" @click="conditionBtnOpen = !conditionBtnOpen" v-if="showConditionBtn">{{ toggleConditionTips }}</div>
<div class="condition-content">
<div class="condition-item" v-for="(condition, key) of searchOptions" :key="condition.index + key" v-if="condition.index < 5 || conditionBtnOpen">
<div class="condition-item-title">{{ condition.title }}</div>
<ul :class="[key, {'is-close': condition.isClose}]">
<li v-for="(conditionOpt, optIndex) in condition.options" :key="optIndex + condition.title">
<span :class="{ 'selected': searchCondition[key].indexOf(conditionOpt.value) !== -1 }" @click="optChecked(key, conditionOpt.value)">{{ conditionOpt.label }}
<span v-if="conditionOpt.number !== null && conditionOpt.number !== undefined">(<font style="color: red">{{ conditionOpt.number}}</font>)</span>
</span>
</li>
</ul>
<div class="open-btn" v-if="condition.showOpenBtn" @click="condition.isClose = !condition.isClose">{{ condition.isClose ? '展开' : '收缩' }}</div>
</div>
<!-- <loading :loading="conditionLoading">{{ $t('m.Loading') }}...</loading>-->
</div>
</div>
<div style="flex: 1; overflow: hidden; display: flex;" v-if="!AllCheck">
<div v-if="this.selectIndex === 'stand' && this.buyRoleFlag === 0 && (this.resultData === null || this.resultData.length === 0)" class="toBuyClass">
<span>暂无查询结果!</span>
</div>
<!-- 检索结果 -->
<div class="table-box">
<div class="search-result">
<div class="search-group">
<!-- <div style="position: absolute;right: 110px;" class="search-item fixed-clean">-->
<!-- <el-input-->
<!-- v-model="resultKeyword"-->
<!-- placeholder="在结果中检索"-->
<!-- @keyup.enter.native="searchSarByInputKey">-->
<!-- <i @click="handleSearchReset" slot="suffix" class="el-input__icon el-icon-close" v-if="resultKeyword !== ''"></i>-->
<!-- <i @click="searchSarByInputKey" slot="suffix" class="el-input__icon el-icon-search"></i>-->
<!-- </el-input>-->
<!-- </div>-->
<!-- <el-button type="primary" size="small" @click="exportSearchResult" class="common-button-default export-button"-->
<!-- round><i class="iconfont">&#xe6e9;</i>导出</el-button>-->
</div>
<el-table
ref="selection"
:data="resultData"
:loading="resultLoading"
tooltip-effect="dark"
border
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
height="100%"
>
<el-table-column
align="center"
type="index"
width="50">
</el-table-column>
<el-table-column
show-overflow-tooltip
v-if="selectIndex !== 'msgdyinfo'"
align="center"
:label="selectIndex === 'stand'|| 'bussstand'? $t('m.standNumber') : (selectIndex === 'laws' ? $t('m.documentNumber') : $t('m.enterpriseStandardNumber'))">
<template slot-scope="scope">
<a class="jumpColor" style="margin-left: 10px" @click="judgeRolePermiOnSar(scope.row, 1)">{{ scope.row.numbershow }}</a>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
v-if="selectIndex !== 'msgdyinfo'"
align="center"
:label="selectIndex === 'stand'||'bussstand' ? $t('m.standName') : (selectIndex === 'laws' ? $t('m.fileName') : $t('m.enterpriseStandardName'))">
<template slot-scope="scope">
<a class="jumpColor" style="margin-left: 10px" @click="judgeRolePermiOnSar(scope.row, 1)">{{ scope.row.nameshow }}</a>
</template>
</el-table-column>
<el-table-column
align="center"
:label="$t('m.issueTime')">
<template slot-scope="scope">
<div v-if="scope.row.issueTime !== null && scope.row.issueTime !== undefined">
{{ dateFormat2(scope.row.issueTime) }}
</div>
<div v-else></div>
</template>
</el-table-column>
<el-table-column
align="center"
:label="$t('m.putTime')"
width="130">
<template slot-scope="scope">
<div v-if="selectIndex === 'stand' || selectIndex === 'bussstand' ? (scope.row.SSRQ !== null && scope.row.SSRQ !== undefined && scope.row.SSRQ !== '') : (scope.row.putTime !== null && scope.row.putTime !== undefined && scope.row.putTime !== '')">
{{ $dateFormat(new Date((selectIndex === 'stand' || (selectIndex === 'bussstand' && scope.row.standType === 'FOREIGN')) ? scope.row.SSRQ : scope.row.putTime), "yyyy-MM-dd") }}
</div>
<div v-else></div>
</template>
</el-table-column>
<el-table-column
v-if="selectIndex !== 'msgdyinfo'"
align="center"
:label="selectIndex === 'stand'||'bussstand' ? $t('m.standStateShow') : (selectIndex === 'laws' ? $t('m.fileStatus') : $t('m.enterpriseStandardStatus'))"
width="200">
<template slot-scope="scope">
<span v-if="selectIndex === 'laws'">{{ getLawsState(scope.row.statecode) }}</span>
<div v-else :class="selectIndex === 'enterprise' ? (scope.row.textStatusBussName === '参考' ? 'yellowClass' :
(scope.row.textStatusBussName === '作废' || scope.row.textStatusBussName === '被代替' ? 'redClass' : '')) : ''">
{{ selectIndex === 'stand'|| (selectIndex === 'bussstand' && scope.row.standType === 'FOREIGN') ? scope.row.textStatusName : (selectIndex === 'laws' ? scope.row.textStatusLawsName : scope.row.textStatusBussName) }}</div>
</template>
</el-table-column>
<el-table-column
v-if="selectIndex === 'msgdyinfo'"
align="center"
label="所属模块"
width="130">
<template slot-scope="scope">
<div>
{{ scope.row.module === 'INLAND' ? $t('m.domesticNews') : (scope.row.module === 'FOREIGN' ? $t('m.foreignNews') : $t('m.dataCenter')) }}
</div>
</template>
</el-table-column>
<el-table-column
v-if="selectIndex === 'msgdyinfo'"
align="center"
prop="title"
:label="$t('m.dynamicTitleSearch')">
<template slot-scope="scope">
<a class="jumpColor" @click="titleClick(scope.row)">
{{ scope.row.title }}
</a>
</template>
</el-table-column>
<el-table-column
align="center"
:label="$t('m.action')"
width="50">
<template slot-scope="scope">
<div v-if="selectIndex !== 'msgdyinfo'">
<div v-if="scope.row.collectId" @click.stop style="display: inline-block">
<!-- <el-button type="primary" size="mini" @click="judgeRolePermiOnSar(scope.row, 1)">查看</el-button>-->
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<!-- <el-button size="mini">-->
<!-- 更多<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
<!-- </el-button>-->
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="beforeHandleCommand('see',scope.row)">查看</el-dropdown-item>
<el-dropdown-item v-if="scope.row.collectBtn"
:command="beforeHandleCommand('d',scope.row)"
>
收藏
</el-dropdown-item>
<el-dropdown-item v-else
:command="beforeHandleCommand('a',scope.row)"
>
取消收藏
</el-dropdown-item>
<!-- <el-dropdown-item :command="beforeHandleCommand('b',scope.row)">分享</el-dropdown-item>-->
</el-dropdown-menu>
</el-dropdown>
</div>
<div v-else>
<!-- <el-button type="primary" size="mini" @click="judgeRolePermiOnSar(scope.row, 1)">查看</el-button>-->
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<!-- <el-button size="mini">-->
<!-- 更多<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
<!-- </el-button>-->
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="beforeHandleCommand('see',scope.row)">查看</el-dropdown-item>
<el-dropdown-item v-if="scope.row.collectBtn"
:command="beforeHandleCommand('d',scope.row)"
>
收藏
</el-dropdown-item>
<el-dropdown-item v-else
:command="beforeHandleCommand('a',scope.row)"
>
取消收藏
</el-dropdown-item>
<!-- <el-dropdown-item :command="beforeHandleCommand('b',scope.row)">分享</el-dropdown-item>-->
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
<div v-else>
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<!-- <el-button size="mini">-->
<!-- 更多<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
<!-- </el-button>-->
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="beforeHandleCommand('a',scope.row)" v-if="scope.row.collectId">取消收藏</el-dropdown-item>
<el-dropdown-item :command="beforeHandleCommand('d',scope.row)" v-else>收藏</el-dropdown-item>
<!-- <el-dropdown-item :command="beforeHandleCommand('b',scope.row)">分享</el-dropdown-item>-->
</el-dropdown-menu>
</el-dropdown>
<!-- <el-button size="mini" type="primary" v-if="scope.row.collectId" @click="clickCollection(scope.row)">取消收藏</el-button>-->
<!-- <el-button size="mini" type="primary" v-else @click="clickCollection(scope.row)">收藏</el-button>-->
<!-- <el-button sizi="mini" @click="clickShare(scope.row)" style="height: 29px;line-height: 0;">分享</el-button>-->
</div>
</template>
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
<pagination
:page="page"
:total="total"
@pageChange="pageChange"
@pageSizeChange="pageSizeChange" />
<loading :loading="resultLoading">数据获取中</loading>
</div>
</div>
<div class="all-box__wrap" v-if="AllCheck">
<loading :loading="resultLoading">数据获取中</loading>
<template v-if="Allitems.length">
<div v-for="(item,key) in Allitems" :key="key" class="AllBox">
<div class="AllBoxTitle">
<span v-html="item.indexType === 'stand' ? '国内标准法规' : (item.indexType === 'FOREIGN' ? '海外标准法规' : (item.indexType === 'laws' ? '国内外政策' : (item.indexType === 'bussstand' ? '企业标准' : (item.indexType === 'items' ? '数据化条目' : '动态&资料'))))" class="typetext"></span>
<span style="cursor:pointer;" class="AllBoxText" v-html="item.title" @click="toPage(item)"></span>
<span @click="checkItems(item)" class="more" style="cursor: pointer; position: absolute; right: 5px;">详情</span>
</div>
<div class="AllBoxContent" v-html="item.textContent"></div>
<div v-if="item.indexType !== 'items' && item.indexType !== 'msgdyinfo'" class="AllTime">
<div style="margin-right: 15px;">发布日期: {{ item.issue_time !== null && item.issue_time !== '' ? dateFormat2(item.issue_time) : '--' }} </div>
<!-- <div>{{$t('m.putTime')}}: {{ item.issue_time !== null && item.issue_time !== '' ? $dateFormat(new Date(item.put_time), 'yyyy-MM-dd') : '&#45;&#45;' }} </div>-->
</div>
</div>
</template>
<has-no-data tips="暂无查询结果" v-if="AllCheck && !Allitems.length" />
</div>
<!-- 点击全部-分页 -->
<pagination
:page="pageAll"
:total="totalAll"
@pageChange="pageChangeAll"
@pageSizeChange="pageSizeChangeAll"
v-if="AllCheck && Allitems.length"
style="margin-top: 10px;"></pagination>
</div>
</div>
</div>
</div>
<adc-back-top scroll-bind="standardSearch" windowScroll></adc-back-top>
<!-- 分享 -->
<el-drawer :title="$t('m.share')" :visible.sync="drawerModal" size="300px" :styles="drawerModalstyles" @close="treeCancel">
<div class="demo-drawer-content">
<dept-tree
treeDivId="drawerModalTree"
ref="drawerModalTree"
@treeOnCheck="(checkedList) => selcetTree(checkedList)"
allDept
showUser
checkEnable
:editable="false">
</dept-tree>
</div>
<div class="demo-drawer-footer">
<el-button type="primary" round class="common-button-primary" icon="el-icon-check" @click="sureShareStandardLaws">提交</el-button>
<el-button round class="common-button-default" icon="el-icon-close" @click="treeCancel">取消</el-button>
</div>
</el-drawer>
<!-- 分享 全部选人 -->
<org-table
:visible.sync="visibleOrgTable"
title="分享人员"
dialog-model
:config="{
value: orgTableVal,
valueName: orgTableValName
}"
@confirm="isTreeOk"
></org-table>
<el-dialog
title="查看详情"
:visible.sync="itermsConditionsFlag"
size="800px">
<div style="height: 500px;overflow: auto;" >
<div v-html="itermsConditionsTitle1" style="line-height: 20px;"></div>
<br>
<br>
<div v-html="itermsConditionsTitle2" style="line-height: 20px;"></div>
</div>
<div slot="footer">
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="itermsConditionsClose">关闭</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import PersonalCenter from '@/components/personalCenter/index.vue'
import { mapGetters } from 'vuex'
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 {dateFormat} from '@/common/date'
export default {
name: 'StandardSearch',
data () {
return {
itermsConditionsTitle1: '',
itermsConditionsTitle2: '',
itermsConditionsFlag: false,
visibleOrgTable: false, // 分享选人
orgTableVal: '',
orgTableValName: '',
AllCheck: false, // 全部选中
AllPage: false, // 点击全部搜索条件-分页
Allitems: [], // 选中全部返回数据
str: '',
// 分享抽屉状态
drawerModal: false,
drawerModalstyles: {
height: 'calc(100% - 55px)',
overflow: 'auto',
paddingBottom: '53px',
position: 'static'
},
shareStandardSelect: [],
selectNowObjResult: {}, // 记录选择的数据
// header固定
headerFixed: false,
// 搜索关键词
keywords: '',
resultKeyword: '',
// 资源大类
selectIndex: this.$route.params.selectKey,
// 原始选项
searchOriginOptions: [],
// 检索表头
resultColumns: [],
// 检索结果
resultData: [],
// *********************************** 检索条件 *********************************** //
searchCondition: {
selectIndex: [this.$route.params.selectKey],
module: ['all']
},
seniortypeAll: ['selectIndex'],
seniortypeStand: ['selectIndex', 'standSort', 'category', 'nature', 'standState', 'applyArctic', 'applyAuth', 'CLLX', 'CBCD', 'ZRLX', 'CYSD'],
seniortypeBuss: ['selectIndex', 'country', 'standSort', 'category', 'nature', 'standState', 'textStatus', 'applyArctic', 'applyAuth', 'CLLX', 'CBCD', 'ZRLX', 'CYSD'],
// seniortypeLaws: ['selectIndex', 'country', 'SYCLLX', 'ZRLX', 'WSSFCY'], // 政策的适用车辆类型、我司是否参与 和 国内的字段不一样
seniortypeLaws: ['selectIndex', 'country', 'CLLX', 'ZRLX', 'CYSD'], // 政策的适用车辆类型、我司是否参与 和 国内的字段不一样
seniortypeEnterprise : ['selectIndex','BUSSSTATE','ORGLIST'],
seniortypeMsg: ['selectIndex', 'module'],
// 检索选项
searchOptions: {
selectIndex: {
title: '资源类型',
options: [
{
label: '全部',
value: 'All'
},
{
label: '国内标准法规',
value: 'stand'
},
{
label: '海外标准法规', // value没改
value: 'bussstand'
},
// {
// label: '国内外政策',
// value: 'laws'
// },
{
label: '企业标准',
value: 'enterprise'
}
// {
// label: '资料中心',
// value: 'msgdyinfo'
// }
],
index: 0
}
},
// 展开条件
conditionBtnOpen: false,
saveRoleBuss: [],
bussRoleFlag: false,
// 条件加载
conditionLoading: false,
// 结果加载
resultLoading: false,
saveAllSortOptions: [],
saveAllFineOptions: [],
lawssStateOptions: [],
page: 1,
pageAll: 1,
total: 0,
totalAll: 0,
// header样式
opacity: {},
// 为我推荐
recommendList: [],
buyRoleFlag: 1,
// 历史
searchHistotyData: [],
savaBussFineClass: [],
saveStandSort: [],
saveSelectedBigClass: ''
}
},
methods: {
checkItems (item) {
this.itermsConditionsFlag = true
this.itermsConditionsTitle1 = item.textContent
this.itermsConditionsTitle2 = item.textItems
},
itermsConditionsClose () {
this.itermsConditionsFlag = false
},
// 跳转
toPage (item) {
// 国内外----两个值
switch (item.indexType) {
case 'stand':
// if (this.$hasPermission('SSA6WR4HV8')) {
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.id,
pageType: 'INLAND_STAND'
}
})
window.open(routeUrl.href, '_blank')
// } else {
// this.$message({
// message: '无权访问',
// type: 'warning'
// })
// }
break
// 企标
case 'bussstand':
// if (this.$hasPermission('YJUHC32R7G')) {
let routeUrl2 = this.$router.resolve({
name: 'OtherBussStandardDetails',
params: {
id: item.id,
pageType: 'BUSINESS_STAND'
}
})
window.open(routeUrl2.href, '_blank')
// } else {
// this.$message({
// message: '无权访问',
// type: 'warning'
// })
// }
break
// 政策
case 'laws':
// if (this.$hasPermission('A2HDHMEA6W')) {
let routeUrl3 = this.$router.resolve({
name: 'OtherLawsDetails',
params: {
id: item.id,
pageType: 'FOREIGN_LAWS'
}
})
window.open(routeUrl3.href, '_blank')
// } else {
// this.$message({
// message: '无权访问',
// type: 'warning'
// })
// }
break
case 'FOREIGN':
// if (this.$hasPermission('SSA6WR4HV8')) {
let routeUrl6 = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.id,
pageType: 'FOREIGN_STAND'
}
})
window.open(routeUrl6.href, '_blank')
// } else {
// this.$message({
// message: '无权访问',
// type: 'warning'
// })
// }
break
// 动态资料------3个值(INLAND_MSG FOREIGN_MSG RESOURCE_MSG)
case 'FOREIGN':
let routeUrl5 = this.$router.resolve({
name:'OtherStandardDetails',
params: {
id: item.id,
pageType: 'INLAND_STAND'
}
})
window.open(routeUrl5.href,'_blank')
break
case 'msgdyinfo':
let routeUrl4 = this.$router.resolve({
name: 'DynamicInformationDetails',
params: {
id: item.id,
pageType: 'INLAND_MSG'
}
})
window.open(routeUrl4.href, '_blank')
break
// 数据化条目
case 'items':
this.itemsToPage(item)
break
}
},
itemsToPage (item) {
switch (item.itemsType) {
case 'STAND':
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.id,
pageType: 'INLAND_STAND'
}
})
window.open(routeUrl.href, '_blank')
break
// 企标
case 'BUS':
let routeUrl2 = this.$router.resolve({
name: 'OtherBussStandardDetails',
params: {
id: item.id,
pageType: 'BUSINESS_STAND'
}
})
window.open(routeUrl2.href, '_blank')
break
// 政策
case 'LAWS':
let routeUrl3 = this.$router.resolve({
name: 'OtherLawsDetails',
params: {
id: item.id,
pageType: 'FOREIGN_LAWS'
}
})
window.open(routeUrl3.href, '_blank')
break
}
},
clickShare (item) {
if (item.module === 'RESOURCE') {
this.drawerModal = true
this.$nextTick(() => {
this.$refs.drawerModalTree.clearSearch()
})
this.selectNowObjResult = JSON.parse(JSON.stringify(item))
// this.$http.get('lawss/msgDynamicInfo/showDetailsByRole', {
// id: item.id
// }, {
// _this: this
// }, res => {
// if (res.data != null && res.data.length > 0) {
// this.drawerModal = true
// this.$nextTick(() => {
// this.$refs.drawerModalTree.clearSearch()
// })
// this.selectNowObjResult = JSON.parse(JSON.stringify(item))
// } else {
// this.$message({
// message: '当前角色无权限操作此信息',
// type: 'error'
// })
// }
// }, e => {
// })
} else {
this.judgeRolePermiOnSar(item, 4)
}
}, // 点击分享按钮
clickCollection (item) {
if (item.module === 'RESOURCE') {
if (item.collectId) {
this.cancelCollectStandard(item)
} else {
this.collectStandard(item)
}
// this.$http.get('lawss/msgDynamicInfo/showDetailsByRole', {
// id: item.id
// }, {
// _this: this
// }, res => {
// if (res.data != null && res.data.length > 0) {
// if (item.collectId) {
// this.cancelCollectStandard(item)
// } else {
// this.collectStandard(item)
// }
// } else {
// this.$message({
// message: '当前角色无权限操作此信息',
// type: 'error'
// })
// }
// }, e => {
// })
} else {
if (item.collectId) {
this.judgeRolePermiOnSar(item, 3)
} else {
this.judgeRolePermiOnSar(item, 2)
}
}
}, // 点击收藏/取消收藏事件
handleCommand (command) {
switch (command.command) {
case 'd':
this.judgeRolePermiOnSar(command.item, 2) // 收藏
break
case 'a':
this.judgeRolePermiOnSar(command.item, 3) // 取消收藏
break
case 'b':
this.judgeRolePermiOnSar(command.item, 4) // 分享
break
case 'see':
this.judgeRolePermiOnSar(command.item, 1)// 查看
break
}
}, // 下拉菜单点击事件
beforeHandleCommand (command, item) {
return {
'item': item,
'command': command
}
},
titleClick (item) {
if (this.$store.state.detailMap !== '') {
let lastDetailMap = this.$store.getters.getLastDetailMap
lastDetailMap.push(this.$store.state.detailMap)
this.$store.commit('setLastDetailMap', JSON.stringify(lastDetailMap))
}
if (item.module === 'RESOURCE') {
this.showDetailsByRole(item)
} else {
this.$store.commit('setDetailMap', this.$route.path)
this.$router.push({
name: 'DynamicInformationDetails',
params: {
id: item.id
}
})
// window.open(routeUrl.href, '_blank')
}
},
// 没有数据的时候申请购买
applyPurchase () {
this.$store.commit('setSearchInfoEO', JSON.stringify(this.searchInfoEO))
this.$store.commit('setDetailMap', this.$route.path)
this.$router.push({
name: 'NewProcess',
params: {
type: '10'
}
})
},
/**
* @description: 条件查询选项checkbox
* @author: chenxiaoxi
* @date: 2018/12/19 11:38:21
*/
optChecked (key, value) {
if (value === 'All') {
this.AllCheck = true
// 点击全部-显示分页
this.AllPage = true
this.searchOptions = {
selectIndex: {
title: '资源类型',
options: [
{
label: '全部',
value: 'All'
},
{
label: '国内标准法规',
value: 'stand'
},
{
label: '海外标准法规',
value: 'bussstand'
},
// {
// label: '国内外政策',
// value: 'laws'
// },
{
label: '企业标准',
value: 'enterprise'
}
// {
// label: '资料中心',
// value: 'msgdyinfo'
// }
],
index: 0
}
}
this.searchCondition.selectIndex = ['All']
this.searchSarByInputKey()
} else {
this.AllPage = false
this.Allitems = []
this.AllCheck = false
let index = this.searchCondition[key].indexOf(value)
// 资源类型为单选且必选
if (key !== 'selectIndex') {
// 未选中
if (index === -1) {
let allIn = this.searchCondition[key].indexOf('all')
// 当前点击的不是全部,且全部按钮为选中状态
if (allIn !== -1 && value !== 'all') {
this.$set(this.searchCondition, key, [value])
// 当前点击的是全部按钮, 且全部按钮不是选中状态
} else if (value === 'all' && allIn === -1) {
this.$set(this.searchCondition, key, ['all'])
if (key === 'bussBigClass' || key === 'country') {
this.savaBussFineClass = this.saveAllFineOptions
this.saveStandSort = this.saveAllSortOptions
this.saveSelectedBigClass = ''
}
// 当前点击的是其他按钮
} else {
this.searchCondition[key].push(value)
}
// 如果点击的是企业标准大类,则根据value去查询标准细类
if (key === 'bussBigClass' || key === 'country') {
this.saveSelectedBigClass += value + ','
}
} else {
if (!(this.searchCondition[key].length === 1 && this.searchCondition[key][0] === value)) {
this.searchCondition[key].splice(index, 1)
if (key === 'bussBigClass' || key === 'country') {
let saveList = this.saveSelectedBigClass.split(',')
this.saveSelectedBigClass = ''
if (saveList != null) {
for (let i = 0; i < saveList.length; i++) {
if (value !== saveList[i]) {
this.saveSelectedBigClass += saveList[i] + ','
}
}
}
}
}
}
if (key === 'bussBigClass' || key === 'country') {
this.$http.get('sys/dictype/getDicTypeByParentCodes', {
dicTypeCode: this.saveSelectedBigClass
}, {
_this: this
}, res => {
if (res.ok) {
if (key === 'bussBigClass') {
let bussFindOptions = this.searchOptions.bussFineClass
res.data.unshift({
label: '全部',
value: 'all'
})
bussFindOptions.options = res.data
this.$set(this.searchOptions, 'bussFineClass', bussFindOptions)
// 标准大类选中了全部
if (value === 'all') {
let bussFindOptionsAll = this.searchOptions.bussFineClass
res.data.unshift({
label: '全部',
value: 'all'
})
bussFindOptionsAll.options = this.saveAllFineOptions
this.$set(this.searchOptions, 'bussFineClass', bussFindOptionsAll)
}
} else if (key === 'country') {
let standSortOptions = this.searchOptions.standSort
res.data.unshift({
label: '全部',
value: 'all'
})
standSortOptions.options = res.data
this.$set(this.searchOptions, 'standSort', standSortOptions)
// 国家/地区选中全部
if (value === 'all') {
let standSortOptionsAll = this.searchOptions.standSort
res.data.unshift({
label: '全部',
value: 'all'
})
standSortOptionsAll.options = this.saveAllSortOptions
this.$set(this.searchOptions, 'standSort', standSortOptionsAll)
}
}
}
}, e => {
})
}
} else {
this.selectIndex = value
if (index === -1) {
this.searchCondition[key].splice(0, 1, value)
}
}
}
},
// 统计搜索条件结果个数
selectGroupdata (data) {
let seniortype
if (this.selectIndex === 'All') {
seniortype = this.seniortypeAll
} else if (this.selectIndex === 'stand') {
seniortype = this.seniortypeStand
} else if (this.selectIndex === 'laws') {
seniortype = this.seniortypeLaws
} else if (this.selectIndex === 'bussstand') {
seniortype = [...this.seniortypeBuss]
} else if (this.selectIndex === 'enterprise') {
seniortype = this.seniortypeEnterprise
}
else {
seniortype = this.seniortypeMsg
}
if (data) {
if (data.list && data.list.length > 0) {
// 获取数值
let resultdata = data.list[0]['groupdata']
for (let i = 0; i < seniortype.length; i++) {
let nowdata = [{}]
if (typeof this.searchOptions[seniortype[i]] !== 'undefined') {
nowdata = this.searchOptions[seniortype[i]].options
}
let renameType
if (seniortype[i] === 'selectIndex') {
for (let j = 0; j < nowdata.length; j++) {
if (nowdata[j].value === this.selectIndex) {
nowdata[j].number = data.count
} else {
nowdata[j].number = null
}
}
} else {
// 检索栏每一项回显数字
if (seniortype[i] === 'standSort') {
renameType = 'standSort'
}else if (seniortype[i] === 'applyArctic') {
renameType = 'apply_arctic'
} else if (seniortype[i] === 'energyKind') {
renameType = 'energy_kind'
} else if (seniortype[i] === 'applyAuth') {
renameType = 'apply_auth'
} else if (this.selectIndex === 'laws' && seniortype[i] === 'CLLX') {
renameType = 'SYCLLX'
} else if (this.selectIndex === 'laws' && seniortype[i] === 'CYSD') {
renameType = 'WSSFCY'
} else if (this.selectIndex === 'enterprise' && seniortype[i] === 'ORGLIST'){
renameType = 'QCDW'
} else if (this.selectIndex === 'enterprise' && seniortype[i] === 'BUSSSTATE'){
renameType = 'textStatusBuss'
}else if (this.selectIndex === 'bussstand' && seniortype[i] === 'standState'){
renameType = 'textStatus'
}else {
renameType = seniortype[i]
}
console.log(renameType)
let resultsubdata = resultdata[renameType] || {}
let countAll = 0
if (nowdata) {
console.log(nowdata)
for (let ji = 0; ji < nowdata.length; ji++) {
if (resultsubdata[nowdata[ji].value] === undefined) {
nowdata[ji].number = 0
} else {
nowdata[ji].number = resultsubdata[nowdata[ji].value]
countAll += Number(resultsubdata[nowdata[ji].value])
}
}
nowdata[0].number = countAll
}
}
}
} else {
for (let x = 0; x < seniortype.length; x++) {
const currentSortKey = seniortype[x]
const currentSort = this.searchOptions[currentSortKey] || {options: []}
const nowdatawx = currentSort.options
if (seniortype[x] === 'selectIndex') {
for (let z = 0; z < nowdatawx.length; z++) {
if (nowdatawx[z].value === this.selectIndex) {
nowdatawx[z].number = data.count
} else {
nowdatawx[z].number = null
}
}
} else {
for (let y = 0; y < nowdatawx.length; y++) {
nowdatawx[y].number = 0
}
}
}
}
} else {
// 接口返回数据为null
for (let x = 0; x < seniortype.length; x++) {
const currentSortKey = seniortype[x]
const currentSort = this.searchOptions[currentSortKey] || {options: []}
const nowdata = currentSort.options
if (seniortype[x] === 'selectIndex') {
for (let z = 0; z < nowdata.length; z++) {
if (nowdata[z].value === this.selectIndex) {
nowdata[z].number = null
} else {
nowdata[z].number = null
}
}
} else {
for (let y = 0; y < nowdata.length; y++) {
nowdata[y].number = 0
}
}
}
}
},
// 清空查询
emptyQuery () {
this.AllCheck = false
this.keywords = ''
this.resultKeyword = ''
this.searchCondition.selectIndex = ['stand']
this.selectIndex = 'stand'
this.queryOptions()
this.getResultColumns()
this.searchSarByInputKey()
},
/**
* @description: 查询选项
* @author: chenxiaoxi
* @date: 2018/12/19 13:51:31
*/
queryOptions () {
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this,
loading: 'conditionLoading'
}, res => {
if (res.ok) {
let data = res.data
for (let key in data) {
let option = {}
switch (key) {
case 'SARPROPERTY':
option.title = '标准性质'
option.index = 1
break
case 'STANDSTATE':
option.title = '标准状态'
option.index = 2
break
case 'COUNTRY':
option.title = '适用区域'
option.index = 3
break
case 'STANDCLASSIFY':
option.title = '标准类别'
option.index = 4
break
case 'PRODUCTTYPE':
option.title = '适用车型'
option.index = 5
break
case 'CATEGORY':
option.title = '所属专业领域'
option.index = 6
break
case 'PROVETYPE':
option.title = '适用认证'
option.index = 7
break
case 'DEGREESTANDARD':
option.title = '采标程度'
option.index = 8
break
// 之前是能源种类,现在标准法规属性管理中的适用车辆类型是这个字段
case 'ENERGYTYPES':
option.title = '适用车辆类型'
option.index = 9
break
// case 'BUSSFINECLASSSHOW':
// option.title = '企业细类'
// option.index = 10
// break
case 'BUSSBIGCLASS':
option.title = '企业大类'
option.index = 11
break
// 国内外是准入类型划掉成监管类型;在政策的文档中叫做准入类型
case 'ACCESSTYPE':
option.title = '监管类型'
option.index = 12
break
case 'WSCYSD':
option.title = '我司参与深度'
option.index = 13
break
case 'BUSSSTATE':
option.title = '企业标准状态'
option.index = 14
break
case 'ORGLIST':
option.title = '主起草部门'
option.index = 15
}
option.showOpenBtn = false
option.options = data[key]
option.options.unshift({
label: '全部',
value: 'all'
})
option.isClose = false
this.$set(this.searchOptions, this.getKey(key), option)
this.$set(this.searchCondition, this.getKey(key), ['all'])
this.$nextTick(() => {
let dom = document.getElementsByClassName(this.getKey(key))
if ($(dom).height() > 38) {
this.searchOptions[this.getKey(key)].isClose = true
this.searchOptions[this.getKey(key)].showOpenBtn = true
}
})
}
this.searchOriginOptions = this.searchOptions
this.saveAllSortOptions = res.data.STANDCLASSIFY
this.saveAllFineOptions = res.data.BUSSFINECLASSSHOW
this.lawssStateOptions = res.data.LAWSSTATE // 文本状态数组
this.filterOptions(this.selectIndex)
}
}, e => {})
},
/**
* @description: 选项过滤(根据资源类型过滤条件)
* @author: chenxiaoxi
* @date: 2018/12/20 11:34:36
*/
filterOptions (resType) {
return new Promise((resolve, reject) => {
let filterOptions = {}
let originOptions = this.searchOriginOptions
filterOptions.selectIndex = originOptions.selectIndex
switch (resType) {
case 'stand':
// 标准类别
filterOptions.standSort = originOptions.standSort
filterOptions.standSort.index = 1
// 标准状态
// filterOptions.standState = originOptions.standState
// filterOptions.standState.title = '标准状态'
// filterOptions.standState.index = 2
// 我司参与状态
filterOptions.CYSD = originOptions.CYSD
filterOptions.CYSD.title = '我司参与深度'
filterOptions.CYSD.index = 2
// 监管类型
// filterOptions.ZRLX = originOptions.ZRLX
// filterOptions.ZRLX.title = '监管类型'
// filterOptions.ZRLX.index = 4
// 适用车辆类型
filterOptions.CLLX = originOptions.CLLX
filterOptions.CLLX.index = 3
// 采标程度
// filterOptions.CBCD = originOptions.CBCD
// filterOptions.CBCD.index = 6
break
// 国内外政策
case 'laws':
filterOptions.country = originOptions.country
filterOptions.country.title = '适用区域'
filterOptions.country.index = 1
// 适用车辆类型
filterOptions.CLLX = originOptions.CLLX
// filterOptions.SYCLLX = originOptions.CLLX
filterOptions.CLLX.title = '适用车辆类型'
filterOptions.CLLX.index = 2
// 监管类型
filterOptions.ZRLX = originOptions.ZRLX
filterOptions.ZRLX.title = '准入类型'
filterOptions.ZRLX.index = 3
// 我司参与状态
filterOptions.CYSD = originOptions.SHIFOU
filterOptions.CYSD.title = '我司是否参与'
filterOptions.CYSD.index = 4
break
// 海外标准法规
case 'bussstand':
// 标准类别
filterOptions.standSort = originOptions.standSort
// filterOptions.standSort.options = [{label: '全部', value: 'all'}]
filterOptions.standSort.index = 1
// 标准状态
filterOptions.standState = originOptions.WBZTCLASS
filterOptions.standState.title = '文本状态'
filterOptions.standState.index = 2
// 我司参与状态
// filterOptions.CYSD = originOptions.CYSD
// filterOptions.CYSD.title = '我司参与深度'
// filterOptions.CYSD.index = 3
// 监管类型
// filterOptions.ZRLX = originOptions.ZRLX
// filterOptions.ZRLX.title = '监管类型'
// filterOptions.ZRLX.index = 4
// 适用车辆类型
filterOptions.CLLX = originOptions.CLLX
filterOptions.CLLX.index = 3
// 采标程度
// filterOptions.CBCD = originOptions.CBCD
// filterOptions.CBCD.index = 6
break
// 企业标准
case 'enterprise':
//标准状态
filterOptions.BUSSSTATE = originOptions.TEXTSTATUSBUSS
filterOptions.BUSSSTATE.title = '文本状态'
filterOptions.BUSSSTATE.index = 1
//主起草部门
filterOptions.ORGLIST = originOptions.QCDW
filterOptions.ORGLIST.title = '主起草部门'
filterOptions.ORGLIST.index = 2
break
// 资料中心
case 'msgdyinfo':
filterOptions.module = {}
filterOptions.module.showOpenBtn = false
// filterOptions.module.title = this.$t('m.module')
filterOptions.module.index = 1
// filterOptions.module.options = [
// {
// label: this.$t('m.all'),
// value: 'all'
// },
// {
// label: this.$t('m.domesticNews'),
// value: 'INLAND'
// },
// {
// label: this.$t('m.foreignNews'),
// value: 'FOREIGN'
// },
// {
// label: this.$t('m.dataCenter'),
// value: 'RESOURCE'
// }
// // {
// // label: '实施预警',
// // value: 'WARNING'
// // }
// ]
break
case 'All':
if (filterOptions.module) {
filterOptions.module.options = []
}
break
}
this.searchOptions = filterOptions
resolve()
})
},
/**
* @Description: 根据搜索条件搜索
* @author zmf
* @date 2021/3/2
*/
searchSarByInputKeyByCondition(){
this.pageAll = 1
this.page = 1
this.searchSarByInputKey()
},
/**
* @description: 条件检索
* @author: chenxiaoxi
* @date: 2018/12/20 14:54:26
*/
searchSarByInputKey (status) {
if (status === 'All') {
this.AllCheck = true
}
if (this.AllCheck) {
if (this.keywords === undefined) {
this.keywords = ''
}
const Alllist = {
selectIndex: 'fulltextserch',
selectValue: this.keywords,
page: this.pageAll,
pageSize: this.$store.getters.userInfo.configContent
}
this.$http.post('search/searchCenter/searchSarBykey', Alllist, {
_this: this,
loading: 'resultLoading'
}, res => {
if (res.ok) {
this.Allitems = res.data.list.map((item) => {
if (item.textContent) {
this.str = item.textContent
}
return {
...item,
textContent: this.str.replace(/null/g, '- -')
}
})
this.totalAll = res.data.count
this.AllCheck = true
} else {
}
}, e => {
})
} else {
this.searchSarBykey()
}
},
searchSarBykey () {
let searchCondition = this.searchCondition
let condition = {}
let searchKeys = Object.keys(this.searchOptions)
for (let key in searchCondition) {
if (searchKeys.indexOf(key) !== -1) {
if (condition.selectIndex === 'laws') {
condition.SYCLLX = condition.CLLX
condition.WSSFCY = condition.CYSD
}
condition[key] = searchCondition[key].join(',') === 'all' ? '' : searchCondition[key].join(',')
}
}
if (this.resultKeyword != null && this.resultKeyword !== '') {
condition.resultKeyword = this.resultKeyword
}
condition.page = this.page
condition.pageSize = this.$store.getters.userInfo.configContent
condition.selectValue = this.keywords
if (condition.selectIndex === 'bussstand') {
condition.selectIndex = 'stand'
condition.standType = 'FOREIGN'
condition.textStatus = condition.standState
} else if (condition.selectIndex === 'stand') {
condition.standType = 'INLAND'
}
if(condition.selectIndex === 'enterprise'){
condition.selectIndex='bussstand'
condition.standType = 'bussstand'
condition.textStatusBuss = condition.BUSSSTATE
condition.QCDW = condition.ORGLIST
}
// 查询为国内外政策时,改变查询参数名
if (condition.selectIndex === 'laws') {
condition.SYCLLX = condition.CLLX
condition.WSSFCY = condition.CYSD
delete condition.CLLX
delete condition.CYSD
}
if(condition.selectValue === undefined){
condition.selectValue = ''
}
this.$http.post('search/searchCenter/searchSarBykey', condition, {
_this: this,
loading: 'resultLoading'
}, res => {
if (res.ok) {
this.total = res.data.count
this.resultData = res.data.list
this.resultData.map((item) => {
if (item.collectId != null && item.collectId !== '') {
item.collectBtn = false
item.cancelCollectBtn = true
} else {
item.collectBtn = true
item.cancelCollectBtn = false
}
});
this.selectGroupdata(res.data)
} else {
this.total = 0
this.resultData = []
this.selectGroupdata(res.data)
// this.getSearchHistoty()
}
}, e => {
this.total = 0
this.resultData = []
console.error(e)
// this.getSearchHistoty()
})
},
// 导出查询结果
exportSearchResult () {
let searchCondition = this.searchCondition
let condition = {}
let searchKeys = Object.keys(this.searchOptions)
for (let key in searchCondition) {
if (searchKeys.indexOf(key) !== -1) {
condition[key] = searchCondition[key].join(',') === 'all' ? '' : searchCondition[key].join(',')
}
}
if (this.resultKeyword != null && this.resultKeyword !== '') {
condition.resultKeyword = this.resultKeyword
}
condition.page = 1
condition.pageSize = 10000
condition.selectValue = this.keywords
let searchInfoEO = ''
if (condition.selectIndex === 'stand') {
condition.standType = 'INLAND'
searchInfoEO = JSON.stringify(condition)
searchInfoEO = searchInfoEO.replace('"selectIndex":"stand",', '')
} else if (condition.selectIndex === 'laws') {
searchInfoEO = JSON.stringify(condition)
searchInfoEO = searchInfoEO.replace('"selectIndex":"laws",', '')
} else if (condition.selectIndex === 'bussstand') {
condition.standType = 'FOREIGN'
searchInfoEO = JSON.stringify(condition)
searchInfoEO = searchInfoEO.replace('"selectIndex":"bussstand",', '')
} else {
searchInfoEO = JSON.stringify(condition)
searchInfoEO = searchInfoEO.replace('"selectIndex":"msgdyinfo",', '')
}
searchInfoEO = searchInfoEO.replace('selectValue', 'keywords')
window.open('/api/search/searchCenter/exportSearchCenterDatas?exportDatas=' + searchInfoEO + '&searchType=' + this.selectIndex)
},
/**
* @description: 获取key值
* @author: chenxiaoxi
* @date: 2018/12/20 15:43:51
*/
getKey (key) {
switch (key) {
case 'SARPROPERTY':
return 'nature'
case 'COUNTRY':
return 'country'
case 'STANDCLASSIFY':
return 'standSort'
case 'PRODUCTTYPE':
return 'applyArctic'
case 'PROVETYPE':
return 'applyAuth'
case 'CATEGORY':
return 'category'
case 'ENERGYTYPES':
return 'CLLX'
// case 'ENERGYTYPES':
// return 'CLLX'
case 'DEGREESTANDARD':
return 'CBCD'
case 'STANDSTATE':
return 'standState'
// case 'BUSSFINECLASSSHOW':
// return 'bussFineClass'
case 'BUSSBIGCLASS':
return 'bussBigClass'
case 'ACCESSTYPE':
return 'ZRLX'
case 'WSCYSD':
return 'CYSD'
default:
return key
}
},
/**
* @description: 获取表格标题
* @author: chenxiaoxi
* @date: 2018/12/21 09:27:50
*/
getResultColumns () {
const resultColumns = {
index: {
title: '序号',
align: 'center',
width: 60,
render: (h, params) => {
return h('div', params.index + 1)
}
},
numbershow: {
title: this.selectIndex === 'stand' ? '标准号' : (this.selectIndex === 'laws' ? '政策编号' : '企业标准号'),
key: 'numbershow',
align: 'center',
render: (h, params) => {
return h('a', {
props: {},
on: {
click: () => {
// this.detailsStandardLaws(params.row)
this.judgeRolePermiOnSar(params.row, 1)
}
},
class: {
'word-break': 'break-all'
}
}, params.row.numbershow)
}
},
nameshow: {
title: this.selectIndex === 'stand' ? '标准名称' : (this.selectIndex === 'laws' ? '文件名称' : '企业标准名称'),
key: 'nameshow',
align: 'center',
render: (h, params) => {
return h('a', {
props: {},
on: {
click: () => {
this.judgeRolePermiOnSar(params.row, 1)
}
},
class: {
'word-break': 'break-all'
}
}, params.row.nameshow)
}
},
issue_time: {
title: '发布日期',
key: 'issue_time',
align: 'center',
render: (h, params) => {
return h('div', params.row.issue_time !== null || params.row.issue_time === undefined ? this.$dateFormat(new Date(params.row.issue_time), 'yyyy-MM-dd') : '')
}
},
put_time: {
title: this.$t('m.putTime'),
key: 'put_time',
align: 'center',
render: (h, params) => {
return h('div', params.row.put_time !== null || params.row.put_time === undefined ? this.$dateFormat(new Date(params.row.put_time), 'yyyy-MM-dd') : '')
}
},
standstateshow: {
title: this.selectIndex === 'stand' ? '标准状态' : (this.selectIndex === 'laws' ? '文件状态' : '企业标准状态'),
key: 'standstateshow',
align: 'center',
render: (h, params) => {
if (this.selectIndex === 'laws') {
return h('div', {
class: {
'text-overflow-hidden': true
},
attrs: {
title: params.row.standstateshow
}
}, params.row.standstateshow)
} else {
return h('div', {
class: {
'text-overflow-hidden': true
},
attrs: {
title: params.row.standstateshow
}
}, params.row.standstateshow)
}
}
},
module: {
title: '所属模块',
key: 'module',
align: 'center',
render: (h, params) => {
let text = ''
if (params.row.module === 'INLAND') {
text = '国内动态'
} else if (params.row.module === 'FOREIGN') {
text = '国外动态'
} else {
text = '资料中心'
}
return h('div', {
}, text)
}
},
title: {
title: '动态标题',
key: 'title',
align: 'center',
render: (h, params) => {
return h('a', {
on: {
click: () => {
if (this.$store.state.detailMap !== '') {
let lastDetailMap = this.$store.getters.getLastDetailMap
lastDetailMap.push(this.$store.state.detailMap)
this.$store.commit('setLastDetailMap', JSON.stringify(lastDetailMap))
}
if (params.row.module === 'RESOURCE') {
this.showDetailsByRole(params.row)
} else {
this.$store.commit('setDetailMap', this.$route.path)
let routeUrl = this.$router.resolve({
name: 'OtherDomesticDynamicsDetails',
params: {
id: params.row.id
}
})
window.open(routeUrl.href, '_blank')
}
}
},
class: {
'text-overflow-hidden': true
},
attrs: {
title: params.row.title
}
}, params.row.title)
}
},
// pubUserName: {
// title: '发布人',
// key: 'pubUserShow',
// align: 'center'
// },
action: {
title: '操作',
align: 'center',
render: (h, params) => {
if (this.selectIndex !== 'msgdyinfo') {
if (params.row.collectId) {
return h('div', [
h('a', {
style: {
marginRight: '5px'
},
on: {
click: () => {
this.judgeRolePermiOnSar(params.row, 1)
}
}
}, '查看'),
h('Dropdown', {
props: {
trigger: 'click',
transfer: true
},
style: {
marginLeft: '5px'
},
on: {
'on-click': (value) => {
if (value === '分享') {
this.judgeRolePermiOnSar(params.row, 4)
} else if (value === '取消收藏') {
// this.cancelCollectStandard(params.row)
this.judgeRolePermiOnSar(params.row, 3)
} else {
this.judgeRolePermiOnSar(params.row, 6)
}
}
} // iview组件内部的属性定义在其标签的对象里
}, [// 盒子内部其他标签元素放入数组中
h('Button', {
props: {
type: 'primary',
size: 'small'
}
}, this.$t('m.More')),
h('DropdownMenu', {// 创建一个和a标签同级的标签
slot: 'list' // iview组件内部的属性定义在其标签的对象里
},
this.dropdownItemsCollect.map(function (type) { // 把map看作循环,type看作循环的每一项
return h('DropdownItem', {
props: {
name: type.val
},
directives: [
{
name: 'btn-permission',
value: type.val === '分享' ? 'NG1592AYR5' : (type.val === '取消收藏' ? 'FB3R3TVALD' : '')
}
]
}, type.val)
})
)
])
])
} else {
return h('div', [
h('a', {
style: {
marginRight: '5px'
},
on: {
click: () => {
this.judgeRolePermiOnSar(params.row, 1)
}
}
}, '查看'),
h('Dropdown', {
props: {
trigger: 'click',
transfer: true
},
style: {
marginLeft: '5px'
},
on: {
'on-click': (value) => {
if (value === '分享') {
this.judgeRolePermiOnSar(params.row, 4)
} else if (value === '收藏') {
// this.collectStandard(params.row)
this.judgeRolePermiOnSar(params.row, 2)
} else {
this.judgeRolePermiOnSar(params.row, 6)
// this.goProcess(params.row)
}
}
} // iview组件内部的属性定义在其标签的对象里
}, [// 盒子内部其他标签元素放入数组中
h('Button', {
props: {
type: 'primary',
size: 'small'
}
}, this.$t('m.More')),
h('DropdownMenu', {// 创建一个和a标签同级的标签
slot: 'list' // iview组件内部的属性定义在其标签的对象里
},
this.dropdownItems.map(function (type) { // 把map看作循环,type看作循环的每一项
return h('DropdownItem', {
props: {
name: type.val
},
directives: [
{
name: 'btn-permission',
value: type.val === '分享' ? 'NG1592AYR5' : (type.val === '收藏' ? 'FB3R3TVALD' : '')
}
]
}, type.val)
})
)
])
])
}
} else {
let showtyo = ''
if (params.row.collectId) {
showtyo = '取消收藏'
} else {
showtyo = '收藏'
}
return h('div', [
h('a', {
style: {
marginRight: '5px'
},
on: {
click: () => {
if (params.row.module === 'RESOURCE') {
if (params.row.collectId) {
this.cancelCollectStandard(params.row)
} else {
this.collectStandard(params.row)
}
// this.$http.get('lawss/msgDynamicInfo/showDetailsByRole', {
// id: params.row.id
// }, {
// _this: this
// }, res => {
// if (res.data != null && res.data.length > 0) {
// if (params.row.collectId) {
// this.cancelCollectStandard(params.row)
// } else {
// this.collectStandard(params.row)
// }
// } else {
// this.$message({
// message: '当前角色无权限操作此信息',
// type: 'error'
// })
// }
// }, e => {
// })
} else {
if (params.row.collectId) {
this.judgeRolePermiOnSar(params.row, 3)
// this.cancelCollectStandard(params.row)
} else {
this.judgeRolePermiOnSar(params.row, 2)
// this.collectStandard(params.row)
}
}
}
}
}, showtyo),
h('a', {
style: {
marginRight: '5px'
},
on: {
click: () => {
if (params.row.module === 'RESOURCE') {
this.drawerModal = true
this.$nextTick(() => {
this.$refs.drawerModalTree.clearSearch()
})
this.selectNowObjResult = JSON.parse(JSON.stringify(params.row))
// this.$http.get('lawss/msgDynamicInfo/showDetailsByRole', {
// id: params.row.id
// }, {
// _this: this
// }, res => {
// if (res.data != null && res.data.length > 0) {
// // this.shareStandardLaws(params.row) 之前是弹出模态框,可以多选人,后修改成有组织部门的
// this.drawerModal = true
// this.$nextTick(() => {
// this.$refs.drawerModalTree.clearSearch()
// })
// this.selectNowObjResult = JSON.parse(JSON.stringify(params.row))
// } else {
// this.$message({
// message: '当前角色无权限操作此信息',
// type: 'error'
// })
// }
// }, e => {
// })
} else {
this.judgeRolePermiOnSar(params.row, 4)
}
}
}
}, '分享')
])
}
},
width: 130
}
}
const columnList = []
this.filterColumns.map((col) => {
if (resultColumns[col]) {
columnList.push(resultColumns[col])
}
})
return columnList
},
/**
* @description: 页码切换
* @author: chenxiaoxi
* @date: 2018/12/21 10:20:28
*/
pageChange (page) {
this.page = page
this.searchSarBykey()
},
/**
* @description: 每页条数切换
* @author: chenxiaoxi
* @date: 2018/12/21 10:20:56
*/
pageSizeChange (pageSize) {
this.searchSarBykey()
},
/**
*@desc:点击全部-分页
*@author: zhangRui
*@time: 2020/10/18 16:13:14
*/
pageChangeAll (page) {
this.pageAll = page
this.searchSarByInputKey()
},
pageSizeChangeAll (pageSize) {
this.searchSarByInputKey()
},
judgeRolePermiOnSar (item, type) {
let pagetype
if (type !== 5 && item.type === 'msgdyinfo') {
if (type === 2) {
this.collectStandard(item)
} else if (type === 3) {
this.cancelCollectStandard(item)
} else if (type === 4) {
this.shareSarInfo(item)
}
} else if (type === 5 && item.typeShow === 'MSG_DYNAMIC') {
this.showMsgPage(item)
} else {
if (type === 5) {
pagetype = item.typeShow
} else {
if (item.type === 'stand') {
if (item.standType === 'INLAND') {
pagetype = 'INLAND_STAND'
} else {
pagetype = 'FOREIGN_STAND'
}
} else if (item.type === 'laws') {
if (item.lawsType === 'INLAND') {
pagetype = 'INLAND_LAWS'
} else {
pagetype = 'FOREIGN_LAWS'
}
} else if (item.type === 'bussstand') {
pagetype = 'BUSINESS_STAND'
}
}
if (type === 1) {
this.detailsStandardLaws(item)
} else if (type === 2) {
this.collectStandard(item)
} else if (type === 3) {
this.cancelCollectStandard(item)
} else if (type === 4) {
this.shareSarInfo(item)
} else if (type === 5) {
this.showRecommendDetials(item)
} else if (type === 6) {
this.goProcess(item)
}
// 先不加判断
// if (type === 1) {
// this.detailsStandardLaws(item)
// } else if (type === 2) {
// this.collectStandard(item)
// } else if (type === 3) {
// this.cancelCollectStandard(item)
// } else if (type === 4) {
// this.shareSarInfo(item)
// } else if (type === 5) {
// this.showRecommendDetials(item)
// } else if (type === 6) {
// this.goProcess(item)
// }
}
},
showDetailsByRole (item) {
this.$store.commit('setDetailMap', this.$route.path)
let routeUrl = this.$router.resolve({
name: 'OtherDomesticDynamicsDetails',
params: {
id: item.id
}
})
window.open(routeUrl.href, '_blank')
// this.$http.get('lawss/msgDynamicInfo/showDetailsByRole', {
// id: item.id
// }, {
// _this: this
// }, res => {
// if (res.data != null && res.data.length > 0) {
// this.$store.commit('setDetailMap', this.$route.path)
// let routeUrl = this.$router.resolve({
// name: 'OtherDomesticDynamicsDetails',
// params: {
// id: item.id
// }
// })
// window.open(routeUrl.href, '_blank')
// } else {
// this.$message({
// message: '当前角色无权限操作此信息',
// type: 'error'
// })
// }
// }, e => {
// })
},
/**
* @description: 页面滚动
* @author: chenxiaoxi
* @date: 2018/12/21 10:39:11
*/
handleScrollHeader () {
const top = document.documentElement.scrollTop
if (top > 100) {
this.headerFixed = true
let opacity = top / 200
opacity = opacity > 1 ? 1 : opacity
this.opacity = { opacity }
} else {
this.headerFixed = false
}
},
// 查询为我推荐
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') {
routername = 'OtherStandardDetails'
// if (this.$hasPermission('CFEZ3VP7EA95CTRBH3JB')) {
// routername = 'OtherStandardDetails'
// } else {
// this.$message({
// message: '无权访问',
// type: 'warning'
// })
// }
} else if (item.typeShow === 'FOREIGN_STAND') {
routername = 'OtherForeignDetails'
// if (this.$hasPermission('R5DNG6EZC66CNFC4RHPH')) {
// routername = 'OtherForeignDetails'
// } else {
// this.$message({
// message: '无权访问',
// type: 'warning'
// })
// }
} else if (item.typeShow === 'INLAND_LAWS' || item.typeShow === 'FOREIGN_LAWS') {
routername = 'OtherLawsDetails'
// if (this.$hasPermission('9P2UTSAHZ3AHKDGAEY6V')) {
// routername = 'OtherLawsDetails'
// } else {
// this.$message({
// message: '无权访问',
// type: 'warning'
// })
// }
} else if (item.typeShow === 'BUSINESS_STAND') {
routername = 'OtherBussStandardDetails'
// if (this.$hasPermission('AMFQKB2GCPSJ5YVPPHG6')) {
// // this.judgeBussRole(item)
// // if (this.bussRoleFlag === false) {
// // this.$message({
// // message: '当前角色无权限操作此信息',
// // type: 'error'
// // })
// // } else {
// // }
// routername = 'OtherBussStandardDetails'
// } else {
// this.$message({
// message: '无权访问',
// type: 'warning'
// })
// }
}
// 详情跳到新页
if (routername !== '') {
let routeUrl = this.$router.resolve({
name: routername,
params: {
id: item.id,
pageType: pagetype
}
})
window.open(routeUrl.href, '_blank')
}
} else {
this.showMsgPage(item)
}
},
// 查看消息内容
showMsgPage (item) {
if (item.module === 'RESOURCE') {
let routeUrl = this.$router.resolve({
name: 'OtherDomesticDynamicsDetails',
params: {
id: item.id
}
})
window.open(routeUrl.href, '_blank')
// this.$http.get('lawss/msgDynamicInfo/showDetailsByRole', {
// id: item.id
// }, {
// _this: this
// }, res => {
// if (res.data != null && res.data.length > 0) {
// let routeUrl = this.$router.resolve({
// name: 'OtherDomesticDynamicsDetails',
// params: {
// id: item.id
// }
// })
// window.open(routeUrl.href, '_blank')
// } else {
// this.$message({
// message: '当前角色无权限操作此信息',
// type: 'error'
// })
// }
// }, e => {
// })
} else {
let routeUrl = this.$router.resolve({
name: 'OtherDomesticDynamicsDetails',
params: {
id: item.id
}
})
window.open(routeUrl.href, '_blank')
}
},
// 查询检索历史记录
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 => {
})
},
// 收藏
collectStandard (item) {
// this.judgeBussRole(item)
// if (this.bussRoleFlag === false) {
// this.$message({
// message: '当前角色无权限操作此信息',
// type: 'error'
// })
// } else {
// }
let personCollect = {}
personCollect.collectResId = item.id
if (item.type === 'msgdyinfo') {
personCollect.collectTitle = item.title
} else {
personCollect.collectTitle = item.nameshow + '(编号:' + item.numbershow + ')'
}
let pagetype = ''
if (item.type === 'stand') {
if (item.standType === 'INLAND') {
pagetype = 'INLAND_STAND'
} else {
pagetype = 'FOREIGN_STAND'
}
} else if (item.type === 'laws') {
if (item.lawsType === 'INLAND') {
pagetype = 'INLAND_LAWS'
} else {
pagetype = 'FOREIGN_LAWS'
}
} else if (item.type === 'bussstand') {
pagetype = 'BUSINESS_STAND'
} else {
if (item.module === 'INLAND') {
pagetype = 'INLAND_MSG'
} else if (item.module === 'FOREIGN') {
pagetype = 'FOREIGN_MSG'
} else {
pagetype = 'RESOURCE_MSG'
}
}
personCollect.collectType = pagetype
personCollect.userId = this.$store.getters.userInfo.userId
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.judgeBussRole(item)
// if (this.bussRoleFlag === false) {
// this.$message({
// message: '当前角色无权限操作此信息',
// type: 'error'
// })
// } else {
// }
this.$http.put('person/personCollect/updateByUserId', {
id: item.collectId
}, {
_this: this
}, res => {
item.collectBtn = !item.collectBtn
item.cancelCollectBtn = !item.cancelCollectBtn
item.collectId = ''
this.$message.success('取消收藏成功')
}, e => {
})
},
// 取消
treeCancel () {
this.drawerModal = false
this.$refs.drawerModalTree.treeReload()
},
// 树点击
selcetTree (checkedList) {
let parentList = []
checkedList.map(item => {
if (!item.isParent) {
parentList.push(item.id)
}
})
this.shareStandardSelect = parentList
},
// 分享
shareSarInfo (item) {
this.visibleOrgTable = true
// this.drawerModal = true
// this.$nextTick(() => {
// this.$refs.drawerModalTree.clearSearch()
// })
this.selectNowObjResult = JSON.parse(JSON.stringify(item))
},
// 树点击
isTreeOk (checkedList) {
this.shareStandardSelect = []
checkedList.map((item, index) => {
if (!item.isParent) {
this.shareStandardSelect.push(item.userId)
}
})
if (this.shareStandardSelect.length === 0) {
this.$message({
message: '请选择要分享的人!',
type: 'warning'
})
} else {
let pagetype = ''
if (this.selectNowObjResult.type === 'stand') {
if (this.selectNowObjResult.standType === '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 if (this.selectNowObjResult.type === 'bussstand') {
pagetype = 'BUSINESS_STAND'
} else {
if (this.selectNowObjResult.module === 'INLAND') {
pagetype = 'INLAND_MSG'
} else if (this.selectNowObjResult.module === 'FOREIGN') {
pagetype = 'FOREIGN_MSG'
} else {
pagetype = 'RESOURCE_MSG'
}
}
let personShareEO = {}
personShareEO.resType = pagetype
if (this.selectNowObjResult.type === 'msgdyinfo') {
personShareEO.resTitle = this.selectNowObjResult.title
} else {
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({
message: '分享成功',
type: 'success'
})
// this.shareStandardModal = false
// this.drawerModal = false
this.visibleOrgTable = false
this.shareStandardSelect = []
// this.$refs.drawerModalTree.treeReload()
}, e => {
this.$message({
message: '分享失败',
type: 'error'
})
})
}
},
// 消息推送
sureShareStandardLaws () {
if (this.shareStandardSelect.length === 0) {
this.$message({
message: this.$t('m.pleaseSelectThePersonYouWantToShare'),
type: '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 if (this.selectNowObjResult.type === 'bussstand') {
pagetype = 'BUSINESS_STAND'
} else {
if (this.selectNowObjResult.module === 'INLAND') {
pagetype = 'INLAND_MSG'
} else if (this.selectNowObjResult.module === 'FOREIGN') {
pagetype = 'FOREIGN_MSG'
} else {
pagetype = 'RESOURCE_MSG'
}
}
let personShareEO = {}
personShareEO.resType = pagetype
if (this.selectNowObjResult.type === 'msgdyinfo') {
personShareEO.resTitle = this.selectNowObjResult.title
} else {
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({
message: '分享成功',
type: 'success'
})
this.shareStandardModal = false
this.drawerModal = false
this.shareStandardSelect = []
this.$refs.drawerModalTree.treeReload()
}, e => {
this.$message({
message: '分享失败',
type: 'error'
})
})
}
},
// 查看 查看跳转详情页
detailsStandardLaws (item) {
let routername = ''
let pagetype = ''
if (item.type === 'stand') {
// if (this.$hasPermission('HK36LHK9444NPN8X634W')){
routername = 'OtherStandardDetails'
if (item.standType === 'INLAND') {
pagetype = 'INLAND_STAND'
} else {
pagetype = 'FOREIGN_STAND'
}
// }else {
// this.$message({
// message: '无权访问',
// type: 'warning'
// })
// }
} else if (item.type === 'laws') {
// if (this.$hasPermission('HK36LHK9444NPN8X634W')){
routername = 'OtherLawsDetails'
if (item.lawsType === 'INLAND') {
pagetype = 'INLAND_LAWS'
} else {
pagetype = 'FOREIGN_LAWS'
}
// }else {
// this.$message({
// message: '无权访问',
// type: 'warning'
// })
// }
} else {
// if (this.$hasPermission('HK36LHK9444NPN8X634W')) {
// this.judgeBussRole(item)
// if (this.bussRoleFlag === false) {
// this.$message({
// message: '当前角色无权限操作此信息',
// type: 'error'
// })
// } else {
// }
routername = 'OtherBussStandardDetails'
pagetype = 'BUSINESS_STAND '
// } else {
// this.$message({
// message: '无权访问',
// type: 'warning'
// })
// }
}
// 详情跳到新页
if (routername !== '' && pagetype !== '') {
let routeUrl = this.$router.resolve({
name: routername,
params: {
id: item.id,
pageType: pagetype
}
})
window.open(routeUrl.href, '_blank')
}
},
judgeBussRole (item) {
if (this.selectIndex === 'bussstand') {
let hasRole = 0
if (this.saveRoleBuss != null && this.saveRoleBuss.length > 0) {
for (let i = 0; i < this.saveRoleBuss.length; i++) {
if (item.id === this.saveRoleBuss[i].id) {
hasRole = 1
break
}
}
}
if (hasRole === 0) {
this.bussRoleFlag = false
} else {
this.bussRoleFlag = true
}
} else {
this.bussRoleFlag = true
}
},
showBuyRole () {
let userRoles = this.$store.getters.userInfo.userRole
if (userRoles != null && userRoles !== '') {
let roleArr = userRoles.split(',')
if (roleArr.indexOf('超级管理员') > -1 || roleArr.indexOf('工程师') > -1) {
this.buyRoleFlag = 0
} else {
this.buyRoleFlag = 1
}
} else {
this.buyRoleFlag = 1
}
},
selectBussRoleMsg () {
this.$http.get('lawss/sarBussionessStand/getSarBussionStandPageByRole', {}, {
_this: this, loading: 'loading'
}, res => {
if (res.data.list != null && res.data.list.length > 0) {
this.saveRoleBuss = res.data.list
}
}, e => {
})
},
//时间处理
dateFormat2(str){
return dateFormat(str)
},
handleSearchReset() {
this.resultKeyword = ''
this.searchSarByInputKey()
},
// 回显政策状态
getLawsState (val) {
if (!val) {
val = ''
}
let lawsStateName = this.lawssStateOptions.filter(item => {
return val.indexOf(item.value) > -1
}).map(item => item.label)
return lawsStateName.join(',')
}
},
components: {
// deptTree,
PersonalCenter
},
props: {},
computed: {
...mapGetters(['getRoleModule']),
// 条件按钮提示
toggleConditionTips () {
return this.conditionBtnOpen ? ('收起条件') : ('展开条件')
},
// 标题过滤
filterColumns () {
// 根据资源类型过滤表头
let selectIndex = this.selectIndex
let columnList = []
if (selectIndex === 'msgdyinfo') {
columnList = ['index', 'module', 'title', 'issue_time', 'pubUserName', 'action']
} else {
columnList = ['index', 'numbershow', 'nameshow', 'issue_time', 'put_time', 'standstateshow', 'action']
}
return columnList
},
// 展示条件按钮
showConditionBtn () {
// 根据选项的长度判断是否显示展开条件的按钮
let optionsLength = Object.keys(this.searchOptions).length
return optionsLength > 5
}
},
watch: {
// 展开全部条件,判断该选项是否超出高度,如果超出了就增加按钮
conditionBtnOpen (val, oldVal) {
if (val) {
this.$nextTick(() => {
let options = this.searchOptions
for (let key in options) {
let dom = document.getElementsByClassName(key)
if ($(dom).height() > 38) {
this.searchOptions[key].isClose = true
this.searchOptions[key].showOpenBtn = true
}
}
})
}
},
// 监听选项的变化, 变化后立即重新查询数据
searchCondition: {
deep: true,
handler (val) {
// 条件过滤完成后查找
if (this.searchCondition.selectIndex[0] === 'All') {
} else {
this.filterOptions(this.selectIndex).then(() => {
this.page = 1
this.searchSarBykey()
})
}
}
},
// 资源大类监听, 改变后过滤条件
selectIndex (val) {
this.filterOptions(val).then(() => {
this.resultColumns = this.getResultColumns()
this.$nextTick(() => {
let options = this.searchOptions
for (let key in options) {
let dom = document.getElementsByClassName(key)
if ($(dom).height() > 38) {
this.searchOptions[key].isClose = true
this.searchOptions[key].showOpenBtn = true
}
}
})
})
}
},
mounted () {
let globalInputSearch = this.$route.params.searchValue
if (globalInputSearch !== 'allvalue') {
this.keywords = globalInputSearch
}
if (this.$route.params.selectKey === 'All') {
// 从首页进入一般检索-资源类型查询全部
this.searchSarByInputKey('All')
} else {
this.searchSarBykey()
}
// 查询检索历史
// this.getSearchHistoty()
// 查询所有选项
this.queryOptions()
this.showBuyRole()
// 根据资源类型过滤表头
this.resultColumns = this.getResultColumns()
// this.selectBussRoleMsg()
// if () {
// optChecked (key, value)
// }
// 滚动事件绑定
window.addEventListener('scroll', this.handleScrollHeader)
// 检索中心特殊处理
$('body').css('min-width', '1280px')
},
unmounted () {
// 滚动事件解绑
window.removeEventListener('scroll', this.handleScrollHeader)
},
destroyed () {
// 检索中心特殊处理
$('body').css('min-width', '1280px')
}
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/mixins';
@import '~@/assets/styles/style';
/deep/ .yellowClass{
color: #E6A23C;
}
/deep/ .redClass{
color: #F56C6C;
}
/deep/ p{
display: inline;
}
/deep/.highlight-class {
color: red !important;
}
/deep/.pagination{
position: static !important;
border-bottom-right-radius: 20px;
border-bottom-left-radius: 20px;
}
.standard-search {
padding: 6px 26px;
@borderColor: #BFBFBF;
height: 100%;
font-size: 14px;
display: flex;
flex-direction: column;
/deep/.el-button--mini {
height: 29px;
}
.AllBox {
margin-top: 20px;
background-color: #fff;
border-radius: 20px;
padding: 10px;
&:last-child {
margin-bottom: 20px;
}
.AllBoxTitle {
position: relative;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
line-height: 20px;
margin-bottom: 10px;
.more {
cursor: pointer;
position: absolute;
right: 5px;
color: #C0C4CC;
}
.more:hover {
color: #3391CE;
}
.typetext {
height: 20px;
line-height: 20px;
padding: 0 5px;
border-radius: 6px;
color: #fff;
background: #3391CE;
}
.AllBoxText {
margin-left: 10px;
font-size: 20px;
font-weight: bold;
}
}
.AllBoxContent {
line-height: 20px;
display: block;
word-break: break-all;
//多行文本溢出
overflow: hidden;
//text-overflow: ellipsis;
//display: -webkit-box;
//-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
max-height: 78px;
}
.AllTime {
margin-top: 15px;
display: flex;
}
}
.no-AllBox{
line-height: 50px;
text-align: center;
}
.header{
height: 50px;
.home-header{
height: 100%;
}
}
@media screen and (min-width: 1920px) {
.header{
height: 75px;
}
}
.standard-search-content{
//min-height: 768px;
overflow-y: auto;
padding: 15px 10px;
//margin: 0 auto;
position: relative;
flex: 1;
.flex();
.content-left {
width: 100%;
height: 100%;
position: relative;
display: flex;
flex-direction: column;
.search-header{
width: 100%;
.flex();
justify-content: space-between;
.search-title{
line-height: 40px;
padding-left: 20px;
color: @baseColor;
font-size: 18px;
font-weight: bold;
& span:hover {
cursor: pointer;
color: #3391CE !important;
}
.commonly{
cursor: pointer;
& span:hover {
cursor: pointer;
color: #3391CE;
}
}
.senior{
margin-left: 20px;
color: black;
&:hover {
cursor: pointer;
color: #0000cc;
}
}
}
.search-input{
position: absolute;
right: 96px;
width: 195px;
height: 31.4px;
border: 1px solid @borderColor;
.flex();
transition: all .2s linear;
.search-btn{
width: 30px;
background: #F4F8FB;
text-align: center;
border-left: 1px solid @borderColor;
cursor: pointer;
&:hover{
background: @baseColor;
.ivu-icon{
color: #FFF;
}
}
.ivu-icon{
display: inline-block;
height: 26px;
line-height: 26px;
color: @baseColor;
}
}
.input{
flex: 1;
overflow: hidden;
.ivu-input-wrapper{
width: 100%;
height: 100%;
.ivu-input{
width: 100%;
height: 100%;
border-radius: 0;
border: none;
.flex();
align-items: center;
padding-right: 7px !important;
}
.ivu-input-icon{
line-height: 27px;
}
}
}
}
}
.search-condition{
width: 100%;
/*min-height: 200px;*/
position: relative;
//border: 1px solid @borderColor;
border-bottom: 1px solid @borderColor;
margin-top: 15px;
//background-color: hsla(0,0%,100%,.9);
//border-radius: 20px;
padding: 10px;
.condition-btn{
width: 75px;
height: 20px;
line-height: 20px;
background: #D3F0FF;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
text-align: center;
color: @baseColor;
transition: all .2s linear;
position: absolute;
bottom: -21px;
left: 50%;
margin-left: -37.5px;
&:hover{
background: @baseColor;
color: #FFF;
cursor: pointer;
}
}
}
.condition-content{
padding: 0 20px;
.condition-item{
line-height: 38px;
border-bottom: 1px dashed @borderColor;
.flex();
justify-content: space-between;
padding-right: 5px;
&:last-child{
border-bottom: transparent;
}
.condition-item-title{
color: #313131;
font-weight: bold;
width: 90px;
}
ul{
flex: 1;
height: auto;
overflow: hidden;
&.is-close{
height: 38px;
}
li{
float: left;
padding: 0 2.5px;
span{
/*padding: 3px 7px;*/
padding: 0 0 0 3px;
border-radius: 2px;
transition: all .3s ease;
.un-select();
&:hover{
cursor: pointer;
color: @baseColor;
}
&.selected{
padding: 3px 7px 3px 7px;
background: @baseColor;
color: #FFF;
border-radius: 4px;
& span {
font {
color: #fff !important;
}
}
&:hover{
background: @baseColor;
color: #FFF;
}
}
}
}
}
.open-btn{
color: #DE5F55;
cursor: pointer;
}
}
}
.table-box {
flex: 1;
display: flex;
flex-direction: column;
.search-result {
width: 100%;
margin-top: 25px;
padding: 0 20px;
margin-bottom: 20px;
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
.search-group{
.flex();
justify-content: flex-end;
.search-input{
position: relative;
width: 195px;
height: 31.4px;
.ivu-input-wrapper{
position: absolute;
}
.ivu-input-icon{
margin-right: 28px;
}
.search-btn{
position: absolute;
right: 0;
height: 31.4px;
width: 30px;
background: #F4F8FB;
text-align: center;
border: 1px solid @borderColor;
cursor: pointer;
&:hover{
background: @baseColor;
.ivu-icon{
color: #FFF;
}
}
.ivu-icon{
display: inline-block;
height: 26px;
line-height: 26px;
color: @baseColor;
}
}
}
}
}
}
}
.content-right{
flex: 1;
overflow: hidden;
.search-recommend,
.search-history{
max-width: 350px;
border: 1px solid @borderColor;
.title{
line-height: 40px;
background: #F0F0F0;
padding: 0 10px;
color: #313131;
border-bottom: 1px solid @borderColor;
position: relative;
}
.more{
cursor: pointer;
color: #12508E;
position: absolute;
top: 0;
right: 11px;
z-index: 100;
font-size: 14px;
}
.content{
height: 160px;
background: #FFF;
padding: 10px;
overflow-y: auto;
li{
line-height: 25px;
.res-type-content{
width: calc(~'100% - 80px');
.flex();
align-items: center;
&>a{
padding-left: 4px;
flex: 1;
.ellipsis();
}
}
}
}
}
.search-history{
.res-type-content{
float: left;
width: calc(~'100% - 44px')!important;
.flex();
align-items: center;
&>a{
padding-left: 4px;
flex: 1;
.ellipsis();
}
}
}
.search-recommend{
margin-bottom: 20px;
.res-type-content{
width: 100%;
.flex();
align-items: center;
&>span{
padding-left: 4px;
flex: 1;
.ellipsis();
}
}
ul{
width: 100%;
height: 85%;
overflow-y: auto;
li{
position: relative;
cursor: pointer;
display: flex;
display: -ms-flex;
align-items: center;
font-size: 14px;
&:last-child{
margin-bottom: 0;
}
&:hover{
color: #12508E;
font-weight: bold;
text-decoration: underline;
}
}
}
}
}
}
.header-fixed{
width: 100%;
position: fixed;
top: 0;
left: 0;
background: @baseColor;
z-index: 1000;
opacity: 0;
overflow: hidden;
animation: fadeIn 0.2s linear forwards;
padding-left: 20px;
color: #FFF;
font-size: 18px;
font-weight: bold;
line-height: 40px;
}
@keyframes fadeIn {
0% {
height: 0;
}
100% {
height: 40px
}
}
.toBuyClass {
color: white;
margin-top: 50px;
text-align: center;
.button-wrapper {
margin-top: 30px;
}
}
.jumpColor{
color: #2d8cf0;
cursor: pointer;
}
/*头部搜索*/
.search{
display: flex;
justify-content: center;
text-align: center;
.search-box {
display: flex;
align-items: center ;
width: 564px;
height: 48px;
/deep/ .el-input__icon {
line-height: 48px !important;
}
.home-input{
width: 509px;
//padding: 9px 0 10px 10px;
height: 48px;
/deep/.el-input__inner{
font-size: 16px;
border-radius: 24px 0 0 24px;
font-family: PingFang-SC-Medium;
color: #666;
height: 48px;
}
}
.search-btn-box {
width: 55px;
height: 48px;
border-radius: 0 24px 24px 0;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
.search-btn{
width: 25px;
height: 25px;
background: url("~@/assets/images/shangqi/home/search.png") no-repeat;
background-size: 85% 85%;
cursor:pointer;
.el-input__inner {
height: 44px;
}
}
}
.el-input__inner {
height: 48px;
border-radius: 0;
border: none;
padding: 0 34px;
}
}
.router-link{
position: relative;
color: #fff;
top: 17px;
left: 44px;
font-family: PingFang-SC-Medium;
font-size: 16px;
text-decoration: underline;
}
.router-link1{
position: relative;
color: #fff;
top: 17px;
left: 54px;
font-family: PingFang-SC-Medium;
font-size: 16px;
text-decoration: underline;
}
}
.el-table {
color: #333;
//border-top-left-radius: 20px;
//border-top-right-radius: 20px;
}
.el-input--suffix .el-input__inner {
padding-right: 30px;
border-radius: 20px;
}
.fixed-clean {
/deep/.el-input__inner {
padding-right: 60px;
}
/deep/.el-input__icon {
&:hover {
cursor: pointer;
}
}
}
}
.search-content__wrap {
background-color: hsla(0, 0%, 100%, .9);
border-radius: 20px;
flex: 1;
overflow: hidden;
margin-top: 20px;
display: flex;
flex-direction: column;
.all-box__wrap {
padding: 0 10px;
flex: 1;
overflow-y: auto;
.hasNoData {
width: 100%;
height: 100%;
background-color: transparent;
}
}
}
.reset-btn {
color: #fff;
position: relative;
top: 17px;
left: 34px;
font-family: PingFang-SC-Medium;
font-size: 16px;
text-decoration: underline;
cursor: pointer;
}
</style>