details.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <div class="conViews">
  3. <div class="sm-panel sm-function-module-query" v-drag v-if="isShallow">
  4. <div class="sm-panel-header">
  5. <span> 项目详情 </span>
  6. <i class="el-icon-close" @click="closeInster"></i>
  7. </div>
  8. <el-tabs type="border-card" class="xz_box" v-model="activeTabs" stretch>
  9. <el-tab-pane label="基本信息" name="jbxx">
  10. <Info :data="jbxxData"></Info>
  11. </el-tab-pane>
  12. <el-tab-pane label="进度跟踪" name="rdxx"> </el-tab-pane>
  13. </el-tabs>
  14. </div>
  15. <el-dialog
  16. :title="1"
  17. width="40%"
  18. :visible.sync="dialogVisible"
  19. :before-close="close"
  20. :modal-append-to-body="false"
  21. :close-on-click-modal="false"
  22. >
  23. <CustomDetails :model="formData" :config="detailInfos">
  24. <template #attachment>
  25. <span>{{ formData.attachment }}</span>
  26. <i class="usable el-icon-tickets" @click="download"></i>
  27. </template>
  28. </CustomDetails>
  29. </el-dialog>
  30. </div>
  31. </template>
  32. <script>
  33. import { GetDetail } from "@/api/Idleland.js";
  34. import Info from "../../Idleland/components/info.vue";
  35. import CustomDetails from "@/components/mapView/custom-detailsInfo.vue";
  36. import { getXmList, getXm } from "@/api/stxf/tdzz.js";
  37. import { detailInfos, tbInfos } from "./config";
  38. export default {
  39. props: {
  40. interObj: {
  41. type: Object,
  42. },
  43. },
  44. components: { Info, CustomDetails },
  45. data() {
  46. return {
  47. activeTabs: "jbxx",
  48. isShallow: false,
  49. jbxxData: [],
  50. rdData: [],
  51. tempdataLayerId: null,
  52. dialogVisible: false,
  53. };
  54. },
  55. mounted() {
  56. // this.init();
  57. },
  58. methods: {
  59. //关闭详情
  60. closeInster() {
  61. this.isShallow = false;
  62. },
  63. handleView(val, type) {
  64. this.isShallow = true;
  65. this.jbxxData = [];
  66. getXm(val.id).then((res) => {
  67. if (res.code == 200) {
  68. // Object.keys(res.data).forEach((key) => {
  69. // this.jbxxData.push({ name: key, value: res.data[key] });
  70. // });
  71. detailInfos.forEach((key) => {
  72. this.jbxxData.push({ name: key.name, value: res.data[key.value] });
  73. });
  74. } else {
  75. this.$message.error(res.message);
  76. }
  77. });
  78. },
  79. },
  80. mounted() {},
  81. watch: {},
  82. };
  83. </script>
  84. <style lang="scss" scoped>
  85. .sm-panel {
  86. width: 400px;
  87. max-width: 400px;
  88. /deep/ .el-icon-close:before {
  89. position: absolute;
  90. top: 10px;
  91. right: 10px;
  92. font-size: larger;
  93. font-weight: bold;
  94. &:hover {
  95. color: aqua;
  96. }
  97. }
  98. }
  99. .sm-function-module-query {
  100. max-height: 800px !important;
  101. top: 28px !important;
  102. }
  103. </style>