policyExamination.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. <!DOCTYPE html>
  2. <html lang="en"
  3. xmlns:th="http://www.thymeleaf.org"
  4. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  5. layout:decorate="~{home/common/common}">
  6. <head>
  7. <meta charset="UTF-8">
  8. <title th:text="${navigation_name}"></title>
  9. </head>
  10. <body layout:fragment="content">
  11. <!-- 头部导航 -->
  12. <div th:replace="~{home/common/header :: header}"></div>
  13. <!--nav-->
  14. <div class="center_nav">
  15. <div th:replace="~{home/common/header :: nav}"></div>
  16. </div>
  17. <div class="policy-bg">
  18. <div class="policy-content">
  19. <!--面包屑-->
  20. <div class="row">
  21. <div class="col-sm-6 col-md-6 col-lg-8 hidden-xs" style="padding-left: 0;">
  22. <ol class="breadcrumb" style="padding-top: 15px;border-bottom: 0px solid #fff;margin-bottom: 0;">
  23. <li>
  24. <a th:href="@{/home}">首页</a>
  25. </li>
  26. <li class="active"><a th:href="@{/home/informList/3}"><cite>[[${navigation_name}]]</cite></a></li>
  27. <li>创新能力体检</li>
  28. </ol>
  29. </div>
  30. <!--搜索框-->
  31. <div class="col-sm-6 col-md-6 col-lg-4 col-xs-12">
  32. <div style="display: inline-block;float: right;padding-top: 10px;width: 100%;">
  33. <span style="display: inline-block;width:100%">
  34. <input type="text" id="keyWord" name="keyword" placeholder="请输入政策搜索关键词" class="layui-input" style="width: 100%;display: inline-block">
  35. </span>
  36. <button id="keywordSearch"style="display: inline-block;float: right;background:none;border:none;">
  37. <i class=" iconfont icon-sousuo"></i>
  38. </button>
  39. </div>
  40. </div>
  41. </div>
  42. <!--内容-->
  43. <div>
  44. <div id="leftBase" style="display: none;">
  45. <input type="hidden" id="satisfaction_score" th:name="satisfaction_score" th:value="${diagnosticReport.satisfaction_score}"/>
  46. <input type="hidden" id="report_feedback" th:name="feedback" th:value="${diagnosticReport.feedback}"/>
  47. <script th:src="@{/js/government/policy/leftBase.js}"></script>
  48. </div>
  49. <!--提醒-->
  50. <!--<div id="tixing" class="modal fade">-->
  51. <!--<div class="modal-dialog">-->
  52. <!--<div class="modal-content radius">-->
  53. <!--<div class="modal-header pingjia">-->
  54. <!--<h3 class="modal-title">提醒</h3>-->
  55. <!--<a class="close" data-dismiss="modal" aria-hidden="true" href="javascript:;" onClick="modalHide()">×</a>-->
  56. <!--</div>-->
  57. <!--<div class="modal-body" style="text-align: center; line-height: 2;">-->
  58. <!--<p>请您在查看完整的诊断报告后,点击此处对报告做满意度评价</p>-->
  59. <!--</div>-->
  60. <!--<div class="modal-footer">-->
  61. <!--<a th:href="@{/home}" class="btn btn-primary" onClick="modalHide()">确定</a>-->
  62. <!--</div>-->
  63. <!--</div>-->
  64. <!--</div>-->
  65. <!--</div>-->
  66. <!--/提醒-->
  67. <div class="title_font">
  68. <!--<h2 style="text-align: center;" class="title_detail">《科技创新能力综合评估诊断报告》</h2>-->
  69. </div>
  70. <div>
  71. <form id="scoreForm">
  72. <div id="container" style="min-width: 400px; max-width: 600px; height: 400px; margin: 0 auto"></div>
  73. <div class="" style="text-align: center; margin-bottom: 30px;">
  74. <input type="hidden" id="cid" th:name="company_id" th:value="${cid}"/>
  75. <input type="hidden" id="diagnostic_score" th:name="diagnostic_score" th:value="${cj}"/>
  76. <input type="hidden" id="startVal" th:name="satisfaction_score" th:value="${diagnosticReport.satisfaction_score}"/>
  77. <!--<input type="hidden" id="feedback" th:name="feedback" th:value="${diagnosticReport.feedback}"/>-->
  78. <input type="hidden" id="id" th:name="id" th:value="${diagnosticReport.id}"/>
  79. <p style="margin-bottom: 20px;">诊断评分:<span id="cj" name="diagnostic_score" class="ft-color-red">0</span>分</p><!--(诊断后显示)-->
  80. <a onclick="checkLogin()" class="btn btn-warning radius btn-bg">我要诊断</a><!--(诊断后不显示)-->
  81. <!--<a class="btn btn-default radius btn-bg" th:href="@{/home/informList/3}">以后再说</a>--><!--(诊断后不显示)-->
  82. <a class="btn btn-default radius btn-bg" href="/serviceleague/home/policy">以后再说</a>
  83. </div>
  84. <div class="fl-pa" style="width: 800px; margin: 0 auto; display: none;">
  85. <table class="ld-table">
  86. <thead>
  87. <tr>
  88. <th>诊断类别</th>
  89. <th width="">得分</th>
  90. <th width="">状态</th>
  91. </tr>
  92. </thead>
  93. <tbody>
  94. <tr th:each="item,iterStat: ${flList}">
  95. <td><input type="hidden" class="step-input" th:name="${'flList['+iterStat.index+'].lb'}" th:value="${item.lb}"/>[[${item.lb}]]</td>
  96. <td><input type="hidden" class="step-input" th:name="${'flList['+iterStat.index+'].cj'}" th:value="${item.cj}"/>[[${item.cj}]]</td>
  97. <td><input type="hidden" class="step-input" th:name="${'flList['+iterStat.index+'].zt'}" th:value="${item.zt}"/>[[${item.zt}]]</td>
  98. </tr>
  99. </tbody>
  100. </table>
  101. <!--(诊断后显示)-->
  102. <div class="jc-qa">
  103. <div class="qa-title clearfix">
  104. <span>问题不足及建议 <i class="iconfont">&#xe639;</i></span>
  105. <a th:href="@{/policy/toRecommendProject}" class="jc-view-more">点击查看我可申报哪些项目>></a>
  106. </div>
  107. <div id="advice">
  108. </div>
  109. </div>
  110. </div>
  111. </form>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. <!--页底-->
  117. <div th:replace="~{home/common/footer :: footer}"></div>
  118. <script th:inline="javascript">
  119. var startVal = "";
  120. $(function(){
  121. $("#cid").val([[${cid}]]);
  122. // //为星星设置hover效果
  123. // var isClicked = false;
  124. // var beforeClickedIndex = -1;
  125. // var clickNum = 0; //点击同一颗星次数
  126. //
  127. // $('.stars li').hover(
  128. // function() {
  129. // if(!isClicked) {
  130. // $(this).css('color', '#F0AD4E');
  131. // var index = $(this).index();
  132. //
  133. // for(var i = 0; i <= index; i++) {
  134. // $('li:nth-child(' + i + ')').css('color', '#F0AD4E');
  135. // }
  136. // }
  137. // },
  138. // function() {
  139. // if(!isClicked) {
  140. // $('li').css('color', '#ADADAD');
  141. // }
  142. // }
  143. // );
  144. //
  145. // //星星点击事件
  146. // $('.stars li').click(function() {
  147. // startVal = $(this).attr("startVal");
  148. // $("#startVal").val(startVal);
  149. // $('li').css('color', '#ADADAD');
  150. // isClicked = true;
  151. // var index = $(this).index();
  152. //
  153. // for(var i = 1; i <= index+1; i++) {
  154. // $('li:nth-child(' + i + ')').css('color', '#F0AD4E');
  155. // if(index == 0) {
  156. // $('#pjdj').text("不满意")
  157. // }
  158. // else if(index == 1) {
  159. // $('#pjdj').text("不太满意")
  160. // }
  161. // else if(index == 2) {
  162. // $('#pjdj').text("马马虎虎")
  163. // }
  164. // else if(index == 3) {
  165. // $('#pjdj').text("比较满意")
  166. // }
  167. // else {
  168. // $('#pjdj').text("满意")
  169. // }
  170. // }
  171. // if(index == beforeClickedIndex) { //两次点击同一颗星星 该星星颜色变化
  172. // clickNum++;
  173. // if(clickNum % 2 == 1) {
  174. // $('li:nth-child(' + (index + 1) + ')').css('color', '#ADADAD');
  175. // $('#pjdj').text("")
  176. // } else {
  177. // $('li:nth-child(' + (index + 1) + ')').css('color', '#F0AD4E');
  178. // }
  179. //
  180. // } else {
  181. // clickNum = 0;
  182. // beforeClickedIndex = index;
  183. // }
  184. // });
  185. //头部导航栏
  186. $("li[role='presentation']").removeClass();
  187. var id = [[${navigation_id}]];
  188. $("#" + id).parent().attr("class", "active");
  189. var pagePath = $("meta[name='_ctx']").attr("content");
  190. pagePath = pagePath.substring(0, pagePath.length - 1);
  191. var type = "", criteria = "0", isinvalid = "0";
  192. layui.use('element', function () {
  193. var element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
  194. });
  195. // 搜索
  196. $("#keywordSearch").on("click",function () {
  197. var keywordVal = encodeURI($("#keyWord").val());
  198. window.location.href = pagePath +"/home/policySearchList?lkey="+keywordVal;
  199. });
  200. var chart = Highcharts.chart('container', {
  201. chart: {
  202. polar: true,
  203. type: 'area'
  204. },
  205. title: {
  206. text: '《科技创新能力综合评估诊断报告》',
  207. style: {
  208. fontSize:'22px'
  209. }
  210. },
  211. pane: {
  212. size: '80%'
  213. },
  214. xAxis: {
  215. tickmarkPlacement: 'on',
  216. lineWidth: 0
  217. },
  218. yAxis: {
  219. gridLineInterpolation: 'polygon',
  220. lineWidth: 0,
  221. min: 0
  222. },
  223. tooltip: {
  224. shared: true,
  225. pointFormat: '<span style="color:{series.color}">{series.name}: <b>{point.y: ,.0f}</b><br/>'
  226. },
  227. legend: {
  228. align: 'right',
  229. verticalAlign: 'top',
  230. y: 70,
  231. layout: 'vertical'
  232. },
  233. series: [{
  234. name: '诊断结果',
  235. pointPlacement: 'on'
  236. }]
  237. });
  238. var data = [0, 0, 0, 0, 0];
  239. var categories = ['主体基础', '人才结构', '营收投入', '知识产权', '研发管理'];
  240. var isPolicy = [[${isPolicy}]];
  241. if (isPolicy == 1){
  242. $("#cj").html([[${cj}]]);
  243. categories = [];
  244. data = [];
  245. var flList = [[${flList}]];
  246. $.each(flList, function(i, item){
  247. categories.push(item.lb);
  248. data.push(parseFloat(item.cj));
  249. });
  250. var html = "";
  251. var qaList = [[${qaList}]];
  252. $.each(qaList, function (i, item) {
  253. html +='<div class="qa-list">' +
  254. ' <div class="qa-name clearfix">' +
  255. ' <span class="qa-list-left ft-color-red">问题不足:</span>' +
  256. ' <div class="qa-list-right ft-bold">'+item.q+'</div>' +
  257. ' </div>' +
  258. ' <div class="clearfix">' +
  259. ' <span class="qa-list-left ft-color-blue">对策建议:</span>' +
  260. ' <div class="qa-list-right">' +
  261. ' <p>'+item.a+'</p>' +
  262. ' </div>' +
  263. ' </div>' +
  264. ' </div>';
  265. });
  266. $("#advice").html(html);
  267. $(".fixed-menu").show();
  268. $(".fl-pa").show();
  269. $("#leftBase").show();
  270. }
  271. chart.xAxis[0].setCategories(categories);
  272. chart.series[0].setData(data);
  273. });
  274. // // 评价弹出层
  275. // function modaldemo(){
  276. // $("#modal-demo").modal("show")
  277. // };
  278. // function modaldemo2(){
  279. // // var data = $("#scoreForm").serializeArray();
  280. // // data.feedback = "123456";
  281. // // console.log(data);
  282. // $("#scoreForm").ajaxSubmit({
  283. // url: pagePath + "/policy/submitFeedback",
  284. // type: "post",
  285. // data: {
  286. // feedback: $("#feedback").val()
  287. // },
  288. // dataType: "json",
  289. // success: function (result) {
  290. //
  291. // },
  292. // error: function () {
  293. // errorMessage('系统错误!');
  294. // }
  295. // });
  296. //
  297. // $("#modal-demo").hide();
  298. // $("#evaluation").modal("show");
  299. // };
  300. // function modalHide() {
  301. // $("#modal-demo").modal("hide");
  302. // $("#evaluation").modal("hide");
  303. // }
  304. // $("#tixing").modal("show");
  305. function checkLogin() {
  306. $.ajax({
  307. url: pagePath + "/home/checkLogin/",
  308. type: "get",
  309. dataType: "json",
  310. data:{
  311. timeStamp: new Date()
  312. },
  313. success: function (result) {
  314. if (result.success) {
  315. var obj = result.obj;
  316. if (obj.isLogin) {
  317. //已登录
  318. if(!obj.userType==3){
  319. errorMessage('仅供企业用户诊断!');
  320. }else{
  321. location.href = pagePath + '/policy/toImprove';
  322. }
  323. } else {
  324. //errorMessage("请登陆!");
  325. location.href = pagePath + "/home/login"
  326. localStorage.setItem("activityUrl", pagePath + '/policy/toImprove');
  327. localStorage.setItem("returnUrl", pagePath + '/policy/toImprove');
  328. localStorage.setItem("requiredUserType", "3");
  329. localStorage.setItem("errorMsg", "仅供企业用户诊断!");
  330. }
  331. } else {
  332. errorMessage(result.message);
  333. }
  334. },
  335. error: function () {
  336. errorMessage('系统错误!');
  337. }
  338. });
  339. }
  340. // var star = [[${diagnosticReport.satisfaction_score}]];
  341. // var feedback = [[${diagnosticReport.feedback}]];
  342. // console.log(star);
  343. // console.log(feedback);
  344. </script>
  345. </body>
  346. </html>