index.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <template>
  2. <div class="safetyList">
  3. <customHeader>安全监控新增列表</customHeader>
  4. <div class="content">
  5. <div class="left-box">
  6. <!-- 左侧树菜单 -->
  7. <!-- <fileSystem :selected="selected" :list="listArr" :draggable="true" @on-click="onClick">
  8. <template #icon="{ item }">
  9. <template v-if="item.isFolder">
  10. <SvgIcon v-if="item.isexpanded" size="18" name="file-open" />
  11. <SvgIcon v-else size="18" name="file-close" />
  12. </template>
  13. <treeIcon class="iconfont" :title="item.title" v-else />
  14. </template>
  15. </fileSystem> -->
  16. </div>
  17. <div class="right-box">
  18. <!-- <NormalTable :key="dataNow" :searchParam="searchParam" :columns="columns" :deleteById="deleteById"
  19. :downLoad="downLoad" :list="reportList" designScope="device-tabel" title="报表管理" :showTab="false"
  20. @saveAdd="saveAdd" /> -->
  21. </div>
  22. </div>
  23. </div>
  24. </template>
  25. <script setup lang="ts">
  26. import { ref, nextTick, reactive, onMounted } from 'vue';
  27. import customHeader from '/@/components/vent/customHeader.vue';
  28. // import fileSystem from './comment/common/cameraTree.vue';
  29. // import { SvgIcon } from '/@/components/Icon';
  30. // import treeIcon from './comment/common/Icon/treeIcon.vue';
  31. // import NormalTable from './comment/NormalTable.vue';
  32. import { message } from 'ant-design-vue';
  33. import { } from './safetyList.data';
  34. import { } from './safetyList.api';
  35. // //左侧菜单列表
  36. // let listArr = reactive<any[]>([
  37. // {
  38. // pid: 'auto',
  39. // isFolder: true,
  40. // isexpanded:true,
  41. // title: '系统数据报表',
  42. // id: '0',
  43. // children: []
  44. // },
  45. // {
  46. // pid: 'hand',
  47. // isFolder: true,
  48. // isexpanded:true,
  49. // title: '手动报表',
  50. // id: '1',
  51. // children: []
  52. // },
  53. // {
  54. // pid: 'temp',
  55. // isFolder: true,
  56. // isexpanded:true,
  57. // title: '报表模板',
  58. // id: '2',
  59. // children: []
  60. // },
  61. // ]);
  62. // //lxh 当前选中树节点
  63. // let selected = reactive<any>({
  64. // id: null,
  65. // pid: null,
  66. // title: '',
  67. // isFolder: false,
  68. // });
  69. // //获取左侧菜单树
  70. // async function getTreeList() {
  71. // const res = await getQuery()
  72. // if (res.length != 0) {
  73. // listArr.forEach(el => {
  74. // el.children.length = 0
  75. // res.forEach(v => {
  76. // // v.id=v.itemValue
  77. // let childre: any[] = []
  78. // if (v.children.length != 0) {
  79. // v.children.forEach(m => {
  80. // childre.push({ pid: v.itemValue, ppid: el.id, isFolder: false,isexpanded:false, title: m.itemText, id: m.itemValue })
  81. // })
  82. // }
  83. // el.children.push({ pid: el.id, isFolder: true,isexpanded:false, title: v.itemText, id: v.itemValue, children: childre })
  84. // })
  85. // })
  86. // console.log(listArr, 'listArr-----------')
  87. // }
  88. // }
  89. // //点击目录
  90. // async function onClick(node) {
  91. // console.log(node, 'node--------------')
  92. // if (node.pid == 'auto') {
  93. // treeClick(node)
  94. // } else if (node.pid == 'hand') {
  95. // treeClick(node)
  96. // } else {
  97. // treeClick(node)
  98. // }
  99. // };
  100. // function treeClick(node) {
  101. // dataNow.value = new Date().getTime()
  102. // selected.id = node.id;
  103. // selected.pid = node.pid;
  104. // selected.title = node.title;
  105. // selected.isFolder = node.isFolder;
  106. // selected.ppid=node.ppid
  107. // if (node.id == '0' || node.id == '1' || node.id == '2') {
  108. // searchParam.busKind = ''
  109. // searchParam.modelType = node.id
  110. // searchParam.reportType = ''
  111. // } else if (node.pid == '0' || node.pid == '1' || node.pid == '2') {
  112. // searchParam.busKind = node.id
  113. // searchParam.modelType = node.pid
  114. // searchParam.reportType = ''
  115. // } else {
  116. // searchParam.busKind = node.pid
  117. // searchParam.modelType = node.ppid
  118. // searchParam.reportType = node.id
  119. // }
  120. // }
  121. // async function saveAdd(params) {
  122. // let res = await save({ ...params });
  123. // if (res.id) {
  124. // message.warning('新增成功!');
  125. // } else {
  126. // message.error('新增失败!')
  127. // }
  128. // dataNow.value = new Date().getTime()
  129. // }
  130. // onMounted(() => {
  131. // getTreeList()
  132. // })
  133. </script>
  134. <style lang="less" scoped>
  135. .safetyList {
  136. width: calc(100% - 20px);
  137. height: calc(100% - 90px);
  138. position: relative;
  139. margin: 80px 10px 10px 10px;
  140. .content {
  141. width: 100%;
  142. height: calc(100% - 30px);
  143. display: flex;
  144. flex-direction: row;
  145. justify-content: space-between;
  146. align-items: flex-start;
  147. position: relative;
  148. // z-index: 999;
  149. .left-box {
  150. width: 15%;
  151. height: 100%;
  152. padding: 20px;
  153. border: 1px solid #99e8ff66;
  154. background: #27546e1a;
  155. box-shadow: 0px 0px 20px 7px rgba(145, 233, 254, 0.7) inset;
  156. -moz-box-shadow: 0px 0px 20px 7px rgba(145, 233, 254, 0.7) inset;
  157. -webkit-box-shadow: 0px 0px 50px 1px rgb(149 235 255 / 5%) inset;
  158. overflow-y: auto;
  159. // lxh
  160. .iconfont {
  161. color: #fff;
  162. font-size: 12px;
  163. margin-left: 5px;
  164. }
  165. }
  166. .right-box {
  167. width: 85%;
  168. height: 100%;
  169. padding: 0px 0px 0px 15px;
  170. box-sizing: border-box;
  171. }
  172. }
  173. }
  174. </style>