YhModalContent.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. <script>
  2. import { ylycyhzzqdTc } from "@/api/risk.js";
  3. import punishmentMixin from "@/mixin/unit.js";
  4. import { area } from "@/api/area";
  5. import moment from "moment";
  6. export default {
  7. name: "YhModalContent",
  8. mixins: [punishmentMixin],
  9. data() {
  10. return {
  11. options: [],
  12. fxdjList: [],
  13. tableData: [],
  14. unitList: [],
  15. zqsj: null,
  16. params: {
  17. pageSize: 10,
  18. pageNum: 1,
  19. zqdd: null,
  20. qx: null,
  21. rysws: null,
  22. qhyy1: null,
  23. zqsj: null,
  24. },
  25. total: 0,
  26. search: "",
  27. };
  28. },
  29. props: {
  30. qy: String,
  31. default: Object,
  32. },
  33. watch: {
  34. default: {
  35. handler() {
  36. const params = JSON.parse(JSON.stringify(this.params));
  37. params.zqdd = this.default.gcjzmc;
  38. this.params = params;
  39. this.funList();
  40. },
  41. immediate: true,
  42. deep: true,
  43. },
  44. },
  45. methods: {
  46. funList() {
  47. if (this.zqsj) {
  48. const start = moment(this.zqsj[0]).format("yyyy-MM-DD HH:mm:ss");
  49. const end = moment(this.zqsj[1]).format("yyyy-MM-DD HH:mm:ss");
  50. this.params.zqsj = start + "|" + end;
  51. } else {
  52. this.params.zqsj = null;
  53. }
  54. ylycyhzzqdTc({
  55. ...this.params,
  56. }).then((res) => {
  57. this.tableData = res.data.rows;
  58. this.total = res.data.total;
  59. });
  60. },
  61. handleSizeChange(val) {
  62. this.params.pageSize = val;
  63. this.funList();
  64. },
  65. handleCurrentChange(val) {
  66. this.params.pageNum = val;
  67. this.funList();
  68. },
  69. resetForm() {
  70. this.params = {
  71. pageSize: 10,
  72. pageNum: 1,
  73. sfzddw: null,
  74. zqdd: null,
  75. dwmc: null,
  76. rzxs: null,
  77. };
  78. this.funList();
  79. },
  80. },
  81. created() {
  82. // console.log(this.default);
  83. const params = JSON.parse(JSON.stringify(this.params));
  84. params.zqdd = this.default.gcjzmc;
  85. this.params = params;
  86. // 查询区域
  87. area({
  88. pageNum: 1,
  89. pageSize: 100,
  90. }).then((res) => {
  91. this.options = res.data.rows;
  92. });
  93. this.funList();
  94. },
  95. };
  96. </script>
  97. <template>
  98. <div>
  99. <!-- 搜索 -->
  100. <div class="maintenance-supervision">
  101. <div class="maintenance-supervision_header">
  102. <el-form class="form" v-model="params">
  103. <!-- 区县 -->
  104. <el-form-item>
  105. <el-select v-model="params.qx" placeholder="请选择">
  106. <el-option
  107. :value="item.areaTitle"
  108. :label="item.areaTitle"
  109. v-for="(item, index) in options"
  110. :key="index"
  111. >
  112. </el-option>
  113. </el-select>
  114. </el-form-item>
  115. <!-- 建筑名称 -->
  116. <el-form-item>
  117. <div class="inp">
  118. <el-input
  119. v-model="params.zqdd"
  120. placeholder="建筑名称(模糊)"
  121. ></el-input>
  122. </div>
  123. </el-form-item>
  124. <!-- 是否有人员伤亡 -->
  125. <el-form-item>
  126. <el-select v-model="params.rysws" placeholder="伤亡">
  127. <el-option :value="1" label="是"> </el-option>
  128. <el-option :value="0" label="否"> </el-option>
  129. </el-select>
  130. </el-form-item>
  131. <!-- 起火日期 -->
  132. <el-form-item>
  133. <el-date-picker
  134. v-model="zqsj"
  135. type="datetimerange"
  136. range-separator="至"
  137. start-placeholder="开始日期"
  138. end-placeholder="结束日期"
  139. style="width: 380px"
  140. >
  141. </el-date-picker>
  142. </el-form-item>
  143. <!-- 起火原因 -->
  144. <el-form-item>
  145. <el-select v-model="params.qhyy1" placeholder="起火原因">
  146. <el-option
  147. :value="item.value"
  148. :label="item.label"
  149. v-for="(item, index) in qhyyList"
  150. :key="index"
  151. >
  152. </el-option>
  153. </el-select>
  154. </el-form-item>
  155. </el-form>
  156. <div class="btn-item">
  157. <el-button @click="funList">搜索</el-button>
  158. <el-button @click="resetForm">重置</el-button>
  159. </div>
  160. </div>
  161. </div>
  162. <basic-table :data="tableData" style="text-align: center">
  163. <el-table-column type="index" label="序号" width="60"> </el-table-column>
  164. <el-table-column label="区县" width="100" prop="qx"></el-table-column>
  165. <el-table-column
  166. prop="zqdd"
  167. label="高层建筑名称"
  168. min-width="230"
  169. show-overflow-tooltip
  170. >
  171. </el-table-column>
  172. <el-table-column
  173. prop="zqsj"
  174. label="起火时间"
  175. show-overflow-tooltip
  176. min-width="120"
  177. >
  178. </el-table-column>
  179. <el-table-column label="亡人数(人)" show-overflow-tooltip>
  180. </el-table-column>
  181. <el-table-column label="伤人数(人)" show-overflow-tooltip>
  182. </el-table-column>
  183. <el-table-column
  184. prop="zjccss"
  185. label="直接经济损失(万元)"
  186. show-overflow-tooltip
  187. min-width="150"
  188. >
  189. </el-table-column>
  190. <el-table-column
  191. prop="qhyy1"
  192. label="起火原因"
  193. show-overflow-tooltip
  194. align="center"
  195. min-width="100"
  196. >
  197. </el-table-column>
  198. </basic-table>
  199. <br />
  200. <basic-pagination
  201. layout="->,prev, pager, next, sizes,jumper"
  202. :page-sizes="[10, 20, 50, 100]"
  203. :page-size="params.pageSize"
  204. :current-page="params.PageNum"
  205. :total="total"
  206. @size-change="handleSizeChange"
  207. @current-change="handleCurrentChange"
  208. />
  209. </div>
  210. </template>
  211. <style scoped lang="less">
  212. .maintenance-supervision {
  213. // padding: 10px 10px 0px 20px;
  214. ::v-deep(.el-input__inner) {
  215. border: none;
  216. background: linear-gradient(
  217. 360deg,
  218. rgba(0, 148, 255, 0.5) 0%,
  219. rgba(0, 148, 255, 0.31) 100%
  220. );
  221. color: #fff;
  222. }
  223. ::v-deep(.el-button) {
  224. border: none;
  225. background: linear-gradient(360deg, #0094ff90 0%, #0094ff10 100%);
  226. color: #fff;
  227. }
  228. .maintenance-supervision_header {
  229. display: flex;
  230. flex-wrap: wrap;
  231. justify-content: space-between;
  232. // border-bottom: 1px solid #154956;
  233. padding-bottom: 10px;
  234. font-size: 12px;
  235. color: rgb(79, 149, 186);
  236. // .select-item{
  237. // margin-right: 20px;
  238. // }
  239. }
  240. .btn-item {
  241. margin-bottom: 10px;
  242. }
  243. .warp {
  244. height: 520px;
  245. margin: 0 auto;
  246. overflow: hidden;
  247. .item {
  248. list-style: none;
  249. padding: 0;
  250. margin: 0 auto;
  251. cursor: pointer;
  252. }
  253. }
  254. /deep/.el-input__inner {
  255. background-color: #184254;
  256. width: 150px;
  257. height: 30px;
  258. margin-bottom: 5px;
  259. }
  260. /deep/.el-button {
  261. width: 100px;
  262. height: 32px;
  263. font-size: 14px;
  264. line-height: 2px;
  265. // margin: 0 20px 0 30px;
  266. color: #fff;
  267. border-radius: 5px;
  268. border: none;
  269. }
  270. /deep/.el-button:hover {
  271. color: rgb(80, 147, 224);
  272. }
  273. /deep/.select_btn {
  274. position: absolute;
  275. top: 225px;
  276. right: 320px;
  277. //下拉框
  278. }
  279. /deep/.el-input {
  280. width: 150px;
  281. // margin-left: 20px;
  282. }
  283. .header {
  284. color: #fff;
  285. height: 33px !important;
  286. line-height: 33px !important;
  287. background-color: rgba(0, 163, 255, 0.3) !important;
  288. color: #61dbff;
  289. margin-top: 15px;
  290. margin-bottom: 6px;
  291. }
  292. .row,
  293. li,
  294. a {
  295. display: block;
  296. height: 39px;
  297. line-height: 39px;
  298. margin-bottom: 4px;
  299. display: flex;
  300. justify-content: space-between;
  301. align-items: center;
  302. font-size: 16px;
  303. background-color: rgba(0, 0, 0, 0.2);
  304. .time,
  305. .num,
  306. .person,
  307. .result {
  308. flex: 0.33;
  309. display: flex;
  310. justify-content: center;
  311. align-items: center;
  312. }
  313. .num {
  314. flex: 0.15;
  315. }
  316. }
  317. .inp {
  318. margin-left: 20px;
  319. }
  320. }
  321. .unit-bulid {
  322. display: flex;
  323. justify-content: space-between;
  324. margin-bottom: 20px;
  325. font-size: 18px;
  326. }
  327. .unit-num {
  328. width: 200px;
  329. height: 109px;
  330. border: 1px solid #0463a7;
  331. display: flex;
  332. flex-direction: column;
  333. align-items: center;
  334. justify-items: center;
  335. line-height: 59px;
  336. }
  337. .form {
  338. flex-grow: 1;
  339. width: 80%;
  340. display: flex;
  341. }
  342. ::v-deep(.el-range-separator) {
  343. line-height: 24px !important;
  344. color: #ffffff !important;
  345. }
  346. ::v-deep(.el-date-editor .el-range-input) {
  347. color: #ffffff !important;
  348. }
  349. ::v-deep(.el-date-editor .el-range__icon) {
  350. line-height: 24px !important;
  351. }
  352. ::v-deep(.el-date-editor .el-range__close-icon) {
  353. line-height: 24px !important;
  354. }
  355. </style>