hzfxCont.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. <script>
  2. import {
  3. getJdjcUnit,
  4. getGcjztjUnit
  5. } from "@/api/index.js";
  6. import {
  7. area
  8. } from "@/api/area";
  9. import {
  10. hzfGjzb,
  11. hzfxQhyy,
  12. hzfxQhcs
  13. } from "@/api/hzfx.js";
  14. import punishmentMixin from "@/mixin/unit.js";
  15. export default {
  16. name: "BasicInfoModalContent",
  17. mixins: [punishmentMixin],
  18. data() {
  19. return {
  20. options: [],
  21. tableData: [],
  22. tableData1: [],
  23. // tableData2: [],
  24. unitList: [],
  25. value: "全市",
  26. params: {
  27. pageSize: 10,
  28. pageNum: 1,
  29. },
  30. total: 0,
  31. search: "",
  32. showFlag: 1
  33. // Unittype: "", // 建筑分类
  34. // year: "", // 年代
  35. // hnum: "", //高度
  36. // management: "", //管理形式
  37. // subject: "", //管理主体
  38. // maintenance: "", //维保形式
  39. // risklevel: "", //风险等级
  40. };
  41. },
  42. props: {
  43. qy: String,
  44. },
  45. watch: {
  46. qy: {
  47. handler(val) {
  48. this.value = val;
  49. this.funUnitList();
  50. this.handUnitList();
  51. },
  52. immediate: true,
  53. deep: true,
  54. },
  55. },
  56. methods: {
  57. rowClickHandler(val) {
  58. this.$router.push(`/detail?id=${val.id}`);
  59. },
  60. funUnitList() {
  61. hzfGjzb({
  62. ...this.params,
  63. qx: this.qy === "重庆市" ? "" : this.qy,
  64. }).then((res) => {
  65. this.options = [res.data];
  66. });
  67. hzfxQhyy({
  68. ...this.params,
  69. qx: this.qy === "重庆市" ? "" : this.qy,
  70. }).then((res) => {
  71. this.options1 = [res.data];
  72. });
  73. hzfxQhcs({
  74. ...this.params,
  75. qx: this.qy === "重庆市" ? "" : this.qy,
  76. }).then((res) => {
  77. this.options2 = [res.data];
  78. });
  79. },
  80. handleSizeChange(val) {
  81. this.params.pageSize = val;
  82. this.funUnitList();
  83. },
  84. handleCurrentChange(val) {
  85. this.params.pageNum = val;
  86. this.funUnitList();
  87. },
  88. handUnitList() {
  89. hzfGjzb({
  90. ...this.params,
  91. qy: this.value === "重庆市" ? "" : this.value,
  92. }).then((res) => {
  93. // const list = res.data.rows[0];
  94. // this.unitList = [{
  95. // title: "高层建筑总数(栋)",
  96. // unitNum: list.ggjz + list.gyjz + list.zzjz,
  97. // },
  98. // {
  99. // title: "超高层建筑总数(栋)",
  100. // unitNum: list.cggjz,
  101. // },
  102. // {
  103. // title: "老旧高层建筑总数(栋)",
  104. // unitNum: list.ljzzgc,
  105. // },
  106. // {
  107. // title: "公共建筑总数(栋)",
  108. // unitNum: list.ggjz,
  109. // },
  110. // {
  111. // title: "住宅建筑总数(栋)",
  112. // unitNum: list.zzjz,
  113. // },
  114. // ];
  115. });
  116. },
  117. resetForm() {
  118. this.value = "";
  119. this.search = "";
  120. (this.params = {
  121. pageSize: 10,
  122. pageNum: 1,
  123. }),
  124. this.funUnitList();
  125. },
  126. changeList(val) {
  127. this.showFlag = val
  128. },
  129. addClass(i) {
  130. return this.showFlag === i ? 'active' : 'tab-item'
  131. }
  132. },
  133. created() {
  134. this.funUnitList();
  135. this.handUnitList();
  136. area({
  137. pageNum: 1,
  138. pageSize: 100,
  139. }).then((res) => {
  140. this.options = res.data.rows;
  141. });
  142. },
  143. };
  144. </script>
  145. <template>
  146. <div>
  147. <!-- 搜索 -->
  148. <div class="maintenance-supervision">
  149. <div class="tab">
  150. <span class="tab-item" @click="changeList(1)" :class="addClass(1)">关键指标</span>
  151. <span class="tab-item" @click="changeList(2)" :class="addClass(2)">起火原因</span>
  152. <span class="tab-item" @click="changeList(3)" :class="addClass(3)">起火场所</span>
  153. </div>
  154. <div class="maintenance-supervision_header">
  155. <div class="select-item">
  156. <el-select v-model="value" placeholder="请选择">
  157. <el-option :value="item.areaTitle" :label="item.areaTitle" v-for="(item, index) in options"
  158. :key="index">
  159. </el-option>
  160. </el-select>
  161. </div>
  162. </div>
  163. <div class="btn-item">
  164. <el-button @click="funUnitList">搜索</el-button>
  165. <el-button @click="resetForm">重置</el-button>
  166. </div>
  167. </div>
  168. <div v-if="showFlag===1">
  169. <basic-table :data="tableData" @row-click="rowClickHandler" style="text-align: center">
  170. <el-table-column type="index" label="序号">
  171. </el-table-column>
  172. <el-table-column prop="qx" label="区县" show-overflow-tooltip>
  173. </el-table-column>
  174. <el-table-column prop="hzzs" label="火灾总数(起)" show-overflow-tooltip>
  175. </el-table-column>
  176. <el-table-column prop="wrstb" label="同比(%)" show-overflow-tooltip>
  177. </el-table-column>
  178. <el-table-column prop="wrs" label="亡人(人)" show-overflow-tooltip>
  179. </el-table-column>
  180. <el-table-column prop="ssstb" label="同比(%)" show-overflow-tooltip>
  181. </el-table-column>
  182. <el-table-column prop="sss" label="伤人(人)" show-overflow-tooltip>
  183. </el-table-column>
  184. <el-table-column prop="xxdz" label="同比(%)" show-overflow-tooltip>
  185. </el-table-column>
  186. <el-table-column prop="zjccss" label="直接经济损失(万元)" show-overflow-tooltip>
  187. </el-table-column>
  188. <el-table-column prop="zjccsstb" label="同比(%)" show-overflow-tooltip>
  189. </el-table-column>
  190. </basic-table>
  191. </div>
  192. <div v-if="showFlag===2">
  193. <basic-table :data="tableData1" @row-click="rowClickHandler" style="text-align: center">
  194. <el-table-column type="index" label="序号">
  195. </el-table-column>
  196. <el-table-column prop="qx" label="区县" show-overflow-tooltip>
  197. </el-table-column>
  198. <el-table-column prop="dqhz" label="电气火灾(起)" width="150" show-overflow-tooltip>
  199. </el-table-column>
  200. <el-table-column prop="fh" label="放火(起)" show-overflow-tooltip>
  201. </el-table-column>
  202. <el-table-column prop="jd" label="静电(起)" show-overflow-tooltip>
  203. </el-table-column>
  204. <el-table-column prop="lj" label="雷击(起)" show-overflow-tooltip>
  205. </el-table-column>
  206. <el-table-column prop="rfyhbz" label="燃放烟花爆竹(起)" width="150" show-overflow-tooltip>
  207. </el-table-column>
  208. <el-table-column prop="sczy" label="生产作业(起)" width="150" show-overflow-tooltip>
  209. </el-table-column>
  210. <el-table-column prop="wh" label="玩火(起)" show-overflow-tooltip>
  211. </el-table-column>
  212. <el-table-column prop="xy" label="吸烟(起)" show-overflow-tooltip>
  213. </el-table-column>
  214. <el-table-column prop="ylhz" label="遗留火种(起)" show-overflow-tooltip>
  215. </el-table-column>
  216. <el-table-column prop="yhbs" label="用火不慎(起)" show-overflow-tooltip>
  217. </el-table-column>
  218. <el-table-column prop="zr" label="自燃(起)" show-overflow-tooltip>
  219. </el-table-column>
  220. <el-table-column prop="bpcyy" label="不排除原因(起)" show-overflow-tooltip>
  221. </el-table-column>
  222. <el-table-column prop="xxdz" label="其他(起)" show-overflow-tooltip>
  223. </el-table-column>
  224. </basic-table>
  225. </div>
  226. <div v-if="showFlag===3">
  227. <basic-table :data="tableData2" @row-click="rowClickHandler" style="text-align: center">
  228. <el-table-column type="index" label="序号">
  229. </el-table-column>
  230. <el-table-column prop="qx" label="办公场所" show-overflow-tooltip>
  231. </el-table-column>
  232. <el-table-column prop="gcjzmc" label="宾馆、饭店、招待所" width="150" show-overflow-tooltip>
  233. </el-table-column>
  234. <el-table-column prop="cf" label="厂房" show-overflow-tooltip>
  235. </el-table-column>
  236. <el-table-column prop="cy" label="纯餐饮场所" width="150" show-overflow-tooltip>
  237. </el-table-column>
  238. <el-table-column prop="fly" label="福利院" show-overflow-tooltip>
  239. </el-table-column>
  240. <el-table-column prop="gd" label="工地" show-overflow-tooltip>
  241. </el-table-column>
  242. <el-table-column prop="ggylcs" label="公共娱乐设施" width="150" show-overflow-tooltip>
  243. </el-table-column>
  244. <el-table-column prop="gbdszx" label="广播电视中心" width="150" show-overflow-tooltip>
  245. </el-table-column>
  246. <el-table-column prop="hy" label="会议、展览中心" width="150" show-overflow-tooltip>
  247. </el-table-column>
  248. <el-table-column prop="jyjq" label="加油加气站充电" width="150" show-overflow-tooltip>
  249. </el-table-column>
  250. <el-table-column prop="jtsn" label="交通枢纽站" width="150" show-overflow-tooltip>
  251. </el-table-column>
  252. <el-table-column prop="jrjycs" label="金融交易场所" width="150" show-overflow-tooltip>
  253. </el-table-column>
  254. <el-table-column prop="jzcs" label="居住场所" show-overflow-tooltip>
  255. </el-table-column>
  256. <el-table-column prop="qck" label="汽车库" show-overflow-tooltip>
  257. </el-table-column>
  258. <el-table-column prop="sy" label="商业场所" show-overflow-tooltip>
  259. </el-table-column>
  260. <el-table-column prop="syhgqy" label="石油化工企业" width="150" show-overflow-tooltip>
  261. </el-table-column>
  262. <el-table-column prop="snnfycs" label="室内农副业场所" width="150" show-overflow-tooltip>
  263. </el-table-column>
  264. <el-table-column prop="tycg" label="体育场馆" show-overflow-tooltip>
  265. </el-table-column>
  266. <el-table-column prop="txcs" label="通信场所" show-overflow-tooltip>
  267. </el-table-column>
  268. <el-table-column prop="wbg" label="文博馆(图书馆、博物馆、档案馆等)" width="250" show-overflow-tooltip>
  269. </el-table-column>
  270. <el-table-column prop="wwgjz" label="文物古建筑" width="150" show-overflow-tooltip>
  271. </el-table-column>
  272. <el-table-column prop="wzcccs" label="物资仓储场所" width="150" show-overflow-tooltip>
  273. </el-table-column>
  274. <el-table-column prop="xx" label="学校" show-overflow-tooltip>
  275. </el-table-column>
  276. <el-table-column prop="yly" label="养老院" show-overflow-tooltip>
  277. </el-table-column>
  278. <el-table-column prop="yljg" label="医疗机构" show-overflow-tooltip>
  279. </el-table-column>
  280. <el-table-column prop="zjcs" label="宗教场所" show-overflow-tooltip>
  281. </el-table-column>
  282. </basic-table>
  283. </div>
  284. <br />
  285. <basic-pagination layout="->,prev, pager, next, sizes,jumper" :page-sizes="[10, 20, 50, 100]"
  286. :page-size="params.pageSize" :current-page="params.PageNum" :total="total" @size-change="handleSizeChange"
  287. @current-change="handleCurrentChange" />
  288. </div>
  289. </template>
  290. <style scoped lang="less">
  291. .maintenance-supervision {
  292. display: flex;
  293. align-items: center;
  294. // padding: 10px 10px 0px 20px;
  295. ::v-deep(.el-input__inner) {
  296. border: none;
  297. background: linear-gradient(360deg,
  298. rgba(0, 148, 255, 0.5) 0%,
  299. rgba(0, 148, 255, 0.31) 100%);
  300. color: #fff;
  301. }
  302. ::v-deep(.el-button) {
  303. border: none;
  304. background: linear-gradient(360deg, #0094ff90 0%, #0094ff10 100%);
  305. color: #fff;
  306. }
  307. .maintenance-supervision_header {
  308. display: flex;
  309. // flex-wrap: wrap;
  310. justify-content: space-around;
  311. // border-bottom: 1px solid #154956;
  312. padding-bottom: 10px;
  313. font-size: 12px;
  314. color: rgb(79, 149, 186);
  315. // .select-item{
  316. // margin-right: 20px;
  317. // }
  318. }
  319. .btn-item {
  320. margin-bottom: 10px;
  321. }
  322. .warp {
  323. height: 520px;
  324. margin: 0 auto;
  325. overflow: hidden;
  326. .item {
  327. list-style: none;
  328. padding: 0;
  329. margin: 0 auto;
  330. cursor: pointer;
  331. }
  332. }
  333. /deep/.el-input__inner {
  334. background-color: #184254;
  335. width: 150px;
  336. height: 30px;
  337. margin-bottom: 5px;
  338. }
  339. /deep/.el-button {
  340. width: 100px;
  341. height: 32px;
  342. font-size: 14px;
  343. line-height: 2px;
  344. // margin: 0 20px 0 30px;
  345. color: #fff;
  346. border-radius: 5px;
  347. border: none;
  348. margin-left: 20px;
  349. }
  350. /deep/.el-button:hover {
  351. color: rgb(80, 147, 224);
  352. }
  353. /deep/.select_btn {
  354. position: absolute;
  355. top: 225px;
  356. right: 320px;
  357. //下拉框
  358. }
  359. /deep/.el-input {
  360. width: 150px;
  361. // margin-left: 20px;
  362. }
  363. .header {
  364. color: #fff;
  365. height: 33px !important;
  366. line-height: 33px !important;
  367. background-color: rgba(0, 163, 255, 0.3) !important;
  368. color: #61dbff;
  369. margin-top: 15px;
  370. margin-bottom: 6px;
  371. }
  372. .row,
  373. li,
  374. a {
  375. display: block;
  376. height: 39px;
  377. line-height: 39px;
  378. margin-bottom: 4px;
  379. display: flex;
  380. justify-content: space-between;
  381. align-items: center;
  382. font-size: 16px;
  383. background-color: rgba(0, 0, 0, 0.2);
  384. .time,
  385. .num,
  386. .person,
  387. .result {
  388. flex: 0.33;
  389. display: flex;
  390. justify-content: center;
  391. align-items: center;
  392. }
  393. .num {
  394. flex: 0.15;
  395. }
  396. }
  397. .inp {
  398. margin-left: 20px;
  399. }
  400. }
  401. .unit-bulid {
  402. display: flex;
  403. justify-content: space-between;
  404. margin-bottom: 20px;
  405. font-size: 18px;
  406. }
  407. .unit-num {
  408. width: 200px;
  409. height: 109px;
  410. border: 1px solid #0463a7;
  411. display: flex;
  412. flex-direction: column;
  413. align-items: center;
  414. justify-items: center;
  415. line-height: 59px;
  416. }
  417. .tab {
  418. display: flex;
  419. }
  420. .active {
  421. background: #0463a7 !important;
  422. }
  423. .tab-item {
  424. display: inline-block;
  425. width: 120px;
  426. height: 40px;
  427. text-align: center;
  428. line-height: 40px;
  429. font-size: 16px;
  430. color: #fff;
  431. border: 1px solid #fff;
  432. border-radius: 5px;
  433. margin-right: 15px;
  434. margin-bottom: 15px;
  435. }
  436. </style>