FileData.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <template>
  2. <Search></Search>
  3. <div style="background-color: #f0f2f5" class="dark:bg-dark-900">
  4. <div class="datacenter-right">
  5. <div class="resource_list" id="map_list">
  6. <div v-for="(i, n) in list" v-if="list.length" :key="n" data-permission="true" class="resource_item"
  7. data-checking="false" data-searching="1" data-ispub="1">
  8. <div class="mapItem-top-box">
  9. <div class="item-top">
  10. <div class="img_container" data-num="1">
  11. <img class="tab-list-icon-img-MR00001936 img_mr MR00001936"
  12. :src="(i.info && i.info.length && i.info[0].thumbnail) || '/static/img/default-dr3.jpg'" alt="">
  13. </div>
  14. </div>
  15. <div class="item-title">
  16. <span class="r_name">{{ i.SERVICENAME }}</span>
  17. <span class="r-number" data-num="1" title="编目1次">1</span>
  18. </div>
  19. <div class="item-msg">
  20. <div class="item-msg-val" style="font-weight:bold;font-size:12px;color: #000;">坐标系:{{ i.CRS }}</div>
  21. <div class="item-msg-val">适用流程:国家秘密和工作秘密数据成果申请,</div>
  22. <div class="item-msg-val">关键字:测试数据</div>
  23. <div class="item-msg-val">服务类型:{{ i.TYPENAME }}</div>
  24. </div>
  25. </div>
  26. <div class="operation-box">
  27. <div class="operation-item browse-item-btn browse-item-MR00001936">
  28. <a target="_blank" :href="(i.info && i.info.length && i.info[0].thumbnail) || '/static/img/default-dr3.jpg'">
  29. <span>浏览</span>
  30. </a>
  31. </div>
  32. <div class="operation-item alone-apply-btn alone-apply-btn-MR00001936">
  33. <span style="border-right: 1px #ccc solid;" onclick="cardApplyItem('mr')">
  34. <span>申请</span>
  35. </span>
  36. </div>
  37. <!-- <div class="user-apply-btn user-apply-btn-MR00001936"
  38. onclick="addApplyBank(this,'MR00001936','行政区域','1','测试数据','mr','2000坐标系4490')">
  39. <span>加入申请库</span>
  40. </div>
  41. <div class="dis-apply-btn dis-apply-btn-MR00001936">
  42. <span>已加入申请库</span>
  43. </div> -->
  44. <div class="operation-item" @click="handleQuery(i)">
  45. <a href="javascript:void(0)" class="">
  46. <span>详细</span>
  47. </a>
  48. </div>
  49. <div class="operation-item" @click="handleQuery(i)">
  50. <a href="javascript:void(0)" class="">
  51. <span>加入申请库</span>
  52. </a>
  53. </div>
  54. <div class="operation-item operation-item-active" @click="handleQuery(i)">
  55. <a href="javascript:void(0)" class="">
  56. <span>已加入申请库</span>
  57. </a>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. <!-- <BasicTable @register="registerTable" class="dark:bg-dark-900">
  64. <template #toolbar>
  65. <Authority value="api:yt:smsLog:delete">
  66. <Popconfirm title="您确定要批量删除数据" ok-text="确定" cancel-text="取消" @confirm="handleDeleteOrBatchDelete(null)">
  67. <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  68. </Popconfirm>
  69. </Authority>
  70. </template>
  71. <template #remark="{ record }">
  72. <Tooltip :title="record.remark">
  73. <div class="truncate w-full">{{ record.remark }}</div>
  74. </Tooltip>
  75. </template>
  76. <template #action="{ record }">
  77. <TableAction :actions="[
  78. {
  79. label: '查看',
  80. auth: 'api:yt:smsLog:get',
  81. icon: 'ant-design:fund-view-outlined',
  82. onClick: handleQuery.bind(null, record),
  83. },
  84. {
  85. label: '删除',
  86. auth: 'api:yt:smsLog:delete',
  87. icon: 'ant-design:delete-outlined',
  88. color: 'error',
  89. popConfirm: {
  90. title: '是否确认删除',
  91. confirm: handleDeleteOrBatchDelete.bind(null, record),
  92. },
  93. },
  94. ]" />
  95. </template>
  96. </BasicTable> -->
  97. <!-- 弹出框 -->
  98. <MapDrawer @register="registerModal" />
  99. </div>
  100. </template>
  101. <script lang="ts">
  102. import { defineComponent, nextTick, onMounted, ref, defineProps, watch } from 'vue';
  103. import { BasicTable, useTable, TableAction } from '/@/components/Table';
  104. import { columns, searchFormSchema } from './sms.data';
  105. import { Popconfirm, Tooltip } from 'ant-design-vue';
  106. import { Authority } from '/@/components/Authority';
  107. import { platList, img } from '/@/api/resource/plat';
  108. // 加载自定义侧边弹出框 组件
  109. import { useDrawer } from '/@/components/Drawer';
  110. // 导入子页面【新增、修改】
  111. import MapDrawer from './MapDrawer.vue';
  112. import Search from './child/Search.vue';
  113. export default defineComponent({
  114. name: 'SmsLog',
  115. components: { BasicTable, TableAction, Search, Authority, Popconfirm, Tooltip, MapDrawer },
  116. setup() {
  117. const [registerModal, { openDrawer }] = useDrawer(); //使用右侧弹出框
  118. const list = ref([]);
  119. const props = defineProps({
  120. listData: {
  121. type: Array,
  122. default: () => [],
  123. }
  124. })
  125. // setInterval(() => {
  126. // console.log(props)
  127. // }, 2000)
  128. onMounted(() => {
  129. platList().then((r) => {
  130. if (r) {
  131. var o = r.find(i => i.type == 'DR')
  132. if (o && o.items && o.items.length) {
  133. o.items.map(async (i) => i.info = await img(i.SERVICEID))
  134. console.log(o);
  135. list.value = o.items;
  136. }
  137. }
  138. });
  139. });
  140. function handleQuery(record: Recordable) {
  141. console.log("11111:", record)
  142. openDrawer(true, {
  143. record,
  144. });
  145. }
  146. return {
  147. registerModal,
  148. list,
  149. handleQuery,
  150. };
  151. },
  152. });
  153. </script>
  154. <style scoped>
  155. .datacenter-right .resource_list .item-title .r_name {
  156. color: #5e5d5e;
  157. display: inline-block;
  158. width: 190px;
  159. overflow: hidden;
  160. text-overflow: ellipsis;
  161. white-space: nowrap;
  162. }
  163. .datacenter-right .resource_list {
  164. box-sizing: border-box;
  165. width: 100%;
  166. float: left;
  167. clear: both;
  168. display: flex;
  169. flex-wrap: wrap;
  170. align-items: center;
  171. }
  172. .datacenter-right .resource_list>div:not(:nth-of-type(4n + 4)) {
  173. margin-right: 7px;
  174. }
  175. .resource_item {
  176. height: 318px;
  177. width: 224px;
  178. margin-bottom: 14px;
  179. border: 2px dashed transparent;
  180. width: 386px;
  181. height: 402px;
  182. border-radius: 4px;
  183. opacity: 1;
  184. background: #FFFFFF;
  185. border: 1px solid #DEDEDE;
  186. }
  187. .mapItem-top-box {
  188. height: 350px;
  189. }
  190. .datacenter-right .resource_list .operation-box {
  191. height: 42px;
  192. display: flex;
  193. margin-bottom: 10px;
  194. margin-left: 20px;
  195. }
  196. .datacenter-right .resource_list .item-top {
  197. padding: 13px;
  198. }
  199. .datacenter-right .resource_list .item-top img {
  200. width: 360px;
  201. height: 190px;
  202. border: solid 1px #eeebeb;
  203. }
  204. .datacenter-right .resource_list .item-title {
  205. font-size: 14px;
  206. font-family: PingFang SC;
  207. font-weight: bold;
  208. color: #5e5d5e;
  209. line-height: 16px;
  210. padding: 0 0 0 14px;
  211. overflow: hidden;
  212. text-overflow: ellipsis;
  213. white-space: nowrap;
  214. }
  215. .datacenter-right .resource_list .item-msg {
  216. padding: 0 13px 13px;
  217. }
  218. .img_container {
  219. text-align: center;
  220. }
  221. .img_container {
  222. width: 100%;
  223. height: 100%;
  224. background: #b7bed3;
  225. border-radius: 4px;
  226. }
  227. .datacenter-right .resource_list .item-msg-val {
  228. font-size: 12px;
  229. font-family: PingFang SC;
  230. font-weight: bold;
  231. color: #5e5d5e;
  232. line-height: 22px;
  233. opacity: 0.5;
  234. overflow: hidden;
  235. text-overflow: ellipsis;
  236. white-space: nowrap;
  237. }
  238. .datacenter-right .resource_list .operation-item {
  239. display: flex;
  240. align-items: center;
  241. justify-content: center;
  242. min-width: 50px;
  243. height: 34px;
  244. opacity: 1;
  245. margin-right: 22px;
  246. padding: 0 10px;
  247. background: #E8E8E8;
  248. }
  249. .datacenter-right .resource_list .operation-item:hover {
  250. background: #0671DD;
  251. }
  252. .datacenter-right .resource_list .operation-item:hover a {
  253. color: #fff;
  254. }
  255. .datacenter-right .resource_list .operation-item.alone-apply-btn {
  256. display: none;
  257. }
  258. .operation-item-active {
  259. background: #05B069 !important;
  260. }
  261. .operation-item-active a {
  262. color: #fff !important;
  263. }
  264. .datacenter-right .resource_list .operation-item a {
  265. font-size: 12px;
  266. width: 100%;
  267. text-align: center;
  268. color: #5e5d5e;
  269. }
  270. </style>