XiaXxxxxx %!s(int64=2) %!d(string=hai) anos
pai
achega
bbd3f97591

+ 38 - 3
src/api/resource/plat.ts

@@ -7,7 +7,8 @@ import md5 from 'js-md5';
 enum Api {
     CallProvider = '/callProvider',
     Apply = '/base-center/resources/addResToCar',
-    SelectUserResInCar = '/base-center/resources/selectUserResInCar'
+    SelectUserRes = '/base-center/resources/selectUserRes',
+    ClearUserResCar = '/base-center/resources/clearUserResCar'
 }
 
 const client = {
@@ -80,7 +81,26 @@ export function img(id) {
     })
 }
 
-
+/**
+ * @description:获取资源详情
+ */
+export function getResViewInfo(resId) {
+    const f = new URLSearchParams();
+    f.append("interfaceName", "antu.space.provider.sservicebase.ServiceBaseMetaDataViewProvider");
+    f.append("methodName", "getResourceView");
+    f.append("args[]", session.getItem('tokenV2'));
+    f.append("args[]", resId);
+    f.append("args[]", '{"EMPLOYEE":"27AF004A-8BDN-885T-30FU-89DE3388762B","ROLES":["ed5e2ffa-bdfc-aeb7-89c7-70b593458207","1F899E7A-748N-609T-99CU-3FCE7FBEA814","090B70041E1EB211EA864C7C0ACCBF73","BF03E5DD1C1EB211738485703976FFEE","space"]}');
+    return new Promise<void>((resolve, reject) => {
+        defHttp.post({ url: Api.CallProvider, params: f, ...interfaceType })
+            .then((r) => {
+                resolve(r.result ? JSON.parse(r.result) : false);
+            }).
+            catch((e) => {
+                reject(e);
+            })
+    })
+}
 
 
 /**
@@ -179,7 +199,22 @@ export function apply(params) {
  */
 export function getResInCar(params) {
     return new Promise<void>((resolve, reject) => {
-        defHttp.post({ url: Api.SelectUserResInCar, params, })
+        defHttp.post({ url: Api.SelectUserRes, params, })
+            .then((r) => {
+                resolve(r);
+            }).
+            catch((e) => {
+                reject(e);
+            })
+    })
+}
+
+/**
+ * @description:清空已加入申请库的资源
+ */
+export function clearResInCar(params) {
+    return new Promise<void>((resolve, reject) => {
+        defHttp.post({ url: Api.ClearUserResCar, params, })
             .then((r) => {
                 resolve(r);
             }).

+ 36 - 34
src/views/dataAdmin/dataAdmin/directoryManagement/index.vue

@@ -32,6 +32,12 @@
               <span class="del-btn" v-if="selected" @click="delTreeNode(dataRef)">删除</span>
             </template>
           </a-tree>
+          <div class="btns" style="display: flex;justify-content: center;">
+            <a-button type="primary" style="margin-right: 10px;" @click="moveNode(-1)"
+              :disabled="!editBtuState">上移目录</a-button>
+            <a-button type="primary" style="margin-right: 0;" @click="moveNode(1)"
+              :disabled="!editBtuState">下移目录</a-button>
+          </div>
         </a-card>
       </div>
       <!-- 右边 -->
@@ -47,19 +53,19 @@
                 margin-top: 0px;
               ">
               <a-row>
-                <a-col :span="9"><span style="font-weight: 700; font-size: 16px">节点编辑</span>
+                <a-col :span="9"><span style="font-weight: 700; font-size: 16px">目录编辑</span>
                 </a-col>
                 <a-col :span="15">
                   <a-row type="flex" justify="end">
                     <div class="btn" style="margin-right: 10px;">
-                      <a-button @click="addTreeChildNode">添加子节点</a-button>
+                      <a-button @click="addTreeChildNode">添加子目录</a-button>
                     </div>
                     <div class="btn" style="margin-right: 10px;">
-                      <a-button type="primary" @click="addTreeNode">添加节点</a-button>
+                      <a-button type="primary" @click="addTreeNode">添加目录</a-button>
                     </div>
                     <!-- <div class="btn">
-                      <a-popconfirm title="确定删除该节点及其子节点?" @confirm="delTreeNode">
-                        <a-button danger :disabled="!editBtuState">删除节点</a-button>
+                      <a-popconfirm title="确定删除该目录及其子目录?" @confirm="delTreeNode">
+                        <a-button danger :disabled="!editBtuState">删除目录</a-button>
                       </a-popconfirm>
                     </div> -->
                   </a-row>
@@ -94,12 +100,8 @@
               </a-row>
             </a-form>
             <div style="margin-top: 60px">
-              <div class="col-item" style="width: 100%;display: flex;justify-content: flex-end;">
-                <a-button type="primary" style="margin-right: 10px;" @click="moveNode(-1)"
-                  :disabled="!editBtuState">上移节点</a-button>
-                <a-button type="primary" style="margin-right: 10px;" @click="moveNode(1)"
-                  :disabled="!editBtuState">下移节点</a-button>
-                <a-button type="primary" @click="editNode" :disabled="!editBtuState">保存节点</a-button>
+              <div class="col-item" style="width: 100%;display: flex;justify-content: center;">
+                <a-button type="primary" @click="editNode" :disabled="!editBtuState">保存</a-button>
               </div>
             </div>
           </a-card>
@@ -220,7 +222,7 @@ export default defineComponent({
   },
 
   methods: {
-    //获取树节点列表
+    //获取树目录列表
     getTreeData() {
       this.treeData = []
       this.dataList = []
@@ -244,7 +246,7 @@ export default defineComponent({
         }
         getTreeList(param2).then(res2 => {
           const data = JSON.parse(res2.result);
-          // 让每层带上自己的孩子节点、title、key
+          // 让每层带上自己的孩子目录、title、key
           data.forEach((item) => {
             item['title'] = item.name;
             item['key'] = item.id;
@@ -282,7 +284,7 @@ export default defineComponent({
         }
       }
     },
-    //获取所有父节点key
+    //获取所有父目录key
     getParentKey(key, tree) {
       let parentKey;
       for (let i = 0; i < tree.length; i++) {
@@ -303,7 +305,7 @@ export default defineComponent({
       this.autoExpandParent = false;
     },
 
-    // 点击树节点
+    // 点击树目录
     select(selectkey, { selectedNodes, node }) {
       console.log(node);
       if (selectkey.length) {
@@ -322,7 +324,7 @@ export default defineComponent({
       }
     },
 
-    // 添加树节点
+    // 添加树目录
     addTreeNode() {
       if (this.inputSearchValue) {
         this.searchCategory.forEach((item) => {
@@ -330,7 +332,7 @@ export default defineComponent({
             this.formState2.pName = item.name;
             this.formState2.pid = item.id;
             this.formState2.sortindex = this.treeData.length;
-            this.drawerTitle = '添加根节点'
+            this.drawerTitle = '添加根目录'
             this.ifShowDialog = true;
           }
         });
@@ -340,26 +342,26 @@ export default defineComponent({
       }
     },
 
-    // 添加子节点
+    // 添加子目录
     addTreeChildNode() {
-      // message.warning('请选择需要添加子节点的父节点!', 5);
+      // message.warning('请选择需要添加子目录的父目录!', 5);
       if (this.formState.id) {
         this.formState2.pName = this.formState.name;
         this.formState2.pid = this.formState.id;
         this.formState2.sortindex = this.formState.children ? this.formState.children.length : 0;
-        this.drawerTitle = '添加子节点'
+        this.drawerTitle = '添加子目录'
         this.ifShowDialog = true;
       } else {
-        message.error('请先选择父节点')
+        message.error('请先选择父目录')
       }
     },
 
-    //删除节点
+    //删除目录
     delTreeNode(item) {
       Modal.confirm({
         title: '删除提示',
         icon: createVNode(ExclamationCircleOutlined),
-        content: '确定删除该节点及其子节点?',
+        content: '确定删除该目录及其子目录?',
         centered: true,
         okText: '确定',
         okType: 'danger',
@@ -370,7 +372,7 @@ export default defineComponent({
       });
     },
     delFunc(item) {
-      this.recordsData.push(`删除节点:${item.name}`)
+      this.recordsData.push(`删除目录:${item.name}`)
       if (item.id) {
         this.delIds = ''
         this.getChildrenIds(item)
@@ -388,11 +390,11 @@ export default defineComponent({
           }
         })
       } else {
-        message.error('请先选择节点');
+        message.error('请先选择目录');
       }
     },
 
-    //获取节点下所有子节点ids
+    //获取目录下所有子目录ids
     getChildrenIds(node) {
       this.delIds += node.id + ','
       if (node.children && node.children.length) {
@@ -402,7 +404,7 @@ export default defineComponent({
       }
     },
 
-    // 修改节点
+    // 修改目录
     editNode() {
       if (this.editBtuState) {
         let editData = {
@@ -421,7 +423,7 @@ export default defineComponent({
         updateNode(param).then(res => {
           if (res.status === '0') {
             message.success('修改成功')
-            this.recordsData.push(`修改节点:${this.formState.name}`)
+            this.recordsData.push(`修改目录:${this.formState.name}`)
             this.searchCategory = [];
             this.getTreeData();
           }
@@ -429,9 +431,9 @@ export default defineComponent({
       }
     },
 
-    //移动节点
+    //移动目录
     async moveNode(flag) {
-      //判断是否为根节点, 并获取同层级的数组
+      //判断是否为根目录, 并获取同层级的数组
       let data = []
       let mvNode = null
       if (this.formState.pid !== this.inputSearchValue) {
@@ -452,7 +454,7 @@ export default defineComponent({
         data.forEach((item, index) => {
           if (this.formState.id === item.id) {
             if ((index + 1) >= data.length) {
-              message.info('已经是最后一个节点')
+              message.info('已经是最后一个目录')
             } else {
               mvNode = data[index + 1]
             }
@@ -463,7 +465,7 @@ export default defineComponent({
         data.forEach((item, index) => {
           if (this.formState.id === item.id) {
             if ((index - 1) < 0) {
-              message.info('已经是第一个节点')
+              message.info('已经是第一个目录')
             } else {
               mvNode = data[index - 1]
             }
@@ -497,7 +499,7 @@ export default defineComponent({
         updateNodeList(param).then(res => {
           if (res.status === "0") {
             message.success('修改成功')
-            this.recordsData.push(`移动节点:${this.formState.name}`)
+            this.recordsData.push(`移动目录:${this.formState.name}`)
             this.searchCategory = [];
             this.getTreeData();
           }
@@ -509,7 +511,7 @@ export default defineComponent({
     onSubmit(e, item) {
       this.ifShowDialog = false
       if (e) {
-        this.recordsData.push(`添加节点:${item}`)
+        this.recordsData.push(`添加目录:${item}`)
         this.getTreeData();
       }
     }

+ 6 - 8
src/views/interface/index.vue

@@ -11,36 +11,35 @@
         </div>
       </div>
       <div class="datacenter-right">
-        <AssemblyData></AssemblyData>
+        <AssemblyData :groupId="interfaceGroupId"></AssemblyData>
       </div>
     </div>
   </div>
 </template>
 
-<script lang="ts">
+<script>
 import { defineComponent, ref, watch } from 'vue';
 import AssemblyData from './item/AssemblyData.vue';
 import { onMounted } from 'vue';
 import { getGroup } from '/@/api/interface/interface.ts';
 
-const prefixCls = 'account-center-bottom'
-
 export default defineComponent({
   components: {
     AssemblyData,
   },
   setup() {
     const action = ref(0)
+    const interfaceGroupId = ref('')
     function scrollToSection(index, i) {
       action.value = index;
-      eventBus.emit("groupIdInterface", i.groupId);
+      interfaceGroupId.value = i.groupId
     }
     onMounted(() => getGroupList())
     var menu = ref([]);
     function getGroupList() {
       getGroup().then((res) => {
         if (res.length) {
-          eventBus.emit("groupIdInterface", res[0].groupId);
+          interfaceGroupId.value = res[0].groupId
           menu.value = res;
         }
       })
@@ -48,11 +47,10 @@ export default defineComponent({
 
 
     return {
+      interfaceGroupId,
       scrollToSection,
       action,
       menu,
-      prefixCls: 'account-center',
-
     };
   },
 });

+ 102 - 103
src/views/interface/item/AssemblyData.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="assembly-data">
-    <Search></Search>
+    <Search :totalNum="total" @interfaceSearch="interfaceSearch"></Search>
     <div class="datacenter-right-1">
       <div class="resource_list" id="map_list">
         <div v-for="(i, k) in list" :key="k" class="item">
@@ -9,7 +9,7 @@
             <div class="item-top">
               <div class="title">{{ i.name }}</div>
               <div class="opts-btn">
-                <div class="add-library btn">加入申请库</div>
+                <div class="add-library btn" @click="applyWay(i)">加入申请库</div>
                 <div class="interface-details btn" @click="showDrawer(i)">查看详情</div>
               </div>
             </div>
@@ -37,88 +37,48 @@
         </Pagination>
       </div>
     </div>
-    <a-modal wrapClassName="modal-wrap" title="接口详情" width="800px" v-model:visible="visible" @cancel="onClose" centered :footer="null">
+    <a-modal wrapClassName="modal-wrap" title="接口详情" width="800px" v-model:visible="visible" @cancel="onClose" centered
+      :footer="null">
       <div class="content">
         <Details :action="action"></Details>
       </div>
     </a-modal>
-    <AssemblyDrawer @register="registerModal" />
   </div>
 </template>
-<script lang="ts">
+<script>
 import { defineComponent, nextTick, onMounted, ref, defineProps, watch } from 'vue';
-import { BasicTable, useTable, TableAction } from '/@/components/Table';
-import { columns, searchFormSchema } from './sms.data';
-import { Popconfirm, Tooltip, Pagination } from 'ant-design-vue';
-import { Authority } from '/@/components/Authority';
+
 import { interfaceList, getGroupId } from '/@/api/interface/interface.ts';
-import { message } from 'ant-design-vue';
-// 加载自定义侧边弹出框 组件
-import { useDrawer } from '/@/components/Drawer';
-// 导入子页面【新增、修改】
-import AssemblyDrawer from './AssemblyDrawer.vue';
+import { apply } from '/@/api/resource/plat';
+
+import { message, Pagination } from 'ant-design-vue';
+
 import Search from './child/Search.vue';
 import Details from './child/Details.vue';
 import { session } from '/@/utils/Memory';
 import interfaceImg from '/@/assets/images/count2.png';
 
+const props = {
+  groupId: {
+    type: String,
+    default: ""
+  }
+}
 
 export default defineComponent({
   name: 'SmsLog',
-  components: { Pagination, BasicTable, TableAction, Authority, Search, Details, Popconfirm, Tooltip, AssemblyDrawer },
-  setup() {
-    const [registerModal, { openDrawer }] = useDrawer(); //使用右侧弹出框
-
-    const props = defineProps({
-      listData: {
-        type: Array,
-        default: () => [],
-      }
-    })
-
-    // setInterval(() => {
-    //   console.log(props)
-    // }, 2000)
-
-
-    function handleQuery(record: Recordable) {
-      console.log("11111:", record)
-      openDrawer(true, {
-        record,
-      });
-    }
-
-
-    // var list = [
-    //   { src: 'http://106.12.170.138:4001/examples/img/Earth.jpg', name: '地图加载', has: false, href: "onlineIde_a1_Hello_World_01" },
-    //   { src: 'http://106.12.170.138:4001/examples/img/Earth.jpg', name: '地图加载', has: false, href: "onlineIde_a1_Hello_World_01" },
-    //   { src: 'http://106.12.170.138:4001/examples/img/Earth.jpg', name: '地图加载', has: false, href: "onlineIde_a1_Hello_World_01" }
-    // ]
+  components: { Search, Details, Pagination },
+  props,
+  setup(props) {
 
     var list = ref([]);
-
-    // onMounted(() => getList())
-
-    function getList() {
-      interfaceList({
-        page: current.value,
-        rows: pageSize.value,
-        keyword: keyword.value,
-      }).then((e) => {
-        console.log("e:", e)
-        if (e.records.length) {
-          eventBus.emit("interfaceNum", e);
-          total.value = e.total;
-          list.value = e.records;
-        }
-      })
-    }
-
-    const visible = ref<boolean>(false);
+    const visible = ref(false);
     const action = ref({});
-    const afterVisibleChange = (bool: boolean) => {
-      console.log('visible', bool);
-    };
+    const pageSizeOptions = ref(['10', '20', '30', '40', '50']);
+    const current = ref(1);
+    const pageSize = ref(6);
+    const total = ref(50);
+    const groupId = ref("")
 
     const showDrawer = (i) => {
       console.log("i", i);
@@ -129,63 +89,101 @@ export default defineComponent({
       visible.value = false;
     };
 
-    function formatData(e) {
-      var str = null;
-      try {
-        str = JSON.stringify(JSON.parse(action.request_headers), null, 4)
-      } catch (error) {
-        str = e;
-      }
-      return str;
-    }
 
-    const pageSizeOptions = ref(['10', '20', '30', '40', '50']);
-    const current = ref(1);
-    const pageSize = ref(6);
-    const total = ref(50);
     const onShowSizeChange = (current, pageSize) => {
-      console.log(pageSize);
       pageSize.value = pageSize;
       getGroupIdList()
     };
     watch(current, () => {
-      getGroupIdList();
+      getGroupIdList()
     });
-    const keyword = ref("");
-    eventBus.on("interfaceSearch", (e) => { keyword.value = e, getList() });
-    eventBus.on("groupIdInterface", (e) => { groupId = e; getGroupIdList(groupId) });
 
-
-    var groupId = null;
-    function getGroupIdList(id) {
+    // 根据组id查询接口列表
+    const getGroupIdList = () => {
       getGroupId({
         page: current.value,
         rows: pageSize.value,
-        groupId: groupId,
+        groupId: groupId.value,
       }).then((e) => {
-        eventBus.emit("interfaceNum", e);
+        // eventBus.emit("interfaceNum", e);
         total.value = e.totalNum;
         list.value = e.list;
       })
     }
+    //根据关键字查询接口列表
+    const getList = (keyword) => {
+      interfaceList({
+        page: current.value,
+        rows: pageSize.value,
+        keyword: keyword || "",
+      }).then((e) => {
+        console.log("e:", e)
+        if (e.records.length) {
+          total.value = e.total;
+          list.value = e.records;
+        }
+      })
+    }
+    //关键字搜索
+    const interfaceSearch = (e) => {
+      console.log(e)
+      if (e) {
+        current.value = 1
+        pageSize.value = 100000
+        getList(e)
+      } else {
+        current.value = 1
+        pageSize.value = 6
+        getGroupIdList()
+      }
+    }
 
+    onMounted(() => {
+      groupId.value = props.groupId;
+      getGroupIdList();
+    })
+
+    watch(
+      () => props.groupId,
+      (val) => {
+        groupId.value = val;
+        getGroupIdList();
+      }
+    )
+
+    const applyWay = (i) => {
+      console.log(i)
+      apply({
+        addRes: [{
+          resDataType: "3",
+          resId: i.id,
+          resName: i.name,
+          resType: 1,
+          workflowType: "INTERFACE",
+        }],
+        userId: session.getItem('userId'),
+      }).then((r) => {
+        if (r.datas && r.resp_code == 0) {
+          message.success('申请成功');
+          // searchRef.value.getResData();
+        }
+      })
+    }
 
     return {
+      interfaceImg,
+      list,
+      visible,
+      action,
       pageSizeOptions,
       current,
       pageSize,
       total,
       onShowSizeChange,
-      formatData,
-      visible,
-      action,
-      afterVisibleChange,
-      showDrawer,
       onClose,
-      interfaceImg,
-      registerModal,
-      list,
-      handleQuery,
+      interfaceSearch,
+      showDrawer,
+      applyWay
     };
   },
 });
@@ -348,12 +346,13 @@ export default defineComponent({
     }
   }
 }
+
 .modal-wrap {
-    .content {
-        padding: 20px 10px 10px 20px;
-        margin-top: 10px;
-        max-height: 800px;
-        overflow: auto;
-    }
+  .content {
+    padding: 20px 10px 10px 20px;
+    margin-top: 10px;
+    max-height: 800px;
+    overflow: auto;
+  }
 }
 </style>

+ 25 - 8
src/views/interface/item/child/Search.vue

@@ -2,7 +2,7 @@
     <div class="wrapper">
         <span class="sqrk" @click="showModal">申请库(1)</span>
         <span>
-            <a-select ref="select" v-model:value="value" style="width: 200px" :options="options" @focus="focus"
+            <a-select ref="select" v-model:value="value" style="width: 200px" :options="options"
                 @change="handleChange">
             </a-select>
         </span>
@@ -24,14 +24,21 @@
 
 
 <script lang="ts">
-import { defineComponent, ref, computed, unref } from 'vue';
-import library from "../../library/index.vue"
-import eventBus from '/@/utils/eventBus';
+import { defineComponent, ref, computed, unref, watch } from 'vue';
+import library from "../../library/index.vue";
+
+const props = {
+    totalNum:{
+        type:Number,
+        default:0
+    }
+}
 
 export default defineComponent({
     name: 'Search',
     components: { library },
-    setup() {
+    props,
+    setup(props,{emit}) {
         const value = ref<string>('1');
         const key = ref<string>('');
         const checked1 = ref<boolean>(false);
@@ -55,7 +62,7 @@ export default defineComponent({
         ]);
 
         function onSearch(e) {
-            eventBus.emit("interfaceSearch", e);
+            emit("interfaceSearch", e);
         }
 
         const visible = ref<boolean>(false);
@@ -67,8 +74,17 @@ export default defineComponent({
             visible.value = false;
         };
 
-        const num = ref(0);
-        eventBus.on("interfaceNum", i => num.value = i.totalNum)
+        const num = ref(props.totalNum);
+
+        watch(
+            ()=>props.totalNum,
+            (val)=>{
+                num.value = val
+            }
+        )
+        const handleChange = ()=>{
+
+        }
 
         return {
             num,
@@ -83,6 +99,7 @@ export default defineComponent({
             checked2,
             checked3,
             checked4,
+            handleChange
         };
     },
 });

+ 7 - 3
src/views/resource/plat/index.vue

@@ -17,8 +17,7 @@
       <Tabs>
         <template v-for="item in  achieveList " :key="item.type">
           <TabPane :tab="[`${item.typeName == '数据' ? '文件' : item.typeName}资源(${item.count})`]">
-            <component :is="item.type == 'MR'?'MapData':item.type == 'ER'?'SceneData':'FileData'" :listData="item.items"
-              :numb="1" />
+            <component :is="item.type == 'MR'?'MapData':item.type == 'ER'?'SceneData':'FileData'" :listData="item.items" @resAddToCar="resAddToCar"/>
             <!-- <MapData v-if="item.type == 'MR'" :listData="item.items" /> -->
             <!-- <FileData v-if="item.type == 'DR'" :listData="item.items" /> -->
           </TabPane>
@@ -82,6 +81,10 @@ export default defineComponent({
       platList().then((r) => { if (r) console.log(r), achieveList.value = r });
     });
 
+    const resAddToCar = ()=>{
+      platList().then((r) => { if (r) achieveList.value = r });
+    }
+
     return {
       replaceFields,
       treeData,
@@ -90,7 +93,8 @@ export default defineComponent({
       checkedKeys,
       // prefixCls: 'account-center',
       achieveList,
-      nodeSelect
+      nodeSelect,
+      resAddToCar
     };
   },
 });

+ 0 - 63
src/views/resource/plat/item/EmailDetail.vue

@@ -1,63 +0,0 @@
-<template>
-  <BasicModal
-    v-bind="$attrs"
-    @register="register"
-    title="邮件发送参数"
-    centered
-    :okButtonProps="{ disabled: true }"
-    @ok="handleOK"
-    :width="700"
-  >
-    <div class="pt-6px pr-6px">
-      <BasicForm @register="registerForm" />
-    </div>
-  </BasicModal>
-</template>
-<script lang="ts">
-  import { defineComponent, h } from 'vue';
-  import { BasicModal, useModalInner } from '/@/components/Modal';
-  import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
-  import { Tinymce } from '/@/components/Tinymce';
-  const schemas: FormSchema[] = [
-    {
-      field: 'emailBody',
-      component: 'Input',
-      label: '',
-      rules: [{ required: true }],
-      render: ({ model, field }) => {
-        return h(Tinymce, {
-          value: model[field],
-          // showImageUpload: false,
-          onChange: (value: string) => {
-            model[field] = value;
-          },
-        });
-      },
-    },
-  ];
-  export default defineComponent({
-    components: { BasicModal, BasicForm },
-    setup() {
-      const [registerForm, { resetFields, setFieldsValue }] = useForm({
-        labelWidth: 70,
-        schemas,
-        showActionButtonGroup: false,
-        actionColOptions: {
-          span: 24,
-        },
-      });
-      const [register, { closeModal }] = useModalInner(async (data) => {
-        await resetFields();
-        await setFieldsValue({
-          ...data.record,
-        });
-      });
-
-      async function handleOK() {
-        closeModal();
-      }
-
-      return { register, schemas, registerForm, handleOK };
-    },
-  });
-</script>

+ 0 - 275
src/views/resource/plat/item/FileData copy.vue

@@ -1,275 +0,0 @@
-<template>
-  <div style="background-color: #f0f2f5" class="dark:bg-dark-900">
-    <div class="datacenter-right">
-      <div class="resource_list" id="map_list">
-        <div v-for="(i, n) in list" v-if="list.length" :key="n" data-permission="true" class="resource_item"
-          data-checking="false" data-searching="1" data-ispub="1">
-          <div class="mapItem-top-box">
-            <div class="item-top">
-              <div class="img_container" data-num="1">
-                <img class="tab-list-icon-img-MR00001936 img_mr MR00001936"
-                  :src="i.info && i.info.length && i.info[0].thumbnail" alt="">
-              </div>
-            </div>
-            <div class="item-title">
-              <span class="r_name">{{ i.SERVICENAME }}</span>
-              <span class="r-number" data-num="1" title="编目1次">1</span>
-            </div>
-            <div class="item-msg">
-              <div class="item-msg-val" style="font-weight:bold;font-size:12px;color: #000;">坐标系:{{ i.CRS }}</div>
-              <div class="item-msg-val">适用流程:国家秘密和工作秘密数据成果申请,</div>
-              <div class="item-msg-val">关键字:测试数据</div>
-              <div class="item-msg-val">服务类型:{{ i.TYPENAME }}</div>
-            </div>
-          </div>
-          <div class="operation-box">
-            <div class="operation-item browse-item-btn browse-item-MR00001936">
-              <a target="_blank" :href="`../../mapview.html?/iserver/services/map-16/rest/maps/LZS16envi1%4016.ijs`"
-                style="border-right: 1px #ccc solid;">
-                <span>浏览</span>
-              </a>
-            </div>
-
-            <div class="operation-item alone-apply-btn alone-apply-btn-MR00001936">
-              <span style="border-right: 1px #ccc solid;" onclick="cardApplyItem('mr')">
-                <span>申请</span>
-              </span>
-            </div>
-            <!-- <div class="user-apply-btn user-apply-btn-MR00001936"
-              onclick="addApplyBank(this,'MR00001936','行政区域','1','测试数据','mr','2000坐标系4490')">
-              <span>加入申请库</span>
-            </div>
-            <div class="dis-apply-btn dis-apply-btn-MR00001936">
-              <span>已加入申请库</span>
-            </div> -->
-            <div class="operation-item" @click="handleQuery(i)">
-              <a href="javascript:void(0)" class="">
-                <span>详细</span>
-              </a>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-
-    <!-- <BasicTable @register="registerTable" class="dark:bg-dark-900">
-      <template #toolbar>
-        <Authority value="api:yt:smsLog:delete">
-          <Popconfirm title="您确定要批量删除数据" ok-text="确定" cancel-text="取消" @confirm="handleDeleteOrBatchDelete(null)">
-            <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
-          </Popconfirm>
-        </Authority>
-      </template>
-      <template #remark="{ record }">
-        <Tooltip :title="record.remark">
-          <div class="truncate w-full">{{ record.remark }}</div>
-        </Tooltip>
-      </template>
-      <template #action="{ record }">
-        <TableAction :actions="[
-          {
-            label: '查看',
-            auth: 'api:yt:smsLog:get',
-            icon: 'ant-design:fund-view-outlined',
-            onClick: handleQuery.bind(null, record),
-          },
-          {
-            label: '删除',
-            auth: 'api:yt:smsLog:delete',
-            icon: 'ant-design:delete-outlined',
-            color: 'error',
-            popConfirm: {
-              title: '是否确认删除',
-              confirm: handleDeleteOrBatchDelete.bind(null, record),
-            },
-          },
-        ]" />
-      </template>
-    </BasicTable> -->
-    <!-- 弹出框 -->
-    <MapDrawer @register="registerModal" />
-  </div>
-</template>
-<script lang="ts">
-import { defineComponent, nextTick, onMounted, ref, defineProps, watch } from 'vue';
-import { BasicTable, useTable, TableAction } from '/@/components/Table';
-import { columns, searchFormSchema } from './sms.data';
-import { Popconfirm, Tooltip } from 'ant-design-vue';
-import { Authority } from '/@/components/Authority';
-import { platList, img } from '/@/api/resource/plat';
-// 加载自定义侧边弹出框 组件
-import { useDrawer } from '/@/components/Drawer';
-// 导入子页面【新增、修改】
-import MapDrawer from './MapDrawer.vue';
-
-
-export default defineComponent({
-  name: 'SmsLog',
-  components: { BasicTable, TableAction, Authority, Popconfirm, Tooltip, MapDrawer },
-  setup() {
-    const [registerModal, { openDrawer }] = useDrawer(); //使用右侧弹出框
-    const list = ref([]);
-    const props = defineProps({
-      listData: {
-        type: Array,
-        default: () => [],
-      }
-    })
-
-    // setInterval(() => {
-    //   console.log(props)
-    // }, 2000)
-    onMounted(() => {
-      platList().then((r) => {
-        if (r) {
-          var o = r.find(i => i.type == 'DR')
-          if (o && o.items && o.items.length) {
-            o.items.map(async (i) => i.info = await img(i.SERVICEID))
-            console.log(o);
-            list.value = o.items;
-          }
-        }
-      });
-    });
-
-    function handleQuery(record: Recordable) {
-      console.log("11111:", record)
-      openDrawer(true, {
-        record,
-      });
-    }
-
-    return {
-      registerModal,
-      list,
-      handleQuery,
-    };
-  },
-});
-</script>
-
-<style scoped>
-.datacenter-right .resource_list .item-title .r_name {
-  color: #5e5d5e;
-  display: inline-block;
-  width: 190px;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-
-.datacenter-right .resource_list {
-  box-sizing: border-box;
-  width: 100%;
-  float: left;
-  clear: both;
-  display: flex;
-  flex-wrap: wrap;
-  align-items: center;
-}
-
-.datacenter-right .resource_list>div:not(:nth-of-type(4n + 4)) {
-  margin-right: 7px;
-}
-
-.resource_item {
-  height: 318px;
-  width: 224px;
-  margin-bottom: 14px;
-  border: 2px dashed transparent;
-}
-
-.mapItem-top-box {
-  height: 278px;
-  border: 1px solid #dfdfdf;
-  border-bottom: none;
-}
-
-.datacenter-right .resource_list .operation-box {
-  height: 42px;
-  border: 1px solid #dfdfdf;
-  display: flex;
-  margin-bottom: 10px;
-}
-
-.datacenter-right .resource_list .item-top {
-  padding: 13px;
-}
-
-.datacenter-right .resource_list .item-top img {
-  width: 198px;
-  height: 124px;
-}
-
-.datacenter-right .resource_list .item-title {
-  font-size: 14px;
-  font-family: PingFang SC;
-  font-weight: bold;
-  color: #5e5d5e;
-  line-height: 16px;
-  padding: 0 0 0 14px;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-
-.datacenter-right .resource_list .item-msg {
-  padding: 0 13px 13px;
-}
-
-.img_container {
-  text-align: center;
-}
-
-.img_container {
-  width: 100%;
-  height: 100%;
-  background: #b7bed3;
-  border-radius: 4px;
-}
-
-.datacenter-right .resource_list .item-msg-val {
-  font-size: 12px;
-  font-family: PingFang SC;
-  font-weight: bold;
-  color: #5e5d5e;
-  line-height: 22px;
-  opacity: 0.5;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-
-.datacenter-right .resource_list .operation-item {
-  width: 50%;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-
-.datacenter-right .resource_list .operation-item.alone-apply-btn {
-  display: none;
-}
-
-.datacenter-right .resource_list .operation-item {
-  width: 50%;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-
-.datacenter-right .resource_list .operation-item {
-  width: 50%;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-
-.datacenter-right .resource_list .operation-item a {
-  font-size: 12px;
-  width: 100%;
-  text-align: center;
-  color: #5e5d5e;
-  background-color: #ffffff;
-}
-</style>

+ 119 - 148
src/views/resource/plat/item/FileData.vue

@@ -1,5 +1,5 @@
 <template>
-  <Search></Search>
+  <Search ref="searchRef"></Search>
   <div style="background-color: #f0f2f5" class="dark:bg-dark-900">
     <div class="datacenter-right">
       <div class="resource_list" id="map_list">
@@ -24,95 +24,47 @@
             </div>
           </div>
           <div class="operation-box">
-            <div class="operation-item browse-item-btn browse-item-MR00001936">
-              <a target="_blank"
-                :href="(i.info && i.info.length && i.info[0].thumbnail) || './static/img/default-dr3.jpg'">
-                <span>浏览</span>
-              </a>
-            </div>
-
-            <div class="operation-item alone-apply-btn alone-apply-btn-MR00001936">
-              <span style="border-right: 1px #ccc solid;" onclick="cardApplyItem('mr')">
-                <span>申请</span>
-              </span>
-            </div>
-            <!-- <div class="user-apply-btn user-apply-btn-MR00001936"
-              onclick="addApplyBank(this,'MR00001936','行政区域','1','测试数据','mr','2000坐标系4490')">
-              <span>加入申请库</span>
-            </div>
-            <div class="dis-apply-btn dis-apply-btn-MR00001936">
-              <span>已加入申请库</span>
-            </div> -->
-            <div class="operation-item" @click="handleQuery(i)">
-              <a href="javascript:void(0)" class="">
-                <span>详细</span>
-              </a>
+            <div class="left">
+              <div class="operation-item browse-item-btn browse-item-MR00001936">
+                <a target="_blank"
+                  :href="(i.info && i.info.length && i.info[0].thumbnail) || './static/img/default-dr3.jpg'">
+                  <span>浏览</span>
+                </a>
+              </div>
+              <div class="operation-item" @click="handleQuery(i)">
+                <a href="javascript:void(0)" class="">
+                  <span>详细</span>
+                </a>
+              </div>
             </div>
-            <!-- <div class="operation-item" @click="handleQuery(i)">
-              <a href="javascript:void(0)" class="">
-                <span>加入申请库</span>
-              </a>
+            <div class="right">
+              <div class="operation-item" v-if="i.SFJRSQK === '未加入'" @click="applyWay(i)">
+                <a href="javascript:void(0)" class="">
+                  <span>加入申请库</span>
+                </a>
+              </div>
+              <div class="operation-item" v-else style="cursor: not-allowed;background-color: #e8e8e8;">
+                <a href="javascript:void(0)" class="" style="cursor: not-allowed;">
+                  <span>已加入</span>
+                </a>
+              </div>
             </div>
-            <div class="operation-item operation-item-active" @click="handleQuery(i)">
-              <a href="javascript:void(0)" class="">
-                <span>已加入申请库</span>
-              </a>
-            </div> -->
           </div>
         </div>
       </div>
     </div>
-
-    <!-- <BasicTable @register="registerTable" class="dark:bg-dark-900">
-      <template #toolbar>
-        <Authority value="api:yt:smsLog:delete">
-          <Popconfirm title="您确定要批量删除数据" ok-text="确定" cancel-text="取消" @confirm="handleDeleteOrBatchDelete(null)">
-            <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
-          </Popconfirm>
-        </Authority>
-      </template>
-      <template #remark="{ record }">
-        <Tooltip :title="record.remark">
-          <div class="truncate w-full">{{ record.remark }}</div>
-        </Tooltip>
-      </template>
-      <template #action="{ record }">
-        <TableAction :actions="[
-          {
-            label: '查看',
-            auth: 'api:yt:smsLog:get',
-            icon: 'ant-design:fund-view-outlined',
-            onClick: handleQuery.bind(null, record),
-          },
-          {
-            label: '删除',
-            auth: 'api:yt:smsLog:delete',
-            icon: 'ant-design:delete-outlined',
-            color: 'error',
-            popConfirm: {
-              title: '是否确认删除',
-              confirm: handleDeleteOrBatchDelete.bind(null, record),
-            },
-          },
-        ]" />
-      </template>
-    </BasicTable> -->
     <!-- 弹出框 -->
-    <MapDrawer @register="registerModal" />
+    <DetailModal v-if="showResDeatil" @closeModal="showResDeatil = false" :resId="detailResId" />
   </div>
 </template>
 <script>
 import { defineComponent, nextTick, onMounted, ref, defineProps, watch } from 'vue';
-import { BasicTable, useTable, TableAction } from '/@/components/Table';
-// import { columns, searchFormSchema } from './sms.data';
-import { Popconfirm, Tooltip } from 'ant-design-vue';
-import { Authority } from '/@/components/Authority';
-import { platList, img } from '/@/api/resource/plat';
-// 加载自定义侧边弹出框 组件
-import { useDrawer } from '/@/components/Drawer';
-// 导入子页面【新增、修改】
-import MapDrawer from './MapDrawer.vue';
+// 导入子页面【详情】
+import DetailModal from './child/DetailModal.vue';
 import Search from './child/Search.vue';
+import { platList, img, apply } from '/@/api/resource/plat';
+import { session } from '/@/utils/Memory';
+import { message } from 'ant-design-vue';
 
 const props = {
   listData: {
@@ -123,52 +75,65 @@ const props = {
 
 export default defineComponent({
   name: 'SmsLog',
-  components: { BasicTable, TableAction, Search, Authority, Popconfirm, Tooltip, MapDrawer },
+  components: { Search, DetailModal },
   props,
-  setup(props) {
-    const [registerModal, { openDrawer }] = useDrawer(); //使用右侧弹出框
+  setup(props, { emit }) {
+    const showResDeatil = ref(false)
+    const searchRef = ref(null)
     const list = ref([]);
-    // const props = defineProps({
-    //   listData: {
-    //     type: Array,
-    //     default: () => [],
-    //   }
-    // })
+    const detailResId = ref('')
 
     onMounted(() => {
-      console.log("传进来的文件资源:",props.listData)
+      console.log("传进来的文件资源:", props.listData)
       list.value = props.listData
       list.value.map(async (i) => i.info = await img(i.SERVICEID))
     });
 
-    function getDataList(text) {
-      platList(text).then((r) => {
-        if (r && r.length) {
-          var o = r.find(i => i.type == 'DR')
-          if (o && o.items && o.items.length) {
-            o.items.map(async (i) => i.info = await img(i.SERVICEID))
-            setTimeout(() => {
-              console.log("资源中心文件资源:", o.items)
-              list.value = o.items;
-            }, 5000)
-          }
-        } else {
-          list.value = [];
+    watch(
+      () => props.listData,
+      (val) => {
+        list.value = JSON.parse(JSON.stringify(val))
+        list.value.map(async (i) => i.info = await img(i.SERVICEID))
+      },
+      {
+        deep: true,
+        immediate: true
+      }
+    )
+
+    function applyWay(i) {
+      console.log(i)
+      apply({
+        addRes: [{
+          resDataType: "2",
+          resId: i.SERVICEID,
+          resName: `${i.SERVICENAME}(${i.CRS})`,
+          resType: 0,
+          workflowType: "FILE",
+        }],
+        userId: session.getItem('userId'),
+      }).then((r) => {
+        if (r.datas && r.resp_code == 0) {
+          message.success('申请成功');
+          // searchRef.value.getResData();
+          eventBus.emit('addResToCarEventBus')
+          emit('resAddToCar')
         }
-      });
+      })
     }
 
     function handleQuery(record) {
-      console.log("11111:", record)
-      openDrawer(true, {
-        record,
-      });
+      //打开详情弹窗
+      detailResId.value = record.SERVICEID
+      showResDeatil.value = true
     }
 
     return {
-      getDataList,
-      registerModal,
+      showResDeatil,
+      detailResId,
+      searchRef,
       list,
+      applyWay,
       handleQuery,
     };
   },
@@ -227,7 +192,52 @@ export default defineComponent({
   height: 42px;
   display: flex;
   margin-bottom: 10px;
-  margin-left: 20px;
+  /* margin-left: 20px; */
+  justify-content: space-between;
+  padding: 0 24px;
+
+  .left {
+    display: flex;
+
+    .operation-item {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      min-width: 50px;
+      height: 34px;
+      opacity: 1;
+      margin-right: 22px;
+      padding: 0 10px;
+      background: #E8E8E8;
+
+      a {
+        font-size: 12px;
+        width: 100%;
+        text-align: center;
+        color: #333333;
+      }
+    }
+  }
+
+  .right {
+    .operation-item {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      min-width: 50px;
+      height: 34px;
+      opacity: 1;
+      padding: 0 10px;
+      background: #0671DD;
+
+      a {
+        font-size: 12px;
+        width: 100%;
+        text-align: center;
+        color: #fff;
+      }
+    }
+  }
 }
 
 .datacenter-right .resource_list .item-top {
@@ -287,43 +297,4 @@ export default defineComponent({
   letter-spacing: 0px;
   color: #333333;
 }
-
-.datacenter-right .resource_list .operation-item {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  min-width: 50px;
-  height: 34px;
-  opacity: 1;
-  margin-right: 22px;
-  padding: 0 10px;
-  background: #E8E8E8;
-}
-
-.datacenter-right .resource_list .operation-item:hover {
-  background: #0671DD;
-}
-
-.datacenter-right .resource_list .operation-item:hover a {
-  color: #fff;
-}
-
-.datacenter-right .resource_list .operation-item.alone-apply-btn {
-  display: none;
-}
-
-.operation-item-active {
-  background: #05B069 !important;
-}
-
-.operation-item-active a {
-  color: #fff !important;
-}
-
-.datacenter-right .resource_list .operation-item a {
-  font-size: 12px;
-  width: 100%;
-  text-align: center;
-  color: #5e5d5e;
-}
 </style>

+ 101 - 139
src/views/resource/plat/item/MapData.vue

@@ -1,5 +1,5 @@
 <template>
-  <Search></Search>
+  <Search ref="searchRef"></Search>
   <div style="background-color: #f0f2f5" class="dark:bg-dark-900">
     <div class="datacenter-right">
       <div class="resource_list" id="map_list">
@@ -24,88 +24,46 @@
             </div>
           </div>
           <div class="operation-box">
-            <div class="operation-item browse-item-btn browse-item-MR00001936">
-              <!-- <a target="_blank" :href="`./mapview.html?${i.MAPINGURL}.ol3`"> -->
-              <a target="_blank" :href="`./mapview.html?${i.SERVICEID}`">
-                <span>浏览</span>
-              </a>
-            </div>
-
-            <!-- <div class="operation-item alone-apply-btn alone-apply-btn-MR00001936">
-              <span style="border-right: 1px #ccc solid;" onclick="cardApplyItem('mr')">
-                <span>申请</span>
-              </span>
-            </div> -->
-            <div class="operation-item" @click="handleQuery(i)">
-              <a href="javascript:void(0)" class="">
-                <span>详细</span>
-              </a>
+            <div class="left">
+              <div class="operation-item browse-item-btn browse-item-MR00001936">
+                <a target="_blank" :href="`./mapview.html?${i.SERVICEID}`">
+                  <span>浏览</span>
+                </a>
+              </div>
+              <div class="operation-item" @click="handleQuery(i)">
+                <a href="javascript:void(0)" class="">
+                  <span>详细</span>
+                </a>
+              </div>
             </div>
-            <div class="operation-item" @click="applyWay(i)">
-              <a href="javascript:void(0)" class="">
-                <span>加入申请库</span>
-              </a>
+            <div class="right">
+              <div class="operation-item" v-if="i.SFJRSQK === '未加入'" @click="applyWay(i)">
+                <a href="javascript:void(0)" class="">
+                  <span>加入申请库</span>
+                </a>
+              </div>
+              <div class="operation-item" v-else style="cursor: not-allowed;background-color: #e8e8e8;">
+                <a href="javascript:void(0)" class="" style="cursor: not-allowed;">
+                  <span>已加入</span>
+                </a>
+              </div>
             </div>
-            <!-- <div class="operation-item operation-item-active" @click="handleQuery(i)">
-              <a href="javascript:void(0)" class="">
-                <span>已加入申请库</span>
-              </a>
-            </div> -->
           </div>
         </div>
       </div>
     </div>
-
-    <!-- <BasicTable @register="registerTable" class="dark:bg-dark-900">
-      <template #toolbar>
-        <Authority value="api:yt:smsLog:delete">
-          <Popconfirm title="您确定要批量删除数据" ok-text="确定" cancel-text="取消" @confirm="handleDeleteOrBatchDelete(null)">
-            <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
-          </Popconfirm>
-        </Authority>
-      </template>
-      <template #remark="{ record }">
-        <Tooltip :title="record.remark">
-          <div class="truncate w-full">{{ record.remark }}</div>
-        </Tooltip>
-      </template>
-      <template #action="{ record }">
-        <TableAction :actions="[
-          {
-            label: '查看',
-            auth: 'api:yt:smsLog:get',
-            icon: 'ant-design:fund-view-outlined',
-            onClick: handleQuery.bind(null, record),
-          },
-          {
-            label: '删除',
-            auth: 'api:yt:smsLog:delete',
-            icon: 'ant-design:delete-outlined',
-            color: 'error',
-            popConfirm: {
-              title: '是否确认删除',
-              confirm: handleDeleteOrBatchDelete.bind(null, record),
-            },
-          },
-        ]" />
-      </template>
-    </BasicTable> -->
     <!-- 弹出框 -->
-    <MapDrawer @register="registerModal" />
+    <DetailModal v-if="showResDeatil" @closeModal="showResDeatil = false" :resId="detailResId" />
   </div>
 </template>
 <script>
-import { defineComponent, nextTick, onMounted, ref, defineProps, watch } from 'vue';
-import { BasicTable, useTable, TableAction } from '/@/components/Table';
-// import { columns, searchFormSchema } from './sms.data';
-import { Popconfirm, Tooltip } from 'ant-design-vue';
-import { Authority } from '/@/components/Authority';
+import { defineComponent, defineEmits, nextTick, onMounted, ref, defineProps, watch } from 'vue';
 import { platList, img, apply } from '/@/api/resource/plat';
 import { message } from 'ant-design-vue';
-// 加载自定义侧边弹出框 组件
-import { useDrawer } from '/@/components/Drawer';
-// 导入子页面【新增、修改】
-import MapDrawer from './MapDrawer.vue';
+
+// 导入子页面【详情】
+import DetailModal from './child/DetailModal.vue';
+
 import Search from './child/Search.vue';
 import { session } from '/@/utils/Memory';
 
@@ -115,44 +73,38 @@ const props = {
     default: () => [],
   }
 }
-
 export default defineComponent({
   name: 'SmsLog',
-  components: { BasicTable, TableAction, Authority, Search, Popconfirm, Tooltip, MapDrawer },
+  components: { Search, DetailModal },
   props,
-  setup(props) {
-    const [registerModal, { openDrawer }] = useDrawer(); //使用右侧弹出框
+  setup(props, { emit }) {
+    const searchRef = ref(null)
+    const showResDeatil = ref(false)
     const list = ref([]);
-    // const props = defineProps({
+    const detailResId = ref('')
 
-    // })
-
-    // setInterval(() => {
-    //   console.log(props)
-    // }, 2000)
     onMounted(() => {
-      console.log("传进来的地图资源:",props.listData)
+      console.log("传进来的地图资源:", props.listData)
       list.value = props.listData;
       list.value.map(async (i) => i.info = await img(i.SERVICEID))
     });
 
-    function getDataList(text) {
-      // platList(text).then((r) => {
-      //   if (r && r.length) {
-      //     list.value = r[0].items;
-      //     list.value.map(async (i) => i.info = await img(i.SERVICEID))
-      //     console.log("资源中心地图资源:", list.value)
-      //   } else {
-      //     list.value = r;
-      //   }
-      // });
-    }
+    watch(
+      () => props.listData,
+      (val) => {
+        list.value = JSON.parse(JSON.stringify(val))
+        list.value.map(async (i) => i.info = await img(i.SERVICEID))
+      },
+      {
+        deep: true,
+        immediate: true
+      }
+    )
 
     function handleQuery(record) {
-      console.log("11111:", record)
-      openDrawer(true, {
-        record,
-      });
+      //打开详情弹窗
+      detailResId.value = record.SERVICEID
+      showResDeatil.value = true
     }
 
     function applyWay(i) {
@@ -169,14 +121,18 @@ export default defineComponent({
       }).then((r) => {
         if (r.datas && r.resp_code == 0) {
           message.success('申请成功');
+          // searchRef.value.getResData();
+          eventBus.emit('addResToCarEventBus')
+          emit('resAddToCar')
         }
       })
     }
 
     return {
-      getDataList,
+      detailResId,
+      searchRef,
+      showResDeatil,
       applyWay,
-      registerModal,
       list,
       handleQuery,
     };
@@ -236,7 +192,52 @@ export default defineComponent({
   height: 42px;
   display: flex;
   margin-bottom: 10px;
-  margin-left: 20px;
+  /* margin-left: 20px; */
+  justify-content: space-between;
+  padding: 0 24px;
+
+  .left {
+    display: flex;
+
+    .operation-item {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      min-width: 50px;
+      height: 34px;
+      opacity: 1;
+      margin-right: 22px;
+      padding: 0 10px;
+      background: #E8E8E8;
+
+      a {
+        font-size: 12px;
+        width: 100%;
+        text-align: center;
+        color: #333333;
+      }
+    }
+  }
+
+  .right {
+    .operation-item {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      min-width: 50px;
+      height: 34px;
+      opacity: 1;
+      padding: 0 10px;
+      background: #0671DD;
+
+      a {
+        font-size: 12px;
+        width: 100%;
+        text-align: center;
+        color: #fff;
+      }
+    }
+  }
 }
 
 .datacenter-right .resource_list .item-top {
@@ -296,43 +297,4 @@ export default defineComponent({
   letter-spacing: 0px;
   color: #333333;
 }
-
-.datacenter-right .resource_list .operation-item {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  min-width: 50px;
-  height: 34px;
-  opacity: 1;
-  margin-right: 22px;
-  padding: 0 10px;
-  background: #E8E8E8;
-}
-
-.datacenter-right .resource_list .operation-item:hover {
-  background: #0671DD;
-}
-
-.datacenter-right .resource_list .operation-item:hover a {
-  color: #fff;
-}
-
-.datacenter-right .resource_list .operation-item.alone-apply-btn {
-  display: none;
-}
-
-.operation-item-active {
-  background: #05B069 !important;
-}
-
-.operation-item-active a {
-  color: #fff !important;
-}
-
-.datacenter-right .resource_list .operation-item a {
-  font-size: 12px;
-  width: 100%;
-  text-align: center;
-  color: #5e5d5e;
-}
 </style>

+ 140 - 136
src/views/resource/plat/item/SceneData.vue

@@ -1,5 +1,5 @@
 <template>
-  <Search></Search>
+  <Search ref="searchRef"></Search>
   <div style="background-color: #f0f2f5" class="dark:bg-dark-900">
     <div class="datacenter-right">
       <div class="resource_list" id="map_list">
@@ -24,138 +24,136 @@
             </div>
           </div>
           <div class="operation-box">
-            <div class="operation-item browse-item-btn browse-item-MR00001936">
-              <a target="_blank" :href="`./mapview.html?${i.SERVICEID}`">
-                <span>浏览</span>
-              </a>
-            </div>
-
-            <div class="operation-item alone-apply-btn alone-apply-btn-MR00001936">
-              <span style="border-right: 1px #ccc solid;" onclick="cardApplyItem('mr')">
-                <span>申请</span>
-              </span>
-            </div>
-            <!-- <div class="user-apply-btn user-apply-btn-MR00001936"
-              onclick="addApplyBank(this,'MR00001936','行政区域','1','测试数据','mr','2000坐标系4490')">
-              <span>加入申请库</span>
-            </div>
-            <div class="dis-apply-btn dis-apply-btn-MR00001936">
-              <span>已加入申请库</span>
-            </div> -->
-            <div class="operation-item" @click="handleQuery(i)">
-              <a href="javascript:void(0)" class="">
-                <span>详细</span>
-              </a>
+            <div class="left">
+              <div class="operation-item browse-item-btn browse-item-MR00001936">
+                <a target="_blank" :href="`./mapview.html?${i.SERVICEID}`">
+                  <span>浏览</span>
+                </a>
+              </div>
+              <div class="operation-item" @click="handleQuery(i)">
+                <a href="javascript:void(0)" class="">
+                  <span>详细</span>
+                </a>
+              </div>
             </div>
-            <!-- <div class="operation-item" @click="handleQuery(i)">
-              <a href="javascript:void(0)" class="">
-                <span>加入申请库</span>
-              </a>
+            <div class="right">
+              <div class="operation-item" v-if="i.SFJRSQK === '未加入'" @click="applyWay(i)">
+                <a href="javascript:void(0)" class="">
+                  <span>加入申请库</span>
+                </a>
+              </div>
+              <div class="operation-item" v-else style="cursor: not-allowed;background-color: #e8e8e8;">
+                <a href="javascript:void(0)" style="cursor: not-allowed;">
+                  <span>已加入</span>
+                </a>
+              </div>
             </div>
-            <div class="operation-item operation-item-active" @click="handleQuery(i)">
-              <a href="javascript:void(0)" class="">
-                <span>已加入申请库</span>
-              </a>
-            </div> -->
           </div>
         </div>
       </div>
     </div>
-
-    <!-- <BasicTable @register="registerTable" class="dark:bg-dark-900">
-      <template #toolbar>
-        <Authority value="api:yt:smsLog:delete">
-          <Popconfirm title="您确定要批量删除数据" ok-text="确定" cancel-text="取消" @confirm="handleDeleteOrBatchDelete(null)">
-            <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
-          </Popconfirm>
-        </Authority>
-      </template>
-      <template #remark="{ record }">
-        <Tooltip :title="record.remark">
-          <div class="truncate w-full">{{ record.remark }}</div>
-        </Tooltip>
-      </template>
-      <template #action="{ record }">
-        <TableAction :actions="[
-          {
-            label: '查看',
-            auth: 'api:yt:smsLog:get',
-            icon: 'ant-design:fund-view-outlined',
-            onClick: handleQuery.bind(null, record),
-          },
-          {
-            label: '删除',
-            auth: 'api:yt:smsLog:delete',
-            icon: 'ant-design:delete-outlined',
-            color: 'error',
-            popConfirm: {
-              title: '是否确认删除',
-              confirm: handleDeleteOrBatchDelete.bind(null, record),
-            },
-          },
-        ]" />
-      </template>
-    </BasicTable> -->
     <!-- 弹出框 -->
     <MapDrawer @register="registerModal" />
   </div>
 </template>
-<script lang="ts">
+<script>
 import { defineComponent, nextTick, onMounted, ref, defineProps, watch } from 'vue';
 import { BasicTable, useTable, TableAction } from '/@/components/Table';
-import { columns, searchFormSchema } from './sms.data';
 import { Popconfirm, Tooltip } from 'ant-design-vue';
 import { Authority } from '/@/components/Authority';
-import { platList, img } from '/@/api/resource/plat';
 // 加载自定义侧边弹出框 组件
 import { useDrawer } from '/@/components/Drawer';
 // 导入子页面【新增、修改】
 import MapDrawer from './MapDrawer.vue';
 import Search from './child/Search.vue';
+import { platList, img, apply } from '/@/api/resource/plat';
+import { session } from '/@/utils/Memory';
+import { message } from 'ant-design-vue';
 
+const props = {
+  listData: {
+    type: Array,
+    default: () => [],
+  }
+}
 
 export default defineComponent({
   name: 'SmsLog',
   components: { BasicTable, TableAction, Search, Authority, Popconfirm, Tooltip, MapDrawer },
-  setup() {
+  props,
+  setup(props, { emit }) {
+    const searchRef = ref(null)
     const [registerModal, { openDrawer }] = useDrawer(); //使用右侧弹出框
     const list = ref([]);
-    const props = defineProps({
-      listData: {
-        type: Array,
-        default: () => [],
-      }
-    })
 
-    onMounted(() => getDataList());
+    // onMounted(() => getDataList());
+    onMounted(() => {
+      console.log("传进来的场景资源:", props.listData)
+      list.value = props.listData
+      list.value.map(async (i) => i.info = await img(i.SERVICEID))
+    });
 
-    function getDataList(text) {
-      platList(text).then((r) => {
-        if (r && r.length) {
-          var o = r.find(i => i.type == 'ER')
-          if (o && o.items && o.items.length) {
-            o.items.map(async (i) => i.info = await img(i.SERVICEID))
-            setTimeout(() => {
-              console.log("资源中心场景资源:", o.items)
-              list.value = o.items;
-            }, 5000)
-          }
-        } else {
-          list.value = [];
-        }
-      });
-    }
+    watch(
+      () => props.listData,
+      (val) => {
+        list.value = JSON.parse(JSON.stringify(val))
+        list.value.map(async (i) => i.info = await img(i.SERVICEID))
+      },
+      {
+        deep: true,
+        immediate: true
+      }
+    )
 
-    function handleQuery(record: Recordable) {
+    // function getDataList(text) {
+    //   platList(text).then((r) => {
+    //     if (r && r.length) {
+    //       var o = r.find(i => i.type == 'ER')
+    //       if (o && o.items && o.items.length) {
+    //         o.items.map(async (i) => i.info = await img(i.SERVICEID))
+    //         setTimeout(() => {
+    //           console.log("资源中心场景资源:", o.items)
+    //           list.value = o.items;
+    //         }, 5000)
+    //       }
+    //     } else {
+    //       list.value = [];
+    //     }
+    //   });
+    // }
+
+    function handleQuery(record) {
       console.log("11111:", record)
       openDrawer(true, {
         record,
       });
     }
+    function applyWay(i) {
+      console.log(i)
+      apply({
+        addRes: [{
+          resDataType: "1",
+          resId: i.SERVICEID,
+          resName: `${i.SERVICENAME}(${i.CRS})`,
+          resType: 0,
+          workflowType: "SCENE",
+        }],
+        userId: session.getItem('userId'),
+      }).then((r) => {
+        if (r.datas && r.resp_code == 0) {
+          message.success('申请成功');
+          // searchRef.value.getResData();
+          eventBus.emit('addResToCarEventBus')
+          emit('resAddToCar')
+        }
+      })
+    }
 
     return {
-      getDataList,
+      searchRef,
+      // getDataList,
       registerModal,
+      applyWay,
       list,
       handleQuery,
     };
@@ -215,7 +213,52 @@ export default defineComponent({
   height: 42px;
   display: flex;
   margin-bottom: 10px;
-  margin-left: 20px;
+  /* margin-left: 20px; */
+  justify-content: space-between;
+  padding: 0 24px;
+
+  .left {
+    display: flex;
+
+    .operation-item {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      min-width: 50px;
+      height: 34px;
+      opacity: 1;
+      margin-right: 22px;
+      padding: 0 10px;
+      background: #E8E8E8;
+
+      a {
+        font-size: 12px;
+        width: 100%;
+        text-align: center;
+        color: #333333;
+      }
+    }
+  }
+
+  .right {
+    .operation-item {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      min-width: 50px;
+      height: 34px;
+      opacity: 1;
+      padding: 0 10px;
+      background: #0671DD;
+
+      a {
+        font-size: 12px;
+        width: 100%;
+        text-align: center;
+        color: #fff;
+      }
+    }
+  }
 }
 
 .datacenter-right .resource_list .item-top {
@@ -275,43 +318,4 @@ export default defineComponent({
   letter-spacing: 0px;
   color: #333333;
 }
-
-.datacenter-right .resource_list .operation-item {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  min-width: 50px;
-  height: 34px;
-  opacity: 1;
-  margin-right: 22px;
-  padding: 0 10px;
-  background: #E8E8E8;
-}
-
-.datacenter-right .resource_list .operation-item:hover {
-  background: #0671DD;
-}
-
-.datacenter-right .resource_list .operation-item:hover a {
-  color: #fff;
-}
-
-.datacenter-right .resource_list .operation-item.alone-apply-btn {
-  display: none;
-}
-
-.operation-item-active {
-  background: #05B069 !important;
-}
-
-.operation-item-active a {
-  color: #fff !important;
-}
-
-.datacenter-right .resource_list .operation-item a {
-  font-size: 12px;
-  width: 100%;
-  text-align: center;
-  color: #5e5d5e;
-}
 </style>

+ 388 - 0
src/views/resource/plat/item/child/DetailModal.vue

@@ -0,0 +1,388 @@
+<template>
+    <a-modal :visible="true" :width="width" :maskClosable="false" :destroyOnClose="true" centered :title="title" :footer="null"
+        wrapClassName="modal-wrap" @cancel="onClose">
+        <div class="action-content">
+            <div class="top-header">
+                <div class="img-container">
+                    <img :src="baseInfo?.thumbnail || './static/img/default-dr3.jpg'" alt="">
+                </div>
+                <div class="res-title">
+                    <div class="title">{{ baseInfo.servicename }}</div>
+                    <div class="describle">描述:{{ baseInfo.description }}</div>
+                    <div class="small-mark">
+                        <div class="update-time">更新时间:{{ baseInfo.updatedate }}</div>
+                        <div class="service-type">服务类型:{{ baseInfo.servicetype }}</div>
+                    </div>
+                    <div class="look">
+                        <a target="_blank" :href="`./mapview.html?${baseInfo.serviceid}`">
+                            <span>浏览</span>
+                        </a>
+                    </div>
+                </div>
+            </div>
+            <div class="base-info info-item">
+                <div class="info-title">基本信息</div>
+                <div class="form-box">
+                    <a-row>
+                        <a-col :span="3" class="form-item-title form-title">真实地址</a-col>
+                        <a-col :span="21" class="form-item-value form-title">{{ baseInfo.mapingurl }}</a-col>
+                    </a-row>
+                    <a-row>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title" style="border-top: none;">资源名称</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    baseInfo.servicename }}</a-col>
+                            </a-row>
+                        </a-col>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title"
+                                    style="border-top: none;border-left: none;">资源别名</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    baseInfo.servicealiasname }}</a-col>
+                            </a-row>
+                        </a-col>
+                    </a-row>
+                    <a-row>
+                        <a-col :span="3" class="form-item-title form-title" style="border-top: none;">缩略图</a-col>
+                        <a-col :span="21" class="form-item-value form-title" style="border-top: none;"
+                            :title="baseInfo.thumbnail">{{ baseInfo.thumbnail }}</a-col>
+                    </a-row>
+                    <a-row>
+                        <a-col :span="3" class="form-item-title form-title" style="border-top: none;">资源描述</a-col>
+                        <a-col :span="21" class="form-item-value form-title" style="border-top: none;">{{
+                            baseInfo.description }}</a-col>
+                    </a-row>
+                </div>
+            </div>
+            <div class="meta-info info-item">
+                <div class="info-title">描述信息</div>
+                <div class="form-box">
+                    <!-- 系统标签,资源类型 -->
+                    <a-row>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title">系统标签</a-col>
+                                <a-col :span="18" class="form-item-value form-title">{{ metaInfo.tag }}</a-col>
+                            </a-row>
+                        </a-col>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title" style="border-left: none;">资源类型</a-col>
+                                <a-col :span="18" class="form-item-value form-title">{{ baseInfo.servicealiasname }}</a-col>
+                            </a-row>
+                        </a-col>
+                    </a-row>
+                    <!-- 数据类型,数据范围 -->
+                    <a-row>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title" style="border-top: none;">数据类型</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    metaInfo.dataType }}</a-col>
+                            </a-row>
+                        </a-col>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title"
+                                    style="border-top: none;border-left: none;">数据范围</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    baseInfo.servicealiasname }}</a-col>
+                            </a-row>
+                        </a-col>
+                    </a-row>
+                    <!-- 更新方式,数据来源 -->
+                    <a-row>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title" style="border-top: none;">更新方式</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    metaInfo.updateType }}</a-col>
+                            </a-row>
+                        </a-col>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title"
+                                    style="border-top: none;border-left: none;">数据来源</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    metaInfo.source }}</a-col>
+                            </a-row>
+                        </a-col>
+                    </a-row>
+                    <!-- 管理部门,责任科室 -->
+                    <a-row>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title" style="border-top: none;">管理部门</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    metaInfo.keepingunit }}</a-col>
+                            </a-row>
+                        </a-col>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title"
+                                    style="border-top: none;border-left: none;">责任科室</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    metaInfo.rboffice }}</a-col>
+                            </a-row>
+                        </a-col>
+                    </a-row>
+                    <!-- 密级,坐标系 -->
+                    <a-row>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title" style="border-top: none;">密级</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    metaInfo.secretlevel }}</a-col>
+                            </a-row>
+                        </a-col>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title"
+                                    style="border-top: none;border-left: none;">坐标系</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    metaInfo.crs }}</a-col>
+                            </a-row>
+                        </a-col>
+                    </a-row>
+                    <!-- EPSG code,运行状态 -->
+                    <a-row>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title" style="border-top: none;">EPSG
+                                    code</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    metaInfo.epsgCode }}</a-col>
+                            </a-row>
+                        </a-col>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title"
+                                    style="border-top: none;border-left: none;">运行状态</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    metaInfo.status ? '正常运行' : '停运' }}</a-col>
+                            </a-row>
+                        </a-col>
+                    </a-row>
+                    <!-- 是否为历史版本,适合申请流程 -->
+                    <a-row>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title"
+                                    style="border-top: none;">是否为历史版本</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    Boolean(Number(metaInfo.ishistory)) ? '是' : '否' }}</a-col>
+                            </a-row>
+                        </a-col>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title"
+                                    style="border-top: none;border-left: none;">适合申请流程</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    metaInfo.shsqlc }}</a-col>
+                            </a-row>
+                        </a-col>
+                    </a-row>
+                    <!-- 备注 -->
+                    <a-row>
+                        <a-col :span="3" class="form-item-title form-title" style="border-top: none;">备注</a-col>
+                        <a-col :span="21" class="form-item-value form-title" style="border-top: none;">{{
+                            metaInfo.bz }}</a-col>
+                    </a-row>
+
+                </div>
+            </div>
+            <div class="public-set info-item">
+                <div class="info-title">共享设置</div>
+                <div class="form-box">
+                    <!-- 是否公开,是否共享 -->
+                    <a-row>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title">是否公开</a-col>
+                                <a-col :span="18" class="form-item-value form-title">{{ '是' }}</a-col>
+                            </a-row>
+                        </a-col>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title" style="border-left: none;">是否共享</a-col>
+                                <a-col :span="18" class="form-item-value form-title">{{ '是' }}</a-col>
+                            </a-row>
+                        </a-col>
+                    </a-row>
+                    <!-- 外部申请,是否展示 -->
+                    <a-row>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title" style="border-top: none;">外部申请</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    '是' }}</a-col>
+                            </a-row>
+                        </a-col>
+                        <a-col :span="12">
+                            <a-row>
+                                <a-col :span="6" class="form-item-title form-title"
+                                    style="border-top: none;border-left: none;">是否展示</a-col>
+                                <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
+                                    Boolean(Number(metaInfo.isShow)) ? '是' : '否' }}</a-col>
+                            </a-row>
+                        </a-col>
+                    </a-row>
+                </div>
+            </div>
+        </div>
+    </a-modal>
+</template>
+<script>
+import { defineComponent, reactive, ref, onMounted, watch, toRefs } from 'vue';
+import { message } from 'ant-design-vue';
+import { session } from '/@/utils/Memory';
+import moment from 'moment';
+
+import { getResViewInfo } from '/@/api/resource/plat';
+
+const props = {
+    resId: {
+        type: String,
+        default: ''
+    }
+}
+export default defineComponent({
+    name: 'modal',
+    components: {},
+    props,
+    setup(props, { emit }) {
+        const data = reactive({
+            width: '1200px',
+            title: '资源详情',
+        })
+        // 关闭请求弹窗
+        const onClose = (e) => {
+            emit('closeModal')
+        }
+        const baseInfo = ref({})
+        const metaInfo = ref({})
+        //初始化请求所需数据
+        onMounted(() => {
+            console.log(props.resId);
+            getResViewInfo(props.resId).then(res => {
+                console.log(res);
+                baseInfo.value = res.servicebase;
+                baseInfo.value.thumbnail = res.metadata.thumbnail
+                baseInfo.value.updatedate = moment(baseInfo.value.updatedate).format('YYYY-MM-DD HH:mm:ss');
+                metaInfo.value = res.metadata
+            })
+        })
+        return {
+            baseInfo,
+            metaInfo,
+            // formRef,
+            ...toRefs(data),
+            onClose
+        };
+    },
+});
+</script>
+<style lang="less" scoped>
+.modal-wrap {
+    .action-content {
+        padding: 20px;
+        max-height: 800px;
+        overflow: auto;
+
+        .top-header {
+            margin-left: 20px;
+            display: flex;
+            align-items: center;
+
+            .img-container {
+                width: 260px;
+                height: 200px;
+                // border: 1px solid blue;
+                box-sizing: border-box;
+
+                img {
+                    width: 100%;
+                    height: 100%;
+                }
+            }
+
+            .res-title {
+                flex-grow: 1;
+                margin-left: 30px;
+
+                .title {
+                    font-size: 26px;
+                    font-weight: 700;
+                }
+
+                .describle {
+                    margin: 10px 0;
+                }
+
+                .small-mark {
+                    width: 100%;
+                    padding-bottom: 10px;
+                    display: flex;
+                    border-bottom: 1px solid rgb(220, 220, 220);
+
+                    .update-time {
+                        margin-right: 50px;
+                    }
+                }
+
+                .look {
+                    margin-top: 20px;
+                    margin-left: 10px;
+                    width: 100px;
+                    height: 35px;
+                    line-height: 32px;
+                    text-align: center;
+                    border: 2px solid blue;
+                    box-sizing: border-box;
+                    color: blue;
+                    font-size: 16px;
+                    font-weight: 700;
+                    cursor: pointer;
+                    user-select: none;
+                    border-radius: 4px;
+                }
+            }
+        }
+
+        .info-item {
+            margin-top: 20px;
+
+            .info-title {
+                margin: 10px 0;
+                padding-left: 10px;
+                border-left: 3px solid blue;
+            }
+
+            .form-box {
+                width: 100%;
+
+                .form-title {
+                    border: 1px solid rgb(230, 230, 230);
+                    box-sizing: border-box;
+                    height: 30px;
+                    line-height: 27px;
+                    padding-left: 5px;
+                    white-space: nowrap;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                }
+
+                .form-item-title {
+                    background-color: rgb(249, 249, 249);
+                }
+
+                .form-item-value {
+                    border-left: none;
+                }
+            }
+        }
+    }
+}
+</style>

+ 51 - 19
src/views/resource/plat/item/child/Search.vue

@@ -1,13 +1,13 @@
 <template>
     <div class="wrapper">
-        <span class="sqrk" @click="showModal">申请库(1)</span>
+        <span class="sqrk" @click="showModal">申请库({{ resNum }})</span>
         <span>
-            <a-select ref="select" v-model:value="value" style="width: 200px" :options="options" @focus="focus"
+            <a-select ref="select" v-model:value="statusValue" style="width: 200px" :options="options"
                 @change="handleChange">
             </a-select>
         </span>
         <span>
-            <a-input-search v-model:value="key" placeholder="请输入搜索内容" style="width: 200px" @search="onSearch" />
+            <a-input-search v-model:value="keyWord" placeholder="请输入搜索内容" style="width: 200px" @search="onSearch" />
         </span>
         <div>
             <a-checkbox v-model:checked="checked1">全部</a-checkbox>
@@ -16,31 +16,50 @@
             <a-checkbox v-model:checked="checked4">测试数据3</a-checkbox> -->
         </div>
 
-        <a-modal style="top: 50px" v-model:visible="visible" title="申请库" @ok="handleOk"
-            width="1440px" :footer="null">
+        <a-modal style="top: 50px" v-model:visible="visible" title="申请库" @ok="handleOk" width="1440px" :footer="null">
             <library></library>
         </a-modal>
     </div>
 </template>
 
 
-<script lang="ts">
-import { defineComponent, ref, computed, unref, getCurrentInstance } from 'vue';
-import library from "../../../library/index.vue"
+<script>
+import { defineComponent, ref, computed, unref, getCurrentInstance, onMounted } from 'vue';
+import library from "../../../library/index.vue";
+import { getResInCar, clearResInCar } from '/@/api/resource/plat';
+import { session } from '/@/utils/Memory';
+import { message } from 'ant-design-vue';
+
 export default defineComponent({
     name: 'Search',
     components: { library },
     setup() {
-        const value = ref<string>('1');
-        const key = ref<string>('');
-        const checked1 = ref<boolean>(false);
-        const checked2 = ref<boolean>(false);
-        const checked3 = ref<boolean>(false);
-        const checked4 = ref<boolean>(false);
+        const statusValue = ref('1');
+        const keyWord = ref('');
+        const checked1 = ref(false);
+        const checked2 = ref(false);
+        const checked3 = ref(false);
+        const checked4 = ref(false);
         const currentInstance = getCurrentInstance();
         const parentSetup = currentInstance.parent.setupState;
+        const resNum = ref(0)
+        onMounted(() => {
+            getResData();
+            eventBus.on('addResToCarEventBus',()=>{
+                getResData();
+            })
+        })
+        const getResData = () => {
+            getResInCar({
+                userId: session.getItem('userId'),
+            }).then((res) => {
+                if(res.datas){
+                    resNum.value = res.datas.length
+                }
+            })
+        }
 
-        const options = ref<SelectTypes['options']>([
+        const options = ref([
             {
                 value: '1',
                 label: '已审核',
@@ -59,27 +78,40 @@ export default defineComponent({
             parentSetup.getDataList(key.value)
         }
 
-        const visible = ref<boolean>(false);
+        const visible = ref(false);
         const showModal = () => {
             visible.value = true;
+            // clearResInCar({
+            //     userId: session.getItem('userId'),
+            // }).then((res) => {
+            //     if(res.datas){
+            //         // resNum.value = res.datas.length
+            //     }
+            // })
         };
-        const handleOk = (e: MouseEvent) => {
+        const handleOk = (e) => {
             console.log(e);
             visible.value = false;
         };
+        const handleChange = () => {
+
+        }
 
         return {
+            resNum,
             visible,
             showModal,
             handleOk,
             options,
-            value,
-            key,
+            statusValue,
+            keyWord,
             onSearch,
             checked1,
             checked2,
             checked3,
             checked4,
+            handleChange,
+            getResData
         };
     },
 });

+ 0 - 89
src/views/resource/plat/item/email.data.ts

@@ -1,89 +0,0 @@
-import { BasicColumn } from '/@/components/Table';
-import { FormSchema } from '/@/components/Table';
-import { h } from 'vue';
-import { Tag } from 'ant-design-vue';
-import { useI18n } from '/@/hooks/web/useI18n';
-import moment from 'moment';
-const { t } = useI18n();
-export const columns: BasicColumn[] = [
-  {
-    title: '邮件主题',
-    dataIndex: 'emailSubject',
-    width: 160,
-  },
-  {
-    title: '收件人',
-    dataIndex: 'emailTo',
-    width: 160,
-  },
-  {
-    title: '状态',
-    dataIndex: 'status',
-    width: 100,
-    customRender: ({ record }) => {
-      const status = record.status;
-      const success = status === 'SUCCESS';
-      const color = success ? 'green' : 'red';
-      const successText: string = t('routes.common.system.tableSuccessStatus');
-      const failedText: string = t('routes.common.system.tableFailedStatus');
-      const text = success ? successText : failedText;
-      return h(Tag, { color: color }, () => text);
-    },
-  },
-  {
-    title: '用途',
-    dataIndex: 'templatePurposeDictText',
-    width: 160,
-  },
-  {
-    title: '备注',
-    dataIndex: 'remark',
-    width: 120,
-    slots: {
-      customRender: 'remark',
-    },
-  },
-  {
-    title: '发送时间',
-    dataIndex: 'sendTime',
-    width: 180,
-  },
-];
-
-export const searchFormSchema: FormSchema[] = [
-  {
-    field: 'emailSubject',
-    label: '邮件主题',
-    component: 'Input',
-    componentProps: {
-      maxLength: 255,
-      placeholder: '请输入邮件主题',
-    },
-    dynamicRules: () => {
-      return [
-        {
-          required: false,
-          validator: (_, value) => {
-            if (String(value).length > 255) {
-              return Promise.reject('字数不超过255个字');
-            }
-            return Promise.resolve();
-          },
-        },
-      ];
-    },
-
-    colProps: { span: 6 },
-  },
-  {
-    field: 'sendTime',
-    label: '发送时间',
-    component: 'RangePicker',
-    componentProps: {
-      showTime: {
-        defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')],
-      },
-    },
-    colProps: { span: 6 },
-  },
-];