code init
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<div class="personal">
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Personal'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.personal{
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,249 @@
|
||||
<!-- 我的动态详情 -->
|
||||
<template>
|
||||
<div id="detailsJump">
|
||||
<div class="content">
|
||||
<div class="contentTitle">
|
||||
<table-tools-bar style="position: relative">
|
||||
<div slot="left" class="content-top-left">
|
||||
<div class="back" title="返回" @click="back">
|
||||
<i class="el-icon-back"></i>
|
||||
</div>
|
||||
<div class="title" :title="title">{{title}}</div>
|
||||
</div>
|
||||
<div slot="right">
|
||||
发布时间:{{ putTime }}
|
||||
</div>
|
||||
</table-tools-bar>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="picContent" v-if="picList.length > 0">
|
||||
<div class="picContent" v-for="(item, index) in fileList" :key="index">
|
||||
<img :src=item.filePath+item.name class="imgStyle">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="msgContent" v-html="content" v-if="this.myContent === null"></div>-->
|
||||
<!-- <div class="msgContent" v-html="content" v-else :class="{'myContent': this.myContent !== null}" @click="contentClick" :title="this.myContent !== null ? '查看流程任务': ''">-->
|
||||
<div class="msgContent" v-html="content" @click="contentClick"></div>
|
||||
</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.oldFileName }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="linkContent">
|
||||
<div v-if="linkUri != null && linkUri !== ''">
|
||||
<span>相关链接:</span>
|
||||
<a :href="linkUri" target="_blank">{{ linkUri }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<loading :loading="loading">数据获取中</loading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'detailsJump',
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
title: '',
|
||||
putTime: '',
|
||||
pubOrgName: '',
|
||||
content: '',
|
||||
myContent: '',
|
||||
linkUri: '',
|
||||
fileList: [],
|
||||
picList: [],
|
||||
collectBtn: false,
|
||||
cancelCollectBtn: false,
|
||||
toPage: false,
|
||||
personCollect: {
|
||||
collectResId: '',
|
||||
collectTitle: ''
|
||||
},
|
||||
personCookieEO: {
|
||||
resTitle: '',
|
||||
resId: ''
|
||||
},
|
||||
countCookie: 0,
|
||||
msgDetails: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
contentClick () {
|
||||
/**
|
||||
*@desc:我的动态中,类型是TEXT的信息,returnAddress不为空,详情页面可以点击进入动态信息模块;反之只能查看详情
|
||||
*@author: zhangRui
|
||||
*@time: 2020/12/29 16:28:06
|
||||
*/
|
||||
if (this.toPage) {
|
||||
if (this.$store.state.detailMap !== '') {
|
||||
let lastDetailMap = this.$store.getters.getLastDetailMap
|
||||
lastDetailMap.push(this.$store.state.detailMap)
|
||||
this.$store.commit('setLastDetailMap', JSON.stringify(lastDetailMap))
|
||||
}
|
||||
console.log('3333')
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'information',
|
||||
params: {
|
||||
// processNumber: this.myContent
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('laji')
|
||||
}
|
||||
|
||||
// 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: 'ProcessDetail',
|
||||
// params: {
|
||||
// processNumber: this.myContent
|
||||
// }
|
||||
// })
|
||||
},
|
||||
// 返回
|
||||
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))
|
||||
}
|
||||
},
|
||||
// 新增浏览记录
|
||||
addPersonCookie () {
|
||||
this.personCookieEO.resTitle = this.title
|
||||
this.personCookieEO.resId = this.$route.params.id
|
||||
this.$http.postData('person/personCookies/create', this.personCookieEO, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.countPageCookie()
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 统计浏览总数
|
||||
countPageCookie () {
|
||||
this.$http.get('person/personCookies/countPageCookie', {
|
||||
resId: this.$route.params.id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.countCookie = res.data
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 加载数据
|
||||
detailsJump () {
|
||||
let id = this.$route.params.id
|
||||
this.$http.get('person/personMsg/selectByInfoId', {
|
||||
id: id
|
||||
}, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
this.title = res.data.msgTitle
|
||||
this.putTime = res.data.modifyTime
|
||||
this.content = res.data.msgContent
|
||||
this.myContent = res.data.processnum
|
||||
if (res.data.collectId != null && res.data.collectId !== '') {
|
||||
this.collectBtn = false
|
||||
this.cancelCollectBtn = true
|
||||
} else {
|
||||
this.collectBtn = true
|
||||
this.cancelCollectBtn = false
|
||||
}
|
||||
this.msgDetails = res.data
|
||||
this.addPersonCookie()
|
||||
}, e => {
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
// if (this.$route.params.toPage) {
|
||||
// this.toPage = true
|
||||
// } else {
|
||||
// this.toPage = false
|
||||
// }
|
||||
this.detailsJump()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import '~@/assets/styles/mixins';
|
||||
@import '~@/assets/styles/style';
|
||||
#detailsJump{
|
||||
.content{
|
||||
height: 100%;
|
||||
padding: 30px;
|
||||
.contentTitle{
|
||||
.content-top-left{
|
||||
.flex();
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
max-width: 60vw;
|
||||
.back{
|
||||
display: inline-block;
|
||||
}
|
||||
.title{
|
||||
width:calc(~'100% - 1rem');
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
font-size: 25px;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
.ellipsis()
|
||||
}
|
||||
}
|
||||
}
|
||||
.contentOrigin{
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
background-color: #d8f1ff;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.picContent{
|
||||
text-align: center;
|
||||
.imgStyle{
|
||||
margin-bottom: 20px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
}
|
||||
.msgContent{
|
||||
margin-bottom: 20px;
|
||||
font-size: 0.5rem;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.myContent{
|
||||
&:hover{
|
||||
cursor: pointer;
|
||||
color: @baseColor;
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
.fileContent{
|
||||
margin-bottom: 20px;
|
||||
font-size: 0.3rem;
|
||||
}
|
||||
.linkContent{
|
||||
font-size: 0.3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,208 @@
|
||||
<!-- 个人板块管理 -->
|
||||
<template>
|
||||
<div class="individual-plate">
|
||||
<div class="container">
|
||||
<div class="wrapper">
|
||||
<el-transfer
|
||||
:data="data"
|
||||
v-model="value"
|
||||
:titles="['可选模块','个人模块']"
|
||||
@change="handleChange"
|
||||
@left-check-change="selectedChange"
|
||||
@right-check-change="selectedChange"
|
||||
filterable>
|
||||
</el-transfer>
|
||||
<div class="btn-group">
|
||||
<!-- <div class="button-wrapper">-->
|
||||
<!-- <el-button type="primary" size="small" class="searchAngNewBtn" @click="reloadMockData(1)">{{$t('m.moveUp')}}</el-button>-->
|
||||
<!-- <el-button type="primary" size="small" class="searchAngNewBtn" @click="reloadMockData(2)" style="margin-left: 0.5rem;">{{$t('m.moveDown')}}</el-button>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="footer">
|
||||
<el-button type="primary" size="small" class="searchAngNewBtn" v-btn-permission="'NQDDVW8JW3EUVAEXZH3F'" @click="savePersonal">保存修改</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'individual-plate',
|
||||
data () {
|
||||
return {
|
||||
// flag = 1 的 已选中数据
|
||||
selected: [],
|
||||
primary: [],
|
||||
numData: [],
|
||||
sourceSelectedKeys: [],
|
||||
// data:Transfer 的数据源
|
||||
data: [],
|
||||
// 初始状态时目标列表
|
||||
value: [],
|
||||
// 显示在右侧框数据的key集合
|
||||
targetKeys: [],
|
||||
// list-style两个穿梭框的自定义样式
|
||||
listStyle: {
|
||||
width: '5rem',
|
||||
height: '8rem'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 右侧列表元素变化时触发
|
||||
handleChange (newTargetKeys, direction, moveKeys) {
|
||||
this.targetKeys = newTargetKeys
|
||||
this.numData = []
|
||||
},
|
||||
selectedChange (sourceSelectedKeys, targetSelectedKeys) {
|
||||
this.numData = sourceSelectedKeys
|
||||
this.sourceSelectedKeys = targetSelectedKeys
|
||||
},
|
||||
renderPersonal (item) {
|
||||
return item.label
|
||||
},
|
||||
// 上移,下移
|
||||
reloadMockData (flag) {
|
||||
if (this.numData.length > 1 || this.numData.length === 0) {
|
||||
this.$message({
|
||||
message: '选择个人板块一条板块进行上移下移操作',
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
// numData : 选中的值
|
||||
let num = this.targetKeys.indexOf(this.numData[0])
|
||||
if (flag === 1) {
|
||||
// 1表示上移
|
||||
if (num > 0) {
|
||||
this.value.splice(num, 1)
|
||||
this.value.splice(num - 1, 0, this.numData[0])
|
||||
}
|
||||
} else {
|
||||
// 2表示下移
|
||||
this.targetKeys.splice(num, 1)
|
||||
this.targetKeys.splice(num + 1, 0, this.numData[0])
|
||||
// targetKeys 变了
|
||||
// this.data = JSON.stringify(this.targetKeys)
|
||||
}
|
||||
}
|
||||
},
|
||||
savePersonal () {
|
||||
if (this.targetKeys.length === 0) {
|
||||
this.$message({
|
||||
message: '请选择个人模块',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$http.post('person/personModuleUser/insertModule',
|
||||
{
|
||||
moduleIds: this.targetKeys
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.$message({
|
||||
message: '保存成功',
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 获取模块
|
||||
selectPersonConf () {
|
||||
this.$http.get('person/personModule/queryByList',
|
||||
{
|
||||
userId: this.$store.getters.userInfo.userId
|
||||
}, {_this: this}, res => {
|
||||
res.data.map((item) => {
|
||||
if (item.moduleName === '首页') {
|
||||
this.selected.push(item)
|
||||
} else if (item.moduleName === '待办任务') {
|
||||
this.selected.push(item)
|
||||
} else if (item.flag === '0') {
|
||||
this.selected.push(item)
|
||||
}
|
||||
})
|
||||
// 右侧数据
|
||||
for (var i = 0; i < this.selected.length; i++) {
|
||||
this.targetKeys.push(this.selected[i].id)
|
||||
}
|
||||
// 左侧数据会筛选出右侧数据进行显示
|
||||
var j
|
||||
for (j = 0; j < res.data.length; j++) {
|
||||
let moduleLabel = {}
|
||||
moduleLabel = res.data[j].moduleName
|
||||
let moduleid = {}
|
||||
moduleid = res.data[j].id
|
||||
this.data.push({
|
||||
label: moduleLabel,
|
||||
key: moduleid,
|
||||
disabled: moduleLabel === '首页' || moduleLabel === '待办任务'
|
||||
})
|
||||
}
|
||||
this.value = this.targetKeys
|
||||
}, e => {
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
mounted () {
|
||||
this.selectPersonConf()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import '~@/assets/styles/mixins';
|
||||
.individual-plate{
|
||||
background: #FFF;
|
||||
overflow-y: auto !important;
|
||||
height: 100%;
|
||||
.flex();
|
||||
flex-direction: column;
|
||||
.container{
|
||||
flex: auto;
|
||||
.flex();
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.btn-group{
|
||||
margin-top: 10px;
|
||||
.flex();
|
||||
justify-content: center;
|
||||
.ivu-btn{
|
||||
width: 2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ivu-divider{
|
||||
margin: 10px 0 0 0;
|
||||
}
|
||||
.footer{
|
||||
padding: 10px 20px;
|
||||
.flex();
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.el-transfer__button:first-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin:10px 0 !important;
|
||||
}
|
||||
.el-transfer-panel {
|
||||
width:25vw !important;
|
||||
height:70vh !important;
|
||||
}
|
||||
.el-transfer-panel__body {
|
||||
height:100% !important;
|
||||
}
|
||||
.el-transfer-panel__list.is-filterable {
|
||||
height: 360px;
|
||||
padding-top: 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,401 @@
|
||||
<!-- 我的浏览 -->
|
||||
<template>
|
||||
<div class="my-browsing">
|
||||
<div class="content">
|
||||
<div class="content-detail-head">
|
||||
<div slot="left">
|
||||
<el-button v-btn-permission="'5UUBGZSGRL'" round class="common-button-default delete-button" @click="batchDelete"><i class="iconfont"></i>删除</el-button>
|
||||
<el-button round class="common-button-default delete-button" @click="browsingBathDel" style="margin-left: 0"><i class="iconfont"></i>清除记录</el-button>
|
||||
</div>
|
||||
<div slot="right">
|
||||
</div>
|
||||
</div>
|
||||
<el-checkbox v-model="checkAll" size="large" @change="handleSelectAll" :indeterminate="indeterminate" style="padding: 10px 20px 0px 20px" v-if="total >0">{{$t('m.checkAll')}}</el-checkbox>
|
||||
<div class="content-detail" v-if="total >0">
|
||||
<div class="card domBtn" style="width:100%" v-for="(item,index) in browseList" :key="index" :class="{ 'selected ': item.checked }">
|
||||
<!-- <div class="card domBtn" style="width:100%" v-for="(item,index) in browseList" :key="index" :class="{ 'selected ': item.checked }" @click="handleCardClick(item,$event)" >-->
|
||||
<el-row style="line-height: 24px;">
|
||||
<el-col :span="1">
|
||||
<!-- <el-checkbox v-model="item.checked" @change="handleCardClick(item,$event)" size="medium">-->
|
||||
<!-- </el-checkbox>-->
|
||||
<el-checkbox v-model="item.checked" size="medium" :key="item.checked">
|
||||
</el-checkbox>
|
||||
</el-col>
|
||||
<div @click="jumpDetails(item)">
|
||||
<el-col :span="8"><div class="left-contents" :title="item.resTitle">标题:{{item.resTitle}}</div></el-col>
|
||||
<el-col :span="6" :offset="6">创建时间:{{item.creationTime}}</el-col>
|
||||
</div>
|
||||
<el-col :span="2" :offset="1" style="line-height: 24px;"><el-button size="mini" @click="browsingDel(item.id)" v-if=" item.checked" style="margin-top: -5px; border: 1px dashed #dcdee2" v-btn-permission="'R9UZLJZKZD'">删除</el-button></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<has-no-data pClass="content-detail" v-if="total === 0"></has-no-data>
|
||||
<loading :loading="loading">数据获取中</loading>
|
||||
</div>
|
||||
<pagination :total="total" :page="page" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'MyBrowsing',
|
||||
data () {
|
||||
return {
|
||||
checkAll: false, // 是否全选
|
||||
indeterminate: false, // 是否半选
|
||||
total: 0,
|
||||
page: 1,
|
||||
rows: 10,
|
||||
loading: false,
|
||||
browseList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 分页
|
||||
pageChange (page) {
|
||||
this.page = page
|
||||
this.selectBrowsing()
|
||||
},
|
||||
pageSizeChange (pageSize) {
|
||||
this.rows = pageSize
|
||||
this.selectBrowsing()
|
||||
},
|
||||
// 全选
|
||||
handleSelectAll (checked) {
|
||||
// 全部选中
|
||||
if (checked) {
|
||||
// 1.遍历数据,把每一项的checkbox置为选中状态
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < this.browseList.length; i++) {
|
||||
this.$set(this.browseList[i], 'checked', true)
|
||||
// 2.把每一项的id都放入selectedList数组中
|
||||
this.selectedList.push(this.browseList[i].id)
|
||||
}
|
||||
// 全部取消选中
|
||||
} else {
|
||||
// 1.遍历数据,把每一项的checkbox置为取消选中状态
|
||||
for (let i = 0; i < this.browseList.length; i++) {
|
||||
this.$set(this.browseList[i], 'checked', false)
|
||||
// 2.清空selectedList数组
|
||||
this.selectedList = []
|
||||
}
|
||||
}
|
||||
},
|
||||
// 复选框
|
||||
handleCardClick (item, event) {
|
||||
item.checked = !item.checked
|
||||
},
|
||||
// 清除浏览记录
|
||||
browsingBathDel () {
|
||||
this.eliminateDialog = true
|
||||
this.$confirm('确定清除所有的浏览记录?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.put('/person/personCookies/deleteBacth', {
|
||||
idlist: this.browseList
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.selectBrowsing()
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 单项删除
|
||||
browsingDel (id) {
|
||||
this.$confirm('确定删除这一条数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.put('/person/personCookies/deleteBySimple', {
|
||||
id: id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.pageChange(1)
|
||||
}
|
||||
}, e => {})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 批量删除
|
||||
batchDelete () {
|
||||
if (this.selectedList.length === 0) {
|
||||
this.$message.error('请先选择数据进行删除')
|
||||
} else {
|
||||
this.$confirm('确定删除选中的浏览记录?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('/person/personCookies/deleteByBacth', {
|
||||
ids: this.selectedList
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.pageChange(1)
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
// 分页查询
|
||||
selectBrowsing () {
|
||||
this.$http.get('person/personCookies/page', {
|
||||
page: this.page,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
userId: this.$store.getters.userInfo.userId
|
||||
}, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
for (let i = 0; i < res.data.list.length; i++) {
|
||||
res.data.list[i].checked = false
|
||||
}
|
||||
this.browseList = res.data.list
|
||||
this.total = res.data.count
|
||||
}, e => {})
|
||||
},
|
||||
jumpDetails (item) {
|
||||
let standItem = {}
|
||||
standItem.collectResId = item.resId
|
||||
standItem.collectType = item.cookieType
|
||||
if (item.cookieType === 'INLAND_STAND' || item.cookieType === 'FOREIGN_STAND' || item.cookieType === 'BUSINESS_STAND') {
|
||||
this.detailsStandard(standItem)
|
||||
} else if (item.cookieType === 'INLAND_LAWS' || item.cookieType === 'FOREIGN_LAWS') {
|
||||
this.detailsLaws(standItem)
|
||||
} else if (item.cookieType === 'INLAND_MSG') {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'informationIndex2',
|
||||
query: {
|
||||
id: item.resId
|
||||
}
|
||||
})
|
||||
} else if (item.cookieType === 'RESOURCE_MSG') {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
const route = this.$router.resolve({
|
||||
name: 'DynamicInfomationDetails2',
|
||||
query: {
|
||||
id: item.resId,
|
||||
pageType: 'RESOURCE_MSG'
|
||||
}
|
||||
})
|
||||
window.open(route.href, '_blank')
|
||||
} else {
|
||||
this.detailsDynamics(standItem)
|
||||
}
|
||||
},
|
||||
detailsStandard (item) {
|
||||
this.$http.get('lawss/sarMenu/judgeSarMenuByRole', {
|
||||
sarId: item.collectResId,
|
||||
sarType: item.collectType
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
if (item.collectType === 'BUSINESS_STAND') {
|
||||
if (this.$hasPermission('YJUHC32R7G')) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
name: 'OtherBussStandardDetails',
|
||||
params: {
|
||||
id: item.collectResId,
|
||||
pageType: item.collectType
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
} else {
|
||||
this.message.warning('无权访问')
|
||||
}
|
||||
} else {
|
||||
if (this.$hasPermission('SSA6WR4HV8')) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
name: 'OtherStandardDetails',
|
||||
params: {
|
||||
id: item.collectResId,
|
||||
pageType: item.collectType
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
} else {
|
||||
this.$message.warning('无权访问')
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
}, e => {
|
||||
this.$message.error('无权访问')
|
||||
})
|
||||
},
|
||||
detailsLaws (item) {
|
||||
this.$http.get('lawss/sarMenu/judgeSarMenuByRole', {
|
||||
sarId: item.collectResId,
|
||||
sarType: item.collectType
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
if (this.$hasPermission('A2HDHMEA6W')) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
name: 'OtherLawsDetails',
|
||||
params: {
|
||||
id: item.collectResId,
|
||||
pageType: item.collectType
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
} else {
|
||||
this.$message.warning('无权访问')
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
}, e => {
|
||||
this.$message.error('无权访问')
|
||||
})
|
||||
},
|
||||
detailsDynamics (item) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
name: 'OtherDomesticDynamicsDetails',
|
||||
params: {
|
||||
id: item.collectResId,
|
||||
pageType: item.collectType
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
browseList: {
|
||||
deep: true,
|
||||
handler (newVal, oldVal) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < newVal.length; i++) {
|
||||
if (newVal[i].checked) {
|
||||
this.selectedList.push(newVal[i].id)
|
||||
}
|
||||
}
|
||||
if (this.selectedList.length === newVal.length && newVal.length !== 0) {
|
||||
this.checkAll = true
|
||||
this.indeterminate = false
|
||||
} else if (this.selectedList.length === 0) {
|
||||
this.checkAll = false
|
||||
} else {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 已选择的列表
|
||||
selectedList (newVal, oldVal) {
|
||||
if (oldVal.length === this.browseList.length && newVal.length !== 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = true
|
||||
} else if (newVal.length === 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.selectBrowsing()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import '~@/assets/styles/style';
|
||||
@import '~@/assets/styles/mixins';
|
||||
.my-browsing {
|
||||
height: 100%;
|
||||
padding: 10px 10px 0;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.content {
|
||||
flex: auto;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.content-detail-head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.content-detail {
|
||||
width: 100%;
|
||||
flex: auto;
|
||||
overflow-y: auto;
|
||||
padding: 0.1rem;
|
||||
background-color: white;
|
||||
margin: 5px 0;
|
||||
.card:last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.card{
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
border: 1px solid #EEE;
|
||||
margin-bottom: 4px;
|
||||
transition: all .2s ease-in-out;
|
||||
cursor: pointer;
|
||||
padding: 14px;
|
||||
background: #FFF;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
.un-select();
|
||||
.left-contents{
|
||||
width: 100%;
|
||||
.ellipsis()
|
||||
}
|
||||
&:hover{
|
||||
box-shadow: 0px 1px 13px 0px #DDD;
|
||||
}
|
||||
.card-btn{
|
||||
margin-right: 2px;
|
||||
&:last-child{
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.pagination {
|
||||
border-top: 1px solid #f2f2f2;
|
||||
position: static;
|
||||
/deep/.pagination-slot {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.domBtn {border:1px gray solid;background-color:#FFE6B0}
|
||||
</style>
|
||||
+1001
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,356 @@
|
||||
<!--国内动态详情-->
|
||||
<template>
|
||||
<div class="dynamic-details-content">
|
||||
<div class="contentTitle">
|
||||
<div class="back" title="返回" @click="back">
|
||||
<i class="el-icon-collection-tag"></i>
|
||||
</div>
|
||||
<div class="title" :title="title">{{title}}</div>
|
||||
</div>
|
||||
<div class="contentOrigin">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
发布时间:<span>{{ getDate(putTime) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
发布机构:<span :title="pubOrgName">{{ pubOrgName }}</span>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
浏览数:<span>{{ countCookie }}</span>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<Icon type="md-star-outline" v-show="collectBtn" size="26" @click="collectLawsInfo()" style="margin-right:5px; cursor: pointer"></Icon>
|
||||
<Icon type="md-star" v-show="cancelCollectBtn" size="26" @click="cancelCollectLawsInfo()" style="margin-right:5px;cursor: pointer"></Icon>
|
||||
<Icon type="ios-redo" style="cursor: pointer" size="26" @click="shareStandard()"></Icon>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="msgContent" v-html="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="请选择要分享的人" v-model="shareStandardModal" :closable="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 type="text" size="large" @click="shareStandardModal=false">{{$t('m.cancel')}}</el-button>
|
||||
<el-button type="primary" size="large" @click="shareStandardBt">{{$t('m.determine')}}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<loading :loading="loading">加载中...</loading>
|
||||
<el-drawer
|
||||
title="分享动态信息"
|
||||
v-model="drawerModal"
|
||||
width="300"
|
||||
@on-close="cancelShareLaws"
|
||||
>
|
||||
<dept-tree treeDivId="drawerModalTree"
|
||||
ref="drawerModalTree"
|
||||
@treeClick="selcetShareLawsTree"
|
||||
allDept
|
||||
showUser
|
||||
:editable="false"
|
||||
:deptList=""
|
||||
style="padding: 0 15px">
|
||||
</dept-tree>
|
||||
<div class="demo-drawer-footer">
|
||||
<el-button style="margin-right: 8px" @click="cancelShareLaws">{{$t('m.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="shareStandardBt">{{$t('m.determine')}}</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import deptTree from '../../../../processCenter/pages/components/deptTree'
|
||||
export default {
|
||||
name: 'DomesticDynamicsDetails',
|
||||
data () {
|
||||
return {
|
||||
title: '',
|
||||
putTime: '',
|
||||
pubUserName: '',
|
||||
pubOrgName: '',
|
||||
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: {},
|
||||
loading: false, // 加载中
|
||||
drawerModal: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 返回
|
||||
back () {
|
||||
this.$router.push(this.$store.state.detailMap)
|
||||
this.$store.commit('setDetailMap', '')
|
||||
},
|
||||
getDate (date) {
|
||||
return date != null ? date.substring(0, date.indexOf(' ')) : ''
|
||||
},
|
||||
queryMsgDetailsById () {
|
||||
let id = this.$route.params.id
|
||||
this.$http.get('lawss/msgDynamicInfo/selectByMsgId', {
|
||||
id: id
|
||||
}, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
this.title = res.data.title
|
||||
this.putTime = res.data.pubTime
|
||||
this.pubUserName = res.data.pubUserName
|
||||
this.pubOrgName = res.data.pubOrgName || res.data.pubOrg
|
||||
this.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.msgDetails = res.data
|
||||
this.addPersonCookie()
|
||||
}, 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)
|
||||
}
|
||||
},
|
||||
// 新增浏览记录
|
||||
addPersonCookie () {
|
||||
this.personCookieEO.cookieType = this.$route.params.pageType
|
||||
this.personCookieEO.resTitle = this.title
|
||||
this.personCookieEO.resId = this.$route.params.id
|
||||
this.$http.postData('person/personCookies/create', this.personCookieEO, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.countPageCookie()
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 统计浏览总数
|
||||
countPageCookie () {
|
||||
this.$http.get('person/personCookies/countPageCookie', {
|
||||
resId: this.$route.params.id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.countCookie = res.data
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
downloadFile (attId) {
|
||||
if (attId != null && attId !== '') {
|
||||
window.location.href = '/api/att/attFile/downloadFile?fileId=' + attId
|
||||
} else {
|
||||
this.$Message.error('请选择要下载的文件')
|
||||
}
|
||||
},
|
||||
// 收藏动态信息
|
||||
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.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: {
|
||||
deptTree
|
||||
},
|
||||
props: {},
|
||||
computed: {},
|
||||
watch: {},
|
||||
mounted () {
|
||||
this.queryMsgDetailsById()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
//@import '~styles/mixins';
|
||||
.dynamic-details-content{
|
||||
height: 100%;
|
||||
padding: 30px;
|
||||
overflow-y: auto!important;
|
||||
.contentTitle {
|
||||
text-align: center;
|
||||
}
|
||||
.contentOrigin{
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
background-color: #d8f1ff;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
white-space: nowrap;
|
||||
.ivu-col{
|
||||
.flex();
|
||||
justify-content: center;
|
||||
span{
|
||||
.ellipsis();
|
||||
}
|
||||
}
|
||||
}
|
||||
.picContent{
|
||||
text-align: center;
|
||||
}
|
||||
.msgContent{
|
||||
margin-bottom: 20px;
|
||||
font-size: 0.5rem;
|
||||
padding: 10px;
|
||||
img{
|
||||
max-width: calc(~'100% - 4em') !important;
|
||||
}
|
||||
p{
|
||||
padding: 0 5px !important;
|
||||
}
|
||||
}
|
||||
.fileContent{
|
||||
margin-bottom: 20px;
|
||||
font-size: 0.3rem;
|
||||
}
|
||||
.linkContent{
|
||||
font-size: 0.3rem;
|
||||
}
|
||||
.imgStyle{
|
||||
margin-bottom: 20px;
|
||||
width: 100%;
|
||||
}
|
||||
.back{
|
||||
float: left;
|
||||
vertical-align: super;
|
||||
display: inline-block;
|
||||
}
|
||||
.title{
|
||||
display: inline;
|
||||
font-weight: bold;
|
||||
font-size: 25px;
|
||||
text-align: center;
|
||||
}
|
||||
.ivu-spin-fix{
|
||||
background-color: rgba(255,255,255, 1)
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+353
@@ -0,0 +1,353 @@
|
||||
<!-- 收藏法规详情页 -->
|
||||
<template>
|
||||
<div id="lawsDetials">
|
||||
<div class="laws-details-header">
|
||||
<div class="back" title="返回" @click="back">
|
||||
<i class="el-icon-collection-tag"></i>
|
||||
</div>
|
||||
<div class="title">
|
||||
<div class="fileContent" v-if="SarLawsInfoEO.lawsNumber !== null && SarLawsInfoEO.lawsNumber !== ''">{{SarLawsInfoEO.lawsNumber}}</div>
|
||||
{{SarLawsInfoEO.lawsName}}
|
||||
政策详情
|
||||
</div>
|
||||
<div class="laws-details-button-group">
|
||||
<el-button type="primary" @click="searchLawsItems">查看表单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="laws-details-content">
|
||||
<el-row>
|
||||
<el-col span="8" >
|
||||
<span>国家地区:{{SarLawsInfoEO.countryName}}</span>
|
||||
<span>文件名称:{{SarLawsInfoEO.lawsName}}</span>
|
||||
<span>发布日期:{{SarLawsInfoEO.issueTime}}</span>
|
||||
<span>适用车型:{{SarLawsInfoEO.applyArcticShow === '' || SarLawsInfoEO.applyArcticShow == null ? ' --' : SarLawsInfoEO.applyArcticShow}}</span>
|
||||
<span>责任部门:{{SarLawsInfoEO.responsibleUnitShow === '' || SarLawsInfoEO.responsibleUnitShow == null ? ' --' : SarLawsInfoEO.responsibleUnitShow}}</span>
|
||||
</el-col>
|
||||
<el-col span="8">
|
||||
<span>文件性质:{{SarLawsInfoEO.propertyName === '' || SarLawsInfoEO.propertyName == null ? ' --' : SarLawsInfoEO.propertyName}}</span>
|
||||
<span>发布单位:{{SarLawsInfoEO.issueUnit === '' || SarLawsInfoEO.issueUnit == null ? ' --' : SarLawsInfoEO.issueUnit}}</span>
|
||||
<span>实施日期:{{SarLawsInfoEO.putTime}}</span>
|
||||
<span>能源种类:{{SarLawsInfoEO.energyKindShow === '' || SarLawsInfoEO.energyKindShow == null ? ' --' : SarLawsInfoEO.energyKindShow}}</span>
|
||||
<span>链接:
|
||||
<div class="fileContent" v-if="SarLawsInfoEO.linkUri != null && SarLawsInfoEO.linkUri !== ''">
|
||||
<a @click="openLinkUrl(SarLawsInfoEO.linkUri)">{{ SarLawsInfoEO.linkUri }}</a>
|
||||
</div>
|
||||
<div class="fileContent" v-if="SarLawsInfoEO.linkUri == null || SarLawsInfoEO.linkUri === ''">
|
||||
--
|
||||
</div>
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col span="8">
|
||||
<span>政策编号:{{SarLawsInfoEO.lawsNumber === '' || SarLawsInfoEO.lawsNumber == null ? ' --' : SarLawsInfoEO.lawsNumber}}</span>
|
||||
<span>文件状态:{{SarLawsInfoEO.stateName}}</span>
|
||||
<span>代替政策编号:{{SarLawsInfoEO.replaceLawsNum === '' || SarLawsInfoEO.replaceLawsNum == null ? ' --' : SarLawsInfoEO.replaceLawsNum}}</span>
|
||||
<span>适用认证:{{SarLawsInfoEO.applyAuthShow === '' || SarLawsInfoEO.applyAuthShow == null ? ' --' : SarLawsInfoEO.applyAuthShow}}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col span="24">
|
||||
<span>文件文本:
|
||||
<div class="fileContent" v-if="lawsFileDatas.length > 0">
|
||||
<div class="fileContent" v-for="(item, index) in lawsFileDatas" :key="index">
|
||||
<div class="fileBlock">
|
||||
<a @click="openFileInPdf(item.attId)">{{ item.oldFileName }}</a>
|
||||
<Icon type="ios-cloud-download" @click="downloadFile(item.attId)" v-btn-permission="'S6KZXKMCG2'" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fileContent" v-if="lawsFileDatas.length <= 0">
|
||||
暂缺
|
||||
</div>
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<span>征求意见稿:
|
||||
<div class="fileContent" v-if="opinionFileDatas.length > 0">
|
||||
<div class="fileContent" v-for="(item, index) in opinionFileDatas" :key="index">
|
||||
<div class="fileBlock">
|
||||
<a @click="openFileInPdf(item.attId)">{{ item.oldFileName }}</a>
|
||||
<Icon type="ios-cloud-download" @click="downloadFile(item.attId)" v-btn-permission="'S6KZXKMCG2'" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fileContent" v-if="opinionFileDatas.length <= 0">
|
||||
暂缺
|
||||
</div>
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<span>关联文件:
|
||||
<div class="fileContent" v-if="relevanceFileDatas.length > 0">
|
||||
<div class="fileContent" v-for="(item, index) in relevanceFileDatas" :key="index">
|
||||
<div class="fileBlock">
|
||||
<a @click="openFileInPdf(item.attId)" target="_blank">{{ item.oldFileName }}</a>
|
||||
<Icon type="ios-cloud-download" @click="downloadFile(item.attId)" v-btn-permission="'S6KZXKMCG2'" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fileContent" v-if="relevanceFileDatas.length <= 0">
|
||||
暂缺
|
||||
</div>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<Divider orientation="left"></Divider>
|
||||
<div class="nav-search">
|
||||
<div class="nav-search-recommend" id="">
|
||||
<h5>相近政策</h5>
|
||||
<ul>
|
||||
<!--<li v-for="(item, index) in recommendList" :key="index">-->
|
||||
<div class="res-type-content" v-if="recommendList.length>0">
|
||||
<span style="cursor: pointer" :title="recommendList[0].numberShow" @click="showRecommendDetials(recommendList[0])">{{recommendList[0].numberShow }} {{recommendList[0].nameShow}}</span>
|
||||
</div>
|
||||
<div class="res-type-content" v-else>
|
||||
无
|
||||
</div>
|
||||
<!--</li>-->
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-search-recommend" >
|
||||
<h5>标准征求意见审批流程</h5>
|
||||
<ul>
|
||||
<div class="res-type-content" v-if="opinionsProcessList.length>0">
|
||||
<li v-for="(item, index) in opinionsProcessList" :key="index">
|
||||
<span style="cursor: pointer" :title="item.processNumber" >{{item.processNumber }}</span>
|
||||
</li>
|
||||
</div>
|
||||
<div class="res-type-content" v-else>
|
||||
<span>无</span>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-search-recommend" >
|
||||
<h5>标准法规实施通知及排查流程</h5>
|
||||
<ul>
|
||||
<div class="res-type-content" v-if="notifiProcessList.length>0">
|
||||
<li v-for="(item, index) in notifiProcessList" :key="index">
|
||||
<span style="cursor: pointer" :title="item.processNumber" >{{item.processNumber }}</span>
|
||||
</li>
|
||||
</div>
|
||||
<div class="res-type-content" v-else>
|
||||
<span>无</span>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--查看分解单模态框-->
|
||||
<el-drawer title="查看分解单" :mask-closable="false" v-model="showLawsItemsModal" width="1000" @on-close="closeItemsModal" class="check-laws-items-modal">
|
||||
<table-tools-bar>
|
||||
<div slot="left">
|
||||
<Input v-model="lawsItemsSearch.responsibleUnit" v-show="false" />
|
||||
<Poptip placement="bottom" popper-class="user-dept-popper" style="width: auto;margin-right: 0">
|
||||
<Input v-model="lawsItemsSearch.responsibleUnitName" placeholder="请选择部门" readonly id="searchItemsDeptBtn" style="margin-right: 0" />
|
||||
<div class="api" slot="content">
|
||||
<laws-tree :zNodes="searchItemsNodes"
|
||||
treeDivId="searchItemsNodes"
|
||||
ref="searchItemsTree"
|
||||
showRMenu
|
||||
deptSelect
|
||||
@treeDblClick="searchInlandNodesClick"
|
||||
class="ztree" style="width: 200px;height: 400px;overflow: auto">
|
||||
</laws-tree>
|
||||
</div>
|
||||
</Poptip>
|
||||
<el-button type="primary" icon="ios-search" @click="searchLawsItemsByUnit"></el-button>
|
||||
<el-button type="primary" @click="clearSearchLawsItems">清空查询</el-button>
|
||||
</div>
|
||||
<div slot="right">
|
||||
<el-button type="primary" @click="openAddItemsModal" v-btn-permission="'S2PDKDRUS3'">新增</el-button>
|
||||
<el-button type="primary" @click="batchDeleteItems" v-btn-permission="'Y9UHFUY4BQ'">删除</el-button>
|
||||
<el-button type="primary" @click="downloadItemsTemplate">模板下载</el-button>
|
||||
<el-button type="primary" @click="addImportModal" v-btn-permission="'84EQDR9CFT'">导入</el-button>
|
||||
</div>
|
||||
</table-tools-bar>
|
||||
<div class="content">
|
||||
<loading :loading="loading">数据获取中</loading>
|
||||
<Table border ref="selection" :height="tableHeight" :columns="itemsTableColumn" :data="itemsData" @on-selection-change="getSelectedDatas"></Table>
|
||||
</div>
|
||||
<pagination :total="itemsTotal" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
</el-drawer>
|
||||
<!--新增修改查看法规条目模态框-->
|
||||
<el-drawer :title="addLawsItemsTitle" :mask-closable="false" v-model="addLawsItemsModal" @on-close="closeEditItems" width="900">
|
||||
<div class="standards-info-form">
|
||||
<el-form ref="SarLawsItemsEO" :model="SarLawsItemsEO" :rules="addLawsItemsFormRules" class="label-input-form">
|
||||
<el-input v-model="SarLawsItemsEO.id" v-show="false"></el-input>
|
||||
<el-input v-model="SarLawsItemsEO.lawsId" v-show="false"></el-input>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="条目号" prop="itemsNum" class="laws-info-item">
|
||||
<el-input v-model="SarLawsItemsEO.itemsNum"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="条目名称" prop="itemsName" class="laws-info-item">
|
||||
<el-input v-model="SarLawsItemsEO.itemsName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="涉及零部件" prop="parts" class="laws-info-item">
|
||||
<el-input v-model="SarLawsItemsEO.parts"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="特殊生效日期" prop="tackTime" class="laws-info-item">
|
||||
<el-date-picker type="date" :editable="false" v-model="SarLawsItemsEO.tackTime" format="yyyy-MM-dd"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="适用车型" prop="applyArctic" class="laws-info-item">
|
||||
<el-select v-model="SarLawsItemsEO.applyArctic" multiple>
|
||||
<el-option v-for="item in applyArcticOptions" :value="item.value" :key="item.value">{{ item.label }}</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="能源种类" prop="energyKind" class="laws-info-item">
|
||||
<el-select v-model="SarLawsItemsEO.energyKind" multiple>
|
||||
<el-option v-for="item in energyKindOptions" :value="item.value" :key="item.value">{{ item.label }}</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="责任部门" prop="responsibleUnit" class="laws-info-item">
|
||||
<el-input v-model="SarLawsItemsEO.responsibleUnit" v-show="false"></el-input>
|
||||
<Poptip placement="bottom" popper-class="user-dept-popper" @on-popper-show="selectNode">
|
||||
<el-input v-model="SarLawsItemsEO.responsibleUnitName" placeholder="请选择部门" readonly clearable id="depBtns" />
|
||||
<div class="api" slot="content">
|
||||
<laws-tree :zNodes="depNode"
|
||||
deptSelect
|
||||
treeDivId="depTreeInland"
|
||||
showRMenu
|
||||
@treeDblClick="tClick"
|
||||
class="ztree" style="width: 200px;height: 300px;overflow: auto">
|
||||
</laws-tree>
|
||||
</div>
|
||||
</Poptip>
|
||||
</el-form-item>
|
||||
<!--<ul id="orgTree" class="ztree" style="width: 200px;height: 500px;overflow: auto"></ul>-->
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remarks" class="laws-info-item">
|
||||
<el-input v-model="SarLawsItemsEO.remarks"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="demo-drawer-footer">
|
||||
<el-button @click="closeEditItems">取消</el-button>
|
||||
<el-button v-if="saveLawsItemsBtn" type="primary" @click="saveLawsItems" :loading="isSubmit">提交</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
|
||||
<el-drawer title="查看政策条目" :mask-closable="false" v-model="modalItemSeeShowflag" width="600">
|
||||
<div>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>条目号:{{lawsShowItemEO.itemsNum}}</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>条目名称:{{lawsShowItemEO.itemsName}}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>涉及零部件:{{lawsShowItemEO.parts}}</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>特殊生效日期:{{lawsShowItemEO.tackTime}}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>适用车型:{{lawsShowItemEO.applyArcticShow}}</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>能源种类:{{lawsShowItemEO.energyKindShow}}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>责任部门:{{lawsShowItemEO.responsibleUnitShow}}</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>备注:{{lawsShowItemEO.remarks}}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<!--导入模态框-->
|
||||
<Modal v-model="importModalshowflag" title="导入文件" >
|
||||
<Upload :action="importExcelUrl" ref="importfile" :max-size=308000 name="file" :format="['xlsx']"
|
||||
:on-format-error="handleFormatError" :on-success="importFileSuccess" :show-upload-list="showUploadlist">
|
||||
<el-button icon="ios-cloud-upload-outline">选择文件</el-button>
|
||||
</Upload>
|
||||
</Modal>
|
||||
<adc-back-top scroll-bind="lawsDetials"></adc-back-top>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script src="js/lawsDetails.js"></script>
|
||||
|
||||
<style lang="less">
|
||||
//@import '~styles/style';
|
||||
//@import '~styles/mixins';
|
||||
#lawsDetials{
|
||||
padding: 15px;
|
||||
overflow-y: auto;
|
||||
.laws-details-header {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
.flex();
|
||||
.back {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
padding: 0 20px;
|
||||
flex: 1;
|
||||
.ellipsis();
|
||||
}
|
||||
.laws-details-button-group{
|
||||
.flex();
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
.laws-details-content {
|
||||
margin-top: 15px;
|
||||
width: calc(~'100% - 50px');
|
||||
.nav-search{
|
||||
.flex();
|
||||
.nav-search-recommend{
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.laws-details-content span {
|
||||
padding: 10px;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.fileBlock{
|
||||
display: inline-block;
|
||||
padding: 0 20px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.fileBlock .ivu-icon {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.fileContent{
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
+1111
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,697 @@
|
||||
export default {
|
||||
name: '',
|
||||
data () {
|
||||
return {
|
||||
SarLawsInfoEO: {
|
||||
editLawsId: '',
|
||||
countryName: '',
|
||||
propertyName: '',
|
||||
lawsNumber: '',
|
||||
lawsName: '',
|
||||
issueUnit: '',
|
||||
stateName: '',
|
||||
issueTime: '',
|
||||
putTime: '',
|
||||
replaceLawsNum: '',
|
||||
applyArctic: '',
|
||||
energyKind: '',
|
||||
applyAuth: '',
|
||||
responsibleUnit: '',
|
||||
linkUri: '',
|
||||
lawsFile: '',
|
||||
lawsFilePath: '',
|
||||
opinionFile: '',
|
||||
relevanceFile: '',
|
||||
upReplaceNumFlag: 0,
|
||||
upNumFlag: 0,
|
||||
lawsFileList: [],
|
||||
opinionFileList: [],
|
||||
relevanceFileList: []
|
||||
},
|
||||
sarLawsCopy: {},
|
||||
saveAttId: '',
|
||||
personCookieEO: {
|
||||
cookieType: '',
|
||||
resTitle: '',
|
||||
resId: ''
|
||||
},
|
||||
lawsFileDatas: [],
|
||||
opinionFileDatas: [],
|
||||
relevanceFileDatas: [],
|
||||
// 查看表单
|
||||
showLawsItemsModal: false,
|
||||
addLawsItemsModal: false,
|
||||
importItemsModal: false,
|
||||
importModalshowflag: false,
|
||||
modalItemSeeShowflag: false, // 二级查看条目
|
||||
saveLawsItemsBtn: true,
|
||||
lawsShowItemEO: {},
|
||||
importExcelUrl: '', // 导入EXCEL文档
|
||||
addLawsItemsTitle: '',
|
||||
lawsItemsSearch: {
|
||||
responsibleUnit: '',
|
||||
responsibleUnitName: ''
|
||||
},
|
||||
SarLawsItemsEO: {
|
||||
id: '',
|
||||
lawsId: '',
|
||||
itemsNum: '',
|
||||
itemsName: '',
|
||||
parts: '',
|
||||
tackTime: '',
|
||||
applyArctic: '',
|
||||
energyKind: '',
|
||||
responsibleUnit: '',
|
||||
responsibleUnitName: '',
|
||||
remarks: '',
|
||||
orgName: '',
|
||||
orgId: ''
|
||||
},
|
||||
addLawsItemsFormRules: {
|
||||
itemsNum: [
|
||||
{ required: true, validator: this.verify.validateStandardItem, trigger: 'blur' },
|
||||
{ type: 'string', max: 100, message: '条目号长度不能超过100个字符', trigger: 'blur' }
|
||||
],
|
||||
itemsName: [
|
||||
{ type: 'string', max: 500, message: '条目名称长度不能超过500个字符', trigger: 'blur' },
|
||||
{type: 'string', validator: this.verify.checkSpecialCharacter2, trigger: 'blur'}
|
||||
],
|
||||
parts: [
|
||||
{ required: true, message: '涉及零部件不能为空', trigger: 'blur' },
|
||||
{ type: 'string', max: 500, message: '涉及零部件长度不能超过500个字符', trigger: 'blur' },
|
||||
{type: 'string', validator: this.verify.checkSpecialCharacter2, trigger: 'blur'}
|
||||
],
|
||||
applyArctic: [
|
||||
{type: 'Array', validator: this.verify.valiCategory, trigger: 'change'}
|
||||
],
|
||||
energyKind: [
|
||||
{type: 'Array', validator: this.verify.valiCategory, trigger: 'change'}
|
||||
],
|
||||
responsibleUnit: [
|
||||
{required: true, message: '责任部门不能为空', trigger: 'change'}
|
||||
],
|
||||
remarks: [
|
||||
{ type: 'string', max: 200, message: '备注长度不能超过200个字符', trigger: 'blur' }
|
||||
// {type: 'string', validator: this.verify.checkSpecialCharacter2, trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
depNode: [],
|
||||
// 提交状态
|
||||
isSubmit: false,
|
||||
recommendList: [],
|
||||
applyArcticOptions: '',
|
||||
energyKindOptions: '',
|
||||
loading: false,
|
||||
itemsData: [],
|
||||
tableHeight: 600,
|
||||
itemsTotal: 0,
|
||||
itemPage: 1,
|
||||
itemPageSize: 10,
|
||||
itemsTableColumn: [
|
||||
{
|
||||
type: 'selection',
|
||||
width: 60,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '条目号',
|
||||
key: 'itemsNum',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '条目名称',
|
||||
key: 'itemsName',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '涉及零部件',
|
||||
key: 'parts',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '特殊生效日期',
|
||||
key: 'tackTime',
|
||||
align: 'center',
|
||||
render: (h, params) => {
|
||||
return h('div', this.getDate(params.row.tackTime))
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '适用车型',
|
||||
key: 'applyArcticShow',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '能源种类',
|
||||
key: 'energyKindShow',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '责任部门',
|
||||
key: 'responsibleUnitShow',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
key: 'remarks',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
// fixed: 'right',
|
||||
width: 200,
|
||||
align: 'center',
|
||||
render: (h, params) => {
|
||||
return h('div', [
|
||||
h('Button', {
|
||||
props: {
|
||||
type: 'primary',
|
||||
size: 'small'
|
||||
},
|
||||
style: {
|
||||
marginRight: '5px'
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.modalItemSeeShowflag = true
|
||||
this.lawsShowItemEO = JSON.parse(JSON.stringify(params.row))
|
||||
if (this.lawsShowItemEO.tackTime != null && this.lawsShowItemEO.tackTime !== '') {
|
||||
this.lawsShowItemEO.tackTime = this.lawsShowItemEO.tackTime.split(' ')[0]
|
||||
}
|
||||
}
|
||||
}
|
||||
}, '属性'),
|
||||
h('Button', {
|
||||
props: {
|
||||
type: 'primary',
|
||||
size: 'small'
|
||||
},
|
||||
style: {
|
||||
marginRight: '5px'
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.addLawsItemsTitle = '编辑政策条目'
|
||||
this.editLawsItems(params.row)
|
||||
this.itemFormdisableflag = false
|
||||
}
|
||||
},
|
||||
directives: [
|
||||
{
|
||||
name: 'btn-permission',
|
||||
value: '676638GG4P'
|
||||
}
|
||||
]
|
||||
}, '编辑'),
|
||||
h('Button', {
|
||||
props: {
|
||||
type: 'error',
|
||||
size: 'small'
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.removeLawsItems(params.row.id)
|
||||
}
|
||||
},
|
||||
directives: [
|
||||
{
|
||||
name: 'btn-permission',
|
||||
value: 'Y9UHFUY4BQ'
|
||||
}
|
||||
]
|
||||
}, '删除')
|
||||
])
|
||||
}
|
||||
}
|
||||
], // 法规条目表格
|
||||
opinionsProcessList: [], // 标准征求意见审批流程
|
||||
notifiProcessList: [], // 标准法规实施通知及排查流程
|
||||
searchItemsNodes: [], // 条目部门选择树形结构
|
||||
showUploadlist: true // 导入过程中新增数据时,如果数据错误,不出现导入列表
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 查询详情
|
||||
queryDetails () {
|
||||
let id = this.$route.params.id
|
||||
this.$http.get('lawss/sarLawsInfo/queryInfoDetails', {
|
||||
id: id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.SarLawsInfoEO = res.data
|
||||
if (res.data.lawsFileList != null && res.data.lawsFileList !== 'null' && res.data.lawsFileList.length > 0) {
|
||||
this.lawsFileDatas = res.data.lawsFileList
|
||||
}
|
||||
if (res.data.opinionFileList != null && res.data.opinionFileList !== 'null' && res.data.opinionFileList.length > 0) {
|
||||
this.opinionFileDatas = res.data.opinionFileList
|
||||
}
|
||||
if (res.data.relevanceFileList != null && res.data.relevanceFileList !== 'null' && res.data.relevanceFileList.length > 0) {
|
||||
this.relevanceFileDatas = res.data.relevanceFileList
|
||||
}
|
||||
this.addPersonCookie()
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 新增浏览记录
|
||||
addPersonCookie () {
|
||||
this.personCookieEO.cookieType = this.$route.params.pageType
|
||||
this.personCookieEO.resTitle = this.SarLawsInfoEO.lawsName + '(编号:' + this.SarLawsInfoEO.lawsNumber + ')'
|
||||
this.personCookieEO.resId = this.$route.params.id
|
||||
this.$http.postData('person/personCookies/create', this.personCookieEO, {
|
||||
_this: this
|
||||
}, res => {
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
openFileInPdf (attId) {
|
||||
this.$http.get('lawss/sarLawsFile/queryConvertAtt', {
|
||||
attId: attId
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + res.data.attId))
|
||||
}, e => {
|
||||
this.$Message.error('本地无法读取该文件')
|
||||
})
|
||||
},
|
||||
showDocConvertPage (attId) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$http.get('lawss/sarLawsFile/queryConvertAtt', {
|
||||
attId: attId
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
resolve(res.data)
|
||||
}, e => {
|
||||
this.$Message.error('本地无法读取该文件')
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
downloadFile (attId) {
|
||||
if (attId != null && attId !== '') {
|
||||
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId
|
||||
} else {
|
||||
this.$Message.error('请选择要下载的文件')
|
||||
}
|
||||
},
|
||||
// 统计浏览总数
|
||||
countPageCookie () {
|
||||
this.$http.get('person/personCookies/countPageCookie', {
|
||||
resId: this.$route.params.id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 返回我的收藏
|
||||
back () {
|
||||
this.$router.push(this.$store.state.detailMap)
|
||||
this.$store.commit('setDetailMap', '')
|
||||
},
|
||||
// 法规条目相关方法
|
||||
getOrgTreeSource () {
|
||||
this.$http.get('sys/org/getTree', {}, {_this: this},
|
||||
res => {
|
||||
if (res.ok) {
|
||||
let treeNode = []
|
||||
res.data.map((item, index) => {
|
||||
let treeItem = {}
|
||||
for (let key in item) {
|
||||
if (key === 'orgName') {
|
||||
treeItem.name = item[key]
|
||||
} else {
|
||||
treeItem[key] = item[key]
|
||||
}
|
||||
}
|
||||
treeNode[index] = treeItem
|
||||
})
|
||||
this.depNode = JSON.parse(JSON.stringify(treeNode))
|
||||
this.searchItemsNodes = JSON.parse(JSON.stringify(treeNode))
|
||||
}
|
||||
})
|
||||
},
|
||||
selectNode () {
|
||||
// 当前节点id this.userVO.orgId
|
||||
},
|
||||
tClick (treeId, treeNode) {
|
||||
this.SarLawsItemsEO.responsibleUnit = treeNode.id
|
||||
this.SarLawsItemsEO.responsibleUnitName = treeNode.name
|
||||
$('#depBtns').click()
|
||||
},
|
||||
searchInlandNodesClick (treeId, treeNode) {
|
||||
this.lawsItemsSearch.responsibleUnit = treeNode.id
|
||||
this.lawsItemsSearch.responsibleUnitName = treeNode.name
|
||||
$('#searchItemsDeptBtn').click()
|
||||
},
|
||||
// 分页查询条目
|
||||
searchLawsItems () {
|
||||
let lawsId = this.$route.params.id
|
||||
this.showLawsItemsModal = true
|
||||
this.$http.get('lawss/sarLawsItems/page', {
|
||||
lawsId: lawsId,
|
||||
page: this.itemPage,
|
||||
pageSize: this.itemPageSize,
|
||||
responsibleUnit: this.lawsItemsSearch.responsibleUnit
|
||||
}, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
this.itemsData = res.data.list
|
||||
this.itemsTotal = res.data.count
|
||||
}, e => {
|
||||
|
||||
})
|
||||
},
|
||||
pageChange (page) {
|
||||
this.page = page
|
||||
this.searchLawsItems()
|
||||
},
|
||||
pageSizeChange (pageSize) {
|
||||
this.rows = pageSize
|
||||
this.searchLawsItems()
|
||||
},
|
||||
clearSearchLawsItems () {
|
||||
this.lawsItemsSearch.responsibleUnit = ''
|
||||
this.lawsItemsSearch.responsibleUnitName = ''
|
||||
this.searchLawsItems()
|
||||
},
|
||||
closeItemsModal () {
|
||||
this.lawsItemsSearch.responsibleUnit = ''
|
||||
this.lawsItemsSearch.responsibleUnitName = ''
|
||||
this.$refs.searchItemsTree.clearSearch()
|
||||
this.showLawsItemsModal = false
|
||||
},
|
||||
searchLawsItemsByUnit () {
|
||||
this.searchLawsItems()
|
||||
},
|
||||
// 打开新增条目模态框
|
||||
openAddItemsModal () {
|
||||
// this.SarLawsItemsEO = ''
|
||||
this.SarLawsItemsEO.responsibleUnitName = ''
|
||||
this.$nextTick(() => {
|
||||
this.$refs['SarLawsItemsEO'].resetFields()
|
||||
})
|
||||
this.SarLawsItemsEO.id = ''
|
||||
this.itemFormdisableflag = false
|
||||
this.addLawsItemsModal = true
|
||||
this.addLawsItemsTitle = '新增政策条目'
|
||||
this.saveLawsItemsBtn = true
|
||||
this.getOrgTreeSource()
|
||||
},
|
||||
// 打开编辑条目模态框
|
||||
editLawsItems (row) {
|
||||
this.addLawsItemsModal = true
|
||||
this.saveLawsItemsBtn = true
|
||||
this.SarLawsItemsEO = JSON.parse(JSON.stringify(row))
|
||||
this.SarLawsItemsEO.applyArctic = this.combineToArray(this.SarLawsItemsEO.applyArctic)
|
||||
this.SarLawsItemsEO.energyKind = this.combineToArray(this.SarLawsItemsEO.energyKind)
|
||||
let selectNode = this.getItemTreeNameByid(row.responsibleUnit)
|
||||
this.SarLawsItemsEO.responsibleUnitName = selectNode.name
|
||||
},
|
||||
closeEditItems () {
|
||||
this.addLawsItemsModal = false
|
||||
this.$refs['SarLawsItemsEO'].resetFields()
|
||||
},
|
||||
// 部门树结构,通过id,查出对应的树节点
|
||||
getItemTreeNameByid (treeid) {
|
||||
for (let i = 0; i < this.depNode.length; i++) {
|
||||
if (this.depNode[i].id === treeid) {
|
||||
return this.depNode[i]
|
||||
}
|
||||
}
|
||||
},
|
||||
// 保存条目数据
|
||||
saveLawsItems () {
|
||||
this.$refs['SarLawsItemsEO'].validate((valid) => {
|
||||
if (valid) {
|
||||
let SarLawsItemsEOData = JSON.parse(JSON.stringify(this.SarLawsItemsEO))
|
||||
if (this.SarLawsItemsEO.applyArctic != null && this.SarLawsItemsEO.applyArctic !== '' && this.SarLawsItemsEO.applyArctic !== undefined) {
|
||||
SarLawsItemsEOData.applyArctic = this.breakMultiSelect(this.SarLawsItemsEO.applyArctic)
|
||||
}
|
||||
if (this.SarLawsItemsEO.energyKind != null && this.SarLawsItemsEO.energyKind !== '' && this.SarLawsItemsEO.energyKind !== undefined) {
|
||||
SarLawsItemsEOData.energyKind = this.breakMultiSelect(this.SarLawsItemsEO.energyKind)
|
||||
}
|
||||
if (this.SarLawsItemsEO.tackTime != null && this.SarLawsItemsEO.tackTime !== '') {
|
||||
SarLawsItemsEOData.tackTime = this.$dateFormat(this.SarLawsItemsEO.tackTime, 'yyyy-MM-dd hh:mm:ss')
|
||||
}
|
||||
SarLawsItemsEOData.lawsId = this.$route.params.id
|
||||
if (this.SarLawsItemsEO.id == null || this.SarLawsItemsEO.id === '') {
|
||||
this.$http.postData('lawss/sarLawsItems/addLawsItems', SarLawsItemsEOData, {
|
||||
_this: this,
|
||||
loading: 'isSubmit'
|
||||
}, res => {
|
||||
this.addLawsItemsModal = false
|
||||
this.searchLawsItems()
|
||||
}, e => {
|
||||
})
|
||||
} else {
|
||||
this.$http.putData('lawss/sarLawsItems/updateLawsItems', SarLawsItemsEOData, {
|
||||
_this: this,
|
||||
loading: 'isSubmit'
|
||||
}, res => {
|
||||
this.addLawsItemsModal = false
|
||||
this.searchLawsItems()
|
||||
}, e => {})
|
||||
}
|
||||
} else {
|
||||
this.$Message.error('请检查表单是否填写正确')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 删除条目
|
||||
removeLawsItems (id) {
|
||||
this.$Modal.confirm({
|
||||
title: '确认删除',
|
||||
content: '<p>确认删除该条数据?</p>',
|
||||
onOk: () => {
|
||||
this.$http.put('lawss/sarLawsItems/deleteLawsItems', {
|
||||
id: id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.searchLawsItems()
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
})
|
||||
},
|
||||
getSelectedDatas (selection) {
|
||||
this.saveSelectedItems = selection
|
||||
},
|
||||
batchDeleteItems () {
|
||||
if (this.saveSelectedItems != null && this.saveSelectedItems.length > 0) {
|
||||
let selectDatas = JSON.stringify(this.saveSelectedItems)
|
||||
this.$Modal.confirm({
|
||||
title: '确认删除',
|
||||
content: '<p>确认删除数据?</p>',
|
||||
onOk: () => {
|
||||
this.$http.put('lawss/sarLawsItems/batchDeleteLawsItems', {
|
||||
ids: selectDatas
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.searchLawsItems()
|
||||
this.saveSelectedItems = []
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$Message.error('请选择要删除的数据')
|
||||
}
|
||||
},
|
||||
// 导入标准文件格式错误执行
|
||||
handleFormatError (file) {
|
||||
this.$Message.error('文件' + file.name + '格式不正确,请上传xlsx文件')
|
||||
},
|
||||
// 导入标准数据成功后执行
|
||||
importFileSuccess (response, file) {
|
||||
if (response.ok) {
|
||||
this.showUploadlist = true
|
||||
this.$Message.success(response.message)
|
||||
this.searchLawsItems()
|
||||
this.importModalshowflag = false
|
||||
} else {
|
||||
this.showUploadlist = false
|
||||
this.$Modal.confirm({
|
||||
render: (h) => {
|
||||
return h('div', [
|
||||
h('div', {
|
||||
slot: 'header',
|
||||
style: {
|
||||
color: '#FF0000',
|
||||
fontSize: '18px'
|
||||
}
|
||||
}, '导入失败:'),
|
||||
h('div', {
|
||||
domProps: {
|
||||
innerHTML: response.message
|
||||
},
|
||||
style: {
|
||||
maxHeight: '300px',
|
||||
overflowY: 'auto'
|
||||
}
|
||||
})
|
||||
])
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 导入文件大小超出范围
|
||||
handleSizeError (file) {
|
||||
this.$Message.error('文件' + file.name + '大小不超过200M')
|
||||
},
|
||||
downloadItemsTemplate () {
|
||||
window.open('/api/att/attFile/uploadModalFile?fileName=政策条目导入模板.xlsx')
|
||||
},
|
||||
// 查询相近法规
|
||||
selectCloseLaws (id) {
|
||||
let obj = {}
|
||||
obj.id = id
|
||||
let url = ''
|
||||
url = 'lawss/sarLawsInfo/selectCloseLaws'
|
||||
this.$http.get(url, obj, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.recommendList = res.data
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
addImportModal () {
|
||||
this.importModalshowflag = true
|
||||
this.$refs.importfile.clearFiles()
|
||||
let lawsId = this.SarLawsInfoEO.id
|
||||
this.importExcelUrl = '/api/lawss/sarLawsItems/importLawsItems?lawsId=' + lawsId
|
||||
},
|
||||
// 查看相近法规的详情
|
||||
showRecommendDetials (item) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
name: 'OtherLawsDetails',
|
||||
params: {
|
||||
id: item.id,
|
||||
pageType: item.typeShow
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
},
|
||||
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)
|
||||
}
|
||||
},
|
||||
// 查询标准征求意见审批流程和标准法规实施通知及排查流程的流程号
|
||||
selectProcessNumber (id, type) {
|
||||
let obj = {}
|
||||
obj.standardId = id
|
||||
obj.standardType = type
|
||||
this.$http.get('activiti/busProcess/selectProcessByStandId', obj, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.opinionsProcessList = res.data.opinionsProcessList
|
||||
this.notifiProcessList = res.data.notifiProcessList
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
/**
|
||||
* @description: 日期截取
|
||||
* @author: chenxiaoxi
|
||||
* @date: 2018/11/01 14:11:00
|
||||
*/
|
||||
getDate (date) {
|
||||
return date != null ? date.substring(0, date.indexOf(' ')) : ''
|
||||
},
|
||||
// 分解多选下拉
|
||||
breakMultiSelect (value) {
|
||||
if (value != null && value !== '' && value !== undefined) {
|
||||
let stringValue = ''
|
||||
for (let i = 0; i < value.length; i++) {
|
||||
stringValue += value[i] + ','
|
||||
}
|
||||
return stringValue
|
||||
} else {
|
||||
return value
|
||||
}
|
||||
},
|
||||
// 多选合并为数组显示
|
||||
combineToArray (value) {
|
||||
if (value != null && value !== '' && value !== undefined) {
|
||||
let arrayValue = value.split(',')
|
||||
return arrayValue
|
||||
} else {
|
||||
return value
|
||||
}
|
||||
},
|
||||
// 加载数据字典
|
||||
loadDicTypeDatas () {
|
||||
this.$http.get('sys/dictype/getDicTypeListCode', '', {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.applyArcticOptions = res.data.PRODUCTTYPE
|
||||
this.energyKindOptions = res.data.ENERGYTYPES
|
||||
}, e => {
|
||||
})
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
props: {},
|
||||
computed: {},
|
||||
watch: {},
|
||||
// activated () {
|
||||
// this.sarLawsCopy = JSON.parse((JSON.stringify(this.SarLawsInfoEO)))
|
||||
// this.queryDetails()
|
||||
// },
|
||||
// deactivated () {
|
||||
// this.SarLawsInfoEO = this.sarLawsCopy
|
||||
// },
|
||||
mounted () {
|
||||
this.loadDicTypeDatas()
|
||||
this.getOrgTreeSource()
|
||||
this.sarLawsCopy = JSON.parse((JSON.stringify(this.SarLawsInfoEO)))
|
||||
this.queryDetails()
|
||||
this.selectCloseLaws(this.SarLawsInfoEO.id)
|
||||
this.selectProcessNumber(this.SarLawsInfoEO.id, this.$route.params.pageType)
|
||||
let _this = this
|
||||
this.$nextTick(() => {
|
||||
// 获取父元素height后 减去其他元素的高度和padding
|
||||
let tableHeight = $('.content').css('height')
|
||||
let height = parseInt(tableHeight.substring(0, tableHeight.indexOf('p'))) - 185
|
||||
this.tableHeight = height
|
||||
window.onresize = function () {
|
||||
let tableHeight = $('.content').css('height')
|
||||
let height = parseInt(tableHeight.substring(0, tableHeight.indexOf('p'))) - 185
|
||||
_this.tableHeight = height
|
||||
}
|
||||
})
|
||||
},
|
||||
// 路由离开之前
|
||||
beforeRouteLeave (to, from, next) {
|
||||
// 如果要跳转的地址不是流程页面且暂存了流程表单,则清空后跳转
|
||||
if (this.$store.state.processForm !== '' && to.name !== 'NewProcess') {
|
||||
new Promise((resolve, reject) => {
|
||||
this.$store.commit('setProcessForm', '')
|
||||
this.$store.commit('setProcessStandard', '')
|
||||
resolve()
|
||||
}).then(() => {
|
||||
next()
|
||||
})
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,549 @@
|
||||
<!-- 已收藏的标准拆分 -->
|
||||
<template>
|
||||
<div id="CollectionBreak">
|
||||
<table-tools-bar>
|
||||
<div slot="left">
|
||||
<div class="search-area">
|
||||
<el-form inline class="label-input-form" @keyup.enter.native="selectLawsBtn">
|
||||
<el-form-item label="标准拆分标题" class="search-item search-item-last">
|
||||
<el-input v-model="search.collectionLaws"
|
||||
placeholder="请输入标准拆分标题"
|
||||
clearable
|
||||
:maxlength="100"
|
||||
@keyup.enter.native="selectLawsBtn"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="search-item btn-box">
|
||||
<el-button
|
||||
:loading="searching"
|
||||
icon="el-icon-search"
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
round
|
||||
@click="selectLawsBtn">
|
||||
</el-button>
|
||||
<el-button
|
||||
class="common-button-default"
|
||||
icon="el-icon-refresh-left"
|
||||
round
|
||||
@click="resetSelect"></el-button>
|
||||
<el-button class="common-button-default" round @click="cancleCollectBatch" v-btn-permission="'YEG2HVV27R'"><i class="iconfont"></i>取消收藏</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="right"></div>
|
||||
</table-tools-bar>
|
||||
<div class="content">
|
||||
<el-checkbox :value="checkAll" size="large" @change="handleSelectAll" :indeterminate="indeterminate" style="padding: 6px;padding-left: 15px " v-if="total > 0">{{$t('m.checkAll')}}</el-checkbox>
|
||||
<div class="content-detail" v-if="total >0 && contentOpen">
|
||||
<div v-for="(item,index1) in lawsList" :key="index1">
|
||||
<div class="card domBtn">
|
||||
<el-col :span="1"><el-checkbox v-model="item.checked" size="large"></el-checkbox></el-col>
|
||||
<el-row>
|
||||
<div @click="detailsLaws(item)" >
|
||||
<el-col :span="5" :offset="1">
|
||||
<i class="el-icon-collection-tag" style="position: relative; left: -15px" />
|
||||
所属板块:{{ item.collectType === 'STAND_SPLIT' ? '标准拆分' : '标准拆分' }}
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-tooltip class="item" effect="dark" :content="item.collectTitle" placement="top">
|
||||
<div class="left-contents">标题:{{ item.collectTitle }}</div>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="3"> 创建时间:{{item.creationTime}}</el-col>
|
||||
</div>
|
||||
<el-col :span="4">
|
||||
<el-button size="mini" style="margin-top: -5px; border: 1px dashed #dcdee2" @click="cancelLaws(item.id)" v-btn-permission="'Z78KR8RS7BSZWT6KF6VC'">{{$t('m.cancelCollection')}}</el-button>
|
||||
<!-- <el-button size="mini" style="margin-top: -5px; border: 1px dashed #dcdee2" @click="writeLawsNotes(item,index1)">{{item.seeBtn}}</el-button>-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div :class="{ 'selected ': item.checked }" @click="handleCardClick(item,$event)">
|
||||
<el-button size="mini" icon="el-icon-plus" @click="createNote(item,index1)" v-show="item.check" style="border: 1px dashed #dcdee2" v-btn-permission="'H92BTQYXR6'">添加笔记</el-button>
|
||||
<div class="note" v-for="(note,index2) in item.noteList" :key="index2" v-show="item.check">
|
||||
<div class="noteLeft">笔记{{index2 +1 }}: {{note.noteContentValue}}</div>
|
||||
<div class="noteRight">
|
||||
<el-button type="primary" size="mini" @click="viewData(note)">查看此条笔记</el-button>
|
||||
<el-button type="warning" size="mini" @click="noteEdit(note,index1)" v-btn-permission="'W439CMHC4TU2UZZPNLMF'">修改笔记</el-button>
|
||||
<el-button type="danger" size="mini" @click="noteDel(note,index1)" v-btn-permission="'QCSYVV82PS'">删除笔记</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<has-no-data pClass="content-detail" v-if="total === 0"></has-no-data>
|
||||
<loading :loading="loading">数据获取中</loading>
|
||||
</div>
|
||||
<el-dialog :title="laswsTitle"
|
||||
:close-on-click-modal = false
|
||||
:visible.sync="lawsModal"
|
||||
width="450px"
|
||||
:class="{ 'hide-modal-footer': modalType === 3 }"
|
||||
@on-visible-change="noteChange">
|
||||
<div style="margin-left: 20px">
|
||||
<el-form ref="lawsForm" :model="lawsForm" :rules="lawsFormRules">
|
||||
<el-form-item prop="textarea">
|
||||
<el-input type="textarea" v-model.trim="lawsForm.textarea" maxlength="20000" show-word-limit :autosize="{minRows: 5,maxRows: 7}" :disabled="modalType ===3" placeholder="书写笔记"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="footer">
|
||||
<el-button size="mini" @click="closeModal">取消</el-button>
|
||||
<el-button size="mini" type="primary" @click="saveClass" :loading="isSubmit">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<pagination :total="total" :page="page" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CollectionBreak',
|
||||
data () {
|
||||
return {
|
||||
contentOpen: true,
|
||||
searching: false,
|
||||
saveNote: '',
|
||||
// 加载
|
||||
loading: false,
|
||||
loadDate: false,
|
||||
// 查找内容
|
||||
search: {
|
||||
collectionLaws: ''
|
||||
},
|
||||
// 收藏内容
|
||||
lawsList: [],
|
||||
lawsForm: {
|
||||
textarea: '',
|
||||
collectId: '',
|
||||
id: ''
|
||||
},
|
||||
// 书写模态框
|
||||
lawsModal: false,
|
||||
// 模态框标题
|
||||
laswsTitle: '',
|
||||
// 是否读写
|
||||
noteType: false,
|
||||
// 查看状态
|
||||
modalType: '',
|
||||
total: 0,
|
||||
page: 1,
|
||||
rows: 10,
|
||||
// 笔记规则
|
||||
lawsFormRules: {
|
||||
textarea: [
|
||||
{required: true, message: '笔记不能为空', trigger: 'blur'},
|
||||
{type: 'string', max: 20000, message: '最多输入20000字符'}
|
||||
]
|
||||
},
|
||||
checkAll: false, // 是否全选
|
||||
indeterminate: false, // 是否半选
|
||||
isSubmit: false,
|
||||
selectedList: [],
|
||||
selectedAllInfoList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 对话框关闭清除表单
|
||||
noteChange (type) {
|
||||
if (!type) {
|
||||
this.$refs['lawsForm'].resetFields()
|
||||
}
|
||||
},
|
||||
// 重置
|
||||
resetSelect () {
|
||||
this.search.collectionLaws = ''
|
||||
this.pageChange(1)
|
||||
},
|
||||
// 笔记数字提示
|
||||
descInput () {
|
||||
if (this.lawsForm.textarea.length > 20000) {
|
||||
this.error('最多输入20000字')
|
||||
}
|
||||
},
|
||||
error (msg) {
|
||||
this.$Message.error(msg)
|
||||
},
|
||||
// 跳转
|
||||
detailsLaws (item) {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
let str = item.collectTitle.split('( 编号:')
|
||||
this.$router.push({
|
||||
name: 'ItemSplitInfo',
|
||||
query: {
|
||||
infoId: item.collectResId,
|
||||
standNumSplit: str[1].slice(0, str[1].length - 1),
|
||||
standNameSplit: str[0]
|
||||
}
|
||||
})
|
||||
|
||||
// this.$http.get('lawss/sarMenu/judgeSarMenuByRole', {
|
||||
// sarId: item.collectResId,
|
||||
// sarType: item.collectType
|
||||
// }, {
|
||||
// _this: this
|
||||
// }, res => {
|
||||
// if (res.ok) {
|
||||
// if (this.$hasPermission('A2HDHMEA6W')) {
|
||||
// let routeUrl = this.$router.resolve({
|
||||
// name: 'OtherLawsDetails',
|
||||
// params: {
|
||||
// id: item.collectResId,
|
||||
// pageType: item.collectType
|
||||
// }
|
||||
// })
|
||||
// window.open(routeUrl.href, '_blank')
|
||||
// } else {
|
||||
// this.$Message.warning('无权访问')
|
||||
// }
|
||||
// } else {
|
||||
// this.$Message.error(res.message)
|
||||
// }
|
||||
// }, e => {
|
||||
// this.$Message.error('无权访问')
|
||||
// })
|
||||
},
|
||||
// 分页
|
||||
pageChange (page) {
|
||||
this.page = page
|
||||
this.saveNote = ''
|
||||
this.selectLaws()
|
||||
},
|
||||
pageSizeChange (pageSize) {
|
||||
this.rows = pageSize
|
||||
this.selectLaws()
|
||||
},
|
||||
// 修改笔记
|
||||
noteEdit (note, index) {
|
||||
this.lawsModal = true
|
||||
this.noteType = false
|
||||
this.laswsTitle = '修改笔记'
|
||||
this.modalType = 2
|
||||
this.lawsForm.textarea = note.noteContentValue
|
||||
this.lawsForm.id = note.id
|
||||
this.saveNote = index
|
||||
},
|
||||
// 查看此条笔记
|
||||
viewData (note) {
|
||||
this.lawsModal = true
|
||||
this.laswsTitle = '查看笔记'
|
||||
this.lawsForm.textarea = note.noteContentValue
|
||||
this.noteType = true
|
||||
this.modalType = 3
|
||||
},
|
||||
// 删除笔记
|
||||
noteDel (note, index) {
|
||||
this.saveNote = index
|
||||
this.$confirm('确认删除该条数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('lawss/utNoteInfo/deleteNote', {
|
||||
ids: note.id
|
||||
},
|
||||
{
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.selectLaws()
|
||||
} else {
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 搜索
|
||||
selectLawsBtn () {
|
||||
this.page = 1
|
||||
this.selectLaws()
|
||||
},
|
||||
// 加载已收藏的法规
|
||||
selectLaws () {
|
||||
this.$http.get('person/personCollect/page', {
|
||||
pageNo: this.page,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
modeType: 'SPLIT',
|
||||
collectTitle: this.search.collectionLaws,
|
||||
userId: this.$store.getters.userInfo.userId
|
||||
}, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
// for (let i = 0; i < res.data.list.length; i++) {
|
||||
// res.data.list[i].check = false
|
||||
// res.data.list[i].checked = false
|
||||
// res.data.list[i].seeBtn = '查看笔记'
|
||||
// }
|
||||
res.data.list.map((item, index) => {
|
||||
item.checked = false
|
||||
})
|
||||
this.lawsList = []
|
||||
this.lawsList = res.data.list
|
||||
this.total = res.data.count
|
||||
this.contentOpen = true
|
||||
// if (this.saveNote !== '') {
|
||||
// this.lawsList[this.saveNote].check = true
|
||||
// if (this.lawsList[this.saveNote].check === true) {
|
||||
// this.lawsList[this.saveNote].seeBtn = '关闭笔记'
|
||||
// } else {
|
||||
// this.lawsList[this.saveNote].seeBtn = '查看笔记'
|
||||
// }
|
||||
// }
|
||||
}, e => {})
|
||||
},
|
||||
// 取消收藏
|
||||
cancelLaws (id) {
|
||||
this.$confirm('确定取消收藏此数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.put('person/personCollect/updateByUserId ', {
|
||||
id: id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.contentOpen = false
|
||||
this.pageChange(1)
|
||||
}, e => {
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// 查看笔记
|
||||
writeLawsNotes (item, index) {
|
||||
item.check = !item.check
|
||||
if (item.check === true) {
|
||||
item.seeBtn = '关闭笔记'
|
||||
} else {
|
||||
item.seeBtn = '查看笔记'
|
||||
}
|
||||
for (let i = 0; i < this.lawsList.length; i++) {
|
||||
if (i !== index) {
|
||||
this.lawsList[i].check = false
|
||||
this.lawsList[i].seeBtn = '查看笔记'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 添加笔记
|
||||
createNote (item, index) {
|
||||
this.lawsModal = true
|
||||
this.noteType = false
|
||||
this.modalType = 1
|
||||
this.laswsTitle = '添加笔记'
|
||||
this.lawsForm.textarea = ''
|
||||
this.lawsForm = item
|
||||
this.saveNote = index
|
||||
},
|
||||
closeModal () {
|
||||
this.lawsModal = false
|
||||
this.$refs['lawsForm'].resetFields()
|
||||
},
|
||||
// 添加、修改笔记 事件
|
||||
saveClass () {
|
||||
this.$refs['lawsForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.lawsModal = false
|
||||
if (this.modalType === 1) {
|
||||
let noteForm = {}
|
||||
noteForm.noteContentValue = this.lawsForm.textarea
|
||||
noteForm.sourceType = 'CODEVOTE'
|
||||
noteForm.noteName = this.lawsForm.collectTitle
|
||||
noteForm.sarId = this.lawsForm.id
|
||||
noteForm.forwardId = this.lawsForm.collectResId
|
||||
this.$http.post('lawss/utNoteInfo/saveNote', noteForm, {
|
||||
_this: this,
|
||||
loading: 'isSubmit'
|
||||
}, res => {
|
||||
this.selectLaws()
|
||||
}, e => {
|
||||
})
|
||||
} else if (this.modalType === 2) {
|
||||
let noteForm = {
|
||||
id: this.lawsForm.id,
|
||||
noteContentValue: this.lawsForm.textarea
|
||||
}
|
||||
this.$http.post('lawss/utNoteInfo/updateNote', noteForm, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.selectLaws()
|
||||
}, e => {
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.error('请正确输入')
|
||||
}
|
||||
})
|
||||
},
|
||||
cancleCollectBatch () {
|
||||
if (this.selectedList.length === 0) {
|
||||
this.$confirm('请先选择数据进行取消收藏', '提示', {
|
||||
showCancelButton: false,
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
})
|
||||
} else {
|
||||
(
|
||||
this.$confirm('确定取消这些数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('/person/personCollect/cancelCollectByBatch', {
|
||||
ids: this.selectedList
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.pageChange(1)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
)
|
||||
}
|
||||
},
|
||||
handleCardClick (item, event) {
|
||||
item.checked = !item.checked
|
||||
},
|
||||
// 全选
|
||||
handleSelectAll (checked) {
|
||||
if (checked) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < this.lawsList.length; i++) {
|
||||
this.$set(this.lawsList[i], 'checked', true)
|
||||
this.selectedList.push(this.lawsList[i].id)
|
||||
this.selectedAllInfoList.push(this.lawsList[i])
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < this.lawsList.length; i++) {
|
||||
this.$set(this.lawsList[i], 'checked', false)
|
||||
this.selectedList = []
|
||||
this.selectedAllInfoList = []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
lawsList: {
|
||||
deep: true,
|
||||
handler (newVal, oldVal) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < newVal.length; i++) {
|
||||
if (newVal[i].checked) {
|
||||
this.selectedList.push(newVal[i].id)
|
||||
this.selectedAllInfoList.push(newVal[i])
|
||||
}
|
||||
}
|
||||
if (this.selectedList.length === newVal.length && newVal.length !== 0) {
|
||||
this.checkAll = true
|
||||
this.indeterminate = false
|
||||
} else if (this.selectedList.length === 0) {
|
||||
this.checkAll = false
|
||||
} else {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 已选择的列表
|
||||
selectedList (newVal, oldVal) {
|
||||
if (oldVal.length === this.lawsList.length && newVal.length !== 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = true
|
||||
} else if (newVal.length === 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.selectLaws()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" >
|
||||
//@import '~styles/style';
|
||||
//@import '~styles/mixins';
|
||||
//
|
||||
#CollectionBreak{
|
||||
height: 100%;
|
||||
.content{
|
||||
height: calc(~'100% - 150px');
|
||||
.content-detail{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
/*padding: 5px;*/
|
||||
background-color: #FFF;
|
||||
.card{
|
||||
width: 100%;
|
||||
height: 1rem;
|
||||
line-height: 1rem;
|
||||
border: 1px solid #EEE;
|
||||
margin-bottom: 4px;
|
||||
transition: all .2s ease-in-out;
|
||||
cursor: pointer;
|
||||
background: #FFF;
|
||||
padding-left: 14px;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
//.un-select();
|
||||
.left-contents{
|
||||
width: 100%;
|
||||
//.ellipsis()
|
||||
}
|
||||
.ivu-row{
|
||||
height: 100%;
|
||||
.ivu-col{
|
||||
height: 100%;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
&:hover{
|
||||
box-shadow: 0px 1px 13px 0px #DDD;
|
||||
}
|
||||
}
|
||||
.note{
|
||||
font-size:15px;
|
||||
line-height: 1rem;
|
||||
height: 1rem;
|
||||
clear: both;
|
||||
margin: 0 1rem;
|
||||
.noteLeft{
|
||||
float: left;
|
||||
width: 70%;
|
||||
height: auto;
|
||||
}
|
||||
.noteRight{
|
||||
float: right;
|
||||
width: 30%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.lawsDisplay{
|
||||
display: none;
|
||||
}
|
||||
.hide-modal-footer {
|
||||
.ivu-modal-footer {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.domBtn {
|
||||
border:1px gray solid;
|
||||
background-color:#FFE6B0
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,555 @@
|
||||
<!-- 已收藏的动态 -->
|
||||
<template>
|
||||
<div id="CollectionDynamics">
|
||||
<table-tools-bar>
|
||||
<div slot="left">
|
||||
<div class="search-area">
|
||||
<el-form :inline="true" class="label-input-form" @keyup.enter.native="selectDynamicsBtn">
|
||||
<el-form-item label="动态标题搜索" class="search-item search-item-last">
|
||||
<el-input v-model="search.collectionDynamics"
|
||||
placeholder="请输入动态标题"
|
||||
clearable
|
||||
:maxlength="100"
|
||||
@keyup.enter.native="selectDynamicsBtn"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="search-item btn-box">
|
||||
<el-button
|
||||
:loading="searching"
|
||||
icon="el-icon-search"
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
round
|
||||
@click="selectDynamicsBtn">
|
||||
</el-button>
|
||||
<el-button
|
||||
class="common-button-default"
|
||||
icon="el-icon-refresh-left"
|
||||
round
|
||||
@click="resetSelect"></el-button>
|
||||
<el-button class="common-button-default" round @click="cancleCollectBatch" v-btn-permission="'YEG2HVV27R'"><i class="iconfont"></i>取消收藏</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="right"></div>
|
||||
</table-tools-bar>
|
||||
<div class="content">
|
||||
<el-checkbox :value="checkAll" size="large" @change="handleSelectAll" :indeterminate="indeterminate" style="padding: 6px;padding-left: 15px " v-if="total > 0">{{$t('m.checkAll')}}</el-checkbox>
|
||||
<div class="content-detail" v-if="total >0 && contentOpen">
|
||||
<div v-for="(item,index1) in dynamicsList" :key="index1" >
|
||||
<div class="card domBtn">
|
||||
<el-col :span="1"><el-checkbox v-model="item.checked" size="large"></el-checkbox></el-col>
|
||||
<el-row>
|
||||
<div @click="detailsDynamics(item)">
|
||||
<el-col :span="5" :offset="1">
|
||||
<i class="el-icon-collection-tag" style="position: relative; left: -15px" />
|
||||
所属板块:{{ item.collectType === 'INLAND_MSG' ? '动态信息' : '资料中心' }}
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-tooltip class="item" effect="dark" :content="item.collectTitle" placement="top">
|
||||
<div class="left-contents">标题:{{ item.collectTitle }}</div>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="3">创建时间:{{getDate(item.creationTime)}}</el-col>
|
||||
</div>
|
||||
<el-col :span="4">
|
||||
<el-button size="mini" @click="cancelDynamics(item.id)" style="margin-top: -5px; border: 1px dashed #dcdee2" v-btn-permission="'3XZQZVL27Z'">{{$t('m.cancelCollection')}}</el-button>
|
||||
<!-- <el-button size="mini" @click="writeDynamicsNotes(item, index1)" style="margin-top: -5px; border: 1px dashed #dcdee2">{{item.seeBtn}}</el-button>-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div :class="{ 'selected ': item.checked }" @click="handleCardClick(item,$event)">
|
||||
<el-button size="mini" icon="el-icon-plus" @click="createDynamicsNote(item,index1)" style="border: 1px dashed #dcdee2" v-show="item.check" v-btn-permission="'A9BEUNR3UG'">添加笔记</el-button>
|
||||
<div class="note" v-show="item.check" v-for="(note,index2) in item.noteList" :key="index2">
|
||||
<div class="noteLeft">笔记{{index2 +1 }}: {{note.noteContentValue}}</div>
|
||||
<div class="noteRight">
|
||||
<el-button type="primary" size="mini" @click="viewDynamicsData(note)">查看此条笔记</el-button>
|
||||
<el-button type="warning" size="mini" @click="noteDynamicsEdit(note, index1)" v-btn-permission="'DUYQK7WNZB'">修改笔记</el-button>
|
||||
<el-button type="danger" size="mini" @click="noteDynamicsDel(note, index1)" v-btn-permission="'DU8C8CNRDW'">删除笔记</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<has-no-data pClass="content-detail" v-if="total === 0"></has-no-data>
|
||||
<loading :loading="loading">数据获取中</loading>
|
||||
</div>
|
||||
<el-dialog
|
||||
:title="dynamicsTitle"
|
||||
:visible.sync="dynamicsModal"
|
||||
:close-on-click-modal = false
|
||||
width="450px" :class="{ 'hide-modal-footer': modalType === 3 }"
|
||||
@on-visible-change="noteChange">
|
||||
<div style="margin-left: 20px">
|
||||
<el-form ref="dynamicsForm" :model="dynamicsForm" :rules="dynamicsFormRules">
|
||||
<el-form-item prop="textarea">
|
||||
<el-input type="textarea" v-model.trim="dynamicsForm.textarea" maxlength="20000" show-word-limit :autosize="{minRows: 5,maxRows: 7}" :disabled="noteType" :placeholder="$t('m.writingNotes')"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="footer">
|
||||
<el-button size="mini" @click="closeModal">{{$t('m.cancel')}}</el-button>
|
||||
<el-button size="mini" type="primary" @click="saveClass" :loading="isSubmit">{{$t('m.confirm')}}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<pagination :total="total" :page="page" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CollectionDynamics',
|
||||
data () {
|
||||
return {
|
||||
contentOpen: true,
|
||||
searching: false,
|
||||
saveNote: '',
|
||||
// 加载
|
||||
loading: false,
|
||||
loadDate: false,
|
||||
// 查询
|
||||
search: {
|
||||
collectionDynamics: ''
|
||||
},
|
||||
// 分页
|
||||
total: 0,
|
||||
page: 1,
|
||||
rows: 10,
|
||||
// 数据内容
|
||||
dynamicsList: [],
|
||||
// 对话框状态
|
||||
dynamicsModal: false,
|
||||
// 对话框标题
|
||||
dynamicsTitle: '',
|
||||
// 对话框内容
|
||||
dynamicsForm: {
|
||||
textarea: '',
|
||||
collectId: '',
|
||||
id: ''
|
||||
},
|
||||
modalType: '',
|
||||
// 是否读写
|
||||
noteType: false,
|
||||
// 计算
|
||||
// 笔记规则
|
||||
dynamicsFormRules: {
|
||||
textarea: [
|
||||
{required: true, message: '笔记不能为空', trigger: 'blur'},
|
||||
{type: 'string', max: 20000, message: '最多输入20000字符'}
|
||||
]
|
||||
},
|
||||
checkAll: false, // 是否全选
|
||||
indeterminate: false, // 是否半选
|
||||
isSubmit: false,
|
||||
selectedList: [],
|
||||
selectedAllInfoList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 对话框关闭清除表单
|
||||
noteChange (type) {
|
||||
if (!type) {
|
||||
this.$refs['dynamicsForm'].resetFields()
|
||||
}
|
||||
},
|
||||
// 重置
|
||||
resetSelect () {
|
||||
this.search.collectionDynamics = ''
|
||||
this.pageChange(1)
|
||||
},
|
||||
// 笔记数字提示
|
||||
descInput () {
|
||||
if (this.dynamicsForm.textarea.length > 20000) {
|
||||
this.error('最多输入20000字')
|
||||
}
|
||||
},
|
||||
error (msg) {
|
||||
this.$Message.error(msg)
|
||||
},
|
||||
// 跳转
|
||||
detailsDynamics (item) {
|
||||
if (item.collectType === 'RESOURCE_MSG') {
|
||||
// 资料中心
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
const route = this.$router.resolve({
|
||||
name: 'DynamicInfomationDetails2',
|
||||
query: {
|
||||
id: item.collectResId,
|
||||
pageType: item.collectType
|
||||
}
|
||||
})
|
||||
window.open(route.href, '_blank')
|
||||
} else if (item.collectType === 'INLAND_MSG') {
|
||||
// 动态信息
|
||||
this.$router.push({
|
||||
name: 'informationIndex2',
|
||||
query: {
|
||||
id: item.collectResId
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 分页
|
||||
pageChange (page) {
|
||||
this.page = page
|
||||
this.saveNote = ''
|
||||
this.selectDynamics()
|
||||
},
|
||||
pageSizeChange (pageSize) {
|
||||
this.rows = pageSize
|
||||
this.saveNote = ''
|
||||
this.selectDynamics()
|
||||
},
|
||||
// 搜索
|
||||
selectDynamicsBtn () {
|
||||
this.page = 1
|
||||
this.selectDynamics()
|
||||
},
|
||||
// 检索 加载表格
|
||||
selectDynamics () {
|
||||
this.$http.get('person/personCollect/page', {
|
||||
pageNo: this.page,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
modeType: 'MSG',
|
||||
collectTitle: this.search.collectionDynamics,
|
||||
userId: this.$store.getters.userInfo.userId
|
||||
}, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
// for (let i = 0; i < res.data.list.length; i++) {
|
||||
// res.data.list[i].checked = false
|
||||
// res.data.list[i].check = false
|
||||
// res.data.list[i].seeBtn = '查看笔记'
|
||||
// }
|
||||
this.dynamicsList = []
|
||||
res.data.list.map((item, index) => {
|
||||
item.checked = false
|
||||
})
|
||||
this.dynamicsList = res.data.list
|
||||
this.total = res.data.count
|
||||
this.contentOpen = true
|
||||
// if (this.saveNote !== '') {
|
||||
// this.dynamicsList[this.saveNote].check = true
|
||||
// if (this.dynamicsList[this.saveNote].check === true) {
|
||||
// this.dynamicsList[this.saveNote].seeBtn = '关闭笔记'
|
||||
// } else {
|
||||
// this.dynamicsList[this.saveNote].seeBtn = '查看笔记'
|
||||
// }
|
||||
// }
|
||||
}, e => {})
|
||||
},
|
||||
// 取消收藏
|
||||
cancelDynamics (id) {
|
||||
this.$confirm('确定取消收藏此数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.put('person/personCollect/updateByUserId ', {
|
||||
modeType: 'MSG',
|
||||
id: id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.contentOpen = false
|
||||
this.pageChange(1)
|
||||
}, e => {
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// 查看笔记
|
||||
writeDynamicsNotes (item, index) {
|
||||
item.check = !item.check
|
||||
if (item.check === true) {
|
||||
item.seeBtn = '关闭笔记'
|
||||
} else {
|
||||
item.seeBtn = '查看笔记'
|
||||
}
|
||||
for (let i = 0; i < this.dynamicsList.length; i++) {
|
||||
if (i !== index) {
|
||||
this.dynamicsList[i].check = false
|
||||
this.dynamicsList[i].seeBtn = '查看笔记'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 添加笔记
|
||||
createDynamicsNote (item, index) {
|
||||
this.dynamicsModal = true
|
||||
this.noteType = false
|
||||
this.modalType = 1
|
||||
this.dynamicsTitle = '添加笔记'
|
||||
this.dynamicsForm.textarea = ''
|
||||
this.dynamicsForm = item
|
||||
this.saveNote = index
|
||||
},
|
||||
// 查看此条笔记
|
||||
viewDynamicsData (note) {
|
||||
this.dynamicsModal = true
|
||||
this.dynamicsTitle = '查看笔记'
|
||||
this.dynamicsForm.textarea = note.noteContentValue
|
||||
this.noteType = true
|
||||
this.modalType = 3
|
||||
},
|
||||
// 修改笔记
|
||||
noteDynamicsEdit (note, index) {
|
||||
this.saveNote = index
|
||||
this.dynamicsModal = true
|
||||
this.noteType = false
|
||||
this.dynamicsTitle = '修改笔记'
|
||||
this.modalType = 2
|
||||
this.dynamicsForm.textarea = note.noteContentValue
|
||||
this.dynamicsForm.id = note.id
|
||||
},
|
||||
// 删除笔记
|
||||
noteDynamicsDel (note, index) {
|
||||
this.saveNote = index
|
||||
this.$confirm('确认删除该条数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('lawss/utNoteInfo/deleteNote', {
|
||||
ids: note.id
|
||||
},
|
||||
{
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.selectDynamics()
|
||||
} else {
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
closeModal () {
|
||||
this.dynamicsModal = false
|
||||
this.$refs['dynamicsForm'].resetFields()
|
||||
},
|
||||
// 添加、编辑 笔记 保存事件
|
||||
saveClass () {
|
||||
this.$refs['dynamicsForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.dynamicsModal = false
|
||||
if (this.modalType === 1) {
|
||||
let noteForm = {}
|
||||
noteForm.noteContentValue = this.dynamicsForm.textarea
|
||||
noteForm.sourceType = 'COMOVING'
|
||||
noteForm.noteName = this.dynamicsForm.collectTitle
|
||||
noteForm.sarId = this.dynamicsForm.id
|
||||
noteForm.forwardId = this.dynamicsForm.collectResId
|
||||
this.$http.post('lawss/utNoteInfo/saveNote', noteForm, {
|
||||
_this: this,
|
||||
loading: 'isSubmit'
|
||||
}, res => {
|
||||
this.selectDynamics()
|
||||
}, e => {
|
||||
})
|
||||
} else if (this.modalType === 2) {
|
||||
let noteForm = {
|
||||
id: this.dynamicsForm.id,
|
||||
noteContentValue: this.dynamicsForm.textarea
|
||||
}
|
||||
this.$http.post('lawss/utNoteInfo/updateNote', noteForm, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.selectDynamics()
|
||||
}, e => {
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.error('请正确输入')
|
||||
}
|
||||
})
|
||||
},
|
||||
getDate (date) {
|
||||
return date != null ? date.substring(0, date.indexOf(' ')) : ''
|
||||
},
|
||||
cancleCollectBatch () {
|
||||
// if (this.selectedList.length === 0) {
|
||||
// this.$Message.error('请先选择数据进行取消收藏')
|
||||
// } else {
|
||||
// this.$Modal.confirm({
|
||||
// title: '请选择',
|
||||
// content: '确定取消收藏选中数据?',
|
||||
// onOk: () => {
|
||||
// this.$http.post('/person/personCollect/cancelCollectByBatch', {
|
||||
// ids: this.selectedList
|
||||
// }, {
|
||||
// _this: this
|
||||
// }, res => {
|
||||
// this.selectDynamics()
|
||||
// }, e => {
|
||||
// })
|
||||
// },
|
||||
// onCancel: () => {
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
if (this.selectedList.length === 0) {
|
||||
this.$confirm('请先选择数据进行取消收藏', '提示', {
|
||||
showCancelButton: false,
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
})
|
||||
} else {
|
||||
(
|
||||
this.$confirm('确定取消这些数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('/person/personCollect/cancelCollectByBatch', {
|
||||
ids: this.selectedList
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.pageChange(1)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
)
|
||||
}
|
||||
},
|
||||
handleCardClick (item, event) {
|
||||
item.checked = !item.checked
|
||||
},
|
||||
// 全选
|
||||
handleSelectAll (checked) {
|
||||
if (checked) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < this.dynamicsList.length; i++) {
|
||||
this.$set(this.dynamicsList[i], 'checked', true)
|
||||
this.selectedList.push(this.dynamicsList[i].id)
|
||||
this.selectedAllInfoList.push(this.dynamicsList[i])
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < this.dynamicsList.length; i++) {
|
||||
this.$set(this.dynamicsList[i], 'checked', false)
|
||||
this.selectedList = []
|
||||
this.selectedAllInfoList = []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dynamicsList: {
|
||||
deep: true,
|
||||
handler (newVal, oldVal) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < newVal.length; i++) {
|
||||
if (newVal[i].checked) {
|
||||
this.selectedList.push(newVal[i].id)
|
||||
this.selectedAllInfoList.push(newVal[i])
|
||||
}
|
||||
}
|
||||
if (this.selectedList.length === newVal.length && newVal.length !== 0) {
|
||||
this.checkAll = true
|
||||
this.indeterminate = false
|
||||
} else if (this.selectedList.length === 0) {
|
||||
this.checkAll = false
|
||||
} else {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 已选择的列表
|
||||
selectedList (newVal, oldVal) {
|
||||
if (oldVal.length === this.dynamicsList.length && newVal.length !== 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = true
|
||||
} else if (newVal.length === 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.selectDynamics()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
//@import '~styles/style';
|
||||
//@import '~styles/mixins';
|
||||
#CollectionDynamics{
|
||||
height: 100%;
|
||||
.content{
|
||||
height: calc(~'100% - 150px');
|
||||
.content-detail{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
/*padding: 0.1rem;*/
|
||||
// padding: 5px;
|
||||
background-color: white;
|
||||
.card{
|
||||
width: 100%;
|
||||
height: 1rem;
|
||||
line-height:1rem;
|
||||
border: 1px solid #EEE;
|
||||
margin-bottom: 4px;
|
||||
transition: all .2s ease-in-out;
|
||||
cursor: pointer;
|
||||
/*padding: 14px;*/
|
||||
background: #FFF;
|
||||
padding-left: 14px;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
//.un-select();
|
||||
.left-contents{
|
||||
width: 100%;
|
||||
//.ellipsis()
|
||||
}
|
||||
.ivu-row{
|
||||
height: 100%;
|
||||
.ivu-col{
|
||||
height: 100%;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
&:hover{
|
||||
box-shadow: 0px 1px 13px 0px #DDD;
|
||||
}
|
||||
}
|
||||
|
||||
.note{
|
||||
font-size:15px;
|
||||
line-height: 1rem;
|
||||
height: 1rem;
|
||||
clear: both;
|
||||
margin: 0 1rem;
|
||||
.noteLeft{
|
||||
float: left;
|
||||
width: 70%;
|
||||
height: auto;
|
||||
}
|
||||
.noteRight{
|
||||
float: right;
|
||||
width: 30%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.domBtn {
|
||||
border:1px gray solid;
|
||||
background-color:#FFE6B0
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,576 @@
|
||||
<!-- 已收藏的政策 -->
|
||||
<template>
|
||||
<div id="collection-laws">
|
||||
<table-tools-bar>
|
||||
<div slot="left">
|
||||
<div class="search-area">
|
||||
<el-form :inline="true" class="label-input-form" @keyup.enter.native="selectLawsBtn">
|
||||
<el-form-item label="政策标题搜索" class="search-item search-item-last">
|
||||
<el-input v-model="search.collectionLaws"
|
||||
placeholder="请输入政策标题"
|
||||
clearable
|
||||
:maxlength="100"
|
||||
@keyup.enter.native="selectLawsBtn"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="search-item btn-box">
|
||||
<el-button
|
||||
:loading="searching"
|
||||
icon="el-icon-search"
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
round
|
||||
@click="selectLawsBtn">
|
||||
</el-button>
|
||||
<el-button
|
||||
class="common-button-default"
|
||||
icon="el-icon-refresh-left"
|
||||
round
|
||||
@click="resetSelect"></el-button>
|
||||
<el-button class="common-button-default" round @click="cancleCollectBatch" v-btn-permission="'YEG2HVV27R'"><i class="iconfont"></i>取消收藏</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="right"></div>
|
||||
</table-tools-bar>
|
||||
<div class="content">
|
||||
<el-checkbox :value="checkAll" size="large" @change="handleSelectAll" :indeterminate="indeterminate" style="padding: 6px;padding-left: 15px " v-if="total > 0">{{$t('m.checkAll')}}</el-checkbox>
|
||||
<div class="content-detail" v-if="total >0 && contentOpen">
|
||||
<div v-for="(item,index1) in lawsList" :key="index1">
|
||||
<div class="card domBtn">
|
||||
<el-col :span="1"><el-checkbox v-model="item.checked" size="large"></el-checkbox></el-col>
|
||||
<el-row>
|
||||
<div @click="detailsLaws(item)" >
|
||||
<el-col :span="5" :offset="1">
|
||||
<i class="el-icon-collection-tag" style="position: relative; left: -15px" />
|
||||
所属板块:{{ item.collectType === 'INLAND_LAWS' ? '国内政策' : '国外政策' }}
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-tooltip class="item" effect="dark" :content="item.collectTitle" placement="top">
|
||||
<div class="left-contents">标题:{{ item.collectTitle }}</div>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="3"> 创建时间:{{item.creationTime}}</el-col>
|
||||
</div>
|
||||
<el-col :span="4">
|
||||
<el-button size="mini" style="margin-top: -5px; border: 1px dashed #dcdee2" @click="cancelLaws(item.id)" v-btn-permission="'66SSMTSGN3UKCQB4LDRD'">{{$t('m.cancelCollection')}}</el-button>
|
||||
<!-- <el-button size="mini" style="margin-top: -5px; border: 1px dashed #dcdee2" @click="writeLawsNotes(item,index1)">{{item.seeBtn}}</el-button>-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div :class="{ 'selected ': item.checked }" @click="handleCardClick(item,$event)">
|
||||
<el-button size="mini" icon="el-icon-plus" @click="createNote(item,index1)" v-show="item.check" style="border: 1px dashed #dcdee2" v-btn-permission="'H92BTQYXR6'">添加笔记</el-button>
|
||||
<div class="note" v-for="(note,index2) in item.noteList" :key="index2" v-show="item.check">
|
||||
<div class="noteLeft">笔记{{index2 +1 }}: {{note.noteContentValue}}</div>
|
||||
<div class="noteRight">
|
||||
<el-button type="primary" size="mini" @click="viewData(note)">查看此条笔记</el-button>
|
||||
<el-button type="warning" size="mini" @click="noteEdit(note,index1)" v-btn-permission="'RVZK5WGGMXW7AMZRLBXX'">修改笔记</el-button>
|
||||
<el-button type="danger" size="mini" @click="noteDel(note,index1)" v-btn-permission="'QCSYVV82PS'">删除笔记</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<has-no-data pClass="content-detail" v-if="total === 0"></has-no-data>
|
||||
<loading :loading="loading">数据获取中</loading>
|
||||
</div>
|
||||
<el-dialog :title="laswsTitle"
|
||||
:close-on-click-modal = false
|
||||
:visible.sync="lawsModal"
|
||||
width="450px"
|
||||
:class="{ 'hide-modal-footer': modalType === 3 }"
|
||||
@on-visible-change="noteChange">
|
||||
<div style="margin-left: 20px">
|
||||
<el-form ref="lawsForm" :model="lawsForm" :rules="lawsFormRules">
|
||||
<el-form-item prop="textarea">
|
||||
<el-input type="textarea" v-model.trim="lawsForm.textarea" maxlength="20000" show-word-limit :autosize="{minRows: 5,maxRows: 7}" :disabled="modalType ===3" placeholder="书写笔记"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="footer">
|
||||
<el-button size="mini" @click="closeModal">取消</el-button>
|
||||
<el-button size="mini" type="primary" @click="saveClass" :loading="isSubmit">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<pagination :total="total" :page="page" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'collection-laws',
|
||||
data () {
|
||||
return {
|
||||
contentOpen: true,
|
||||
searching: false,
|
||||
saveNote: '',
|
||||
// 加载
|
||||
loading: false,
|
||||
loadDate: false,
|
||||
// 查找内容
|
||||
search: {
|
||||
collectionLaws: ''
|
||||
},
|
||||
// 收藏内容
|
||||
lawsList: [],
|
||||
lawsForm: {
|
||||
textarea: '',
|
||||
collectId: '',
|
||||
id: ''
|
||||
},
|
||||
// 书写模态框
|
||||
lawsModal: false,
|
||||
// 模态框标题
|
||||
laswsTitle: '',
|
||||
// 是否读写
|
||||
noteType: false,
|
||||
// 查看状态
|
||||
modalType: '',
|
||||
total: 0,
|
||||
page: 1,
|
||||
rows: 10,
|
||||
// 笔记规则
|
||||
lawsFormRules: {
|
||||
textarea: [
|
||||
{required: true, message: '笔记不能为空', trigger: 'blur'},
|
||||
{type: 'string', max: 20000, message: '最多输入20000字符'}
|
||||
]
|
||||
},
|
||||
checkAll: false, // 是否全选
|
||||
indeterminate: false, // 是否半选
|
||||
isSubmit: false,
|
||||
selectedList: [],
|
||||
selectedAllInfoList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 对话框关闭清除表单
|
||||
noteChange (type) {
|
||||
if (!type) {
|
||||
this.$refs['lawsForm'].resetFields()
|
||||
}
|
||||
},
|
||||
// 重置
|
||||
resetSelect () {
|
||||
this.search.collectionLaws = ''
|
||||
this.pageChange(1)
|
||||
},
|
||||
// 笔记数字提示
|
||||
descInput () {
|
||||
if (this.lawsForm.textarea.length > 20000) {
|
||||
this.error('最多输入20000字')
|
||||
}
|
||||
},
|
||||
error (msg) {
|
||||
this.$Message.error(msg)
|
||||
},
|
||||
// 跳转
|
||||
detailsLaws (item) {
|
||||
// document.cookie = 'collectionType=' + item.collectType
|
||||
// this.$store.commit('setDetailMap', this.$route.path)
|
||||
// this.$router.push({
|
||||
// name: 'CollectionRegulationsDetail',
|
||||
// params: {
|
||||
// id: item.collectResId,
|
||||
// pageType: item.collectType
|
||||
// }
|
||||
// })
|
||||
this.$http.get('lawss/sarMenu/judgeSarMenuByRole', {
|
||||
sarId: item.collectResId,
|
||||
sarType: item.collectType
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
if (this.$hasPermission('A2HDHMEA6W')) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
name: 'OtherLawsDetails',
|
||||
params: {
|
||||
id: item.collectResId,
|
||||
pageType: item.collectType
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
} else {
|
||||
let routeUrl = this.$router.resolve({
|
||||
name: 'OtherLawsDetails',
|
||||
params: {
|
||||
id: item.collectResId,
|
||||
pageType: item.collectType
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
//this.$Message.warning('无权访问')
|
||||
}
|
||||
} else {
|
||||
this.$Message.error(res.message)
|
||||
}
|
||||
}, e => {
|
||||
this.$Message.error('无权访问')
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
pageChange (page) {
|
||||
this.page = page
|
||||
this.saveNote = ''
|
||||
this.selectLaws()
|
||||
},
|
||||
pageSizeChange (pageSize) {
|
||||
this.rows = pageSize
|
||||
this.selectLaws()
|
||||
},
|
||||
// 修改笔记
|
||||
noteEdit (note, index) {
|
||||
this.lawsModal = true
|
||||
this.noteType = false
|
||||
this.laswsTitle = '修改笔记'
|
||||
this.modalType = 2
|
||||
this.lawsForm.textarea = note.noteContentValue
|
||||
this.lawsForm.id = note.id
|
||||
this.saveNote = index
|
||||
},
|
||||
// 查看此条笔记
|
||||
viewData (note) {
|
||||
this.lawsModal = true
|
||||
this.laswsTitle = '查看笔记'
|
||||
this.lawsForm.textarea = note.noteContentValue
|
||||
this.noteType = true
|
||||
this.modalType = 3
|
||||
},
|
||||
// 删除笔记
|
||||
noteDel (note, index) {
|
||||
this.saveNote = index
|
||||
this.$confirm('确认删除该条数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('lawss/utNoteInfo/deleteNote', {
|
||||
ids: note.id
|
||||
},
|
||||
{
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.selectLaws()
|
||||
} else {
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
})
|
||||
},
|
||||
// 搜索
|
||||
selectLawsBtn () {
|
||||
this.page = 1
|
||||
this.selectLaws()
|
||||
},
|
||||
// 加载已收藏的法规
|
||||
selectLaws () {
|
||||
this.$http.get('person/personCollect/page', {
|
||||
pageNo: this.page,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
modeType: 'LAWS',
|
||||
collectTitle: this.search.collectionLaws,
|
||||
userId: this.$store.getters.userInfo.userId
|
||||
}, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
// for (let i = 0; i < res.data.list.length; i++) {
|
||||
// res.data.list[i].check = false
|
||||
// res.data.list[i].checked = false
|
||||
// res.data.list[i].seeBtn = '查看笔记'
|
||||
// }
|
||||
this.lawsList = []
|
||||
res.data.list.map((item, index) => {
|
||||
item.checked = false
|
||||
})
|
||||
this.lawsList = res.data.list
|
||||
this.total = res.data.count
|
||||
this.contentOpen = true
|
||||
// if (this.saveNote !== '') {
|
||||
// this.lawsList[this.saveNote].check = true
|
||||
// if (this.lawsList[this.saveNote].check === true) {
|
||||
// this.lawsList[this.saveNote].seeBtn = '关闭笔记'
|
||||
// } else {
|
||||
// this.lawsList[this.saveNote].seeBtn = '查看笔记'
|
||||
// }
|
||||
// }
|
||||
}, e => {})
|
||||
},
|
||||
// 取消收藏
|
||||
cancelLaws (id) {
|
||||
this.$confirm('确定取消收藏此数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.put('person/personCollect/updateByUserId ', {
|
||||
id: id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.contentOpen = false
|
||||
this.pageChange(1)
|
||||
}, e => {
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// 查看笔记
|
||||
writeLawsNotes (item, index) {
|
||||
item.check = !item.check
|
||||
if (item.check === true) {
|
||||
item.seeBtn = '关闭笔记'
|
||||
} else {
|
||||
item.seeBtn = '查看笔记'
|
||||
}
|
||||
for (let i = 0; i < this.lawsList.length; i++) {
|
||||
if (i !== index) {
|
||||
this.lawsList[i].check = false
|
||||
this.lawsList[i].seeBtn = '查看笔记'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 添加笔记
|
||||
createNote (item, index) {
|
||||
this.lawsModal = true
|
||||
this.noteType = false
|
||||
this.modalType = 1
|
||||
this.laswsTitle = '添加笔记'
|
||||
this.lawsForm.textarea = ''
|
||||
this.lawsForm = item
|
||||
this.saveNote = index
|
||||
},
|
||||
closeModal () {
|
||||
this.lawsModal = false
|
||||
this.$refs['lawsForm'].resetFields()
|
||||
},
|
||||
// 保存笔记 (新增、编辑)
|
||||
saveClass () {
|
||||
this.$refs['lawsForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.lawsModal = false
|
||||
if (this.modalType === 1) {
|
||||
let noteForm = {}
|
||||
noteForm.noteContentValue = this.lawsForm.textarea
|
||||
noteForm.sourceType = 'COLAWS'
|
||||
noteForm.noteName = this.lawsForm.collectTitle
|
||||
noteForm.sarId = this.lawsForm.id
|
||||
noteForm.forwardId = this.lawsForm.collectResId
|
||||
this.$http.post('lawss/utNoteInfo/saveNote', noteForm, {
|
||||
_this: this,
|
||||
loading: 'isSubmit'
|
||||
}, res => {
|
||||
this.selectLaws()
|
||||
}, e => {
|
||||
})
|
||||
} else if (this.modalType === 2) {
|
||||
let noteForm = {
|
||||
id: this.lawsForm.id,
|
||||
noteContentValue: this.lawsForm.textarea
|
||||
}
|
||||
this.$http.post('lawss/utNoteInfo/updateNote', noteForm, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.selectLaws()
|
||||
}, e => {
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.error('请正确输入')
|
||||
}
|
||||
})
|
||||
},
|
||||
cancleCollectBatch () {
|
||||
// if (this.selectedList.length === 0) {
|
||||
// this.$Message.error('请先选择数据进行取消收藏')
|
||||
// } else {
|
||||
// this.$Modal.confirm({
|
||||
// title: '请选择',
|
||||
// content: '确定取消收藏选中数据?',
|
||||
// onOk: () => {
|
||||
// this.$http.post('/person/personCollect/cancelCollectByBatch', {
|
||||
// ids: this.selectedList
|
||||
// }, {
|
||||
// _this: this
|
||||
// }, res => {
|
||||
// this.selectStandard()
|
||||
// }, e => {
|
||||
// })
|
||||
// },
|
||||
// onCancel: () => {
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
if (this.selectedList.length === 0) {
|
||||
this.$confirm('请先选择数据进行取消收藏', '提示', {
|
||||
showCancelButton: false,
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
})
|
||||
} else {
|
||||
(
|
||||
this.$confirm('确定取消这些数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('/person/personCollect/cancelCollectByBatch', {
|
||||
ids: this.selectedList
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.pageChange(1)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
)
|
||||
}
|
||||
},
|
||||
handleCardClick (item, event) {
|
||||
item.checked = !item.checked
|
||||
},
|
||||
// 全选
|
||||
handleSelectAll (checked) {
|
||||
if (checked) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < this.lawsList.length; i++) {
|
||||
this.$set(this.lawsList[i], 'checked', true)
|
||||
this.selectedList.push(this.lawsList[i].id)
|
||||
this.selectedAllInfoList.push(this.lawsList[i])
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < this.lawsList.length; i++) {
|
||||
this.$set(this.lawsList[i], 'checked', false)
|
||||
this.selectedList = []
|
||||
this.selectedAllInfoList = []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
lawsList: {
|
||||
deep: true,
|
||||
handler (newVal, oldVal) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < newVal.length; i++) {
|
||||
if (newVal[i].checked) {
|
||||
this.selectedList.push(newVal[i].id)
|
||||
this.selectedAllInfoList.push(newVal[i])
|
||||
}
|
||||
}
|
||||
if (this.selectedList.length === newVal.length && newVal.length !== 0) {
|
||||
this.checkAll = true
|
||||
this.indeterminate = false
|
||||
} else if (this.selectedList.length === 0) {
|
||||
this.checkAll = false
|
||||
} else {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 已选择的列表
|
||||
selectedList (newVal, oldVal) {
|
||||
if (oldVal.length === this.lawsList.length && newVal.length !== 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = true
|
||||
} else if (newVal.length === 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.selectLaws()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" >
|
||||
//@import '~styles/style';
|
||||
//@import '~styles/mixins';
|
||||
//
|
||||
#collection-laws{
|
||||
height: 100%;
|
||||
.content{
|
||||
height: calc(~'100% - 150px');
|
||||
.content-detail{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
/*padding: 5px;*/
|
||||
background-color: #FFF;
|
||||
.card{
|
||||
width: 100%;
|
||||
height: 1rem;
|
||||
line-height: 1rem;
|
||||
border: 1px solid #EEE;
|
||||
margin-bottom: 4px;
|
||||
transition: all .2s ease-in-out;
|
||||
cursor: pointer;
|
||||
background: #FFF;
|
||||
padding-left: 14px;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
//.un-select();
|
||||
.left-contents{
|
||||
width: 100%;
|
||||
//.ellipsis()
|
||||
}
|
||||
.ivu-row{
|
||||
height: 100%;
|
||||
.ivu-col{
|
||||
height: 100%;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
&:hover{
|
||||
box-shadow: 0px 1px 13px 0px #DDD;
|
||||
}
|
||||
}
|
||||
.note{
|
||||
font-size:15px;
|
||||
line-height: 1rem;
|
||||
height: 1rem;
|
||||
clear: both;
|
||||
margin: 0 1rem;
|
||||
.noteLeft{
|
||||
float: left;
|
||||
width: 70%;
|
||||
height: auto;
|
||||
}
|
||||
.noteRight{
|
||||
float: right;
|
||||
width: 30%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.lawsDisplay{
|
||||
display: none;
|
||||
}
|
||||
.hide-modal-footer {
|
||||
.ivu-modal-footer {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.domBtn {
|
||||
border:1px gray solid;
|
||||
background-color:#FFE6B0
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,555 @@
|
||||
<!-- 已收藏的标准法规 -->
|
||||
<template>
|
||||
<div id="CollectionStandard">
|
||||
<table-tools-bar>
|
||||
<div slot="left">
|
||||
<div class="search-area">
|
||||
<el-form :inline="true" class="label-input-form" @keyup.enter.native="selectStandardBtn">
|
||||
<el-form-item label="标准法规标题" class="search-item search-item-last">
|
||||
<el-input v-model="search.collectionStandard"
|
||||
placeholder="请输入标准法规信息"
|
||||
clearable
|
||||
:maxlength="100"
|
||||
@keyup.enter.native="selectStandardBtn"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="search-item btn-box">
|
||||
<el-button
|
||||
:loading="searching"
|
||||
icon="el-icon-search"
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
round
|
||||
@click="selectStandardBtn">
|
||||
</el-button>
|
||||
<el-button
|
||||
class="common-button-default"
|
||||
icon="el-icon-refresh-left"
|
||||
round
|
||||
@click="resetSelect"></el-button>
|
||||
<el-button class="common-button-default" round @click="cancleCollectBatch" v-btn-permission="'YEG2HVV27R'"><i class="iconfont"></i>取消收藏</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="right"></div>
|
||||
</table-tools-bar>
|
||||
<div class="content">
|
||||
<el-checkbox :value="checkAll" size="large" @change="handleSelectAll" :indeterminate="indeterminate" style="padding: 6px;padding-left: 15px " v-if="total > 0">全选</el-checkbox>
|
||||
<div class="content-detail" v-if="total >0 && contentOpen">
|
||||
<div v-for="(item, index1) in standardList" :key="index1">
|
||||
<div class="card domBtn">
|
||||
<el-col :span="1"><el-checkbox v-model="item.checked" size="large"></el-checkbox></el-col>
|
||||
<el-row>
|
||||
<div @click="detailsStandard(item)">
|
||||
<el-col :span="5" :offset="1" >
|
||||
<i class="el-icon-collection-tag" style="position: relative; left: -15px" />
|
||||
所属板块:{{ item.collectType === 'INLAND_STAND' ? '国内标准法规' : (item.collectType === 'FOREIGN_STAND' ? '海外标准法规' : '企业标准') }}
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-tooltip class="item" effect="dark" :content="item.collectTitle" placement="top" v-if="item.collectTitle">
|
||||
<div class="left-contents">标题:{{ item.collectTitle }}</div>
|
||||
</el-tooltip>
|
||||
<div v-else>
|
||||
<div class="left-contents">标题:{{ item.collectTitle }}</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="3">创建时间:{{getDate(item.creationTime)}}</el-col>
|
||||
</div>
|
||||
<el-col :span="4">
|
||||
<el-button size="mini" @click="cancelStandard(item.id)" style="margin-top: -5px; border: 1px dashed #dcdee2" v-btn-permission="'GSMRLL6A4Y'">取消收藏</el-button>
|
||||
<!-- <el-button size="mini" @click="writeStandardNotes(item,index1)" style="margin-top: -5px; border: 1px dashed #dcdee2">{{item.seeBtn}}</el-button>-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div :class="{ 'selected ': item.checked }" @click="handleCardClick(item,$event)">
|
||||
<el-button size="mini" icon="el-icon-plus" @click="createStandardNote(item, index1)" style="border: 1px dashed #dcdee2" v-show="item.check" v-btn-permission="'HD7HL2JY4Z'">添加笔记</el-button>
|
||||
<div class="note" v-show="item.check" v-for="(note,index2) in item.noteList" :key="index2">
|
||||
<div class="noteLeft">笔记{{index2 +1 }}: {{note.noteContentValue}}</div>
|
||||
<div class="noteRight">
|
||||
<el-button type="primary" size="mini" @click="viewStandardData(note)">查看此条笔记</el-button>
|
||||
<el-button type="warning" size="mini" @click="noteStandardEdit(note ,index1)" v-btn-permission="'XLA4JQDS5A'">修改笔记</el-button>
|
||||
<el-button type="danger" size="mini" @click="noteStandardDel(note ,index1)" v-btn-permission="'2RZ3EQRATU'">删除笔记</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<has-no-data pClass="content-detail" v-if="total === 0"></has-no-data>
|
||||
<loading :loading="loading">数据获取中</loading>
|
||||
</div>
|
||||
<el-dialog
|
||||
:title="standardTitle"
|
||||
:visible.sync="standardModal"
|
||||
:close-on-click-modal = false
|
||||
width="450px"
|
||||
:class="{ 'hide-modal-footer': modalType === 3 }"
|
||||
@on-visible-change="noteChange">
|
||||
<div style="margin-left: 20px">
|
||||
<el-form ref="standardForm" :model="standardForm" :rules="standardFormRules">
|
||||
<el-form-item prop="textarea">
|
||||
<el-input type="textarea" v-model.trim="standardForm.textarea" maxlength="20000" show-word-limit :autosize="{minRows: 5,maxRows: 7}" :disabled="noteType" placeholder="书写笔记"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="footer">
|
||||
<el-button size="mini" @click="closeModal">取消</el-button>
|
||||
<el-button size="mini" type="primary" @click="saveClass" :loading="isSubmit">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<pagination :total="total" :page="page" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'collectionStandard',
|
||||
data () {
|
||||
return {
|
||||
contentOpen: true,
|
||||
searching: false,
|
||||
saveNote: '',
|
||||
// 加载
|
||||
loading: false,
|
||||
loadDate: false,
|
||||
// 查询
|
||||
search: {
|
||||
collectionStandard: ''
|
||||
},
|
||||
// 分页
|
||||
total: 0,
|
||||
page: 1,
|
||||
rows: 10,
|
||||
// 数据内容
|
||||
standardList: [],
|
||||
// 对话框状态
|
||||
standardModal: false,
|
||||
// 对话框标题
|
||||
standardTitle: '',
|
||||
// 对话框内容
|
||||
standardForm: {
|
||||
textarea: '',
|
||||
collectId: '',
|
||||
id: ''
|
||||
},
|
||||
modalType: '',
|
||||
// 是否读写
|
||||
noteType: false,
|
||||
// 计算
|
||||
// 笔记规则
|
||||
standardFormRules: {
|
||||
textarea: [
|
||||
{required: true, message: '笔记不能为空', trigger: 'blur'},
|
||||
{type: 'string', max: 20000, message: '最多输入20000字符'}
|
||||
]
|
||||
},
|
||||
checkAll: false, // 是否全选
|
||||
indeterminate: false, // 是否半选
|
||||
isSubmit: false,
|
||||
selectedList: [],
|
||||
selectedAllInfoList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 对话框关闭清除表单
|
||||
noteChange (type) {
|
||||
if (!type) {
|
||||
this.$refs['standardForm'].resetFields()
|
||||
}
|
||||
},
|
||||
// 重置
|
||||
resetSelect () {
|
||||
this.search.collectionStandard = ''
|
||||
this.pageChange(1)
|
||||
},
|
||||
// 笔记数字提示
|
||||
descInput () {
|
||||
if (this.standardForm.textarea.length > 20000) {
|
||||
this.error('最多输入20000字')
|
||||
}
|
||||
},
|
||||
error (msg) {
|
||||
this.$Message.error(msg)
|
||||
},
|
||||
// 跳转
|
||||
detailsStandard (item) {
|
||||
console.log(item);
|
||||
this.$http.get('lawss/sarMenu/judgeSarMenuByRole', {
|
||||
sarId: item.collectResId,
|
||||
sarType: item.collectType
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
if (item.collectType === 'BUSINESS_STAND') {
|
||||
// if (this.$hasPermission('YJUHC32R7G')) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
name: 'OtherBussStandardDetails',
|
||||
params: {
|
||||
id: item.collectResId,
|
||||
pageType: item.collectType
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
// } else {
|
||||
// this.$message.warning('无权访问')
|
||||
// }
|
||||
} else {
|
||||
// if (this.$hasPermission('SSA6WR4HV8')) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
name: 'OtherStandardDetails',
|
||||
params: {
|
||||
id: item.collectResId,
|
||||
pageType: item.collectType
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
// } else {
|
||||
// this.$message.warning('无权访问')
|
||||
// }
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
}, e => {
|
||||
this.$message.error('无权访问')
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
pageChange (page) {
|
||||
this.page = page
|
||||
this.saveNote = ''
|
||||
this.selectStandard()
|
||||
},
|
||||
pageSizeChange (pageSize) {
|
||||
this.rows = pageSize
|
||||
this.saveNote = ''
|
||||
this.selectStandard()
|
||||
},
|
||||
// 搜索
|
||||
selectStandardBtn () {
|
||||
this.page = 1
|
||||
this.selectStandard()
|
||||
},
|
||||
// 查询、加载数据
|
||||
selectStandard () {
|
||||
this.$http.get('person/personCollect/page', {
|
||||
pageNo: this.page,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
modeType: 'STAND',
|
||||
collectTitle: this.search.collectionStandard,
|
||||
userId: this.$store.getters.userInfo.userId
|
||||
}, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
// for (let i = 0; i < res.data.list.length; i++) {
|
||||
// res.data.list[i].checked = false
|
||||
// res.data.list[i].check = false
|
||||
// res.data.list[i].seeBtn = '查看笔记'
|
||||
// }
|
||||
res.data.list.map((item, index) => {
|
||||
item.checked = false
|
||||
})
|
||||
this.standardList = []
|
||||
this.standardList = res.data.list
|
||||
this.total = res.data.count
|
||||
this.contentOpen = true
|
||||
// if (this.saveNote !== '') {
|
||||
// this.standardList[this.saveNote].check = true
|
||||
// if (this.standardList[this.saveNote].check === true) {
|
||||
// this.standardList[this.saveNote].seeBtn = '关闭笔记'
|
||||
// } else {
|
||||
// this.standardList[this.saveNote].seeBtn = '查看笔记'
|
||||
// }
|
||||
// }
|
||||
}, e => {})
|
||||
},
|
||||
// 取消收藏
|
||||
cancelStandard (id) {
|
||||
this.$confirm('确定取消收藏此数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.put('person/personCollect/updateByUserId ', {
|
||||
modeType: 'STAND',
|
||||
id: id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.contentOpen = false
|
||||
this.pageChange(1)
|
||||
}, e => {
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// 查看笔记
|
||||
writeStandardNotes (item, index) {
|
||||
item.check = !item.check
|
||||
if (item.check === true) {
|
||||
item.seeBtn = '关闭笔记'
|
||||
} else {
|
||||
item.seeBtn = '查看笔记'
|
||||
}
|
||||
for (let i = 0; i < this.standardList.length; i++) {
|
||||
if (i !== index) {
|
||||
this.standardList[i].check = false
|
||||
this.standardList[i].seeBtn = '查看笔记'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 添加笔记
|
||||
createStandardNote (item, index) {
|
||||
this.standardModal = true
|
||||
this.noteType = false
|
||||
this.modalType = 1
|
||||
this.standardTitle = '添加笔记'
|
||||
this.standardForm.textarea = ''
|
||||
this.standardForm = item
|
||||
this.saveNote = index
|
||||
},
|
||||
// 查看此条笔记
|
||||
viewStandardData (note) {
|
||||
this.standardModal = true
|
||||
this.standardTitle = '查看笔记'
|
||||
this.standardForm.textarea = note.noteContentValue
|
||||
this.noteType = true
|
||||
this.modalType = 3
|
||||
},
|
||||
// 修改笔记
|
||||
noteStandardEdit (note, index) {
|
||||
this.standardModal = true
|
||||
this.noteType = false
|
||||
this.standardTitle = '修改笔记'
|
||||
this.modalType = 2
|
||||
this.standardForm.id = note.id
|
||||
this.standardForm.textarea = note.noteContentValue
|
||||
this.saveNote = index
|
||||
},
|
||||
// 删除笔记
|
||||
noteStandardDel (note, index) {
|
||||
this.saveNote = index
|
||||
this.$confirm('确认删除该条数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('lawss/utNoteInfo/deleteNote', {
|
||||
ids: note.id
|
||||
},
|
||||
{
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.selectStandard()
|
||||
} else {
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
})
|
||||
},
|
||||
closeModal () {
|
||||
this.standardModal = false
|
||||
this.$refs['standardForm'].resetFields()
|
||||
},
|
||||
// 保存笔记 (新增、编辑)
|
||||
saveClass () {
|
||||
this.$refs['standardForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.standardModal = false
|
||||
if (this.modalType === 1) {
|
||||
let noteForm = {}
|
||||
noteForm.noteContentValue = this.standardForm.textarea
|
||||
noteForm.sourceType = 'COSTAND'
|
||||
noteForm.noteName = this.standardForm.collectTitle
|
||||
noteForm.sarId = this.standardForm.id
|
||||
noteForm.forwardId = this.standardForm.collectResId
|
||||
this.$http.post('lawss/utNoteInfo/saveNote', noteForm, {
|
||||
_this: this,
|
||||
loading: 'isSubmit'
|
||||
}, res => {
|
||||
this.selectStandard()
|
||||
}, e => {
|
||||
})
|
||||
} else if (this.modalType === 2) {
|
||||
let noteForm = {
|
||||
id: this.standardForm.id,
|
||||
noteContentValue: this.standardForm.textarea
|
||||
}
|
||||
this.$http.post('lawss/utNoteInfo/updateNote', noteForm, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.selectStandard()
|
||||
}, e => {
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.error('请正确输入')
|
||||
}
|
||||
})
|
||||
},
|
||||
getDate (date) {
|
||||
return date != null ? date.substring(0, date.indexOf(' ')) : ''
|
||||
},
|
||||
cancleCollectBatch () {
|
||||
if (this.selectedList.length === 0) {
|
||||
this.$confirm('请先选择数据进行取消收藏', '提示', {
|
||||
showCancelButton: false,
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
})
|
||||
} else {
|
||||
(
|
||||
this.$confirm('确定取消这些数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('/person/personCollect/cancelCollectByBatch', {
|
||||
ids: this.selectedList
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.pageChange(1)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
)
|
||||
}
|
||||
},
|
||||
handleCardClick (item, event) {
|
||||
item.checked = !item.checked
|
||||
},
|
||||
// 全选
|
||||
handleSelectAll (checked) {
|
||||
if (checked) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < this.standardList.length; i++) {
|
||||
this.$set(this.standardList[i], 'checked', true)
|
||||
this.selectedList.push(this.standardList[i].id)
|
||||
this.selectedAllInfoList.push(this.standardList[i])
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < this.standardList.length; i++) {
|
||||
this.$set(this.standardList[i], 'checked', false)
|
||||
this.selectedList = []
|
||||
this.selectedAllInfoList = []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
standardList: {
|
||||
deep: true,
|
||||
handler (newVal, oldVal) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < newVal.length; i++) {
|
||||
if (newVal[i].checked) {
|
||||
this.selectedList.push(newVal[i].id)
|
||||
this.selectedAllInfoList.push(newVal[i])
|
||||
}
|
||||
}
|
||||
if (this.selectedList.length === newVal.length && newVal.length !== 0) {
|
||||
this.checkAll = true
|
||||
this.indeterminate = false
|
||||
} else if (this.selectedList.length === 0) {
|
||||
this.checkAll = false
|
||||
} else {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 已选择的列表
|
||||
selectedList (newVal, oldVal) {
|
||||
if (oldVal.length === this.standardList.length && newVal.length !== 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = true
|
||||
} else if (newVal.length === 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.selectStandard()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
//@import '~styles/style';
|
||||
//@import '~styles/mixins';
|
||||
#CollectionStandard{
|
||||
height: 100%;
|
||||
.content{
|
||||
height: calc(~'100% - 150px');
|
||||
.content-detail{
|
||||
width: 100%;
|
||||
height:100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
/*padding: 0.1rem;*/
|
||||
background-color: white;
|
||||
.card{
|
||||
width: 100%;
|
||||
height: 1rem;
|
||||
line-height:1rem;
|
||||
border: 1px solid #EEE;
|
||||
margin-bottom: 4px;
|
||||
transition: all .2s ease-in-out;
|
||||
cursor: pointer;
|
||||
/*padding: 14px;*/
|
||||
background: #FFF;
|
||||
padding-left: 14px;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
//.un-select();
|
||||
.left-contents{
|
||||
width: 100%;
|
||||
//.ellipsis()
|
||||
}
|
||||
.ivu-row{
|
||||
height: 100%;
|
||||
.ivu-col{
|
||||
height: 100%;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
&:hover{
|
||||
box-shadow: 0px 1px 13px 0px #DDD;
|
||||
}
|
||||
}
|
||||
.note{
|
||||
font-size:15px;
|
||||
line-height: 1rem;
|
||||
height: 1rem;
|
||||
clear: both;
|
||||
margin: 0 1rem;
|
||||
.noteLeft{
|
||||
float: left;
|
||||
width: 70%;
|
||||
height: auto;
|
||||
}
|
||||
.noteRight{
|
||||
float: right;
|
||||
width: 30%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,95 @@
|
||||
<template>
|
||||
<div class="my-collection v-class">
|
||||
<panel-header :tabs="tabsList" @activated="showComponent" :active="active"></panel-header>
|
||||
<panel-content class="panel-content-box">
|
||||
<components :is="active"></components>
|
||||
</panel-content>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CollectionDynamics from './components/CollectionDynamics'
|
||||
import CollectionLaws from './components/CollectionLaws'
|
||||
import CollectionStandard from './components/CollectionStandard'
|
||||
import CollectionBreak from './components/CollectionBreak'
|
||||
export default {
|
||||
name: 'MyCollection',
|
||||
data () {
|
||||
return {
|
||||
active: 'CollectionStandard',
|
||||
tabsList: [ {
|
||||
title: '已收藏的标准法规',
|
||||
name: 'CollectionStandard'
|
||||
}, {
|
||||
title: '已收藏的动态&资料 ',
|
||||
name: 'CollectionDynamics'
|
||||
}, {
|
||||
title: '已收藏的政策',
|
||||
name: 'CollectionLaws'
|
||||
}, {
|
||||
title: '已收藏的标准拆分',
|
||||
name: 'CollectionBreak'
|
||||
}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showComponent (name) {
|
||||
this.active = name
|
||||
}
|
||||
// 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: {
|
||||
CollectionDynamics,
|
||||
CollectionLaws,
|
||||
CollectionStandard,
|
||||
CollectionBreak
|
||||
},
|
||||
mounted () {
|
||||
if (this.$route.query.type === '1') {
|
||||
this.active = 'CollectionBreak'
|
||||
}
|
||||
// let collecttype = this.getCookie('collectionType')
|
||||
// if (collecttype == null || collecttype === '') {
|
||||
// this.active = 'CollectionLaws'
|
||||
// } else if (collecttype === 'INLAND_LAWS' || collecttype === 'FOREIGN_LAWS') {
|
||||
// this.active = 'CollectionLaws'
|
||||
// } else if (collecttype === 'INLAND_STAND' || collecttype === 'FOREIGN_STAND' || collecttype === 'BUSINESS_STAND') {
|
||||
// this.active = 'CollectionStandard'
|
||||
// } else {
|
||||
// this.active = 'CollectionDynamics'
|
||||
// }
|
||||
// document.cookie = 'collectionType=' + ''
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.my-collection {
|
||||
height: calc(~'100% - 50px');
|
||||
.panel-content-box{
|
||||
height: 100%;
|
||||
}
|
||||
/deep/.el-input__inner {
|
||||
/*@media screen and (min-width: 1920px) {*/
|
||||
/* height: 40px !important;*/
|
||||
/* line-height: 40px !important;*/
|
||||
/*}*/
|
||||
}
|
||||
/deep/#labelInput {
|
||||
label {
|
||||
/*@media screen and (min-width: 1920px) {*/
|
||||
/* height: 40px !important;*/
|
||||
/* line-height: 40px !important;*/
|
||||
/*}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,681 @@
|
||||
<!-- 我的动态 -->
|
||||
<template>
|
||||
<div class="my-dynamics">
|
||||
<table-tools-bar>
|
||||
<div slot="left">
|
||||
<div class="search-area">
|
||||
<el-form inline class="label-input-form" @keyup.enter.native="selectDynamicsBtn">
|
||||
<el-form-item label="动态标题搜索" class="search-item search-item-last">
|
||||
<el-input v-model="search.dynamicsName"
|
||||
placeholder="请输入动态信息"
|
||||
clearable
|
||||
:maxlength="100"
|
||||
@keyup.enter.native="selectDynamicsBtn"></el-input>
|
||||
</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="selectDynamicsBtn">
|
||||
</el-button>
|
||||
<el-button
|
||||
class="common-button-default"
|
||||
icon="el-icon-refresh-left"
|
||||
round
|
||||
@click="resetSelect"></el-button>
|
||||
<el-button class="common-button-default" round @click="markIsRead"><i class="iconfont"></i>标记已读</el-button>
|
||||
<el-button round class="common-button-default delete-button" @click="dynamicBathDels"><i class="iconfont"></i>删除</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="right">
|
||||
</div>
|
||||
</table-tools-bar>
|
||||
<div class="content">
|
||||
<div class="content-detail" v-if="total >0">
|
||||
<el-checkbox v-model="checkAll" size="medium" @change="handleSelectAll" :indeterminate="indeterminate" style="padding: 6px;padding-left: 15px " v-if="true">全选</el-checkbox>
|
||||
<!-- <div class="card domBtn" v-for="(item,index) in dynamicsList" :key="index" :class="{ 'selected ': item.checked }" @click="handleCardClick(item,$event)">-->
|
||||
<div class="card domBtn" v-for="(item,index) in dynamicsList" :key="index" :class="{ 'selected ': item.checked }">
|
||||
<el-col :span="1" >
|
||||
<el-checkbox :key="item.checked" v-model="item.checked" size="medium">
|
||||
</el-checkbox>
|
||||
</el-col>
|
||||
<el-row style="position: relative">
|
||||
<div class="dynamic-new" v-if="item.readFlag === 0">new</div>
|
||||
<el-col :span="8">
|
||||
<div @click="detailsJump(item)">
|
||||
<el-tooltip class="item" effect="dark" :content="item.msgTitle" placement="top">
|
||||
<span>{{item.msgTitle}}</span>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">创建时间:{{item.creationTime}}</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button size="mini" @click="dynamicBathDel(item)" v-if="item.checked" style="margin-top: -5px; border: 1px dashed #dcdee2">删除</el-button>
|
||||
<!--审核类信息-->
|
||||
<el-button size="mini" @click="checkBtn(item)" v-if="item.checked && item.msgType === 'APPROVAL' && !item.msgResult" style="margin-top: -5px; border: 1px dashed #dcdee2">审核</el-button>
|
||||
<!--确认类信息,msgResult有值:已经确认过-->
|
||||
<el-button size="mini" @click="confirmBtn(item)" v-if="item.checked && item.msgType === 'CONFIRM' && !item.msgResult" style="margin-top: -5px; border: 1px dashed #dcdee2">确认</el-button>
|
||||
<!--拆分条款审核-->
|
||||
<el-button size="mini" @click="splitCheckBtn(item)" v-if="item.checked && item.msgType === 'SPLIT' && !item.msgResult" style="margin-top: -5px; border: 1px dashed #dcdee2">审核</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<has-no-data pClass="content-detail" v-if="total === 0"></has-no-data>
|
||||
</div>
|
||||
<loading :loading="loading">数据获取中</loading>
|
||||
<pagination :page="page" :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
<!-- 确认弹框-->
|
||||
<el-dialog
|
||||
title="确认提示"
|
||||
:visible.sync="confirmDialog"
|
||||
width="30%"
|
||||
>
|
||||
<span>是否确认?</span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="yesDialog">同 意</el-button>
|
||||
<el-button type="primary" @click="noDialog">不同意</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 审核弹框-->
|
||||
<el-dialog
|
||||
title="审核提示"
|
||||
:visible.sync="checkDialog"
|
||||
width="30%"
|
||||
>
|
||||
<span>是否审核?</span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
@click="checkYesDialog"
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
round
|
||||
>同 意</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="checkNoDialog"
|
||||
class="common-button-primary"
|
||||
round
|
||||
>不同意</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--拆分条款审核提示-->
|
||||
<el-dialog
|
||||
title="审核提示"
|
||||
:visible.sync="splitCheckDialog"
|
||||
width="30%"
|
||||
>
|
||||
<span>是否审核?</span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
type="danger"
|
||||
size="primary"
|
||||
@click="splitCheck(1)"
|
||||
class="common-button-primary"
|
||||
round
|
||||
:loading="submitLoading"
|
||||
>驳回</el-button>
|
||||
<el-button
|
||||
@click="splitCheck(0)"
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
round
|
||||
:loading="submitLoading"
|
||||
>通过</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
export default {
|
||||
name: 'MyDynamics',
|
||||
components: {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
search: {
|
||||
dynamicsName: ''
|
||||
},
|
||||
checkAll: false, // 是否全选
|
||||
indeterminate: false, // 是否半选
|
||||
loading: false,
|
||||
total: 0,
|
||||
page: 1,
|
||||
rows: 10,
|
||||
dynamicsList: [],
|
||||
selectedList: [],
|
||||
selectedAllInfoList: [],
|
||||
confirmDialog: false,
|
||||
checkDialog: false,
|
||||
splitCheckDialog: false,
|
||||
toPage: false,
|
||||
show: true,
|
||||
returnAddress: '',
|
||||
itemPage: {},
|
||||
submitLoading: false
|
||||
}
|
||||
},
|
||||
props: {
|
||||
},
|
||||
watch: {
|
||||
// 单选框勾选
|
||||
dynamicsList: {
|
||||
deep: true,
|
||||
handler (newVal, oldVal) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < newVal.length; i++) {
|
||||
if (newVal[i].checked) {
|
||||
this.selectedList.push(newVal[i].id)
|
||||
this.selectedAllInfoList.push(newVal[i])
|
||||
}
|
||||
}
|
||||
if (this.selectedList.length === newVal.length && newVal.length !== 0) {
|
||||
this.checkAll = true
|
||||
this.indeterminate = false
|
||||
} else if (this.selectedList.length === 0) {
|
||||
this.checkAll = false
|
||||
} else {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 已选择的列表
|
||||
selectedList (newVal, oldVal) {
|
||||
if (oldVal.length === this.dynamicsList.length && newVal.length !== 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = true
|
||||
} else if (newVal.length === 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['setDynamicTotal']),
|
||||
// 搜索
|
||||
selectDynamicsBtn () {
|
||||
this.page = 1
|
||||
this.selectDynamics()
|
||||
},
|
||||
// 重置
|
||||
resetSelect () {
|
||||
this.search.dynamicsName = ''
|
||||
this.pageChange(1)
|
||||
},
|
||||
// 标记已读
|
||||
markIsRead () {
|
||||
console.log(123);
|
||||
if (this.selectedList.length === 0) {
|
||||
this.$message.error('请先选择数据进行标记')
|
||||
} else {
|
||||
if (this.selectedAllInfoList != null && this.selectedAllInfoList.length > 0) {
|
||||
for (let i = 0; i < this.selectedAllInfoList.length; i++) {
|
||||
let item = this.selectedAllInfoList[i]
|
||||
if (item.readFlag === 0) {
|
||||
// let total = parseInt(this.getDynamicTotal.msgCount) - 1
|
||||
// let obj = {}
|
||||
// obj.allCount = parseInt(total + this.getDynamicTotal.shareCount)
|
||||
// obj.msgCount = total
|
||||
// obj.shareCount = parseInt(this.getDynamicTotal.shareCount)
|
||||
// if (obj.allCount > 0) {
|
||||
// this.setDynamicTotal(obj)
|
||||
// } else {
|
||||
// this.setDynamicTotal('')
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$http.post('/person/personMsg/markIsReadByBatch', {
|
||||
ids: this.selectedList
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.selectDynamics()
|
||||
this.queryByPersonMsg()
|
||||
}, e => {
|
||||
})
|
||||
}
|
||||
},
|
||||
// 全选
|
||||
handleSelectAll (checked) {
|
||||
if (checked) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < this.dynamicsList.length; i++) {
|
||||
this.$set(this.dynamicsList[i], 'checked', true)
|
||||
this.selectedList.push(this.dynamicsList[i].id)
|
||||
this.selectedAllInfoList.push(this.dynamicsList[i])
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < this.dynamicsList.length; i++) {
|
||||
this.$set(this.dynamicsList[i], 'checked', false)
|
||||
this.selectedList = []
|
||||
this.selectedAllInfoList = []
|
||||
}
|
||||
}
|
||||
},
|
||||
// 复选框--表格点击
|
||||
handleCardClick (item, event) {
|
||||
item.checked = !item.checked
|
||||
// this.selectedList.push(item.id)
|
||||
},
|
||||
// 确认类信息-同意
|
||||
yesDialog () {
|
||||
let list = {}
|
||||
list.id = this.itemPage.id
|
||||
list.msgResult = 0
|
||||
this.$http.post(this.itemPage.returnAddress, list, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.$message.success('操作成功')
|
||||
this.confirmDialog = false
|
||||
// 同意后调用接口--同意过的信息不能再次进行确认、审核
|
||||
if (this.itemPage.processnum === 'null') {
|
||||
this.itemPage.processnum = ''
|
||||
}
|
||||
let listAgain = this.itemPage
|
||||
listAgain.msgResult = 0
|
||||
this.$http.post('person/personMsg/updateNew', listAgain, {
|
||||
_this: this
|
||||
}, res => {
|
||||
// if (res.data.msgResult) {
|
||||
// // 确认按钮不显示
|
||||
// this.show = false
|
||||
// } else {
|
||||
// this.show = true
|
||||
// }
|
||||
}, e => {
|
||||
})
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 确认类信息-不同意
|
||||
noDialog () {
|
||||
let list = {}
|
||||
list.id = this.itemPage.id
|
||||
list.msgResult = 1
|
||||
this.$http.post(this.itemPage.returnAddress, list, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.$message.success('操作成功')
|
||||
this.confirmDialog = false
|
||||
// 同意后调用接口--同意过的信息不能再次进行确认、审核
|
||||
let listAgain = this.itemPage
|
||||
listAgain.msgResult = 1
|
||||
this.$http.post('person/personMsg/updateNew', listAgain, {
|
||||
_this: this
|
||||
}, res => {
|
||||
// if (res.data.msgResult) {
|
||||
// this.show = false
|
||||
// } else {
|
||||
// this.show = true
|
||||
// }
|
||||
}, e => {
|
||||
})
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 审核类信息--同意
|
||||
checkYesDialog () {
|
||||
let list = {}
|
||||
list.id = this.itemPage.id
|
||||
list.msgResult = 0
|
||||
this.$http.post(this.itemPage.returnAddress, list, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.$message.success('操作成功')
|
||||
this.checkDialog = false
|
||||
// 同意后调用接口--同意过的信息不能再次进行确认、审核
|
||||
if (this.itemPage.processnum === 'null') {
|
||||
this.itemPage.processnum = ''
|
||||
}
|
||||
let listAgain = this.itemPage
|
||||
listAgain.msgResult = 0
|
||||
this.$http.post('person/personMsg/updateNew', listAgain, {
|
||||
_this: this
|
||||
}, res => {
|
||||
}, e => {
|
||||
})
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 拆分条款审核
|
||||
* state:状态
|
||||
* 0: 通过 1:驳回
|
||||
* */
|
||||
splitCheck (state) {
|
||||
if (state==1) {
|
||||
this.$confirm('是否驳回?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let listAgain = this.itemPage
|
||||
listAgain.msgResult = state
|
||||
this.$http.postData('lawss/sarFileSplitInfo/updateNew', listAgain, {
|
||||
_this: this,
|
||||
loading: 'submitLoading'
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.splitCheckDialog = false
|
||||
this.page = 1
|
||||
this.selectDynamics()
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '审核已完成'
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.splitCheckDialog = false
|
||||
});
|
||||
}else {
|
||||
let listAgain = this.itemPage
|
||||
listAgain.msgResult = state
|
||||
this.$http.postData('lawss/sarFileSplitInfo/updateNew', listAgain, {
|
||||
_this: this,
|
||||
loading: 'submitLoading'
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.splitCheckDialog = false
|
||||
this.page = 1
|
||||
this.selectDynamics()
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '审核已完成'
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 审核类信息--不同意
|
||||
checkNoDialog () {
|
||||
let list = {}
|
||||
list.id = this.itemPage.id
|
||||
list.msgResult = 1
|
||||
this.$http.post(this.itemPage.returnAddress, list, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.$message.success('操作成功')
|
||||
this.checkDialog = false
|
||||
// 同意后调用接口--同意过的信息不能再次进行确认、审核
|
||||
let listAgain = this.itemPage
|
||||
listAgain.msgResult = 1
|
||||
this.$http.post('person/personMsg/updateNew', listAgain, {
|
||||
_this: this
|
||||
}, res => {
|
||||
}, e => {
|
||||
})
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 确认类信息-按钮
|
||||
confirmBtn (item) {
|
||||
this.confirmDialog = true
|
||||
this.returnAddress = item.returnAddress
|
||||
this.itemPage = item
|
||||
},
|
||||
// 审核类信息-按扭
|
||||
checkBtn (item) {
|
||||
this.checkDialog = true
|
||||
this.returnAddress = item.returnAddress
|
||||
this.itemPage = item
|
||||
},
|
||||
// 拆分条款审核-按钮
|
||||
splitCheckBtn (item) {
|
||||
this.splitCheckDialog = true
|
||||
this.itemPage = item
|
||||
},
|
||||
// 跳页
|
||||
detailsJump (item) {
|
||||
// 判断是否是审核类的消息
|
||||
if (item.msgType === 'CONFIRM' || item.msgType === 'APPROVAL') {
|
||||
} else {
|
||||
// 是文本类型的可以跳转
|
||||
if (item.readFlag === 0) {
|
||||
let idList = []
|
||||
idList.push(item.id)
|
||||
this.$http.post('/person/personMsg/markIsReadByBatch', {
|
||||
ids: idList
|
||||
}, {}, res => {
|
||||
this.queryByPersonMsg()
|
||||
}, e => {
|
||||
})
|
||||
// let total = parseInt(this.getDynamicTotal.msgCount) - 1
|
||||
// let obj = {}
|
||||
// obj.allCount = parseInt(total + this.getDynamicTotal.shareCount)
|
||||
// obj.msgCount = total
|
||||
// obj.shareCount = parseInt(this.getDynamicTotal.shareCount)
|
||||
// if (obj.allCount > 0) {
|
||||
// this.setDynamicTotal(obj)
|
||||
// } else {
|
||||
// this.setDynamicTotal('')
|
||||
// }
|
||||
}
|
||||
if (item.msgType === 'SPLIT') {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push(item.returnAddress + '&auditFlag=' + (item.msgResult ? '0':'1') + '&auditId=' + item.id)
|
||||
} else {
|
||||
this.$store.commit('setDynamicsPage', this.page)
|
||||
if (item.returnAddress) {
|
||||
var pos = item.returnAddress.lastIndexOf('/')
|
||||
var str = item.returnAddress.substring(0, pos)
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
// this.$router.push(str + '/' + item.id)
|
||||
this.$router.push({
|
||||
name: str,
|
||||
params: {
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'DetailsJump',
|
||||
params: {
|
||||
id: item.id
|
||||
// pageType: item.msgType,
|
||||
// toPage: this.toPage
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 单项删除
|
||||
dynamicBathDel (item) {
|
||||
this.$confirm('是否删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('/person/personMsg/deleteByIdList', {
|
||||
ids: item.id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (item.readFlag === 0) {
|
||||
// let total = parseInt(this.getDynamicTotal.msgCount) - 1
|
||||
// let obj = {}
|
||||
// obj.allCount = parseInt(total + this.getDynamicTotal.shareCount)
|
||||
// obj.msgCount = total
|
||||
// obj.shareCount = parseInt(this.getDynamicTotal.shareCount)
|
||||
// if (obj.allCount > 0) {
|
||||
// this.setDynamicTotal(obj)
|
||||
// } else {
|
||||
// this.setDynamicTotal('')
|
||||
// }
|
||||
}
|
||||
this.pageChange(1)
|
||||
this.queryByPersonMsg()
|
||||
}, e => {
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message('已取消删除')
|
||||
// 取消删除,清空选择
|
||||
// this.$refs.selections.clearSelection()
|
||||
})
|
||||
},
|
||||
// 批量删除
|
||||
dynamicBathDels () {
|
||||
if (this.selectedList.length === 0) {
|
||||
this.$message.error('请先选择一条数据进行删除')
|
||||
} else {
|
||||
this.$confirm('是否删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('/person/personMsg/deleteByIdList', {
|
||||
ids: this.selectedList
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.queryByPersonMsg()
|
||||
// let obj = {}
|
||||
// obj.allCount = parseInt(this.getDynamicTotal.shareCount)
|
||||
// obj.msgCount = 0
|
||||
// obj.shareCount = parseInt(this.getDynamicTotal.shareCount)
|
||||
// if (obj.allCount > 0) {
|
||||
// this.setDynamicTotal(obj)
|
||||
// } else {
|
||||
// this.setDynamicTotal('')
|
||||
// }
|
||||
this.pageChange(1)
|
||||
}, e => {
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message('已取消删除')
|
||||
// 取消删除,清空选择
|
||||
// this.$refs.selections.clearSelection()
|
||||
})
|
||||
}
|
||||
},
|
||||
// 查找 --- 表格数据
|
||||
selectDynamics () {
|
||||
this.loading = true
|
||||
this.$http.get('person/personMsg/page', {
|
||||
page: this.page,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
msgTitle: this.search.dynamicsName,
|
||||
userId: this.$store.getters.userInfo.userId
|
||||
}, {
|
||||
_this: this,
|
||||
}, res => {
|
||||
this.loading = false
|
||||
for (let i = 0; i < res.data.list.length; i++) {
|
||||
res.data.list[i].checked = false
|
||||
}
|
||||
this.dynamicsList = res.data.list
|
||||
this.total = res.data.count
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
pageChange (page) {
|
||||
this.page = page
|
||||
this.selectDynamics()
|
||||
},
|
||||
pageSizeChange (pageSize) {
|
||||
this.rows = pageSize
|
||||
this.selectDynamics()
|
||||
},
|
||||
// 查询用户未读动态
|
||||
queryByPersonMsg () {
|
||||
this.$http.get('/person/personMsg/selectNotRed', {}, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
this.setDynamicTotal(res.data)
|
||||
}, e => {
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['getDynamicTotal'])
|
||||
},
|
||||
mounted () {
|
||||
if (this.$store.getters.getDynamicsPage) {
|
||||
this.page = this.$store.getters.getDynamicsPage
|
||||
}
|
||||
this.selectDynamics()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
@import '~@/assets/styles/mixins';
|
||||
@import '~@/assets/styles/style';
|
||||
.my-dynamics{
|
||||
background: #FFF;
|
||||
padding:0 10px 10px;
|
||||
height: 100%;
|
||||
overflow-y: hidden;
|
||||
overflow-x: hidden;
|
||||
.content{
|
||||
padding: 5px 10px;
|
||||
height: calc(~'100% - 100px');
|
||||
.content-detail{
|
||||
width: 100%;
|
||||
height:100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding: 0.1rem;
|
||||
background-color: white;
|
||||
.card {
|
||||
width: 100%;
|
||||
height: 1rem;
|
||||
border: 1px solid #EEE;
|
||||
margin-bottom: 4px;
|
||||
transition: all .2s ease-in-out;
|
||||
cursor: pointer;
|
||||
padding: 14px;
|
||||
background: #FFF;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
.un-select();
|
||||
&:hover {
|
||||
box-shadow: 0 1px 13px 0 #DDD;
|
||||
}
|
||||
}
|
||||
.dynamic-new{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
color: #FF0000;
|
||||
font-style: italic;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
font-size: 12px;
|
||||
.flex();
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
transform: rotate(-15deg);
|
||||
-webkit-transform: rotate(-15deg);
|
||||
-ms-transform: rotate(-15deg);
|
||||
-moz-transform: rotate(-15deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.domBtn{
|
||||
.el-col-8 {
|
||||
line-height: 28px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,442 @@
|
||||
<!-- 我的转发 -->
|
||||
<template>
|
||||
<div class="my-forward">
|
||||
<table-tools-bar>
|
||||
<div slot="left">
|
||||
<div class="search-area">
|
||||
<el-form :inline="true" class="label-input-form" >
|
||||
<el-form-item label="转发搜索" class="search-item search-item-last">
|
||||
<el-input v-model="search.resTitle"
|
||||
placeholder="请输入转发信息"
|
||||
clearable
|
||||
:maxlength="100"
|
||||
@keyup.enter.native="pushSelectBtn"></el-input>
|
||||
</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="pushSelectBtn">
|
||||
</el-button>
|
||||
<el-button
|
||||
class="common-button-default"
|
||||
icon="el-icon-refresh-left"
|
||||
round
|
||||
@click="resetSelect"></el-button>
|
||||
<el-button v-btn-permission="'XZGGLZ66RH4AP3JVDR4M'" round class="common-button-default delete-button" @click="publishBathDels"><i class="iconfont"></i>删除</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="right">
|
||||
</div>
|
||||
</table-tools-bar>
|
||||
<div class="content">
|
||||
<el-checkbox v-model="checkAll" size="large" @change="handleSelectAll" :indeterminate="indeterminate" style="padding: 10px 6px 0px 15px" v-if="total >0">{{$t('m.checkAll')}}</el-checkbox>
|
||||
<div class="content-detail" v-if="total >0">
|
||||
<div class="card domBtn" v-for="(item,index) in pushList" :key="index" style="cursor:pointer;" :class="{ 'selected ': item.checked }">
|
||||
<!-- <div class="card domBtn" v-for="(item,index) in pushList" :key="index" style="cursor:pointer;" :class="{ 'selected ': item.checked }" @click="handleCardClick(item,$event)">-->
|
||||
<el-col :span="1" style="line-height: 24px;">
|
||||
<el-checkbox v-model="item.checked" size="large"></el-checkbox>
|
||||
</el-col>
|
||||
<el-row style="position: relative;line-height: 24px;">
|
||||
<!-- <div class="dynamic-new" v-if="item.readFlag === 0">new</div>-->
|
||||
|
||||
<el-col :span="5">
|
||||
<div @click="handleBeforeCheck(item)">
|
||||
<!-- <i class="el-icon-search" type="md-bookmark" />-->
|
||||
<i class="el-icon-notebook-2" />
|
||||
<span v-if="item.resType == 'RESOURCE_MSG'">所属板块:资料中心</span>
|
||||
<span v-if="item.resType == 'FOREIGN_LAWS'">所属板块:国内外政策</span>
|
||||
<span v-if="item.resType == 'INLAND_STAND'">所属板块:国内标准法规</span>
|
||||
<span v-if="item.resType == 'FOREIGN_STAND'">所属板块:海外标准法规</span>
|
||||
<span v-if="item.resType == 'BUSINESS_STAND'">所属板块:企业标准</span>
|
||||
<span v-if="item.resType == 'STAND_SPLIT'">所属板块:标准拆分</span>
|
||||
<span v-if="item.resType == 'NOTICE_MSG'">所属板块:动态信息</span>
|
||||
<span v-if="item.resType == 'COMPARISON'">所属板块:标准比对</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="1">
|
||||
<div class="left-contents" :title="item.resTitle">标题:{{item.resTitle}}</div>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<div class="left-contents" :title="item.shareUserId">转发人:{{item.shareUserId}}</div>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1">创建时间:{{item.creationTime}}</el-col>
|
||||
<el-col :span="1" style="line-height: 24px;">
|
||||
<el-button v-btn-permission="'DWTK7BNUVHC8CNZ9765R'" size="mini" @click="publishBathDel(item)" v-if="item.checked" style="margin-top: -5px; border: 1px dashed #dcdee2">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<has-no-data pClass="content-detail" v-if="total === 0"></has-no-data>
|
||||
</div>
|
||||
<loading :loading="loading">数据获取中</loading>
|
||||
<pagination :total="total" :page="page" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
export default {
|
||||
name: 'MyForward',
|
||||
data () {
|
||||
return {
|
||||
checkAll: false, // 是否全选
|
||||
indeterminate: false, // 是否半选
|
||||
total: 0,
|
||||
page: 1,
|
||||
rows: 10,
|
||||
loading: false,
|
||||
search: {
|
||||
resTitle: ''
|
||||
},
|
||||
pushList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 重置
|
||||
resetSelect () {
|
||||
this.search.resTitle = ''
|
||||
this.pageChange(1)
|
||||
},
|
||||
// 分页
|
||||
pageChange (page) {
|
||||
this.page = page
|
||||
this.pushSelect()
|
||||
},
|
||||
pageSizeChange (pageSize) {
|
||||
this.rows = pageSize
|
||||
this.pushSelect()
|
||||
},
|
||||
// 搜索
|
||||
pushSelectBtn () {
|
||||
this.page = 1
|
||||
this.pushSelect()
|
||||
},
|
||||
// 检索
|
||||
pushSelect () {
|
||||
this.$http.get('person/personShare/forwardPage', {
|
||||
page: this.page,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
resTitle: this.search.resTitle
|
||||
}, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
for (let i = 0; i < res.data.list.length; i++) {
|
||||
res.data.list[i].checked = false
|
||||
}
|
||||
this.pushList = res.data.list
|
||||
this.total = res.data.count
|
||||
}, e => {})
|
||||
},
|
||||
// 复选框
|
||||
handleCardClick (item, event) {
|
||||
item.checked = !item.checked
|
||||
},
|
||||
// 全选
|
||||
handleSelectAll (checked) {
|
||||
if (checked) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < this.pushList.length; i++) {
|
||||
this.$set(this.pushList[i], 'checked', true)
|
||||
this.selectedList.push(this.pushList[i].id)
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < this.pushList.length; i++) {
|
||||
this.$set(this.pushList[i], 'checked', false)
|
||||
this.selectedList = []
|
||||
}
|
||||
}
|
||||
},
|
||||
// 单项删除
|
||||
publishBathDel (item) {
|
||||
this.$confirm('确定删除选中数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('/person/personShare/deleteByIdListForward', {
|
||||
ids: item.id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.pageChange(1)
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 批量删除
|
||||
publishBathDels () {
|
||||
if (this.selectedList.length === 0) {
|
||||
this.$message.error('请先选择一条数据进行删除')
|
||||
} else {
|
||||
this.$confirm('确定删除选中数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('/person/personShare/deleteByIdListForward', {
|
||||
ids: this.selectedList
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.pageChange(1)
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
updateReadFlag (item) {
|
||||
this.$http.postData('person/personShare/updateReadFlag', {
|
||||
id: item.id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (item.readFlag === 0) {
|
||||
this.pushSelect()
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* @description: 验证是否含有资料查看权限
|
||||
*/
|
||||
hasResourcePermission (item) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$http.get('lawss/msgDynamicInfo/showDetailsByRole', {
|
||||
id: item.resId
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.data !== null && res.data.length) {
|
||||
resolve()
|
||||
} else {
|
||||
this.$message.warning('无权访问')
|
||||
}
|
||||
}, e => {})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 跳转到各个详情页
|
||||
* INLAND_STAND 国内标准详情
|
||||
* FOREIGN_STAND 海外标准详情
|
||||
* FOREIGN_LAWS 国内外政策
|
||||
* BUSINESS_STAND 企业标准库
|
||||
* RESOURCE_MSG 资料中心
|
||||
* COMPARISON 标准对比
|
||||
*/
|
||||
handleBeforeCheck (item) {
|
||||
console.log('click', item)
|
||||
let name
|
||||
switch (item.resType) {
|
||||
case 'INLAND_STAND':
|
||||
name = 'OtherStandardDetails'
|
||||
break
|
||||
case 'FOREIGN_STAND':
|
||||
name = 'OtherStandardDetails'
|
||||
break
|
||||
case 'FOREIGN_LAWS':
|
||||
name = 'OtherLawsDetails'
|
||||
break
|
||||
case 'BUSINESS_STAND':
|
||||
name = 'OtherBussStandardDetails'
|
||||
break
|
||||
// case 'RESOURCE_MSG':
|
||||
// name = 'DynamicInfomationDetails2'
|
||||
// break
|
||||
}
|
||||
if (item.resType === 'RESOURCE_MSG') {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
let routeUrl = this.$router.resolve({
|
||||
name: 'DynamicInfomationDetails2',
|
||||
query: {
|
||||
id: item.resId,
|
||||
pageType: item.msgType
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
} else if (item.resType === 'STAND_SPLIT') {
|
||||
var str = []
|
||||
str = item.resTitle.split('( 编号:')
|
||||
str[1] = str[1].substring(0, str[1].length - 1)
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'ItemSplitInfo',
|
||||
query: {
|
||||
infoId: item.resId,
|
||||
standNumSplit: str[1] == 'null' ? '' : str[1],
|
||||
standNameSplit: str[0] == 'null' ? '' : str[0]
|
||||
}
|
||||
})
|
||||
return
|
||||
} else if (item.resType === 'COMPARISON') {
|
||||
let rowDataLeft = {}
|
||||
let rowDataRight = {}
|
||||
item.resUri = JSON.parse(item.resUri)
|
||||
rowDataLeft.showNumber = item.resUri.oldStandNum
|
||||
rowDataLeft.standName = item.resUri.oldStandName
|
||||
rowDataLeft.standNameSplit = null
|
||||
rowDataLeft.standNumSplit = null
|
||||
rowDataRight.showNumber = item.resUri.newStandNum
|
||||
rowDataRight.standName = item.resUri.newStandName
|
||||
rowDataRight.standNameSplit = null
|
||||
rowDataRight.standNumSplit = null
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'TextComparison',
|
||||
query: {
|
||||
id: item.resId,
|
||||
flag: '查看',
|
||||
rowDataLeft: JSON.stringify(rowDataLeft),
|
||||
rowDataRight: JSON.stringify(rowDataRight)
|
||||
}
|
||||
})
|
||||
} else if (item.resType === 'NOTICE_MSG') {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'informationIndex2',
|
||||
query: {
|
||||
id: item.resId
|
||||
}
|
||||
})
|
||||
return
|
||||
} else {
|
||||
let routeUrl = this.$router.resolve({
|
||||
name: name,
|
||||
params: {
|
||||
id: item.resId,
|
||||
pageType: item.resType
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
}
|
||||
},
|
||||
...mapMutations(['setDynamicTotal'])
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['getDynamicTotal'])
|
||||
},
|
||||
watch: {
|
||||
pushList: {
|
||||
deep: true,
|
||||
handler (newVal, oldVal) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < newVal.length; i++) {
|
||||
if (newVal[i].checked) {
|
||||
this.selectedList.push(newVal[i].id)
|
||||
}
|
||||
}
|
||||
if (this.selectedList.length === newVal.length && newVal.length !== 0) {
|
||||
this.checkAll = true
|
||||
this.indeterminate = false
|
||||
} else if (this.selectedList.length === 0) {
|
||||
this.checkAll = false
|
||||
} else {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 已选择的列表
|
||||
selectedList (newVal, oldVal) {
|
||||
if (oldVal.length === this.pushList.length && newVal.length !== 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = true
|
||||
} else if (newVal.length === 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.pushSelect()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import '~@/assets/styles/style';
|
||||
@import '~@/assets/styles/mixins';
|
||||
.my-forward{
|
||||
background: #FFF;
|
||||
padding: 0px 10px 10px;
|
||||
height: 100%;
|
||||
.content {
|
||||
width: 100%;
|
||||
height: calc(~'100% - 110px');
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
.content-detail {
|
||||
width: 100%;
|
||||
height:calc(~'100% - 30px');
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding: 0.1rem;
|
||||
background-color: white;
|
||||
.card {
|
||||
width: 100%;
|
||||
height: 1rem;
|
||||
border: 1px solid #EEE;
|
||||
margin-bottom: 4px;
|
||||
transition: all .2s ease-in-out;
|
||||
cursor: pointer;
|
||||
padding: 14px;
|
||||
background: #FFF;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
.un-select();
|
||||
.left-contents{
|
||||
width: 100%;
|
||||
.ellipsis()
|
||||
}
|
||||
&:hover {
|
||||
box-shadow: 0 1px 13px 0 #DDD;
|
||||
}
|
||||
.dynamic-new{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
color: #FF0000;
|
||||
font-style: italic;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
font-size: 12px;
|
||||
.flex();
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
transform: rotate(-15deg);
|
||||
-webkit-transform: rotate(-15deg);
|
||||
-ms-transform: rotate(-15deg);
|
||||
-moz-transform: rotate(-15deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,558 @@
|
||||
<!-- 我的推送 -->
|
||||
<template>
|
||||
<div class="my-push">
|
||||
<table-tools-bar>
|
||||
<div slot="left">
|
||||
<div class="search-area">
|
||||
<el-form :inline="true" class="label-input-form" >
|
||||
<el-form-item label="推送搜索" class="search-item search-item-last">
|
||||
<el-input v-model="search.resTitle"
|
||||
placeholder="请输入推送信息"
|
||||
clearable
|
||||
:maxlength="100"
|
||||
@keyup.enter.native="pushSelectBtn"></el-input>
|
||||
</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="pushSelectBtn">
|
||||
</el-button>
|
||||
<el-button
|
||||
class="common-button-default"
|
||||
icon="el-icon-refresh-left"
|
||||
round
|
||||
@click="resetSelect"></el-button>
|
||||
<el-button v-btn-permission="'EMFLC2884LU948W6UGQW'" round class="common-button-default delete-button" @click="publishBathDels"><i class="iconfont"></i>删除</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</table-tools-bar>
|
||||
<div class="content">
|
||||
<el-checkbox v-model="checkAll" size="large" @change="handleSelectAll" :indeterminate="indeterminate" style="padding: 10px 6px 0px 15px" v-if="total >0">{{$t('m.checkAll')}}</el-checkbox>
|
||||
<div class="content-detail" v-if="total >0">
|
||||
<div class="card domBtn" v-for="(item,index) in pushList" :key="index" style="cursor:pointer;" :class="{ 'selected ': item.checked }">
|
||||
<!-- <div class="card domBtn" v-for="(item,index) in pushList" :key="index" style="cursor:pointer;" :class="{ 'selected ': item.checked }" @click="handleCardClick(item,$event)">-->
|
||||
<el-col :span="1" :offset="1" style="line-height: 24px;">
|
||||
<el-checkbox v-model="item.checked" size="large"></el-checkbox>
|
||||
</el-col>
|
||||
<el-row style="position: relative;line-height: 24px;">
|
||||
<div class="dynamic-new" v-if="item.readFlag === 0">new</div>
|
||||
|
||||
<el-col :span="4">
|
||||
<div @click="handleBeforeCheck(item)">
|
||||
<!-- <i class="el-icon-search" type="md-bookmark" />-->
|
||||
<i class="el-icon-notebook-2" />
|
||||
<span v-if="item.resType == 'RESOURCE_MSG'">所属板块:资料中心</span>
|
||||
<span v-if="item.resType == 'FOREIGN_LAWS'">所属板块:国内外政策</span>
|
||||
<span v-if="item.resType == 'INLAND_STAND'">所属板块:国内标准法规</span>
|
||||
<span v-if="item.resType == 'FOREIGN_STAND'">所属板块:海外标准法规</span>
|
||||
<span v-if="item.resType == 'BUSINESS_STAND'">所属板块:企业标准</span>
|
||||
<span v-if="item.resType == 'NOTICE_MSG'">所属板块:动态信息</span>
|
||||
<span v-if="item.resType == 'STAND_SPLIT'">所属板块:标准拆分</span>
|
||||
<span v-if="item.resType == 'COMPARISON'">所属板块:标准比对</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1">
|
||||
<div class="left-contents" :title="item.resTitle">标题:{{item.resTitle}}</div>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">推送人:{{item.shareUserId}}</el-col>
|
||||
<el-col :span="5" :offset="1">创建时间:{{item.creationTime}}</el-col>
|
||||
|
||||
<el-col :span="1" style="line-height: 24px;">
|
||||
<el-button v-btn-permission="'A6WVT4QPMAM72CPYJGFD'" size="mini" @click="publishBathDel(item)" v-if="item.checked" style="margin-top: -5px; border: 1px dashed #dcdee2">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<has-no-data pClass="content-detail" v-if="total === 0"></has-no-data>
|
||||
</div>
|
||||
<loading :loading="loading">数据获取中</loading>
|
||||
<pagination :page="page" :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
export default {
|
||||
name: 'MyPush',
|
||||
data () {
|
||||
return {
|
||||
checkAll: false, // 是否全选
|
||||
indeterminate: false, // 是否半选
|
||||
total: 0,
|
||||
page: 1,
|
||||
rows: 10,
|
||||
loading: false,
|
||||
search: {
|
||||
resTitle: ''
|
||||
},
|
||||
pushList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 重置
|
||||
resetSelect () {
|
||||
this.search.resTitle = ''
|
||||
this.pageChange(1)
|
||||
},
|
||||
// 分页
|
||||
pageChange (page) {
|
||||
this.page = page
|
||||
this.pushSelect()
|
||||
},
|
||||
pageSizeChange (pageSize) {
|
||||
this.rows = pageSize
|
||||
this.pushSelect()
|
||||
},
|
||||
// 搜索
|
||||
pushSelectBtn () {
|
||||
this.page = 1
|
||||
this.pushSelect()
|
||||
},
|
||||
// 检索
|
||||
pushSelect () {
|
||||
this.$http.get('person/personShare/page', {
|
||||
page: this.page,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
resTitle: this.search.resTitle
|
||||
}, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
for (let i = 0; i < res.data.list.length; i++) {
|
||||
res.data.list[i].checked = false
|
||||
}
|
||||
this.pushList = res.data.list
|
||||
this.total = res.data.count
|
||||
}, e => {})
|
||||
this.queryByPersonMsg()
|
||||
},
|
||||
// 查询用户未读动态
|
||||
queryByPersonMsg () {
|
||||
this.$http.get('/person/personMsg/selectNotRed', {}, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
this.setDynamicTotal(res.data)
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 复选框
|
||||
handleCardClick (item, event) {
|
||||
item.checked = !item.checked
|
||||
},
|
||||
// 全选
|
||||
handleSelectAll (checked) {
|
||||
if (checked) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < this.pushList.length; i++) {
|
||||
this.$set(this.pushList[i], 'checked', true)
|
||||
this.selectedList.push(this.pushList[i].id)
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < this.pushList.length; i++) {
|
||||
this.$set(this.pushList[i], 'checked', false)
|
||||
this.selectedList = []
|
||||
}
|
||||
}
|
||||
},
|
||||
// 单项删除
|
||||
publishBathDel (item) {
|
||||
this.$confirm('确定删除选中数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('/person/personShare/deleteByIdList', {
|
||||
ids: item.id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
if (item.readFlag === 0) {
|
||||
this.queryByPersonMsg()
|
||||
// let total = parseInt(this.getDynamicTotal.shareCount) - 1
|
||||
// let obj = {}
|
||||
// obj.allCount = parseInt(total + this.getDynamicTotal.msgCount)
|
||||
// obj.msgCount = this.getDynamicTotal.msgCount
|
||||
// obj.shareCount = total
|
||||
// if (obj.allCount > 0) {
|
||||
// this.setDynamicTotal(obj)
|
||||
// } else {
|
||||
// this.setDynamicTotal('')
|
||||
// }
|
||||
}
|
||||
this.pageChange(1)
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 批量删除
|
||||
publishBathDels () {
|
||||
if (this.selectedList.length === 0) {
|
||||
this.$message.error('请先选择一条数据进行删除')
|
||||
} else {
|
||||
this.$confirm('确定删除选中数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('/person/personShare/deleteByIdList', {
|
||||
ids: this.selectedList
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.queryByPersonMsg()
|
||||
// let obj = {}
|
||||
// obj.allCount = parseInt(this.getDynamicTotal.msgCount)
|
||||
// obj.msgCount = parseInt(this.getDynamicTotal.msgCount)
|
||||
// obj.shareCount = 0
|
||||
// if (obj.allCount > 0) {
|
||||
// this.setDynamicTotal(obj)
|
||||
// } else {
|
||||
// this.setDynamicTotal('')
|
||||
// }
|
||||
this.pageChange(1)
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
// 跳详情页
|
||||
detailsPage (item) {
|
||||
this.$http.get('lawss/sarMenu/judgeSarMenuByRole', {
|
||||
sarId: item.resId,
|
||||
sarType: item.resType
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.updateReadFlag(item)
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
let routeUrl = ''
|
||||
if (item.resType === 'INLAND_LAWS' || item.resType === 'FOREIGN_LAWS') {
|
||||
// if (this.$hasPermission('A2HDHMEA6W')) {
|
||||
routeUrl = this.$router.resolve({
|
||||
name: 'OtherLawsDetails',
|
||||
params: {
|
||||
id: item.resId,
|
||||
pageType: item.resType
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
// } else {
|
||||
// this.$message.warning('无权访问')
|
||||
// }
|
||||
} else if (item.resType === 'INLAND_STAND' || item.resType === 'FOREIGN_STAND') {
|
||||
console.log(item)
|
||||
// if (this.$hasPermission('SSA6WR4HV8')) {
|
||||
routeUrl = this.$router.resolve({
|
||||
name: 'OtherStandardDetails',
|
||||
params: {
|
||||
id: item.resId,
|
||||
pageType: item.resType
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
// } else {
|
||||
// this.$message.warning('无权访问')
|
||||
// }
|
||||
} else if (item.resType === 'INLAND_MSG' || item.resType === 'FOREIGN_MSG' || item.resType === 'RESOURCE_MSG') {
|
||||
routeUrl = this.$router.push({
|
||||
name: 'PushDynamicDetail',
|
||||
params: {
|
||||
id: item.resId,
|
||||
pageType: item.resType
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
} else {
|
||||
// if (this.$hasPermission('YJUHC32R7G')) {
|
||||
routeUrl = this.$router.resolve({
|
||||
name: 'OtherBussStandardDetails',
|
||||
params: {
|
||||
id: item.resId,
|
||||
pageType: item.resType
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
// } else {
|
||||
// this.$message.warning('无权访问')
|
||||
// }
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
}, e => {
|
||||
this.$message.error('无权访问')
|
||||
})
|
||||
},
|
||||
updateReadFlag (item) {
|
||||
this.$http.postData('person/personShare/updateReadFlag', {
|
||||
id: item.id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (item.readFlag === 0) {
|
||||
let total = parseInt(this.getDynamicTotal.shareCount) - 1
|
||||
let obj = {}
|
||||
obj.allCount = parseInt(total + this.getDynamicTotal.msgCount)
|
||||
obj.msgCount = this.getDynamicTotal.msgCount
|
||||
obj.shareCount = total
|
||||
if (obj.allCount > 0) {
|
||||
this.setDynamicTotal(obj)
|
||||
} else {
|
||||
this.setDynamicTotal('')
|
||||
}
|
||||
this.pushSelect()
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* @description: 验证是否含有资料查看权限
|
||||
*/
|
||||
hasResourcePermission (item) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$http.get('lawss/msgDynamicInfo/showDetailsByRole', {
|
||||
id: item.resId
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.data !== null && res.data.length) {
|
||||
resolve()
|
||||
} else {
|
||||
this.$message.warning('无权访问')
|
||||
}
|
||||
}, e => {})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* @description: 推送查看前权限验证
|
||||
*/
|
||||
handleBeforeCheck (pushItem) {
|
||||
// 是文本类型的可以跳转
|
||||
if (pushItem.readFlag === 0) {
|
||||
let idList = []
|
||||
idList.push(pushItem.id)
|
||||
this.$http.post('/person/personMsg/markIsReadByBatch', {
|
||||
ids: idList
|
||||
}, {}, res => {
|
||||
this.queryByPersonMsg()
|
||||
}, e => {
|
||||
})
|
||||
}
|
||||
if (pushItem.resType === 'NOTICE_MSG') {
|
||||
this.updateReadFlag(pushItem)
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'informationIndex2',
|
||||
query: {
|
||||
id: pushItem.resId
|
||||
}
|
||||
})
|
||||
} else if (pushItem.resType === 'STAND_SPLIT') {
|
||||
var str = []
|
||||
str = pushItem.resTitle.split('( 编号:')
|
||||
str[1] = str[1].substring(0, str[1].length - 1)
|
||||
this.updateReadFlag(pushItem)
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'ItemSplitInfo',
|
||||
query: {
|
||||
infoId: pushItem.resId,
|
||||
standNumSplit: str[1] == 'null' ? '' : str[1],
|
||||
standNameSplit: str[0] == 'null' ? '' : str[0]
|
||||
}
|
||||
})
|
||||
} else if (pushItem.resType === 'COMPARISON') {
|
||||
let rowDataLeft = {}
|
||||
let rowDataRight = {}
|
||||
pushItem.resUri = JSON.parse(pushItem.resUri)
|
||||
rowDataLeft.showNumber = pushItem.resUri.oldStandNum
|
||||
rowDataLeft.standName = pushItem.resUri.oldStandName
|
||||
rowDataLeft.standNameSplit = null
|
||||
rowDataLeft.standNumSplit = null
|
||||
rowDataRight.showNumber = pushItem.resUri.newStandNum
|
||||
rowDataRight.standName = pushItem.resUri.newStandName
|
||||
rowDataRight.standNameSplit = null
|
||||
rowDataRight.standNumSplit = null
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'TextComparison',
|
||||
query: {
|
||||
id: pushItem.resId,
|
||||
flag: '查看',
|
||||
rowDataLeft: JSON.stringify(rowDataLeft),
|
||||
rowDataRight: JSON.stringify(rowDataRight)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const TYPE = pushItem.resType
|
||||
const NEED_PERMISSION_LIST = ['RESOURCE_MSG', 'INLAND_LAWS', 'FOREIGN_LAWS', 'INLAND_STAND', 'FOREIGN_STAND', 'BUSINESS_STAND', 'COMPARISON']
|
||||
const open = () => {
|
||||
this.updateReadFlag(pushItem)
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
let routeUrl = this.$router.push({
|
||||
name: 'PushDynamicDetail',
|
||||
params: {
|
||||
id: pushItem.resId,
|
||||
pageType: pushItem.resType
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
}
|
||||
// 这一条推送需要权限验证
|
||||
if (NEED_PERMISSION_LIST.indexOf(TYPE) > -1) {
|
||||
if (TYPE === 'RESOURCE_MSG') {
|
||||
this.updateReadFlag(pushItem)
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
const route = this.$router.resolve({
|
||||
name: 'DynamicInfomationDetails2',
|
||||
query: {
|
||||
id: pushItem.resId,
|
||||
pageType: 'RESOURCE_MSG'
|
||||
}
|
||||
})
|
||||
window.open(route.href, '_blank')
|
||||
// this.hasResourcePermission(pushItem).then(() => {
|
||||
// open()
|
||||
// })
|
||||
} else {
|
||||
this.detailsPage(pushItem)
|
||||
}
|
||||
} else {
|
||||
open()
|
||||
}
|
||||
}
|
||||
},
|
||||
...mapMutations(['setDynamicTotal'])
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['getDynamicTotal'])
|
||||
},
|
||||
watch: {
|
||||
pushList: {
|
||||
deep: true,
|
||||
handler (newVal, oldVal) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < newVal.length; i++) {
|
||||
if (newVal[i].checked) {
|
||||
this.selectedList.push(newVal[i].id)
|
||||
}
|
||||
}
|
||||
if (this.selectedList.length === newVal.length && newVal.length !== 0) {
|
||||
this.checkAll = true
|
||||
this.indeterminate = false
|
||||
} else if (this.selectedList.length === 0) {
|
||||
this.checkAll = false
|
||||
} else {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 已选择的列表
|
||||
selectedList (newVal, oldVal) {
|
||||
if (oldVal.length === this.pushList.length && newVal.length !== 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = true
|
||||
} else if (newVal.length === 0) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.pushSelect()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import '~@/assets/styles/style';
|
||||
@import '~@/assets/styles/mixins';
|
||||
.my-push{
|
||||
min-width: 1140px;
|
||||
background: #FFF;
|
||||
padding: 0px 10px 10px;
|
||||
height: 100%;
|
||||
.content {
|
||||
width: 100%;
|
||||
height: calc(~'100% - 100px');
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
padding-bottom: 30px;
|
||||
.content-detail {
|
||||
width: 100%;
|
||||
height:100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding: 0.1rem;
|
||||
background-color: white;
|
||||
.card {
|
||||
width: 100%;
|
||||
height: 1rem;
|
||||
border: 1px solid #EEE;
|
||||
margin-bottom: 4px;
|
||||
transition: all .2s ease-in-out;
|
||||
cursor: pointer;
|
||||
padding: 14px;
|
||||
background: #FFF;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
.un-select();
|
||||
.left-contents{
|
||||
width: 100%;
|
||||
.ellipsis()
|
||||
}
|
||||
&:hover {
|
||||
box-shadow: 0 1px 13px 0 #DDD;
|
||||
}
|
||||
.dynamic-new{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
color: #FF0000;
|
||||
font-style: italic;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
font-size: 12px;
|
||||
.flex();
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
transform: rotate(-15deg);
|
||||
-webkit-transform: rotate(-15deg);
|
||||
-ms-transform: rotate(-15deg);
|
||||
-moz-transform: rotate(-15deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,189 @@
|
||||
<template>
|
||||
<div class="account-security v-class">
|
||||
<div class="user-info-form">
|
||||
<el-form ref="formCustom" :model="formCustom" :rules="ruleCustom" class="label-input-form">
|
||||
<el-form-item label="原始密码" prop="passwordOld" :label-width="formLabelWidth" class="user-info-item add-form-item">
|
||||
<el-input type="text" v-model="formCustom.passwordOld" :style="{width:6+'rem'}" onfocus="this.type='password'"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码" prop="passwd" :label-width="formLabelWidth" class="user-info-item add-form-item">
|
||||
<el-input type="text" v-model="formCustom.passwd" :style="{width:6+'rem'}" onfocus="this.type='password'"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码" prop="passwdCheck" :label-width="formLabelWidth" class="user-info-item add-form-item">
|
||||
<el-input type="text" v-model="formCustom.passwdCheck" :style="{width:6+'rem'}" onfocus="this.type='password'"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button class="searchAngNewBtn" type="primary" @click="handleSubmit('formCustom')" style="margin-left: 3rem" >保存</el-button>
|
||||
<el-button class="searchAngNewBtn" @click="handleReset('formCustom')" style="margin-left: 0.3rem">重置</el-button >
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'AccountSecurity',
|
||||
data () {
|
||||
const validatePassOld = (rule, value, callback) => {
|
||||
if (value === '') {
|
||||
callback(new Error('请输入您的密码'))
|
||||
} else {
|
||||
this.verificationPasswordBefore().then(res => {
|
||||
if (res !== '原始密码正确') {
|
||||
callback(new Error('密码有误,请重新输入!'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}, e => {})
|
||||
}
|
||||
}
|
||||
const validatePass = (rule, value, callback) => {
|
||||
if (value === '') {
|
||||
callback(new Error('请输入您的新密码'))
|
||||
} else {
|
||||
let tel = /^.*[^\d].*$/
|
||||
let tel2 = /^.{6,20}$/
|
||||
let tel3 = /^\S*$/
|
||||
if (!value.match(tel)) {
|
||||
return callback(new Error('不能为纯数字,且密码长度为6-20位'))
|
||||
} else if (!value.match(tel2)) {
|
||||
return callback(new Error('不能为纯数字,且密码长度为6-20位'))
|
||||
} else if (!value.match(tel3)) {
|
||||
return callback(new Error('密码不能有空格'))
|
||||
} else if (value === this.formCustom.passwordOld) {
|
||||
return callback(new Error('新密码不能与旧密码一致'))
|
||||
}
|
||||
}callback()
|
||||
}
|
||||
const validatePassCheck = (rule, value, callback) => {
|
||||
if (value === '') {
|
||||
callback(new Error('请再次输入密码!'))
|
||||
} else if (value !== this.formCustom.passwd) {
|
||||
callback(new Error('确认密码与新密码不符,请重新输入新密码和确认密码!'))
|
||||
} else {
|
||||
let tel = /^.*[^\d].*$/
|
||||
let tel2 = /^.{6,20}$/
|
||||
let tel3 = /^\S*$/
|
||||
if (!value.match(tel)) {
|
||||
return callback(new Error('不能为纯数字,且密码长度为6-20位'))
|
||||
} else if (!value.match(tel2)) {
|
||||
return callback(new Error('不能为纯数字,且密码长度为6-20位'))
|
||||
} else if (!value.match(tel3)) {
|
||||
return callback(new Error('密码不能有空格'))
|
||||
}
|
||||
}callback()
|
||||
}
|
||||
return {
|
||||
formCustom: {
|
||||
passwordOld: '',
|
||||
passwd: '',
|
||||
passwdCheck: ''
|
||||
},
|
||||
msg: '',
|
||||
formLabelWidth: '80px',
|
||||
ruleCustom: {
|
||||
passwordOld: [
|
||||
{ required: true, validator: validatePassOld, trigger: 'blur' }
|
||||
],
|
||||
passwd: [
|
||||
{ required: true, validator: validatePass, trigger: 'blur' }
|
||||
],
|
||||
passwdCheck: [
|
||||
{ required: true, validator: validatePassCheck, trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 验证旧密码是否正确
|
||||
verificationPasswordBefore () {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$http.get('verificationPasswordBefore', {
|
||||
password_before: this.$base64(this.formCustom.passwordOld)
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
resolve(res.message)
|
||||
}, e => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSubmit (name) {
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$http.post('updatePassword', {
|
||||
oldPassword: this.$base64(this.formCustom.passwordOld),
|
||||
newPassword: this.$base64(this.formCustom.passwd)
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.userLoginOut()
|
||||
}, e => {})
|
||||
} else {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 用户退出登录
|
||||
userLoginOut () {
|
||||
this.$http.get('logout',
|
||||
{},
|
||||
{_this: this,
|
||||
loading: 'loading'},
|
||||
res => {
|
||||
this.$store.commit('logout')
|
||||
this.$router.push('/sign_in')
|
||||
})
|
||||
},
|
||||
handleReset (name) {
|
||||
this.$refs[name].resetFields()
|
||||
},
|
||||
// 错误提示
|
||||
error () {
|
||||
this.$Message.error('This is an error tip')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.account-security{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.container{
|
||||
margin: 2rem 7rem;
|
||||
}
|
||||
}
|
||||
.user-info-form{
|
||||
width: 500px;
|
||||
min-height: 400px;
|
||||
margin-left: 84px;
|
||||
position: absolute;
|
||||
margin-top: 20px;
|
||||
padding-bottom: 10px;
|
||||
@media screen and (min-width: 1920px) {
|
||||
width: 800px;
|
||||
}
|
||||
.save{
|
||||
width: 4.24rem;
|
||||
height: 0.72rem;
|
||||
line-height: 0.72rem;
|
||||
margin: 0.5rem 0 0 0.2rem;
|
||||
border-radius: 4px;
|
||||
position: relative;
|
||||
}
|
||||
.user-info-item{
|
||||
margin-bottom: 20px;
|
||||
vertical-align: top;
|
||||
zoom: 1;
|
||||
.ivu-input{
|
||||
width: 256px;
|
||||
}
|
||||
&:last-child{
|
||||
.ivu-input{
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,335 @@
|
||||
<template>
|
||||
<div class="personal-data v-class">
|
||||
<!-- <div class="user-avator">-->
|
||||
<!-- <div class="img-warpper">-->
|
||||
<!-- <img :src="userAvator">-->
|
||||
<!-- <loading :loading="loading">头像上传中</loading>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-input type="file" accept="image/*" v-show="false" ref="avatorUploadBtn" id="avatorUploadBtn" @change="uploadAvator" ></el-input>-->
|
||||
<!-- <el-button class="imgBtn" type="primary" long @click="chooseAvator" style="margin-top: 5px">修改头像</el-button>-->
|
||||
<!-- <div class="tips"><span class="require">*</span> 图片大小不能超过2M</div>-->
|
||||
<!-- </div>-->
|
||||
<div class="user-info-form">
|
||||
<el-form :model="userInfo" ref="userInfo" :rules="userInfoRules" class="label-input-form">
|
||||
<el-form-item
|
||||
label="用户名"
|
||||
:label-width="formLabelWidth"
|
||||
prop="account"
|
||||
class="user-info-item add-form-item">
|
||||
<el-input
|
||||
disabled
|
||||
v-model.trim="userInfo.account"
|
||||
autocomplete="off"
|
||||
clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="姓 名"
|
||||
prop="uName"
|
||||
:label-width="formLabelWidth"
|
||||
class="user-info-item add-form-item">
|
||||
<el-input
|
||||
disabled
|
||||
v-model.trim="userInfo.uName"
|
||||
autocomplete="off"
|
||||
clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="任职部门"
|
||||
prop="orgName"
|
||||
:label-width="formLabelWidth"
|
||||
class="user-info-item add-form-item">
|
||||
<el-input
|
||||
disabled
|
||||
v-model.trim="userInfo.orgName"
|
||||
autocomplete="off"
|
||||
clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="办公电话"
|
||||
prop="officePhone"
|
||||
:label-width="formLabelWidth"
|
||||
class="user-info-item add-form-item">
|
||||
<el-input
|
||||
v-model.trim="userInfo.officePhone"
|
||||
autocomplete="off"
|
||||
clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="个人邮箱"
|
||||
prop="email"
|
||||
:label-width="formLabelWidth"
|
||||
class="user-info-item add-form-item">
|
||||
<el-input
|
||||
v-model="userInfo.email"
|
||||
clearable
|
||||
:maxlength="100">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="手机号码"
|
||||
:label-width="formLabelWidth"
|
||||
class="user-info-item add-form-item">
|
||||
<el-input
|
||||
v-model="userInfo.mobilePhone"
|
||||
:maxlength="11"
|
||||
clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="传 真"
|
||||
prop="faxAddress"
|
||||
:label-width="formLabelWidth"
|
||||
class="user-info-item add-form-item">
|
||||
<el-input
|
||||
v-model="userInfo.faxAddress"
|
||||
clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="个性签名"
|
||||
prop="signature"
|
||||
:label-width="formLabelWidth"
|
||||
class="user-info-item add-form-item">
|
||||
<el-input
|
||||
v-model.trim="userInfo.signature"
|
||||
clearable >
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button class="submitBtn" type="primary" long v-btn-permission="'9E2YPU8R6B'" @click="saveUserInfo('userInfo')" style="width: 200px">保存修改</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapMutations } from 'vuex'
|
||||
export default {
|
||||
name: 'PersonalData',
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
userAvator: '',
|
||||
userInfo: {
|
||||
account: '',
|
||||
uName: '',
|
||||
orgName: '',
|
||||
email: '',
|
||||
mobilePhone: '',
|
||||
officePhone: '',
|
||||
faxAddress: '',
|
||||
signature: ''
|
||||
},
|
||||
formLabelWidth: '80px',
|
||||
userInfoRules: {
|
||||
account: [
|
||||
{required: true, message: '用户名不能为空', trigger: 'blur'},
|
||||
{type: 'string', max: 100, message: '最多输入100位', trigger: 'blur'}
|
||||
],
|
||||
uName: [
|
||||
{type: 'string', max: 100, message: '最多输入100位', trigger: 'blur'}
|
||||
],
|
||||
orgName: [
|
||||
// {required: true, message: '任职部门不能为空', trigger: 'blur'},
|
||||
{type: 'string', max: 100, message: '最多输入100位', trigger: 'blur'}
|
||||
],
|
||||
officePhone: [
|
||||
{max: 100, message: '最多输入100位', trigger: 'blur'},
|
||||
{type: 'string', validator: this.verify.checkOfficePhone, trigger: 'blur'}
|
||||
],
|
||||
email: [
|
||||
{required: true, message: '邮箱DynamicInformations不能为空', trigger: 'blur'},
|
||||
{max: 100, message: '最多输入100位', trigger: 'blur'},
|
||||
{type: 'string', validator: this.verify.checkEmails, trigger: 'blur'}
|
||||
],
|
||||
// mobilePhone: [
|
||||
// {required: true, message: '手机号不能为空', trigger: 'blur'},
|
||||
// { validator: this.verify.checkMobilePhone, trigger: 'blur' }
|
||||
// ],
|
||||
faxAddress: [
|
||||
{type: 'number', validator: this.verify.checkFaxAddress, trigger: 'blur'}
|
||||
],
|
||||
signature: [
|
||||
{
|
||||
type: 'string', max: 100, message: '个性签名输入上限为100'
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 选取图片
|
||||
chooseAvator () {
|
||||
document.getElementById('avatorUploadBtn').click()
|
||||
},
|
||||
/**
|
||||
* @description: 头像上传
|
||||
* @author: xx
|
||||
* @date: 2018-08-30 16:06:06
|
||||
*/
|
||||
error (msg) {
|
||||
this.$Message.error(msg)
|
||||
},
|
||||
// // 个性签名字数统计
|
||||
// errorSignature () {
|
||||
// if (this.userInfo.signature.length > 100) {
|
||||
// this.error('最多输入100个字')
|
||||
// }
|
||||
// },
|
||||
// 上传图片
|
||||
uploadAvator () {
|
||||
let avator = this.$refs.avatorUploadBtn.files[0]
|
||||
let flileSize = this.$refs.avatorUploadBtn.files[0].size
|
||||
if (flileSize / 1024 > 2000) {
|
||||
this.error('上传图片大于2M,请重新上传')
|
||||
$('#avatorUploadBtn').val('')
|
||||
return
|
||||
}
|
||||
this.$http.post('att/attFile/upload', {
|
||||
file: avator
|
||||
}, {
|
||||
_this: this,
|
||||
loading: 'loading'
|
||||
}, res => {
|
||||
this.userInfo.userPic = res.data.id
|
||||
this.userAvator = 'uploadPath' + res.data.filePath + res.data.fileName
|
||||
})
|
||||
},
|
||||
// 保存用户信息
|
||||
saveUserInfo (name) {
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$http.postData('person/userInfo/updatePersonInfo',
|
||||
{
|
||||
id: this.userInfo.id,
|
||||
officePhone: this.userInfo.officePhone,
|
||||
email: this.userInfo.email,
|
||||
mobilePhone: this.userInfo.mobilePhone,
|
||||
faxAddress: this.userInfo.faxAddress,
|
||||
signature: this.userInfo.signature,
|
||||
userPic: this.userInfo.userPic
|
||||
}, {_this: this}, res => {
|
||||
if (res.ok) {
|
||||
this.$message({
|
||||
message: '保存成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.userInfo.avator = this.userAvator
|
||||
this.setUserInfo(JSON.stringify(this.userInfo))
|
||||
} else {
|
||||
}
|
||||
}, e => {})
|
||||
} else {}
|
||||
})
|
||||
},
|
||||
...mapMutations(['setUserInfo'])
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
watch: {
|
||||
userInfo: {
|
||||
deep: true,
|
||||
handler (val) {
|
||||
this.userAvator = val.avator
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.userInfo = JSON.parse(JSON.stringify(this.$store.getters.userInfo))
|
||||
this.userAvator = this.userInfo.avator || require('../../../../../assets/images/avator_default.png')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.personal-data{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
button.el-button.imgBtn.el-button--primary, button.el-button.submitBtn.el-button--primary{
|
||||
width: 200px;
|
||||
background-color: #3391CE;
|
||||
border-color: #3391CE;
|
||||
height: 32px;
|
||||
padding: 0 15px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.user-avator{
|
||||
width: 200px;
|
||||
height: 220px;
|
||||
box-sizing: border-box;
|
||||
margin: 80px 0 0 50px;
|
||||
float: left;
|
||||
.img-warpper{
|
||||
width: 100%;
|
||||
height: 220px;
|
||||
background: #DDD;
|
||||
border: 1px solid #DDD;
|
||||
}
|
||||
.btn-avator{
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.tips{
|
||||
padding-top: 5px;
|
||||
}
|
||||
}
|
||||
.user-info-form{
|
||||
width: 500px;
|
||||
min-height: 400px;
|
||||
margin-left: 84px;
|
||||
position: absolute;
|
||||
margin-top: 20px;
|
||||
padding-bottom: 10px;
|
||||
@media screen and (min-width: 1920px) {
|
||||
width: 800px;
|
||||
}
|
||||
.save{
|
||||
width: 4.24rem;
|
||||
height: 0.72rem;
|
||||
line-height: 0.72rem;
|
||||
margin: 0.5rem 0 0 0.2rem;
|
||||
border-radius: 4px;
|
||||
position: relative;
|
||||
}
|
||||
.user-info-item{
|
||||
margin-bottom: 20px;
|
||||
vertical-align: top;
|
||||
zoom: 1;
|
||||
.ivu-input{
|
||||
width: 256px;
|
||||
}
|
||||
&:last-child{
|
||||
.ivu-input{
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.require{
|
||||
color: #FF0000;
|
||||
}
|
||||
textarea{
|
||||
min-height: 32px !important;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<style lang="less" scoped>
|
||||
.el-input{
|
||||
width:95%;
|
||||
.el-input__clear:hover{
|
||||
color:#000000;
|
||||
//position:absolute;
|
||||
}.el-input__clear{
|
||||
color:#000000;
|
||||
//position:absolute;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<div class="personal-info v-class">
|
||||
<panel-header :tabs="tabsList" @activated="showComponent" :active="active"></panel-header>
|
||||
<panel-content class="panel-content-box">
|
||||
<components :is="active"></components>
|
||||
</panel-content>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import PersonalData from './components/PersonalData'
|
||||
import AccountSecurity from './components/AccountSecurity'
|
||||
export default {
|
||||
name: 'PersonalInfo',
|
||||
data () {
|
||||
return {
|
||||
active: 'PersonalData',
|
||||
tabsList: [{
|
||||
title: '个人资料',
|
||||
name: 'PersonalData'
|
||||
}, {
|
||||
title: '账号安全设置',
|
||||
name: 'AccountSecurity'
|
||||
}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showComponent (name) {
|
||||
this.active = name
|
||||
}
|
||||
},
|
||||
components: {
|
||||
PersonalData,
|
||||
AccountSecurity
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.personal-info {
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,271 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <div class="user-info">-->
|
||||
<!-- <div>-->
|
||||
<!-- <span>{{ userInfo.uName }}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <span>{{ userInfo.orgName }}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <span>{{ question.createTime }}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <span>{{ question.standNumber }}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <span>{{ question.standName }}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<el-divider style="margin: 10px 0;"></el-divider>
|
||||
|
||||
<div class="message-content">
|
||||
<el-form ref="form" :model="form" :rules="rules">
|
||||
<el-form-item prop="textarea">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="请输入回复内容"
|
||||
v-model="form.textarea">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<!--<el-formItem prop="files" class="add-form-item">-->
|
||||
<!-- <el-upload-->
|
||||
<!-- drag-->
|
||||
<!-- :on-success="uploadFileSuccess"-->
|
||||
<!-- :action="uploadFileUrl"-->
|
||||
<!-- :before-upload="beforeUploadFile"-->
|
||||
<!-- :show-file-list="true"-->
|
||||
<!-- :on-format-error="handleFileFormatError"-->
|
||||
<!-- name="file"-->
|
||||
<!-- ref="uploadFileNewDialog"-->
|
||||
<!-- :limit="1"-->
|
||||
<!-- :on-exceed="onFileExceed"-->
|
||||
<!-- >-->
|
||||
<!-- <i class="el-icon-upload"></i>-->
|
||||
<!-- <div class="el-upload__text">点击或拖拽上传文件</div>-->
|
||||
<!-- </el-upload>-->
|
||||
<!--</el-formItem>-->
|
||||
<div class="clearfix" style="">
|
||||
<el-button
|
||||
type="primary"
|
||||
round
|
||||
class="common-button-primary"
|
||||
size="small"
|
||||
style="float: right;"
|
||||
@click="handleSubmit"
|
||||
>提交</el-button>
|
||||
|
||||
<el-button
|
||||
type="primary"
|
||||
round
|
||||
class="common-button-primary"
|
||||
size="small"
|
||||
style="float: right;margin-right: 10px;"
|
||||
@click="openUploadFileDialog"
|
||||
>上传文件</el-button>
|
||||
|
||||
<!--<div>-->
|
||||
<!-- <span>{{ form.fileName }}</span>-->
|
||||
<!--</div>-->
|
||||
|
||||
<slot name="btnGroup" v-bind:qaId="qaId"></slot>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-dialog width="400px" :visible.sync="uploadFileDialogVisible" title="上传文件">
|
||||
<el-upload
|
||||
drag
|
||||
:on-success="uploadFileSuccess"
|
||||
:action="uploadFileUrl"
|
||||
:before-upload="beforeUploadFile"
|
||||
:show-file-list="true"
|
||||
:on-format-error="handleFileFormatError"
|
||||
name="file"
|
||||
ref="uploadFileNewDialog"
|
||||
:limit="1"
|
||||
:on-exceed="onFileExceed"
|
||||
:on-remove="onFileRemove"
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">点击或拖拽上传文件</div>
|
||||
</el-upload>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'AnswerItem',
|
||||
props: {
|
||||
qaId: {
|
||||
type: String,
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
uploadFileUrl: 'api/att/attFile/upload',
|
||||
form: {
|
||||
textarea: '',
|
||||
files: '',
|
||||
fileName: ''
|
||||
},
|
||||
formForReset: {
|
||||
textarea: '',
|
||||
files: '',
|
||||
fileName: ''
|
||||
},
|
||||
rules: {
|
||||
textarea: [
|
||||
{ required: true, message: '请输入回复内容', trigger: 'blur' },
|
||||
{ min: 1, max: 500, message: '长度在 1 到 500 个字符', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
uploadFileDialogVisible: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
userInfo() {
|
||||
const userInfoStr = sessionStorage.getItem('userInfo')
|
||||
let userInfo
|
||||
try {
|
||||
userInfo = JSON.parse(userInfoStr)
|
||||
} catch (e) {
|
||||
userInfo = {}
|
||||
} finally {
|
||||
return userInfo
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSubmit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
const formData = {
|
||||
qaFile: this.form.files,
|
||||
qaId: this.qaId,
|
||||
qaText: this.form.textarea,
|
||||
qaType: this.type === undefined ? 'QUE' :'ANS',
|
||||
}
|
||||
|
||||
this.$http.postData('lawss/sarQaInfo/replyQAInfo', formData, {
|
||||
_this: this
|
||||
},res => {
|
||||
if (res.ok) {
|
||||
console.log('success', res)
|
||||
// this.newDialogVisible = false
|
||||
this.$message({
|
||||
message: res.data,
|
||||
type: 'success'
|
||||
})
|
||||
this.$emit('success')
|
||||
this.resetFields()
|
||||
} else {
|
||||
throw new Error(res)
|
||||
}
|
||||
}, err => {
|
||||
console.error(err)
|
||||
})
|
||||
|
||||
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
resetFields () {
|
||||
this.$refs['form'].resetFields();
|
||||
this.form = { ...this.formForReset }
|
||||
this.$refs.uploadFileNewDialog && this.$refs.uploadFileNewDialog.clearFiles()
|
||||
|
||||
},
|
||||
clearValidate() {
|
||||
this.$refs['form'].clearValidate();
|
||||
},
|
||||
/**
|
||||
* 上传文件成功
|
||||
* @param response
|
||||
* @param file
|
||||
*/
|
||||
uploadFileSuccess (response, file) {
|
||||
if (response.ok) {
|
||||
this.$message({
|
||||
message: response.message,
|
||||
type: 'success'
|
||||
})
|
||||
|
||||
this.form["files"] += response.data.id + ','
|
||||
this.form['fileName'] = response.data.oldFileName
|
||||
} else {
|
||||
this.$refs.uploadFileNewDialog.clearFiles()
|
||||
|
||||
this.$message({
|
||||
message: response.message,
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 上传文件之前的回调
|
||||
* @param file
|
||||
* @returns {boolean}
|
||||
*/
|
||||
beforeUploadFile (file) {
|
||||
// var filename = file.name
|
||||
// var index1 = filename.lastIndexOf('.')
|
||||
// var index2 = filename.length
|
||||
// var fileSuffix = filename.substring(index1, index2)
|
||||
// // const fileSuffix = file.name.split('.')[1] // 后缀名
|
||||
// // 判断上传文件格式
|
||||
// // if (fileSuffix === 'pdf' || fileSuffix === 'PDF' || fileSuffix === 'doc' || fileSuffix === 'docx' || fileSuffix === 'ppt' || fileSuffix === 'pptx') {
|
||||
// if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
|
||||
// return true
|
||||
// } else {
|
||||
// this.$message.error('文件' + file.name + '格式不正确,请上传xls、xlsx文件')
|
||||
// return false
|
||||
// }
|
||||
// 判断文件上传大小
|
||||
if (file.size <= 1024 * 1024 * 300) {// eslint-disable-line
|
||||
return true
|
||||
} else {
|
||||
this.$message.error('文件' + file.name + '大小不超过200M')
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
// 导入标准文件格式错误执行
|
||||
handleFileFormatError (file) {
|
||||
this.$message.error('文件格式不正确')
|
||||
},
|
||||
onFileExceed() {
|
||||
this.$message.error('最多上传一个文件')
|
||||
},
|
||||
onFileRemove(file, fileList) {
|
||||
this.form.files = ''
|
||||
this.form.fileName = ''
|
||||
},
|
||||
openUploadFileDialog(){
|
||||
this.uploadFileDialogVisible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.user-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
div {
|
||||
flex: 0 0 20%;
|
||||
}
|
||||
}
|
||||
.message-content {
|
||||
//margin-top: 20px;
|
||||
padding: 0 15px 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-button
|
||||
type="primary"
|
||||
round
|
||||
size="small"
|
||||
class="common-button-primary"
|
||||
@click="handleEntrust"
|
||||
:loading="isSubmit"
|
||||
>
|
||||
<i class="iconfont" style="font-size: 12px;"></i>
|
||||
委托</el-button>
|
||||
<!-- 组织机构树 -->
|
||||
<ProcessChooseTree
|
||||
:visible.sync="visibleTree"
|
||||
show-user
|
||||
:dept-select="false"
|
||||
@dblClick="handleDblClick"
|
||||
></ProcessChooseTree>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ProcessChooseTree from 'process/components/ProcessChooseTree'
|
||||
|
||||
export default {
|
||||
name: "EntrustButton",
|
||||
components: {
|
||||
ProcessChooseTree
|
||||
},
|
||||
props: ['qaId'],
|
||||
data() {
|
||||
return {
|
||||
visibleTree: false,
|
||||
isSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 委托
|
||||
handleEntrust () {
|
||||
this.visibleTree = true
|
||||
},
|
||||
// 选择委托人
|
||||
handleDblClick (treeNode) {
|
||||
this.$http.putData('lawss/sarQaInfo/entrustQAInfo', {
|
||||
id: this.qaId,
|
||||
reAnswerUser: treeNode.id, // 被委托人
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.$message.success(res.data)
|
||||
this.$emit('success')
|
||||
this.visibleTree = false
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}, err => {
|
||||
console.error(err)
|
||||
this.$message.warning(err.message)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<div class="user-info clearfix">
|
||||
<div>
|
||||
<span>{{ info.qaUserName }}</span>
|
||||
</div>
|
||||
|
||||
<div style="float: right;margin-left: 80px;width: 140px;">
|
||||
<span>{{ info.modifyTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="message-content">
|
||||
<span>{{ qaType }}: {{ info.qaText }}</span>
|
||||
</div>
|
||||
<div class="files__wrapper">
|
||||
<label class="">附件 :</label>
|
||||
<div class="modular-content-p-flies">
|
||||
<div
|
||||
v-if="qaFileVO"
|
||||
class=""
|
||||
style="display: inline-block;"
|
||||
>
|
||||
<a @click="downloadFile(qaFileVO.id, qaFileVO.oldFileName)" target="_blank">{{ qaFileVO.oldFileName }}</a>
|
||||
<!--<i title="下载" @click="downloadFile(qaFileVO.id)" class="icon-download" />-->
|
||||
</div>
|
||||
<span
|
||||
v-else
|
||||
class=""
|
||||
>
|
||||
暂无附件
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'QuestionItemTitle',
|
||||
props: ['info'],
|
||||
computed: {
|
||||
resType() {
|
||||
const matcher = {
|
||||
INLAND_STAND: '国内标准',
|
||||
FOREIGN_STAND: '国外标准',
|
||||
FOREIGN_LAWS: '国内外政策',
|
||||
BUSINESS: '企业标准'
|
||||
}
|
||||
return matcher[this.info.resType]
|
||||
},
|
||||
qaType() {
|
||||
const matcher = {
|
||||
QUE: '提问',
|
||||
ANS: '回答'
|
||||
}
|
||||
return matcher[this.info.qaType]
|
||||
},
|
||||
qaFileVO() {
|
||||
if (this.info && this.info.qaFileVO) {
|
||||
return this.info.qaFileVO
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downloadFile (attId) {
|
||||
if (attId != null && attId !== '') {
|
||||
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId
|
||||
} else {
|
||||
this.$message.error('请选择要下载的文件')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wrapper {
|
||||
& > div {
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
.user-info {
|
||||
//display: flex;
|
||||
//justify-content: flex-start;
|
||||
//div {
|
||||
// flex: 0 0 50%;
|
||||
//}
|
||||
div {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
.message-content {
|
||||
//margin-top: 20px;
|
||||
span {
|
||||
word-break: break-all;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
}
|
||||
.files__wrapper {
|
||||
& i{
|
||||
display: inline-block;
|
||||
margin-left: 3px;
|
||||
width: 18px;
|
||||
height: 16px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background-position: center center;
|
||||
vertical-align: sub;
|
||||
cursor: pointer;
|
||||
}
|
||||
.icon-download{
|
||||
background-image: url("~assets/images/shangqi/img/download.png");
|
||||
}
|
||||
.icon-download2{
|
||||
background-image: url("~assets/images/shangqi/img/download2.png");
|
||||
}
|
||||
.modular-content-p-flies {
|
||||
display: inline-block;
|
||||
color: #409EFF;
|
||||
}
|
||||
a {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div style="width: 100%;padding: 10px 0;">
|
||||
<div class="question-info">
|
||||
<div class="row">
|
||||
<div class="item">
|
||||
<span>{{ question.modifyTime }}</span>
|
||||
</div>
|
||||
<div class="item" style="margin-left: 10px;">
|
||||
<span>{{ resType }}</span>
|
||||
</div>
|
||||
<!--<div style="position: absolute;right: 10px;top: 10px;">-->
|
||||
<!-- <sup class="el-badge__content el-badge__content--undefined is-fixed is-dot"></sup>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
|
||||
<!--<div>-->
|
||||
<!-- <span>{{ question.queUserName }}</span>-->
|
||||
<!--</div>-->
|
||||
|
||||
<div class="row" style="margin-top: 10px;">
|
||||
<div class="item">
|
||||
<span>{{ question.resCode }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span>{{ question.resName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'QuestionItemTitle',
|
||||
props: ['question'],
|
||||
computed: {
|
||||
resType() {
|
||||
const matcher = {
|
||||
INLAND_STAND: '国内标准',
|
||||
FOREIGN_STAND: '国外标准',
|
||||
FOREIGN_LAWS: '国内外政策',
|
||||
BUSINESS: '企业标准'
|
||||
}
|
||||
return matcher[this.question.resType]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.row {
|
||||
line-height: 1.2;
|
||||
}
|
||||
.item {
|
||||
display: inline-block;
|
||||
}
|
||||
.message-content {
|
||||
//margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,391 @@
|
||||
<template>
|
||||
<div style="height: 100%;padding-bottom: 10px;">
|
||||
<el-tabs
|
||||
v-model="tabType"
|
||||
type="border-card"
|
||||
tab-position="left"
|
||||
style="height: 100%;"
|
||||
class="type-tabs"
|
||||
@tab-click="handleTabClick"
|
||||
>
|
||||
<el-tab-pane name="QUE">
|
||||
<div slot="label">
|
||||
我的提问
|
||||
</div>
|
||||
<div v-if="!questionList || questionList.length === 0">
|
||||
<div style="padding: 20px;">
|
||||
暂无数据
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="tabType === 'QUE'" class="message__wrapper">
|
||||
|
||||
<el-tabs
|
||||
class="question-tabs"
|
||||
v-model="activeNames"
|
||||
type="border-card"
|
||||
tab-position="left"
|
||||
@tab-click="handleChange"
|
||||
>
|
||||
|
||||
<template v-for="(question, index) in newTime">
|
||||
<el-tab-pane :name="question.id">
|
||||
<template slot="label">
|
||||
<question-item-title :question="question"/>
|
||||
</template>
|
||||
<div class="info__wrapper">
|
||||
|
||||
<div class="info-message">
|
||||
<el-scrollbar :ref="`wx-scrollbar-${question.id}`">
|
||||
<template v-for="(item, index) in questionInfo.qaMsgEOListReverse">
|
||||
<div class="clearfix">
|
||||
<div class="item" :class="[currentUserId === item.qaUser ? 'item-right' : 'item-left']">
|
||||
<question-item-info :info="item" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</el-scrollbar>
|
||||
|
||||
</div>
|
||||
<div class="info-answer">
|
||||
<answer-item :qa-id="questionInfo.id" @success="handleSubmitSuccess" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
|
||||
</el-tabs>
|
||||
|
||||
<el-pagination
|
||||
class="wx-pagination"
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageChange"
|
||||
:current-page.sync="pagination.number"
|
||||
:page-size="pagination.size"
|
||||
layout="prev, pager, next, jumper"
|
||||
:pager-count="5"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane name="ANS">
|
||||
<div slot="label">
|
||||
我的回答
|
||||
</div>
|
||||
<div v-if="!questionList || questionList.length === 0">
|
||||
<div style="padding: 20px;">
|
||||
暂无数据
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="tabType === 'ANS'" class="message__wrapper">
|
||||
|
||||
<el-tabs
|
||||
class="question-tabs"
|
||||
v-model="activeNames"
|
||||
type="border-card"
|
||||
tab-position="left"
|
||||
@tab-click="handleChange"
|
||||
>
|
||||
|
||||
<template v-for="(question, index) in newTime">
|
||||
<el-tab-pane :name="question.id">
|
||||
<template slot="label">
|
||||
<question-item-title :question="question"/>
|
||||
</template>
|
||||
<div class="info__wrapper">
|
||||
|
||||
<div class="info-message">
|
||||
<el-scrollbar :ref="`wx-scrollbar-${question.id}`">
|
||||
<template v-for="(item, index) in questionInfo.qaMsgEOListReverse">
|
||||
<div class="clearfix">
|
||||
<div class="item" :class="[currentUserId === item.qaUser ? 'item-right' : 'item-left']">
|
||||
<question-item-info :info="item" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</el-scrollbar>
|
||||
|
||||
</div>
|
||||
<div class="info-answer">
|
||||
<answer-item :qa-id="questionInfo.id" :type="tabType" @success="handleSubmitSuccess">
|
||||
<template v-slot:btnGroup="slotProps">
|
||||
<entrust-button style="float: right;" :qa-id="slotProps.qaId" @success="handleEntrustSuccess" />
|
||||
</template>
|
||||
</answer-item>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
|
||||
</el-tabs>
|
||||
|
||||
<el-pagination
|
||||
class="wx-pagination"
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageChange"
|
||||
:current-page.sync="pagination.number"
|
||||
:page-size="pagination.size"
|
||||
layout="prev, pager, next, jumper"
|
||||
:pager-count="5"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import QuestionItemTitle from "./components/QuestionItemTitle";
|
||||
import QuestionItemInfo from "./components/QuestionItemInfo";
|
||||
import AnswerItem from "./components/AnswerItem";
|
||||
import EntrustButton from "./components/EntrustButton";
|
||||
|
||||
|
||||
export default {
|
||||
name: 'QuestionsAndAnswers',
|
||||
components: {
|
||||
EntrustButton,
|
||||
QuestionItemTitle,
|
||||
QuestionItemInfo,
|
||||
AnswerItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabType: 'QUE', // 问答类型 QUE:提问/ANS:回答
|
||||
activeNames: '',
|
||||
questionList: [],
|
||||
questionInfo: {},
|
||||
total: 0,
|
||||
pagination: {
|
||||
number: 1,
|
||||
size: parseInt(this.$store.getters.userInfo.configContent)
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
newTime (){
|
||||
for (let i=0;i<this.questionList.length;i++){
|
||||
for (let j=i;j<this.questionList.length;j++){
|
||||
const newTime = Date.parse(this.questionList[i].modifyTime)
|
||||
const newTime1 = Date.parse(this.questionList[j].modifyTime)
|
||||
if(newTime - newTime1<0){
|
||||
let listObj=this.questionList[i];
|
||||
this.questionList[i]=this.questionList[j];
|
||||
this.questionList[j]=listObj;
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.questionList
|
||||
},
|
||||
currentUser() {
|
||||
return this.$store.getters.userInfo
|
||||
},
|
||||
currentUserId() {
|
||||
return this.currentUser.userId
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTabClick(tab, event) {
|
||||
this.pageChange(1)
|
||||
},
|
||||
handleChange(tab, event) {
|
||||
if (tab) {
|
||||
this.getInfo(tab.name)
|
||||
}
|
||||
},
|
||||
queryList() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$http.get('lawss/sarQaInfo/getSARQAInfoPage', {
|
||||
page: this.pagination.number,
|
||||
pageSize: this.pagination.size,
|
||||
qaType: this.tabType
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
resolve(res)
|
||||
} else {
|
||||
reject(res)
|
||||
}
|
||||
}, e => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.queryList().then(res => {
|
||||
const list = res.data.list
|
||||
this.questionList = list
|
||||
// if (this.questionList[0]) {
|
||||
// this.activeNames = this.questionList[0].id
|
||||
// this.getInfo(this.activeNames)
|
||||
// }
|
||||
this.total = res.data.count
|
||||
})
|
||||
},
|
||||
queryInfo(id) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$http.get('lawss/sarQaInfo/getSARQuestionInfo', {
|
||||
qaId: id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
resolve(res)
|
||||
} else {
|
||||
reject(res)
|
||||
}
|
||||
}, e => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
getInfo(id) {
|
||||
this.queryInfo(id).then(res => {
|
||||
const data = res.data
|
||||
const qaMsgEOList = data && data.qaMsgEOList || []
|
||||
this.questionInfo = {
|
||||
...data,
|
||||
qaMsgEOListReverse: [...qaMsgEOList].reverse()
|
||||
}
|
||||
this.scrollToBottom(id)
|
||||
})
|
||||
},
|
||||
/**
|
||||
* @description: 页码改变
|
||||
* @author: chenxiaoxi
|
||||
* @date: 2018-09-29 14:24:51
|
||||
*/
|
||||
pageChange (page) {
|
||||
this.pagination.number = page
|
||||
this.getList()
|
||||
},
|
||||
/**
|
||||
* @description: 每页条数改变
|
||||
* @author: chenxiaoxi
|
||||
* @date: 2018-09-29 14:25:57
|
||||
*/
|
||||
pageSizeChange (rows) {
|
||||
this.pagination.size = rows
|
||||
|
||||
this.pageChange(1)
|
||||
},
|
||||
handleSubmitSuccess() {
|
||||
this.getInfo(this.activeNames)
|
||||
},
|
||||
handleEntrustSuccess() {
|
||||
this.getList()
|
||||
},
|
||||
scrollToBottom(id = this.activeNames) {
|
||||
this.$nextTick(() => {
|
||||
// console.log(this.$refs[`wx-scrollbar-${id}`])
|
||||
const ref = this.$refs[`wx-scrollbar-${id}`][0]
|
||||
const dom = ref && ref.$refs.wrap
|
||||
dom.scrollTop = dom.scrollHeight - dom.clientHeight
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/deep/.el-tabs__item {
|
||||
box-shadow: none!important;
|
||||
}
|
||||
/deep/.el-tabs__content{
|
||||
height: 100%;
|
||||
}
|
||||
.message__wrapper {
|
||||
//padding: 20px;
|
||||
height: 100%;
|
||||
}
|
||||
.info__wrapper {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
.info-answer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.info-message {
|
||||
padding: 0 0 0 15px;
|
||||
height: calc(~'100% - 160px');
|
||||
.el-scrollbar {
|
||||
height: 100%;
|
||||
/deep/.el-scrollbar__wrap {
|
||||
overflow-x: hidden;
|
||||
|
||||
}
|
||||
}
|
||||
.item{
|
||||
padding: 10px 15px;
|
||||
margin-top: 10px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #d7d7d7;
|
||||
width: fit-content;
|
||||
max-width: 100%;
|
||||
margin-right: 10px;
|
||||
|
||||
&-left{
|
||||
border-radius: 0 15px 15px 15px;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
&-right{
|
||||
float: right;
|
||||
//text-align: right;
|
||||
border-radius: 15px 0 15px 15px;
|
||||
background-color: #EBF6FF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.type-tabs {
|
||||
/deep/.el-tabs__header {
|
||||
margin-right: 0;
|
||||
}
|
||||
/deep/.el-tabs__content {
|
||||
padding: 0;
|
||||
.el-tab-pane {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.question-tabs {
|
||||
height: 100%;
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
/deep/.el-tabs__nav {
|
||||
height: calc(~'100% - 50px');
|
||||
overflow: auto;
|
||||
}
|
||||
/deep/ &.el-tabs--border-card .el-tabs__item {
|
||||
height: 65px;
|
||||
border-color: #d1dbe5 transparent;
|
||||
text-align: left;
|
||||
border-top-color: transparent;
|
||||
&.is-active {
|
||||
border-top-color: #d1dbe5;
|
||||
}
|
||||
}
|
||||
}
|
||||
.wx-pagination {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <div class="user-info">-->
|
||||
<!-- <div>-->
|
||||
<!-- <span>{{ userInfo.uName }}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <span>{{ userInfo.orgName }}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <span>{{ question.createTime }}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <span>{{ question.standNumber }}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <span>{{ question.standName }}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="message-content">
|
||||
<el-form ref="form" :model="form" :rules="rules">
|
||||
<el-form-item prop="textarea">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="请输入回复内容"
|
||||
v-model="form.textarea">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-formItem prop="files" class="add-form-item">
|
||||
<el-upload
|
||||
drag
|
||||
:on-success="uploadFileSuccess"
|
||||
:action="uploadFileUrl"
|
||||
:before-upload="beforeUploadFile"
|
||||
:show-file-list="true"
|
||||
:on-format-error="handleFileFormatError"
|
||||
name="file"
|
||||
ref="uploadFileNewDialog"
|
||||
:limit="1"
|
||||
:on-exceed="onFileExceed"
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">点击或拖拽上传文件</div>
|
||||
</el-upload>
|
||||
</el-formItem>
|
||||
<div class="clearfix" style="margin-top: 10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
round
|
||||
class="common-button-primary"
|
||||
size="small"
|
||||
style="float: right;"
|
||||
@click="handleSubmit"
|
||||
>提交</el-button>
|
||||
|
||||
<slot name="btnGroup" v-bind:qaId="qaId"></slot>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'AnswerItem',
|
||||
props: ['qaId'],
|
||||
data() {
|
||||
return {
|
||||
uploadFileUrl: 'api/att/attFile/upload',
|
||||
form: {
|
||||
textarea: '',
|
||||
files: ''
|
||||
},
|
||||
formForReset: {
|
||||
textarea: '',
|
||||
files: ''
|
||||
},
|
||||
rules: {
|
||||
textarea: [
|
||||
{ required: true, message: '请输入回复内容', trigger: 'blur' },
|
||||
{ min: 1, max: 500, message: '长度在 1 到 500 个字符', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
userInfo() {
|
||||
const userInfoStr = sessionStorage.getItem('userInfo')
|
||||
let userInfo
|
||||
try {
|
||||
userInfo = JSON.parse(userInfoStr)
|
||||
} catch (e) {
|
||||
userInfo = {}
|
||||
} finally {
|
||||
return userInfo
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSubmit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
const formData = {
|
||||
qaFile: this.form.files,
|
||||
qaId: this.qaId,
|
||||
qaText: this.form.textarea,
|
||||
qaType: 'ANS',
|
||||
}
|
||||
|
||||
this.$http.postData('lawss/sarQaInfo/replyQAInfo', formData, {
|
||||
_this: this
|
||||
},res => {
|
||||
if (res.ok) {
|
||||
console.log('success', res)
|
||||
// this.newDialogVisible = false
|
||||
this.$message({
|
||||
message: res.data,
|
||||
type: 'success'
|
||||
})
|
||||
this.$emit('success')
|
||||
this.resetFields()
|
||||
} else {
|
||||
throw new Error(res)
|
||||
}
|
||||
}, err => {
|
||||
console.error(err)
|
||||
})
|
||||
|
||||
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
resetFields () {
|
||||
this.$refs['form'].resetFields();
|
||||
},
|
||||
clearValidate() {
|
||||
this.$refs['form'].clearValidate();
|
||||
},
|
||||
/**
|
||||
* 上传文件成功
|
||||
* @param response
|
||||
* @param file
|
||||
*/
|
||||
uploadFileSuccess (response, file) {
|
||||
if (response.ok) {
|
||||
this.$message({
|
||||
message: response.message,
|
||||
type: 'success'
|
||||
})
|
||||
|
||||
this.form["files"] += response.data.id + ','
|
||||
|
||||
} else {
|
||||
this.$refs.uploadFileNewDialog.clearFiles()
|
||||
|
||||
this.$message({
|
||||
message: response.message,
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 上传文件之前的回调
|
||||
* @param file
|
||||
* @returns {boolean}
|
||||
*/
|
||||
beforeUploadFile (file) {
|
||||
// var filename = file.name
|
||||
// var index1 = filename.lastIndexOf('.')
|
||||
// var index2 = filename.length
|
||||
// var fileSuffix = filename.substring(index1, index2)
|
||||
// // const fileSuffix = file.name.split('.')[1] // 后缀名
|
||||
// // 判断上传文件格式
|
||||
// // if (fileSuffix === 'pdf' || fileSuffix === 'PDF' || fileSuffix === 'doc' || fileSuffix === 'docx' || fileSuffix === 'ppt' || fileSuffix === 'pptx') {
|
||||
// if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
|
||||
// return true
|
||||
// } else {
|
||||
// this.$message.error('文件' + file.name + '格式不正确,请上传xls、xlsx文件')
|
||||
// return false
|
||||
// }
|
||||
// 判断文件上传大小
|
||||
if (file.size / 1024 / 1024 <= 200) {// eslint-disable-line
|
||||
return true
|
||||
} else {
|
||||
this.$message.error('文件' + file.name + '大小不超过200M')
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
// 导入标准文件格式错误执行
|
||||
handleFileFormatError (file) {
|
||||
this.$message.error('文件格式不正确')
|
||||
},
|
||||
onFileExceed() {
|
||||
this.$message.error('最多上传一个文件')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.user-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
div {
|
||||
flex: 0 0 20%;
|
||||
}
|
||||
}
|
||||
.message-content {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,116 @@
|
||||
<template>
|
||||
<div style="width: 100%;">
|
||||
<div class="user-info">
|
||||
<div>
|
||||
<span>{{ info.qaUserName }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span>{{ info.modifyTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="message-content">
|
||||
<span>{{ qaType }} :</span>
|
||||
<span>{{ info.qaText }}</span>
|
||||
</div>
|
||||
<div class="files__wrapper">
|
||||
<label class="">附件 :</label>
|
||||
<div class="modular-content-p-flies">
|
||||
<div
|
||||
v-if="qaFileVO"
|
||||
class=""
|
||||
style="display: inline-block;"
|
||||
>
|
||||
<a @click="downloadFile(qaFileVO.id, qaFileVO.oldFileName)" target="_blank">{{ qaFileVO.oldFileName }}</a>
|
||||
<i title="下载" @click="downloadFile(qaFileVO.id)" class="icon-download" />
|
||||
</div>
|
||||
<span
|
||||
v-else
|
||||
class=""
|
||||
>
|
||||
暂无附件
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CollapseItemTitle',
|
||||
props: ['info'],
|
||||
computed: {
|
||||
resType() {
|
||||
const matcher = {
|
||||
INLAND_STAND: '国内标准',
|
||||
FOREIGN_STAND: '国外标准',
|
||||
FOREIGN_LAWS: '国内外政策',
|
||||
BUSINESS: '企业标准'
|
||||
}
|
||||
return matcher[this.info.resType]
|
||||
},
|
||||
qaType() {
|
||||
const matcher = {
|
||||
QUE: '提问',
|
||||
ANS: '回答'
|
||||
}
|
||||
return matcher[this.info.qaType]
|
||||
},
|
||||
qaFileVO() {
|
||||
if (this.info && this.info.qaFileVO) {
|
||||
return this.info.qaFileVO
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downloadFile (attId) {
|
||||
if (attId != null && attId !== '') {
|
||||
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId
|
||||
} else {
|
||||
this.$message.error('请选择要下载的文件')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.user-info {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
div {
|
||||
flex: 0 0 50%;
|
||||
}
|
||||
}
|
||||
.message-content {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.files__wrapper {
|
||||
& i{
|
||||
display: inline-block;
|
||||
margin-left: 3px;
|
||||
width: 18px;
|
||||
height: 16px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background-position: center center;
|
||||
vertical-align: sub;
|
||||
cursor: pointer;
|
||||
}
|
||||
.icon-download{
|
||||
background-image: url("~assets/images/shangqi/img/download.png");
|
||||
}
|
||||
.icon-download2{
|
||||
background-image: url("~assets/images/shangqi/img/download2.png");
|
||||
}
|
||||
.modular-content-p-flies {
|
||||
display: inline-block;
|
||||
color: #409EFF;
|
||||
}
|
||||
a {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<div style="width: 100%;">
|
||||
<div class="user-info">
|
||||
<div>
|
||||
<span>{{ question.queUserName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>{{ resType }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span>{{ question.resCode }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>{{ question.resName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>{{ question.modifyTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CollapseItemTitle',
|
||||
props: ['question'],
|
||||
computed: {
|
||||
resType() {
|
||||
const matcher = {
|
||||
INLAND_STAND: '国内标准',
|
||||
FOREIGN_STAND: '国外标准',
|
||||
FOREIGN_LAWS: '国内外政策',
|
||||
BUSINESS: '企业标准'
|
||||
}
|
||||
return matcher[this.question.resType]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.user-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
div {
|
||||
flex: 0 0 20%;
|
||||
}
|
||||
}
|
||||
.message-content {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-button
|
||||
type="primary"
|
||||
round
|
||||
class="common-button-primary"
|
||||
@click="handleEntrust"
|
||||
:loading="isSubmit"
|
||||
>
|
||||
<i class="iconfont" style="font-size: 12px;"></i>
|
||||
委托</el-button>
|
||||
<!-- 组织机构树 -->
|
||||
<ProcessChooseTree
|
||||
:visible.sync="visibleTree"
|
||||
show-user
|
||||
:dept-select="false"
|
||||
@dblClick="handleDblClick"
|
||||
></ProcessChooseTree>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ProcessChooseTree from 'process/components/ProcessChooseTree'
|
||||
|
||||
export default {
|
||||
name: "EntrustButton",
|
||||
components: {
|
||||
ProcessChooseTree
|
||||
},
|
||||
props: ['qaId'],
|
||||
data() {
|
||||
return {
|
||||
visibleTree: false,
|
||||
isSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 委托
|
||||
handleEntrust () {
|
||||
this.visibleTree = true
|
||||
},
|
||||
// 选择委托人
|
||||
handleDblClick (treeNode) {
|
||||
this.$http.putData('lawss/sarQaInfo/entrustQAInfo', {
|
||||
id: this.qaId,
|
||||
reAnswerUser: treeNode.id, // 被委托人
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.$message.success(res.data)
|
||||
this.$emit('success')
|
||||
this.visibleTree = false
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}, err => {
|
||||
console.error(err)
|
||||
this.$message.warning(err.message)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,221 @@
|
||||
<template>
|
||||
<div style="height: 100%;padding-bottom: 10px;">
|
||||
<el-tabs
|
||||
v-model="tabType"
|
||||
type="border-card"
|
||||
tab-position="left"
|
||||
style="height: 100%;"
|
||||
@tab-click="handleTabClick"
|
||||
>
|
||||
<el-tab-pane name="QUE">
|
||||
<div slot="label">
|
||||
我的提问
|
||||
</div>
|
||||
<div v-if="!questionList || questionList.length === 0">
|
||||
暂无数据
|
||||
</div>
|
||||
<div v-else class="message__wrapper">
|
||||
|
||||
<el-collapse v-model="activeNames" accordion @change="handleChange">
|
||||
<template v-for="(question, index) in questionList">
|
||||
<el-collapse-item :name="question.id">
|
||||
<template slot="title">
|
||||
<collapse-item-title :question="question"/>
|
||||
</template>
|
||||
<div class="info__wrapper">
|
||||
<template v-for="(item, index) in questionInfo.qaMsgEOList">
|
||||
<div class="item el-card">
|
||||
<collapse-item-info :info="item" />
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<answer-item :qa-id="questionInfo.id" @success="handleSubmitSuccess" />
|
||||
|
||||
</el-collapse-item>
|
||||
</template>
|
||||
|
||||
</el-collapse>
|
||||
|
||||
<pagination :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="ANS">
|
||||
<div slot="label">
|
||||
我的回答
|
||||
</div>
|
||||
<div v-if="!questionList || questionList.length === 0">
|
||||
暂无数据
|
||||
</div>
|
||||
<div v-else class="message__wrapper">
|
||||
|
||||
<el-collapse v-model="activeNames" accordion @change="handleChange">
|
||||
<template v-for="(question, index) in questionList">
|
||||
<el-collapse-item :name="question.id">
|
||||
<template slot="title">
|
||||
<collapse-item-title :question="question"/>
|
||||
</template>
|
||||
<div class="info__wrapper">
|
||||
<template v-for="(item, index) in questionInfo.qaMsgEOList">
|
||||
<div class="item el-card">
|
||||
<collapse-item-info :info="item" />
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<answer-item :qa-id="questionInfo.id" @success="handleSubmitSuccess">
|
||||
<template v-slot:btnGroup="slotProps">
|
||||
<entrust-button style="float: right;margin-right: 10px;" :qa-id="slotProps.qaId" @success="handleEntrustSuccess" />
|
||||
</template>
|
||||
</answer-item>
|
||||
|
||||
</el-collapse-item>
|
||||
</template>
|
||||
|
||||
</el-collapse>
|
||||
|
||||
<pagination :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CollapseItemTitle from "./components/CollapseItemTitle";
|
||||
import CollapseItemInfo from "./components/CollapseItemInfo";
|
||||
import AnswerItem from "./components/AnswerItem";
|
||||
import EntrustButton from "./components/EntrustButton";
|
||||
|
||||
|
||||
export default {
|
||||
name: 'QuestionsAndAnswers',
|
||||
components: {
|
||||
EntrustButton,
|
||||
CollapseItemTitle,
|
||||
CollapseItemInfo,
|
||||
AnswerItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabType: 'QUE', // 问答类型 QUE:提问/ANS:回答
|
||||
activeNames: '',
|
||||
questionList: [],
|
||||
questionInfo: {},
|
||||
total: 0,
|
||||
pagination: {
|
||||
number: 1,
|
||||
size: this.$store.getters.userInfo.configContent
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTabClick(tab, event) {
|
||||
this.pageChange(1)
|
||||
},
|
||||
handleChange(val) {
|
||||
if (val) {
|
||||
this.getInfo(val)
|
||||
}
|
||||
},
|
||||
queryList() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$http.get('lawss/sarQaInfo/getSARQAInfoPage', {
|
||||
page: this.pagination.number,
|
||||
pageSize: this.pagination.size,
|
||||
qaType: this.tabType
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
resolve(res)
|
||||
} else {
|
||||
reject(res)
|
||||
}
|
||||
}, e => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.queryList().then(res => {
|
||||
this.questionList = res.data.list
|
||||
this.total = res.data.count
|
||||
})
|
||||
},
|
||||
queryInfo(id) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$http.get('lawss/sarQaInfo/getSARQuestionInfo', {
|
||||
qaId: id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
resolve(res)
|
||||
} else {
|
||||
reject(res)
|
||||
}
|
||||
}, e => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
getInfo(id) {
|
||||
this.queryInfo(id).then(res => {
|
||||
this.questionInfo = res.data
|
||||
})
|
||||
},
|
||||
/**
|
||||
* @description: 页码改变
|
||||
* @author: chenxiaoxi
|
||||
* @date: 2018-09-29 14:24:51
|
||||
*/
|
||||
pageChange (page) {
|
||||
this.pagination.number = page
|
||||
|
||||
this.getList()
|
||||
},
|
||||
/**
|
||||
* @description: 每页条数改变
|
||||
* @author: chenxiaoxi
|
||||
* @date: 2018-09-29 14:25:57
|
||||
*/
|
||||
pageSizeChange (rows) {
|
||||
this.pagination.size = rows
|
||||
|
||||
this.pageChange(1)
|
||||
},
|
||||
handleSubmitSuccess() {
|
||||
this.getInfo(this.activeNames)
|
||||
},
|
||||
handleEntrustSuccess() {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/deep/.el-tabs__item {
|
||||
box-shadow: none!important;
|
||||
}
|
||||
/deep/.el-tabs__content{
|
||||
height: 100%;
|
||||
}
|
||||
.message__wrapper {
|
||||
padding: 20px;
|
||||
height: 100%;
|
||||
}
|
||||
.info__wrapper {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.item {
|
||||
flex: 0 0 50%;
|
||||
padding: 10px 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user