MapData.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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" 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="`../../mapview.html?/iserver/services/map-16/rest/maps/LZS16envi1%4016.ijs`">
  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="operation-item" @click="handleQuery(i)">
  38. <a href="javascript:void(0)" class="">
  39. <span>详细</span>
  40. </a>
  41. </div>
  42. <div class="operation-item" @click="applyWay(i)">
  43. <a href="javascript:void(0)" class="">
  44. <span>加入申请库</span>
  45. </a>
  46. </div>
  47. <div class="operation-item operation-item-active" @click="handleQuery(i)">
  48. <a href="javascript:void(0)" class="">
  49. <span>已加入申请库</span>
  50. </a>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. <!-- <BasicTable @register="registerTable" class="dark:bg-dark-900">
  57. <template #toolbar>
  58. <Authority value="api:yt:smsLog:delete">
  59. <Popconfirm title="您确定要批量删除数据" ok-text="确定" cancel-text="取消" @confirm="handleDeleteOrBatchDelete(null)">
  60. <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  61. </Popconfirm>
  62. </Authority>
  63. </template>
  64. <template #remark="{ record }">
  65. <Tooltip :title="record.remark">
  66. <div class="truncate w-full">{{ record.remark }}</div>
  67. </Tooltip>
  68. </template>
  69. <template #action="{ record }">
  70. <TableAction :actions="[
  71. {
  72. label: '查看',
  73. auth: 'api:yt:smsLog:get',
  74. icon: 'ant-design:fund-view-outlined',
  75. onClick: handleQuery.bind(null, record),
  76. },
  77. {
  78. label: '删除',
  79. auth: 'api:yt:smsLog:delete',
  80. icon: 'ant-design:delete-outlined',
  81. color: 'error',
  82. popConfirm: {
  83. title: '是否确认删除',
  84. confirm: handleDeleteOrBatchDelete.bind(null, record),
  85. },
  86. },
  87. ]" />
  88. </template>
  89. </BasicTable> -->
  90. <!-- 弹出框 -->
  91. <MapDrawer @register="registerModal" />
  92. </div>
  93. </template>
  94. <script lang="ts">
  95. import { defineComponent, nextTick, onMounted, ref, defineProps, watch } from 'vue';
  96. import { BasicTable, useTable, TableAction } from '/@/components/Table';
  97. import { columns, searchFormSchema } from './sms.data';
  98. import { Popconfirm, Tooltip } from 'ant-design-vue';
  99. import { Authority } from '/@/components/Authority';
  100. import { platList, img, apply } from '/@/api/resource/plat';
  101. import { message } from 'ant-design-vue';
  102. // 加载自定义侧边弹出框 组件
  103. import { useDrawer } from '/@/components/Drawer';
  104. // 导入子页面【新增、修改】
  105. import MapDrawer from './MapDrawer.vue';
  106. import Search from './child/Search.vue';
  107. import { session } from '/@/utils/Memory';
  108. export default defineComponent({
  109. name: 'SmsLog',
  110. components: { BasicTable, TableAction, Authority, Search, Popconfirm, Tooltip, MapDrawer },
  111. setup() {
  112. const [registerModal, { openDrawer }] = useDrawer(); //使用右侧弹出框
  113. const list = ref([]);
  114. const props = defineProps({
  115. listData: {
  116. type: Array,
  117. default: () => [],
  118. }
  119. })
  120. // setInterval(() => {
  121. // console.log(props)
  122. // }, 2000)
  123. onMounted(() => {
  124. platList().then((r) => {
  125. console.log(r)
  126. if (r) {
  127. list.value = r[0].items;
  128. list.value.map(async (i) => i.info = await img(i.SERVICEID))
  129. }
  130. });
  131. });
  132. function handleQuery(record: Recordable) {
  133. console.log("11111:", record)
  134. openDrawer(true, {
  135. record,
  136. });
  137. }
  138. function applyWay(i) {
  139. console.log(i)
  140. apply({
  141. addRes: [{
  142. resDataType: "1",
  143. resId: i.SERVICEID,
  144. resName: `${i.SERVICENAME}(${i.CRS})`,
  145. resType: 0,
  146. workflowType: "MAP",
  147. }],
  148. userId: session.getItem('userId'),
  149. }).then((r) => {
  150. if (r.datas && r.resp_code == 0) {
  151. message.success('申请成功');
  152. }
  153. })
  154. }
  155. return {
  156. applyWay,
  157. registerModal,
  158. list,
  159. handleQuery,
  160. };
  161. },
  162. });
  163. </script>
  164. <style scoped>
  165. .datacenter-right .resource_list .item-title .r_name {
  166. color: #5e5d5e;
  167. display: inline-block;
  168. width: 190px;
  169. overflow: hidden;
  170. text-overflow: ellipsis;
  171. white-space: nowrap;
  172. }
  173. .datacenter-right .resource_list {
  174. box-sizing: border-box;
  175. width: 100%;
  176. float: left;
  177. clear: both;
  178. display: flex;
  179. flex-wrap: wrap;
  180. align-items: center;
  181. }
  182. .datacenter-right .resource_list>div:not(:nth-of-type(4n + 4)) {
  183. margin-right: 7px;
  184. }
  185. .resource_item {
  186. height: 318px;
  187. width: 224px;
  188. margin-bottom: 14px;
  189. border: 2px dashed transparent;
  190. width: 386px;
  191. height: 402px;
  192. border-radius: 4px;
  193. opacity: 1;
  194. background: #FFFFFF;
  195. border: 1px solid #DEDEDE;
  196. }
  197. .mapItem-top-box {
  198. height: 350px;
  199. }
  200. .datacenter-right .resource_list .operation-box {
  201. height: 42px;
  202. display: flex;
  203. margin-bottom: 10px;
  204. margin-left: 20px;
  205. }
  206. .datacenter-right .resource_list .item-top {
  207. padding: 13px;
  208. }
  209. .datacenter-right .resource_list .item-top img {
  210. width: 360px;
  211. height: 190px;
  212. border: solid 1px #eeebeb;
  213. }
  214. .datacenter-right .resource_list .item-title {
  215. font-size: 14px;
  216. font-family: PingFang SC;
  217. font-weight: bold;
  218. color: #5e5d5e;
  219. line-height: 16px;
  220. padding: 0 0 0 14px;
  221. overflow: hidden;
  222. text-overflow: ellipsis;
  223. white-space: nowrap;
  224. }
  225. .datacenter-right .resource_list .item-msg {
  226. padding: 0 13px 13px;
  227. }
  228. .img_container {
  229. text-align: center;
  230. }
  231. .img_container {
  232. width: 100%;
  233. height: 100%;
  234. background: #b7bed3;
  235. border-radius: 4px;
  236. }
  237. .datacenter-right .resource_list .item-msg-val {
  238. font-size: 12px;
  239. font-family: PingFang SC;
  240. font-weight: bold;
  241. color: #5e5d5e;
  242. line-height: 22px;
  243. opacity: 0.5;
  244. overflow: hidden;
  245. text-overflow: ellipsis;
  246. white-space: nowrap;
  247. }
  248. .datacenter-right .resource_list .operation-item {
  249. display: flex;
  250. align-items: center;
  251. justify-content: center;
  252. min-width: 50px;
  253. height: 34px;
  254. opacity: 1;
  255. margin-right: 22px;
  256. padding: 0 10px;
  257. background: #E8E8E8;
  258. }
  259. .datacenter-right .resource_list .operation-item:hover {
  260. background: #0671DD;
  261. }
  262. .datacenter-right .resource_list .operation-item:hover a {
  263. color: #fff;
  264. }
  265. .datacenter-right .resource_list .operation-item.alone-apply-btn {
  266. display: none;
  267. }
  268. .operation-item-active {
  269. background: #05B069 !important;
  270. }
  271. .operation-item-active a {
  272. color: #fff !important;
  273. }
  274. .datacenter-right .resource_list .operation-item a {
  275. font-size: 12px;
  276. width: 100%;
  277. text-align: center;
  278. color: #5e5d5e;
  279. }
  280. </style>