Browse Source

优化评价器功能

hurugang 3 years ago
parent
commit
1e1720b264

+ 19 - 19
src/main/java/cn/hnthyy/thmz/controller/NavigationController.java

@@ -1080,25 +1080,25 @@ public class NavigationController {
     }
 
 
-    /**
-     * 评价评价页面
-     *
-     * @return
-     */
-    @RequestMapping("/client-evaluate")
-    public String clientEvaluate() {
-        return "mz/client_evaluate";
-    }
-
-    /**
-     * 评价价格页面
-     *
-     * @return
-     */
-    @RequestMapping("/client-price")
-    public String clientPrice() {
-        return "mz/client_price";
-    }
+//    /**
+//     * 评价评价页面
+//     *
+//     * @return
+//     */
+//    @RequestMapping("/client-evaluate")
+//    public String clientEvaluate() {
+//        return "mz/client_evaluate";
+//    }
+//
+//    /**
+//     * 评价价格页面
+//     *
+//     * @return
+//     */
+//    @RequestMapping("/client-price")
+//    public String clientPrice() {
+//        return "mz/client_price";
+//    }
 
     /**
      * 核酸检查申请列表

+ 13 - 8
src/main/java/cn/hnthyy/thmz/service/impl/thmz/EvaluationServiceImpl.java

@@ -68,7 +68,7 @@ public class EvaluationServiceImpl implements EvaluationService {
             return;
         }
         userMap.put(windows.getClientIpAddress(),tokenUser);
-        evaluationWebSocket.login(windows.getClientIpAddress(),tokenUser);
+        evaluationWebSocket.login(windows.getClientIpAddress());
     }
 
     @Override
@@ -149,11 +149,10 @@ public class EvaluationServiceImpl implements EvaluationService {
         if (code == 200) {
             params.put("messageAudio", resObj.get("data").toString());
         }
-        evaluationWebSocket.setPriceInfo(windows.getClientIpAddress(), params);
-        Map<String, Object> resultMap = new HashMap();
-        resultMap.put("type", "url");
-        resultMap.put("url", "/thmz/client-price");
-        evaluationWebSocket.appointSending(windows.getClientIpAddress(), JSONObject.valueToString(resultMap));
+        //evaluationWebSocket.setPriceInfo(windows.getClientIpAddress(), params);
+        params.put("type", "content");
+        params.put("id", "client_price");
+        evaluationWebSocket.appointSending(windows.getClientIpAddress(), JSONObject.valueToString(params));
     }
 
     @Override
@@ -171,8 +170,14 @@ public class EvaluationServiceImpl implements EvaluationService {
         clientMap.put("tokenUser",tokenUser);
         clientAndPatientMap.put(windows.getClientIpAddress(),clientMap);
         Map<String, Object> resultMap = new HashMap();
-        resultMap.put("type", "url");
-        resultMap.put("url", "/thmz/client-evaluate");
+        resultMap.put("type", "content");
+        resultMap.put("id", "client_evaluate");
+        String res = mzPharmacyService.callNumberAudio("请您对我的服务进行评价");
+        JSONObject resObj = new JSONObject(res);
+        Integer code = (Integer) resObj.get("code");
+        if (code == 200) {
+            resultMap.put("messageAudio", resObj.get("data").toString());
+        }
         evaluationWebSocket.appointSending(windows.getClientIpAddress(), JSONObject.valueToString(resultMap));
     }
 

+ 20 - 22
src/main/java/cn/hnthyy/thmz/socket/EvaluationWebSocket.java

@@ -1,6 +1,5 @@
 package cn.hnthyy.thmz.socket;
 
-import cn.hnthyy.thmz.entity.thmz.User;
 import lombok.extern.slf4j.Slf4j;
 import org.json.JSONObject;
 import org.springframework.stereotype.Component;
@@ -51,10 +50,10 @@ public class EvaluationWebSocket {
      */
     private static ConcurrentHashMap<String, EvaluationWebSocket> webSocketSet = new ConcurrentHashMap<>();
 
-    /**
-     * 用于存所有待推送的价格信息,因为建立价格连接和推送消息是两步,会断开,所以缓存起来
-     */
-    private static ConcurrentHashMap<String, Map<String, Object>> priceMap = new ConcurrentHashMap<>();
+//    /**
+//     * 用于存所有待推送的价格信息,因为建立价格连接和推送消息是两步,会断开,所以缓存起来
+//     */
+//    private static ConcurrentHashMap<String, Map<String, Object>> priceMap = new ConcurrentHashMap<>();
 
     /**
      * 保存登录到换页的评价器ip
@@ -71,12 +70,12 @@ public class EvaluationWebSocket {
         if ("client_welcome".equals(source)) {
             welcomeSet.add(clientIp);
         }
-        Map<String, Object> messageMap = priceMap.get(clientIp);
-        if (messageMap != null) {
-            messageMap.put("type", "priceData");
-            appointSending(clientIp, JSONObject.valueToString(messageMap));
-            priceMap.remove(clientIp);
-        }
+//        Map<String, Object> messageMap = priceMap.get(clientIp);
+//        if (messageMap != null) {
+//            messageMap.put("type", "priceData");
+//            appointSending(clientIp, JSONObject.valueToString(messageMap));
+//            priceMap.remove(clientIp);
+//        }
         log.info("[WebSocket] 连接成功,当前连接人数为:={}", webSocketSet.size());
     }
 
@@ -147,9 +146,8 @@ public class EvaluationWebSocket {
     /**
      * 评价器客户端登录
      * @param clientIp
-     * @param tokenUser
      */
-    public void login(String clientIp,User tokenUser) {
+    public void login(String clientIp) {
         if (isLogin(clientIp)) {
             return;
         }
@@ -160,13 +158,13 @@ public class EvaluationWebSocket {
         appointSending(clientIp, JSONObject.valueToString(resultMap));
     }
 
-    /**
-     * 设置待发送的价格信息
-     *
-     * @param clientIp
-     * @param params
-     */
-    public void setPriceInfo(String clientIp, Map<String, Object> params) {
-        priceMap.put(clientIp, params);
-    }
+//    /**
+//     * 设置待发送的价格信息
+//     *
+//     * @param clientIp
+//     * @param params
+//     */
+//    public void setPriceInfo(String clientIp, Map<String, Object> params) {
+//        priceMap.put(clientIp, params);
+//    }
 }

+ 26 - 9
src/main/resources/static/js/common/evaluation-websocket.js

@@ -31,15 +31,32 @@ function openEvaluationWebSocket(type) {
                 }
                 //推送价格
                 if(data.type=="priceData"){
-                    $("#pName").text(data.name);
-                    $("#pGender").text(data.call);
-                    $("#needPay").text(data.needPay);
-                    $("#pay").text(data.pay);
-                    $("#changeAmount").text(data.changeAmount);
-                    //播放语音
-                    var mp3 = new Audio(data.messageAudio);
-                    mp3.play();
-                    return;
+
+                }
+                if(data.type=="content"){
+                    if(data.id=="client_evaluate"){
+                        $("#client_evaluate").show();
+                        $("#client_index").hide();
+                        $("#client_price").hide();
+                        var mp3 = $("#mp3");
+                        mp3.attr("src",data.messageAudio);
+                        mp3.get(0).play();
+                        return;
+                    }else if(data.id=="client_price"){
+                        $("#client_price").show();
+                        $("#client_evaluate").hide();
+                        $("#client_index").hide();
+                        $("#pName").text(data.name);
+                        $("#pGender").text(data.call);
+                        $("#needPay").text(data.needPay);
+                        $("#pay").text(data.pay);
+                        $("#changeAmount").text(data.changeAmount);
+                        //播放语音
+                        var mp3 = $("#mp3");
+                        mp3.attr("src",data.messageAudio);
+                        mp3.get(0).play();
+                        return;
+                    }
                 }
                 console.log("收到消息" + event.data);
             }

+ 66 - 66
src/main/resources/static/js/mz/client_evaluate.js

@@ -1,66 +1,66 @@
-//@ sourceURL=client_evaluate.js
-$(function (){
-    $.ajax({
-        type: "GET",
-        url: '/thmz/getUserInfo',
-        contentType: "application/json;charset=UTF-8",
-        dataType: "json",
-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
-        success: function (res) {
-            if (res == '401' || res == 401) {
-                window.location.href = '/thmz/login/view'
-                return;
-            }
-            if (res.code == 0) {
-                $("#name").text(res.data.name);
-                $("#role").text(res.data.role);
-                $("#userCode").text(res.data.userCode);
-                imgFun("/thmz/download?id="+res.data.clientProfileImage, "headImage");
-                var date = new Date();
-                $("#dateNow").text(format(date, "yyyy-MM-dd"));
-                $("#time").text(format(date, "HH:mm")+" "+getWeek());
-            }
-        }
-    });
-    //生成语音
-    $.ajax({
-        type: "GET",
-        url: '/thmz/callNumberAudio?message=请您对我的服务进行评价',
-        contentType: "application/json;charset=UTF-8",
-        dataType: "json",
-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
-        success: function (res) {
-            if (res.code == 0) {
-                //播放后台生成的叫号语音
-                var mp3 = new Audio(res.data);
-                mp3.play();
-            }
-        }
-    });
-
-});
-
-/**
- * 提交评分
- * @param evaluateCode
- */
-function saveEvaluation(evaluateCode) {
-    $.ajax({
-        type: "GET",
-        url: '/thmz/saveEvaluation?evaluateCode='+evaluateCode,
-        contentType: "application/json;charset=UTF-8",
-        dataType: "json",
-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
-        success: function (res) {
-            if (res.code == 0) {
-                if(res.audio!=undefined && res.audio!=null)
-                //播放后台生成的叫号语音
-                var mp3 = new Audio(res.audio);
-                mp3.play();
-                setTimeout(function () {
-                    window.location.href='/thmz/client-index';
-                }, 3000);
-            }
-        }
-    });
-}
+// //@ sourceURL=client_evaluate.js
+// $(function (){
+//     $.ajax({
+//         type: "GET",
+//         url: '/thmz/getUserInfo',
+//         contentType: "application/json;charset=UTF-8",
+//         dataType: "json",
+//         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+//         success: function (res) {
+//             if (res == '401' || res == 401) {
+//                 window.location.href = '/thmz/login/view'
+//                 return;
+//             }
+//             if (res.code == 0) {
+//                 $("#name").text(res.data.name);
+//                 $("#role").text(res.data.role);
+//                 $("#userCode").text(res.data.userCode);
+//                 imgFun("/thmz/download?id="+res.data.clientProfileImage, "headImage");
+//                 var date = new Date();
+//                 $("#dateNow").text(format(date, "yyyy-MM-dd"));
+//                 $("#time").text(format(date, "HH:mm")+" "+getWeek());
+//             }
+//         }
+//     });
+//     //生成语音
+//     $.ajax({
+//         type: "GET",
+//         url: '/thmz/callNumberAudio?message=请您对我的服务进行评价',
+//         contentType: "application/json;charset=UTF-8",
+//         dataType: "json",
+//         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+//         success: function (res) {
+//             if (res.code == 0) {
+//                 //播放后台生成的叫号语音
+//                 var mp3 = new Audio(res.data);
+//                 mp3.play();
+//             }
+//         }
+//     });
+//
+// });
+//
+// /**
+//  * 提交评分
+//  * @param evaluateCode
+//  */
+// function saveEvaluation(evaluateCode) {
+//     $.ajax({
+//         type: "GET",
+//         url: '/thmz/saveEvaluation?evaluateCode='+evaluateCode,
+//         contentType: "application/json;charset=UTF-8",
+//         dataType: "json",
+//         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+//         success: function (res) {
+//             if (res.code == 0) {
+//                 if(res.audio!=undefined && res.audio!=null)
+//                 //播放后台生成的叫号语音
+//                 var mp3 = new Audio(res.audio);
+//                 mp3.play();
+//                 setTimeout(function () {
+//                     window.location.href='/thmz/client-index';
+//                 }, 3000);
+//             }
+//         }
+//     });
+// }

+ 31 - 3
src/main/resources/static/js/mz/client_index.js

@@ -1,5 +1,5 @@
 //@ sourceURL=client_index.js
-$(function (){
+$(function () {
     openEvaluationWebSocket("client_index");
     $.ajax({
         type: "GET",
@@ -16,13 +16,41 @@ $(function (){
                 $("#name").text(res.data.name);
                 $("#role").text(res.data.role);
                 $("#userCode").text(res.data.userCode);
-                imgFun("/thmz/download?id="+res.data.clientProfileImage, "headImage");
+                imgFun("/thmz/download?id=" + res.data.clientProfileImage, "headImage");
                 var date = new Date();
                 $("#dateNow").text(format(date, "yyyy-MM-dd"));
-                $("#time").text(format(date, "HH:mm")+" "+getWeek());
+                $("#time").text(format(date, "HH:mm") + " " + getWeek());
             }
         }
     });
 });
 
 
+/**
+ * 提交评分
+ * @param evaluateCode
+ */
+function saveEvaluation(evaluateCode) {
+    $.ajax({
+        type: "GET",
+        url: '/thmz/saveEvaluation?evaluateCode=' + evaluateCode,
+        contentType: "application/json;charset=UTF-8",
+        dataType: "json",
+        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+        success: function (res) {
+            if (res.code == 0) {
+                if (res.audio != undefined && res.audio != null)
+                //播放后台生成的叫号语音
+                var mp3 = $("#mp3");
+                mp3.attr("src", res.audio);
+                mp3.get(0).play();
+                setTimeout(function () {
+                    //window.location.href='/thmz/client-index';
+                    $("#client_index").show();
+                    $("#client_evaluate").hide();
+                    $("#client_price").hide();
+                }, 3000);
+            }
+        }
+    });
+}

+ 28 - 28
src/main/resources/static/js/mz/client_price.js

@@ -1,28 +1,28 @@
-//@ sourceURL=client_price.js
-$(function (){
-    openEvaluationWebSocket("client_price");
-    $.ajax({
-        type: "GET",
-        url: '/thmz/getUserInfo',
-        contentType: "application/json;charset=UTF-8",
-        dataType: "json",
-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
-        success: function (res) {
-            if (res == '401' || res == 401) {
-                window.location.href = '/thmz/login/view'
-                return;
-            }
-            if (res.code == 0) {
-                $("#name").text(res.data.name);
-                $("#role").text(res.data.role);
-                $("#userCode").text(res.data.userCode);
-                imgFun("/thmz/download?id="+res.data.clientProfileImage, "headImage");
-                var date = new Date();
-                $("#dateNow").text(format(date, "yyyy-MM-dd"));
-                $("#time").text(format(date, "HH:mm")+" "+getWeek());
-            }
-        }
-    });
-});
-
-
+// //@ sourceURL=client_price.js
+// $(function (){
+//     openEvaluationWebSocket("client_price");
+//     $.ajax({
+//         type: "GET",
+//         url: '/thmz/getUserInfo',
+//         contentType: "application/json;charset=UTF-8",
+//         dataType: "json",
+//         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+//         success: function (res) {
+//             if (res == '401' || res == 401) {
+//                 window.location.href = '/thmz/login/view'
+//                 return;
+//             }
+//             if (res.code == 0) {
+//                 $("#name").text(res.data.name);
+//                 $("#role").text(res.data.role);
+//                 $("#userCode").text(res.data.userCode);
+//                 imgFun("/thmz/download?id="+res.data.clientProfileImage, "headImage");
+//                 var date = new Date();
+//                 $("#dateNow").text(format(date, "yyyy-MM-dd"));
+//                 $("#time").text(format(date, "HH:mm")+" "+getWeek());
+//             }
+//         }
+//     });
+// });
+//
+//

+ 89 - 89
src/main/resources/templates/mz/client_evaluate.html

@@ -1,92 +1,92 @@
-<!DOCTYPE html>
-<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<!--<!DOCTYPE html>-->
+<!--<html lang="en" xmlns:th="http://www.thymeleaf.org">-->
 
-<head>
-    <script th:replace="common/head::static"></script>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width, initial-scale=1">
-    <title>泰和云HIS</title>
-    <!-- CSS -->
-    <!--<link rel="stylesheet" th:href="@{~/css/roboto.css}"/>-->
-    <link rel="stylesheet" href="/thmz/css/font-awesome/css/font-awesome.min.css">
-    <link rel="stylesheet" href="/thmz/css/form-elements.css">
-    <link rel="stylesheet" href="/thmz/css/font-awesome/css/style.css">
-    <link rel="shortcut icon" type="image/x-icon" href="/thmz/images/hospital.png"/>
-    <!-- Favicon and touch icons -->
-    <!--    <link rel="shortcut icon" type="image/x-icon" href="@{~/ico/favicon.png">-->
-    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/thmz/ico/apple-touch-icon-144-precomposed.png">
-    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/thmz/ico/apple-touch-icon-114-precomposed.png">
-    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/thmz/ico/apple-touch-icon-72-precomposed.png">
-    <link rel="apple-touch-icon-precomposed" href="/thmz/ico/apple-touch-icon-57-precomposed.png">
-    <script src="/thmz/js/dependent/jquery.backstretch.min.js"></script>
-    <script src="/thmz/js/common/file.js"></script>
-    <script src="/thmz/js/common/date-util.js"></script>
-    <script src="/thmz/js/mz/client_evaluate.js"></script>
-    <title>评价评价页面</title>
-    <style>
-        body, html {
-            margin: 0;
-            height: 100%;
-        }
+<!--<head>-->
+    <!--<script th:replace="common/head::static"></script>-->
+    <!--<meta charset="utf-8">-->
+    <!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
+    <!--<meta name="viewport" content="width=device-width, initial-scale=1">-->
+    <!--<title>泰和云HIS</title>-->
+    <!--&lt;!&ndash; CSS &ndash;&gt;-->
+    <!--&lt;!&ndash;<link rel="stylesheet" th:href="@{~/css/roboto.css}"/>&ndash;&gt;-->
+    <!--<link rel="stylesheet" href="/thmz/css/font-awesome/css/font-awesome.min.css">-->
+    <!--<link rel="stylesheet" href="/thmz/css/form-elements.css">-->
+    <!--<link rel="stylesheet" href="/thmz/css/font-awesome/css/style.css">-->
+    <!--<link rel="shortcut icon" type="image/x-icon" href="/thmz/images/hospital.png"/>-->
+    <!--&lt;!&ndash; Favicon and touch icons &ndash;&gt;-->
+    <!--&lt;!&ndash;    <link rel="shortcut icon" type="image/x-icon" href="@{~/ico/favicon.png">&ndash;&gt;-->
+    <!--<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/thmz/ico/apple-touch-icon-144-precomposed.png">-->
+    <!--<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/thmz/ico/apple-touch-icon-114-precomposed.png">-->
+    <!--<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/thmz/ico/apple-touch-icon-72-precomposed.png">-->
+    <!--<link rel="apple-touch-icon-precomposed" href="/thmz/ico/apple-touch-icon-57-precomposed.png">-->
+    <!--<script src="/thmz/js/dependent/jquery.backstretch.min.js"></script>-->
+    <!--<script src="/thmz/js/common/file.js"></script>-->
+    <!--<script src="/thmz/js/common/date-util.js"></script>-->
+    <!--<script src="/thmz/js/mz/client_evaluate.js"></script>-->
+    <!--<title>评价评价页面</title>-->
+    <!--<style>-->
+        <!--body, html {-->
+            <!--margin: 0;-->
+            <!--height: 100%;-->
+        <!--}-->
 
-        .gao2 {
-            height: 50px;
-            background: #5C70B5;
-            line-height: 50px;
-            color: white;
-            font-family: SimSun;
-            font-weight: 600;
-            font-size: 30px;
-            border-radius: 3px;
-        }
+        <!--.gao2 {-->
+            <!--height: 50px;-->
+            <!--background: #5C70B5;-->
+            <!--line-height: 50px;-->
+            <!--color: white;-->
+            <!--font-family: SimSun;-->
+            <!--font-weight: 600;-->
+            <!--font-size: 30px;-->
+            <!--border-radius: 3px;-->
+        <!--}-->
 
-        .gao100 {
-            height: calc(100% - 50px);
-            background: #EBEBE4;
-        }</style>
-</head>
-<body>
-<div class="col-sm-12 col-sm-12 col-xs-12 gao2">
-    <div class="col-sm-8 col-sm-8 col-xs-12" style="text-align: left;letter-spacing: 30px;">
-        <img src="../../thmz/images/taihe-logo3.png"
-             style="height: 50px;width:50px;float: left;margin-left: 20px;border-radius: 25px;">
-        <span style="margin-left: 30px;">湖南泰和医院</span></div>
-    <div class="col-sm-4 col-sm-4 col-xs-12" style="text-align: right;"><i class="fa fa-clock-o">&nbsp;&nbsp;</i><span
-            id="dateNow"></span></div>
-</div>
-<div class="col-sm-12 col-sm-12 col-xs-12 gao100">
-    <div class="col-sm-3 col-sm-3 col-xs-12" style="height: 100%;background: white;">
-        <img id="headImage" style="margin-top: 10px;width: 80%;">
-        <div style="margin-top: 30px;font-size: 35px;color: black;text-align: left;"><i class="fa fa-user">&nbsp;&nbsp;姓名:</i><span
-                id="name"></span></div>
-        <div style="margin-top: 30px;font-size: 35px;color: black;text-align: left;"><i class="fa fa-user-md">&nbsp;&nbsp;岗位:</i><span
-                id="role"></span></div>
-        <div style="margin-top: 30px;font-size: 35px;color: black;text-align: left;"><i class="fa fa-bookmark-o">&nbsp;&nbsp;<span
-                style="margin-left: 2px;">工号:</span></i><span id="userCode"></span></div>
-    </div>
-    <div class="col-sm-9 col-sm-9 col-xs-12" style="height: 100%;padding-right: 0px;">
-        <div style="height: 100%;">
-            <div style="height: calc(100% - 90px);padding-top: 10px;background: white;">
-                <div style="height: 30px;background-color: #C4E0F6;width: calc(100% - 10px);margin-left: 5px;border-radius: 5px;color: black;">
-                    请您对我的服务进行评价
-                </div>
-                <div>
-                    <div style="padding-top: 60px;">
-                        <a style="cursor: pointer" onclick="saveEvaluation(0)"><img src="../../thmz/images/emoj/0.png" style="width: 140px;"></a>
-                        <a style="cursor: pointer" onclick="saveEvaluation(1)"><img src="../../thmz/images/emoj/1.png" style="width: 140px;margin-left: 100px;"></a>
-                    </div>
-                    <div style="margin-top: 30px">
-                        <a style="cursor: pointer" onclick="saveEvaluation(2)"><img src="../../thmz/images/emoj/2.png" style="width: 100px;"></a>
-                        <a style="cursor: pointer" onclick="saveEvaluation(3)"><img src="../../thmz/images/emoj/3.png" style="width: 100px;margin-left: 80px;"></a>
-                        <a style="cursor: pointer" onclick="saveEvaluation(4)"><img src="../../thmz/images/emoj/4.png" style="width: 100px;margin-left: 80px;"></a>
-                        <a style="cursor: pointer" onclick="saveEvaluation(5)"><img src="../../thmz/images/emoj/5.png" style="width: 100px;margin-left: 80px;"></a>
-                    </div>
-                </div>
-            </div>
-            <div style="height: 80px;background-color: #6EC1AD;font-size: 40px;line-height: 80px;border-radius: 5px;margin-top: 10px;" id="time"></div>
-        </div>
-    </div>
-</div>
-</body>
-</html>
+        <!--.gao100 {-->
+            <!--height: calc(100% - 50px);-->
+            <!--background: #EBEBE4;-->
+        <!--}</style>-->
+<!--</head>-->
+<!--<body>-->
+<!--<div class="col-sm-12 col-sm-12 col-xs-12 gao2">-->
+    <!--<div class="col-sm-8 col-sm-8 col-xs-12" style="text-align: left;letter-spacing: 30px;">-->
+        <!--<img src="../../thmz/images/taihe-logo3.png"-->
+             <!--style="height: 50px;width:50px;float: left;margin-left: 20px;border-radius: 25px;">-->
+        <!--<span style="margin-left: 30px;">湖南泰和医院</span></div>-->
+    <!--<div class="col-sm-4 col-sm-4 col-xs-12" style="text-align: right;"><i class="fa fa-clock-o">&nbsp;&nbsp;</i><span-->
+            <!--id="dateNow"></span></div>-->
+<!--</div>-->
+<!--<div class="col-sm-12 col-sm-12 col-xs-12 gao100">-->
+    <!--<div class="col-sm-3 col-sm-3 col-xs-12" style="height: 100%;background: white;">-->
+        <!--<img id="headImage" style="margin-top: 10px;width: 80%;">-->
+        <!--<div style="margin-top: 30px;font-size: 35px;color: black;text-align: left;"><i class="fa fa-user">&nbsp;&nbsp;姓名:</i><span-->
+                <!--id="name"></span></div>-->
+        <!--<div style="margin-top: 30px;font-size: 35px;color: black;text-align: left;"><i class="fa fa-user-md">&nbsp;&nbsp;岗位:</i><span-->
+                <!--id="role"></span></div>-->
+        <!--<div style="margin-top: 30px;font-size: 35px;color: black;text-align: left;"><i class="fa fa-bookmark-o">&nbsp;&nbsp;<span-->
+                <!--style="margin-left: 2px;">工号:</span></i><span id="userCode"></span></div>-->
+    <!--</div>-->
+    <!--<div class="col-sm-9 col-sm-9 col-xs-12" style="height: 100%;padding-right: 0px;">-->
+        <!--<div style="height: 100%;">-->
+            <!--<div style="height: calc(100% - 90px);padding-top: 10px;background: white;">-->
+                <!--<div style="height: 30px;background-color: #C4E0F6;width: calc(100% - 10px);margin-left: 5px;border-radius: 5px;color: black;">-->
+                    <!--请您对我的服务进行评价-->
+                <!--</div>-->
+                <!--<div>-->
+                    <!--<div style="padding-top: 60px;">-->
+                        <!--<a style="cursor: pointer" onclick="saveEvaluation(0)"><img src="../../thmz/images/emoj/0.png" style="width: 140px;"></a>-->
+                        <!--<a style="cursor: pointer" onclick="saveEvaluation(1)"><img src="../../thmz/images/emoj/1.png" style="width: 140px;margin-left: 100px;"></a>-->
+                    <!--</div>-->
+                    <!--<div style="margin-top: 30px">-->
+                        <!--<a style="cursor: pointer" onclick="saveEvaluation(2)"><img src="../../thmz/images/emoj/2.png" style="width: 100px;"></a>-->
+                        <!--<a style="cursor: pointer" onclick="saveEvaluation(3)"><img src="../../thmz/images/emoj/3.png" style="width: 100px;margin-left: 80px;"></a>-->
+                        <!--<a style="cursor: pointer" onclick="saveEvaluation(4)"><img src="../../thmz/images/emoj/4.png" style="width: 100px;margin-left: 80px;"></a>-->
+                        <!--<a style="cursor: pointer" onclick="saveEvaluation(5)"><img src="../../thmz/images/emoj/5.png" style="width: 100px;margin-left: 80px;"></a>-->
+                    <!--</div>-->
+                <!--</div>-->
+            <!--</div>-->
+            <!--<div style="height: 80px;background-color: #6EC1AD;font-size: 40px;line-height: 80px;border-radius: 5px;margin-top: 10px;" id="time"></div>-->
+        <!--</div>-->
+    <!--</div>-->
+<!--</div>-->
+<!--</body>-->
+<!--</html>-->

+ 29 - 1
src/main/resources/templates/mz/client_index.html

@@ -69,13 +69,41 @@
     </div>
     <div class="col-sm-9 col-sm-9 col-xs-12" style="height: 100%;padding-right: 0px;">
         <div style="height: 100%;">
-            <div style="height: calc(100% - 90px);padding-top: 10px;background: white;">
+            <div style="height: calc(100% - 90px);padding-top: 10px;background: white;" id="client_index">
                 <div style="height: 30px;background-color: #C4E0F6;width: calc(100% - 10px);margin-left: 5px;border-radius: 5px;color: black;">
                     湖南泰和医院简介
                 </div>
                 <div style="line-height: 100px;margin-top: 100px;text-indent: 2.8cm;font-size: 40px;">湖南泰和医院是一家省级直属三级综合学科医院,医保/农合定点,全国诚信标杆医院,祝您早日康复,工作愉快!</div>
             </div>
+
+            <div style="height: calc(100% - 90px);padding-top: 10px;background: white;" id="client_price" hidden>
+                <div style="height: 30px;background-color: #C4E0F6;width: calc(100% - 10px);margin-left: 5px;border-radius: 5px;color: black;">
+                    缴费详情
+                </div>
+                <div style="padding-top: 60px;font-size: 50px;line-height: 120px;text-indent: 2.8cm;text-align: left;padding-left: 10px;padding-right: 10px;">
+                    <span id="pName"></span><span id="pGender"></span>,您好!您本次就诊,应付金额为<span id="needPay" style="border-bottom: black 2px solid;color: black;font-weight: 400;"></span>元,
+                    实际支付金额为<span id="pay" style="border-bottom: black 2px solid;color: black;font-weight: 400;"></span>元,应找零金额为<span id="changeAmount" style="border-bottom: black 2px solid;color: black;font-weight: 400;"></span>元。
+                </div>
+            </div>
+            <div style="height: calc(100% - 90px);padding-top: 10px;background: white;" id="client_evaluate" hidden>
+                <div style="height: 30px;background-color: #C4E0F6;width: calc(100% - 10px);margin-left: 5px;border-radius: 5px;color: black;">
+                    请您对我的服务进行评价
+                </div>
+                <div>
+                    <div style="padding-top: 60px;">
+                        <a style="cursor: pointer" onclick="saveEvaluation(0)"><img src="../../thmz/images/emoj/0.png" style="width: 140px;"></a>
+                        <a style="cursor: pointer" onclick="saveEvaluation(1)"><img src="../../thmz/images/emoj/1.png" style="width: 140px;margin-left: 100px;"></a>
+                    </div>
+                    <div style="margin-top: 30px">
+                        <a style="cursor: pointer" onclick="saveEvaluation(2)"><img src="../../thmz/images/emoj/2.png" style="width: 100px;"></a>
+                        <a style="cursor: pointer" onclick="saveEvaluation(3)"><img src="../../thmz/images/emoj/3.png" style="width: 100px;margin-left: 80px;"></a>
+                        <a style="cursor: pointer" onclick="saveEvaluation(4)"><img src="../../thmz/images/emoj/4.png" style="width: 100px;margin-left: 80px;"></a>
+                        <a style="cursor: pointer" onclick="saveEvaluation(5)"><img src="../../thmz/images/emoj/5.png" style="width: 100px;margin-left: 80px;"></a>
+                    </div>
+                </div>
+            </div>
             <div style="height: 80px;background-color: #6EC1AD;font-size: 40px;line-height: 80px;border-radius: 5px;margin-top: 10px;" id="time"></div>
+            <audio id="mp3"></audio>
         </div>
     </div>
 </div>

+ 83 - 83
src/main/resources/templates/mz/client_price.html

@@ -1,86 +1,86 @@
-<!DOCTYPE html>
-<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<!--<!DOCTYPE html>-->
+<!--<html lang="en" xmlns:th="http://www.thymeleaf.org">-->
 
-<head>
-    <script th:replace="common/head::static"></script>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width, initial-scale=1">
-    <title>泰和云HIS</title>
-    <!-- CSS -->
-    <!--<link rel="stylesheet" th:href="@{~/css/roboto.css}"/>-->
-    <link rel="stylesheet" href="/thmz/css/font-awesome/css/font-awesome.min.css">
-    <link rel="stylesheet" href="/thmz/css/form-elements.css">
-    <link rel="stylesheet" href="/thmz/css/font-awesome/css/style.css">
-    <link rel="shortcut icon" type="image/x-icon" href="/thmz/images/hospital.png"/>
-    <!-- Favicon and touch icons -->
-    <!--    <link rel="shortcut icon" type="image/x-icon" href="@{~/ico/favicon.png">-->
-    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/thmz/ico/apple-touch-icon-144-precomposed.png">
-    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/thmz/ico/apple-touch-icon-114-precomposed.png">
-    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/thmz/ico/apple-touch-icon-72-precomposed.png">
-    <link rel="apple-touch-icon-precomposed" href="/thmz/ico/apple-touch-icon-57-precomposed.png">
-    <script src="/thmz/js/dependent/jquery.backstretch.min.js"></script>
-    <script src="/thmz/js/common/file.js"></script>
-    <script src="/thmz/js/common/ip-util.js"></script>
-    <script src="/thmz/js/common/evaluation-websocket.js"></script>
-    <script src="/thmz/js/common/date-util.js"></script>
-    <script src="/thmz/js/mz/client_price.js"></script>
-    <title>评价价格页面</title>
-    <style>
-        body, html {
-            margin: 0;
-            height: 100%;
-        }
+<!--<head>-->
+    <!--<script th:replace="common/head::static"></script>-->
+    <!--<meta charset="utf-8">-->
+    <!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
+    <!--<meta name="viewport" content="width=device-width, initial-scale=1">-->
+    <!--<title>泰和云HIS</title>-->
+    <!--&lt;!&ndash; CSS &ndash;&gt;-->
+    <!--&lt;!&ndash;<link rel="stylesheet" th:href="@{~/css/roboto.css}"/>&ndash;&gt;-->
+    <!--<link rel="stylesheet" href="/thmz/css/font-awesome/css/font-awesome.min.css">-->
+    <!--<link rel="stylesheet" href="/thmz/css/form-elements.css">-->
+    <!--<link rel="stylesheet" href="/thmz/css/font-awesome/css/style.css">-->
+    <!--<link rel="shortcut icon" type="image/x-icon" href="/thmz/images/hospital.png"/>-->
+    <!--&lt;!&ndash; Favicon and touch icons &ndash;&gt;-->
+    <!--&lt;!&ndash;    <link rel="shortcut icon" type="image/x-icon" href="@{~/ico/favicon.png">&ndash;&gt;-->
+    <!--<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/thmz/ico/apple-touch-icon-144-precomposed.png">-->
+    <!--<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/thmz/ico/apple-touch-icon-114-precomposed.png">-->
+    <!--<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/thmz/ico/apple-touch-icon-72-precomposed.png">-->
+    <!--<link rel="apple-touch-icon-precomposed" href="/thmz/ico/apple-touch-icon-57-precomposed.png">-->
+    <!--<script src="/thmz/js/dependent/jquery.backstretch.min.js"></script>-->
+    <!--<script src="/thmz/js/common/file.js"></script>-->
+    <!--<script src="/thmz/js/common/ip-util.js"></script>-->
+    <!--<script src="/thmz/js/common/evaluation-websocket.js"></script>-->
+    <!--<script src="/thmz/js/common/date-util.js"></script>-->
+    <!--<script src="/thmz/js/mz/client_price.js"></script>-->
+    <!--<title>评价价格页面</title>-->
+    <!--<style>-->
+        <!--body, html {-->
+            <!--margin: 0;-->
+            <!--height: 100%;-->
+        <!--}-->
 
-        .gao2 {
-            height: 50px;
-            background: #5C70B5;
-            line-height: 50px;
-            color: white;
-            font-family: SimSun;
-            font-weight: 600;
-            font-size: 30px;
-            border-radius: 3px;
-        }
+        <!--.gao2 {-->
+            <!--height: 50px;-->
+            <!--background: #5C70B5;-->
+            <!--line-height: 50px;-->
+            <!--color: white;-->
+            <!--font-family: SimSun;-->
+            <!--font-weight: 600;-->
+            <!--font-size: 30px;-->
+            <!--border-radius: 3px;-->
+        <!--}-->
 
-        .gao100 {
-            height: calc(100% - 50px);
-            background: #EBEBE4;
-        }</style>
-</head>
-<body>
-<div class="col-sm-12 col-sm-12 col-xs-12 gao2">
-    <div class="col-sm-8 col-sm-8 col-xs-12" style="text-align: left;letter-spacing: 30px;">
-        <img src="../../thmz/images/taihe-logo3.png"
-             style="height: 50px;width:50px;float: left;margin-left: 20px;border-radius: 25px;">
-        <span style="margin-left: 30px;">湖南泰和医院</span></div>
-    <div class="col-sm-4 col-sm-4 col-xs-12" style="text-align: right;"><i class="fa fa-clock-o">&nbsp;&nbsp;</i><span
-            id="dateNow"></span></div>
-</div>
-<div class="col-sm-12 col-sm-12 col-xs-12 gao100">
-    <div class="col-sm-3 col-sm-3 col-xs-12" style="height: 100%;background: white;">
-        <img id="headImage" style="margin-top: 10px;width: 80%;">
-        <div style="margin-top: 30px;font-size: 35px;color: black;text-align: left;"><i class="fa fa-user">&nbsp;&nbsp;姓名:</i><span
-                id="name"></span></div>
-        <div style="margin-top: 30px;font-size: 35px;color: black;text-align: left;"><i class="fa fa-user-md">&nbsp;&nbsp;岗位:</i><span
-                id="role"></span></div>
-        <div style="margin-top: 30px;font-size: 35px;color: black;text-align: left;"><i class="fa fa-bookmark-o">&nbsp;&nbsp;<span
-                style="margin-left: 2px;">工号:</span></i><span id="userCode"></span></div>
-    </div>
-    <div class="col-sm-9 col-sm-9 col-xs-12" style="height: 100%;padding-right: 0px;">
-        <div style="height: 100%;">
-            <div style="height: calc(100% - 90px);padding-top: 10px;background: white;">
-                <div style="height: 30px;background-color: #C4E0F6;width: calc(100% - 10px);margin-left: 5px;border-radius: 5px;color: black;">
-                    缴费详情
-                </div>
-                <div style="padding-top: 60px;font-size: 50px;line-height: 120px;text-indent: 2.8cm;text-align: left;padding-left: 10px;padding-right: 10px;">
-                    <span id="pName"></span><span id="pGender"></span>,您好!您本次就诊,应付金额为<span id="needPay" style="border-bottom: black 2px solid;color: black;font-weight: 400;"></span>元,
-                    实际支付金额为<span id="pay" style="border-bottom: black 2px solid;color: black;font-weight: 400;"></span>元,应找零金额为<span id="changeAmount" style="border-bottom: black 2px solid;color: black;font-weight: 400;"></span>元。
-                </div>
-            </div>
-            <div style="height: 80px;background-color: #6EC1AD;font-size: 40px;line-height: 80px;border-radius: 5px;margin-top: 10px;" id="time"></div>
-        </div>
-    </div>
-</div>
-</body>
-</html>
+        <!--.gao100 {-->
+            <!--height: calc(100% - 50px);-->
+            <!--background: #EBEBE4;-->
+        <!--}</style>-->
+<!--</head>-->
+<!--<body>-->
+<!--<div class="col-sm-12 col-sm-12 col-xs-12 gao2">-->
+    <!--<div class="col-sm-8 col-sm-8 col-xs-12" style="text-align: left;letter-spacing: 30px;">-->
+        <!--<img src="../../thmz/images/taihe-logo3.png"-->
+             <!--style="height: 50px;width:50px;float: left;margin-left: 20px;border-radius: 25px;">-->
+        <!--<span style="margin-left: 30px;">湖南泰和医院</span></div>-->
+    <!--<div class="col-sm-4 col-sm-4 col-xs-12" style="text-align: right;"><i class="fa fa-clock-o">&nbsp;&nbsp;</i><span-->
+            <!--id="dateNow"></span></div>-->
+<!--</div>-->
+<!--<div class="col-sm-12 col-sm-12 col-xs-12 gao100">-->
+    <!--<div class="col-sm-3 col-sm-3 col-xs-12" style="height: 100%;background: white;">-->
+        <!--<img id="headImage" style="margin-top: 10px;width: 80%;">-->
+        <!--<div style="margin-top: 30px;font-size: 35px;color: black;text-align: left;"><i class="fa fa-user">&nbsp;&nbsp;姓名:</i><span-->
+                <!--id="name"></span></div>-->
+        <!--<div style="margin-top: 30px;font-size: 35px;color: black;text-align: left;"><i class="fa fa-user-md">&nbsp;&nbsp;岗位:</i><span-->
+                <!--id="role"></span></div>-->
+        <!--<div style="margin-top: 30px;font-size: 35px;color: black;text-align: left;"><i class="fa fa-bookmark-o">&nbsp;&nbsp;<span-->
+                <!--style="margin-left: 2px;">工号:</span></i><span id="userCode"></span></div>-->
+    <!--</div>-->
+    <!--<div class="col-sm-9 col-sm-9 col-xs-12" style="height: 100%;padding-right: 0px;">-->
+        <!--<div style="height: 100%;">-->
+            <!--<div style="height: calc(100% - 90px);padding-top: 10px;background: white;">-->
+                <!--<div style="height: 30px;background-color: #C4E0F6;width: calc(100% - 10px);margin-left: 5px;border-radius: 5px;color: black;">-->
+                    <!--缴费详情-->
+                <!--</div>-->
+                <!--<div style="padding-top: 60px;font-size: 50px;line-height: 120px;text-indent: 2.8cm;text-align: left;padding-left: 10px;padding-right: 10px;">-->
+                    <!--<span id="pName"></span><span id="pGender"></span>,您好!您本次就诊,应付金额为<span id="needPay" style="border-bottom: black 2px solid;color: black;font-weight: 400;"></span>元,-->
+                    <!--实际支付金额为<span id="pay" style="border-bottom: black 2px solid;color: black;font-weight: 400;"></span>元,应找零金额为<span id="changeAmount" style="border-bottom: black 2px solid;color: black;font-weight: 400;"></span>元。-->
+                <!--</div>-->
+            <!--</div>-->
+            <!--<div style="height: 80px;background-color: #6EC1AD;font-size: 40px;line-height: 80px;border-radius: 5px;margin-top: 10px;" id="time"></div>-->
+        <!--</div>-->
+    <!--</div>-->
+<!--</div>-->
+<!--</body>-->
+<!--</html>-->