Commit 426a3415 by 吕海涛

添加公告

parent 8de1f1c5
......@@ -18,3 +18,4 @@ VUE_APP_BASE_API12 = 'https://payment.sdk.xoado.com'
VUE_APP_BASE_API13 = 'https://projects.xoado.com/invoice'
VUE_APP_BASE_API14 = 'https://projects.xoado.com/message'
VUE_APP_BASE_API15 = 'https://aitransport.xoado.com/smart'
VUE_APP_BASE_API16 = 'http://xoado.tpddns.net:10001/anc'
......@@ -17,3 +17,4 @@ VUE_APP_BASE_API12 = 'https://payment.sdk.xoado.com'
VUE_APP_BASE_API13 = 'https://projects.xoado.com/invoice'
VUE_APP_BASE_API14 = 'https://projects.xoado.com/message'
VUE_APP_BASE_API15 = 'https://aitransport.xoado.com/smart'
VUE_APP_BASE_API16 = 'http://xoado.tpddns.net:10001/anc'
\ No newline at end of file
......@@ -8,6 +8,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@tinymce/tinymce-vue": "^3.0.1",
"animate.css": "^3.7.2",
"axios": "^0.21.1",
"core-js": "^3.6.5",
......@@ -20,6 +21,7 @@
"vue-amap": "^0.5.10",
"vue-clipboard2": "^0.3.1",
"vue-jsonp": "^2.0.0",
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.2.0",
"vuedraggable": "^2.24.3",
"vuex": "^3.4.0"
......
......@@ -36,7 +36,7 @@ export default {
case 2:
return '处理中'
default :
default:
}
},
colorSelect(status) {
......@@ -84,7 +84,32 @@ export default {
case 16:
return 'info'
default :
default:
}
},
clientText(type) {
switch (type) {
case '2075eb969356e8bf6f0efa33310e8870377992b2':
return '小多智运平台'
case 'c6c290c5b74ac7cc9ed58d4cff5332c31c36f4ae':
return '小多出行平台'
case '3a7fe6c9d43e43f18d0d0dc8fce2b3b791e35f47':
return '小多出行客户端'
case '8414af57838f389246d881334f790bef8d202f6a':
return '小多司机端'
case '0915eadb9d7a9d6314871b673bae87ba78c6d5de':
return '运力管理端'
case 'eaced767bd6fa056e2afb01d0c5fa2c8656f043b':
return '拓客企业端'
case '95ddd7db8343023138d792926adff1db80659d7f':
return '网约车品牌端'
case '04f98d551d56569d2834988b1cb466247dde5782':
return '品牌司机端'
case '68ef5c716d889774ec347c9d1cb443d40a288019':
return '渠道平台'
case '34523f91628aae74707dfde84ecbbc521b175027':
return '品牌客户端'
default:
}
},
orderSources(orderSource) {
......@@ -105,7 +130,7 @@ export default {
case 10:
return '携程旅游'
default :
default:
}
},
orderSourcesNew(orderSource) {
......@@ -144,7 +169,7 @@ export default {
case 11:
return '飞猪旅行'
default :
default:
}
},
orderSourcesSpecial(orderSource) {
......@@ -165,7 +190,7 @@ export default {
case 10:
return '携程旅游'
default :
default:
}
},
orderSourcesSpecialNew(orderSource) {
......@@ -198,7 +223,7 @@ export default {
case 11:
return '飞猪旅行'
default :
default:
}
},
orderStatusText(status) {
......@@ -246,7 +271,7 @@ export default {
case 16:
return '调度已取消'
default :
default:
}
},
carTypeText(status) {
......@@ -309,7 +334,7 @@ export default {
case 144:
return '尊贵型'
default :
default:
return '/'
}
},
......@@ -334,7 +359,7 @@ export default {
case 6:
return '包车'
default :
default:
}
},
valuationTypeText(type) {
......@@ -352,7 +377,7 @@ export default {
case 3:
return '协定价'
default :
default:
return '套餐价'
}
},
......@@ -365,7 +390,7 @@ export default {
case 2:
return '包车模板'
default :
default:
}
},
reserveTypeText(type) {
......@@ -377,7 +402,7 @@ export default {
case 2:
return '预约'
default :
default:
}
},
intercityTypeText(type) {
......@@ -389,7 +414,7 @@ export default {
case 2:
return '专车'
default :
default:
}
},
carAuditText(type) {
......@@ -410,7 +435,7 @@ export default {
case 5:
return '已停运'
default :
default:
}
},
setMealText(type) {
......@@ -434,7 +459,7 @@ export default {
case 6:
return '10小时-300公里'
default :
default:
}
},
orderStatusTypeText(type) {
......@@ -497,7 +522,7 @@ export default {
case 4:
return '平台方'
default :
default:
}
},
settlementTypeText(type) {
......@@ -512,7 +537,7 @@ export default {
case 2:
return '已结算'
default :
default:
}
},
billTypeText(type) {
......@@ -525,14 +550,14 @@ export default {
case 2:
return '组织账单'
default :
default:
}
},
dateTime2Str(time, type) {
const addZero = (v) => {
if(v < 10) {
return '0'+v;
}else {
if (v < 10) {
return '0' + v;
} else {
return v;
}
}
......@@ -551,15 +576,15 @@ export default {
let ss = addZero(d.getSeconds());
if(type === 'yyyy-mm-dd') {
return Y+'-'+M+'-'+D;
if (type === 'yyyy-mm-dd') {
return Y + '-' + M + '-' + D;
}
if(type === 'yyyy-mm-dd hh:mm:ss') {
return Y+'-'+M+'-'+D+' '+hh+':'+mm+':'+ss;
if (type === 'yyyy-mm-dd hh:mm:ss') {
return Y + '-' + M + '-' + D + ' ' + hh + ':' + mm + ':' + ss;
}
},
businessBillsType(type,otherType) {
businessBillsType(type, otherType) {
type = Number(type);
otherType = Number(otherType);
switch (type) {
......@@ -568,16 +593,16 @@ export default {
return '业务账单'
case 2:
if(otherType == 1) return '司机费用账单'
if (otherType == 1) return '司机费用账单'
else return '组织费用账单'
case 3:
return '成本账单'
default :
default:
}
},
numFilter (value) {
numFilter(value) {
// 截取当前数据到小数点后三位
const tempVal = parseFloat(value).toFixed(3)
const realVal = tempVal.substring(0, tempVal.length - 1)
......@@ -590,7 +615,7 @@ export default {
return '客诉'
case 2:
return '司控'
default :
default:
}
},
complainWayText(type) {
......@@ -603,7 +628,7 @@ export default {
return '电话控诉'
case 3:
return '建议'
default :
default:
}
},
processingStatusText(type) {
......@@ -616,7 +641,7 @@ export default {
return '处理完成'
case 2:
return '处理中'
default :
default:
}
},
complainOrderText(type) {
......@@ -644,7 +669,7 @@ export default {
return '同程接口调用'
case 10:
return '携程接口调用'
default :
default:
return '/'
}
},
......@@ -738,7 +763,7 @@ export default {
return '/'
}
},
BrandText (type) {
BrandText(type) {
switch (type) {
case '61fdff1d455c4ab8a2efc564c245b905':
return '华哥出行'
......@@ -749,10 +774,10 @@ export default {
case 'dad52b5719e3202e32a6619e14d0ccec':
return '领航约车'
default :
default:
}
},
waybillOrderStatusText (status) {
waybillOrderStatusText(status) {
status = Number(status)
switch (status) {
case 0:
......@@ -792,7 +817,7 @@ export default {
return '同程已取消'
case 16:
return '调度已取消'
default :
default:
}
},
carTypeListText(val) {
......
import {get, post, put, deletes, postblob } from '@/request/http'
/* 公告类型列表 */
export function typeManage(data = {}) {
const url = process.env.VUE_APP_BASE_API16 + '/announcement/type/list';
return get(url, data)
}
/* 公告列表 */
export function listManage(data = {}) {
const url = process.env.VUE_APP_BASE_API16 + '/announcement/list/manage';
return post(url, data)
}
/* 公告列表(接收) */
export function listFindManage(data = {}) {
const url = process.env.VUE_APP_BASE_API16 + '/announcement/list/find';
return post(url, data)
}
/* 公告客户信息 */
export function clientInfo(data = {}) {
const url = process.env.VUE_APP_BASE_API16 + '/announcement/client/info';
return post(url, data)
}
/* 添加公告 */
export function addNotice(data = {}) {
const url = process.env.VUE_APP_BASE_API16 + '/announcement/add';
return post(url, data)
}
/* 修改公告 */
export function editNotice(data = {}) {
const url = process.env.VUE_APP_BASE_API16 + '/announcement/update';
return post(url, data)
}
/* 删除公告 */
export function delNotice(data = {}) {
const url = process.env.VUE_APP_BASE_API16 + '/announcement/ban';
return post(url, data)
}
/* 发布公告 */
export function publishNotice(data = {}) {
const url = process.env.VUE_APP_BASE_API16 + '/announcement/publish';
return post(url, data)
}
/* 读取公告 */
export function readNotice(data = {}) {
const url = process.env.VUE_APP_BASE_API16 + '/announcement/read/log';
return post(url, data)
}
/* 发布端公告详情 */
export function pushNoticeInfo(clientId, ancId) {
const url = process.env.VUE_APP_BASE_API16 + `/announcement/info/manage/${clientId}/${ancId}`;
return get(url, {})
}
/* 接收端公告详情 */
export function findNoticeInfo(clientId, ancId, data) {
const url = process.env.VUE_APP_BASE_API16 + `/announcement/info/find/${clientId}/${ancId}`;
return get(url, data)
}
/* 接收端公告详情 */
export function listNotice(clientId, data) {
const url = process.env.VUE_APP_BASE_API16 + `/announcement/list/notice/${clientId}`;
return get(url, data)
}
......@@ -377,7 +377,7 @@ export function setAuditStatus(data = {}) {
/* 查询司机身份证 */
export function getDriverIdCar(data = {}, id) {
const url = process.env.VUE_APP_BASE_API2_+ `/organize/users/${id}`
const url = process.env.VUE_APP_BASE_API2_ + `/organize/users/${id}`
return get(url, data)
}
......@@ -899,13 +899,13 @@ export function queryAll(data = {}) {
// 分账业务详情设置----添加 /subAccount/add
export function subAccountAdd(data) {
const url = process.env.VUE_APP_BASE_API5 + '/subAccount/add';
return post (url, data)
return post(url, data)
}
// 分账业务详情设置----修改 /subAccount/update
export function subAccountUpdate(data) {
const url = process.env.VUE_APP_BASE_API5 + '/subAccount/update';
return post (url, data)
return post(url, data)
}
// 导出周期结算账单
......
......@@ -357,6 +357,56 @@ export const routes = [{
]
},
{
path: '/notice',
name: 'notice',
component: Layout,
redirect: '/notice/index',
meta: { icon: 'el-icon-s-platform', title: '公告管理' },
children: [{
path: 'notice-drafts',
name: 'noticeDrafts',
component: () =>
import ('@/views/notice/noticeDrafts.vue'),
meta: { title: '草稿箱', icon: 'el-icon-s-order' }
},
{
path: 'push-notice-list',
name: 'pushNoticeList',
component: () =>
import ('@/views/notice/noticeList.vue'),
meta: { title: '公告列表', icon: 'el-icon-s-order' }
},
{
path: 'notice-add',
name: 'noticeAdd',
component: () =>
import ('@/views/notice/components/noticeAdd.vue'),
hidden: true
},
{
path: 'notice-edit',
name: 'noticeEdit',
component: () =>
import ('@/views/notice/components/noticeEdit.vue'),
hidden: true
},
{
path: 'push-notice-detail',
name: 'pushNoticeDetail',
component: () =>
import ('@/views/notice/components/pushNoticeDetail.vue'),
hidden: true
},
{
path: 'all-notice-detail',
name: 'allNoticeDetail',
component: () =>
import ('@/views/notice/components/allNoticeDetail.vue'),
hidden: true
},
]
},
{
path: '/operation',
name: 'operation',
component: Layout,
......
const getters = {
customer: state => state.notice.customer,
typeManage: state => state.notice.typeManage,
token: state => state.user.token,
roles: state => state.user.roles,
userInfo: state => state.user.userInfo,
......@@ -8,7 +10,14 @@ const getters = {
routes: state => state.permission.routes,
orderStatus: state => state.business.orderStatus,
msgIsShow: state => state.app.msgIsShow,
brandList: state => state.business.brandList.length === 0 ? state.business.brandList : JSON.parse(state.business.brandList),
runTypeAndChannel: state => {
let arr = Object.keys(state.business.runTypeAndChannel);
if (arr.length > 0) {
return JSON.parse(state.business.runTypeAndChannel);
} else {
return {}
}
},
nameInfo: state => {
let arr = Object.keys(state.user.userInfo);
if (arr.length > 0) {
......@@ -25,14 +34,6 @@ const getters = {
return {}
}
},
orderDetail: state => {
let arr = Object.keys(state.business.orderDetail);
if (arr.length > 0) {
return JSON.parse(state.business.orderDetail)
} else {
return {}
}
},
productJJInfo: state => {
let arr = Object.keys(state.business.productJJInfo);
if (arr.length > 0) {
......
......@@ -5,6 +5,7 @@ import app from './modules/app'
import permission from './modules/permission'
import user from './modules/user'
import business from './modules/business'
import notice from './modules/notice'
Vue.use(Vuex)
......@@ -13,7 +14,8 @@ const store = new Vuex.Store({
app,
permission,
user,
business
business,
notice
},
getters
})
......
......@@ -4,7 +4,7 @@
* @time: 2020/4/13 11:52 AM
*
*/
import {getplatformList} from "@/port/set-request";
import { getplatformList } from "@/port/set-request";
const state = {
areaCodeObj: sessionStorage.getItem('areaCodeObj') || {},
......@@ -35,14 +35,18 @@ const mutations = {
state.productJJInfo = payload
sessionStorage.setItem('productJJInfo', payload)
},
SET_BRANDLIST(state, payload){
SET_BRANDLIST(state, payload) {
state.brandList = payload
sessionStorage.setItem('brandList', payload)
},
DEL_BRANDLIST(state) {
state.brandList = '';
sessionStorage.removeItem('brandList');
}
},
SET_RUNTYPEANDCHANNEL(state, payload) {
state.runTypeAndChannel = payload
// sessionStorage.setItem('runTypeAndChannel', payload)
},
}
const actions = {
......@@ -50,24 +54,26 @@ const actions = {
console.log(rootState)
await getplatformList()
.then((res) => {
if(res.status === 200) {
if (res.status === 200) {
/** 正式环境注释 */
// res.data.forEach(item => {
// if(item.brandName.indexOf('玖玖') !== -1) {
// item.brandUrl = 'http://xoado.tpddns.net:10001/brand';
// }
// if(item.brandName.indexOf('江南') !== -1) {
// item.brandUrl = 'http://xoado.tpddns.net:10001/brandjn';
// }
// if(item.brandName.indexOf('妥妥') !== -1) {
// item.brandUrl = 'http://xoado.tpddns.net:10001/brandtt';
// }
// })
/** 测试环境注释 */
res.data.forEach(item => {
if(item.brandName.indexOf('玖玖') !== -1) {
item.brandUrl = 'http://xoado.tpddns.net:10001/brand';
}
if(item.brandName.indexOf('江南') !== -1) {
item.brandUrl = 'http://xoado.tpddns.net:10001/brandjn';
}
if(item.brandName.indexOf('妥妥') !== -1) {
item.brandUrl = 'http://xoado.tpddns.net:10001/brandtt';
}
item.brandUrl = item.brandUrl + '/brand';
})
/** 测试环境注释 */
// res.data.forEach(item => {
// item.brandUrl = item.brandUrl+'/brand';
// })
let data = res.data;
commit('SET_BRANDLIST', JSON.stringify(data))
......@@ -76,6 +82,32 @@ const actions = {
})
},
getRunTypeAndChannel({ commit, dispatch, state, rootState }) {
return new Promise((resolve) => {
selectionsApi(rootState.user.platformId)
.then((res) => {
if (res.status === 200) {
let channel = res.data.allowChannel;
let channelId = res.data.allowChannel.map((item) => {
return item.id;
});
let runType = res.data.allowRunType;
let runTypeId = res.data.allowRunType.map((item) => {
return item.id
});
let result = {
channel: channel,
channelId: channelId,
runType: runType,
runTypeId: runTypeId,
}
commit('SET_RUNTYPEANDCHANNEL', JSON.stringify(result))
}
resolve(res);
})
})
}
}
export default {
namespaced: true,
......
import { clientInfo, typeManage } from "@/port/notice/notice";
const state = {
customer: {}, // 公告对象信息
typeManage: [], // 公告类型
}
const mutations = {
SET_CUSTOMER(state, val) {
state.customer = val
},
SET_TYPEMANAGE(state, val) {
state.typeManage = val
},
}
const actions = {
getNoticeInfo({ commit, rootGetters }) {
if (Object.keys(state.customer).length === 0) {
// 参数请看 http://xoado.tpddns.net:10001/docs/09-announcement/03-client/01-info.html
// 参数请看 http://192.168.0.251:5888/docs/09-announcement/03-client/01-info.html
let params = {
endpointId: '2075eb969356e8bf6f0efa33310e8870377992b2',
clientId: "2075eb969356e8bf6f0efa33310e8870377992b2"
}
return new Promise((resolve) => {
clientInfo(params)
.then((res) => {
if (res.status === 200) {
commit('SET_CUSTOMER', res.data)
}
resolve();
})
})
}
},
getTypeInfo({ commit }) {
if (Object.keys(state.typeManage).length === 0) {
return new Promise((resolve) => {
typeManage()
.then((res) => {
if (res.status === 200) {
commit('SET_TYPEMANAGE', res.data)
}
resolve()
})
})
}
},
}
export default {
namespaced: true,
mutations,
state,
actions
}
\ No newline at end of file
<template>
<el-card style="background-color: #ffffff;margin: 20px;">
<el-row class="top-title">
消息详情
<el-button style="margin-left: 10px!important;" class="top-button1" type="text" @click="() => $router.go(-1)">返回上一级</el-button>
<el-button class="top-button2" type="text">上一条</el-button>
<el-button class="top-button3" type="text">下一条</el-button>
</el-row>
<el-row style="margin-top: 10px;padding: 10px;">
<el-col :span="24" style="padding-right: 10px;">
<el-row style="border: 1px solid #f2f2f2;padding: 10px;">
<el-row type="flex" justify="center" style="font-size: 18px;">
{{info.title}}
</el-row>
<el-row type="flex" justify="center" style="color: #7F7F7F;border-bottom: 1px solid #f2f2f2;padding-bottom: 5px;">
发布方:【{{info.publishClientName}}{{info.publishName}}
<span style="margin-left: 20px;">{{ info.publishTime ? info.publishTime.substring(0, info.publishTime.indexOf(' ')) : ''}}</span>
</el-row>
<el-row v-if="info.isExternal" style="height: 500px;padding: 10px;">
<a :href="info.ancBody" target="blank" style="text-decoration: underline;color: #409EFF;cursor:pointer;">{{info.ancBody}}</a>
</el-row>
<el-row v-else style="height: 500px;padding: 10px;overflow-y: scroll;"
v-html="info.ancBody" class="itemlist-style-type">
</el-row>
<el-row type="flex">
<el-col style="width: 60px;padding-left: 10px;">
附件:
</el-col>
<el-col style="width: calc(100% - 120px)">
<template v-if="info.hasOwnProperty('attachments')">
<div v-for="(item, index) in info.attachments" :key="'attachments'+index">
{{item.fileName}}
<i class="el-icon-download" @click="downLoad(item)" style="cursor: pointer;margin-left: 10px;color: #409EFF;"></i>
</div>
</template>
</el-col>
</el-row>
</el-row>
</el-col>
<el-col :span="8">
</el-col>
</el-row>
</el-card>
</template>
<script>
import {findNoticeInfo} from "@/port/notice/notice";
import JudgeType from "@/mixins/judgeType";
export default {
name: "pushNoticeDetail",
mixins: [JudgeType],
data() {
return {
info: {}
}
},
computed: {
customer() {
const customer = this.$store.getters.customer
if (!customer) {
this.$store.dispatch('notice/getNoticeInfo')
}
return customer
},
typeList() {
let typeManage = this.$store.getters.typeManage;
if (Object.keys(typeManage).length === 0) {
this.$store.dispatch('notice/getTypeInfo')
}
return typeManage;
}
},
created() {
this.getInfo();
},
methods: {
downLoad(item) {
window.open(item.fileUrl);
},
getInfo() {
findNoticeInfo(this.$store.getters.platformId, this.$route.query.ancId, {type: 1})
.then((res) => {
if(res.status === 200) {
this.info = res.data;
}else {
this.$message.error(res.msg);
}
})
}
}
}
</script>
<style scoped lang="scss">
.top-title::before {
content: '';
position: absolute;
left: 10px;
top: 10%;
overflow: hidden;
color: #169bd5;
width: 3px;
background-color: #169bd5;
height: 80%;
}
.top-title::after {
content: '';
position: absolute;
bottom: -10px;
left: 0;
width: 100%;
height: 1px;
background-color: #d7d7d7;
}
.top-title {
padding: 0 10px 0 20px;
font-size: 16px;
font-weight: bold;
}
.top-button1, .top-button3 {
border: 1px solid #409EFF;
border-radius: 0;
}
.top-button2 {
border-top: 1px solid #409EFF;
border-bottom: 1px solid #409EFF;
border-radius: 0;
}
.top-button1, .top-button2, .top-button3 {
padding: 3px;
}
::v-deep.el-button {
margin-left: 0 !important;
}
::v-deep .itemlist-style-type>ol,
ul {
list-style-type:decimal !important;
list-style-position:inside !important;
}
</style>
<template>
<div class="tinymce-editor">
<Editor
:id="editorId"
v-model="editorValue"
:init="editorInit"
:disabled="disabled"
@onClick="handleClick"
/>
</div>
</template>
<script>
import tinymce from 'tinymce/tinymce'
import Editor from '@tinymce/tinymce-vue'
// 引入富文本编辑器主题的js和css
import 'tinymce/themes/silver/theme.min.js'
import 'tinymce/skins/ui/oxide/skin.min.css'
// 扩展插件
import 'tinymce/plugins/image'
import 'tinymce/plugins/link'
import 'tinymce/plugins/code'
import 'tinymce/plugins/table'
import 'tinymce/plugins/lists'
import 'tinymce/plugins/wordcount' // 字数统计插件
export default {
name: "editor",
components: {
Editor
},
props: {
id: {
type: String,
default: 'tinymceEditor'
},
value: {
type: String,
default: ''
},
disabled: {
type: Boolean,
default: false
},
plugins: {
type: [String, Array],
default: 'link lists image code table wordcount'
},
toolbar: {
type: [String, Array],
default: 'bold italic underline strikethrough | fontsizeselect | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent blockquote | undo redo | link unlink image code | removeformat'
}
},
data() {
return {
editorInit: {
language_url: '/tinymce/langs/zh_CN.js',
language: 'zh_CN',
skin_url: '/tinymce/skins/ui/oxide',
height: 300,
plugins: this.plugins,
toolbar: this.toolbar,
statusbar: true, // 底部的状态栏
menubar: true, // 最上方的菜单
branding: false, // 水印“Powered by TinyMCE”
images_upload_handler: (blobInfo, success, failure) => {
this.$emit('handleImgUpload', blobInfo, success, failure)
}
},
editorId: this.id,
editorValue: this.value
}
},
watch: {
editorValue(newValue) {
this.$emit('input', newValue)
}
},
mounted() {
tinymce.init({})
},
methods: {
// https://github.com/tinymce/tinymce-vue => All available events
handleClick(e) {
this.$emit('onClick', e, tinymce)
},
clear() {
this.editorValue = ''
}
}
}
</script>
<style scoped>
</style>
<template>
<el-card style="background-color: #ffffff;margin: 20px;">
<el-row class="top-title">
消息详情
<el-button style="margin-left: 10px!important;" class="top-button1" type="text"
@click="() => $router.go(-1)">返回上一级</el-button>
<el-button class="top-button2" type="text">上一条</el-button>
<el-button class="top-button3" type="text">下一条</el-button>
</el-row>
<el-row style="margin-top: 10px;padding: 10px;">
<el-col :span="16" style="padding-right: 10px;">
<el-row style="border: 1px solid #f2f2f2;padding: 10px;">
<el-row type="flex" justify="center" style="font-size: 18px;">
{{ info.title }}
</el-row>
<el-row type="flex" justify="center"
style="color: #7F7F7F;border-bottom: 1px solid #f2f2f2;padding-bottom: 5px;">
发布方:【{{info.publishClientName}}{{info.publishName}}
<span style="margin-left: 20px;">{{ info.publishTime ? info.publishTime.substring(0,
info.publishTime.indexOf(' ')) : ''
}}</span>
</el-row>
<el-row v-if="!info.isExternal" style="height: 500px;padding: 10px;overflow-y: scroll;"
v-html="info.ancBody" class="itemlist-style-type">
</el-row>
<el-row v-else style="height: 500px;padding: 10px;">
<a :href="info.ancBody" style="cursor:pointer;" />
</el-row>
<el-row type="flex">
<el-col style="width: 60px;padding-left: 10px;">
附件:
</el-col>
<el-col style="width: calc(100% - 120px)">
<template v-if="info.hasOwnProperty('attachments')">
<div v-for="(item, index) in info.attachments" :key="'attachments' + index">
{{ item.fileName }}
<i class="el-icon-download" @click="downLoad(item)"
style="cursor: pointer;margin-left: 10px;color: #409EFF;"></i>
</div>
</template>
</el-col>
</el-row>
</el-row>
</el-col>
<el-col :span="8" style="padding: 10px;background-color: #d5d5d5;">
<el-row style="background-color: #ffffff;padding: 0 20px;">
<el-form label-width="110px" label-position="right">
<el-form-item label="消息有效时段:">
{{ info.validStartTime + '~' + info.validEndTime }}
</el-form-item>
<el-form-item label="公告类型:">
{{ info.ancTypeName }}
</el-form-item>
<el-form-item label="指定对象:">
{{ info.isAssign ? '是' : '否' }}
</el-form-item>
<el-form-item label="通知对象类别:">
{{ info.hasOwnProperty('noticeEndpoints') > 0 ? info.noticeEndpoints[0].name : '' }}
</el-form-item>
<el-form-item label="对象名称:">
<template v-if="info.hasOwnProperty('receivers')">
<span v-for="(item, index) in info.receivers[0].children" :key="'reader' + index">
{{ (index === 0 ? '' : '、') + item.name }}
</span>
</template>
</el-form-item>
</el-form>
</el-row>
<el-row style="margin-top: 10px;background-color: #ffffff;padding-left: 20px;">
<el-row type="flex" align="center">
<img src="../../../assets/eye.png" style="width: 20px;height: 20px;" alt="" />
{{ '已读:' + info.readCount }}
</el-row>
<el-row style="height: 396px;overflow-y: auto;">
<template v-if="info.hasOwnProperty('readers')">
<div v-for="(item, index) in info.readers[0].children" :key="index + '_p'">
{{ item.name + '-' + item.userName + '(' + item.userPhone + ')' }}
</div>
</template>
</el-row>
</el-row>
</el-col>
</el-row>
</el-card>
</template>
<script>
import { pushNoticeInfo } from "@/port/notice/notice";
import JudgeType from "@/mixins/judgeType";
export default {
name: "pushNoticeDetail",
mixins: [JudgeType],
data() {
return {
info: {}
}
},
computed: {
customer() {
const customer = this.$store.getters.customer
if (!customer) {
this.$store.dispatch('notice/getNoticeInfo')
}
return customer
},
typeList() {
let typeManage = this.$store.getters.typeManage;
if (Object.keys(typeManage).length === 0) {
this.$store.dispatch('notice/getTypeInfo')
}
return typeManage;
}
},
created() {
this.getInfo();
},
methods: {
downLoad(item) {
window.open(item.fileUrl);
},
getInfo() {
pushNoticeInfo("2075eb969356e8bf6f0efa33310e8870377992b2", this.$route.query.ancId)
.then((res) => {
if (res.status === 200) {
let info = res.data;
if (info.hasOwnProperty('readers')) {
info.readers[0].children = info.readers[0].children.map(item => {
let name = '';
let phone = '';
item.children.forEach(it => {
if (it.id === 'name') {
name = it.name;
}
if (it.id === 'phone') {
phone = it.name;
}
})
item['userName'] = name;
item['userPhone'] = phone;
return item;
})
}
console.log(JSON.stringify(info))
this.info = info;
} else {
this.$message.error(res.msg);
}
})
}
}
}
</script>
<style scoped lang="scss">
.top-title::before {
content: '';
position: absolute;
left: 10px;
top: 10%;
overflow: hidden;
color: #169bd5;
width: 3px;
background-color: #169bd5;
height: 80%;
}
.top-title::after {
content: '';
position: absolute;
bottom: -10px;
left: 0;
width: 100%;
height: 1px;
background-color: #d7d7d7;
}
.top-title {
padding: 0 10px 0 20px;
font-size: 16px;
font-weight: bold;
}
.top-button1,
.top-button3 {
border: 1px solid #409EFF;
border-radius: 0;
}
.top-button2 {
border-top: 1px solid #409EFF;
border-bottom: 1px solid #409EFF;
border-radius: 0;
}
.top-button1,
.top-button2,
.top-button3 {
padding: 3px;
}
::v-deep .itemlist-style-type>ol,
ul {
list-style-type:decimal !important;
list-style-position:inside !important;
}
::v-deep.el-button {
margin-left: 0 !important;
}
::v-deep .el-form-item {
margin-bottom: 0;
}
</style>
<template>
<el-card style="background-color: #ffffff;margin: 20px;">
<el-row v-if="isAll">
<el-row type="flex" justify="space-between">
<div class="top-title">
全部公告
</div>
<el-button style="margin-left: 10px;padding: 7px 15px;border-color: #3C6CF1;color: #3C6CF1;" @click="() => isAll = !isAll">
已发布公告
</el-button>
</el-row>
<all-notice-list></all-notice-list>
</el-row>
<el-row v-else>
<el-row type="flex" justify="space-between">
<div class="top-title">
已发布公告
</div>
<el-button style="margin-left: 10px;padding: 7px 15px;border-color: #3C6CF1;color: #3C6CF1;" @click="() => isAll = !isAll">
全部公告
</el-button>
</el-row>
<push-notice-list></push-notice-list>
</el-row>
</el-card>
</template>
<script>
import pushNoticeList from "./pushNoticeList";
import allNoticeList from "./allNoticeList";
export default {
name: "NoticeList",
components: {
pushNoticeList,
allNoticeList
},
data() {
return {
isAll: true
}
}
}
</script>
<style scoped lang="scss">
.top-title {
padding-left: 10px;
font-weight: 800;
font-size: 16px;
display: flex;
align-items: center;
}
.top-title::before {
content: '';
position: absolute;
left: 0;
top: 10%;
overflow: hidden;
color: #169bd5;
width: 3px;
background-color: #169bd5;
height: 80%;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment