소스 검색

update service

luke 6 년 전
부모
커밋
a906199985
2개의 변경된 파일48개의 추가작업 그리고 26개의 파일을 삭제
  1. 44 24
      service/src/components/hader.vue
  2. 4 2
      service/src/css/index.css

+ 44 - 24
service/src/components/hader.vue

@@ -37,6 +37,7 @@
 						<i style="font-size:14px; color:#5aa0fbbd ;" class="el-icon-menu"> </i>会话总览
 					</el-button>
 					<el-drawer
+							id="huihua"
 						title="会话总览"
 						:modal="false"
 						:show-close="true"
@@ -179,8 +180,31 @@
 
 				dialogVisible: false, //图片放大
 				dialogImageUrl: '', // 放大的图片
+
+				serverList:[],
+			}
+		},
+
+		mounted() {
+			if (this.$store.getters.get_stateValue) {
+				this.value = this.$store.getters.get_stateValue;
+			}
+			if(typeof this.$store.getters.get_user_info  != 'string'){
+				this.user_info = this.$store.getters.get_user_info
+			}else if(this.$store.getters.get_user_info!= ""){
+				this.user_info = JSON.parse(this.$store.getters.get_user_info)
 			}
+			this.userID = this.$store.getters.get_user_info.id;
+			this.unreadnotice();
+			let _this = this;
+			let get = setTimeout(function(){
+				_this.unreadnotice();
+			},1000)
+
+
+
 		},
+
 		computed: {
 			get_drawer() {
 				return this.$store.getters.get_drawer;
@@ -272,6 +296,7 @@
 					if(this.isGetList) return false
 					clearInterval(this.ession_int);
 					this.servicelog = data;
+					console.log(this.servicelog)
 					this.init();
 					this.get_session_lise();
 					this.ession_int = setInterval(()=>{
@@ -302,17 +327,30 @@
 				};
 				this.post("api/service/history/allConversation",'',obj).then(res => {
 					if(res.data.code === 1){
+						// console.log('会话',res.data)
 						this.dataTree = res.data.data;
 						 //this.unreadNum =  res.data.data.length;
 						this.interval =  setInterval(()=>{
 							this.post("api/service/history/allConversation",'',obj).then(res => {
 								if(res.data.code === 1){
-									console.log('asda',res.data.data)
+									this.serverList = res.data.serverList;
 									this.dataTree = res.data.data;
 									//this.unreadNum =  res.data.data.length;
+									let step;
+									for (let i = 0; i < this.serverList.length; i++) {
+										if (this.servicelog.servicelog_id == this.serverList) {
+											step = false;
+											break;
+										} else {
+											step = true;
+										}
+									}
+									if (step == true) {
+										this.init();
+									}
+
 								}
 							});
-							console.log(2);
 						},1000*60);
 					}
 				});
@@ -335,6 +373,7 @@
 				}).then(res => {
 					if(res.data.code == 1){
 						res.data.data.list = res.data.data.list.reverse();
+						// console.log(res.data.data.list,'详情列表')
 						this.isGetList = false;
 						//本次最新时间
 						// console.log(res.data.data.list.length, res.data.data.list)
@@ -368,29 +407,8 @@
 				this.newTime = '';
 			}
 
-		},
-		/***
-		 * 
-		 */
-		mounted() {
-			if (this.$store.getters.get_stateValue) {
-				this.value = this.$store.getters.get_stateValue;
-			}
-			if(typeof this.$store.getters.get_user_info  != 'string'){
-				this.user_info = this.$store.getters.get_user_info
-			}else if(this.$store.getters.get_user_info!= ""){
-				this.user_info = JSON.parse(this.$store.getters.get_user_info)
-			}
-			this.userID = this.$store.getters.get_user_info.id;
-			this.unreadnotice();
-			let _this = this;
-			let get = setTimeout(function(){
-				_this.unreadnotice();
-			},1000)
-
-
-
 		}
+
 	}
 </script>
 
@@ -516,6 +534,7 @@
 		background:rgba(245,245,245,1);
 		border-radius:0px 10px 10px 10px;
 		margin-top:6px;
+		word-wrap: break-word;
 	}
 	.right_session{
 		margin-top:6px;
@@ -527,6 +546,7 @@
 		background:rgba(223,240,255,1);
 		justify-content: flex-end;
 		border-radius:10px 0px 10px 10px;
+		word-wrap: break-word;
 	}
 </style>
 

+ 4 - 2
service/src/css/index.css

@@ -272,8 +272,7 @@ body {
   background-color: #409eff !important;
   border-color: #409eff !important;
 }
-#el-drawer__title{
-  padding:20px !important;
+.el-drawer__title{
   height: 40px !important;
   margin-bottom: 0 !important;
   font-size: 16px;
@@ -282,4 +281,7 @@ body {
 
 .el-image {
   vertical-align: middle !important;
+}
+#huihua .el-drawer__header{
+  padding: 25px 20px !important;
 }