提交 5815812f 编写于 作者: huangwensu's avatar huangwensu

添加常量文件

上级 69271794
/**
* 常量定义文件
*
*/
// 分页大小
export const PAGE_SIZE = 10
// 添加动作常量
export const ACTION_TYPE_ADD = 'ACTION_TYPE_ADD'
// 修改动作常量
export const ACTION_TYPE_UPDATE = 'ACTION_TYPE_UPDATE'
// 删除动作常量
export const ACTION_TYPE_DELETE = 'ACTION_TYPE_DELETE'
/* 是否使用Mock数据 */
export const IS_MOCK_DATAS = true
// 通用状态 全部/正常/停用
export const COMMON_STATUS_OPTIONS = [
{
value: '',
label: '启用状态'
}, {
value: 0,
label: '正常'
}, {
value: 1,
label: '停用'
}
]
// 识别状态 全部/未标记/正常/误识
export const RECORD_STATUS_OPTIONS = [
{
value: '',
label: '标记状态'
}, {
value: '0',
label: '未标记'
}, {
value: '1',
label: '正常'
}, {
value: '2',
label: '误识'
}
]
// 用户类型 全部/普通用户/VIP/黑名单
export const USER_TYPE_OPTIONS = [
{
value: '',
label: '用户类型'
}, {
value: 1,
label: '普通用户'
}, {
value: 2,
label: 'VIP'
}, {
value: 3,
label: '黑名单'
}
]
import { formatTime } from './index'
const vueFilter = { const vueFilter = {
liveDateFilter: (value) => {
// 将数字转换成带千分位数字 if (!value) return '';
formatNumber: function (num, precision, separator) { return new Date(value).format("yyyy-MM-dd hh:mm:ss");
var parts; },
if (!isNaN(parseFloat(num)) && isFinite(num)) { liveFilter: (value) => {
num = Number(num); if(value.liveStatus == 1){
num = (typeof precision !== 'undefined' ? num.toFixed(precision) : num).toString(); return '未开始'
parts = num.split('.'); } else if(value.liveStatus == 5) {
parts[0] = parts[0].toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1' + (separator || ',')); return '直播中'
return parts.join('.'); }else if(value.liveStatus == 10 && value.lookBackStatus == 2){
} return '已结束(不可回看)'
return ''; }else if(value.liveStatus == 10 && value.lookBackStatus == 1) {
}, return '已结束(可回看)'
}
// 将数字转换成带千分位数字 },
yLocalString: function (value) { liveStatusFilter: (value) => {
var b = parseInt(value).toString(); if(value == 1) return "隐藏"
if (b === 'NaN') return 0; else return "发布"
var len = b.length; },
if (len <= 3) { return b; } liveTeacherType: (value) => {
var r = len % 3; let doctorName = []
return r > 0 ? b.slice(0, r) + "," + b.slice(r, len).match(/\d{3}/g).join(",") : b.slice(r, len).match(/\d{3}/g).join(","); if(value.length > 3) {
for(let i = 0; i < 3; i++) {
doctorName.push(value[i].doctorName)
}
return doctorName.join("、") + '...'
}else{
for(let i = 0; i < value.length; i++) {
doctorName.push(value[i].doctorName)
}
return doctorName.join("、")
}
},
controlType: (value) => {
if(value == 1) {
return '分页1'
}else if(value == 2) {
return '分页2'
}else if(value == 3) {
return '图片1'
}else if(value == 4) {
return '图片2'
}else if(value == 6) {
return '视频'
}
},
tabControlType: (value) => {
if(value == 3) {
return '图片1'
}else if(value == 4) {
return '图片2'
}else if(value == 6) {
return '视频'
}
},
refreshType: (value) => {
if(value == 1) return "支持"
else return "不支持"
},
moudleType: (value) => {
if(value == 1) return "未激活"
else return "激活"
},
dateFilter: (value) => {
if (!value) return '';
return new Date(value).format("yyyy-MM-dd hh:mm");
},
appColumnStatusFilter: (value) => {
if(value == 1) return "未提交"
else if(value == 4) return "已提交"
}, },
statusFilter: (value) => {
if(value == 1) return "已创建"
else if(value == 5) return "已发布"
else return "已下架"
},
linkTypeFilter: (value) => { // 跳转类型
if(value == 1) return '链接'
else if(value == 4) return '模块'
else return '无跳转'
},
teacherStatusFilter: (value) => {
if(value == 1) return "已下架"
else return "已发布"
},
moduleTypeFilter: (value,data) => { // 模块类型
for(let key in data) {
if(value == key) {
return data[key]
}
}
},
contentCreatedType: (value,data) => {
for(let i = 0; i< data.length;i++) {
if(value == data[i].id) {
return data[i].name
}
}
shortName: function(value, length) { },
if(value && value.length > length){ contentModifiedType: (value,data) => {
return value.substring(0, length - 1) + '...' for(var i=0; i < data.length;i++) {
} else { if(value == data[i].id) {
return value return data[i].name
} }
}
},
columnPageType: (value,data) => { // 页面类型
for(let key in data) {
if(value == key) {
return data[key]
}
}
},
columnPositionType: (value,data) => { // 位置
for(let key in data) {
if(value == key) {
return data[key]
}
}
},
columnCreatedType: (value,data) => { // 创建人
for(let i = 0;i < data.length; i++) {
if(value == data[i].id) {
return data[i].name
}
}
},
columnSubmitedType: (value,data) => { // 提交人
for(let i = 0;i < data.length; i++) {
if(value == data[i].id) {
return data[i].name
}
}
} }
} }
export default vueFilter
export default vueFilter \ No newline at end of file
...@@ -566,8 +566,9 @@ export default { ...@@ -566,8 +566,9 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.create-component-wrap { .create-component-wrap {
background: #fff;
.first-step { .first-step {
margin-top: 20px; padding-top: 20px;
.el-form-item { .el-form-item {
margin-bottom: 25px; margin-bottom: 25px;
} }
...@@ -598,8 +599,9 @@ export default { ...@@ -598,8 +599,9 @@ export default {
.step-content { .step-content {
overflow: hidden; overflow: hidden;
height: 60px; height: 60px;
margin-top: 50px; margin-top: 66px;
border-bottom: 1px solid #efefef; border-bottom: 1px solid #efefef;
background: #fff;
.el-step.is-simple .el-step__head { .el-step.is-simple .el-step__head {
display: none; display: none;
} }
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb> <bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="message-content"> <div class="message-content">
<el-row> <el-row>
<el-col :span="24"> <el-col class="visitor" :span="24">
<div class="visitor-title"> <div class="visitor-title">
<div class="title">今日随访:10人</div> <div class="title">今日随访:<span style="color:#449284;">10人</span></div>
<div class="visitor-more" @click="lookMore">查看更多<i class="el-icon-arrow-right"></i></div> <span class="visitor-more" @click="lookMore">查看更多</span>
</div> </div>
<div class="visitor-info"> <div class="visitor-info">
<el-table <el-table
...@@ -19,12 +19,14 @@ ...@@ -19,12 +19,14 @@
</el-table> </el-table>
</div> </div>
</el-col> </el-col>
<el-col :span="24"> <el-col class="message" :span="24">
<div class="message-title">系统消息 <span>今日消息:3条</span></div> <div class="message-title">系统消息 <span>今日消息:3条</span></div>
<div class="message-info"> <div class="message-info">
<div class="message-item" v-for="(item,index) in messageList" :key="index"> <div class="message-item" v-for="(item,index) in messageList" :key="index">
<div class="text-top"> <div class="text-top">
<i class="el-icon-message"></i> <i class="el-icon-error" v-if="item.type == 2" style="color:#FA5555"></i>
<i class="el-icon-success" v-if="item.type == 3" style="color:#67C23A"></i>
<i class="el-icon-warning" v-if="item.type == 1" style="color:#FAAD14"></i>
<span>{{item.status}}</span> <span>{{item.status}}</span>
<span>{{item.date}}</span> <span>{{item.date}}</span>
</div> </div>
...@@ -67,10 +69,17 @@ export default { ...@@ -67,10 +69,17 @@ export default {
], ],
messageList:[{ messageList:[{
status: '审核提醒', status: '审核提醒',
type: 1,
date: '2019-01-02', date: '2019-01-02',
info: '王小波创建了"浙江省2019高血压第一季度考试"项目,提醒您审核。' info: '王小波创建了"浙江省2019高血压第一季度考试"项目,提醒您审核。'
},{ },{
status: '审核提醒', status: '审核未通过',
type: 2,
date: '2019-01-02',
info: '王小波创建了"浙江省2019高血压第一季度考试"项目,提醒您审核。'
},{
status: '审核通过',
type: 3,
date: '2019-01-02', date: '2019-01-02',
info: '王小波创建了"浙江省2019高血压第一季度考试"项目,提醒您审核。' info: '王小波创建了"浙江省2019高血压第一季度考试"项目,提醒您审核。'
}] }]
...@@ -89,51 +98,70 @@ export default { ...@@ -89,51 +98,70 @@ export default {
.message-content { .message-content {
margin-top: 50px; margin-top: 50px;
padding:20px; padding:20px;
.visitor-title { .visitor {
height: 80px; padding: 0 25px 30px;
line-height: 80px; margin-top: 20px;
margin-right: 20px; background: #fff;
.title { .visitor-title {
float: left; height: 80px;
font-size: 18px; line-height: 80px;
margin-right: 20px;
text-align: right;
.title {
float: left;
font-size: 20px;
}
.visitor-more {
font-size: 12px;
color: #449284;
border: 1px solid rgba(68,146,132,0.3);
padding: 5px 14px;
border-radius: 3px;
background: rgba(68,146,132,0.06);
}
} }
.visitor-more { .visitor-info {
float: right; margin-right: 20px;
font-size: 12px;
color: #999;
} }
} }
.visitor-info { .message {
margin-right: 20px; padding: 0 25px 30px;
border: 1px solid #DDDCE0; margin-top: 20px;
} background: #fff;
.message-title { .message-title {
height: 80px; font-size: 20px;
line-height: 80px; height: 80px;
} line-height: 80px;
.message-info { span {
padding: 7px; font-size: 14px;
border: 1px solid #DDDCE0; color: #717377;
.message-item { margin-left: 8px;
padding: 10px; }
border: 1px solid #efefef; }
.text-top { .message-info {
span:nth-child(2) { padding: 7px;
padding: 10px; .message-item {
padding: 10px 10px 15px;
border-bottom: 1px solid #EBEEF5;
.text-top {
span:nth-child(2) {
padding: 10px;
}
span:nth-child(3) {
font-size: 12px;
color: #999;
}
} }
span:nth-child(3) { .text-bottom {
font-size: 12px; font-size: 14px;
color: #999; color: #666;
margin-top: 15px;
} }
} }
.text-bottom {
font-size: 14px;
color: #666;
margin-top: 15px;
}
} }
} }
} }
} }
</style> </style>
......
...@@ -8,15 +8,17 @@ ...@@ -8,15 +8,17 @@
<el-dropdown trigger="click" @command="handleCommand"> <el-dropdown trigger="click" @command="handleCommand">
<div class="el-dropdown-link"> <div class="el-dropdown-link">
<img class="user-logo" src="../../assets/image/img.jpg"> <img class="user-logo" src="../../assets/image/img.jpg">
<span id="headName">{{name}}</span><i class="el-icon-arrow-down el-icon--right"></i> <span id="headName">{{name}}</span><i class="el-icon-caret-bottom"></i>
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="logout">退出</el-dropdown-item> <!-- <el-dropdown-item command="logout">退出</el-dropdown-item> -->
<el-dropdown-item command="logout">注销</el-dropdown-item>
<el-dropdown-item @click="forward">返回云鹊医首页</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
<!--导航--> <!--导航-->
<div class="user-info" style="padding-right:10px;"> <!-- <div class="user-info" style="padding-right:10px;">
<el-dropdown trigger="click" @command="handleCommand"> <el-dropdown trigger="click" @command="handleCommand">
<div> <div>
<span class="el-dropdown-link">返回云鹊医首页</span> <span class="el-dropdown-link">返回云鹊医首页</span>
...@@ -28,7 +30,7 @@ ...@@ -28,7 +30,7 @@
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div> -->
</div> </div>
</template> </template>
<script> <script>
...@@ -98,10 +100,10 @@ export default { ...@@ -98,10 +100,10 @@ export default {
} }
.user-logo { .user-logo {
position: absolute; position: absolute;
left: 0; left: 16px;
top: 15px; top: 20px;
width: 40px; width: 24px;
height: 40px; height: 24px;
border-radius: 50%; border-radius: 50%;
} }
.el-icon--right, #headName,.line, #login-out{ .el-icon--right, #headName,.line, #login-out{
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册