提交 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>
<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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册