qjt.html 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta name=”SiteName” content=”重庆市南岸区人民政府”>
  7. <meta name="SiteDomain" content="http://www.cqna.gov.cn" />
  8. <meta name="SiteIDCode" content="5001080014">
  9. <meta name="ColumnName" content="政务全景通">
  10. <meta name="ColumnDescription" content="政务全景通" />
  11. <meta name="ColumnKeywords" content="政务全景通" />
  12. <meta name="ColumnType" content="政务全景通" />
  13. <title>政务全景通-重庆市南岸区人民政府网</title>
  14. <script src="https://www.cqna.gov.cn/syygapi/naxsb/3ddemo/three.js"></script>
  15. <script src="https://www.cqna.gov.cn/syygapi/naxsb/3ddemo/Detector.js"></script>
  16. <script src="https://www.cqna.gov.cn/syygapi/naxsb/3ddemo/examples/js/libs/stats.min.js"></script>
  17. <script src="https://www.cqna.gov.cn/syygapi/naxsb/3ddemo/examples/js/controls/OrbitControls.js"></script>
  18. <script src="https://www.cqna.gov.cn/syygapi/naxsb/3ddemo/examples/js/loaders/GLTFLoader.js"></script>
  19. <script src="https://www.cqna.gov.cn/syygapi/naxsb/3ddemo/examples/js/loaders/DRACOLoader.js"></script>
  20. <script src="https://www.cqna.gov.cn/syygapi/naxsb/3ddemo/examples/js/renderers/CSS3DRenderer.js"></script>
  21. <script src="https://www.cqna.gov.cn/syygapi/naxsb/3ddemo/examples/js/renderers/CSS2DRenderer.js"></script>
  22. <!-- 引入 Vue -->
  23. <script src="https://www.cqna.gov.cn/syygapi/naxsb/js/vue.min.js"></script>
  24. <!-- 引入样式 -->
  25. <link rel="stylesheet" href="https://www.cqna.gov.cn/syygapi/naxsb/css/index.css">
  26. <link rel="stylesheet" href="css/qjt.css">
  27. <!-- 引入组件库 -->
  28. <script src="https://www.cqna.gov.cn/syygapi/naxsb/js/index.js"></script>
  29. <script src="js/echarts.min.js"></script>
  30. <script src="https://www.cqna.gov.cn/syygapi/naxsb/js/jquery-3.5.1.min.js"></script>
  31. <script src="https://www.cqna.gov.cn/syygapi/naxsb/js/urljson.js"></script>
  32. <style>
  33. @media screen and (max-width:1600px) {
  34. html,
  35. body {
  36. font-size: 14px;
  37. }
  38. .qjttitle {
  39. height: 95px;
  40. }
  41. .nowtime {
  42. top: 50px;
  43. }
  44. }
  45. @media screen and (max-width:1300px) {
  46. html,
  47. body {
  48. font-size: 10px;
  49. }
  50. .qjttitle {
  51. height: 85px;
  52. }
  53. .nowtime {
  54. top: 45px;
  55. }
  56. }
  57. .building-box {
  58. cursor: pointer;
  59. }
  60. @keyframes blink {
  61. from {
  62. opacity: 1;
  63. }
  64. to {
  65. opacity: 0;
  66. }
  67. }
  68. .finger {
  69. position: absolute;
  70. top: -60px;
  71. right: 20px;
  72. color: #FF8000;
  73. font-size: 20px;
  74. }
  75. .top_t {
  76. padding: 10px 0;
  77. border-bottom: 1px solid #5482F9;
  78. height: 26px;
  79. justify-content: space-between;
  80. }
  81. .top_t,
  82. .bottom-t {
  83. width: 100%;
  84. display: flex;
  85. font-size: 18px;
  86. color: #5482F9;
  87. }
  88. .bottom-t {
  89. flex-direction: column;
  90. overflow-y: scroll;
  91. }
  92. .bottom-t::-webkit-scrollbar {
  93. display: none;
  94. /* Chrome, Safari 和 Opera */
  95. -ms-overflow-style: none;
  96. /* IE 和 Edge */
  97. scrollbar-width: none;
  98. /* Firefox */
  99. }
  100. .bottom-t .item {
  101. width: 100%;
  102. display: flex;
  103. font-size: 16px;
  104. padding: 10px 0;
  105. justify-content: space-between;
  106. border-bottom: 1px solid #5482F9;
  107. }
  108. .t1 {
  109. width: 70px;
  110. text-align: center;
  111. }
  112. .t1 span {
  113. background: #1D96E9;
  114. border: 1px solid #1D96E9;
  115. padding: 0 5px;
  116. border-radius: 2px;
  117. color: #fff;
  118. }
  119. .t2 {
  120. width: 100px;
  121. text-align: center;
  122. overflow: hidden;
  123. word-break: break-all;
  124. white-space: nowrap;
  125. text-overflow: ellipsis;
  126. }
  127. .t3 {
  128. width: calc(100% - 230px);
  129. text-align: center;
  130. overflow: hidden;
  131. word-break: break-all;
  132. white-space: nowrap;
  133. text-overflow: ellipsis;
  134. }
  135. </style>
  136. </head>
  137. <body>
  138. <div style="width:100%;" class="header"></div>
  139. <div class="container" style="position: relative;">
  140. <div class="row">
  141. <div class="col-sm-12">
  142. <div class="model-container"
  143. style="background: linear-gradient(180deg, rgb(246, 250, 255) 10%, rgb(214, 224, 235) 70%);">
  144. <div class="model-view">
  145. <canvas id="canvas-model-view" style="width: 100%;height: 100%;">您的浏览器不支持canvas!</canvas>
  146. </div>
  147. <div id="qjt">
  148. <div class="qjttitle"></div>
  149. <div class="nowtime">{{currentTime }}</div>
  150. <div class="onefloor conList">
  151. <div class="floortitle">叫号数据</div>
  152. <div class="floorcontent">
  153. <div class="list blue">
  154. <div class="top radio">当前排队人数:</div>
  155. <div class="bottom">
  156. <img src="https://www.cqna.gov.cn/syygapi/naxsb/images/floor1.png" alt="">
  157. <div><span class="number" id="currWaitPeople2">-</span>
  158. <span>人</span>
  159. </div>
  160. </div>
  161. </div>
  162. <div class="list yellow">
  163. <div class="top radio">可办事项数量:</div>
  164. <div class="bottom">
  165. <img src="https://www.cqna.gov.cn/syygapi/naxsb/images/floor2.png" alt="">
  166. <div><span class="number" id="taskNum2">-</span>
  167. <span>项</span>
  168. </div>
  169. </div>
  170. </div>
  171. <div class="list green">
  172. <div class="top radio">平均等待时长:</div>
  173. <div class="bottom">
  174. <img src="https://www.cqna.gov.cn/syygapi/naxsb/images/floor3.png" alt="">
  175. <div><span class="number" id="waitTime2">-</span>
  176. <span>分钟</span>
  177. </div>
  178. </div>
  179. </div>
  180. <div class="list purple">
  181. <div class="top radio">窗口数:</div>
  182. <div class="bottom">
  183. <img src="https://www.cqna.gov.cn/syygapi/naxsb/images/floor4.png" alt="">
  184. <div><span class="number" id="winNum2">-</span>
  185. <span>个</span>
  186. </div>
  187. </div>
  188. </div>
  189. </div>
  190. </div>
  191. <div class="twofloor conList">
  192. <div class="floortitle">实时办件详情</div>
  193. <!-- <div class="floortitle">交通配套</div> -->
  194. <div class="floorcontent" style="flex-wrap: nowrap;flex-direction: column;padding: 5px;">
  195. <div class="top_t">
  196. <div class="t1">状态</div>
  197. <div class="t2">受理部门</div>
  198. <div class="t3">办理名称</div>
  199. </div>
  200. <div style="width: 100%;height:100%;overflow:hidden;">
  201. <div class="bottom-t">
  202. <div class="item" v-for="(item, index) in bjxqList">
  203. <div class="title t1"><span
  204. v-if="item.state&&item.state=='在办'">{{item.state}}</span>
  205. <span style="background: #18A65A;border: 1px solid #18A65A;"
  206. v-else>{{item.state}}</span>
  207. </div>
  208. <div class="date t2" :title="item.acceptedDepartment">
  209. {{item.acceptedDepartment}}</div>
  210. <div class="date t3" :title="item.handlingName">
  211. {{item.handlingName?item.handlingName.split("—")[0]:''}}</div>
  212. </div>
  213. </div>
  214. </div>
  215. <!-- <div class="list blue">
  216. <div class="top radio">公交车站:</div>
  217. <div class="bottom">
  218. <img src="https://www.cqna.gov.cn/syygapi/naxsb/images/floor1.png" alt="">
  219. <div>
  220. <span>天福路口站</span>
  221. </div>
  222. </div>
  223. </div>
  224. <div class="list yellow">
  225. <div class="top radio">公交线路:</div>
  226. <div class="bottom">
  227. <img src="https://www.cqna.gov.cn/syygapi/naxsb/images/floor2.png" alt="">
  228. <div>
  229. <span>144路 &nbsp; 180路 &nbsp; 188路 &nbsp; 345路</span>
  230. </div>
  231. </div>
  232. </div>
  233. <div class="list green">
  234. <div class="top radio">停车场:</div>
  235. <div class="bottom">
  236. <img src="https://www.cqna.gov.cn/syygapi/naxsb/images/floor3.png" alt="">
  237. <div>
  238. <span style="white-space: nowrap;">行政中心室外/地下停车场</span><br />盛捷公寓停车场
  239. </div>
  240. </div>
  241. </div>-->
  242. </div>
  243. </div>
  244. <div class="blsl conList">
  245. <div class="floortitle">累计办理数量</div>
  246. <div class="floorcontent">
  247. <div class="list">
  248. <div class="img">
  249. <img src="https://www.cqna.gov.cn/syygapi/naxsb/images/blsl4.png" alt="">
  250. </div>
  251. <div class="right">
  252. <span>本日办理数量</span>
  253. <div class="number">
  254. <span id="currDayTaskNum">324</span>
  255. <span>件</span>
  256. </div>
  257. </div>
  258. </div>
  259. <div class="list">
  260. <div class="img">
  261. <img src="https://www.cqna.gov.cn/syygapi/naxsb/images/blsl1.png" alt="">
  262. </div>
  263. <div class="right">
  264. <span>本周办理数量</span>
  265. <div class="number">
  266. <span id="currWeekTaskNum">7152</span>
  267. <span>件</span>
  268. </div>
  269. </div>
  270. </div>
  271. <div class="list">
  272. <div class="img">
  273. <img src="https://www.cqna.gov.cn/syygapi/naxsb/images/blsl2.png" alt="">
  274. </div>
  275. <div class="right">
  276. <span>本月办理数量</span>
  277. <div class="number">
  278. <span id="currMonthTaskNum">78</span>
  279. <span>件</span>
  280. </div>
  281. </div>
  282. </div>
  283. <div class="list">
  284. <div class="img">
  285. <img src="https://www.cqna.gov.cn/syygapi/naxsb/images/blsl3.png" alt="">
  286. </div>
  287. <div class="right">
  288. <span>本年办理数量</span>
  289. <div class="number">
  290. <span id="currYearTaskNum">78</span>
  291. <span>件</span>
  292. </div>
  293. </div>
  294. </div>
  295. </div>
  296. </div>
  297. <div class="pdgdf conList">
  298. <div class="floortitle">大厅取号高低峰图</div>
  299. <div class="floorcontent">
  300. <div id="pdgdfechart" style="width: 100%;height: 100%;"></div>
  301. </div>
  302. </div>
  303. </div>
  304. </div>
  305. </div>
  306. </div>
  307. <div id="loading">
  308. <i class="fa fa-spinner fa-spin fa-fw"></i>加载中...
  309. </div>
  310. </div>
  311. <div style="width:100%;" class="footer"></div>
  312. </body>
  313. <script>
  314. $(function () {
  315. /*公共部分
  316. * 导航栏
  317. * footer CopyRight
  318. */
  319. $(".header").load('https://www.cqna.gov.cn/syygapi/naxsb/top/top_style.html');
  320. $(".footer").load('https://www.cqna.gov.cn/syygapi/naxsb/footer/footer.html');
  321. });
  322. </script>
  323. <script src="https://www.cqna.gov.cn/syygapi/naxsb/js/jquery-3.5.1.min.js"></script>
  324. <script>
  325. // 判断浏览器是否支持 webgl
  326. if (!Detector.webgl) Detector.addGetWebGLMessage();
  327. let mwidth = window.innerWidth;
  328. let mheight = window.innerHeight;
  329. // 初始化场景
  330. let scene = new THREE.Scene();
  331. // 初始化摄像机
  332. let camera = new THREE.PerspectiveCamera(10, mwidth / mheight, 1, 1000000);
  333. // camera.position.set(90000, 41120, 81120);
  334. camera.position.set(50000, 71120, 51120);
  335. camera.lookAt(new THREE.Vector3(0, 0, 0));
  336. let renderer = new THREE.WebGLRenderer({
  337. canvas: document.getElementById("canvas-model-view"),
  338. antialias: true, // 设置抗锯齿
  339. alpha: true, // 背景透明
  340. autoClear: true,
  341. logarithmicDepthBuffer: true
  342. });
  343. // 设置渲染器背景颜色
  344. // renderer.setClearColor(0xCFD1D3, 0.0);
  345. renderer.setSize(mwidth, mheight);
  346. // 设置渲染编码为 RGB 模式编码
  347. // renderer.outputEncoding = THREE.sRGBEncoding;
  348. // renderer.toneMapping = THREE.ACESFilmicToneMapping;
  349. // renderer.toneMappingExposure = 2.0;
  350. renderer.shadowMap.enabled = true;
  351. // 2D 文字渲染
  352. let css2Renderer = new THREE.CSS2DRenderer();
  353. css2Renderer.setSize(mwidth, mheight);
  354. css2Renderer.domElement.style.position = 'absolute';
  355. css2Renderer.domElement.style.top = '0px';
  356. // 设置.pointerEvents=none,解决 HTM L元素标签对 threejs canvas 画布鼠标事件的遮挡
  357. css2Renderer.domElement.style.pointerEvents = 'none';
  358. document.body.appendChild(css2Renderer.domElement);
  359. // 四个方向的平行光
  360. // let directionalLight = new THREE.DirectionalLight(0xffffff, .2);
  361. // directionalLight.position.set(1, 0, 0);
  362. // let directionalLight3 = new THREE.DirectionalLight(0xffffff, .2);
  363. // directionalLight3.position.set(-1, 0, 0);
  364. // let directionalLight1 = new THREE.DirectionalLight(0xffffff, .2);
  365. // directionalLight1.position.set(0, 0, 1);
  366. // let directionalLight2 = new THREE.DirectionalLight(0xffffff, .2);
  367. // directionalLight2.position.set(0, 0, -1);
  368. // scene.add(directionalLight);
  369. // scene.add(directionalLight1);
  370. // scene.add(directionalLight2);
  371. // scene.add(directionalLight3);
  372. // 环境光
  373. let ambient = new THREE.AmbientLight(0x404040, 0.1);
  374. scene.add(ambient);
  375. var pointLight = new THREE.PointLight(0xf0e68c, 0.9, 12500);
  376. pointLight.position.set(0, 8500, 0);
  377. pointLight.castShadow = true;
  378. pointLight.shadow.camera.near = 1;
  379. pointLight.shadow.camera.far = 15000;
  380. pointLight.shadow.mapSize.width = 10240;
  381. pointLight.shadow.mapSize.height = 10240;
  382. scene.add(pointLight);
  383. // 加载模型文件
  384. let gLTFLoader = new THREE.GLTFLoader()
  385. let dracoLoader = new THREE.DRACOLoader();
  386. dracoLoader.setDecoderPath('https://www.cqna.gov.cn/syygapi/naxsb/3ddemo/examples/js/libs/draco/gltf/');
  387. dracoLoader.setDecoderConfig({
  388. type: 'js'
  389. });
  390. gLTFLoader.setDRACOLoader(dracoLoader);
  391. gLTFLoader.load('https://www.cqna.gov.cn/syygapi/naxsb/3ddemo/model/27.gltf', function (obj) {
  392. obj.scene.traverse(function (child) {
  393. if (child.isMesh) {
  394. // child.material.envMap = undefined;
  395. child.frustumCulled = false;
  396. child.castShadow = true;
  397. child.receiveShadow = true;
  398. child.material.emissive = child.material.color;
  399. child.material.emissiveMap = child.material.map;
  400. child.material.transparent = true;
  401. child.material.emissiveIntensity = 0.8;
  402. // child.material.opacity = 0.8;
  403. // child.material.color = 0xd2d2d2;
  404. if (child.name) {
  405. const div = document.createElement('div');
  406. div.id = child.uuid;
  407. div.style = 'color:red;';
  408. div.setAttribute("data", child.name);
  409. div.innerHTML = '<p data-name="' + child.name + '"></p>';
  410. let tag = new THREE.CSS2DObject(div);
  411. // let tag = new THREE.CSS3DSprite(div);
  412. // tag.position.set(0, 0, 0);
  413. // child.add(tag);
  414. }
  415. // 一号楼
  416. if (child.name == 'yihaolou') {
  417. const div = document.createElement('div');
  418. div.id = child.uuid;
  419. let html = '';
  420. html += '<div class="building-box" style="width: 100px; top: 70px; left: -48px;">';
  421. html += '<div class="building-text" style="background: #1D96E9;" onclick="handleClick()">';
  422. html += '<span>1号楼</span><span style="font-size: 10px;">社保大厅、医保大厅</span>';
  423. html += '</div>';
  424. html += '<svg width="10" height="10"><polygon id="triangle" points="0,0 10,0 5,10" fill="#1D96E9"/></svg>';
  425. html += '</div>';
  426. html += '<div class="building-line" style="border-left: 1px dashed #1D96E9; height: 100px; top: 110px;"></div>';
  427. html += `<div style="font-size: 12px;background: #18A65A;width: 100px;top: 326px;left: 58px;position: absolute;display: flex;flex-direction: column;align-items: flex-start;color: #fff;">
  428. <span>地下停车场入口⬇</span>
  429. </div>`
  430. html += '<div class="building-line" style="border-left: 1px dashed #1D96E9; height: 100px; top: 326px;left: 58px;"></div>';
  431. // html += '<div class="building-bottom" style="background: #1D96E9;"></div>';
  432. div.innerHTML = html;
  433. let tag = new THREE.CSS2DObject(div);
  434. child.add(tag);
  435. }
  436. // 二号楼
  437. if (child.name == 'erhaolou') {
  438. const div = document.createElement('div');
  439. div.id = child.uuid;
  440. let html = '';
  441. html += '<div class="building-box" style="width: 100px; top: 28px; left: -48px;">';
  442. html += '<div class="finger" style="animation:blink 1s infinite;"><img src="images/finger.png">点我</div>';
  443. html += '<div class="building-text" style="background: #1D96E9;">';
  444. html += '<span>2号楼</span></span></span><span style="font-size: 10px;">南岸区政务服务中心</span>';
  445. html += '</div>';
  446. html += '<svg width="10" height="10"><polygon id="triangle" points="0,0 10,0 5,10" fill="#1D96E9"/></svg>';
  447. html += '</div>';
  448. html += '<div class="building-line" style="border-left: 1px dashed #1D96E9; height: 100px; top: 72px;"></div>';
  449. // html += '<div class="building-bottom" style="background: #1D96E9;"></div>';
  450. div.innerHTML = html;
  451. let tag = new THREE.CSS2DObject(div);
  452. child.add(tag);
  453. div.style.pointerEvents = 'auto';
  454. div.addEventListener('click', function (event) {
  455. window.location.href = 'https://www.cqna.gov.cn/syygapi/naxsb/floorone.html?floorid=' + 2;
  456. });
  457. }
  458. // 三号楼
  459. if (child.name == 'sanhaolou') {
  460. const div = document.createElement('div');
  461. div.id = child.uuid;
  462. let html = '';
  463. html += '<div class="building-box" style="width: 50px; top: 73px; left: -23px;">';
  464. html += '<div class="building-text" style="background: #1D96E9;">';
  465. html += '<span>3号楼</span><span style="font-size: 10px;"></span>';
  466. html += '</div>';
  467. html += '<svg width="10" height="10"><polygon id="triangle" points="0,0 10,0 5,10" fill="#1D96E9"/></svg>';
  468. html += '</div>';
  469. html += '<div class="building-line" style="border-left: 1px dashed #1D96E9; height: 100px; top: 90px;"></div>';
  470. // html += '<div class="building-bottom" style="background: #1D96E9;"></div>';
  471. div.innerHTML = html;
  472. let tag = new THREE.CSS2DObject(div);
  473. child.add(tag);
  474. }
  475. // 四号楼
  476. if (child.name == 'sihaolou-Chrome') {
  477. const div = document.createElement('div');
  478. div.id = child.uuid;
  479. let html = '';
  480. html += '<div class="building-box">';
  481. html += `<div class="text" style="top: -30px;left: 146px;position: absolute;display: flex;flex-direction: column;align-items: flex-start;color: #1A95EB;">
  482. <span style="font-size: 18px;font-weight: bold;margin-bottom: 5px;">地铁6号线</span>
  483. <span>邱家湾站2B出口</span>
  484. <span>距离:800米</span>
  485. <img src="https://www.cqna.gov.cn/syygapi/naxsb/images/qjtArrow.png" alt="" style="height: 1.75rem;">
  486. </div>`
  487. html += '<div class="building-text">';
  488. html += '<span>4号楼</span><span style="font-size: 10px;">商务打印、小卖部、食堂</span>';
  489. html += '</div>';
  490. html += '<svg width="10" height="10"><polygon id="triangle" points="0,0 10,0 5,10" fill="#18A65A"/></svg>';
  491. html += '</div>';
  492. html += '<div class="building-line"></div>';
  493. // html += '<div class="building-bottom"></div>';
  494. div.innerHTML = html;
  495. let tag = new THREE.CSS2DObject(div);
  496. child.add(tag);
  497. }
  498. // ----
  499. // if (child.name == 'chewei-dizhuan') {
  500. if (child.name == 'chedao-chedao') {
  501. const div = document.createElement('div');
  502. div.id = child.uuid;
  503. let html = '';
  504. html += '<div style="font-size: 12px; width: 80px; text-align: center;">';
  505. html += '<div class="building-text" style="background: #18A65A; margin-bottom: -2px;">';
  506. html += '<span style="text-align: left;">停车场</span>';
  507. html += '<span style="font-size: 10px; text-align: left;">空余车位:-</span>';
  508. html += '<span style="font-size: 10px; text-align: left;">空余充电桩:-</span>';
  509. html += '</div>';
  510. // html += '<svg width="15" height="15"><polygon id="triangle" points="0,0 15,0 1,15" fill="#18A65A"/></svg>';
  511. html += '</div>';
  512. div.innerHTML = html;
  513. let tag = new THREE.CSS2DObject(div);
  514. child.add(tag);
  515. }
  516. }
  517. });
  518. scene.add(obj.scene);
  519. // 计算模型的统计中心
  520. const box = new THREE.Box3().setFromObject(obj.scene);
  521. const center = new THREE.Vector3();
  522. box.getCenter(center);
  523. // 将模型的统计中心与其本身的原始统计中心进行对齐
  524. obj.scene.position.sub(center);
  525. // 设置摄像机位置,使模型处于视角中心
  526. //camera.position.z = box.max.length() * 3;
  527. //camera.lookAt(obj.scene.position); // 确保摄像机看向模型
  528. document.getElementById('loading').style.display = 'none';
  529. render();
  530. }, function (xhr) {
  531. }, function (error) {
  532. })
  533. function render() {
  534. // 执行渲染操作
  535. css2Renderer.render(scene, camera)
  536. renderer.render(scene, camera);
  537. }
  538. render();
  539. // 创建控件对象
  540. let controls = new THREE.OrbitControls(camera, renderer.domElement);
  541. controls.enableZoom = false
  542. // controls.enableRotate = false
  543. controls.maxPolarAngle = Math.PI / 2
  544. controls.minPolarAngle = 0
  545. // 监听鼠标、键盘事件
  546. controls.addEventListener('change', render);
  547. // 辅助线
  548. let axisHelper = new THREE.AxisHelper(50050);
  549. // scene.add(axisHelper);
  550. </script>
  551. <script>
  552. // 初始化Vue实例
  553. new Vue({
  554. el: '#qjt',
  555. data: function () {
  556. return {
  557. currentTime: "",
  558. bjxqList: []
  559. };
  560. },
  561. created() {
  562. this.updateTime();
  563. setInterval(this.updateTime, 1000); // 每秒更新一次时间
  564. this.getSSbj();
  565. },
  566. beforeDestroy() {
  567. this.stopClock();
  568. },
  569. methods: {
  570. updateTime() {
  571. // 获取当前日期时间对象
  572. const now = new Date();
  573. // 获取年月日时分秒,并补零
  574. const year = String(now.getFullYear()).padStart(4, '0');
  575. const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份是从0开始的
  576. const day = String(now.getDate()).padStart(2, '0');
  577. const hours = String(now.getHours()).padStart(2, '0');
  578. const minutes = String(now.getMinutes()).padStart(2, '0');
  579. const seconds = String(now.getSeconds()).padStart(2, '0');
  580. // 组合成格式化的字符串
  581. const formattedDateTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  582. this.currentTime = formattedDateTime;
  583. },
  584. addKeyFrames(y) {
  585. let i = 0
  586. setInterval(function () {
  587. if (i >= y) return i = 0
  588. i++
  589. document.querySelector('.bottom-t').style.marginTop = `-${i}px`
  590. }, 50);
  591. },
  592. getSSbj() {
  593. let that = this;
  594. $.ajax({
  595. url: 'https://data.cqna.gov.cn:8088/kshapi/api/page2/top2',
  596. type: "get",
  597. dataType: "json",
  598. async: false,
  599. success: function (data) {
  600. var data = data.data;
  601. that.bjxqList = data.data;
  602. }
  603. });
  604. var height = document.querySelector('.item') ? document.querySelector('.item').clientHeight - 20 : 0;
  605. if (this.bjxqList.length) {
  606. this.addKeyFrames(height * this.bjxqList.length);
  607. }
  608. }
  609. }
  610. });
  611. </script>
  612. <script>
  613. var chartDom = document.getElementById('pdgdfechart');
  614. var myChart = echarts.init(chartDom);
  615. var option;
  616. option = {
  617. color: ['#80FFA5'],
  618. tooltip: {
  619. trigger: 'axis',
  620. axisPointer: {
  621. type: 'cross',
  622. label: {
  623. backgroundColor: '#6a7985'
  624. }
  625. }
  626. },
  627. grid: {
  628. left: '3%',
  629. right: '4%',
  630. bottom: '3%',
  631. containLabel: true
  632. },
  633. xAxis: [
  634. {
  635. type: 'category',
  636. boundaryGap: false,
  637. data: ['8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:30'],
  638. axisLabel: {
  639. color: 'rgba(26,149,235,0.5);' // 这里设置刻度字的颜色为蓝色
  640. }
  641. }
  642. ],
  643. yAxis: [
  644. {
  645. type: 'value',
  646. name: '人次',
  647. nameTextStyle: {
  648. color: "#2A6594",
  649. fontSize: '14'
  650. },
  651. axisTick: {
  652. show: true // 显示Y轴刻度线
  653. },
  654. axisLine: {
  655. show: true
  656. },
  657. axisLabel: {
  658. color: 'rgba(26,149,235,0.5);' // 这里设置刻度字的颜色为蓝色
  659. }
  660. }
  661. ],
  662. series: [
  663. {
  664. name: '大厅取号高低峰指数',
  665. type: 'line',
  666. stack: 'Total',
  667. smooth: true,
  668. lineStyle: {
  669. width: 0
  670. },
  671. // showSymbol: false,
  672. areaStyle: {
  673. opacity: 0.8,
  674. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  675. {
  676. offset: 0,
  677. color: 'rgb(17 126 202)'
  678. },
  679. {
  680. offset: 1,
  681. color: 'rgb(192 215 231)'
  682. }
  683. ])
  684. },
  685. emphasis: {
  686. focus: 'series'
  687. },
  688. data: [14, 72, 138, 150, 26, 2, 60, 154, 100, 44]
  689. }
  690. ]
  691. };
  692. option && myChart.setOption(option);
  693. </script>
  694. <script>
  695. var path = "https://www.cqna.gov.cn/data";
  696. //办件数加载
  697. function handlingNumber(area, timeType) {
  698. var data1 = ''
  699. $.ajax({
  700. url: path + "/department/getOfficeNumberByAreaInfo", //url地址
  701. dataType: "json", //返回的数据类型
  702. type: "get", //发起请求的方式
  703. cache: false,
  704. async: false,
  705. data: {
  706. "area": area,
  707. "timeType": timeType
  708. },
  709. success: function (data) {
  710. data1 = data.data
  711. },
  712. error: function () {
  713. alert('网络错误,请稍后再试!');
  714. }
  715. });
  716. return data1;
  717. }
  718. function animateValue(obj, start, end, duration) {
  719. let startTimestamp = null;
  720. const step = (timestamp) => {
  721. if (!startTimestamp) startTimestamp = timestamp;
  722. const progress = Math.min((timestamp - startTimestamp) / duration, 1);
  723. obj.innerHTML = Math.floor(progress * (end - start) + start);
  724. if (progress < 1) {
  725. window.requestAnimationFrame(step);
  726. } else {
  727. obj.classList.remove('animate');
  728. }
  729. };
  730. obj.classList.add('animate');
  731. window.requestAnimationFrame(step);
  732. }
  733. const time = 2 * 1000;
  734. let that = this;
  735. //获取当前排队人数和分钟数
  736. function getCurrentPerson() {
  737. $.ajax({
  738. url: conpath + "/qjt/",
  739. type: "get",
  740. dataType: "json",
  741. async: false,
  742. success: function (data) {
  743. const waitTime2 = document.getElementById('waitTime2');
  744. animateValue(waitTime2, 0, data.data[0], time);
  745. const currWaitPeople2 = document.getElementById('currWaitPeople2');
  746. animateValue(currWaitPeople2, 0, data.data[1], time);
  747. }
  748. })
  749. }
  750. getCurrentPerson();
  751. // 获取定时器的ID,以便之后可以清除它
  752. var intervalId = setInterval(getCurrentPerson, 1800000);
  753. //获取当前办理数量
  754. function getCurrentItem() {
  755. $.ajax({
  756. url: conpath + "/solveAffairs/",
  757. type: "get",
  758. dataType: "json",
  759. async: false,
  760. success: function (data) {
  761. var data = data.data;
  762. const currDayTaskNumElement = document.getElementById('currDayTaskNum');
  763. animateValue(currDayTaskNumElement, 0, data[0], time);
  764. const currWeekTaskNumElement = document.getElementById('currWeekTaskNum');
  765. animateValue(currWeekTaskNumElement, 0, data[1], time);
  766. const currMonthTaskNumElement = document.getElementById('currMonthTaskNum');
  767. animateValue(currMonthTaskNumElement, 0, data[2], time);
  768. const currYearTaskNumElement = document.getElementById('currYearTaskNum');
  769. animateValue(currYearTaskNumElement, 0, data[3], time);
  770. }
  771. })
  772. }
  773. getCurrentItem();
  774. // 获取定时器的ID,以便之后可以清除它
  775. var intervalId1 = setInterval(getCurrentItem, 300000);
  776. // 当用户离开页面时清除定时器
  777. window.addEventListener('beforeunload', function () {
  778. clearInterval(intervalId);
  779. clearInterval(intervalId1);
  780. });
  781. // // 1号楼当前排队人数
  782. // const currWaitPeopleElement = document.getElementById('currWaitPeople');
  783. // animateValue(currWaitPeopleElement, 0, 12, time);
  784. // // 1号楼可办事项数量
  785. // const taskNumElement = document.getElementById('taskNum');
  786. // animateValue(taskNumElement, 0, 798, time);
  787. // // 1号楼平均等待时长
  788. // const waitTimeElement = document.getElementById('waitTime');
  789. // animateValue(waitTimeElement, 0, 2, time);
  790. // // 1号楼窗口数
  791. // const winNumElement = document.getElementById('winNum');
  792. // animateValue(winNumElement, 0, 28, time);
  793. // 2号楼当前排队人数
  794. // const currWaitPeopleElement2 = document.getElementById('currWaitPeople2');
  795. // animateValue(currWaitPeopleElement2, 0, 6, time);
  796. // 2号楼可办事项数量
  797. const taskNumElement2 = document.getElementById('taskNum2');
  798. animateValue(taskNumElement2, 0, 798, time);
  799. // 2号楼窗口数
  800. const winNumElement2 = document.getElementById('winNum2');
  801. animateValue(winNumElement2, 0, 78, time);
  802. // //本月加载
  803. // var data = handlingNumber(1, 2)
  804. // let date = new Date()
  805. // const nowWeek = date.getDay();
  806. // const noMonth = date.getDate()
  807. // const noyear = date.getFullYear()
  808. // const currWeekTaskNumElement = document.getElementById('currWeekTaskNum');
  809. // if (nowWeek > 5 || nowWeek === 0) {
  810. // animateValue(currWeekTaskNumElement, 0, 5 * 324, time);
  811. // } else {
  812. // animateValue(currWeekTaskNumElement, 0, nowWeek * 324, time);
  813. // }
  814. // // // 本月办理数量
  815. // const currMonthTaskNumElement = document.getElementById('currMonthTaskNum');
  816. // animateValue(currMonthTaskNumElement, 0, ((parseInt(noMonth / 7)) * 5 + noMonth % 7) * 324, time);
  817. // // 本年办理数量
  818. // const month = date.getMonth()
  819. // const currYearTaskNumElement = document.getElementById('currYearTaskNum');
  820. // animateValue(currYearTaskNumElement, 0, ((month * 22) * 324) + (((parseInt(noMonth / 7)) * 5 + noMonth % 7) * 324), time);
  821. // //本周加载
  822. // var data = handlingNumber(1, 1)
  823. // // 本周办理数量
  824. // const currTaskNumElement = document.getElementById('currDayTaskNum');
  825. // animateValue(currTaskNumElement, 0, data.acceptNumber, time);
  826. // //本年加载
  827. // var data = handlingNumber(1, 3)
  828. </script>
  829. </html>