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

views

上级 7ebe0123
......@@ -2,15 +2,15 @@
<html>
<head>
<meta charset="utf-8">
<meta content="云鹊医,云鹊健康,消息中心,项目管理,教培项目,学情报告,随访管理,预约随访" name="keywords">
<meta content="消息中心。" name="description">
<meta content="云鹊医,云鹊健康,协议管理,项目管理,教培项目,学情报告,随访管理,预约随访" name="keywords">
<meta content="协议管理" name="description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui">
<meta name="screen-orientation" content="portrait"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<meta name="full-screen" content="yes">
<meta name="x5-fullscreen" content="true">
<title>消息中心</title>
<title>协议管理</title>
</head>
<body id="appBody">
<div id="app">
......@@ -18,7 +18,7 @@
</div>
<script src="https://unpkg.com/qiniu-js@2.2.0/dist/qiniu.min.js"></script>
<!-- <script src="https://cdn.ckeditor.com/ckeditor5/12.4.0/standard/ckeditor.js"></script> -->
<!-- <script src="https://cdn.ckeditor.com/4.13.0/standard/ckeditor.js"></script> -->
<script src="https://cdn.ckeditor.com/4.13.0/full/ckeditor.js"></script>
<script src="https://cdn.ckeditor.com/4.13.0/standard/ckeditor.js"></script>
<!-- <script src="https://cdn.ckeditor.com/4.13.0/full/ckeditor.js"></script> -->
</body>
</html>
......@@ -154,6 +154,15 @@ module.exports = {
})
},
// 通用GET请求
PUT(api, para, callback,str) {
return fetch({
url: getBaseUrl(api),
method: 'put',
data: para
})
},
// 通用DELETE请求
DELETE(api, para, callback,str) {
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
......
......@@ -2,7 +2,7 @@
<div class="header-container">
<div class="logo">
<img src="../../assets/image/index_logoicon.png"/>
<p>消息中心</p>
<p>协议管理</p>
</div>
<div class="user-info">
<el-dropdown trigger="click" @command="handleCommand">
......
......@@ -90,20 +90,20 @@ export default {
vm = this;
},
watch: {
authList(newVal, oldVal) {
if (!newVal.P001) {
// 项目管理
vm.items[1].subs[1].index = "blank";
}
if (!newVal.P002) {
// 组件管理
vm.items[1].subs[0].index = "blank";
}
if (!newVal.P003) {
// 角色管理
vm.items[2].subs[0].index = "blank";
}
}
// authList(newVal, oldVal) {
// if (!newVal.P001) {
// // 项目管理
// vm.items[1].subs[1].index = "blank";
// }
// if (!newVal.P002) {
// // 组件管理
// vm.items[1].subs[0].index = "blank";
// }
// if (!newVal.P003) {
// // 角色管理
// vm.items[2].subs[0].index = "blank";
// }
// }
},
methods: {}
};
......
此差异已折叠。
<template>
<div class="create-protocol">
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<!-- <div class="header-title"></div> -->
<el-form
:model="ruleForm"
ref="ruleForm"
label-width="100px"
class="ruleForm"
>
<el-form-item>
<el-button size="small" class="user-choose-submit right" style="margin-left:20px;" type="default" @click="goBack()">返回</el-button>
</el-form-item>
<el-form-item label="协议标题" >
{{ruleForm.protocolName}}
</el-form-item>
<el-form-item label="协议内容">
<div v-html="ruleForm.content"></div>
<!-- <textarea v-model="ruleForm.content" id="detailEditor">
</textarea> -->
</el-form-item>
<el-form-item label="签署居民数量">
{{ruleForm.signNum}}
</el-form-item>
<el-form-item label="创建人">
{{ruleForm.createdName}}
</el-form-item>
<el-form-item label="创建时间">
{{ruleForm.createTime}}
</el-form-item>
</el-form>
</div>
</div>
</template>
<script>
import BreadCrumb from "../../components/breadcrumb.vue";
import { openLoading, closeLoading } from "../../utils/utils";
let detailEditor = null;
let vm = null;
export default {
components: {
BreadCrumb
},
data() {
return {
curmbFirst: '查看协议',
ruleForm: {
protocolName: '',
content: '',
signNum: '',
createdName: '',
createTime: '',
},
isUpdate: false,
protocolId: 0
};
},
computed: {
// ...mapGetters(['_token'])
},
created() {
vm = this;
this.isUpdate = this.$route.query && this.$route.query.isUpdate || this.isUpdate;
this.protocolId = this.$route.query && this.$route.query.protocolId || 0;
// vm.idType = localStorage.getItem("storageIdType");
// console.log("idType:", vm.idType);
},
// 挂载到Dom完成时
mounted: function() {
vm.getProtocolDetailById(vm.protocolId);
// commonUtil.resizeHeight();
// CKEDITOR.replace( 'detailEditor' );
// if(this.isUpdate) { // 只在修改时监听富文本的Ready事件
// CKEDITOR.on('instanceReady', function (event) {
// detailEditor = event.editor;
// detailEditor.execCommand("toolbarCollapse");
// detailEditor.setReadOnly(true); //只读
// // 获取数据
// vm.getProtocolDetailById(vm.protocolId);
// });
// }
},
methods: {
// 根据协议ID获取协议详情
getProtocolDetailById(protocolId) {
vm.GET("/smartcontract/protocolManage/protocol", {protocolId: protocolId}).then(res => {
if(res && res.code && res.code == '000000'){
if( res && res.data ){
vm.ruleForm.protocolName = res.data.protocolName;
vm.ruleForm.content = res.data.contents;
vm.ruleForm.signNum = res.data.signNum;
vm.ruleForm.createdName = res.data.createdName;
vm.ruleForm.createTime = res.data.createTime;
detailEditor.setData(res.data.contents);
}
}else{
vm.$message({
message: '接口请求失败',
type: 'warning'
});
}
});
},
goBack() {
this.$router.push({
path: '/protocol-list'
})
}
},
};
</script>
<style lang="scss">
.topIndex{
z-index: 10000 !important;
}
.create-protocol {
.component-content {
margin-top: 80px;
padding: 10px;
background: #fff;
.header-title {
padding: 10px 12px;
font-size: 12px;
color: #449284;
border-bottom: 1px solid #efefef;
}
.ruleForm {
width: 70%;
margin-left: 50px;
}
.rule-form {
margin-top: 20px;
margin-left: 30px;
.el-form-item__content {
font-size: 12px;
}
}
.update-input {
width: 200px;
}
.update-item {
/* float: left; */
margin-right: 5px;
}
.el-upload__tip {
// margin-top: -10px;
// margin-left: 205px;
margin-top: -40px;
margin-left: 290px;
cursor: pointer;
width: 60px;
color: #449284;
}
.tip-text {
margin-top: -40px;
margin-left: 380px;
width: 260px;
color: red;
}
.el-upload-list {
display: none;
}
.table-empty {
img {
width: 100px;
}
p {
margin-top: -50px;
}
}
.user-select{
display: inline-block;
height: auto;
padding: 5px 10px;
border: 1px solid #ccc;
border-radius: 4px;
.select-btn{
display: inline-block;
font-size: 14px;
padding: 5px;
border-radius: 4px;
background: #449284 !important;
border: 1px solid #449284 !important;
color: #FFF;
cursor: pointer;
}
.numbers{
font-size: 14px;
margin-left: 10px;
display: inline-block;
.choosed{
color: #449284;
}
}
}
.user-choose-modal{
.el-form-item__label{
width: 120px;
font-size: 14px;
}
.select-choose{
width: 150px;
}
.block-item{
display: block;
}
.user-number{
margin: 40px auto 0;
text-align: center;
width: 70%;
height:34px;
line-height: 34px;
border-radius: 4px;
border: 1px solid #DCDFE6;
.title{
display: inline-block;
}
.number{
display: inline-block;
margin-left: 50px;
.target-num{
padding: 7px;
}
.choosed{
color: #449284;
}
}
}
.click-refresh-tips{
text-align: center;
margin: 5px auto 20px;
height: 20px;
color: #e6a23c;
}
.user-choose-submit{
margin: 0 auto;
display: block;
}
}
}
}
.valid-content {
color:#F56C6C;
font-size: 12px;
line-height: 26px;
}
</style>
\ 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>
......@@ -2,7 +2,7 @@
<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;">
<!-- <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;">
......@@ -12,8 +12,21 @@
</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-button class="right" type="primary" size="small" @click="goBack">返回</el-button>
</el-col>
</el-row>
</el-form> -->
<el-form ref="formData" :inline="true" :model="formData" class="demo-form-inline" style="padding: 10px 30px 10px 40px;">
<el-form-item label="协议名称" prop="protocolName">
<el-input size="small" v-model="formData.protocolName" placeholder="请输入协议名称"></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="handleSearchClick">查询</el-button>
</el-form-item>
<el-form-item class="right" >
<el-button type="primary" size="small" @click="goBack()">返回</el-button>
</el-form-item>
</el-form>
<div style="padding: 0 40px;">
......@@ -21,16 +34,15 @@
: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="protocolType"
label="编号"
width="50">
</el-table-column>
......@@ -67,25 +79,19 @@
width="120"
>
</el-table-column>
<!-- <el-table-column
<el-table-column
align="center"
prop="creatTime"
prop="createTime"
label="创建时间"
>
<template slot-scope="scope">
{{ returnSendTime(scope.row.creatTime) }}
</template>
</el-table-column> -->
<el-table-column
</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> -->
<el-table-column fixed="right" label="操作" min-width="200" align="center">
<template slot-scope="scope">
......@@ -94,16 +100,6 @@
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>
......@@ -120,7 +116,6 @@
</el-pagination>
</div>
</div>
</div>
</div>
</template>
......@@ -137,7 +132,7 @@
formData: {
all: 1,
protocolName: '',
protocolType: 5,
protocolType: '5',
pageNo: 1,
pageSize: 10,
},
......@@ -146,27 +141,52 @@
}
},
created() {
this.getProtocolList({
all: 1,
protocolType: 5
});
this.formData.protocolType = this.$route.query.protocolType || 1;
this.getProtocolList(this.formData);
},
mounted() {
// StandardEditor
// .create( document.querySelector( '#editor' ) )
// .catch( error => {
// console.error( error );
// });
// https://cdn.ckeditor.com/
},
methods: {
// 返回到列表页面
goBack() {
this.$router.push({
path: '/protocol-list'
})
},
// 跳转到详情页面(预览页面)
gotoDetail(row) {
this.$router.push({
path: '/protocol-detail',
query: {
isUpdate: true,
protocolId: row.protocolId
}
})
},
// 跳转到添加或修改页面
gotoAdd() {
this.$router.push({
path: '/create-protocol',
query: {
isUpdate: false
}
})
},
// 跳转到添加或修改页面
gotoUpdate(row) {
this.$router.push({
path: '/create-protocol',
query: {
isUpdate: true,
protocolId: row.protocolId
}
})
......@@ -207,11 +227,11 @@
},
handleSizeChange(val){
this.formData.pageSize = val;
this.getSMSList();
this.getProtocolList(this.formData);
},
handleCurrentChange(val) {
this.formData.pageNo = val;
this.getSMSList();
this.getProtocolList(this.formData);
},
returnSendTime(creatTime){
if( creatTime ){
......@@ -219,8 +239,8 @@
}else{
return '-';
}
}
},
},
}
}
</script>
<style lang="scss">
......
......@@ -2,7 +2,7 @@
<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;">
<!-- <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;">
......@@ -12,10 +12,23 @@
</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-button class="right" type="primary" size="small" @click="gotoAdd()">新建协议</el-button>
</el-col>
</el-row>
</el-form>
</el-form> -->
<el-form ref="formData" :inline="true" :model="formData" class="demo-form-inline" style="padding: 10px 30px 10px 40px;">
<el-form-item label="协议名称" prop="protocolName">
<el-input size="small" v-model="formData.protocolName" placeholder="请输入协议名称"></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="handleSearchClick">查询</el-button>
</el-form-item>
<el-form-item class="right" >
<el-button type="primary" size="small" @click="gotoAdd()">新建协议</el-button>
</el-form-item>
</el-form>
<div style="padding: 0 40px;">
<el-table
:data="tableData"
......@@ -23,14 +36,13 @@
style="width: 100%;">
<!-- <el-table-column
align="center"
prop="mobile"
type="index"
label="编号"
width="60"
>
</el-table-column> -->
width="50">
</el-table-column> -->
<el-table-column
align="center"
type="index"
prop="protocolType"
label="编号"
width="50">
</el-table-column>
......@@ -120,9 +132,6 @@
</el-pagination>
</div>
</div>
<textarea name="content" id="editor">
&lt;p&gt;This is some sample content.&lt;/p&gt;
</textarea>
</div>
</div>
</template>
......@@ -137,9 +146,8 @@
return {
curmbFirst: "协议管理",
formData: {
all: 1,
all: 2,
protocolName: '',
protocolType: 5,
pageNo: 1,
pageSize: 10,
},
......@@ -148,10 +156,7 @@
}
},
created() {
this.getProtocolList({
all: 1,
protocolType: 5
});
this.getProtocolList(this.formData);
},
mounted() {
// StandardEditor
......@@ -159,7 +164,6 @@
// .catch( error => {
// console.error( error );
// });
CKEDITOR.replace( 'editor' );
// https://cdn.ckeditor.com/
},
......@@ -169,16 +173,28 @@
this.$router.push({
path: '/protocol-detail',
query: {
isUpdate: true,
protocolId: row.protocolId
}
})
},
// 跳转到添加或修改页面
gotoAdd() {
this.$router.push({
path: '/create-protocol',
query: {
isUpdate: false
}
})
},
// 跳转到添加或修改页面
gotoUpdate(row) {
this.$router.push({
path: '/create-protocol',
query: {
isUpdate: true,
protocolId: row.protocolId
}
})
......@@ -189,7 +205,8 @@
this.$router.push({
path: '/protocol-history',
query: {
protocolId: row.protocolId
protocolId: row.protocolId,
protocolType: row.protocolType
}
})
},
......@@ -219,11 +236,11 @@
},
handleSizeChange(val){
this.formData.pageSize = val;
this.getSMSList();
this.getProtocolList(this.formData);
},
handleCurrentChange(val) {
this.formData.pageNo = val;
this.getSMSList();
this.getProtocolList(this.formData);
},
returnSendTime(creatTime){
if( creatTime ){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册