BasicInfoModalContent.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. <script>
  2. import { getJdjcUnit, getGcjztjUnit } from "@/api/index.js";
  3. import { area } from "@/api/area";
  4. import punishmentMixin from "@/mixin/unit.js";
  5. export default {
  6. name: "BasicInfoModalContent",
  7. mixins: [punishmentMixin],
  8. data() {
  9. return {
  10. options: [],
  11. fxdjList: [],
  12. tableData: [],
  13. unitList: [],
  14. value: "全市",
  15. params: {
  16. pageSize: 10,
  17. pageNum: 1,
  18. },
  19. total: 0,
  20. search: "",
  21. titleNames: "",
  22. loading: false,
  23. // Unittype: "", // 建筑分类
  24. // year: "", // 年代
  25. // hnum: "", //高度
  26. // management: "", //管理形式
  27. // subject: "", //管理主体
  28. // maintenance: "", //维保形式
  29. // risklevel: "", //风险等级
  30. };
  31. },
  32. props: {
  33. qy: String,
  34. default: Object,
  35. },
  36. watch: {
  37. qy: {
  38. handler(val) {
  39. this.value = val;
  40. this.funUnitList();
  41. this.handUnitList();
  42. },
  43. immediate: true,
  44. deep: true,
  45. },
  46. value: {
  47. handler() {
  48. this.handUnitList();
  49. },
  50. },
  51. default: {
  52. handler() {
  53. let params = {};
  54. if (this.default) {
  55. Object.assign(params, this.default);
  56. }
  57. if (params.qy) {
  58. this.value = params.qy;
  59. delete params.qy;
  60. } else {
  61. this.value = null;
  62. }
  63. this.params = params;
  64. this.funUnitList();
  65. this.handUnitList();
  66. },
  67. immediate: true,
  68. deep: true,
  69. },
  70. },
  71. methods: {
  72. rowClickHandler(val) {
  73. // this.$router.push(`/detail?id=${val.id}`);
  74. window.location.href = `/detail?id=${val.id}`;
  75. },
  76. secrhList(title) {
  77. this.params = {};
  78. if (title == "高层建筑总数(栋)") {
  79. this.funUnitList();
  80. }
  81. if (title == "超高层建筑总数(栋)") {
  82. this.params.gd = "100米以上";
  83. this.funUnitList();
  84. }
  85. if (title == "2000年底前老旧住宅建筑总数(栋)") {
  86. this.params.jcnd = "2000年前";
  87. this.params.dl = "住宅建筑";
  88. this.funUnitList();
  89. }
  90. if (title == "2000年底前老旧商业混合体建筑总数(栋)") {
  91. this.params.jcnd = "2000年前";
  92. this.params.dl = "公共建筑";
  93. this.funUnitList();
  94. }
  95. if (title == "公共建筑总数(栋)") {
  96. this.params.dl = "公共建筑";
  97. this.funUnitList();
  98. }
  99. if (title == "工业建筑总数(栋)") {
  100. this.params.dl = "工业建筑";
  101. this.funUnitList();
  102. }
  103. if (title == "住宅建筑总数(栋)") {
  104. this.params.dl = "住宅建筑";
  105. this.funUnitList();
  106. }
  107. },
  108. funUnitList() {
  109. this.loading = true;
  110. getJdjcUnit({
  111. ...this.params,
  112. qx: this.value === "重庆市" ? "" : this.value,
  113. gcjzmc: this.search,
  114. })
  115. .then((res) => {
  116. this.tableData = res.data.rows;
  117. this.total = res.data.total;
  118. this.loading = false;
  119. })
  120. .catch(() => {
  121. this.loading = false;
  122. });
  123. },
  124. handleSizeChange(val) {
  125. this.params.pageSize = val;
  126. this.funUnitList();
  127. },
  128. handleCurrentChange(val) {
  129. this.params.pageNum = val;
  130. this.funUnitList();
  131. },
  132. handUnitList() {
  133. getGcjztjUnit({
  134. ...this.params,
  135. qy: this.value === "重庆市" ? "" : this.value,
  136. }).then((res) => {
  137. const list = res.data.rows[0];
  138. this.unitList = [
  139. {
  140. title: "高层建筑总数(栋)",
  141. unitNum: list.ggjz + list.gyjz + list.zzjz,
  142. },
  143. {
  144. title: "超高层建筑总数(栋)",
  145. unitNum: list.cggjz,
  146. },
  147. {
  148. title: "2000年底前老旧住宅建筑总数(栋)",
  149. unitNum: list.ljzzgc,
  150. },
  151. {
  152. title: "2000年底前老旧商业混合体建筑总数(栋)",
  153. unitNum: list.ljgcszhht,
  154. },
  155. {
  156. title: "公共建筑总数(栋)",
  157. unitNum: list.ggjz,
  158. },
  159. {
  160. title: "住宅建筑总数(栋)",
  161. unitNum: list.zzjz,
  162. },
  163. {
  164. title: "工业建筑总数(栋)",
  165. unitNum: list.gyjz,
  166. },
  167. ];
  168. });
  169. },
  170. resetForm() {
  171. this.value = "";
  172. this.search = "";
  173. (this.params = {
  174. pageSize: 10,
  175. pageNum: 1,
  176. }),
  177. this.funUnitList();
  178. },
  179. },
  180. created() {
  181. area({
  182. pageNum: 1,
  183. pageSize: 100,
  184. }).then((res) => {
  185. this.options = res.data.rows;
  186. let params = {};
  187. if (this.default) {
  188. Object.assign(params, this.default);
  189. }
  190. if (params.qy) {
  191. this.value = params.qy;
  192. delete params.qy;
  193. } else {
  194. this.value = null;
  195. }
  196. this.params = params;
  197. this.funUnitList();
  198. this.handUnitList();
  199. });
  200. },
  201. };
  202. </script>
  203. <template>
  204. <div>
  205. <!-- 建筑数 -->
  206. <div class="unit-bulid">
  207. <div
  208. class="unit-num"
  209. v-for="(item, index) in unitList"
  210. :key="index"
  211. @click="secrhList(item.title)"
  212. style="cursor: pointer"
  213. >
  214. <span
  215. style="display: inline-block; margin: 10px 5px 15px 5px; height: 40px"
  216. >{{ item.title }}</span
  217. >
  218. <!-- <span class="build-num">{{ item.unitNum }}</span> -->
  219. <LinearText
  220. style="display: inline-block"
  221. :text="item.unitNum"
  222. fontSize="40px"
  223. ></LinearText>
  224. </div>
  225. </div>
  226. <!-- 搜索 -->
  227. <div class="maintenance-supervision">
  228. <div class="maintenance-supervision_header">
  229. <div class="select-item">
  230. <el-select v-model="value" placeholder="请选择">
  231. <el-option
  232. :value="item.areaTitle"
  233. :label="item.areaTitle"
  234. v-for="(item, index) in options"
  235. :key="index"
  236. >
  237. </el-option>
  238. </el-select>
  239. </div>
  240. <div class="inp">
  241. <el-input v-model="search" placeholder="请输入建筑名称"></el-input>
  242. </div>
  243. <!-- 建筑分类 -->
  244. <div>
  245. <el-select v-model="params.dl" placeholder="建筑分类">
  246. <el-option
  247. :value="item.value"
  248. :label="item.label"
  249. v-for="(item, index) in TypeList"
  250. :key="index"
  251. >
  252. </el-option>
  253. </el-select>
  254. </div>
  255. <!-- 年代 -->
  256. <div>
  257. <el-select v-model="params.jcnd" placeholder="年代">
  258. <el-option
  259. :value="item.value"
  260. :label="item.lable"
  261. v-for="(item, index) in yearList"
  262. :key="index"
  263. >
  264. </el-option>
  265. </el-select>
  266. </div>
  267. <!-- 高度 -->
  268. <div>
  269. <el-select v-model="params.gd" placeholder="高度">
  270. <el-option
  271. :value="item.value"
  272. :label="item.lable"
  273. v-for="(item, index) in higthList"
  274. :key="index"
  275. >
  276. </el-option>
  277. </el-select>
  278. </div>
  279. <!-- 管理形式 -->
  280. <div>
  281. <el-select v-model="params.xfaqglxs" placeholder="管理形式">
  282. <el-option
  283. :value="item.value"
  284. :label="item.lable"
  285. v-for="(item, index) in mentList"
  286. :key="index"
  287. >
  288. </el-option>
  289. </el-select>
  290. </div>
  291. <!-- 管理主体 -->
  292. <!-- <div>
  293. <el-select v-model="params.glzthztjzd" placeholder="管理主体">
  294. <el-option
  295. :value="item.value"
  296. :label="item.lable"
  297. v-for="(item, index) in glList"
  298. :key="index"
  299. >
  300. </el-option>
  301. </el-select>
  302. </div> -->
  303. <!-- 维保形式 -->
  304. <div>
  305. <el-select v-model="params.sfywbdw" placeholder="维保形式">
  306. <el-option
  307. :value="item.value"
  308. :label="item.lable"
  309. v-for="(item, index) in wbList"
  310. :key="index"
  311. >
  312. </el-option>
  313. </el-select>
  314. </div>
  315. <!-- 风险等级 -->
  316. <div>
  317. <el-select v-model="params.fxdj" placeholder="风险等级">
  318. <el-option
  319. :value="item.value"
  320. :label="item.lable"
  321. v-for="(item, index) in fxdjLlst"
  322. :key="index"
  323. >
  324. </el-option>
  325. </el-select>
  326. </div>
  327. </div>
  328. <div class="btn-item">
  329. <el-button @click="funUnitList">搜索</el-button>
  330. <el-button @click="resetForm">重置</el-button>
  331. </div>
  332. </div>
  333. <basic-table
  334. :data="tableData"
  335. @row-click="rowClickHandler"
  336. style="text-align: center"
  337. element-loading-text="加载中...请稍等"
  338. v-loading="loading"
  339. element-loading-background="rgba(0, 163, 255, 0.3) "
  340. >
  341. <el-table-column type="index" label="序号" width="60"> </el-table-column>
  342. <el-table-column prop="qx" label="区域" width="180" show-overflow-tooltip>
  343. </el-table-column>
  344. <el-table-column prop="gcjzmc" label="建筑名称" show-overflow-tooltip>
  345. </el-table-column>
  346. <el-table-column
  347. prop="xxdz"
  348. label="地址"
  349. width="180"
  350. show-overflow-tooltip
  351. >
  352. </el-table-column>
  353. <!-- 新增 -->
  354. <el-table-column
  355. prop="jzdx"
  356. label="建筑定性"
  357. width="140"
  358. show-overflow-tooltip
  359. >
  360. </el-table-column>
  361. <el-table-column prop="dl" label="建筑分类" show-overflow-tooltip>
  362. </el-table-column>
  363. <el-table-column prop="jznsygn" label="使用功能" show-overflow-tooltip>
  364. </el-table-column>
  365. <el-table-column prop="gd" label="高度(米)"> </el-table-column>
  366. <el-table-column prop="jzmj" label="建筑面积" show-overflow-tooltip>
  367. </el-table-column>
  368. <el-table-column prop="jcnd" label="建筑年代"> </el-table-column>
  369. <el-table-column prop="yhs" label="隐患数"> </el-table-column>
  370. <el-table-column prop="fxdj" label="风险等级" show-overflow-tooltip>
  371. </el-table-column>
  372. <el-table-column prop="wlw" label="物联网"> </el-table-column>
  373. </basic-table>
  374. <!-- 分页 -->
  375. <br />
  376. <basic-pagination
  377. layout="total,->,prev, pager, next, sizes,jumper"
  378. :page-sizes="[10, 20, 50, 100]"
  379. :page-size="params.pageSize"
  380. :current-page="params.PageNum"
  381. :total="total"
  382. @size-change="handleSizeChange"
  383. @current-change="handleCurrentChange"
  384. />
  385. </div>
  386. </template>
  387. <style scoped lang="less">
  388. .maintenance-supervision {
  389. // padding: 10px 10px 0px 20px;
  390. ::v-deep(.el-input__inner) {
  391. border: none;
  392. background: linear-gradient(
  393. 360deg,
  394. rgba(0, 148, 255, 0.5) 0%,
  395. rgba(0, 148, 255, 0.31) 100%
  396. );
  397. color: #fff;
  398. }
  399. ::v-deep(.el-button) {
  400. border: none;
  401. background: linear-gradient(360deg, #0094ff90 0%, #0094ff10 100%);
  402. color: #fff;
  403. }
  404. .maintenance-supervision_header {
  405. display: flex;
  406. flex-wrap: wrap;
  407. justify-content: space-around;
  408. // border-bottom: 1px solid #154956;
  409. padding-bottom: 10px;
  410. font-size: 12px;
  411. color: rgb(79, 149, 186);
  412. // .select-item{
  413. // margin-right: 20px;
  414. // }
  415. }
  416. .btn-item {
  417. margin-bottom: 10px;
  418. }
  419. .warp {
  420. height: 520px;
  421. margin: 0 auto;
  422. overflow: hidden;
  423. .item {
  424. list-style: none;
  425. padding: 0;
  426. margin: 0 auto;
  427. cursor: pointer;
  428. }
  429. }
  430. /deep/.el-input__inner {
  431. background-color: #184254;
  432. width: 150px;
  433. height: 30px;
  434. margin-bottom: 5px;
  435. }
  436. /deep/.el-button {
  437. width: 100px;
  438. height: 32px;
  439. font-size: 14px;
  440. line-height: 2px;
  441. // margin: 0 20px 0 30px;
  442. color: #fff;
  443. border-radius: 5px;
  444. border: none;
  445. }
  446. /deep/.el-button:hover {
  447. color: rgb(80, 147, 224);
  448. }
  449. /deep/.select_btn {
  450. position: absolute;
  451. top: 225px;
  452. right: 320px;
  453. //下拉框
  454. }
  455. /deep/.el-input {
  456. width: 150px;
  457. // margin-left: 20px;
  458. }
  459. .header {
  460. color: #fff;
  461. height: 33px !important;
  462. line-height: 33px !important;
  463. background-color: rgba(0, 163, 255, 0.3) !important;
  464. color: #61dbff;
  465. margin-top: 15px;
  466. margin-bottom: 6px;
  467. }
  468. .row,
  469. li,
  470. a {
  471. display: block;
  472. height: 39px;
  473. line-height: 39px;
  474. margin-bottom: 4px;
  475. display: flex;
  476. justify-content: space-between;
  477. align-items: center;
  478. font-size: 16px;
  479. background-color: rgba(0, 0, 0, 0.2);
  480. .time,
  481. .num,
  482. .person,
  483. .result {
  484. flex: 0.33;
  485. display: flex;
  486. justify-content: center;
  487. align-items: center;
  488. }
  489. .num {
  490. flex: 0.15;
  491. }
  492. }
  493. .inp {
  494. margin-left: 20px;
  495. }
  496. }
  497. .unit-bulid {
  498. display: flex;
  499. justify-content: space-between;
  500. margin-bottom: 20px;
  501. font-size: 18px;
  502. }
  503. .unit-num {
  504. width: 200px;
  505. height: 109px;
  506. border: 1px solid #0463a7;
  507. display: flex;
  508. flex-direction: column;
  509. align-items: center;
  510. justify-items: center;
  511. // line-height: 59px;
  512. }
  513. .custom-pagination {
  514. display: flex;
  515. justify-content: space-between;
  516. align-items: center;
  517. margin-top: 12px;
  518. font-size: 14px;
  519. }
  520. </style>