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
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "xoado-vue-template",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"animate.css": "^3.7.2",
"axios": "^0.21.1",
"core-js": "^3.6.5",
"echarts": "^4.8.0",
"element-china-area-data": "^5.0.2",
"element-ui": "^2.15.1",
"js-md5": "^0.7.3",
"screenfull": "^5.0.0",
"vue": "^2.6.11",
"vue-amap": "^0.5.10",
"vue-clipboard2": "^0.3.1",
"vue-jsonp": "^2.0.0",
"vue-router": "^3.2.0",
"vuedraggable": "^2.24.3",
"vuex": "^3.4.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-standard": "^5.1.2",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^6.2.2",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
"name": "xoado-vue-template",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"extends": [
"plugin:vue/essential",
"@vue/standard"
],
"parserOptions": {
"parser": "babel-eslint"
"dependencies": {
"@tinymce/tinymce-vue": "^3.0.1",
"animate.css": "^3.7.2",
"axios": "^0.21.1",
"core-js": "^3.6.5",
"echarts": "^4.8.0",
"element-china-area-data": "^5.0.2",
"element-ui": "^2.15.1",
"js-md5": "^0.7.3",
"screenfull": "^5.0.0",
"vue": "^2.6.11",
"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"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-standard": "^5.1.2",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^6.2.2",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"@vue/standard"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
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)
}
// 导出周期结算账单
......@@ -925,4 +925,4 @@ export function getFreightCarBrand() {
export function getFreightCarBrands(val) {
const url = process.env.VUE_APP_BASE_API6 + '/new/car/pack/parent/' + val
return get(url, {})
}
}
\ No newline at end of file
......@@ -1170,4 +1170,4 @@ export function PutvoicePage(data) {
export function updateMobilenoCaptCha(data) {
const url = process.env.VUE_APP_BASE_API6 + `/driver/updateMobile/noCaptCha`
return put(url, data)
}
}
\ No newline at end of file
......@@ -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,
......@@ -467,4 +517,4 @@ router.beforeEach(async(to, from, next) => {
}
})
export default router
export default router
\ No newline at end of file
const getters = {
token: state => state.user.token,
roles: state => state.user.roles,
userInfo: state => state.user.userInfo,
platformId: state => state.user.platformId,
transportId: state => state.user.transportId,
accountPlatformId: state => state.user.accountPlatformId,
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),
nameInfo: state => {
let arr = Object.keys(state.user.userInfo);
if (arr.length > 0) {
return JSON.parse(state.user.userInfo)
} else {
return {}
}
},
areaCodeObj: state => {
let arr = Object.keys(state.business.areaCodeObj);
if (arr.length > 0) {
return JSON.parse(state.business.areaCodeObj)
} else {
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) {
return JSON.parse(state.business.productJJInfo)
} else {
return {}
}
},
complantObj: state => {
let arr = Object.keys(state.business.complantObj);
if (arr.length > 0) {
return JSON.parse(state.business.complantObj)
} else {
return {}
}
},
opened: state => {
if (state.app.opened === 'false') {
return false
} else if (state.app.opened === 'true') {
return true
}
}
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,
platformId: state => state.user.platformId,
transportId: state => state.user.transportId,
accountPlatformId: state => state.user.accountPlatformId,
routes: state => state.permission.routes,
orderStatus: state => state.business.orderStatus,
msgIsShow: state => state.app.msgIsShow,
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) {
return JSON.parse(state.user.userInfo)
} else {
return {}
}
},
areaCodeObj: state => {
let arr = Object.keys(state.business.areaCodeObj);
if (arr.length > 0) {
return JSON.parse(state.business.areaCodeObj)
} else {
return {}
}
},
productJJInfo: state => {
let arr = Object.keys(state.business.productJJInfo);
if (arr.length > 0) {
return JSON.parse(state.business.productJJInfo)
} else {
return {}
}
},
complantObj: state => {
let arr = Object.keys(state.business.complantObj);
if (arr.length > 0) {
return JSON.parse(state.business.complantObj)
} else {
return {}
}
},
opened: state => {
if (state.app.opened === 'false') {
return false
} else if (state.app.opened === 'true') {
return true
}
}
}
export default getters
export default getters
\ No newline at end of file
......@@ -5,16 +5,18 @@ 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)
const store = new Vuex.Store({
modules: {
app,
permission,
user,
business
},
getters
modules: {
app,
permission,
user,
business,
notice
},
getters
})
export default store
export default store
\ No newline at end of file
......@@ -4,82 +4,114 @@
* @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') || {},
complantObj: sessionStorage.getItem('complantObj') || '',
orderStatus: sessionStorage.getItem('orderStatus') || '',
productJJInfo: sessionStorage.getItem('productJJInfo') || {},
orderDetail: sessionStorage.getItem('orderDetail') || {},
brandList: sessionStorage.getItem('brandList') || []
areaCodeObj: sessionStorage.getItem('areaCodeObj') || {},
complantObj: sessionStorage.getItem('complantObj') || '',
orderStatus: sessionStorage.getItem('orderStatus') || '',
productJJInfo: sessionStorage.getItem('productJJInfo') || {},
orderDetail: sessionStorage.getItem('orderDetail') || {},
brandList: sessionStorage.getItem('brandList') || []
}
const mutations = {
SET_AREACODE(state, payload) {
state.areaCodeObj = String(payload)
sessionStorage.setItem('areaCodeObj', payload)
},
SET_ORDERDETAIL(state, payload) {
state.orderDetail = payload
sessionStorage.setItem('orderDetail', payload)
},
SET_COMPLANT(state, payload) {
state.complantObj = payload
sessionStorage.setItem('complantObj', payload)
},
SET_WAYBILL(state, payload) {
state.orderStatus = payload
sessionStorage.setItem('orderStatus', payload)
},
SET_PRODUCTJJINFO(state, payload) {
state.productJJInfo = payload
sessionStorage.setItem('productJJInfo', payload)
},
SET_BRANDLIST(state, payload){
state.brandList = payload
sessionStorage.setItem('brandList', payload)
},
DEL_BRANDLIST(state) {
state.brandList = '';
sessionStorage.removeItem('brandList');
}
SET_AREACODE(state, payload) {
state.areaCodeObj = String(payload)
sessionStorage.setItem('areaCodeObj', payload)
},
SET_ORDERDETAIL(state, payload) {
state.orderDetail = payload
sessionStorage.setItem('orderDetail', payload)
},
SET_COMPLANT(state, payload) {
state.complantObj = payload
sessionStorage.setItem('complantObj', payload)
},
SET_WAYBILL(state, payload) {
state.orderStatus = payload
sessionStorage.setItem('orderStatus', payload)
},
SET_PRODUCTJJINFO(state, payload) {
state.productJJInfo = payload
sessionStorage.setItem('productJJInfo', 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 = {
async getBrandList({ commit, dispatch, state, rootState }) {
console.log(rootState)
await getplatformList()
.then((res) => {
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 => {
// item.brandUrl = item.brandUrl+'/brand';
// })
let data = res.data;
commit('SET_BRANDLIST', JSON.stringify(data))
// resove(data)
}
})
},
async getBrandList({ commit, dispatch, state, rootState }) {
console.log(rootState)
await getplatformList()
.then((res) => {
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 => {
item.brandUrl = item.brandUrl + '/brand';
})
let data = res.data;
commit('SET_BRANDLIST', JSON.stringify(data))
// resove(data)
}
})
},
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,
state,
mutations,
actions
}
namespaced: true,
state,
mutations,
actions
}
\ No newline at end of file
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>
......@@ -3,62 +3,62 @@
*/
const path = require("path");
const resolve = function(dir) {
return path.join(__dirname, dir);
return path.join(__dirname, dir);
};
const {
publicPath,
assetsDir,
outputDir,
lintOnSave,
title
publicPath,
assetsDir,
outputDir,
lintOnSave,
title
} = require("./src/config/index");
process.env.VUE_APP_TITLE = title || "小多智运";
module.exports = {
publicPath,
outputDir,
assetsDir,
lintOnSave,
productionSourceMap: false, // 是否在构建生产包时生成sourcdeMap
chainWebpack: config => {
config.resolve.alias
.set("@", resolve("src"))
.set("views", resolve("src/views"));
config.optimization.runtimeChunk("single");
},
devServer: {
hot: true,
open: true,
// proxy: {
// '/route': {
// target: process.env.VUE_APP_BASE_API10,
// changeOrigin: true,
// secure: false,
// pathRewrite: {
// '^/route': '' // 规定请求地址以什么作为开头
// }
// }
// }
},
css: {
requireModuleExtension: true,
sourceMap: true,
loaderOptions: {
scss: {
/*sass-loader 8.0语法 */
prependData: '@import "~@/styles/variable.scss";'
/*sass-loader 9.0写法,感谢github用户 shaonialife*/
// additionalData(content, loaderContext) {
// const { resourcePath, rootContext } = loaderContext;
// const relativePath = path.relative(rootContext, resourcePath);
// if (
// relativePath.replace(/\\/g, "/") !== "src/styles/variables.scss"
// ) {
// return '@import "~@/styles/variables.scss";' + content;
publicPath,
outputDir,
assetsDir,
lintOnSave,
productionSourceMap: false, // 是否在构建生产包时生成sourcdeMap
chainWebpack: config => {
config.resolve.alias
.set("@", resolve("src"))
.set("views", resolve("src/views"));
config.optimization.runtimeChunk("single");
},
devServer: {
hot: true,
open: true,
// proxy: {
// '/route': {
// target: process.env.VUE_APP_BASE_API10,
// changeOrigin: true,
// secure: false,
// pathRewrite: {
// '^/route': '' // 规定请求地址以什么作为开头
// }
// }
// return content;
// }
}
},
css: {
requireModuleExtension: true,
sourceMap: true,
loaderOptions: {
scss: {
/*sass-loader 8.0语法 */
prependData: '@import "~@/styles/variable.scss";'
/*sass-loader 9.0写法,感谢github用户 shaonialife*/
// additionalData(content, loaderContext) {
// const { resourcePath, rootContext } = loaderContext;
// const relativePath = path.relative(rootContext, resourcePath);
// if (
// relativePath.replace(/\\/g, "/") !== "src/styles/variables.scss"
// ) {
// return '@import "~@/styles/variables.scss";' + content;
// }
// return content;
// }
}
}
}
}
};
};
\ No newline at end of file
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