UnitInformation.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <script>
  2. import { getQyrs } from "@/api/index.js";
  3. import { area } from "@/api/area";
  4. import punishmentMixin from "@/mixin/unit.js";
  5. import { hzfxLsit } from "@/api/hzfx.js";
  6. import moment from "moment";
  7. export default {
  8. mixins: [punishmentMixin],
  9. props: {
  10. qy: String,
  11. default: {
  12. type: Object,
  13. default: () => ({}),
  14. },
  15. },
  16. data() {
  17. return {
  18. options: [],
  19. options1: [
  20. {
  21. value: "是",
  22. label: "是",
  23. },
  24. {
  25. value: "否",
  26. label: "否",
  27. },
  28. ],
  29. fxdjList: [],
  30. tableData: [],
  31. unitList: [],
  32. value: "重庆市",
  33. params: {
  34. pageSize: 10,
  35. pageNum: 1,
  36. },
  37. total: 0,
  38. times: [],
  39. };
  40. },
  41. watch: {
  42. qy: {
  43. handler(val) {
  44. this.value = val;
  45. this.funUnitList();
  46. },
  47. immediate: true,
  48. },
  49. default: {
  50. handler() {
  51. let params = {};
  52. if (this.default) {
  53. Object.assign(params, this.default);
  54. }
  55. this.params = params;
  56. this.funUnitList();
  57. },
  58. immediate: true,
  59. deep: true,
  60. },
  61. },
  62. methods: {
  63. rowClickHandler(val) {
  64. // this.$router.push(`/detail?id=${val.id}`);
  65. },
  66. funUnitList() {
  67. getQyrs({
  68. ...this.params,
  69. qx: this.value === "重庆市" ? "" : this.value,
  70. }).then((res) => {
  71. let list = res.data.rows;
  72. console.log('--------->>.',list);
  73. list.map((item) => {
  74. if (item.zjccss) {
  75. // item.zjccss
  76. item.zjccss = (item.zjccss / 10000).toFixed(2);
  77. }
  78. });
  79. this.tableData = list;
  80. this.total = res.data.total;
  81. });
  82. },
  83. handleSizeChange(val) {
  84. this.params.pageSize = val;
  85. this.funUnitList();
  86. },
  87. handleCurrentChange(val) {
  88. this.params.pageNum = val;
  89. this.funUnitList();
  90. },
  91. resetForm() {
  92. this.qhyy1 = "";
  93. this.zqsj = "";
  94. this.sw = "";
  95. this.value = "";
  96. this.search = "";
  97. this.qhsd = null;
  98. (this.params = {
  99. pageSize: 10,
  100. pageNum: 1,
  101. }),
  102. // this.params.Unittype = ""; // 建筑分类
  103. // this.params.year = ""; // 年代
  104. // this.params.hnum = ""; //高度
  105. // this.params.management = ""; //管理形式
  106. // this.params.subject = ""; //管理主体
  107. // this.params.maintenance = ""; //维保形式
  108. // this.params.risklevel = ""; //风险等级
  109. this.funUnitList();
  110. },
  111. },
  112. created() {
  113. area({
  114. pageNum: 1,
  115. pageSize: 100,
  116. }).then((res) => {
  117. this.options = res.data.rows;
  118. let params = {};
  119. if (this.default) {
  120. Object.assign(params, this.default);
  121. }
  122. this.params = params;
  123. this.funUnitList();
  124. });
  125. },
  126. };
  127. </script>
  128. <template>
  129. <div>
  130. <!-- 搜索 -->
  131. <div class="maintenance-supervision">
  132. <div class="maintenance-supervision_header">
  133. <div class="select-item">
  134. <el-select v-model="value" placeholder="请选择">
  135. <el-option
  136. :value="item.areaTitle"
  137. :label="item.areaTitle"
  138. v-for="(item, index) in options"
  139. :key="index"
  140. >
  141. </el-option>
  142. </el-select>
  143. </div>
  144. <div class="btn-item">
  145. <el-button @click="funUnitList">搜索</el-button>
  146. <el-button @click="resetForm">重置</el-button>
  147. </div>
  148. </div>
  149. </div>
  150. <basic-table
  151. :data="tableData"
  152. @row-click="rowClickHandler"
  153. style="text-align: center"
  154. >
  155. <el-table-column type="index" label="序号"> </el-table-column>
  156. <el-table-column prop="qx" label="区县" show-overflow-tooltip>
  157. </el-table-column>
  158. <el-table-column prop="zqdd" label="高层建筑名称" show-overflow-tooltip>
  159. </el-table-column>
  160. <el-table-column prop="zqsj" label="起火时间" show-overflow-tooltip>
  161. </el-table-column>
  162. <el-table-column prop="rysws" label="亡人数(人)" show-overflow-tooltip>
  163. </el-table-column>
  164. <el-table-column prop="srs" label="伤人数(人)" show-overflow-tooltip>
  165. </el-table-column>
  166. <el-table-column prop="zjccss" label="直接经济损失(万元)">
  167. </el-table-column>
  168. <el-table-column prop="qhyy1" label="起火原因" show-overflow-tooltip>
  169. </el-table-column>
  170. </basic-table>
  171. <br />
  172. <basic-pagination
  173. layout="total,->,prev, pager, next, sizes,jumper"
  174. :page-sizes="[10, 20, 50, 100]"
  175. :page-size="params.pageSize"
  176. :current-page="params.PageNum"
  177. :total="total"
  178. @size-change="handleSizeChange"
  179. @current-change="handleCurrentChange"
  180. />
  181. </div>
  182. </template>
  183. <style scoped lang="less">
  184. .maintenance-supervision {
  185. // padding: 10px 10px 0px 20px;
  186. ::v-deep(.el-input__inner) {
  187. border: none;
  188. background: linear-gradient(
  189. 360deg,
  190. rgba(0, 148, 255, 0.5) 0%,
  191. rgba(0, 148, 255, 0.31) 100%
  192. );
  193. color: #fff;
  194. }
  195. ::v-deep(.el-button) {
  196. border: none;
  197. background: linear-gradient(360deg, #0094ff90 0%, #0094ff10 100%);
  198. color: #fff;
  199. }
  200. .maintenance-supervision_header {
  201. display: flex;
  202. flex-wrap: wrap;
  203. // justify-content: space-around;
  204. // border-bottom: 1px solid #154956;
  205. padding-bottom: 10px;
  206. font-size: 12px;
  207. color: rgb(79, 149, 186);
  208. }
  209. .btn-item {
  210. margin-bottom: 10px;
  211. margin-left: 20px;
  212. }
  213. .warp {
  214. height: 520px;
  215. margin: 0 auto;
  216. overflow: hidden;
  217. .item {
  218. list-style: none;
  219. padding: 0;
  220. margin: 0 auto;
  221. cursor: pointer;
  222. }
  223. &:hover {
  224. overflow: auto;
  225. }
  226. }
  227. /deep/.el-input__inner {
  228. background-color: #184254;
  229. width: 150px;
  230. height: 30px;
  231. margin-bottom: 5px;
  232. }
  233. /deep/.el-button {
  234. width: 100px;
  235. height: 32px;
  236. font-size: 14px;
  237. line-height: 2px;
  238. // margin: 0 20px 0 30px;
  239. color: #fff;
  240. border-radius: 5px;
  241. border: none;
  242. }
  243. /deep/.el-button:hover {
  244. color: rgb(80, 147, 224);
  245. }
  246. /deep/.select_btn {
  247. position: absolute;
  248. top: 225px;
  249. right: 320px;
  250. //下拉框
  251. }
  252. /deep/.el-input {
  253. width: 150px;
  254. // margin-left: 20px;
  255. }
  256. .header {
  257. color: #fff;
  258. height: 33px !important;
  259. line-height: 33px !important;
  260. background-color: rgba(0, 163, 255, 0.3) !important;
  261. color: #61dbff;
  262. margin-top: 15px;
  263. margin-bottom: 6px;
  264. }
  265. .row,
  266. li,
  267. a {
  268. display: block;
  269. height: 39px;
  270. line-height: 39px;
  271. margin-bottom: 4px;
  272. display: flex;
  273. justify-content: space-between;
  274. align-items: center;
  275. font-size: 16px;
  276. background-color: rgba(0, 0, 0, 0.2);
  277. .time,
  278. .num,
  279. .person,
  280. .result {
  281. flex: 0.33;
  282. display: flex;
  283. justify-content: center;
  284. align-items: center;
  285. }
  286. .num {
  287. flex: 0.15;
  288. }
  289. }
  290. }
  291. .unit-bulid {
  292. display: flex;
  293. justify-content: space-between;
  294. margin-bottom: 20px;
  295. font-size: 18px;
  296. }
  297. .unit-num {
  298. width: 200px;
  299. height: 109px;
  300. border: 1px solid #0463a7;
  301. display: flex;
  302. flex-direction: column;
  303. align-items: center;
  304. justify-items: center;
  305. line-height: 59px;
  306. }
  307. </style>