index.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <template>
  2. <div class="ghzc ResourceShare">
  3. <div class="innerContainer" v-drag>
  4. <custom-form ref="formRef" :model="model" :config="formConfig">
  5. <template #time>
  6. <el-date-picker
  7. v-model="model.sj"
  8. type="daterange"
  9. value-format="yyyy-MM-dd"
  10. range-separator="~"
  11. start-placeholder="开始日期"
  12. end-placeholder="结束日期"
  13. class="datepicker"
  14. size="mini"
  15. @change="changedate"
  16. >
  17. </el-date-picker>
  18. </template>
  19. <template #type>
  20. <el-select v-model="model.placeCode" placeholder="申请状态">
  21. <el-option
  22. v-for="item in optionList"
  23. :key="item.code"
  24. :label="item.name"
  25. :value="item.code"
  26. >
  27. </el-option>
  28. </el-select>
  29. </template>
  30. <template #action>
  31. <!-- v-hasPermi="['monitor:job:add']" -->
  32. <el-button size="mini" @click="getTableData">查询</el-button>
  33. <el-button size="mini" @click="reset()">重置</el-button>
  34. </template>
  35. </custom-form>
  36. <!-- :total="table.total"
  37. :tableArrDate="table.data" -->
  38. <customForm></customForm>
  39. <tablePage
  40. class="tablePage"
  41. :cloumn="cloumn"
  42. :table="table"
  43. ref="tableDialogRef"
  44. @currentChange="searchFun"
  45. >
  46. <template #apptype="{ row }">
  47. <div :class="`type${row.type}`">{{ row.typeN }}</div>
  48. </template>
  49. <template #url="{ row }">
  50. <div v-if="row.url" @click="copyText(row.url)">
  51. {{ row.url }}
  52. <i class="el-icon-document-copy usable"></i>
  53. </div>
  54. </template>
  55. <template #action="{ row }">
  56. <span class="usable" @click="detail(row)">详情</span>
  57. <span :class="{ usable: row.type == 0 }" @click="reset(row)"
  58. >撤回</span
  59. >
  60. </template>
  61. </tablePage>
  62. </div>
  63. <addEdt ref="addEdtModal" @close="closeMdel"></addEdt>
  64. </div>
  65. </template>
  66. <script>
  67. import Clipboard from "clipboard";
  68. import tablePage from "@/components/mapView/tablePage.vue";
  69. import customForm from "@/components/mapView/custom-form.vue";
  70. import addEdt from "./components/addEdtModal.vue";
  71. import { FormConfig, TableHeader } from "./config";
  72. export default {
  73. components: {
  74. tablePage,
  75. customForm,
  76. addEdt,
  77. },
  78. props: {},
  79. data() {
  80. return {
  81. model: {
  82. carNo: "", //网格名称
  83. regionCode: "", //地区编码
  84. placeCode: "", //所属小区
  85. },
  86. formConfig: FormConfig,
  87. cloumn: TableHeader,
  88. table: {
  89. data: [
  90. { JGMC: "ssmdmm", type: 0, typeN: "正在审核" },
  91. {
  92. JGMC: "ssmdmm",
  93. type: 1,
  94. time: "2024/9/3",
  95. typeN: "审核通过",
  96. url: "snsd",
  97. list: [
  98. { time: "2024/9/3", jg: "申请通过" },
  99. { time: "2024/8/13", jg: "申请通过" },
  100. ],
  101. },
  102. {
  103. JGMC: "ssmdmm",
  104. type: 2,
  105. typeN: "审核不通过",
  106. list: [
  107. { time: "2024/9/3", jg: "申请通过" },
  108. { time: "2024/8/13", jg: "申请通过" },
  109. ],
  110. },
  111. { JGMC: "ssmdmm", type: 3, typeN: "已撤回" },
  112. ],
  113. total: 0,
  114. },
  115. };
  116. },
  117. methods: {
  118. searchFun(page) {
  119. this.getTableData({ pageNo: page.pageIndex, pageSize: page.size });
  120. },
  121. async getTableData(params) {
  122. let obj = {
  123. jscType: store.state.cockpit_vector.tablejscType,
  124. beginTime: store.state.cockpit_date[0],
  125. endTime: store.state.cockpit_date[1],
  126. id: store.state.cockpit_region.id,
  127. ...params,
  128. };
  129. let data = await QueryList(obj);
  130. this.active_dableData = data.data;
  131. this.tab.data = data.data;
  132. },
  133. // 详情
  134. detail(row) {
  135. this.$refs.addEdtModal.Init("info", row);
  136. },
  137. reset(row) {
  138. if (row.type == 0) this.$refs.addEdtModal.Init("withdraw", row);
  139. },
  140. copyText(text) {
  141. this.$copyText(text).then(
  142. () => {
  143. this.$message.success("复制成功");
  144. },
  145. () => {
  146. this.$message.error("该浏览器不支持自动复制");
  147. }
  148. );
  149. },
  150. closeMdel() {},
  151. },
  152. computed: {},
  153. watch: {},
  154. mounted() {},
  155. };
  156. </script>
  157. <style lang="scss" scoped>
  158. @import "../resource.scss";
  159. </style>
  160. <style lang="scss">
  161. @import "../../cockpit/datePicker.scss";
  162. </style>