对接首页功能

This commit is contained in:
qq787203167
2022-05-24 17:50:53 +08:00
parent 802ab04594
commit 71b34e4bb3
7 changed files with 408 additions and 8 deletions
+2
View File
@@ -887,4 +887,6 @@ module.exports = {
myNews:'My News',
monthlyReportRegulations:'Monthly report regulations',
Pending:'Pending',
custom:'Custom',
notSelected:'Not selected',
}
+2
View File
@@ -892,4 +892,6 @@ module.exports = {
myNews:'我的消息',
monthlyReportRegulations:'法规月报',
Pending:'待处理',
custom:'自定义',
notSelected:'未选择',
}
@@ -95,6 +95,7 @@
this.$route.path == '/handshakeProcess' ||
this.$route.path == '/historicalVersion' ||
this.$route.path == '/dashboard/analysis' ||
this.$route.path == '/customContentList' ||
this.$route.path == '/processDetails') {
return false
} else {
@@ -12,16 +12,116 @@
<img src="../../../assets/jspg.png" class="img" alt="">
<div class="text">我的收藏</div>
</div>
<div class="box-content">
<div class="box-content" @click="customClick()">
<img src="../../../assets/zdy.png" class="img" alt="">
<div class="text">自定义</div>
<div class="text">{{$t('custom')}}</div>
</div>
<a-modal
:title="$t('custom')"
:width="1180"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<div class="selected">{{$t('selected')}}</div>
<div class="box-model">
<div style="display: inline-block" v-for="(item,index) in dataSource">
<div class="box-top" v-if="item.state == 1" @click="statusClick(item,index)">
<div class="box-content">
<img src="../../../assets/jspg.png" class="img" alt="">
<div class="text">{{item.iconName}}</div>
</div>
</div>
</div>
</div>
<div class="xian"></div>
<div class="selected">{{$t('notSelected')}}</div>
<div class="box-model">
<div style="display: inline-block" v-for="(item,index) in dataSource">
<div class="box-top" v-if="!item.state || item.state == 2" @click="statusClick(item,index)">
<div class="box-content">
<img src="../../../assets/jspg.png" class="img" alt="">
<div class="text">{{item.iconName}}</div>
</div>
</div>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import { postAction, getAction } from '../../../api/manage'
export default {
name: 'customContent'
name: 'customContent',
data() {
return {
visible: false,
confirmLoading: false,
url: {
list: '/home/homeFunctionModuleEO/list',
add: '/home/homeFunctionModuleEO/add'
},
dataSource: [
{
iconName: '我的收藏',
id: 1
},
{
iconName: '我的收藏1',
id: 2
},
{
iconName: '我的收藏1',
id: 3
}
],
topList: [],
footerList: []
}
},
mounted() {
},
methods: {
customClick() {
this.visible = true
this.getList()
},
getList() {
getAction(this.url.list, {}).then((res) => {
if (res.success) {
}
})
},
handleOk() {
this.confirmLoading = true
postAction(this.url.add, this.dataSource).then((res) => {
if (res.success) {
this.visible = false
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
},
handleCancel() {
this.visible = false
},
statusClick(item, index) {
if (item.state == 1) {
this.dataSource[index].state = 2
} else {
this.dataSource[index].state = 1
}
this.dataSource = [...this.dataSource]
}
}
}
</script>
@@ -34,6 +134,8 @@
text-align: center;
display: inline-block;
margin-right: 30px;
cursor: pointer;
.img {
width: 44px;
height: 44px;
@@ -48,4 +150,45 @@
}
}
}
.selected {
font-size: 16px;
font-family: Blue Sky Noto;
font-weight: 400;
color: #040B29;
margin-bottom: 20px;
}
.box-model {
width: 100%;
.box-top {
text-align: center;
display: inline-block;
margin-right: 30px;
cursor: pointer;
margin-bottom: 30px;
.img {
width: 44px;
height: 44px;
}
.text {
font-size: 16px;
font-family: Blue Sky Noto;
font-weight: 400;
color: #040B29;
margin-top: 8px;
}
}
}
.xian {
width: 100%;
height: 2px;
background: #CED0D8;
margin-top: 10px;
margin-bottom: 30px;
}
</style>
@@ -2,13 +2,15 @@
<div class="documentDynamics-box">
<div class="header-text">
<div class="header-text-left">{{this.$t('documentDynamics')}}</div>
<div class="header-text-right">
<div class="header-text-right" @click="moreClick">
{{$t('more')}}
<img src="../../../assets/gengduo.png" alt="">
</div>
</div>
<div class="documentDynamics-box-content">
<div class="documentDynamics-text" v-for="item in 8">
<div class="documentDynamics-box-content" v-if="dataSource.length > 0">
<div class="documentDynamics-text" v-for="(item,index) in dataSource"
:key="index"
@click="magClick(item)">
<div class="yuan"></div>
<div class="text">文档库中新增了新的标准 GB 7258 机动车文件</div>
<img src="../../../assets/new.png" alt="">
@@ -16,12 +18,62 @@
</div>
<div class="solid"></div>
</div>
<div v-else style="height: 240px;position: relative">
<JNoData />
</div>
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
</div>
</template>
<script>
import { getAction, putAction, deleteAction } from '@/api/manage'
export default {
name: 'documentDynamics'
name: 'documentDynamics',
data(){
return{
pageSize: 8,
pageNo: 1,
dataSource: [],
loading:false,
url: {
list: '/home/homeDocumentDynamicEO/page',
readAllMsg: 'sys/sysAnnouncementSend/read'
},
}
},
mounted() {
this.getList()
},
methods:{
getList() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataSource = res.result.records || []
this.loading = false
} else {
this.loading = false
}
})
},
magClick(row) {
getAction(this.url.readAllMsg, { ids: row.id }).then((res) => {
})
this.$router.push({
path: '/system/MessageDetails',
query: row
})
},
moreClick() {
this.$router.push({
path: '/customContentList'
})
}
},
}
</script>
@@ -45,6 +97,7 @@
font-weight: 400;
color: #9B9DA9;
margin-top: 6px;
cursor: pointer;
}
}
@@ -0,0 +1,200 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8" style="line-height: 48px">
<div class="box-title-text">
<div class="title-text" :title="$t('MessageContent')">
<span>{{this.$t('MessageContent')}}</span>
</div>
<a-input class="box-input"
:placeholder="$t('pleaseEnter')+$t('MessageContent')"
v-model="queryParam.msgContent">
</a-input>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="table-operator">
<div @click="handleDel" class="operator-text">
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</div>
</div>
<a-table
ref="table"
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns"
:dataSource="dataSource"
:scroll="{x: 1600}"
:pagination="ipagination"
:loading="loading"
@change="handleTableChange">
<span slot="msgContent" slot-scope="text,scope">
<a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}" :title="text" @click="msgContentClick(scope)">
{{text}}
</a>
</span>
</a-table>
</a-card>
</template>
<script>
import { getAction, putAction, deleteAction } from '@/api/manage'
import { JeroListMixin } from '@/mixins/JeroListMixin'
export default {
name: 'customContentList',
mixins: [JeroListMixin],
data() {
return {
queryParam: {},
selectedRowKeys: [],
columns: [
{
title: this.$t('MessageContent'),
align: 'center',
dataIndex: 'msgContent',
ellipsis: true,
scopedSlots: { customRender: 'msgContent' }
},
{
title: this.$t('NotificationTime'),
align: 'center',
width: 200,
dataIndex: 'sendTime'
}
],
url: {
list: '/home/homeDocumentDynamicEO/page',
deleteUrl: '/home/homeDocumentDynamicEO/deleteBatch'
},
loading: false,
openPath: '',
formData: ''
}
},
methods: {
onSelectChange(value) {
this.selectedRowKeys = value
},
msgContentClick(row) {
getAction(this.url.readAllMsg, { ids: row.id }).then((res) => {
})
this.$router.push({
path: '/system/MessageDetails',
query: row
})
},
handleDel() {
var that = this
if (this.selectedRowKeys.length > 0) {
that.$confirm({
content: that.$t('ConfirmBatchDeletion'),
onOk: function() {
let selectedRowKeys = JSON.parse(JSON.stringify(that.selectedRowKeys))
deleteAction(that.url.deleteUrl, { ids: selectedRowKeys.join(',') }).then((res) => {
if (res.success) {
that.selectedRowKeys = []
that.$message.success(that.$t('OperationSuccessful'))
that.loadData()
} else {
that.$message.success(that.$t('operationFailed'))
}
})
}
})
} else {
this.$message.warning(this.$t('PleaseSelectData'))
}
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.ant-card-body .table-operator {
margin-bottom: 18px;
}
.anty-row-operator button {
margin: 0 5px
}
.ant-btn-danger {
background-color: #ffffff
}
.ant-modal-cust-warp {
height: 100%
}
.ant-modal-cust-warp .ant-modal-body {
height: calc(100% - 110px) !important;
overflow-y: auto
}
.ant-modal-cust-warp .ant-modal-content {
height: 90% !important;
overflow-y: hidden
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 90px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
/*margin-top: 2px;*/
}
</style>
<style>
.box-input .ant-select-selection {
height: 38px;
line-height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
}
</style>
@@ -228,7 +228,6 @@
background-color: #ffffff
}
z
.ant-modal-cust-warp {
height: 100%
}