interDetails.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <template>
  2. <div>
  3. <div class="DetilsCon">
  4. <div class="sm-panel sm-function-module-query" v-drag>
  5. <div class="sm-panel-header">
  6. <span>占压耕地图斑</span>
  7. <i class="el-icon-close" @click="closeInster"></i>
  8. </div>
  9. <div class="tableCon">
  10. <el-table
  11. :header-cell-style="{
  12. background: 'rgba(10, 25, 38, 0.6)',
  13. color: '#66b1ff',
  14. fontSize: '14px',
  15. fontFamily: 'Microsoft YaHei',
  16. fontWeight: '400',
  17. }"
  18. :data="tableData"
  19. style="width: 100%"
  20. >
  21. <el-table-column
  22. show-overflow-tooltip="true"
  23. prop="id"
  24. label="图斑编号"
  25. >
  26. </el-table-column>
  27. <el-table-column
  28. show-overflow-tooltip="true"
  29. prop="siweiarea"
  30. label="图斑面积"
  31. >
  32. </el-table-column>
  33. <el-table-column width="100" label="操作">
  34. <template slot-scope="scope">
  35. <!-- <span>编辑</span> -->
  36. <el-button size="mini" type="text" @click="flyTo(scope.row)"
  37. >定位</el-button
  38. >
  39. <el-button
  40. size="mini"
  41. type="text"
  42. @click="handleView(scope.row)"
  43. >详情</el-button
  44. >
  45. </template>
  46. </el-table-column></el-table
  47. >
  48. </div>
  49. </div>
  50. </div>
  51. <div class="conViews" v-if="isShallow">
  52. <div class="sm-panel sm-function-module-query" v-drag>
  53. <div class="sm-panel-header">
  54. <span>图斑详情</span>
  55. <i class="el-icon-close" @click="isShallow = false"></i>
  56. </div>
  57. <el-tabs
  58. type="border-card"
  59. class="xz_box info"
  60. v-model="activeTabs"
  61. stretch
  62. >
  63. <el-tab-pane label="套合结果" name="thjg">
  64. <!-- <div class="inter_result"></div> -->
  65. <div class="Integration inter_result">
  66. <div
  67. class="Integration_list"
  68. v-for="(item, i) in yzjgData"
  69. :key="i"
  70. >
  71. <div
  72. v-for="(item2, c) in item.mx_data"
  73. :key="c"
  74. class="list_Cont"
  75. >
  76. <div class="list_item">
  77. <div class="listText">
  78. <span style="color: #fff">{{ item2.bsmmc }}图斑数</span>
  79. <span
  80. style="
  81. color: #2d8cf0;
  82. font-weight: bold;
  83. cursor: pointer;
  84. "
  85. @click="resultDeatils(item2, item.mx_bsm)"
  86. >{{ item2.sumcount }}个</span
  87. >
  88. </div>
  89. </div>
  90. <div class="list_item">
  91. <div class="listText">
  92. <span style="color: #fff">{{ item2.bsmmc }}面积(㎡)</span>
  93. <span color="#80FFFF">{{ item2.sumvalue }}</span>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </el-tab-pane>
  100. <!-- -->
  101. <el-tab-pane label="基本信息" name="jbxx">
  102. <div class="inter_result" v-if="activeTabs == 'jbxx'">
  103. <el-table
  104. :header-cell-style="{
  105. background: 'rgba(10, 25, 38, 0.6)',
  106. color: '#66b1ff',
  107. fontSize: '14px',
  108. fontFamily: 'Microsoft YaHei',
  109. fontWeight: '400',
  110. }"
  111. :data="jbxxData"
  112. height="350"
  113. style="width: 100%"
  114. >
  115. <el-table-column
  116. show-overflow-tooltip="true"
  117. prop="name"
  118. label="属性名称"
  119. >
  120. </el-table-column>
  121. <el-table-column
  122. show-overflow-tooltip="true"
  123. prop="value"
  124. label="属性值"
  125. >
  126. </el-table-column>
  127. </el-table>
  128. <el-carousel indicator-position="outside">
  129. <el-carousel-item v-for="item in 4" :key="item">
  130. <h3>{{ item }}</h3>
  131. </el-carousel-item>
  132. </el-carousel>
  133. </div>
  134. </el-tab-pane>
  135. </el-tabs>
  136. </div>
  137. </div>
  138. </div>
  139. </template>
  140. <script>
  141. import { name } from "file-loader";
  142. import { getYZ, getOneDetail } from "../../../api/ghss/gdbh.js";
  143. export default {
  144. props: {
  145. interObj: {
  146. type: Object,
  147. },
  148. },
  149. data() {
  150. return {
  151. activeTabs: "thjg",
  152. tableData: [],
  153. viewsData: null,
  154. isShallow: false,
  155. jbxxData: null,
  156. yzjgData: [],
  157. };
  158. },
  159. mounted() {
  160. // this.init();
  161. },
  162. methods: {
  163. //关闭套合结果详情
  164. closeInster() {
  165. this.$emit("updateParent", "showInter", false);
  166. this.isShallow = false
  167. },
  168. flyTo(val) {},
  169. handleView(val) {
  170. this.isShallow = true
  171. getOneDetail({
  172. bsm: this.interObj.bsm,
  173. id: val.id,
  174. }).then((res) => {
  175. if (res.statuscode == 200) {
  176. this.viewsData = res.data;
  177. this.yzjgData = res.data.yzjg;
  178. this.jbxxData = Object.keys(res.data.tbxx).map((key) => ({
  179. name: key,
  180. value: res.data.tbxx[key],
  181. }));
  182. } else {
  183. this.$message.error(res.message);
  184. }
  185. });
  186. this.isShallow = true;
  187. },
  188. init() {
  189. getYZ(this.interObj).then((res) => {
  190. if (res.statuscode == 200) {
  191. this.tableData = res.data;
  192. } else {
  193. this.$message.error(res.message);
  194. }
  195. });
  196. },
  197. },
  198. mounted() {},
  199. watch: {
  200. // interObj(newValue) {
  201. // this.init();
  202. // },
  203. interObj: {
  204. handler(newVal) {
  205. this.init();
  206. },
  207. deep: true,
  208. immediate: true,
  209. },
  210. },
  211. };
  212. </script>
  213. <style lang="scss" scoped>
  214. .DetilsCon {
  215. position: relative;
  216. right: 57%;
  217. }
  218. .tableCon {
  219. height: 40rem;
  220. /deep/ .el-table tr {
  221. background: rgba(10, 25, 38, 0.5) !important;
  222. }
  223. /deep/ .el-table td.el-table__cell,
  224. .el-table th.el-table__cell.is-leaf {
  225. background: rgba(10, 25, 38, 0.5) !important;
  226. border-bottom: 0px solid #ebeef5;
  227. }
  228. .el-table {
  229. color: #fff;
  230. background: rgba(10, 25, 38, 0.5) !important;
  231. }
  232. /deep/ .el-table__fixed-right::before,
  233. .el-table__fixed::before {
  234. background: rgba(10, 25, 38, 0.9) !important;
  235. }
  236. /deep/ .el-table__fixed-right-patch {
  237. background: rgba(10, 25, 38, 0.9) !important;
  238. }
  239. /deep/ .el-table--border::after,
  240. .el-table--group::after,
  241. .el-table::before {
  242. background: rgba(10, 25, 38, 0) !important;
  243. }
  244. }
  245. /deep/ .el-icon-close:before {
  246. position: absolute;
  247. top: 10px;
  248. right: 10px;
  249. font-size: larger;
  250. font-weight: bold;
  251. &:hover {
  252. color: aqua;
  253. }
  254. }
  255. /deep/ .el-carousel__item h3 {
  256. color: #475669;
  257. font-size: 18px;
  258. opacity: 0.75;
  259. line-height: 200px;
  260. text-align: center;
  261. margin: 0;
  262. }
  263. /deep/ .el-carousel__container {
  264. height: 200px;
  265. }
  266. /deep/ .el-carousel__item:nth-child(2n) {
  267. background-color: #99a9bf;
  268. }
  269. /deep/ .el-carousel__item:nth-child(2n + 1) {
  270. background-color: #d3dce6;
  271. }
  272. .inter_result {
  273. height: 580px;
  274. }
  275. .Integration {
  276. max-height: 580px;
  277. overflow: hidden;
  278. overflow-y: auto;
  279. .Integration_list {
  280. background-color: #0f7bc875;
  281. display: flex;
  282. justify-content: space-between;
  283. margin-top: 8px;
  284. flex-wrap: wrap;
  285. padding: 10px;
  286. .listCol {
  287. width: 49%;
  288. display: flex;
  289. align-items: center;
  290. white-space: nowrap;
  291. margin-bottom: 5px;
  292. .listText {
  293. width: 100%;
  294. display: flex;
  295. flex-direction: column;
  296. span {
  297. height: 20px;
  298. height: 20px;
  299. line-height: 20px;
  300. }
  301. }
  302. }
  303. .list_Cont {
  304. width: 100%;
  305. display: flex;
  306. align-items: center;
  307. white-space: nowrap;
  308. margin-bottom: 5px;
  309. .list_item {
  310. width: 50%;
  311. .listText {
  312. width: 100%;
  313. display: flex;
  314. flex-direction: column;
  315. span {
  316. height: 20px;
  317. line-height: 20px;
  318. }
  319. }
  320. }
  321. }
  322. }
  323. }
  324. </style>
  325. </style>