code init
This commit is contained in:
@@ -0,0 +1,644 @@
|
||||
<!-- 标准法规库 - 动态&资料 -->
|
||||
<template>
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick" class="el-tabs">
|
||||
<el-tab-pane label="资料中心" name="first">
|
||||
<div id="queryDynamicInformation" class="v-class">
|
||||
<div class="query-dynamic-information-left">
|
||||
<div class="dynamic-search">
|
||||
<div class="dynamic-search-header">
|
||||
<h5>资料中心搜索</h5>
|
||||
</div>
|
||||
<div class="dynamic-search-line"></div>
|
||||
<div class="dynamic-search-center search-area">
|
||||
<el-form
|
||||
ref="dynamic"
|
||||
:modal="dynamic"
|
||||
label-width="100px"
|
||||
inline
|
||||
@keyup.enter.native="getSearch">
|
||||
<el-form-item label="" prop="keyWord" class="search-item">
|
||||
<el-input
|
||||
class="winput"
|
||||
v-model="dynamic.keyWord"
|
||||
@keyup.enter="getSearch"
|
||||
clearable
|
||||
placeholder="请输入查找关键字"
|
||||
:maxlength="100"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="openData" class="search-item">
|
||||
<el-date-picker
|
||||
class="winput"
|
||||
v-model="dynamic.openData"
|
||||
type="date"
|
||||
:editable="false"
|
||||
placeholder="请选择开始时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="closeData" class="search-item">
|
||||
<el-date-picker
|
||||
class="winput"
|
||||
v-model="dynamic.closeData"
|
||||
type="date"
|
||||
:editable="false"
|
||||
placeholder="请选择结束时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item class="wbtn">
|
||||
<el-button
|
||||
type="primary"
|
||||
round
|
||||
size="small"
|
||||
@click="getSearch"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button round size="small" @click="empty">清空</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="query-dynamic-information-right">
|
||||
<span class="result">{{ result }}</span>
|
||||
<!-- <span style="float: right;margin-right: 20px;margin-top: 5px" class="more" @click="moreClick">更多</span>-->
|
||||
<div class="more">
|
||||
<el-button
|
||||
v-btn-permission="'QYH42UV442H8WJSX9EZH'"
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
round
|
||||
@click="moreClick">
|
||||
更多
|
||||
</el-button>
|
||||
</div>
|
||||
<has-no-data
|
||||
pClass="substance"
|
||||
:tips="substanceTips"
|
||||
v-if="substance.length === 0"
|
||||
>
|
||||
</has-no-data>
|
||||
<!-- 相关动态 -->
|
||||
<div class="substance" v-else>
|
||||
<div
|
||||
v-for="(sub, index) in substance"
|
||||
:key="index"
|
||||
@click="informationDetails(sub)"
|
||||
>
|
||||
<div class="substance-title">
|
||||
<i v-show="isNew(sub.pubTime)" class="newI">new</i>
|
||||
<i class="el-icon-document-copy" />
|
||||
<span :title="sub.title">{{ sub.title }}</span>
|
||||
</div>
|
||||
<div class="substance-date">
|
||||
<!-- <p>{{ sub.contentTxt }}</p>
|
||||
<span v-if="sub.pubTime != null && sub.pubTime !== ''">{{
|
||||
$dateFormat(new Date(sub.pubTime), "yyyy-MM-dd")
|
||||
}}</span> -->
|
||||
<span class="time">{{ getDate(sub.pubTime) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<loading :loading="loading">正在查找相关资料...</loading>
|
||||
</div>
|
||||
<pagination
|
||||
:total="total"
|
||||
:page="page"
|
||||
@pageChange="pageChange"
|
||||
@pageSizeChange="pageSizeChange"
|
||||
></pagination>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="动态信息" name="second">
|
||||
<div class="information">
|
||||
<div class="headBtn search-area">
|
||||
<div class="left">
|
||||
<el-form :model="search" inline class="label-input-form" @submit.native.prevent>
|
||||
<el-form-item label="标题" prop="msgTitle" class="search-item search-item-last">
|
||||
<el-input
|
||||
v-model="search.msgTitle"
|
||||
clearable
|
||||
@keyup.enter.native="tableData"
|
||||
placeholder="根据标题查找"/>
|
||||
</el-form-item>
|
||||
<el-form-item class="search-item btn-box">
|
||||
<el-button
|
||||
icon="el-icon-search"
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
round
|
||||
@click="tableData"></el-button>
|
||||
</el-form-item>
|
||||
<el-form-item class="search-item btn-box">
|
||||
<el-button
|
||||
class="common-button-default"
|
||||
icon="el-icon-refresh-left"
|
||||
round
|
||||
@click="resetSearch"></el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- <span class="more" @click="moreClick">更多</span>-->
|
||||
<div class="more">
|
||||
<el-button
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
round
|
||||
v-btn-permission="'ZV75SCBJEVET3DC9782Z'"
|
||||
@click="moreClickInfo">
|
||||
更多
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<loading :loading="loadingInfo">数据获取中</loading>
|
||||
<el-table
|
||||
:data="msgList"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
border
|
||||
height="100%"
|
||||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
||||
fontWeight: 'bold', height: '48px'}"
|
||||
ref="selection"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="title"
|
||||
label="标题"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.title }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="content"
|
||||
label="内容"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="state"
|
||||
label="状态"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination :total="totalInfo" @pageChange="pageChangeInfo" @pageSizeChange="pageSizeChangeInfo"></pagination>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'DynamicInformation',
|
||||
data () {
|
||||
return {
|
||||
totalInfo: 0,
|
||||
pageInfo: 1,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
msgList: [],
|
||||
loadingInfo: false,
|
||||
search: {
|
||||
msgTitle: ''
|
||||
},
|
||||
//
|
||||
activeName: 'first',
|
||||
// 头部搜索框
|
||||
dynamic: {
|
||||
keyWord: '',
|
||||
openData: '',
|
||||
closeData: ''
|
||||
},
|
||||
result: '最近资料',
|
||||
value11: '',
|
||||
substance: [],
|
||||
page: 1, // 当前页数
|
||||
total: 0, // 总条数
|
||||
loading: false,
|
||||
queryFlag: false, // 是否查找
|
||||
searchFlag: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick (){
|
||||
|
||||
},
|
||||
pageChangeInfo (page) {
|
||||
this.pageInfo = page
|
||||
this.tableData()
|
||||
},
|
||||
// 分页每页显示数改变后方法
|
||||
pageSizeChangeInfo (pageSize) {
|
||||
this.pageSize = pageSize
|
||||
this.tableData()
|
||||
},
|
||||
// 详情页
|
||||
handlePreview (item) {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'informationIndex2',
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重置
|
||||
resetSearch () {
|
||||
this.search.msgTitle = ''
|
||||
this.tableData()
|
||||
},
|
||||
tableData () {
|
||||
this.loadingInfo = true
|
||||
let itemsPage = {}
|
||||
itemsPage.page = this.pageInfo
|
||||
itemsPage.pageSize = this.pageSize
|
||||
itemsPage.title = this.search.msgTitle
|
||||
this.$http.get('lawss/sarNotice/getTenList', itemsPage, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.loadingInfo = false
|
||||
if (res.ok) {
|
||||
// this.msgList = res.data.list
|
||||
let list = res.data.list
|
||||
list.sort(function (a, b) {
|
||||
return b.createTime - a.createTime
|
||||
})
|
||||
this.msgList = list
|
||||
this.totalInfo = res.data.count
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
backInfo () {
|
||||
// alert(0)
|
||||
// this.$router.push('/dynamics')
|
||||
if (this.$store.state.detailMap !== '') {
|
||||
this.$router.push(this.$store.state.detailMap)
|
||||
this.$store.commit('setDetailMap', '')
|
||||
} else {
|
||||
let lastPathList = this.$store.getters.getLastDetailMap
|
||||
let lastPath = lastPathList[lastPathList.length - 1]
|
||||
this.$router.push(lastPath)
|
||||
lastPathList.pop(1)
|
||||
this.$store.commit('setLastDetailMap', JSON.stringify(lastPathList))
|
||||
}
|
||||
},
|
||||
moreClickInfo () {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push('/informationMore')
|
||||
},
|
||||
testa () {
|
||||
var arr = [
|
||||
{
|
||||
name: '1'
|
||||
},
|
||||
{
|
||||
name: '2'
|
||||
}
|
||||
]
|
||||
var newArr = []
|
||||
// defaultData
|
||||
for (var a = 0; a < arr.length; a++) {
|
||||
var json = {}
|
||||
json.text = arr[a].name
|
||||
newArr.push(json)
|
||||
}
|
||||
console.log(newArr);
|
||||
},
|
||||
// 资料中心
|
||||
moreClick () {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'DynamicInformationMore'
|
||||
})
|
||||
},
|
||||
// new
|
||||
isNew (pubTime) {
|
||||
if (pubTime != null && pubTime !== '' && pubTime !== undefined) {
|
||||
pubTime = pubTime.replace(new RegExp(/-/gm), '/')
|
||||
return (
|
||||
new Date().getTime() - new Date(pubTime).getTime() <
|
||||
7 * 24 * 3600 * 1000
|
||||
)
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @description: 日期转换
|
||||
* @author: chenxiaoxi
|
||||
* @date: 2018/11/01 10:20:12
|
||||
*/
|
||||
dateFormat (date) {
|
||||
let year = new Date(date).getFullYear()
|
||||
let month = new Date(date).getMonth() + 1
|
||||
let day = new Date(date).getDate()
|
||||
return (
|
||||
year +
|
||||
'-' +
|
||||
(month < 10 ? '0' + month : month) +
|
||||
'-' +
|
||||
(day < 10 ? '0' + day : day)
|
||||
)
|
||||
},
|
||||
getDate (date) {
|
||||
return date !== undefined && date != null ? date.split(' ')[0] : ''
|
||||
},
|
||||
queryKeyWords () {
|
||||
// let search = JSON.stringify(this.dynamic)
|
||||
let obj = {}
|
||||
obj.keyWord = this.dynamic.keyWord
|
||||
obj.openData = this.dynamic.openData
|
||||
? this.dateFormat(this.dynamic.openData, 'yyyy-MM-dd')
|
||||
: ''
|
||||
obj.closeData = this.dynamic.closeData
|
||||
? this.dateFormat(this.dynamic.closeData, 'yyyy-MM-dd')
|
||||
: ''
|
||||
let search = JSON.stringify(obj)
|
||||
this.$store.commit('setDynamicSearchHistory', search)
|
||||
this.queryFlag = true
|
||||
this.$http.get(
|
||||
'lawss/msgDynamicInfo/pageForSevenDay',
|
||||
{
|
||||
pubTime1: this.dynamic.openData
|
||||
? this.dateFormat(this.dynamic.openData, 'yyyy-MM-dd')
|
||||
: '',
|
||||
pubTime2: this.dynamic.closeData
|
||||
? this.dateFormat(this.dynamic.closeData, 'yyyy-MM-dd')
|
||||
: '',
|
||||
title: this.dynamic.keyWord,
|
||||
page: this.page,
|
||||
pageSize: this.$store.getters.userInfo.configContent
|
||||
},
|
||||
{
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
},
|
||||
(res) => {
|
||||
this.substance = res.data.list
|
||||
this.total = res.data.count
|
||||
},
|
||||
(e) => {}
|
||||
)
|
||||
},
|
||||
// 点击左侧查询按钮
|
||||
getSearch () {
|
||||
this.page = 1
|
||||
this.querySearchWords()
|
||||
},
|
||||
// 查询
|
||||
querySearchWords () {
|
||||
this.result = '搜索结果 '
|
||||
this.queryKeyWords()
|
||||
},
|
||||
// 清空
|
||||
empty () {
|
||||
this.page = 1
|
||||
this.dynamic.keyWord = ''
|
||||
this.dynamic.openData = ''
|
||||
this.dynamic.closeData = ''
|
||||
this.result = '最近资料'
|
||||
this.queryKeyWords()
|
||||
},
|
||||
/**
|
||||
* @description:条件查找动态
|
||||
* @author: zhaochunfeng
|
||||
* @date: 2018/10/29 11:09:25
|
||||
*/
|
||||
// 页码改变的回调
|
||||
pageChange (page) {
|
||||
this.page = page
|
||||
this.querySearchWords()
|
||||
},
|
||||
// 每页跳数改变回调
|
||||
pageSizeChange () {
|
||||
this.querySearchWords()
|
||||
},
|
||||
// 查看详情
|
||||
informationDetails (information) {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
const route = this.$router.resolve({
|
||||
name: 'DynamicInfomationDetails2',
|
||||
query: {
|
||||
id: information.id,
|
||||
pageType: information.msgType + '_MSG'
|
||||
}
|
||||
})
|
||||
window.open(route.href, '_blank')
|
||||
},
|
||||
// 返回
|
||||
back () {
|
||||
this.$router.push('/dynamicInformation')
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
props: {},
|
||||
computed: {
|
||||
...mapGetters(['getRoleModule']),
|
||||
// 查找提示
|
||||
substanceTips () {
|
||||
return this.queryFlag === true ? '未找到相关资料' : '请输入您的查找条件'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
deep: true,
|
||||
handler (val) {
|
||||
this.queryFlag = false
|
||||
}
|
||||
},
|
||||
loading (val) {
|
||||
if (val) {
|
||||
$('.substance').css('overflow-y', 'hidden')
|
||||
} else {
|
||||
$('.substance').css('overflow-y', 'auto')
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.dynamic.keyWord = this.$route.query.keywords
|
||||
this.dynamic.openData = this.$route.query.startTime
|
||||
this.dynamic.closeData = this.$route.query.endTime
|
||||
// 如果有一个条件不为空,则进行查找
|
||||
this.queryKeyWords()
|
||||
this.testa()
|
||||
this.tableData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
@import "~@/assets/styles/style";
|
||||
@import "~@/assets/styles/mixins";
|
||||
.el-tabs{
|
||||
height: 100%;
|
||||
/deep/.el-tabs__content{
|
||||
height: calc(~'100% - 38px');
|
||||
.el-tab-pane{
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
#queryDynamicInformation {
|
||||
.flex();
|
||||
padding: 15px;
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
overflow-y: auto;
|
||||
.query-dynamic-information-left {
|
||||
.flex();
|
||||
justify-content: center;
|
||||
margin-right: 10px;
|
||||
width: 280px;
|
||||
.dynamic-search {
|
||||
width: 280px;
|
||||
.dynamic-search-header {
|
||||
.flex();
|
||||
padding-bottom: 5px;
|
||||
h5 {
|
||||
flex: 1;
|
||||
padding-left: 5px;
|
||||
}
|
||||
}
|
||||
.dynamic-search-line {
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
background: @boxBgColor;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.dynamic-search-center {
|
||||
.search-btn {
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.winput {
|
||||
/deep/.el-input__inner {
|
||||
width: 250px;
|
||||
}
|
||||
}
|
||||
.wbtn {
|
||||
/deep/.el-button--small {
|
||||
width: 122px;
|
||||
}
|
||||
}
|
||||
/deep/.el-input {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.query-dynamic-information-right {
|
||||
padding: 10px 0 0;
|
||||
flex: 1;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 5px;
|
||||
overflow-x: auto;
|
||||
.substance {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: calc(~"100% - 70px");
|
||||
padding: 20px 10px 10px;
|
||||
font-size: 16px;
|
||||
overflow-y: auto;
|
||||
& > div {
|
||||
.flex();
|
||||
justify-content: space-between;
|
||||
.substance-title {
|
||||
display: flex;
|
||||
padding: 10px 5px;
|
||||
max-width: 80%;
|
||||
& > span {
|
||||
display: inline-block;
|
||||
margin-left: 3px;
|
||||
width: 100%;
|
||||
.ellipsis();
|
||||
}
|
||||
}
|
||||
.substance-title:hover {
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
color: @baseColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.result {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
margin-left: 15px;
|
||||
margin-top: 10px;
|
||||
color: #3d3d3d;
|
||||
}
|
||||
.newI {
|
||||
font-style: italic;
|
||||
color: #e4393c;
|
||||
font-weight: bold;
|
||||
margin-right: 5px;
|
||||
}
|
||||
/deep/.more {
|
||||
cursor: pointer;
|
||||
color: #12508e;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 100;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!-- 动态信息 -->
|
||||
<style lang="less">
|
||||
@import '~@/assets/styles/mixins';
|
||||
@import '~@/assets/styles/style';
|
||||
.information{
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.headBtn{
|
||||
height: 50px;
|
||||
background-color: #FFFFFF;
|
||||
/deep/.more {
|
||||
cursor: pointer;
|
||||
color: #12508e;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 100;
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
.container{
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
flex: auto;
|
||||
.pagination {
|
||||
position: static;
|
||||
/deep/ .pagination-slot {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,390 @@
|
||||
<!-- 标准法规库 - 动态&资料 -->
|
||||
<template>
|
||||
<div id="queryDynamicInformation" class="v-class">
|
||||
<div class="query-dynamic-information-left">
|
||||
<div class="dynamic-search">
|
||||
<div class="dynamic-search-header">
|
||||
<span class="back" title="返回" @click="back">
|
||||
<i class="el-icon-back"></i>
|
||||
</span>
|
||||
<h5>资料中心搜索</h5>
|
||||
</div>
|
||||
<div class="dynamic-search-line"></div>
|
||||
<div class="dynamic-search-center search-area">
|
||||
<el-form
|
||||
ref="dynamic"
|
||||
:modal="dynamic"
|
||||
class=""
|
||||
label-width="100px"
|
||||
inline
|
||||
@submit.native.prevent
|
||||
>
|
||||
<el-form-item label="" prop="keyWord" class="search-item">
|
||||
<el-input
|
||||
class="winput"
|
||||
v-model="dynamic.keyWord"
|
||||
@keyup.enter.native="querySearchWords"
|
||||
clearable
|
||||
placeholder="请输入查找关键字"
|
||||
:maxlength="100"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="openData" class="search-item">
|
||||
<el-date-picker
|
||||
class="winput"
|
||||
v-model="dynamic.openData"
|
||||
type="date"
|
||||
:editable="false"
|
||||
placeholder="请选择开始时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="closeData" class="search-item">
|
||||
<el-date-picker
|
||||
class="winput"
|
||||
v-model="dynamic.closeData"
|
||||
type="date"
|
||||
:editable="false"
|
||||
placeholder="请选择结束时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item class="wbtn">
|
||||
<el-button
|
||||
type="primary"
|
||||
round
|
||||
size="small"
|
||||
@click="querySearchWords"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button round size="small" @click="empty">清空</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="query-dynamic-information-right">
|
||||
<div class="result">{{ result }}</div>
|
||||
<has-no-data
|
||||
pClass="substance"
|
||||
:tips="substanceTips"
|
||||
v-if="substance.length === 0"
|
||||
>
|
||||
</has-no-data>
|
||||
<!-- 相关动态 -->
|
||||
<div class="substance" v-else>
|
||||
<div
|
||||
v-for="(sub, index) in substance"
|
||||
:key="index"
|
||||
@click="informationDetails(sub)"
|
||||
>
|
||||
<div class="substance-title">
|
||||
<i v-show="isNew(sub.pubTime)" class="newI">new</i>
|
||||
<i class="el-icon-document-copy" />
|
||||
<span :title="sub.title">{{ sub.title }}</span>
|
||||
</div>
|
||||
<div class="substance-date">
|
||||
<!-- <p>{{ sub.contentTxt }}</p>
|
||||
<span v-if="sub.pubTime != null && sub.pubTime !== ''">{{
|
||||
$dateFormat(new Date(sub.pubTime), "yyyy-MM-dd")
|
||||
}}</span> -->
|
||||
<span class="time">{{ getDate(sub.pubTime) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<loading :loading="loading">正在查找相关动态...</loading>
|
||||
</div>
|
||||
<pagination
|
||||
:total="total"
|
||||
@pageChange="pageChange"
|
||||
@pageSizeChange="pageSizeChange"
|
||||
></pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'DynamicInformationMore',
|
||||
data () {
|
||||
return {
|
||||
// 头部搜索框
|
||||
dynamic: {
|
||||
keyWord: '',
|
||||
openData: '',
|
||||
closeData: ''
|
||||
},
|
||||
result: '全部资料',
|
||||
value11: '',
|
||||
substance: [],
|
||||
page: 1, // 当前页数
|
||||
total: 0, // 总条数
|
||||
loading: false,
|
||||
queryFlag: false, // 是否查找
|
||||
searchFlag: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
moreClick () {
|
||||
|
||||
},
|
||||
// new
|
||||
isNew (pubTime) {
|
||||
if (pubTime != null && pubTime !== '' && pubTime !== undefined) {
|
||||
pubTime = pubTime.replace(new RegExp(/-/gm), '/')
|
||||
return (
|
||||
new Date().getTime() - new Date(pubTime).getTime() <
|
||||
7 * 24 * 3600 * 1000
|
||||
)
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @description: 日期转换
|
||||
* @author: chenxiaoxi
|
||||
* @date: 2018/11/01 10:20:12
|
||||
*/
|
||||
dateFormat (date) {
|
||||
let year = new Date(date).getFullYear()
|
||||
let month = new Date(date).getMonth() + 1
|
||||
let day = new Date(date).getDate()
|
||||
return (
|
||||
year +
|
||||
'-' +
|
||||
(month < 10 ? '0' + month : month) +
|
||||
'-' +
|
||||
(day < 10 ? '0' + day : day)
|
||||
)
|
||||
},
|
||||
getDate (date) {
|
||||
return date !== undefined && date != null ? date.split(' ')[0] : ''
|
||||
},
|
||||
queryKeyWords () {
|
||||
// let search = JSON.stringify(this.dynamic)
|
||||
let obj = {}
|
||||
obj.keyWord = this.dynamic.keyWord
|
||||
obj.openData = this.dynamic.openData
|
||||
? this.dateFormat(this.dynamic.openData, 'yyyy-MM-dd')
|
||||
: ''
|
||||
obj.closeData = this.dynamic.closeData
|
||||
? this.dateFormat(this.dynamic.closeData, 'yyyy-MM-dd')
|
||||
: ''
|
||||
let search = JSON.stringify(obj)
|
||||
this.$store.commit('setDynamicSearchHistory', search)
|
||||
this.queryFlag = true
|
||||
this.$http.get(
|
||||
'lawss/msgDynamicInfo/page',
|
||||
{
|
||||
pubTime1: this.dynamic.openData
|
||||
? this.dateFormat(this.dynamic.openData, 'yyyy-MM-dd')
|
||||
: '',
|
||||
pubTime2: this.dynamic.closeData
|
||||
? this.dateFormat(this.dynamic.closeData, 'yyyy-MM-dd')
|
||||
: '',
|
||||
title: this.dynamic.keyWord,
|
||||
page: this.page,
|
||||
pageSize: this.$store.getters.userInfo.configContent
|
||||
},
|
||||
{
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
},
|
||||
(res) => {
|
||||
this.substance = res.data.list
|
||||
this.total = res.data.count
|
||||
},
|
||||
(e) => {}
|
||||
)
|
||||
},
|
||||
// 查询
|
||||
querySearchWords () {
|
||||
// this.page = 1
|
||||
this.result = '搜索结果 '
|
||||
this.queryKeyWords()
|
||||
},
|
||||
// 清空
|
||||
empty () {
|
||||
this.dynamic.keyWord = ''
|
||||
this.dynamic.openData = ''
|
||||
this.dynamic.closeData = ''
|
||||
this.result = '最近资料'
|
||||
this.queryKeyWords()
|
||||
},
|
||||
/**
|
||||
* @description:条件查找动态
|
||||
* @author: zhaochunfeng
|
||||
* @date: 2018/10/29 11:09:25
|
||||
*/
|
||||
// 页码改变的回调
|
||||
pageChange (page) {
|
||||
this.page = page
|
||||
this.querySearchWords()
|
||||
},
|
||||
// 每页跳数改变回调
|
||||
pageSizeChange () {
|
||||
this.querySearchWords()
|
||||
},
|
||||
// 查看详情
|
||||
informationDetails (information) {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
const route = this.$router.resolve({
|
||||
name: 'DynamicInfomationDetails2',
|
||||
query: {
|
||||
id: information.id,
|
||||
pageType: information.msgType + '_MSG'
|
||||
}
|
||||
})
|
||||
// console.log(route)
|
||||
window.open(route.href, '_blank')
|
||||
},
|
||||
// 返回
|
||||
back () {
|
||||
this.$router.push('/dynamicInformation')
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
props: {},
|
||||
computed: {
|
||||
...mapGetters(['getRoleModule']),
|
||||
// 查找提示
|
||||
substanceTips () {
|
||||
return this.queryFlag === true ? '未找到相关动态' : '请输入您的查找条件'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
deep: true,
|
||||
handler (val) {
|
||||
this.queryFlag = false
|
||||
}
|
||||
},
|
||||
loading (val) {
|
||||
if (val) {
|
||||
$('.substance').css('overflow-y', 'hidden')
|
||||
} else {
|
||||
$('.substance').css('overflow-y', 'auto')
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.dynamic.keyWord = this.$route.query.keywords
|
||||
this.dynamic.openData = this.$route.query.startTime
|
||||
this.dynamic.closeData = this.$route.query.endTime
|
||||
// 如果有一个条件不为空,则进行查找
|
||||
this.queryKeyWords()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
@import "~@/assets/styles/style";
|
||||
@import "~@/assets/styles/mixins";
|
||||
#queryDynamicInformation {
|
||||
.flex();
|
||||
padding: 15px;
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
overflow-y: auto;
|
||||
.query-dynamic-information-left {
|
||||
.flex();
|
||||
justify-content: center;
|
||||
margin-right: 10px;
|
||||
width: 280px;
|
||||
.dynamic-search {
|
||||
width: 280px;
|
||||
.dynamic-search-header {
|
||||
.flex();
|
||||
padding-bottom: 5px;
|
||||
h5 {
|
||||
flex: 1;
|
||||
padding-left: 5px;
|
||||
}
|
||||
}
|
||||
.dynamic-search-line {
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
background: @boxBgColor;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.dynamic-search-center {
|
||||
.search-btn {
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.winput {
|
||||
/deep/.el-input__inner {
|
||||
width: 250px;
|
||||
}
|
||||
}
|
||||
.wbtn {
|
||||
/deep/.el-button--small {
|
||||
width: 122px;
|
||||
}
|
||||
}
|
||||
/deep/.el-input {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.query-dynamic-information-right {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 5px;
|
||||
overflow-x: auto;
|
||||
.substance {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: calc(~"100% - 81px");
|
||||
padding: 10px;
|
||||
font-size: 16px;
|
||||
overflow-y: auto;
|
||||
& > div {
|
||||
.flex();
|
||||
justify-content: space-between;
|
||||
.substance-title {
|
||||
display: flex;
|
||||
padding: 10px 5px;
|
||||
max-width: 80%;
|
||||
& > span {
|
||||
display: inline-block;
|
||||
margin-left: 3px;
|
||||
width: 100%;
|
||||
.ellipsis();
|
||||
}
|
||||
}
|
||||
.substance-title:hover {
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
color: @baseColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.result {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
color: #3d3d3d;
|
||||
}
|
||||
.newI {
|
||||
font-style: italic;
|
||||
color: #e4393c;
|
||||
font-weight: bold;
|
||||
margin-right: 5px;
|
||||
}
|
||||
</style>
|
||||
+403
@@ -0,0 +1,403 @@
|
||||
<!-- 标准法规库 - 动态&资料 - 动态信息详情页 -->
|
||||
<template>
|
||||
<div id="dynamicInformationDetails" class="v-class">
|
||||
<!--<h2 class="head">{{ information.title }}</h2>-->
|
||||
<div class="contentTitle">
|
||||
<div class="back" title="返回" @click="back">
|
||||
<i class="el-icon-back"></i>
|
||||
</div>
|
||||
<div class="title" :title="information.title">{{information.title}}</div>
|
||||
</div>
|
||||
<div class="contentOrigin">
|
||||
<span class="spanRight">发布时间:{{ getDate(information.pubTime) }}</span>
|
||||
<span class="spanCenter" >发布机构:{{ information.pubOrg }}</span>
|
||||
<span>浏览数:{{ countCookie }}</span>
|
||||
<span>
|
||||
<i class="el-icon-star-off" v-show="collectBtn" @click="collectLawsInfo()" style="margin-right:5px; cursor: pointer"></i>
|
||||
<i class="el-icon-star-on" v-show="cancelCollectBtn" @click="cancelCollectLawsInfo()" style="margin-right:5px;cursor: pointer"></i>
|
||||
<i class="el-icon-paperclip" style="cursor: pointer" @click="shareStandard()"></i>
|
||||
</span>
|
||||
</div>
|
||||
<loading :loading="loading">页面加载中...</loading>
|
||||
<div class="msgContent" v-html="information.content"></div>
|
||||
<div class="fileContent" v-if="fileList.length > 0">
|
||||
<div class="fileContent" v-for="(item, index) in fileList" :key="index">
|
||||
<span>附件{{ index+1 }}:</span>
|
||||
<a @click="downloadFile(item.attId)">{{ item.originFileName }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="linkContent">
|
||||
<div v-if="linkUri != null && linkUri !== ''">
|
||||
<span>相关链接:</span>
|
||||
<a @click="openLinkUrl(linkUri)">{{ linkUri }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog title="请选择要分享的人" :visible.sync="shareStandardModal" :show-close="false" width="360">
|
||||
<!--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>
|
||||
<div slot="footer">
|
||||
<el-button size="mini" @click="shareStandardModal=false">取消</el-button>
|
||||
<el-button type="primary" size="mini" @click="shareStandardBt">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-drawer
|
||||
title="分享动态信息"
|
||||
:visible.sync="drawerModal"
|
||||
size="300px"
|
||||
@close="cancelShareLaws"
|
||||
>
|
||||
<dept-tree
|
||||
treeDivId="drawerModalTree"
|
||||
ref="drawerModalTree"
|
||||
@treeClick="selcetShareLawsTree"
|
||||
allDept
|
||||
showUser
|
||||
:editable="false"
|
||||
style="padding: 0 15px">
|
||||
</dept-tree>
|
||||
<div class="demo-drawer-footer">
|
||||
<el-button size="mini" @click="cancelShareLaws">取消</el-button>
|
||||
<el-button type="primary" size="mini" @click="shareStandardBt">确定</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DynamicInformationDetails',
|
||||
data () {
|
||||
return {
|
||||
// 动态详情
|
||||
information: {
|
||||
title: '',
|
||||
pubUserName: '',
|
||||
pubOrg: '',
|
||||
pubTime: '',
|
||||
content: ''
|
||||
},
|
||||
linkUri: '',
|
||||
uploadPath: 'uploadPath',
|
||||
resPk: '',
|
||||
fileList: [],
|
||||
picList: [],
|
||||
shareUserInfoList: [],
|
||||
shareStandardSelect: [],
|
||||
collectBtn: false,
|
||||
cancelCollectBtn: false,
|
||||
shareStandardModal: false,
|
||||
personCollect: {
|
||||
collectResId: '',
|
||||
collectTitle: '',
|
||||
collectType: ''
|
||||
},
|
||||
personCookieEO: {
|
||||
cookieType: '',
|
||||
resTitle: '',
|
||||
resId: ''
|
||||
},
|
||||
// 消息推送保存对象
|
||||
personShareEO: {
|
||||
id: '',
|
||||
recipientId: '',
|
||||
shareUserId: '',
|
||||
resType: '',
|
||||
resId: '',
|
||||
resUri: '',
|
||||
resTitle: '',
|
||||
readFlag: '',
|
||||
validFlag: '',
|
||||
modifyTime: '',
|
||||
creationTime: ''
|
||||
},
|
||||
countCookie: 0,
|
||||
msgDetails: {},
|
||||
drawerModal: false,
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 返回
|
||||
back () {
|
||||
if (this.$store.state.detailMap !== '') {
|
||||
if (this.$store.state.detailMap === '/queryDynamicInformation') {
|
||||
this.$router.push({
|
||||
path: this.$store.state.detailMap,
|
||||
query: {
|
||||
keywords: this.$store.getters.getDynamicHistory.keyWord,
|
||||
startTime: this.$store.getters.getDynamicHistory.openData,
|
||||
endTime: this.$store.getters.getDynamicHistory.closeData
|
||||
}
|
||||
})
|
||||
this.$store.commit('setDetailMap', '')
|
||||
} else {
|
||||
this.$router.push(this.$store.state.detailMap)
|
||||
this.$store.commit('setDetailMap', '')
|
||||
}
|
||||
}
|
||||
},
|
||||
queryMsgDetailsById () {
|
||||
let id = this.$route.params.id
|
||||
this.$http.get('lawss/msgDynamicInfo/selectByMsgId', {
|
||||
id: id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.information.title = res.data.title
|
||||
this.information.pubTime = res.data.pubTime
|
||||
this.information.pubUserName = res.data.pubUserName
|
||||
this.information.pubOrg = res.data.pubOrg
|
||||
this.information.content = res.data.content
|
||||
this.linkUri = res.data.linkUri
|
||||
if (res.data.getFileList != null) {
|
||||
this.fileList = res.data.getFileList
|
||||
}
|
||||
if (res.data.getPicList != null) {
|
||||
this.picList = res.data.getPicList
|
||||
}
|
||||
if (res.data.collectId != null && res.data.collectId !== '') {
|
||||
this.collectBtn = false
|
||||
this.cancelCollectBtn = true
|
||||
} else {
|
||||
this.collectBtn = true
|
||||
this.cancelCollectBtn = false
|
||||
}
|
||||
// 设置浏览次数
|
||||
this.countPageCookie().then(count => {
|
||||
this.countCookie = count
|
||||
this.msgDetails = res.data
|
||||
this.addPersonCookie()
|
||||
}, e => {
|
||||
})
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
openLinkUrl (linkUri) {
|
||||
let getHttp = linkUri.substring(0, 7)
|
||||
let getHttps = linkUri.substring(0, 8)
|
||||
if (getHttp === 'http://' || getHttps === 'https://') {
|
||||
window.open(linkUri)
|
||||
} else {
|
||||
window.open('https://' + linkUri)
|
||||
}
|
||||
},
|
||||
// 时间截取
|
||||
getDate (date) {
|
||||
return date !== undefined && date != null ? date.split(' ')[0] : ''
|
||||
},
|
||||
downloadFile (attId) {
|
||||
if (attId != null && attId !== '') {
|
||||
window.location.href = '/api/att/attFile/downloadFile?fileId=' + attId
|
||||
} else {
|
||||
this.$message.error('请选择要下载的文件')
|
||||
}
|
||||
},
|
||||
// 新增浏览记录
|
||||
addPersonCookie () {
|
||||
this.personCookieEO.cookieType = this.$route.params.pageType
|
||||
this.personCookieEO.resTitle = this.information.title
|
||||
this.personCookieEO.resId = this.$route.params.id
|
||||
this.$http.postData('person/personCookies/create', this.personCookieEO, {
|
||||
_this: this
|
||||
}, res => {}, e => {
|
||||
})
|
||||
},
|
||||
// 统计浏览总数
|
||||
countPageCookie () {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$http.get('person/personCookies/countPageCookie', {
|
||||
resId: this.$route.params.id
|
||||
}, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
resolve(res.data)
|
||||
}, e => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 收藏动态信息
|
||||
collectLawsInfo () {
|
||||
this.personCollect.collectResId = this.msgDetails.id
|
||||
this.personCollect.collectTitle = this.msgDetails.title
|
||||
if (this.msgDetails.msgType === 'INLAND') {
|
||||
this.personCollect.collectType = 'INLAND_MSG'
|
||||
} else if (this.msgDetails.msgType === 'FOREIGN') {
|
||||
this.personCollect.collectType = 'FOREIGN_MSG'
|
||||
} else {
|
||||
this.personCollect.collectType = 'RESOURCE_MSG'
|
||||
}
|
||||
this.$http.postData('person/personCollect', this.personCollect, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.collectBtn = false
|
||||
this.cancelCollectBtn = true
|
||||
this.msgDetails.collectId = res.data.id
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 取消收藏
|
||||
cancelCollectLawsInfo () {
|
||||
this.$http.put('person/personCollect/updateByUserId', {
|
||||
id: this.msgDetails.collectId
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.collectBtn = true
|
||||
this.cancelCollectBtn = false
|
||||
this.msgDetails.collectId = ''
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 转发
|
||||
cancelShareLaws () {
|
||||
this.drawerModal = false
|
||||
this.$refs.drawerModalTree.treeReload()
|
||||
},
|
||||
// 树点击
|
||||
selcetShareLawsTree (treeId, treeNode) {
|
||||
this.shareStandardSelect = treeNode.id
|
||||
},
|
||||
// 点击分享图标
|
||||
shareStandard (item) {
|
||||
this.resPk = item
|
||||
this.drawerModal = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.drawerModalTree.clearSearch()
|
||||
})
|
||||
this.shareStandardSelect = ''
|
||||
},
|
||||
shareStandardBt () {
|
||||
this.personShareEO.resType = this.$route.params.pageType
|
||||
this.personShareEO.resTitle = this.information.title
|
||||
this.personShareEO.resId = this.$route.params.id
|
||||
this.personShareEO.recipientId = this.shareStandardSelect
|
||||
if (this.personShareEO.recipientId == null || this.personShareEO.recipientId === '') {
|
||||
this.$message.error('请选择要分享的人!')
|
||||
} else {
|
||||
this.$http.post('/person/personShare/savePersonShare', this.personShareEO, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.drawerModal = false
|
||||
this.$message.success('消息推送成功!')
|
||||
this.$refs.drawerModalTree.treeReload()
|
||||
}, e => {
|
||||
this.$message.error('消息推送失败!')
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
},
|
||||
props: {},
|
||||
computed: {},
|
||||
watch: {},
|
||||
mounted () {
|
||||
// this.information = JSON.parse(this.$route.params.information)
|
||||
this.queryMsgDetailsById()
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import '~@/assets/styles/style';
|
||||
@import '~@/assets/styles/mixins';
|
||||
#dynamicInformationDetails{
|
||||
padding: 15px;
|
||||
height: 100%;
|
||||
font-size: 16px;
|
||||
background: #ffffff;
|
||||
overflow-y: auto !important;
|
||||
.contentTitle{
|
||||
.flex();
|
||||
align-items: center;
|
||||
.title{
|
||||
width: calc(~'100% - 50px');
|
||||
font-weight: bold;
|
||||
font-size: 25px;
|
||||
text-align: center;
|
||||
padding: 0 20px;
|
||||
.ellipsis();
|
||||
}
|
||||
}
|
||||
.spanLeft,.spanRight,.spanCenter{
|
||||
display: inline-block;
|
||||
}
|
||||
.spanLeft{
|
||||
float: left;
|
||||
span{
|
||||
display: inline-block;
|
||||
margin-top: 10px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
font-weight: bold;
|
||||
&:hover{
|
||||
color: @baseColor;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.spanCenter{
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
margin-left: 81px;
|
||||
}
|
||||
.spanRight{
|
||||
span{
|
||||
display: inline-block;
|
||||
margin-top: 10px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.msgContent{
|
||||
margin-bottom: 20px;
|
||||
font-size: 16px;
|
||||
padding: 10px;
|
||||
img{
|
||||
max-width: calc(~'100% - 4em') !important;
|
||||
}
|
||||
p{
|
||||
padding: 0 5px !important;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
padding: 0 20px;
|
||||
}
|
||||
}
|
||||
.contentOrigin{
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
padding: 0 50px;
|
||||
margin: 20px 0;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
background-color: #d8f1ff;
|
||||
}
|
||||
.divSpanCenter{
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
background-color: #d8f1ff;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
/*hr{*/
|
||||
/*clear: both;*/
|
||||
/*background-color: #5596CC;*/
|
||||
/*height: 3px;*/
|
||||
/*}*/
|
||||
/*div{*/
|
||||
/*.spanTop{*/
|
||||
/*margin-top: 50px;*/
|
||||
/*}*/
|
||||
/*}*/
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,347 @@
|
||||
<!-- 标准法规库 - 动态&资料 -->
|
||||
<template>
|
||||
<div id="queryDynamicInformation" class="v-class">
|
||||
<div class="query-dynamic-information-left">
|
||||
<div class="dynamic-search">
|
||||
<div class="dynamic-search-header">
|
||||
<h5>资料中心搜索</h5>
|
||||
</div>
|
||||
<div class="dynamic-search-line"></div>
|
||||
<div class="dynamic-search-center search-area">
|
||||
<el-form
|
||||
ref="dynamic"
|
||||
:modal="dynamic"
|
||||
class=""
|
||||
label-width="100px"
|
||||
inline
|
||||
>
|
||||
<el-form-item label="" prop="keyWord" class="search-item">
|
||||
<el-input
|
||||
class="winput"
|
||||
v-model="dynamic.keyWord"
|
||||
clearable
|
||||
placeholder="请输入查找关键字"
|
||||
:maxlength="100"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="openData" class="search-item">
|
||||
<el-date-picker
|
||||
class="winput"
|
||||
v-model="dynamic.openData"
|
||||
type="date"
|
||||
:editable="false"
|
||||
placeholder="请选择开始时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="closeData" class="search-item">
|
||||
<el-date-picker
|
||||
class="winput"
|
||||
v-model="dynamic.closeData"
|
||||
type="date"
|
||||
:editable="false"
|
||||
placeholder="请选择结束开始"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-row class="wbtn">
|
||||
<el-button
|
||||
type="primary"
|
||||
round
|
||||
size="small"
|
||||
@click="querySearchWords"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button round size="small">清空</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="query-dynamic-information-right">
|
||||
<h3>最近资料</h3>
|
||||
<has-no-data
|
||||
pClass="substance"
|
||||
:tips="substanceTips"
|
||||
v-if="substance.length === 0"
|
||||
>
|
||||
</has-no-data>
|
||||
<!-- 相关动态 -->
|
||||
<div class="substance" v-else>
|
||||
<div
|
||||
v-for="(sub, index) in substance"
|
||||
:key="index"
|
||||
@click="informationDetails(sub)"
|
||||
>
|
||||
<div class="substance-title">
|
||||
<i class="el-icon-document-copy" />
|
||||
<span :title="sub.title">{{ sub.title }}</span>
|
||||
</div>
|
||||
<div class="substance-date">
|
||||
<p>{{ sub.contentTxt }}</p>
|
||||
<span v-if="sub.pubTime != null && sub.pubTime !== ''">{{
|
||||
$dateFormat(new Date(sub.pubTime), "yyyy-MM-dd")
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<loading :loading="loading">正在查找相关动态...</loading>
|
||||
</div>
|
||||
<pagination
|
||||
:total="total"
|
||||
@pageChange="pageChange"
|
||||
@pageSizeChange="pageSizeChange"
|
||||
></pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
export default {
|
||||
name: "DynamicInformation",
|
||||
data() {
|
||||
return {
|
||||
// 头部搜索框
|
||||
dynamic: {
|
||||
keyWord: "",
|
||||
openData: "",
|
||||
closeData: "",
|
||||
},
|
||||
value11: "",
|
||||
substance: [],
|
||||
page: 1, // 当前页数
|
||||
total: 0, // 总条数
|
||||
loading: false,
|
||||
queryFlag: false, // 是否查找
|
||||
searchFlag: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* @description: 日期转换
|
||||
* @author: chenxiaoxi
|
||||
* @date: 2018/11/01 10:20:12
|
||||
*/
|
||||
dateFormat(date) {
|
||||
let year = new Date(date).getFullYear();
|
||||
let month = new Date(date).getMonth() + 1;
|
||||
let day = new Date(date).getDate();
|
||||
return (
|
||||
year +
|
||||
"-" +
|
||||
(month < 10 ? "0" + month : month) +
|
||||
"-" +
|
||||
(day < 10 ? "0" + day : day)
|
||||
);
|
||||
},
|
||||
getDate(date) {
|
||||
return date !== undefined && date != null ? date.split(" ")[0] : "";
|
||||
},
|
||||
queryKeyWords() {
|
||||
// let search = JSON.stringify(this.dynamic)
|
||||
let obj = {};
|
||||
obj.keyWord = this.dynamic.keyWord;
|
||||
obj.openData = this.dynamic.openData
|
||||
? this.dateFormat(this.dynamic.openData, "yyyy-MM-dd")
|
||||
: "";
|
||||
obj.closeData = this.dynamic.closeData
|
||||
? this.dateFormat(this.dynamic.closeData, "yyyy-MM-dd")
|
||||
: "";
|
||||
let search = JSON.stringify(obj);
|
||||
this.$store.commit("setDynamicSearchHistory", search);
|
||||
this.queryFlag = true;
|
||||
this.$http.get(
|
||||
"lawss/msgDynamicInfo/page",
|
||||
{
|
||||
pubTime1: this.dynamic.openData
|
||||
? this.dateFormat(this.dynamic.openData, "yyyy-MM-dd")
|
||||
: "",
|
||||
pubTime2: this.dynamic.closeData
|
||||
? this.dateFormat(this.dynamic.closeData, "yyyy-MM-dd")
|
||||
: "",
|
||||
title: this.dynamic.keyWord,
|
||||
page: this.page,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
},
|
||||
{
|
||||
_this: this,
|
||||
loading: "loading",
|
||||
},
|
||||
(res) => {
|
||||
this.substance = res.data.list;
|
||||
this.total = res.data.count;
|
||||
},
|
||||
(e) => {}
|
||||
);
|
||||
},
|
||||
// 查询
|
||||
querySearchWords() {
|
||||
// this.page = 1
|
||||
this.queryKeyWords();
|
||||
},
|
||||
/**
|
||||
* @description:条件查找动态
|
||||
* @author: zhaochunfeng
|
||||
* @date: 2018/10/29 11:09:25
|
||||
*/
|
||||
// 页码改变的回调
|
||||
pageChange(page) {
|
||||
this.page = page;
|
||||
this.querySearchWords();
|
||||
},
|
||||
// 每页跳数改变回调
|
||||
pageSizeChange() {
|
||||
this.querySearchWords();
|
||||
},
|
||||
// 查看详情
|
||||
informationDetails(information) {
|
||||
this.$store.commit("setDetailMap", this.$route.path);
|
||||
const route = this.$router.resolve({
|
||||
name: "DynamicInfomationDetails2",
|
||||
query: {
|
||||
id: information.id,
|
||||
pageType: information.msgType + "_MSG",
|
||||
},
|
||||
});
|
||||
// console.log(route)
|
||||
window.open(route.href, "_blank");
|
||||
},
|
||||
// 返回
|
||||
back() {
|
||||
this.$router.push("/dynamicInformation");
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
props: {},
|
||||
computed: {
|
||||
...mapGetters(["getRoleModule"]),
|
||||
// 查找提示
|
||||
substanceTips() {
|
||||
return this.queryFlag === true ? "未找到相关动态" : "请输入您的查找条件";
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
deep: true,
|
||||
handler(val) {
|
||||
this.queryFlag = false;
|
||||
},
|
||||
},
|
||||
loading(val) {
|
||||
if (val) {
|
||||
$(".substance").css("overflow-y", "hidden");
|
||||
} else {
|
||||
$(".substance").css("overflow-y", "auto");
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.dynamic.keyWord = this.$route.query.keywords;
|
||||
this.dynamic.openData = this.$route.query.startTime;
|
||||
this.dynamic.closeData = this.$route.query.endTime;
|
||||
// 如果有一个条件不为空,则进行查找
|
||||
this.queryKeyWords();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
@import "~@/assets/styles/style";
|
||||
@import "~@/assets/styles/mixins";
|
||||
#queryDynamicInformation {
|
||||
.flex();
|
||||
padding: 15px;
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
overflow-y: auto;
|
||||
.query-dynamic-information-left {
|
||||
.flex();
|
||||
justify-content: center;
|
||||
margin-right: 10px;
|
||||
width: 280px;
|
||||
.dynamic-search {
|
||||
width: 280px;
|
||||
.dynamic-search-header {
|
||||
.flex();
|
||||
padding-bottom: 5px;
|
||||
h5 {
|
||||
flex: 1;
|
||||
padding-left: 5px;
|
||||
}
|
||||
}
|
||||
.dynamic-search-line {
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
background: @boxBgColor;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.dynamic-search-center {
|
||||
.search-btn {
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.winput {
|
||||
/deep/.el-input__inner {
|
||||
width: 250px;
|
||||
}
|
||||
}
|
||||
.wbtn {
|
||||
/deep/.el-button--small{
|
||||
width: 120px;
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.query-dynamic-information-right {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 5px;
|
||||
overflow-x: auto;
|
||||
.substance {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: calc(~"100% - 57px");
|
||||
padding: 10px;
|
||||
font-size: 16px;
|
||||
overflow-y: auto;
|
||||
& > div {
|
||||
.flex();
|
||||
justify-content: space-between;
|
||||
.substance-title {
|
||||
display: flex;
|
||||
padding: 10px 5px;
|
||||
max-width: 80%;
|
||||
& > span {
|
||||
display: inline-block;
|
||||
margin-left: 3px;
|
||||
width: 100%;
|
||||
.ellipsis();
|
||||
}
|
||||
}
|
||||
.substance-title:hover {
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
color: @baseColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
h3 {
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
color: #3d3d3d;
|
||||
}
|
||||
</style>
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
<!-- 标准法规库 - 动态&资料 - 国内动态更多 -->
|
||||
<template>
|
||||
<div id="domesticDynamics" class="v-class">
|
||||
<table-tools-bar>
|
||||
<div slot="left">
|
||||
<div class="back" title="返回" @click="back">
|
||||
<i class="el-icon-back"></i>
|
||||
</div>
|
||||
<span style="font-size: 18px;font-weight: bold">资料中心</span>
|
||||
</div>
|
||||
<div slot="right">
|
||||
<el-form :model="dynamics" inline class="label-input-form">
|
||||
<el-form-item label="资料中心搜索" prop="dynamicsName" class="serch-form-item">
|
||||
<el-input v-model="dynamics.dynamicsName" clearable placeholder="请输入搜索内容"/>
|
||||
</el-form-item>
|
||||
<el-form-item class="serch-form-item">
|
||||
<el-button
|
||||
class="searchAngNewBtn"
|
||||
type="primary"
|
||||
@click="queryMsgByPageBtn"
|
||||
icon="el-icon-search"
|
||||
title="搜索"
|
||||
></el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</table-tools-bar>
|
||||
<div class="content">
|
||||
<div class="dynamicsContent-container" v-if="inlandMsgList.length > 0">
|
||||
<div v-for="(item, index) in inlandMsgList" :key="index" @click="showMsgDetails(item.id)">
|
||||
<ul>
|
||||
<li class="title">
|
||||
<div v-show="isNew(item.pubTime)" class="new">new</div>
|
||||
<i class="el-icon-caret-right" />
|
||||
<span class="domestic-dynamic-title">{{ item.title }}</span>
|
||||
<span class="time">{{ getDate(item.pubTime) }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<has-no-data pClass="content-detail" v-if="inlandMsgList.length === 0"></has-no-data>
|
||||
</div>
|
||||
<loading :loading="loading">数据获取中</loading>
|
||||
<pagination :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script src="../js/DomesticDynamics.js"></script>
|
||||
|
||||
<style lang="less">
|
||||
@import '~@/assets/styles/style';
|
||||
@import '~@/assets/styles/mixins';
|
||||
#domesticDynamics{
|
||||
padding: 0.2rem 0.3rem;
|
||||
height: 100%;
|
||||
.content{
|
||||
width: 100%;
|
||||
height: calc(~'100% - 120px');
|
||||
overflow-x: hidden !important;
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
.content .content-detail {
|
||||
width: 100%;
|
||||
height: calc(~'100% - 8px');
|
||||
overflow-y: auto;
|
||||
padding: 0.1rem;
|
||||
background-color: white;
|
||||
}
|
||||
.i{
|
||||
font-style: italic;
|
||||
color: #E4393C;
|
||||
font-weight: bold;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.ivu-form-item{
|
||||
margin-right: 0;
|
||||
}
|
||||
.dynamicsContent-container{
|
||||
height: 100%;
|
||||
font-size: 12px;
|
||||
.title{
|
||||
line-height: 35px;
|
||||
padding-left: 50px;
|
||||
padding-right: 100px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
.flex();
|
||||
i{
|
||||
width: 15px;
|
||||
.flex();
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.domestic-dynamic-title{
|
||||
flex: 1;
|
||||
.ellipsis();
|
||||
&:hover{
|
||||
color:@baseColor;
|
||||
text-decoration:underline;
|
||||
font-weight:bold;
|
||||
}
|
||||
}
|
||||
.time{
|
||||
width: 150px;
|
||||
.flex();
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
.new{
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 20px;
|
||||
color: #FF0000;
|
||||
font-style: italic;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
font-size: 12px;
|
||||
.flex();
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: -10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
<!-- 标准法规库 - 动态&资料 - 实施预警更多-->
|
||||
<template>
|
||||
<div class="implement-warning v-class">
|
||||
<table-tools-bar>
|
||||
<div slot="left">
|
||||
<div class="back" title="返回" @click="back">
|
||||
<i class="el-icon-back"></i>
|
||||
</div>
|
||||
<span style="font-size: 18px;font-weight: bold">实施预警</span>
|
||||
</div>
|
||||
<div slot="right"></div>
|
||||
</table-tools-bar>
|
||||
<div class="content">
|
||||
<div class="standards-drawer-table">
|
||||
<el-divider content-position="left">新车型实施预警</el-divider>
|
||||
<el-table
|
||||
:data="newTypeDatas"
|
||||
min-height="200px"
|
||||
border
|
||||
:height="height"
|
||||
:resizable="false"
|
||||
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
|
||||
>
|
||||
<el-table-column
|
||||
prop="sortName"
|
||||
label="类型"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.sortName === 'BUSINESS_STAND'">企业标准</div>
|
||||
<div v-if="scope.row.sortName === 'FOREIGN_STAND'">海外标准法规</div>
|
||||
<div v-if="scope.row.sortName === 'INLAND_STAND'">国内标准法规</div>
|
||||
<div v-if="scope.row.sortName === 'INLAND_LAWS'">国内政策</div>
|
||||
<div v-if="scope.row.sortName === 'FOREIGN_LAWS'">国外政策</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="standNum"
|
||||
label="编号"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<a @click="showStandDetails(scope.row)">{{ scope.row.standNum }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="standName"
|
||||
label="标准名称"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="putTime"
|
||||
label="新车型实施日期"
|
||||
sortable
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{(scope.row.putTime ? scope.row.putTime.substring(0, 11): '')}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination :total="newTotal" @pageChange="newPageChange" @pageSizeChange="newPageSizeChange"></pagination>
|
||||
</div>
|
||||
<div class="standards-drawer-table">
|
||||
<el-divider content-position="left">在产车实施预警</el-divider>
|
||||
<el-table
|
||||
min-height="200px"
|
||||
:height="height"
|
||||
:data="productionVehicleDatas"
|
||||
border
|
||||
:resizable="false"
|
||||
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
|
||||
>
|
||||
<el-table-column
|
||||
prop="sortName"
|
||||
label="类型"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.sortName === 'BUSINESS_STAND'">企业标准</div>
|
||||
<div v-if="scope.row.sortName === 'FOREIGN_STAND'">海外标准法规</div>
|
||||
<div v-if="scope.row.sortName === 'INLAND_STAND'">国内标准法规</div>
|
||||
<div v-if="scope.row.sortName === 'INLAND_LAWS'">国内政策</div>
|
||||
<div v-if="scope.row.sortName === 'FOREIGN_LAWS'">国外政策</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="standNum"
|
||||
label="编号"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<a @click="showStandDetails(scope.row)">{{ scope.row.standNum }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="standName"
|
||||
label="标准名称"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="putTime"
|
||||
label="在产车实施日期"
|
||||
sortable
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{(scope.row.putTime ? scope.row.putTime.substring(0, 11): '')}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination :total="productTotal" @pageChange="productPageChange"
|
||||
@pageSizeChange="productPageSizeChange"></pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script src="../js/ImplementWarning.js"></script>
|
||||
|
||||
<style lang="less">
|
||||
.implement-warning {
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
.standards-drawer-table {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
padding-bottom: 56px;
|
||||
}
|
||||
.content {
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 10px;
|
||||
height: calc(~'100% - 80px');
|
||||
}
|
||||
.table-tools-bar {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
<!-- 标准法规库 - 动态&资料 - 资料中心更多 -->
|
||||
<template>
|
||||
<div id="informationCenter">
|
||||
<panel-header :tabs="informationList" @activated="showComponent" :active="active" v-if="informationList.length" />
|
||||
<panel-content>
|
||||
<information-notice :id="active" :moduleName="moduleName"/>
|
||||
</panel-content>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import InformationNotice from './pages/informationCenterPages/InformationNotice'
|
||||
export default {
|
||||
name: 'InformationCenter',
|
||||
data () {
|
||||
return {
|
||||
active: '',
|
||||
moduleName: '',
|
||||
informationList: [],
|
||||
num: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectPages () {
|
||||
this.$http.get('lawss/msgModule/selectMsgModuleByRole', {
|
||||
id: this.$store.getters.userInfo.usid
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
let array = []
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
let dd = {}
|
||||
dd.title = res.data[i].moduleName
|
||||
dd.name = res.data[i].id
|
||||
array.push(dd)
|
||||
}
|
||||
this.informationList = array
|
||||
if (this.num === '') {
|
||||
this.active = array[0].name
|
||||
}
|
||||
this.moduleName = array[0].title
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
showComponent (id, title) {
|
||||
this.active = id
|
||||
this.moduleName = title
|
||||
this.$router.push({
|
||||
name: 'InformationCenter',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
},
|
||||
getCookie (name) {
|
||||
// 获取指定名称的cookie值
|
||||
// (^| )name=([^;]*)(;|$),match[0]为与整个正则表达式匹配的字符串,match[i]为正则表达式捕获数组相匹配的数组;
|
||||
let arr = document.cookie.match(new RegExp('(^| )' + name + '=([^;]*)(;|$)'))
|
||||
if (arr != null) {
|
||||
return unescape(arr[2])
|
||||
}
|
||||
return null
|
||||
}
|
||||
},
|
||||
components: {
|
||||
InformationNotice
|
||||
},
|
||||
mounted () {
|
||||
this.selectPages()
|
||||
if (this.$route.params.id) {
|
||||
this.active = this.$route.params.id
|
||||
this.num = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
#informationCenter{
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
<!-- 标准法规库 - 动态&资料 - 国外动态更多-->
|
||||
<template>
|
||||
<div id="internationalDynamics">
|
||||
<table-tools-bar>
|
||||
<div slot="left">
|
||||
<div class="back" title="返回" @click="back">
|
||||
<i class="el-icon-back"></i>
|
||||
</div>
|
||||
<span style="font-size: 18px;font-weight: bold">国外动态</span>
|
||||
</div>
|
||||
<div slot="right">
|
||||
<el-form :model="dynamics" inline class="label-input-form">
|
||||
<el-form-item label="国外动态搜索" prop="internationalName" class="serch-form-item">
|
||||
<el-input v-model="dynamics.internationalName" clearable placeholder="请输入搜索内容"/>
|
||||
</el-form-item>
|
||||
<el-form-item class="serch-form-item">
|
||||
<el-button
|
||||
class="searchAngNewBtn"
|
||||
type="primary"
|
||||
@click="queryMsgByPageBtn"
|
||||
icon="el-icon-search"
|
||||
title="搜索"
|
||||
></el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</table-tools-bar>
|
||||
<div class="content">
|
||||
<div class="dynamicsContent-container" v-if="inlandMsgList.length > 0">
|
||||
<div v-for="(item, index) in inlandMsgList" :key="index" @click="showMsgDetails(item.id)">
|
||||
<ul>
|
||||
<li class="title">
|
||||
<div v-show="isNew(item.pubTime)" class="new">new</div>
|
||||
<i class="el-icon-caret-right" />
|
||||
<span class="international-dynamic-title">{{ item.title }}</span>
|
||||
<span class="time">{{ getDate(item.pubTime) }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<has-no-data pClass="content-detail" v-if="inlandMsgList.length === 0"></has-no-data>
|
||||
</div>
|
||||
<loading :loading="loading">数据获取中</loading>
|
||||
<pagination :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script src="../js/InternationalDynamics.js"></script>
|
||||
|
||||
<style lang="less">
|
||||
@import '~@/assets/styles/style';
|
||||
@import '~@/assets/styles/mixins';
|
||||
#internationalDynamics{
|
||||
padding: 0.2rem 0.3rem;
|
||||
height: 100%;
|
||||
.content{
|
||||
width: 100%;
|
||||
height: calc(100% - 20px);
|
||||
overflow-x:hidden !important;
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
.content .content-detail {
|
||||
width: 100%;
|
||||
height: calc(100% - 8px);
|
||||
overflow-y: auto;
|
||||
padding: 0.1rem;
|
||||
background-color: white;
|
||||
}
|
||||
ul li .time{
|
||||
float: right;
|
||||
|
||||
}
|
||||
ul li.title{
|
||||
line-height: 35px;
|
||||
padding-left: 50px;
|
||||
padding-right: 100px;
|
||||
cursor:pointer;
|
||||
position: relative;
|
||||
}
|
||||
.new{
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 20px;
|
||||
color: #FF0000;
|
||||
font-style: italic;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
font-size: 12px;
|
||||
.flex();
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: -10px;
|
||||
}
|
||||
.i{
|
||||
font-style: italic;
|
||||
color: #E4393C;
|
||||
font-weight: bold;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.ivu-form-item{
|
||||
margin-right: 0;
|
||||
}
|
||||
.dynamicsContent-container{
|
||||
.title{
|
||||
.flex();
|
||||
i{
|
||||
width: 15px;
|
||||
.flex();
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.international-dynamic-title{
|
||||
flex: 1;
|
||||
.ellipsis();
|
||||
&:hover{
|
||||
color:@baseColor;
|
||||
text-decoration:underline;
|
||||
font-weight:bold;
|
||||
}
|
||||
}
|
||||
.time{
|
||||
width: 150px;
|
||||
.flex();
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+248
@@ -0,0 +1,248 @@
|
||||
<!-- 标准法规库 - 动态&资料 - 资料中心更多 - 子组件 -->
|
||||
<template>
|
||||
<div id="informationNotice">
|
||||
<table-tools-bar>
|
||||
<div slot="left">
|
||||
<div class="back" title="返回" @click="back">
|
||||
<i class="el-icon-back"></i>
|
||||
</div>
|
||||
<span style="font-size: 18px;font-weight: bold" :title="moduleName">{{moduleName}}</span>
|
||||
</div>
|
||||
<div slot="right">
|
||||
<el-form :model="informationCenter" inline class="label-input-form" label-width="70px">
|
||||
<el-form-item label="搜索" prop="internationalName" class="serch-form-item">
|
||||
<el-input v-model="informationCenter.informationNotice" clearable placeholder="请输入搜索内容"/>
|
||||
</el-form-item>
|
||||
<el-form-item class="serch-form-item">
|
||||
<el-button
|
||||
class="searchAngNewBtn"
|
||||
type="primary"
|
||||
@click="queryMsgByPageBtn"
|
||||
icon="el-icon-search"
|
||||
title="搜索"
|
||||
></el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</table-tools-bar>
|
||||
<div class="content">
|
||||
<div class="dynamicsContent" v-if="inlandMsgList.length > 0">
|
||||
<div v-for="(item, index) in inlandMsgList" :key="index" @click="showMsgDetails(item.id)">
|
||||
<ul >
|
||||
<li class="title">
|
||||
<i v-show="isNew (item.pubTime)" class="i">new</i>
|
||||
<i class="el-icon-caret-right" />
|
||||
<span class="domestic-dynamic-title" :title="item.title">{{ item.title }}</span>
|
||||
<!-- <div class="time">{{ $dateFormat(new Date(item.pubTime), 'yyyy-MM-dd') }}</div>-->
|
||||
<span class="time">{{ getDate(item.pubTime) }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<has-no-data pClass="content-detail" v-if="inlandMsgList.length === 0"></has-no-data>
|
||||
<loading :loading="loading">数据获取中……</loading>
|
||||
<pagination :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'informationNotice',
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
informationCenter: {
|
||||
informationNotice: ''
|
||||
},
|
||||
MsgDynamicInfoEOPage: {
|
||||
msgType: ''
|
||||
},
|
||||
// 分页
|
||||
total: 0,
|
||||
page: 1,
|
||||
rows: 10,
|
||||
inlandMsgList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* @description: 截取日期
|
||||
* @author: chenxiaoxi
|
||||
* @date: 2018/10/31 09:30:40
|
||||
*/
|
||||
getDate (date) {
|
||||
return date != null ? date.substring(0, date.indexOf(' ')) : ''
|
||||
},
|
||||
isNew (pubTime) {
|
||||
if (pubTime != null && pubTime !== '' && pubTime !== undefined) {
|
||||
pubTime = pubTime.replace(new RegExp(/-/gm), '/')
|
||||
return new Date().getTime() - new Date(pubTime).getTime() < 7 * 24 * 3600 * 1000
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
back () {
|
||||
if (this.$store.state.detailMap !== '') {
|
||||
this.$router.push(this.$store.state.detailMap)
|
||||
this.$store.commit('setDetailMap', '')
|
||||
} else {
|
||||
let lastPathList = this.$store.getters.getLastDetailMap
|
||||
let lastPath = lastPathList[lastPathList.length - 1]
|
||||
this.$router.push(lastPath)
|
||||
lastPathList.pop(1)
|
||||
this.$store.commit('setLastDetailMap', JSON.stringify(lastPathList))
|
||||
}
|
||||
},
|
||||
// 搜索
|
||||
queryMsgByPageBtn () {
|
||||
this.page = 1
|
||||
this.queryMsgByPage()
|
||||
},
|
||||
queryMsgByPage () {
|
||||
this.MsgDynamicInfoEOPage.page = this.page
|
||||
this.MsgDynamicInfoEOPage.pageSize = this.$store.getters.userInfo.configContent
|
||||
this.MsgDynamicInfoEOPage.msgType = 'RESOURCE'
|
||||
this.MsgDynamicInfoEOPage.moduleName = this.id
|
||||
this.MsgDynamicInfoEOPage.title = this.informationCenter.informationNotice
|
||||
// this.MsgDynamicInfoEOPage.rowLimit = 3
|
||||
this.$http.get('lawss/msgDynamicInfo/page', this.MsgDynamicInfoEOPage, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
this.inlandMsgList = res.data.list
|
||||
this.total = res.data.count
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
showMsgDetails (id) {
|
||||
if (this.$store.state.detailMap !== '') {
|
||||
let lastDetailMap = this.$store.getters.getLastDetailMap
|
||||
lastDetailMap.push(this.$store.state.detailMap)
|
||||
this.$store.commit('setLastDetailMap', JSON.stringify(lastDetailMap))
|
||||
}
|
||||
// this.$store.commit('setDetailMap', this.$route.path)
|
||||
let routeUrl = this.$router.resolve({
|
||||
name: 'DynamicInformationDetails',
|
||||
params: {
|
||||
id: id,
|
||||
pageType: 'RESOURCE_MSG'
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
// document.cookie = 'informationType=Infomation_Notice'
|
||||
// this.$store.commit('setDetailMap', this.$route.path)
|
||||
// this.$router.push({
|
||||
// name: 'DomesticDynamicsDetails',
|
||||
// params: {
|
||||
// id: id,
|
||||
// pageType: 'RESOURCE_MSG'
|
||||
// }
|
||||
// })
|
||||
},
|
||||
// 查找、加载表格
|
||||
selectDynamics () {},
|
||||
// 分页
|
||||
pageChange (page) {
|
||||
this.page = page
|
||||
},
|
||||
pageSizeChange (pageSize) {
|
||||
this.rows = pageSize
|
||||
}
|
||||
},
|
||||
props: {
|
||||
id: {
|
||||
type: [String, Number],
|
||||
required: true
|
||||
},
|
||||
moduleName: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
id (val) {
|
||||
this.queryMsgByPage()
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
// this.queryMsgByPage()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import '~@/assets/styles/style';
|
||||
@import '~@/assets/styles/mixins';
|
||||
#informationNotice{
|
||||
padding: 0.2rem 0.3rem;
|
||||
height: 100%;
|
||||
.content{
|
||||
width: 100%;
|
||||
height: calc(~'100% - 120px');
|
||||
overflow-x:hidden !important;
|
||||
overflow-y: auto !important;
|
||||
.dynamicsContent{
|
||||
.new{
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 20px;
|
||||
color: #FF0000;
|
||||
font-style: italic;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
font-size: 12px;
|
||||
.flex();
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: -10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content .content-detail {
|
||||
width: 100%;
|
||||
height: calc(~'100% - 8px');
|
||||
overflow-y: auto;
|
||||
padding: 0.1rem;
|
||||
background-color: white;
|
||||
}
|
||||
ul li .time{
|
||||
float: right;
|
||||
.flex();
|
||||
justify-content: flex-end;
|
||||
}
|
||||
ul li.title{
|
||||
line-height: 35px;
|
||||
padding-left: 50px;
|
||||
padding-right: 100px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
.flex();
|
||||
i{
|
||||
width: 15px;
|
||||
.flex();
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.domestic-dynamic-title{
|
||||
flex: 1;
|
||||
.ellipsis();
|
||||
}
|
||||
}
|
||||
ul li.title:hover{
|
||||
color:@baseColor;
|
||||
text-decoration:underline;
|
||||
font-weight:bold;
|
||||
}
|
||||
.i{
|
||||
font-style: italic;
|
||||
color: #E4393C;
|
||||
font-weight: bold;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.ivu-form-item{
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,105 @@
|
||||
/**
|
||||
* 标准法规库 - 动态&资料 - 国内动态更多 JS文件
|
||||
* */
|
||||
export default {
|
||||
name: 'DomesticDynamics',
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
dynamics: {
|
||||
dynamicsName: ''
|
||||
},
|
||||
MsgDynamicInfoEOPage: {
|
||||
msgType: ''
|
||||
},
|
||||
// 分页
|
||||
total: 0,
|
||||
page: 1,
|
||||
rows: 10,
|
||||
inlandMsgList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 搜索
|
||||
queryMsgByPageBtn () {
|
||||
this.page = 1
|
||||
this.queryMsgByPage()
|
||||
},
|
||||
queryMsgByPage () {
|
||||
this.MsgDynamicInfoEOPage.page = this.page
|
||||
this.MsgDynamicInfoEOPage.pageSize = this.$store.getters.userInfo.configContent
|
||||
this.MsgDynamicInfoEOPage.msgType = 'RESOURCE'
|
||||
this.MsgDynamicInfoEOPage.title = this.dynamics.dynamicsName
|
||||
// this.MsgDynamicInfoEOPage.rowLimit = 3
|
||||
this.$http.get('lawss/msgDynamicInfo/page', this.MsgDynamicInfoEOPage, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
this.inlandMsgList = res.data.list
|
||||
this.total = res.data.count
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 返回
|
||||
back () {
|
||||
if (this.$store.state.detailMap !== '') {
|
||||
this.$router.push(this.$store.state.detailMap)
|
||||
this.$store.commit('setDetailMap', '')
|
||||
} else {
|
||||
let lastPathList = this.$store.getters.getLastDetailMap
|
||||
let lastPath = lastPathList[lastPathList.length - 1]
|
||||
this.$router.push(lastPath)
|
||||
lastPathList.pop(1)
|
||||
this.$store.commit('setLastDetailMap', JSON.stringify(lastPathList))
|
||||
}
|
||||
},
|
||||
showMsgDetails (id) {
|
||||
if (this.$store.state.detailMap !== '') {
|
||||
let lastDetailMap = this.$store.getters.getLastDetailMap
|
||||
lastDetailMap.push(this.$store.state.detailMap)
|
||||
this.$store.commit('setLastDetailMap', JSON.stringify(lastDetailMap))
|
||||
}
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'DynamicInformationDetails',
|
||||
params: {
|
||||
id: id,
|
||||
pageType: 'RESOURCE_MSG'
|
||||
}
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
pageChange (page) {
|
||||
this.page = page
|
||||
this.queryMsgByPage()
|
||||
},
|
||||
pageSizeChange (pageSize) {
|
||||
this.rows = pageSize
|
||||
this.queryMsgByPage()
|
||||
},
|
||||
/**
|
||||
* @description: 截取日期
|
||||
* @author: chenxiaoxi
|
||||
* @date: 2018/10/31 09:30:40
|
||||
*/
|
||||
getDate (date) {
|
||||
return date != null ? date.substring(0, date.indexOf(' ')) : ''
|
||||
},
|
||||
/**
|
||||
* @description: 是否显示最新(7天内发布)
|
||||
* @author: chenxiaoxi
|
||||
* @date: 2018/11/10 13:39:32
|
||||
*/
|
||||
isNew (pubTime) {
|
||||
if (pubTime != null && pubTime !== '' && pubTime !== undefined) {
|
||||
pubTime = pubTime.replace(new RegExp(/-/gm), '/')
|
||||
return new Date().getTime() - new Date(pubTime).getTime() < 7 * 24 * 3600 * 1000
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.queryMsgByPage()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
/**
|
||||
* 标准法规库 - 动态&资料 - 实施预警更多 js
|
||||
*/
|
||||
export default {
|
||||
name: 'ImplementWarning',
|
||||
data () {
|
||||
return {
|
||||
height: null,
|
||||
productionVehicleDatas: [],
|
||||
newTypeDatas: [],
|
||||
newProductionDatas: [],
|
||||
productTotal: 0, // 抽屉分页的总条数
|
||||
newTotal: 0, // 抽屉分页的总条数
|
||||
newProductTotal: 0, // 抽屉分页的总条数
|
||||
productPage: 1,
|
||||
newPage: 1,
|
||||
newProducPage: 1,
|
||||
productPageSize: 10,
|
||||
newPageSize: 10,
|
||||
newProducPageSize: 10
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
queryProductionVehicleByPage () {
|
||||
this.$http.get('lawss/msgSarPutTime/page', {
|
||||
sarPutType: 'ZCCSSRQ',
|
||||
page: this.productPage,
|
||||
pageSize: this.$store.getters.userInfo.configContent
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.productionVehicleDatas = res.data.list
|
||||
this.productTotal = res.data.count
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 返回
|
||||
back () {
|
||||
if (this.$store.state.detailMap !== '') {
|
||||
this.$router.push(this.$store.state.detailMap)
|
||||
this.$store.commit('setDetailMap', '')
|
||||
} else {
|
||||
let lastPathList = this.$store.getters.getLastDetailMap
|
||||
let lastPath = lastPathList[lastPathList.length - 1]
|
||||
this.$router.push(lastPath)
|
||||
lastPathList.pop(1)
|
||||
this.$store.commit('setLastDetailMap', JSON.stringify(lastPathList))
|
||||
}
|
||||
},
|
||||
queryNewTypeByPage () {
|
||||
this.$http.get('lawss/msgSarPutTime/page', {
|
||||
sarPutType: 'XCXSSRQ',
|
||||
page: this.newPage,
|
||||
pageSize: this.$store.getters.userInfo.configContent
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.newTypeDatas = res.data.list
|
||||
this.newTotal = res.data.count
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
queryNewProductionByPage () {
|
||||
this.$http.get('lawss/msgSarPutTime/page', {
|
||||
sarPutType: 'NEWPRODUCT',
|
||||
page: this.newProducPage,
|
||||
pageSize: this.$store.getters.userInfo.configContent
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.newProductionDatas = res.data.list
|
||||
this.newProductTotal = res.data.count
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 抽屉分页页码改变回调
|
||||
productPageChange (page) {
|
||||
this.productPage = page
|
||||
this.queryProductionVehicleByPage()
|
||||
},
|
||||
// 抽屉分页页码改变回调
|
||||
newPageChange (page) {
|
||||
this.newPage = page
|
||||
this.queryNewTypeByPage()
|
||||
},
|
||||
// 抽屉分页页码改变回调
|
||||
newProductPageChange (page) {
|
||||
this.newProducPage = page
|
||||
this.queryNewProductionByPage()
|
||||
},
|
||||
|
||||
productPageSizeChange () {
|
||||
this.productPageSize = this.$store.getters.userInfo.configContent
|
||||
this.queryProductionVehicleByPage()
|
||||
},
|
||||
|
||||
newPageSizeChange () {
|
||||
this.newPageSize = this.$store.getters.userInfo.configContent
|
||||
this.queryNewTypeByPage()
|
||||
},
|
||||
|
||||
newProductPageSizeChange () {
|
||||
this.newProducPageSize = this.$store.getters.userInfo.configContent
|
||||
this.queryNewProductionByPage()
|
||||
},
|
||||
showStandDetails (item) {
|
||||
let getStandId = item.sarId
|
||||
let getStandType = item.sortName
|
||||
this.$http.get('lawss/sarMenu/judgeSarMenuByRole', {
|
||||
sarId: getStandId,
|
||||
sarType: getStandType
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
let pageTpe = ''
|
||||
let id = ''
|
||||
let routename = ''
|
||||
if (getStandType === 'INLAND_STAND' || getStandType === 'FOREIGN_STAND') {
|
||||
if (this.$hasPermission('SSA6WR4HV8')) {
|
||||
pageTpe = getStandType
|
||||
id = getStandId
|
||||
routename = 'OtherStandardDetails'
|
||||
} else {
|
||||
this.$Message.warning('无权访问')
|
||||
}
|
||||
} else if (getStandType === 'INLAND_LAWS' || getStandType === 'FOREIGN_LAWS') {
|
||||
if (this.$hasPermission('A2HDHMEA6W')) {
|
||||
pageTpe = getStandType
|
||||
id = getStandId
|
||||
routename = 'OtherLawsDetails'
|
||||
} else {
|
||||
this.$Message.warning('无权访问')
|
||||
}
|
||||
} else if (getStandType === 'BUSSIONESS_STAND') {
|
||||
if (this.$hasPermission('YJUHC32R7G')) {
|
||||
pageTpe = 'BUSINESS_STAND'
|
||||
id = getStandId
|
||||
routename = 'OtherBussStandardDetails'
|
||||
} else {
|
||||
this.$Message.warning('无权访问')
|
||||
}
|
||||
}
|
||||
if (routename !== '') {
|
||||
let routeUrl = this.$router.resolve({
|
||||
name: routename,
|
||||
params: {
|
||||
id: id,
|
||||
pageType: pageTpe
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
props: {},
|
||||
computed: {},
|
||||
watch: {},
|
||||
mounted () {
|
||||
this.queryNewTypeByPage()
|
||||
this.queryProductionVehicleByPage()
|
||||
// this.queryNewProductionByPage()
|
||||
this.height = $('.content').height() * 0.36
|
||||
window.onresize = () => {
|
||||
this.height = $('.content').height() * 0.36
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* 标准法规库 - 动态&资料 - 国外动态更多 JS文件
|
||||
* */
|
||||
export default {
|
||||
name: 'InternationalDynamics',
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
dynamics: {
|
||||
internationalName: ''
|
||||
},
|
||||
MsgDynamicInfoEOPage: {
|
||||
msgType: ''
|
||||
},
|
||||
// 分页
|
||||
total: 0,
|
||||
page: 1,
|
||||
rows: 10,
|
||||
inlandMsgList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 搜索
|
||||
queryMsgByPageBtn () {
|
||||
this.page = 1
|
||||
this.queryMsgByPage()
|
||||
},
|
||||
queryMsgByPage () {
|
||||
this.MsgDynamicInfoEOPage.page = this.page
|
||||
this.MsgDynamicInfoEOPage.pageSize = this.$store.getters.userInfo.configContent
|
||||
this.MsgDynamicInfoEOPage.msgType = 'FOREIGN'
|
||||
this.MsgDynamicInfoEOPage.title = this.dynamics.internationalName
|
||||
// this.MsgDynamicInfoEOPage.rowLimit = 3
|
||||
this.$http.get('lawss/msgDynamicInfo/page', this.MsgDynamicInfoEOPage, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
this.inlandMsgList = res.data.list
|
||||
this.total = res.data.count
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 返回
|
||||
back () {
|
||||
this.$router.push({
|
||||
path: '/dynamicInformation'
|
||||
})
|
||||
},
|
||||
showMsgDetails (id) {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'DynamicInformationDetails',
|
||||
params: {
|
||||
id: id,
|
||||
pageType: 'FOREIGN_MSG'
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查找、加载表格
|
||||
selectDynamics () {},
|
||||
// 分页
|
||||
pageChange (page) {
|
||||
this.page = page
|
||||
},
|
||||
pageSizeChange (pageSize) {
|
||||
this.rows = pageSize
|
||||
},
|
||||
/**
|
||||
* @description: 截取日期
|
||||
* @author: chenxiaoxi
|
||||
* @date: 2018/10/31 09:30:40
|
||||
*/
|
||||
getDate (date) {
|
||||
return date != null ? date.substring(0, date.indexOf(' ')) : ''
|
||||
},
|
||||
/**
|
||||
* @description: 是否显示最新(7天内发布)
|
||||
* @author: chenxiaoxi
|
||||
* @date: 2018/11/10 13:39:32
|
||||
*/
|
||||
isNew (pubTime) {
|
||||
if (pubTime != null && pubTime !== '' && pubTime !== undefined) {
|
||||
pubTime = pubTime.replace(new RegExp(/-/gm), '/')
|
||||
return new Date().getTime() - new Date(pubTime).getTime() < 7 * 24 * 3600 * 1000
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.queryMsgByPage()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user