1
0

BasicInfoModalContent.vue 12 KB

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