提交 efe71796 编写于 作者: guangjun.yang's avatar guangjun.yang

协议列表

上级 8e0aac02
...@@ -18,8 +18,11 @@ const msgHistory = r => require.ensure([], () => r(require('../views/message/msg ...@@ -18,8 +18,11 @@ const msgHistory = r => require.ensure([], () => r(require('../views/message/msg
const blacklist = r => require.ensure([], () => r(require('../views/message/blacklist.vue')), 'blacklist'); const blacklist = r => require.ensure([], () => r(require('../views/message/blacklist.vue')), 'blacklist');
const fatigueControl = r => require.ensure([], () => r(require('../views/message/fatigue-control.vue')), 'fatigue-control'); const fatigueControl = r => require.ensure([], () => r(require('../views/message/fatigue-control.vue')), 'fatigue-control');
// const blacklist = // 新增 协议管理
const protocolList = r => require.ensure([], () => r(require('../views/protocol/protocol-list.vue')), 'protocol-list');
const createProtocol = r => require.ensure([], () => r(require('../views/protocol/create-protocol.vue')), 'create-protocol');
const protocolHistory = r => require.ensure([], () => r(require('../views/protocol/protocol-history.vue')), 'protocol-history');
const protocolDetail = r => require.ensure([], () => r(require('../views/protocol/protocol-detail.vue')), 'protocol-detail');
export default [{ export default [{
path: '/', path: '/',
...@@ -27,14 +30,13 @@ export default [{ ...@@ -27,14 +30,13 @@ export default [{
children: [ children: [
{ {
path: '', path: '',
redirect: '/create-push' redirect: '/protocol-list'
},{ },{
path: '/index', path: '/index',
redirect: '/create-push' redirect: '/protocol-list'
},{ },{
path: '/home', path: '/home',
// component: home redirect: '/protocol-list'
redirect: '/create-push'
},{ },{
path: '/blank', path: '/blank',
component: blank component: blank
...@@ -74,6 +76,18 @@ export default [{ ...@@ -74,6 +76,18 @@ export default [{
},{ },{
path: '/fatigue-control', path: '/fatigue-control',
component: fatigueControl component: fatigueControl
},{
path: '/protocol-list',
component: protocolList
},{
path: '/create-protocol',
component: createProtocol
},{
path: '/protocol-detail',
component: protocolDetail
},{
path: '/protocol-history',
component: protocolHistory
} }
] ]
}] }]
\ No newline at end of file
<template> <template>
<div id="slidebar-container" class="slidebar-container"> <div id="slidebar-container" class="slidebar-container">
<el-menu :default-active="onRoutes" class="el-menu-vertical-demo" theme="dark" unique-opened router> <el-menu
:default-active="onRoutes"
class="el-menu-vertical-demo"
theme="dark"
unique-opened
router
>
<template v-for="(item,_index) in items"> <template v-for="(item,_index) in items">
<template v-if="item.subs"> <template v-if="item.subs">
<el-submenu :index=" 'index_' + _index" :key="item.index"> <el-submenu :index=" 'index_' + _index" :key="item.index">
<template slot="title"><i :class="item.icon"></i>{{item.title}}</template> <template slot="title">
<i :class="item.icon"></i>
{{item.title}}
</template>
<el-menu-item v-for="(subItem,i) in item.subs" :key="i" :index="subItem.index"> <el-menu-item v-for="(subItem,i) in item.subs" :key="i" :index="subItem.index">
<i class="sub-icon" :class="subItem.icon"></i> <i class="sub-icon" :class="subItem.icon"></i>
{{subItem.title}} {{subItem.title}}
...@@ -13,7 +22,8 @@ ...@@ -13,7 +22,8 @@
</template> </template>
<template v-else> <template v-else>
<el-menu-item :index="item.index" :key="item.index"> <el-menu-item :index="item.index" :key="item.index">
<i :class="item.icon"></i>{{ item.title }} <i :class="item.icon"></i>
{{ item.title }}
</el-menu-item> </el-menu-item>
</template> </template>
</template> </template>
...@@ -21,10 +31,10 @@ ...@@ -21,10 +31,10 @@
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from "vuex";
import { setTimeout } from 'timers' import { setTimeout } from "timers";
import { isNotEmptyUtils } from '../../utils/utils' import { isNotEmptyUtils } from "../../utils/utils";
let vm = null let vm = null;
export default { export default {
props: { props: {
tokenValue: { tokenValue: {
...@@ -39,81 +49,70 @@ export default { ...@@ -39,81 +49,70 @@ export default {
return { return {
items: [ items: [
// { // {
// title: 'APP推送', // title: "黑名单",
// icon: 'el-icon-message', // icon: "el-icon-blacklist",
// index: 'item', // index: "blacklist"
// subs: [
// {
// title: '创建APP推送',
// icon: 'el-icon-message',
// index: 'create-push'
// }, // },
// { // {
// title: 'APP推送历史', // title: "疲劳度控制",
// icon: 'el-icon-message', // icon: "el-icon-set-up",
// index: 'history-push' // index: "fatigue-control"
// },
// ]
// }, // },
{ {
title: '创建APP推送', title: "协议管理",
icon: 'el-icon-document-add', icon: "el-icon-history-push",
index: 'create-push' index: "protocol-list"
},{ },
title: 'APP推送历史', {
icon: 'el-icon-history-push', title: "创建协议",
index: 'history-push' icon: "el-icon-document-add",
},{ index: "create-protocol"
title: '策略管理', },
icon: 'el-icon-stratety-manage', {
index: 'strategy-manage' title: "查看协议",
},{ icon: "el-icon-chat-line-square",
title: '短信历史', index: "protocol-detail"
icon: 'el-icon-chat-line-square', },
index: 'msg-history' {
},{ title: "历史版本",
title: '黑名单', icon: "el-icon-chat-line-square",
icon: 'el-icon-blacklist', index: "protocol-history"
index: 'blacklist'
},{
title: '疲劳度控制',
icon: 'el-icon-set-up',
index: 'fatigue-control'
} }
] ]
} };
}, },
computed: { computed: {
onRoutes() { onRoutes() {
return this.$route.path.replace('/', ''); return this.$route.path.replace("/", "");
} }
}, },
created() { created() {
vm = this vm = this;
}, },
watch: { watch: {
authList(newVal, oldVal){ authList(newVal, oldVal) {
if(!newVal.P001) { // 项目管理 if (!newVal.P001) {
vm.items[1].subs[1].index = 'blank' // 项目管理
vm.items[1].subs[1].index = "blank";
} }
if(!newVal.P002) { // 组件管理 if (!newVal.P002) {
vm.items[1].subs[0].index = 'blank' // 组件管理
vm.items[1].subs[0].index = "blank";
} }
if(!newVal.P003) { // 角色管理 if (!newVal.P003) {
vm.items[2].subs[0].index = 'blank' // 角色管理
vm.items[2].subs[0].index = "blank";
} }
} }
}, },
methods: { methods: {}
};
}
}
</script> </script>
<style lang="scss"> <style lang="scss">
@mixin el-icon-config{ @mixin el-icon-config {
width: 18px; width: 18px;
height: 18px; height: 18px;
margin: 0 8px 0 3px ; margin: 0 8px 0 3px;
background-size: 18px 18px; background-size: 18px 18px;
} }
.slidebar-container { .slidebar-container {
...@@ -123,59 +122,58 @@ export default { ...@@ -123,59 +122,58 @@ export default {
top: 64px; top: 64px;
bottom: 0; bottom: 0;
width: 255px; width: 255px;
background: #06232C; background: #06232c;
.el-menu { .el-menu {
background: #06232C; background: #06232c;
border-right: none; border-right: none;
.sub-icon { .sub-icon {
font-size: 12px; font-size: 12px;
} }
.el-menu-item, .el-submenu__title { .el-menu-item,
color: #8FA4AC; .el-submenu__title {
color: #8fa4ac;
} }
.el-menu-item.is-active { .el-menu-item.is-active {
color: #fff; color: #fff;
background: #509284 !important background: #509284 !important;
} }
.el-menu-item:hover, .el-menu-item:hover,
.el-submenu__title:hover, .el-submenu__title:hover,
.slidebar-container .el-menu .el-menu-item:hover, .slidebar-container .el-menu .el-menu-item:hover,
.slidebar-container .el-menu .el-submenu__title:hover { .slidebar-container .el-menu .el-submenu__title:hover {
color: #fff; color: #fff;
background: #06232C; background: #06232c;
} }
// .el-menu-item:focus, .el-menu-item:hover { // .el-menu-item:focus, .el-menu-item:hover {
// background: #06232C !important; // background: #06232C !important;
// } // }
// APP推送历史 // APP推送历史
.el-icon-history-push{ .el-icon-history-push {
background: url('../../assets/image/history-push.png'); background: url("../../assets/image/history-push.png");
@include el-icon-config; @include el-icon-config;
} }
.is-active .el-icon-history-push{ .is-active .el-icon-history-push {
background: url('../../assets/image/history-push-selected.png'); background: url("../../assets/image/history-push-selected.png");
@include el-icon-config; @include el-icon-config;
} }
// 策略管理 // 策略管理
.el-icon-stratety-manage{ .el-icon-stratety-manage {
background: url('../../assets/image/stratety-manage.png'); background: url("../../assets/image/stratety-manage.png");
@include el-icon-config; @include el-icon-config;
} }
.is-active .el-icon-stratety-manage{ .is-active .el-icon-stratety-manage {
background: url('../../assets/image/stratety-manage-selected.png'); background: url("../../assets/image/stratety-manage-selected.png");
@include el-icon-config; @include el-icon-config;
} }
// 黑名单 // 黑名单
.el-icon-blacklist{ .el-icon-blacklist {
background: url('../../assets/image/blacklist.png'); background: url("../../assets/image/blacklist.png");
@include el-icon-config; @include el-icon-config;
} }
.is-active .el-icon-blacklist{ .is-active .el-icon-blacklist {
background: url('../../assets/image/blacklist-selected.png'); background: url("../../assets/image/blacklist-selected.png");
@include el-icon-config; @include el-icon-config;
} }
} }
} }
</style> </style>
......
此差异已折叠。
此差异已折叠。
<template>
<div class="msg-history-wrap">
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<el-form ref="formData" :model="formData" label-width="100px" style="margin-bottom: 20px;margin-left: 7px;">
<input type="hidden" v-model="formData.all" value=5>
<el-row>
<el-col style="width:290px;">
<el-form-item label="协议名称" prop="protocolName">
<el-input size="small" v-model="formData.protocolName" placeholder="请输入协议名称" ></el-input>
</el-form-item>
</el-col>
<el-col style="position:relative; top: 4px; width: 200px; margin-left: 20px;">
<el-button type="primary" size="small" @click="handleSearchClick()">查询</el-button>
</el-col>
</el-row>
</el-form>
<div style="padding: 0 40px;">
<el-table
:data="tableData"
border
style="width: 100%;">
<!-- <el-table-column
align="center"
prop="mobile"
label="编号"
width="60"
>
</el-table-column> -->
<el-table-column
align="center"
type="index"
label="编号"
width="50">
</el-table-column>
<el-table-column
align="center"
prop="protocolName"
label="协议名称"
width="400"
>
</el-table-column>
<el-table-column
align="center"
prop="signNum"
label="签署数量"
width="120"
>
</el-table-column>
<!-- <el-table-column
align="center"
prop="protocolType"
label="协议类型"
>
</el-table-column> -->
<!-- <el-table-column
align="center"
prop="versionNo"
label="协议版本"
>
</el-table-column> -->
<el-table-column
align="center"
prop="createdName"
label="创建人姓名"
width="120"
>
</el-table-column>
<!-- <el-table-column
align="center"
prop="creatTime"
label="创建时间"
>
<template slot-scope="scope">
{{ returnSendTime(scope.row.creatTime) }}
</template>
</el-table-column> -->
<el-table-column
align="center"
label="最近更新时间"
prop="updateTime"
width="160"
>
<!-- <template slot-scope="scope">
{{ returnSendTime(scope.row.updateTime) }}
</template> -->
</el-table-column>
<el-table-column fixed="right" label="操作" min-width="200" align="center">
<template slot-scope="scope">
<el-button
@click="gotoDetail(scope.row, 0)"
type="primary"
size="small"
>查看详情</el-button>
<el-button
@click="gotoUpdate(scope.row, 0)"
type="primary"
size="small"
>更新版本</el-button>
<el-button
@click="gotoHistoryList(scope.row, 0)"
type="primary"
size="small"
>历史版本</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="formData.pageNo"
:page-sizes="[10, 30, 50, 100]"
:page-size="formData.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows">
</el-pagination>
</div>
</div>
</div>
</div>
</template>
<script>
import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "../../components/breadcrumb.vue";
export default {
components: {
BreadCrumb,
},
data() {
return {
curmbFirst: "协议管理",
formData: {
all: 1,
protocolName: '',
protocolType: 5,
pageNo: 1,
pageSize: 10,
},
totalRows: 0,
tableData: [{}],
}
},
created() {
this.getProtocolList({
all: 1,
protocolType: 5
});
},
methods: {
// 跳转到详情页面(预览页面)
gotoDetail(row) {
this.$router.push({
path: '/protocol-detail',
query: {
protocolId: row.protocolId
}
})
},
// 跳转到添加或修改页面
gotoUpdate(row) {
this.$router.push({
path: '/create-protocol',
query: {
protocolId: row.protocolId
}
})
},
// 跳转到历史版本页面
gotoHistoryList(row) {
this.$router.push({
path: '/protocol-history',
query: {
protocolId: row.protocolId
}
})
},
// 获取协议列表
getProtocolList(params) {
openLoading(this);
this.GET("/smartcontract/protocolManage/protocols", params).then(res => {
closeLoading(this);
if(res && res.code && res.code == '000000'){
if( res && res.data ){
this.tableData = res.data;
// this.totalRows = res.data.total || 0;
// this.tableData = res.data.list || [];
}
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
});
},
handleSearchClick() {
console.log(this.formData);
this.getProtocolList(this.formData);
},
handleSizeChange(val){
this.formData.pageSize = val;
this.getSMSList();
},
handleCurrentChange(val) {
this.formData.pageNo = val;
this.getSMSList();
},
returnSendTime(creatTime){
if( creatTime ){
return creatTime.year + '-' + creatTime.monthValue + '-' + creatTime.dayOfMonth + ' ' + creatTime.hour + ':' + creatTime.minute ;
}else{
return '-';
}
}
},
}
</script>
<style lang="scss">
.msg-history-wrap{
.el-form-item .el-form-item__label{
font-size: 14px;
}
.component-content{
margin-top: 60px;
padding: 10px;
background: #fff;
}
.pagination{
margin: 20px 0;
text-align: right;
}
.status-tj{
&.success{
color: #409EFF;
}
}
}
</style>
<template>
<div class="msg-history-wrap">
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<el-form ref="formData" :model="formData" label-width="100px" style="margin-bottom: 20px;margin-left: 7px;">
<input type="hidden" v-model="formData.all" value=5>
<el-row>
<el-col style="width:290px;">
<el-form-item label="协议名称" prop="protocolName">
<el-input size="small" v-model="formData.protocolName" placeholder="请输入协议名称" ></el-input>
</el-form-item>
</el-col>
<el-col style="position:relative; top: 4px; width: 200px; margin-left: 20px;">
<el-button type="primary" size="small" @click="handleSearchClick()">查询</el-button>
</el-col>
</el-row>
</el-form>
<div style="padding: 0 40px;">
<el-table
:data="tableData"
border
style="width: 100%;">
<!-- <el-table-column
align="center"
prop="mobile"
label="编号"
width="60"
>
</el-table-column> -->
<el-table-column
align="center"
type="index"
label="编号"
width="50">
</el-table-column>
<el-table-column
align="center"
prop="protocolName"
label="协议名称"
width="400"
>
</el-table-column>
<el-table-column
align="center"
prop="signNum"
label="签署数量"
width="120"
>
</el-table-column>
<!-- <el-table-column
align="center"
prop="protocolType"
label="协议类型"
>
</el-table-column> -->
<!-- <el-table-column
align="center"
prop="versionNo"
label="协议版本"
>
</el-table-column> -->
<el-table-column
align="center"
prop="createdName"
label="创建人姓名"
width="120"
>
</el-table-column>
<!-- <el-table-column
align="center"
prop="creatTime"
label="创建时间"
>
<template slot-scope="scope">
{{ returnSendTime(scope.row.creatTime) }}
</template>
</el-table-column> -->
<el-table-column
align="center"
label="最近更新时间"
prop="updateTime"
width="160"
>
<!-- <template slot-scope="scope">
{{ returnSendTime(scope.row.updateTime) }}
</template> -->
</el-table-column>
<el-table-column fixed="right" label="操作" min-width="200" align="center">
<template slot-scope="scope">
<el-button
@click="gotoDetail(scope.row, 0)"
type="primary"
size="small"
>查看详情</el-button>
<el-button
@click="gotoUpdate(scope.row, 0)"
type="primary"
size="small"
>更新版本</el-button>
<el-button
@click="gotoHistoryList(scope.row, 0)"
type="primary"
size="small"
>历史版本</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="formData.pageNo"
:page-sizes="[10, 30, 50, 100]"
:page-size="formData.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows">
</el-pagination>
</div>
</div>
</div>
</div>
</template>
<script>
import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "../../components/breadcrumb.vue";
export default {
components: {
BreadCrumb,
},
data() {
return {
curmbFirst: "协议管理",
formData: {
all: 1,
protocolName: '',
protocolType: 5,
pageNo: 1,
pageSize: 10,
},
totalRows: 0,
tableData: [{}],
}
},
created() {
this.getProtocolList({
all: 1,
protocolType: 5
});
},
methods: {
// 跳转到详情页面(预览页面)
gotoDetail(row) {
this.$router.push({
path: '/protocol-detail',
query: {
protocolId: row.protocolId
}
})
},
// 跳转到添加或修改页面
gotoUpdate(row) {
this.$router.push({
path: '/create-protocol',
query: {
protocolId: row.protocolId
}
})
},
// 跳转到历史版本页面
gotoHistoryList(row) {
this.$router.push({
path: '/protocol-history',
query: {
protocolId: row.protocolId
}
})
},
// 获取协议列表
getProtocolList(params) {
openLoading(this);
this.GET("/smartcontract/protocolManage/protocols", params).then(res => {
closeLoading(this);
if(res && res.code && res.code == '000000'){
if( res && res.data ){
this.tableData = res.data;
// this.totalRows = res.data.total || 0;
// this.tableData = res.data.list || [];
}
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
});
},
handleSearchClick() {
console.log(this.formData);
this.getProtocolList(this.formData);
},
handleSizeChange(val){
this.formData.pageSize = val;
this.getSMSList();
},
handleCurrentChange(val) {
this.formData.pageNo = val;
this.getSMSList();
},
returnSendTime(creatTime){
if( creatTime ){
return creatTime.year + '-' + creatTime.monthValue + '-' + creatTime.dayOfMonth + ' ' + creatTime.hour + ':' + creatTime.minute ;
}else{
return '-';
}
},
}
}
</script>
<style lang="scss">
.msg-history-wrap{
.el-form-item .el-form-item__label{
font-size: 14px;
}
.component-content{
margin-top: 60px;
padding: 10px;
background: #fff;
}
.pagination{
margin: 20px 0;
text-align: right;
}
.status-tj{
&.success{
color: #409EFF;
}
}
}
</style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册