完成签约之后直接添加人员,录入下发凭证
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

428 lines
12 KiB

  1. webpackJsonp([89],{
  2. /***/ "i78P":
  3. /***/ (function(module, exports) {
  4. // removed by extract-text-webpack-plugin
  5. /***/ }),
  6. /***/ "tPny":
  7. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  10. // EXTERNAL MODULE: ./src/api/allFun.js
  11. var allFun = __webpack_require__("mprh");
  12. // EXTERNAL MODULE: ./src/common/echart/index.vue + 4 modules
  13. var echart = __webpack_require__("C3+4");
  14. // EXTERNAL MODULE: ./src/components/scrolllist/index.vue + 2 modules
  15. var scrolllist = __webpack_require__("Lbay");
  16. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/presentationPage/airQualityMonitorHomePage.vue
  17. //
  18. //
  19. //
  20. //
  21. //
  22. //
  23. //
  24. //
  25. //
  26. //
  27. //
  28. //
  29. //
  30. //
  31. //
  32. //
  33. //
  34. //
  35. //
  36. //
  37. //
  38. //
  39. //
  40. //
  41. //
  42. //
  43. //
  44. //
  45. //
  46. //
  47. //
  48. // import Schart from "vue-schart";
  49. // import scrollvue from "../components/scrollvue"
  50. /* harmony default export */ var airQualityMonitorHomePage = ({
  51. name: "dashboard",
  52. data: function data() {
  53. return {
  54. statisticalParameters: [{
  55. title: '设备总数',
  56. num: '0',
  57. company: '个'
  58. }, {
  59. title: '在线设备',
  60. num: '0',
  61. company: '个'
  62. }, {
  63. title: '离线设备',
  64. num: '0',
  65. company: '个'
  66. }, {
  67. title: '异常设备',
  68. num: '0',
  69. company: '个'
  70. }, {
  71. title: 'PM2.5异常',
  72. num: '0',
  73. company: '个'
  74. }, {
  75. title: 'PM10异常',
  76. num: '0',
  77. company: '个'
  78. }],
  79. animate: false,
  80. name: localStorage.getItem("ms_username"),
  81. options: {
  82. title: {
  83. text: '一周空气质量走势图'
  84. },
  85. tooltip: {
  86. trigger: 'axis'
  87. },
  88. color: ['#91cc75'],
  89. legend: {
  90. data: ['空气质量'],
  91. textStyle: "#333"
  92. },
  93. textStyle: {
  94. color: "#333"
  95. },
  96. grid: {
  97. left: '3%',
  98. right: '4%',
  99. bottom: '3%',
  100. containLabel: true
  101. },
  102. xAxis: {
  103. type: 'category',
  104. boundaryGap: false,
  105. data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
  106. axisLabel: {
  107. textStyle: {
  108. color: "#666",
  109. margin: 15
  110. }
  111. }
  112. },
  113. yAxis: {
  114. type: 'value',
  115. axisLabel: {
  116. textStyle: {
  117. color: "#666",
  118. margin: 15
  119. }
  120. }
  121. },
  122. series: [{
  123. name: '空气质量',
  124. type: 'line',
  125. // stack: 'Total',
  126. data: [0, 0, 0, 0, 0, 0, 0]
  127. }]
  128. },
  129. options2: {
  130. title: {
  131. text: '电量分布情况'
  132. },
  133. tooltip: {
  134. trigger: 'item'
  135. },
  136. legend: {
  137. top: '5%',
  138. left: 'center',
  139. textStyle: {
  140. color: "#666"
  141. }
  142. },
  143. series: [{
  144. name: '电量情况',
  145. type: 'pie',
  146. radius: ['40%', '70%'],
  147. avoidLabelOverlap: false,
  148. itemStyle: {
  149. borderRadius: 10,
  150. borderColor: '#fff',
  151. borderWidth: 2
  152. },
  153. label: {
  154. show: false,
  155. position: 'center',
  156. color: "#666"
  157. },
  158. emphasis: {
  159. label: {
  160. show: true,
  161. fontSize: '20',
  162. fontWeight: 'bold'
  163. }
  164. },
  165. labelLine: {
  166. // show: false,
  167. normal: {
  168. length: 15, // 指示线长度
  169. lineStyle: {
  170. color: "#595959" // 指示线颜色
  171. }
  172. }
  173. },
  174. data: [{
  175. value: 0,
  176. name: '0-20%'
  177. }, {
  178. value: 0,
  179. name: '20%-40%'
  180. }, {
  181. value: 0,
  182. name: '40%-60%'
  183. }, {
  184. value: 0,
  185. name: '60%-80%'
  186. }, {
  187. value: 0,
  188. name: '80%-100%'
  189. }]
  190. }]
  191. },
  192. options3: {
  193. title: {
  194. text: '设备电量统计'
  195. },
  196. tooltip: {
  197. trigger: 'axis'
  198. },
  199. color: ['#fac858', '#91cc75', '#ee6666'],
  200. legend: {
  201. data: ['OTA未升级', 'OTA已升级', '低电设备'],
  202. textStyle: "#333"
  203. },
  204. textStyle: {
  205. color: "#333"
  206. },
  207. grid: {
  208. left: '3%',
  209. right: '4%',
  210. bottom: '3%',
  211. containLabel: true
  212. },
  213. xAxis: {
  214. type: 'category',
  215. boundaryGap: false,
  216. data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
  217. axisLabel: {
  218. textStyle: {
  219. color: "#666",
  220. margin: 15
  221. }
  222. }
  223. },
  224. yAxis: {
  225. type: 'value',
  226. axisLabel: {
  227. textStyle: {
  228. color: "#666",
  229. margin: 15
  230. }
  231. }
  232. },
  233. series: [{
  234. name: 'OTA未升级',
  235. type: 'line',
  236. // stack: 'center',
  237. data: [0, 0, 0, 0, 0, 0, 0]
  238. }, {
  239. name: 'OTA已升级',
  240. type: 'line',
  241. // stack: 'Total',
  242. data: [0, 0, 0, 0, 0, 0, 0]
  243. }, {
  244. name: '低电设备',
  245. type: 'line',
  246. // stack: 'bottom',
  247. data: [0, 0, 0, 0, 0, 0, 0]
  248. }]
  249. },
  250. items: [],
  251. alertTypeList: [],
  252. timerairqu: null
  253. };
  254. },
  255. components: {
  256. Echart: echart["a" /* default */],
  257. scrolllist: scrolllist["a" /* default */]
  258. // Schart,
  259. // scrollvue
  260. },
  261. beforeDestroy: function beforeDestroy() {
  262. window.clearInterval(this.timerairqu);
  263. this.timerairqu = null;
  264. },
  265. created: function created() {
  266. this.alertTypeList = this.$MANUFACTURER.alertType.airCleaningLog;
  267. },
  268. mounted: function mounted() {
  269. var _this = this;
  270. this.getAnalysis();
  271. this.timerairqu = window.setInterval(function () {
  272. setTimeout(_this.getlog, 0);
  273. }, 4000);
  274. // setInterval(this.scroll, 1000);
  275. },
  276. methods: {
  277. getlog: function getlog() {
  278. var _this2 = this;
  279. this.getAnalysis();
  280. var data = {
  281. deviceType: 10
  282. };
  283. allFun["a" /* default */].getWarningLog(data, function (callback) {
  284. if (callback.success) {
  285. callback.data.list.map(function (li, index) {
  286. li['alertTypeDesc'] = '';
  287. var alertTypeDesc = _this2.alertTypeList.filter(function (item) {
  288. return item.code == li.alertType;
  289. })[0];
  290. if (alertTypeDesc) {
  291. li['alertTypeDesc'] = alertTypeDesc.desc;
  292. } else {
  293. li['alertTypeDesc'] = '';
  294. }
  295. var resultStatus = allFun["a" /* default */].judgmentTimestamp(li.alertTime);
  296. if (resultStatus) {
  297. setTimeout(function () {
  298. _this2.$notify({
  299. title: li.alertTypeDesc,
  300. offset: 200,
  301. duration: 2000,
  302. message: li.alertTypeDesc,
  303. type: 'warning'
  304. });
  305. }, 3000);
  306. } else {}
  307. });
  308. }
  309. });
  310. },
  311. getAnalysis: function getAnalysis() {
  312. var _this3 = this;
  313. allFun["a" /* default */].getAnalysis("", 10, function (callback) {
  314. _this3.statisticalParameters[0].num = callback.total || 0;
  315. _this3.statisticalParameters[1].num = callback.onlineTotal || 0;
  316. _this3.statisticalParameters[2].num = callback.offlineTotal || 0;
  317. _this3.statisticalParameters[3].num = callback.abnormalTotal || 0;
  318. _this3.setOptionsData(callback);
  319. });
  320. allFun["a" /* default */].getAlertTypeOrder('', 10, function (callback) {
  321. if (callback.success) {
  322. if (callback.data.length > 0) {
  323. var days = allFun["a" /* default */].classification();
  324. var array = allFun["a" /* default */].groupBy(callback.data, ["code", "order"], function (cul, data) {
  325. return cul + 1;
  326. });
  327. var loopObjectData = allFun["a" /* default */].loopObject(array, _this3.alertTypeList);
  328. var legendData = [];
  329. loopObjectData.map(function (li) {
  330. legendData.push(li.name);
  331. });
  332. _this3.options.series = loopObjectData;
  333. _this3.options.legend.data = legendData;
  334. _this3.options.xAxis.data = days;
  335. }
  336. } else {
  337. _this3.$message.error(callback.message);
  338. }
  339. });
  340. },
  341. setOptionsData: function setOptionsData(data) {
  342. var options2 = this.options2;
  343. options2.series[0].data[0].value = data.batteryLevel1;
  344. options2.series[0].data[1].value = data.batteryLevel2;
  345. options2.series[0].data[2].value = data.batteryLevel3;
  346. options2.series[0].data[3].value = data.batteryLevel4;
  347. options2.series[0].data[4].value = data.batteryLevel5;
  348. },
  349. tgces: function tgces() {
  350. this.$router.push({
  351. path: "/test"
  352. });
  353. },
  354. scroll: function scroll() {
  355. var _this4 = this;
  356. this.animate = true; // 因为在消息向上滚动的时候需要添加css3过渡动画,所以这里需要设置true
  357. setTimeout(function () {
  358. // 这里直接使用了es6的箭头函数,省去了处理this指向偏移问题,代码也比之前简化了很多
  359. _this4.tableData.push(_this4.tableData[0]); // 将数组的第一个元素添加到数组的
  360. _this4.tableData.shift(); //删除数组的第一个元素
  361. _this4.animate = false; // margin-top 为0 的时候取消过渡动画,实现无缝滚动
  362. }, 500);
  363. },
  364. changeDate: function changeDate() {
  365. var now = new Date().getTime();
  366. this.data.forEach(function (item, index) {
  367. var date = new Date(now - (6 - index) * 86400000);
  368. item.name = date.getFullYear() + "/" + (date.getMonth() + 1) + "/" + date.getDate();
  369. });
  370. }
  371. }
  372. });
  373. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-07db54ff","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/presentationPage/airQualityMonitorHomePage.vue
  374. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"content1"},[_c('el-row',{staticClass:"elrow",attrs:{"gutter":20}},_vm._l((_vm.statisticalParameters),function(item,index){return _c('el-col',{key:index,staticClass:"mrBottom20",attrs:{"span":4}},[_c('el-card',{staticClass:"caredradious",attrs:{"shadow":"always","body-style":{padding:'0px'}}},[_c('div',{staticClass:"grid-content grid-con-1"},[_c('div',{staticClass:"colposition"},[_c('div',{staticClass:"grid-cont-right"},[_c('div',[_vm._v(_vm._s(item.title))]),_vm._v(" "),_c('div',{staticClass:"grid-num"},[_vm._v(_vm._s(item.num)+" "),_c('span',[_vm._v(_vm._s(item.company))])])])])])])],1)}),1),_vm._v(" "),_c('el-row',{staticClass:"elrow",attrs:{"gutter":20}},[_c('el-col',{attrs:{"span":12}},[_c('el-card',{attrs:{"shadow":"hover"}},[_c('Echart',{staticClass:"schart",attrs:{"options":_vm.options,"width":"100%","height":"18vw"}})],1)],1),_vm._v(" "),_c('el-col',{attrs:{"span":12}},[_c('el-card',{attrs:{"shadow":"hover"}},[_c('Echart',{staticClass:"schart",attrs:{"options":_vm.options2,"width":"100%","height":"18vw"}})],1)],1)],1)],1)}
  375. var staticRenderFns = []
  376. var esExports = { render: render, staticRenderFns: staticRenderFns }
  377. /* harmony default export */ var presentationPage_airQualityMonitorHomePage = (esExports);
  378. // CONCATENATED MODULE: ./src/views/presentationPage/airQualityMonitorHomePage.vue
  379. function injectStyle (ssrContext) {
  380. __webpack_require__("i78P")
  381. }
  382. var normalizeComponent = __webpack_require__("VU/8")
  383. /* script */
  384. /* template */
  385. /* template functional */
  386. var __vue_template_functional__ = false
  387. /* styles */
  388. var __vue_styles__ = injectStyle
  389. /* scopeId */
  390. var __vue_scopeId__ = "data-v-07db54ff"
  391. /* moduleIdentifier (server only) */
  392. var __vue_module_identifier__ = null
  393. var Component = normalizeComponent(
  394. airQualityMonitorHomePage,
  395. presentationPage_airQualityMonitorHomePage,
  396. __vue_template_functional__,
  397. __vue_styles__,
  398. __vue_scopeId__,
  399. __vue_module_identifier__
  400. )
  401. /* harmony default export */ var views_presentationPage_airQualityMonitorHomePage = __webpack_exports__["default"] = (Component.exports);
  402. /***/ })
  403. });