self-management.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. <template>
  2. <el-row class="contentBox">
  3. <transition name="el-fade-in-linear">
  4. <el-col class="leftBox" v-show="leftBtn">
  5. <el-col class="leftTop">
  6. <h4>企业消防情况</h4>
  7. <el-row class="threeBox">
  8. <div class="flexBoxE">
  9. <el-row>
  10. <el-row class="rightTopChart">
  11. <gauge ref="gauge1" :dataMap="0.2" :dataNumber="20" color="#F68E6A"></gauge>
  12. </el-row>
  13. <el-row class="rightTopNumber">消防重点企业数量</el-row>
  14. </el-row>
  15. <el-row>
  16. <el-row class="rightTopChart">
  17. <gauge ref="gauge2" :dataMap="0.3" :dataNumber="30" color="#06B1B9"></gauge>
  18. </el-row>
  19. <el-row class="rightTopNumber">火灾高危企业数量</el-row>
  20. </el-row>
  21. <el-row>
  22. <el-row class="rightTopChart">
  23. <gauge ref="gauge3" :dataMap="0.5" :dataNumber="50" color="#E4951E"></gauge>
  24. </el-row>
  25. <el-row class="rightTopNumber">一般企业数量</el-row>
  26. </el-row>
  27. </div>
  28. </el-row>
  29. </el-col>
  30. <el-col class="leftBot">
  31. <h4>维保记录</h4>
  32. <se-table
  33. ref="seTable"
  34. :dataMap="tableData"
  35. :headerData="headerData"
  36. :key="windowWidth"
  37. ></se-table>
  38. </el-col>
  39. <el-col class="leftBot">
  40. <h4>各街镇单位情况</h4>
  41. <el-row class="leftBotContent">
  42. <el-row class="fireBar">
  43. <category-enterprise ref="categoryEnterprise" :dataMap="[[10,20,15,25,17,16,18,14,20,22,33],[10,20,15,25,17,16,18,14,20,22,33],[10,20,15,25,17,16,18,14,20,22,33]]"></category-enterprise>
  44. </el-row>
  45. </el-row>
  46. </el-col>
  47. </el-col>
  48. </transition>
  49. <transition name="el-fade-in-linear">
  50. <el-col class="centerBox" :style="{'max-width':leftBtn && rightBtn ? '8rem' :!leftBtn && !rightBtn ? '100%' : leftBtn || rightBtn ? '16rem' : '8rem'}">
  51. <el-row class="leftBtn btnW" @click="leftBtnClick()">
  52. <i :class="leftBtn ? 'el-icon-arrow-left' : 'el-icon-arrow-right'"></i>
  53. </el-row>
  54. <el-row class="centerContent" id="mapF"></el-row>
  55. <el-row class="rightBtn btnW" @click="rightBtnClick()">
  56. <i :class="rightBtn ? 'el-icon-arrow-right' : 'el-icon-arrow-left'"></i>
  57. </el-row>
  58. </el-col>
  59. </transition>
  60. <transition name="el-fade-in-linear">
  61. <el-col class="rightBox" v-show="rightBtn">
  62. <div class="rightContent">
  63. <el-col>
  64. <h4>物联网设备监控情况</h4>
  65. <se-table
  66. ref="seTable"
  67. :dataMap="tableData1"
  68. :headerData="headerData1"
  69. :key="windowWidth"
  70. ></se-table>
  71. </el-col>
  72. <el-col class="rightTop">
  73. <h4>企业自主情况</h4>
  74. <radar-chart
  75. v-if="complaintList.length > 0"
  76. :dataMap="complaintList"
  77. name="闵行区消防情况"
  78. ref="radarChart"
  79. ></radar-chart>
  80. </el-col>
  81. <el-col class="rightBot">
  82. <h4>企业经营情况</h4>
  83. <el-row>
  84. <el-row>
  85. <el-row>上海XX有限公司</el-row>
  86. <el-row>
  87. <el-col :span="8">员工总数:100人</el-col>
  88. <el-col :span="8">企业法人:张三</el-col>
  89. <el-col :span="8">成立时间:2020-01-01</el-col>
  90. <el-col :span="8">消防等级:一级</el-col>
  91. <el-col :span="8">注册资金:100万</el-col>
  92. <el-col :span="8">巡检完成率:90%</el-col>
  93. </el-row>
  94. </el-row>
  95. <el-row>
  96. <el-row>上海XX有限公司</el-row>
  97. <el-row>
  98. <el-col :span="8">员工总数:100人</el-col>
  99. <el-col :span="8">企业法人:张三</el-col>
  100. <el-col :span="8">成立时间:2020-01-01</el-col>
  101. <el-col :span="8">消防等级:一级</el-col>
  102. <el-col :span="8">注册资金:100万</el-col>
  103. <el-col :span="8">巡检完成率:90%</el-col>
  104. </el-row>
  105. </el-row>
  106. <el-row>
  107. <el-row>上海XX有限公司</el-row>
  108. <el-row>
  109. <el-col :span="8">员工总数:100人</el-col>
  110. <el-col :span="8">企业法人:张三</el-col>
  111. <el-col :span="8">成立时间:2020-01-01</el-col>
  112. <el-col :span="8">消防等级:一级</el-col>
  113. <el-col :span="8">注册资金:100万</el-col>
  114. <el-col :span="8">巡检完成率:90%</el-col>
  115. </el-row>
  116. </el-row>
  117. </el-row>
  118. </el-col>
  119. </div>
  120. </el-col>
  121. </transition>
  122. </el-row>
  123. </template>
  124. <script>
  125. import linstener from "@c/mixins/linstener";
  126. import categoryEnterprise from "@c/category-enterprise";
  127. import seTable from "@c/se-table";
  128. import gauge from "@c/gauge";
  129. // import map from "@c/mixins/map-data";
  130. import map from "@c/mixins/map-gaode";
  131. import radarChart from "@c/radar";
  132. export default {
  133. components: { categoryEnterprise, seTable, radarChart, gauge},
  134. mixins: [linstener,map],
  135. data() {
  136. return {
  137. tableData: [
  138. {address:'2020-01-01',burnedArea:'某某单位',propertyLoss:'查看',deathToll:'张三',nonFatal:'13000000729',disasterHome:'拆除'},
  139. {address:'2020-01-01',burnedArea:'某某单位',propertyLoss:'查看',deathToll:'张三',nonFatal:'13000000729',disasterHome:'拆除'},
  140. {address:'2020-01-01',burnedArea:'某某单位',propertyLoss:'查看',deathToll:'张三',nonFatal:'13000000729',disasterHome:'拆除'},
  141. {address:'2020-01-01',burnedArea:'某某单位',propertyLoss:'查看',deathToll:'张三',nonFatal:'13000000729',disasterHome:'拆除'},
  142. ],
  143. headerData: [
  144. { prop: "address", name: "维保时间" },
  145. { prop: "burnedArea", name: "维保单位" },
  146. { prop: "propertyLoss", name: "维保点位" },
  147. { prop: "deathToll", name: "相关责任人" },
  148. { prop: "nonFatal", name: "联系电话" },
  149. ],
  150. tableData1: [
  151. {address:'数量',burnedArea:100,property:200,deathTol:100,nonFatal:100,},
  152. {address:'告警',burnedArea:30,property:50,deathTol:5,nonFatal:20,},
  153. {address:'离线',burnedArea:1,property:10,deathTol:20,nonFatal:5,},
  154. {address:'离线率',burnedArea:'100%',property:'100%',deathTol:'100%',nonFatal:'100%',},
  155. {address:'告警率',burnedArea:'5%',property:'5%',deathTol:'5%',nonFatal:'5%',},
  156. ],
  157. headerData1: [
  158. { prop: "address", name: "类型" },
  159. { prop: "burnedArea", name: "电气设备" },
  160. { prop: "property", name: "烟感设备" },
  161. { prop: "deathTol", name: "温感设备" },
  162. { prop: "nonFatal", name: "水压设备" },
  163. { prop: "nonFatal", name: "其他物联设施" },
  164. ],
  165. fireAddressList: [],
  166. fireTypeList: [],
  167. complaintList: [
  168. {name: "设施状况指数",value: 341},
  169. {name: "自主管理指数",value: 155},
  170. {name: "隐患状态指数",value: 156},
  171. {name: "建筑整体指数",value: 118},
  172. {name: "执法监管指数",value: 322},
  173. ],
  174. };
  175. },
  176. created() {
  177. // this.getData();
  178. },
  179. watch:{
  180. },
  181. mounted() {
  182. window.addEventListener(
  183. "resize",
  184. () =>
  185. this.resizeTimeActions([
  186. this.$refs.gauge,
  187. this.$refs.categoryLine,
  188. this.$refs.category,
  189. this.$refs.radarChart,
  190. this.$refs.wordCloud,
  191. ]),
  192. true
  193. );
  194. this.initMap()
  195. },
  196. methods: {
  197. },
  198. };
  199. </script>
  200. <style lang="scss" scoped>
  201. .abc{
  202. background: #000;
  203. }
  204. .contentBox {
  205. // font-family: "DS", "DS-B", "DS-BB", "DS-BS";
  206. & > .el-col {
  207. flex: 1;
  208. height: 100%;
  209. max-width: 8rem;
  210. }
  211. .leftBox {
  212. box-sizing: border-box;
  213. & > .el-col {
  214. flex: none;
  215. width: 100%;
  216. height: calc((70% - .25rem)/2);
  217. margin-top: .125rem;
  218. background: url('~@a/img/home/box-bg.png') no-repeat;
  219. background-size: 100% 100%;
  220. position: relative;
  221. h4 {
  222. font-size: 0.2125rem;
  223. position: absolute;
  224. left: 0;
  225. right: 0;
  226. top: 0;
  227. margin: 0 auto;
  228. text-align: center;
  229. color: #00ffff;
  230. }
  231. }
  232. .leftTop {
  233. padding: 0.375rem 0.45rem .25rem;
  234. margin-top: 0;
  235. display: flex;
  236. justify-content: center;
  237. align-items: center;
  238. height: 30%;
  239. background: url('~@a/img/home/bg1.png') no-repeat;
  240. background-size: 100% 100%;
  241. .threeBox {
  242. width: 100%;
  243. height: 100%;
  244. position: relative;
  245. justify-content: space-between;
  246. align-items: center;
  247. flex-wrap: nowrap;
  248. & > .flexBoxE {
  249. flex: 1;
  250. width: 100%;
  251. height: 100%;
  252. box-sizing: border-box;
  253. display: flex;
  254. align-items: center;
  255. & > .el-row {
  256. flex: none;
  257. width: 33.33%;
  258. display: flex;
  259. flex-direction: column;
  260. }
  261. .rightTopNumber {
  262. justify-content: center;
  263. font-size: 0.2125rem;
  264. }
  265. .rightTopChart {
  266. height: 1.5rem;
  267. }
  268. .el-form {
  269. text-align: center;
  270. .el-form-item {
  271. margin: 0;
  272. }
  273. }
  274. }
  275. .line {
  276. flex: none;
  277. width: 1px;
  278. height: 3.75rem;
  279. opacity: 1;
  280. background: linear-gradient(
  281. rgba(255, 255, 255, 0),
  282. #30cfff,
  283. rgba(255, 255, 255, 0)
  284. );
  285. // box-shadow: 0 0 .125rem .0375rem #30cfff;
  286. }
  287. }
  288. }
  289. .leftBot {
  290. display: flex;
  291. justify-content: space-between;
  292. align-items: center;
  293. padding: .375rem .3125rem .1875rem;
  294. box-sizing: border-box;
  295. width: 100%;
  296. overflow: hidden;
  297. .leftBotContent {
  298. width: 100%;
  299. height: 100%;
  300. display: block;
  301. .fireBar {
  302. height: calc(100%);
  303. }
  304. }
  305. }
  306. }
  307. .rightBox {
  308. box-sizing: border-box;
  309. .rightContent{
  310. width: 100%;
  311. height: 100%;
  312. & > .el-col {
  313. height: calc((60% - .25rem)/2);
  314. background: url('~@a/img/home/box-bg.png') no-repeat;
  315. background-size: 100% 100%;
  316. position: relative;
  317. padding: .4375rem .3125rem .25rem;
  318. box-sizing: border-box;
  319. width: 100%;
  320. margin-bottom: 0.125rem;
  321. h4 {
  322. font-size: 0.2125rem;
  323. position: absolute;
  324. left: 0;
  325. right: 0;
  326. top: 0;
  327. margin: 0 auto;
  328. text-align: center;
  329. color: #00ffff;
  330. }
  331. }
  332. .rightTop{
  333. height: 40%;
  334. }
  335. .rightBot{
  336. margin-bottom: 0;
  337. background-size: 100% 100%;
  338. color: #FFF;
  339. font-size: .2rem;
  340. &>.el-row{
  341. width: 100%;
  342. height: 100%;
  343. overflow: auto;
  344. &::-webkit-scrollbar {
  345. display: none;
  346. // opacity: 0;
  347. /* Chrome Safari */
  348. }
  349. &>.el-row{
  350. width: 100%;
  351. height: auto;
  352. &>.el-row:nth-child(1){
  353. width: 100%;
  354. height: .4375rem;
  355. line-height: .4375rem;
  356. text-indent: .125rem;
  357. background: rgba(0,250,251,0.20);
  358. }
  359. &>.el-row:nth-child(2) {
  360. padding: .0625rem .125rem;
  361. .el-col{
  362. line-height: .35rem;
  363. }
  364. }
  365. }
  366. }
  367. }
  368. }
  369. }
  370. }
  371. </style>