xjc %!s(int64=3) %!d(string=hai) anos
pai
achega
c9929a811e
Modificáronse 2 ficheiros con 236 adicións e 200 borrados
  1. 216 192
      src/style/home.scss
  2. 20 8
      src/views/comments/consult.vue

+ 216 - 192
src/style/home.scss

@@ -1,240 +1,264 @@
 @import 'style';
 @import 'base';
 $height: 50px;
-.el-header{
-	padding: 0;
+.el-header {
+    padding: 0;
 }
+
 .header {
-	background: #151932;
-	color: #fff;
-	height: 60px !important;
-	font-size-adjust: 20px;
-	line-height: 60px;
-	font-weight: bolder;
-	padding: 0 24px;
-	.logout{
-		float: right;
-	}
+    background: #151932;
+    color: #fff;
+    height: 60px !important;
+    font-size-adjust: 20px;
+    line-height: 60px;
+    font-weight: bolder;
+    padding: 0 24px;
+    .logout {
+        float: right;
+    }
 }
 
 .main {
-	position: relative;
-	height: calc(100vh - 60px);
-	background: #F4F4F4;
-	// padding-top: 10px;
+    position: relative;
+    height: calc(100vh - 60px);
+    background: #F4F4F4;
+    // padding-top: 10px;
 }
+
 .left-aside {
-	height: 100%;
-	overflow-y: auto;
-	overflow-x: hidden;
-	background: #151932;
-	.left-menue {
-		border: none;
-		& > .is-active {
-			background-color: rgba(255,81,81,.2) !important;
-			position: relative;
-			border-left: 8px solid #FF5151;
-			transition: all .3s linear;
-			.iconfont{
-				color: #ffffff;
-			}	
-			&>.el-submenu__title{
-				color: #ffffff !important;
-			}
-			.is-active {
-				background-color: rgba(255,81,81,.2) !important;
-				border-left: 8px solid #FF5151;
-				transition: all .3s linear;
-				position: relative;
-				.iconfont{
-					color: #ffffff;
-				}		
-			}	
-		}
-		.is-opened{
-			background-color: #fff !important;
-			border-left: none !important;
-			&>.el-submenu__title{
-				color: #fff !important;
-				
-			}
-		}
-		.el-menu-item-group__title{
-			padding: 0;
-		}
-		.child{
-			padding-left: 60px !important;
-		}
-		.el-menu-item, .el-submenu__title{
-			height: 48px;
-			line-height: 48px;
-			font-size: 15px;
-		}
-		// .el-menu-item{
-		// 	height: 44px;
-		// 	line-height: 44px;
-		// }
-	}
-	.iconfont{
-		margin-right: 5px;
-	}
+    height: 100%;
+    overflow-y: auto;
+    overflow-x: hidden;
+    background: #151932;
+    .left-menue {
+        border: none;
+        &>.is-active {
+            background-color: rgba(255, 81, 81, .2) !important;
+            position: relative;
+            border-left: 8px solid #FF5151;
+            transition: all .3s linear;
+            .iconfont {
+                color: #ffffff;
+            }
+            &>.el-submenu__title {
+                color: #ffffff !important;
+            }
+            .is-active {
+                background-color: rgba(255, 81, 81, .2) !important;
+                border-left: 8px solid #FF5151;
+                transition: all .3s linear;
+                position: relative;
+                .iconfont {
+                    color: #ffffff;
+                }
+            }
+        }
+        .is-opened {
+            background-color: #fff !important;
+            border-left: none !important;
+            &>.el-submenu__title {
+                color: #fff !important;
+            }
+        }
+        .el-menu-item-group__title {
+            padding: 0;
+        }
+        .child {
+            padding-left: 60px !important;
+        }
+        .el-menu-item,
+        .el-submenu__title {
+            height: 48px;
+            line-height: 48px;
+            font-size: 15px;
+        }
+        // .el-menu-item{
+        // 	height: 44px;
+        // 	line-height: 44px;
+        // }
+    }
+    .iconfont {
+        margin-right: 5px;
+    }
 }
 
 .el-main {
-	// border: 1px solid red;
-	padding:20px 20px;
-	position: relative;
-	// overflow:hidden;
-	section>p{
-		color:#666666;
-		font-size:14px;
-		font-weight: 400;
-		span{
-			color:#cccccc;
-		}
-	}
-	.content{
-		background: #fff;
-		padding: 20px !important;
-		margin: 0 !important;
-		height: calc(100vh - 100px);
-		box-shadow:0px 4px 12px 0px rgba(0,0,0,0.12);
-		// overflow:scroll;
-		&>h1{
-			font-size: 24px;
-			color: #222;
-		}
-	}
-	.title_top{
-		
-		.add_btn{
-			width:90px;
-			height:32px;
-			background:$mainColor;
-			border:1px solid rgba(237,237,237,1);
-			border-radius:4px;
-			float: right;
-			text-align: center;
-			line-height: 32px;
-			color: #FFF;
-		}
-	}
-
-    .table{
+    // border: 1px solid red;
+    padding: 20px 20px;
+    position: relative;
+    // overflow:hidden;
+    section>p {
+        color: #666666;
+        font-size: 14px;
+        font-weight: 400;
+        span {
+            color: #cccccc;
+        }
+    }
+    .content {
+        background: #ccc;
+        padding: 20px !important;
+        margin: 0 !important;
+        height: calc(100vh - 100px);
+        box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.12);
+        // overflow:scroll;
+        &>h1 {
+            font-size: 24px;
+            color: #222;
+        }
+    }
+    .title_top {
+        .add_btn {
+            width: 90px;
+            height: 32px;
+            background: $mainColor;
+            border: 1px solid rgba(237, 237, 237, 1);
+            border-radius: 4px;
+            float: right;
+            text-align: center;
+            line-height: 32px;
+            color: #FFF;
+        }
+    }
+    .table {
         background: #fff;
         // border: 1px solid #EDEDED;
-		// min-height: calc(100vh - 430px);
-		// height:calc(100vh - 350px);
+        // min-height: calc(100vh - 430px);
+        // height:calc(100vh - 350px);
     }
-    .edit_btn{
+    .edit_btn {
         color: #25486A;
-	}
-	.info_btn{
-		background: #ECF0F5;
-		color: #1F2328;
-		border-color: #ECF0F5;
-	}
-	// 分页
-	.el-pagination {
-		// position: absolute;
-		// left: 0;
-		// bottom: 15px;
-		text-align: right;
-		width: 100%;
-		margin-top: 20px;
-	}
-}
-.el-dialog{
-	.el-select{display: block;}
-}
-.main_btn{
-	background: $mainColor;
-	border-color: $mainColor;
-	width: 120px;
-	font-size: 14px;
-}
-.cancel_btn{
-	width: 170px;
-	font-size: 14px;
-	color: #6A737B;
+    }
+    .info_btn {
+        background: #ECF0F5;
+        color: #1F2328;
+        border-color: #ECF0F5;
+    }
+    // 分页
+    .el-pagination {
+        // position: absolute;
+        // left: 0;
+        // bottom: 15px;
+        text-align: right;
+        width: 100%;
+        margin-top: 20px;
+    }
+}
+
+.el-dialog {
+    .el-select {
+        display: block;
+    }
+}
+
+.main_btn {
+    background: $mainColor;
+    border-color: $mainColor;
+    width: 120px;
+    font-size: 14px;
+}
+
+.cancel_btn {
+    width: 170px;
+    font-size: 14px;
+    color: #6A737B;
 }
+
 // 表头
-thead{
-	tr th{
-		background-color: #F2F2F2 !important;
-		padding: 8px 0 !important;
-	}
+thead {
+    tr th {
+        background-color: #F2F2F2 !important;
+        padding: 8px 0 !important;
+    }
 }
-tbody{
-	tr td{
-		padding: 4px 0 !important;
-	}
+
+tbody {
+    tr td {
+        padding: 4px 0 !important;
+    }
 }
 
-.edit{
-	color: rgb(0, 128, 0);
+.edit {
+    color: rgb(0, 128, 0);
 }
-.del{
-	color: #F01010;
+
+.del {
+    color: #F01010;
 }
-.logout:hover{
-	cursor: pointer;
+
+.logout:hover {
+    cursor: pointer;
 }
-.upload_btn{
-	position: relative;
-	input{
-		position: absolute;
-		width: 100%;
-		left: 0;
-		opacity: 0;
-	}
+
+.upload_btn {
+    position: relative;
+    input {
+        position: absolute;
+        width: 100%;
+        left: 0;
+        opacity: 0;
+    }
 }
+
 // 内容区域滚动
-.el-form.over_y{
+.el-form.over_y {
     max-height: calc( 100vh - 290px);
-    padding:0 10px;
-    overflow-y:auto;
-    &::-webkit-scrollbar {/*滚动条整体样式*/
-        width:4px;/*高宽分别对应横竖滚动条的尺寸*/
-        height:4px;
+    padding: 0 10px;
+    overflow-y: auto;
+    &::-webkit-scrollbar {
+        /*滚动条整体样式*/
+        width: 4px;
+        /*高宽分别对应横竖滚动条的尺寸*/
+        height: 4px;
     }
-    &::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
-        border-radius:5px;
-        -webkit-box-shadow: inset005pxrgba(0,0,0,0.2);
-        background:rgba(0,0,0,0.2);
+    &::-webkit-scrollbar-thumb {
+        /*滚动条里面小方块*/
+        border-radius: 5px;
+        -webkit-box-shadow: inset005pxrgba(0, 0, 0, 0.2);
+        background: rgba(0, 0, 0, 0.2);
     }
-    &::-webkit-scrollbar-track {/*滚动条里面轨道*/
-        -webkit-box-shadow: inset005pxrgba(0,0,0,0.2);
-        border-radius:0;
-        background:rgba(0,0,0,0.1);
+    &::-webkit-scrollbar-track {
+        /*滚动条里面轨道*/
+        -webkit-box-shadow: inset005pxrgba(0, 0, 0, 0.2);
+        border-radius: 0;
+        background: rgba(0, 0, 0, 0.1);
     }
 }
+
 // 弹框
-.el-dialog__footer{
-	text-align: center;
+.el-dialog__footer {
+    text-align: center;
 }
 
-.w-e-text{
+.w-e-text {
     min-height: 500px !important;
 }
+
 // 停用启用样式
 .open {
-	color:#409eff;
+    color: #409eff;
 }
+
 .close {
-	color: red;
+    color: red;
+}
+
+.el-table__fixed-right::before,
+.el-table__fixed::before {
+    background: none;
 }
-.el-table__fixed-right::before, .el-table__fixed::before{
-	background: none;
+
+.filter-form {
+    .el-input,
+    .el-select {
+        width: 100%;
+    }
 }
 
-.filter-form{
-	.el-input,.el-select{
-		width: 100%;
-	}
+.el-table .el-table__cell {
+    background: #ccc;
 }
 
 // .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap>.el-form-item__label:before, .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:before{
 // 	content: '';
-// }
-
+// }

+ 20 - 8
src/views/comments/consult.vue

@@ -57,19 +57,19 @@
                 <el-table-column prop="content" label="咨询内容">
                     <template slot-scope="scope">
                         <el-badge v-if="scope.row.unreply>0" :value="scope.row.unreply" class="item">
-                            <p>{{scope.row.consult_list[scope.row.consult_list.length-1].content}}</p>
+                            <p style="font-size:18px;">{{scope.row.last_content}}</p>
                         </el-badge>
-                        <p v-else>{{scope.row.consult_list[scope.row.consult_list.length-1].content}}</p>
+                        <p v-else style="font-size:18px;">{{scope.row.last_content}}</p>
                     </template>
                 </el-table-column>
                 <el-table-column prop="reply_content" label="回复内容">
                     <template slot-scope="scope">
-                        <p v-if="scope.row.unreply==0">{{scope.row.all_consult_list[scope.row.all_consult_list.length-1].reply_content}}</p>
+                        <p v-if="scope.row.unreply==0" style="font-size:18px;">{{scope.row.last_reply_content}}</p>
                     </template>
                 </el-table-column>
                 <el-table-column prop="ctime" label="咨询时间" width="250">
                     <template slot-scope="scope">
-                        {{scope.row.consult_list[scope.row.consult_list.length-1].ctime}}
+                        {{scope.row.ctime}}
                     </template>
                 </el-table-column>
                 <el-table-column prop="date" label="操作" fixed="right" width="220">
@@ -91,8 +91,8 @@
             <div class="consutlList">
                 <el-row :gutter="1" v-for="(item,index) in form.all_consult_list" :key="index">
                     <el-col :span="3" v-if="item.user_id>0"><img :src="item.user_avatar" alt="" width="45px" height="45px" style="border-radius:5px;"/></el-col>
-                    <el-col :span="20" v-if="item.user_id>0"><p style="padding-left:5px;">{{item.content}}</p></el-col>
-                    <el-col :span="20" v-if="item.user_id==0"><p style="padding-right:10px;text-align:right;">{{item.reply_content}}</p></el-col>
+                    <el-col :span="20" v-if="item.user_id>0"><p style="padding-left:5px;font-size:18px;">{{item.content}}</p></el-col>
+                    <el-col :span="20" v-if="item.user_id==0"><p style="padding-right:10px;text-align:right;font-size:18px;">{{item.reply_content}}</p></el-col>
                     <el-col :span="3" v-if="item.user_id==0"><img src="..\..\assets\wz.jpg" alt="" width="45px" height="45px" style="border-radius:5px;"/></el-col>
                 </el-row>
             </div>
@@ -128,7 +128,9 @@ export default {
             form:{
                 stock_date:this.getNowDate(),
                 page:1,
-                page_size:20
+                page_size:20,
+                consult_list:[],
+                all_consult_list:[]
             },
             form1:{},
             list:[{},{}],
@@ -281,6 +283,15 @@ export default {
             console.log(res)
             this.form.today_stock_img.push(res.data.url);
         },
+        triggerClick(){
+            document.onkeyup = e =>{
+              // 为了更加严谨所以添加了路由路径的判断
+            if (e.keyCode === 13) {
+            //回车后执行搜索方法
+                this.submitForm()
+            }
+        }
+        },
         /** 提交按钮 */
         submitForm() {
             this.$refs["form"].validate(valid => {
@@ -291,7 +302,7 @@ export default {
                             this.msgError(response.data.message);
                             return
                         }
-                        this.msgSuccess("修改成功");
+                        this.msgSuccess("回复成功!");
                         this.open = false;
                         this.getData();
                     });
@@ -305,6 +316,7 @@ export default {
            this.queryParams.match_id = this.matchList[0].id
            this.getData()
        })
+       this.triggerClick()
     }
 }
 </script>