FourContent.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  1. <template>
  2. <div class="FourContent">
  3. <cart-item title="地块资源">
  4. <div class="xm-list flex-1 flex-col">
  5. <div class="statistics-wrapper flex">
  6. <div class="statistics-item flex">
  7. <img
  8. src="@/assets/images/GyzzView/gyzs.png"
  9. class="item-left-icon"
  10. />
  11. <div class="text">
  12. <span>地块宗数</span>
  13. <br />
  14. <span class="num"> {{ zs }} </span>
  15. <span style="font-size: 15px">宗</span>
  16. </div>
  17. </div>
  18. <div class="statistics-item flex">
  19. <img
  20. src="@/assets/images/GyzzView/gymj.png"
  21. class="item-left-icon"
  22. />
  23. <div class="text">
  24. <span>地块面积</span>
  25. <br />
  26. <span class="num"> {{ mj }} </span
  27. ><span style="font-size: 15px">亩</span>
  28. </div>
  29. </div>
  30. </div>
  31. <div class="search-wrapper">
  32. <table>
  33. <tr>
  34. <th>行政区划</th>
  35. <td>
  36. <el-select
  37. :popper-append-to-body="false"
  38. v-model="query.xzqdm"
  39. placeholder="请选择"
  40. size="medium"
  41. style="width: 100%"
  42. clearable
  43. >
  44. <el-option label="滨江区" value=""> </el-option>
  45. <el-option
  46. v-for="item in options"
  47. :key="item.value"
  48. :label="item.label"
  49. :value="item.value"
  50. >
  51. </el-option>
  52. </el-select>
  53. </td>
  54. <th>地块编号</th>
  55. <td>
  56. <el-input
  57. size="medium"
  58. v-model="query.name"
  59. placeholder="地块编号"
  60. style="width: 100%"
  61. clearable
  62. ></el-input>
  63. </td>
  64. </tr>
  65. <tr>
  66. <th>管地单位</th>
  67. <td colspan="3" style="width: auto">
  68. <el-input
  69. size="medium"
  70. v-model="query.gddw"
  71. placeholder="管地单位"
  72. clearable
  73. :disabled="disabledShow"
  74. ></el-input>
  75. </td>
  76. </tr>
  77. </table>
  78. <table>
  79. <tr>
  80. <th>面积(亩)</th>
  81. <td style="width: 130px;">
  82. <el-input
  83. size="medium"
  84. v-model="query.small"
  85. placeholder="面积小"
  86. style="width: 70%"
  87. clearable
  88. ></el-input>
  89. <span style="color: white;margin-left: 15px">-</span>
  90. </td>
  91. <td style="width: 130px;">
  92. <el-input
  93. size="medium"
  94. v-model="query.big"
  95. placeholder="面积大"
  96. style="width: 70%"
  97. clearable
  98. ></el-input>
  99. <!-- <div class="fold-wrapper" @click="foldShow = !foldShow"> <img src="@/assets/images/bjybz/choose.png" title="折叠/展开" style="vertical-align: middle"></div> -->
  100. </td>
  101. <td>
  102. <el-button
  103. size="mini"
  104. type="primary"
  105. @click="queryData()"
  106. icon="el-icon-search"
  107. style="position: absolute;top:7px;right:80px"
  108. >查询</el-button
  109. >
  110. <el-button
  111. size="mini"
  112. type="success"
  113. @click="openExcel()"
  114. icon="el-icon-download"
  115. style="position: absolute;top:7px;right:0px"
  116. >导出</el-button
  117. >
  118. </td>
  119. </tr>
  120. </table>
  121. </div>
  122. <div class="xm-wrapper">
  123. <div
  124. class="item-box"
  125. v-for="(item, index) in xzList"
  126. :key="index"
  127. @click="xzClick(item)"
  128. :title="item.dkbh"
  129. >
  130. <div
  131. class="tag-box"
  132. :style="{ background: tagBoxInitStyle(item.yj_status) }"
  133. >
  134. <p>
  135. {{ tagBoxInit(item.yj_status) }}
  136. </p>
  137. </div>
  138. <div class="left-xzq">
  139. <div class="top-title">
  140. {{ index + 1 }}<span>.</span>{{ item.dkbh }}
  141. </div>
  142. <div class="bottom-xzq">
  143. <img src="@/assets/images/YsbzView/location.png" alt="" />
  144. 滨江区-{{ item.dkwz }}
  145. </div>
  146. <div class="bottom-xzq text-ellipsis">
  147. <span class="sssr-title">管地单位:</span>
  148. <span class="sssr-value">{{ item.gddw }}</span>
  149. <span class="sssr-unit"></span>
  150. <span class="sssr-title">面积:</span>
  151. <span class="sssr-value">{{ item.mj }}</span>
  152. <span class="sssr-unit">亩</span>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. </div>
  158. <div class="page-div">
  159. <el-pagination
  160. background
  161. ref="test"
  162. layout="prev, pager, next"
  163. :total="config.total"
  164. :page-size="config.page.count"
  165. :page-sizes="[10, 20, 30]"
  166. :current-page="config.page.index"
  167. @current-change="pageToMe"
  168. @size-change="changePageMe"
  169. >
  170. </el-pagination>
  171. </div>
  172. </cart-item>
  173. </div>
  174. </template>
  175. <script>
  176. import CartItem from '@/views/components/CartItem.vue';
  177. import Excels from '@/utils/openExcel';
  178. export default {
  179. name: 'FourContent',
  180. components: {
  181. CartItem,
  182. },
  183. data() {
  184. return {
  185. disabledShow: false,
  186. userInfo: {},
  187. mj: 0,
  188. zs: 0,
  189. query: {
  190. xzqdm: '',
  191. name: '',
  192. gddw: '',
  193. big: '',
  194. small: '',
  195. },
  196. options: [
  197. {
  198. label: '西兴街道',
  199. value: '西兴街道',
  200. },
  201. {
  202. label: '长河街道',
  203. value: '长河街道',
  204. },
  205. {
  206. label: '浦沿街道',
  207. value: '浦沿街道',
  208. },
  209. ],
  210. xzList: [],
  211. config: {
  212. page: {
  213. count: 10,
  214. index: 1,
  215. },
  216. total: 100,
  217. },
  218. foldShow: false,
  219. };
  220. },
  221. created() {
  222. let users = JSON.parse(localStorage.getItem('userInfo'));
  223. if (users) {
  224. this.userInfo = users;
  225. let roles = users.roles.join(',');
  226. if (roles.indexOf('admin') > -1) {
  227. } else {
  228. if (users.nickName == '滨江地块监督') {
  229. this.query.gddw = '';
  230. } else {
  231. this.query.gddw = users.nickName;
  232. this.disabledShow = true;
  233. }
  234. }
  235. }
  236. },
  237. mounted() {
  238. this.$vm.$emit('setGdDetailType', 24);
  239. this.initHZ();
  240. this.getTsxzListData();
  241. },
  242. methods: {
  243. tagBoxInit(state) {
  244. if (state == 0) {
  245. return '待审核';
  246. } else if (state == 1) {
  247. return '不通过';
  248. }
  249. },
  250. tagBoxInitStyle(state) {
  251. if (state == 0) {
  252. return '#95AF2E';
  253. } else if (state == 1) {
  254. return '#CC4959';
  255. }
  256. },
  257. openExcel() {
  258. //导出表格
  259. var params = this.query;
  260. let url = `/api/ybz-bj/manageExport`;
  261. Excels.open(url, params, this, true, false, '滨江区管理地块情况表');
  262. },
  263. queryData() {
  264. this.initHZ();
  265. this.getTsxzListData();
  266. let refreshP = '1=1';
  267. console.log(this.query)
  268. if (this.query.xzqdm) {
  269. refreshP += ` and dkwz = '${this.query.xzqdm}'`;
  270. }
  271. if (this.query.name) {
  272. refreshP += ` and dkbh like '%${this.query.name}%'`;
  273. }
  274. if (this.query.gddw) {
  275. refreshP += ` and gddw like '${this.query.gddw}'`;
  276. }
  277. if (this.query.small) {
  278. refreshP += ` and mj >= ${this.query.small}`;
  279. }
  280. if (this.query.big) {
  281. refreshP += ` and mj <= ${this.query.big}`;
  282. }
  283. if (refreshP !== '1=1') {
  284. refreshP = refreshP.replace('1=1 and ', '');
  285. }
  286. this.$vm.$emit('updateLayer', {
  287. id: 'bj-dkgl',
  288. param: refreshP,
  289. layerIdx1: 0,
  290. layerIdx2: null,
  291. });
  292. },
  293. initHZ() {
  294. let p = {
  295. ...this.query,
  296. };
  297. if (this.userInfo && this.userInfo['nickName'] == '滨江地块监督') {
  298. p['gddw'] = ''
  299. }
  300. const urlApi = `/api/ybz-bj/manageHZ`;
  301. this.$ajax.get(urlApi, p, this, false).then((result) => {
  302. const { sl, mj } = result.data;
  303. this.zs = sl;
  304. this.mj = mj;
  305. });
  306. },
  307. getTsxzListData() {
  308. const urlApi = `/api/ybz-bj/manageList`;
  309. let p = {
  310. ...this.query,
  311. pageIndex: this.config.page.index,
  312. pageSize: this.config.page.count,
  313. };
  314. if (this.userInfo && this.userInfo['nickName'] == '滨江地块监督') {
  315. p['gddw'] = ''
  316. }
  317. this.$ajax.get(urlApi, p, this, false).then((result) => {
  318. const data = result['data'] || {};
  319. this.xzList = data['list'];
  320. this.config.total = data['total'];
  321. });
  322. },
  323. // 点击上一页、下一页以及指定页
  324. pageToMe(index) {
  325. this.config.page.index = index;
  326. this.getTsxzListData();
  327. },
  328. // 改变每页显示的条数
  329. changePageMe(size) {
  330. this.config.page.count = size;
  331. this.getTsxzListData();
  332. },
  333. xzClick(item) {
  334. this.$vm.$emit('setGdDetailType', 24);
  335. this.$vm.$emit('location-feature-where', {
  336. layerId: 'bj-dkgl',
  337. where: `dksyh = '${item.dksyh}'`,
  338. setting: { outFields: 'dksyh,dkbh,dkwz,gddw,dkmj' },
  339. });
  340. this.$emit('clickCallback', item);
  341. },
  342. dateFormat(date) {
  343. if (date === null || date === undefined || date === '') {
  344. console.log('时间格式化有误,时间为null');
  345. return '';
  346. }
  347. if (typeof date === 'string') {
  348. return date.substr(0, 10);
  349. }
  350. var time = new Date(date);
  351. var y = time.getFullYear();
  352. var m = time.getMonth() + 1;
  353. var d = time.getDate();
  354. return y + '-' + this.add0(m) + '-' + this.add0(d);
  355. },
  356. },
  357. };
  358. </script>
  359. <style scoped lang="scss">
  360. .FourContent {
  361. height: 100%;
  362. position: relative;
  363. overflow: hidden;
  364. ::v-deep .content {
  365. display: flex;
  366. flex-direction: column;
  367. }
  368. .xm-list {
  369. .statistics-wrapper {
  370. margin-bottom: 10px;
  371. border-radius: 5px;
  372. background: #1b366a;
  373. padding: 10px 20px;
  374. .statistics-item {
  375. width: 50%;
  376. .item-left-icon {
  377. width: 44px;
  378. height: 44px;
  379. margin-right: 15px;
  380. margin-top: 2px;
  381. }
  382. .text {
  383. span {
  384. font-size: 18px;
  385. font-family: MicrosoftYaHei;
  386. color: #fff;
  387. &.num {
  388. font-size: 20px;
  389. font-weight: bold;
  390. }
  391. }
  392. }
  393. }
  394. }
  395. ::v-deep .search-wrapper {
  396. table {
  397. width: 100%;
  398. tr {
  399. height: 40px;
  400. td,
  401. th {
  402. position: relative;
  403. .el-input {
  404. input {
  405. color: rgba(135, 193, 255, 1);
  406. background: transparent;
  407. border: 1px solid #4f91d7;
  408. &::-webkit-input-placeholder {
  409. /* WebKit browsers,webkit内核浏览器 */
  410. color: rgba(135, 193, 255, 0.8);
  411. }
  412. &:-moz-placeholder {
  413. /* Mozilla Firefox 4 to 18 */
  414. color: rgba(135, 193, 255, 0.8);
  415. }
  416. &::-moz-placeholder {
  417. /* Mozilla Firefox 19+ */
  418. color: rgba(135, 193, 255, 0.8);
  419. }
  420. &:-ms-input-placeholder {
  421. /* Internet Explorer 10+ */
  422. color: rgba(135, 193, 255, 0.8);
  423. }
  424. }
  425. }
  426. }
  427. th {
  428. width: 20%;
  429. font-size: 16px;
  430. color: rgba(135, 193, 255, 1);
  431. }
  432. td {
  433. width: 30%;
  434. .el-select {
  435. .el-select__tags {
  436. input {
  437. color: rgba(135, 193, 255, 1);
  438. }
  439. span {
  440. .el-tag {
  441. border: 1px solid #4f91d7;
  442. background: transparent;
  443. .el-select__tags-text {
  444. color: rgba(135, 193, 255, 1);
  445. }
  446. .el-tag__close {
  447. color: rgba(135, 193, 255, 1);
  448. background: transparent;
  449. border: 1px solid #4f91d7;
  450. }
  451. }
  452. }
  453. }
  454. }
  455. .submit-btn {
  456. color: #133887;
  457. background: #56c1ff;
  458. float: right;
  459. &:hover {
  460. color: #fff;
  461. }
  462. }
  463. }
  464. }
  465. }
  466. @keyframes rollIn {
  467. 0% {
  468. opacity: 0;
  469. height: 0;
  470. transform: translateY(-100%);
  471. }
  472. 100% {
  473. opacity: 1;
  474. height: 128px;
  475. transform: translateY(0);
  476. }
  477. }
  478. @keyframes rollOut {
  479. 0% {
  480. height: 128px;
  481. opacity: 1;
  482. transform: translateY(0);
  483. }
  484. 100% {
  485. opacity: 0;
  486. height: 0;
  487. transform: translateY(-100%);
  488. }
  489. }
  490. /*滚入——从上侧*/
  491. .rollIn {
  492. animation: rollIn 0.3s;
  493. }
  494. /*滚出——从上侧*/
  495. .rollOut {
  496. animation: rollOut 0.3s;
  497. }
  498. .fold-wrapper {
  499. position: absolute;
  500. top: 4px;
  501. right: 4px;
  502. width: 30px;
  503. line-height: 32px;
  504. height: 32px;
  505. border-radius: 5px;
  506. color: #fff;
  507. background: transparent;
  508. border: 1px solid #4f91d7;
  509. box-shadow: inset 0 0 10px #4f91d7;
  510. font-weight: normal;
  511. padding-left: 2px;
  512. cursor: pointer;
  513. font-size: 14px;
  514. &:hover {
  515. color: rgba(135, 193, 255, 1);
  516. }
  517. }
  518. }
  519. .xm-wrapper {
  520. flex: 1;
  521. overflow-y: auto;
  522. margin-top: 5px;
  523. .item-box {
  524. // height: 80px;
  525. // line-height: 45px;
  526. background: rgba(27, 54, 104, 0.3);
  527. border: 0.0625rem solid #395fa5;
  528. cursor: pointer;
  529. margin-bottom: 8px;
  530. display: flex;
  531. padding-bottom: 10px;
  532. position: relative;
  533. &:hover {
  534. background: linear-gradient(90deg, #0e66bf, #0c2b68);
  535. }
  536. .tag-box {
  537. width: 57px;
  538. height: 22px;
  539. display: flex;
  540. align-items: center;
  541. justify-content: center;
  542. position: absolute;
  543. right: 20px;
  544. top: 15px;
  545. border-radius: 4px;
  546. p {
  547. color: #fff;
  548. }
  549. }
  550. .left-xzq {
  551. // width: 360px;
  552. // height: 80px;
  553. overflow: hidden;
  554. text-overflow: ellipsis;
  555. font-weight: 400;
  556. .top-title {
  557. width: 100%;
  558. padding-top: 0.625rem;
  559. padding-left: 1.25rem;
  560. font-size: 20px;
  561. font-family: Alibaba PuHuiTi;
  562. font-weight: 700;
  563. color: #fff;
  564. overflow: hidden;
  565. text-overflow: ellipsis;
  566. white-space: nowrap;
  567. font-weight: 400;
  568. }
  569. .bottom-xzq {
  570. width: 100%;
  571. // height: 1.5625rem;
  572. padding-left: 1.25rem;
  573. font-size: 1rem;
  574. font-family: Alibaba PuHuiTi;
  575. font-weight: 400;
  576. color: #25f7ff;
  577. margin-top: 5px;
  578. img {
  579. width: 20px;
  580. vertical-align: sub;
  581. }
  582. .sssr-title {
  583. margin-left: 20px;
  584. color: #ffd100;
  585. }
  586. .sssr-value {
  587. font-size: 18px;
  588. }
  589. .sssr-unit {
  590. color: #fff;
  591. }
  592. }
  593. }
  594. .right-des {
  595. height: 30px;
  596. border-radius: 5px;
  597. padding: 5px 10px;
  598. text-align: center;
  599. color: #fff;
  600. margin-top: 24px;
  601. font-size: 13px;
  602. font-weight: bold;
  603. &.yes {
  604. background: #00bc77 !important;
  605. .color-circle {
  606. background: #0cbf97;
  607. }
  608. }
  609. &.no {
  610. // background: #009FFB;
  611. background: orange;
  612. .color-circle {
  613. background: orange;
  614. }
  615. }
  616. .color-circle {
  617. width: 12px;
  618. height: 12px;
  619. display: inline-block;
  620. border-radius: 50%;
  621. }
  622. }
  623. }
  624. }
  625. }
  626. .page-div {
  627. // height: 50px;
  628. padding-top: 10px;
  629. text-align: center;
  630. ::v-deep {
  631. .el-pagination .el-select .el-input {
  632. }
  633. .el-pagination.is-background .el-pager li:not(.disabled).active {
  634. background-color: #114f8f !important;
  635. color: #1ea0f7 !important;
  636. }
  637. .el-input__inner {
  638. -webkit-appearance: none;
  639. background-color: #04376c;
  640. background-image: none;
  641. border-radius: 0.25rem;
  642. border: 0.0625rem solid #3264da !important;
  643. box-sizing: border-box;
  644. color: #fff !important;
  645. display: inline-block;
  646. height: 30px;
  647. line-height: 30px;
  648. outline: 0;
  649. padding: 0 0.9375rem;
  650. -webkit-transition: border-color 0.2s
  651. cubic-bezier(0.645, 0.045, 0.355, 1);
  652. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  653. }
  654. .el-pagination.is-background .btn-next,
  655. .el-pagination.is-background .btn-prev,
  656. .el-pagination.is-background .el-pager li {
  657. margin: 0 0.3125rem;
  658. background-color: #04376c;
  659. color: #fff;
  660. min-width: 1.875rem;
  661. border-radius: 0.125rem;
  662. }
  663. }
  664. }
  665. }
  666. ::v-deep .el-select-dropdown {
  667. background-color: #264584;
  668. border: 1px solid #2c64a1;
  669. .el-select-dropdown__item {
  670. span {
  671. color: #1bf1ff;
  672. }
  673. }
  674. .selected {
  675. background-color: #2363ae !important;
  676. span {
  677. color: #1bf1ff;
  678. }
  679. }
  680. .hover {
  681. background-color: #2363ae !important;
  682. }
  683. .popper__arrow {
  684. border-bottom-color: #2c64a1;
  685. }
  686. .popper__arrow::after {
  687. border-bottom-color: #264584;
  688. }
  689. }
  690. </style>