hzfxCont.vue 12 KB

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