XiaXxxxxx 2 years ago
parent
commit
b2340e2dfc

+ 24 - 2
src/api/resource/examine.ts

@@ -14,8 +14,9 @@ enum Api {
     SaveFlowInfoAll = '/base-center/flow/insertFlowInfoAll', //新增流程、节点、节点人员信息
     DelFLowInfo = '/base-center/flow/deleteFlowInfo',    //删除流程
     SelectLowConfig = '/base-center/flow/selectFlowInfoAll',  //查询流程、节点、节点人员信息
-    SubmitExamine = '/base-center/flow/saveBussinfo',
-    SubminExamineResult = '/base-center/flow/submitBussinfo',
+    SubmitExamine = '/base-center/flow/saveBussinfo',//发起申请
+    SubminExamineResult = '/base-center/flow/submitBussinfo',//审核操作
+    GetFlowInfoAll = '/base-center/flow/getFlowInfoAll',//获取所有业务
 }
 /**
  * @description: 查询流程信息
@@ -180,3 +181,24 @@ export const getFlowConfigByBusinessName = async (name) => {
         })
     })
 };
+
+/**
+ * @description: 查询发起的业务信息
+ * @param: page:页数              must
+ * @param: rows:每页数据条数       must
+ * @param: keyStr:模糊查询关键字
+ * @param: userId:用户id
+ */
+export const queryTaskInfoPage = (params) => {
+    // params['rows'] = params?.pageSize ? params?.pageSize : 10
+    return new Promise<void>((resolve) => {
+        defHttp.post({ url: Api.GetFlowInfoAll, params: params }).then((res) => {
+            // const result = res.resp_code === 0 ? res.datas.pageData : []
+            // result.forEach(item => {
+            //     item['id'] = item['ID']
+            // });
+            // resolve(result)
+            resolve(res)
+        })
+    })
+};

+ 17 - 1
src/api/resource/plat.ts

@@ -8,7 +8,8 @@ enum Api {
     CallProvider = '/callProvider',
     Apply = '/base-center/resources/addResToCar',
     SelectUserRes = '/base-center/resources/selectUserRes',
-    ClearUserResCar = '/base-center/resources/clearUserResCar'
+    ClearUserResCar = '/base-center/resources/clearUserResCar',
+    DeleteUserRes = '/base-center/resources/deleteUserRes'
 }
 
 const client = {
@@ -223,3 +224,18 @@ export function clearResInCar(params) {
             })
     })
 }
+
+/**
+ * @description:移除已加入申请库的资源
+ */
+export function deleteResInCar(params) {
+    return new Promise<void>((resolve, reject) => {
+        defHttp.post({ url: Api.DeleteUserRes, params, })
+            .then((r) => {
+                resolve(r);
+            }).
+            catch((e) => {
+                reject(e);
+            })
+    })
+}

+ 15 - 2
src/views/authorize/empower/index.vue

@@ -66,7 +66,7 @@
   </div>
 </template>
 <script lang="ts">
-import { defineComponent, nextTick, onBeforeMount } from 'vue';
+import { defineComponent, nextTick, onBeforeMount, onMounted } from 'vue';
 import { BasicTable, useTable, TableAction } from '/@/components/Table';
 import { delRole, getRoleListByPage, setRoleStatus } from '/@/api/system/system';
 // import { useDrawer } from '/@/components/Drawer';
@@ -80,12 +80,25 @@ import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
 import { useMessage } from '/@/hooks/web/useMessage';
 import { Switch, Popconfirm } from 'ant-design-vue';
 import { list, deleteService } from '/@/api/resource/map';
-import Moment from 'moment'
+import Moment from 'moment';
+import { session } from '/@/utils/Memory';
+//查询用户需要授权的数据api
+import { queryTaskInfoPage } from '/@/api/resource/examine';
 
 export default defineComponent({
   name: 'RoleManagement',
   components: { BasicTable, MapDrawer, MapSourceModal, TableAction, Authority, Switch, Popconfirm },
   setup() {
+    onMounted(()=>{
+      let params = {
+        page:1,
+        rows:10000,
+        userId: session.getItem('userId'),
+      }
+      queryTaskInfoPage(params).then(res=>{
+        console.log(res)
+      })
+    })
     //const [registerDrawer, { openDrawer }] = useDrawer();
     const [registerModal, { openModal }] = useModal();
     const [registerTable, { setProps, reload, setSelectedRowKeys }] = useTable({

+ 4 - 3
src/views/interface/item/AssemblyData.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="assembly-data">
-    <Search :totalNum="total" @interfaceSearch="interfaceSearch"></Search>
+    <Search :totalNum="total" @interfaceSearch="interfaceSearch" ref="searchRef"></Search>
     <div class="datacenter-right-1">
       <div class="resource_list" id="map_list">
         <div v-for="(i, k) in list" :key="k" class="item">
@@ -150,7 +150,7 @@ export default defineComponent({
         getGroupIdList();
       }
     )
-
+    const searchRef = ref(null)
     const applyWay = (i) => {
       console.log(i)
       apply({
@@ -165,12 +165,13 @@ export default defineComponent({
       }).then((r) => {
         if (r.datas && r.resp_code == 0) {
           message.success('申请成功');
-          // searchRef.value.getResData();
+          searchRef.value.getResData();
         }
       })
     }
 
     return {
+      searchRef,
       interfaceImg,
       list,
       visible,

+ 323 - 0
src/views/interface/item/child/InterfaceCarModal.vue

@@ -0,0 +1,323 @@
+<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-search">
+                <div class="left-search-input">
+                    <div class="input">
+                        <span>关键字</span>
+                        <a-input v-model:value="searchValue" style="width: 200px;" placeholder="请输入资源名称"></a-input>
+                    </div>
+                    <div class="input">
+                        <span>审核状态</span>
+                        <a-select allowClear v-model:value="selectValue" style="width: 200px" :options="statusOptions">
+                        </a-select>
+                    </div>
+                    <div class="input">
+                        <span>申请时间</span>
+                        <a-date-picker show-time v-model:value="searchTime" placeholder="申请时间" style="width: 200px" />
+                    </div>
+                </div>
+                <div class="right-btns">
+                    <a-button style="margin-right: 15px;" @click="handleReset">重置</a-button>
+                    <a-button type="primary" @click="handleSearch">查询</a-button>
+                </div>
+            </div>
+            <div class="bottom-table">
+                <BasicTable @register="registerTable" class="basic-table">
+                    <!-- <template #OPT="{ record }">
+                    <span>{{ record.OPT==='login' ? '登录' : '退出' }}</span>
+                </template> -->
+                    <template #action="{ record }">
+                        <TableAction :actions="[
+                            {
+                                label: '移出',
+                                tooltip: '移出',
+                                // icon: 'ant-design:form-outlined',
+                                onClick: handleDelete.bind(null, record),
+                            },
+                        ]" />
+                    </template>
+                </BasicTable>
+            </div>
+        </div>
+    </a-modal>
+</template>
+<script>
+import { defineComponent, reactive, ref, onMounted, watch, toRefs } from 'vue';
+// 导入表格组件,表格事件
+import { BasicTable, useTable, TableAction } from '/@/components/Table';
+import { message } from 'ant-design-vue';
+import { session } from '/@/utils/Memory';
+import moment from 'moment';
+import { getResInCar, clearResInCar } from '/@/api/resource/plat';
+
+const props = {
+    // resId: {
+    //     type: String,
+    //     default: ''
+    // }
+}
+export default defineComponent({
+    name: 'modal',
+    components: { BasicTable, TableAction },
+    props,
+    setup(props, { emit }) {
+        const data = reactive({
+            width: '1440px',
+            title: '申请库',
+        })
+        const searchValue = ref('')
+        const selectValue = ref('未审核')
+        const searchTime = ref(moment())
+        const statusOptions = [
+            {
+                label: "未提交",
+                value: "未审核"
+            },
+            {
+                label: "审核中",
+                value: "审核中"
+            },
+            {
+                label: "审核通过",
+                value: "审核通过"
+            },
+            {
+                label: "审核不通过",
+                value: "审核不通过"
+            },
+        ]
+        // 请求所有申请库中的资源
+        const getAllData = () => {
+            return new Promise((resolve) => {
+                getResInCar({
+                    keyword: searchValue.value,
+                    shzt: selectValue.value,
+                    sqsj: searchTime.value ? moment(searchTime).format('YYYY-MM-DD') : '',
+                    userId: session.getItem('userId'),
+                }).then((res) => {
+                    if (res.datas?.length) {
+                        let resData = []
+                        res.datas.forEach(item => {
+                            //筛掉接口服务
+                            if (item.applyCarInfo.workflowType === 'MAP' || item.applyCarInfo.workflowType === 'SCENE' || item.applyCarInfo.workflowType === 'FILE') {
+                                resData.push({
+                                    serviceid: item.resInfo.SERVICEID,
+                                    zylx: item.applyCarInfo.workflowType === 'MAP' ? '地图资源' : item.applyCarInfo.workflowType === 'SCENE' ? '场景资源' : '文件资源',
+                                    // zymc: item.resInfo.SERVICENAME,
+                                    zymc: item.applyCarInfo.resName,
+                                    yyxt: "",
+                                    // sqdz: "",
+                                    sqsj: "",
+                                    sqr: "",
+                                    shzt: item.shzt,
+                                    shr: "",
+                                    shyj: ""
+                                })
+                            }
+                        })
+                        resolve(resData)
+                    } else {
+                        resolve([])
+                    }
+                }).catch((err) => {
+                    resolve([])
+                })
+            })
+        }
+        //表格列
+        const columns = [
+            {
+                title: '资源类型',
+                align: 'center',
+                dataIndex: 'zylx',
+                key: 'zylx'
+            },
+            {
+                title: '资源名称',
+                align: 'center',
+                dataIndex: 'zymc',
+                key:'zymc'
+            },
+            // {
+            //     title: '操作IP',
+            //     align: 'center',
+            //     dataIndex: 'ip',
+            //     slots: {
+            //         customRender: 'ip',
+            //     }
+            // },
+            {
+                title: '应用系统',
+                align: 'center',
+                dataIndex: 'yyxt',
+                key: 'yyxt'
+            },
+            {
+                title: '申请单位',
+                align: 'center',
+                dataIndex: 'sqdw',
+                key: 'sqdw'
+            },
+            {
+                title: '申请时间',
+                align: 'center',
+                dataIndex: 'sqsj',
+                key: 'sqsj'
+            },
+            {
+                title: '申请人',
+                align: 'center',
+                dataIndex: 'sqr',
+                key: 'sqr'
+            },
+            {
+                title: '审核状态',
+                align: 'center',
+                dataIndex: 'shzt',
+                key: 'shzt'
+            },
+            {
+                title: '审核人',
+                align: 'center',
+                dataIndex: 'shr',
+                key: 'shr'
+            },
+            {
+                title: '审核意见',
+                align: 'center',
+                dataIndex: 'shyj',
+                key: 'shyj'
+            }
+        ]
+        //注册表格
+        const [registerTable, { reload }] = useTable({
+            title: '资源列表',
+            api: getAllData,		 //数据
+            // dataSource: [],
+            columns: columns,        //表头配置
+            bordered: false,
+            striped: false,
+            useSearchForm: false,     //开启搜索区域
+            // formConfig: formConfig,  //搜索字段配置
+            actionColumn: {
+                width: 100,
+                title: '操作',
+                dataIndex: 'action',
+                slots: { customRender: 'action' },
+            },
+            rowSelection: { type: 'checkbox' },
+            pagination: {
+                // pageSize: 10,
+                hideOnSinglePage: false
+            },
+            canResize: true,
+            showTableSetting: true,  // 显示表格设置
+            tableSetting: {
+                redo: true,
+                size: true,
+                setting: false,
+                fullScreen: false
+            },
+            showIndexColumn: true,
+            indexColumnProps: { fixed: 'left' },
+        });
+        //重置查询
+        const handleReset = () => {
+            searchValue.value = ''
+            selectValue.value = '未审核'
+            searchTime.value = moment()
+        }
+        //条件查询
+        const handleSearch = () => {
+            reload();
+        }
+        //移除资源
+        const handleDelete = (record) => {
+            console.log('要移除的资源', record);
+        }
+        // 关闭请求弹窗
+        const onClose = (e) => {
+            emit('closeModal')
+        }
+        //初始化请求所需数据
+        onMounted(() => {
+
+        })
+        return {
+            // formRef,
+            searchValue,
+            selectValue,
+            searchTime,
+            statusOptions,
+            ...toRefs(data),
+            registerTable,
+            handleReset,
+            handleSearch,
+            handleDelete,
+            onClose
+        };
+    },
+});
+</script>
+<style lang="less" scoped>
+.modal-wrap {
+    .action-content {
+        padding: 20px;
+        max-height: 800px;
+        overflow: auto;
+        background-color: #eff0f5;
+
+        .top-search {
+            // padding-left: 20px;
+            width: 100%;
+            height: 74px;
+            border-radius: 6px;
+            background: #FFFFFF;
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+
+            .left-search-input {
+                margin-left: 20px;
+                display: flex;
+
+                .input {
+                    margin-right: 30px;
+
+                    span {
+                        margin-right: 10px;
+                    }
+                }
+            }
+
+            .right-btns {
+                margin-right: 20px;
+            }
+        }
+
+        .bottom-table {
+            // height: 825px;
+            margin-top: 20px;
+
+            .basic-table {
+                height: 100%;
+
+                ::v-deep .ant-table-title {
+                    padding: 0 !important;
+
+                    .vben-basic-title {
+                        font-family: '阿里巴巴普惠体 2.0';
+                        font-size: 16px;
+                        font-weight: bold;
+                        color: #333333;
+                    }
+
+                }
+            }
+        }
+    }
+}
+</style>

+ 41 - 20
src/views/interface/item/child/Search.vue

@@ -1,6 +1,6 @@
 <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"
                 @change="handleChange">
@@ -16,16 +16,21 @@
             <a-checkbox v-model:checked="checked4">测试数据3</a-checkbox> -->
             共有<span>{{ num }}</span>个通用接口
         </div>
-        <a-modal style="top: 50px" v-model:visible="visible" title="申请库" @ok="handleOk" width="1440px">
+        <!-- <a-modal style="top: 50px" v-model:visible="visible" title="申请库" @ok="handleOk" width="1440px">
             <library></library>
-        </a-modal>
+        </a-modal> -->
+        <InterfaceCarModal v-if="visible" @closeModal="visible = false"/>
     </div>
 </template>
 
 
-<script lang="ts">
-import { defineComponent, ref, computed, unref, watch } from 'vue';
+<script>
+import { defineComponent, ref, computed, unref, watch, onMounted } from 'vue';
 import library from "../../library/index.vue";
+import InterfaceCarModal from './InterfaceCarModal.vue';
+import { getResInCar } from '/@/api/resource/plat';
+import { session } from '/@/utils/Memory';
+import { message } from 'ant-design-vue';
 
 const props = {
     totalNum:{
@@ -36,17 +41,17 @@ const props = {
 
 export default defineComponent({
     name: 'Search',
-    components: { library },
+    components: { library, InterfaceCarModal },
     props,
     setup(props,{emit}) {
-        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 value = ref('1');
+        const key = ref('');
+        const checked1 = ref(false);
+        const checked2 = ref(false);
+        const checked3 = ref(false);
+        const checked4 = ref(false);
 
-        const options = ref<SelectTypes['options']>([
+        const options = ref([
             {
                 value: '1',
                 label: '已审核',
@@ -65,16 +70,30 @@ export default defineComponent({
             emit("interfaceSearch", e);
         }
 
-        const visible = ref<boolean>(false);
+        const visible = ref(false);
         const showModal = () => {
             visible.value = true;
         };
-        const handleOk = (e: MouseEvent) => {
-            console.log(e);
-            visible.value = false;
-        };
+        // const handleOk = (e) => {
+        //     console.log(e);
+        //     visible.value = false;
+        // };
 
         const num = ref(props.totalNum);
+        const resNum = ref(0)
+        onMounted(() => {
+            getResData();
+        })
+        const getResData = () => {
+            getResInCar({
+                userId: session.getItem('userId'),
+            }).then((res) => {
+                if (res.datas) {
+                    let resData = res.datas.filter(item=>item.applyCarInfo.workflowType==='INTERFACE')
+                    resNum.value = resData.length
+                }
+            })
+        }
 
         watch(
             ()=>props.totalNum,
@@ -88,9 +107,10 @@ export default defineComponent({
 
         return {
             num,
+            resNum,
             visible,
             showModal,
-            handleOk,
+            // handleOk,
             options,
             value,
             key,
@@ -99,7 +119,8 @@ export default defineComponent({
             checked2,
             checked3,
             checked4,
-            handleChange
+            handleChange,
+            getResData
         };
     },
 });

+ 408 - 0
src/views/resource/plat/item/child/ResCarModal.vue

@@ -0,0 +1,408 @@
+<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-search">
+                <div class="left-search-input">
+                    <div class="input">
+                        <span>关键字</span>
+                        <a-input allowClear v-model:value="searchValue" style="width: 200px;"
+                            placeholder="请输入资源名称"></a-input>
+                    </div>
+                    <div class="input">
+                        <span>审核状态</span>
+                        <a-select allowClear v-model:value="selectValue" style="width: 200px" :options="statusOptions">
+                        </a-select>
+                    </div>
+                    <div class="input">
+                        <span>申请时间</span>
+                        <a-date-picker v-model:value="searchTime" placeholder="申请时间" style="width: 200px" />
+                    </div>
+                </div>
+                <div class="right-btns">
+                    <a-button style="margin-right: 15px;" @click="handleReset">重置</a-button>
+                    <a-button type="primary" @click="handleSearch">查询</a-button>
+                </div>
+            </div>
+            <div class="bottom-table">
+                <BasicTable @register="registerTable" class="basic-table">
+                    <!-- <template #OPT="{ record }">
+                    <span>{{ record.OPT==='login' ? '登录' : '退出' }}</span>
+                </template> -->
+                    <template #toolbar>
+                        <a-button style="background-color: #fc8b01;color: #fff;" @click="handleAdd"
+                            :disabled="hasSelected">提交申请</a-button>
+                    </template>
+                    <template #action="{ record }">
+                        <TableAction :actions="[
+                            {
+                                label: '移出',
+                                tooltip: '移出',
+                                // icon: 'ant-design:form-outlined',
+                                onClick: handleDelete.bind(null, record),
+                            },
+                        ]" />
+                    </template>
+                </BasicTable>
+            </div>
+        </div>
+    </a-modal>
+</template>
+<script>
+import { defineComponent, reactive, ref, onMounted, watch, toRefs, computed, createVNode } from 'vue';
+// 导入表格组件,表格事件
+import { BasicTable, useTable, TableAction } from '/@/components/Table';
+import { message, Modal } from 'ant-design-vue';
+import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
+import { session } from '/@/utils/Memory';
+import moment from 'moment';
+//操作申请库资源
+import { getResInCar, clearResInCar, deleteResInCar } from '/@/api/resource/plat';
+//提交授权申请
+import { queryFlowInfoPage, submitExamine } from '/@/api/resource/examine';
+
+const props = {
+    // resId: {
+    //     type: String,
+    //     default: ''
+    // }
+}
+export default defineComponent({
+    name: 'modal',
+    components: { BasicTable, TableAction, ExclamationCircleOutlined },
+    props,
+    setup(props, { emit }) {
+        const data = reactive({
+            width: '1440px',
+            title: '申请库',
+        })
+        const searchValue = ref('')
+        const selectValue = ref('')
+        const searchTime = ref(null)
+        const statusOptions = [
+            {
+                label: "未提交",
+                value: "未审核"
+            },
+            {
+                label: "审核中",
+                value: "审核中"
+            },
+            {
+                label: "审核通过",
+                value: "审核通过"
+            },
+            {
+                label: "审核不通过",
+                value: "审核不通过"
+            },
+        ]
+        // 请求所有申请库中的资源
+        const getAllData = () => {
+            return new Promise((resolve) => {
+                getResInCar({
+                    keyword: searchValue.value,
+                    shzt: selectValue.value,
+                    sqsj: searchTime.value ? moment(searchTime).format('YYYY-MM-DD') : '',
+                    userId: session.getItem('userId'),
+                }).then((res) => {
+                    if (res.datas?.length) {
+                        let resData = []
+                        res.datas.forEach(item => {
+                            //筛掉接口服务
+                            if (item.applyCarInfo.workflowType === 'MAP' || item.applyCarInfo.workflowType === 'SCENE' || item.applyCarInfo.workflowType === 'FILE') {
+                                resData.push({
+                                    serviceid: item.resInfo.SERVICEID,
+                                    zylx: item.applyCarInfo.workflowType === 'MAP' ? '地图资源' : item.applyCarInfo.workflowType === 'SCENE' ? '场景资源' : '文件资源',
+                                    // zymc: item.resInfo.SERVICENAME,
+                                    zymc: item.applyCarInfo.resName,
+                                    yyxt: "",
+                                    // sqdz: "",
+                                    sqsj: "",
+                                    sqr: "",
+                                    shzt: item.shzt,
+                                    shr: "",
+                                    shyj: ""
+                                })
+                            }
+                        })
+                        resolve(resData)
+                    } else {
+                        resolve([])
+                    }
+                }).catch((err) => {
+                    resolve([])
+                })
+            })
+        }
+        //表格列
+        const columns = [
+            {
+                title: '资源类型',
+                align: 'center',
+                dataIndex: 'zylx',
+                key: 'zylx'
+            },
+            {
+                title: '资源名称',
+                align: 'center',
+                dataIndex: 'zymc',
+                key: 'zymc'
+            },
+            // {
+            //     title: '操作IP',
+            //     align: 'center',
+            //     dataIndex: 'ip',
+            //     slots: {
+            //         customRender: 'ip',
+            //     }
+            // },
+            {
+                title: '应用系统',
+                align: 'center',
+                dataIndex: 'yyxt',
+                key: 'yyxt'
+            },
+            // {
+            //     title: '申请单位',
+            //     align: 'center',
+            //     dataIndex: 'sqdw',
+            //     key: 'sqdw'
+            // },
+            {
+                title: '申请时间',
+                align: 'center',
+                dataIndex: 'sqsj',
+                key: 'sqsj'
+            },
+            {
+                title: '申请人',
+                align: 'center',
+                dataIndex: 'sqr',
+                key: 'sqr'
+            },
+            {
+                title: '审核状态',
+                align: 'center',
+                dataIndex: 'shzt',
+                key: 'shzt'
+            },
+            {
+                title: '审核人',
+                align: 'center',
+                dataIndex: 'shr',
+                key: 'shr'
+            },
+            {
+                title: '审核意见',
+                align: 'center',
+                dataIndex: 'shyj',
+                key: 'shyj'
+            }
+        ]
+        //注册表格
+        const [registerTable, { reload, getRowSelection, getSelectRowKeys, clearSelectedRowKeys }] = useTable({
+            title: '资源列表',
+            api: getAllData,		 //数据
+            // dataSource: [],
+            columns: columns,        //表头配置
+            bordered: false,
+            striped: false,
+            useSearchForm: false,     //开启搜索区域
+            // formConfig: formConfig,  //搜索字段配置
+            actionColumn: {
+                width: 100,
+                title: '操作',
+                dataIndex: 'action',
+                slots: { customRender: 'action' },
+            },
+            rowSelection: { type: 'checkbox' },
+            pagination: {
+                // pageSize: 10,
+                hideOnSinglePage: false
+            },
+            rowKey: (record) => record.serviceid,
+            canResize: true,
+            showTableSetting: true,  // 显示表格设置
+            tableSetting: {
+                redo: true,
+                size: true,
+                setting: false,
+                fullScreen: false
+            },
+            showIndexColumn: true,
+            indexColumnProps: { fixed: 'left' },
+        });
+        //判断是否选中数据
+        const hasSelected = computed(() => {
+            const rowSelection = getRowSelection();
+            return !(rowSelection.selectedRowKeys?.length === 1);
+        });
+        //重置查询
+        const handleReset = () => {
+            searchValue.value = ''
+            selectValue.value = '未审核'
+            searchTime.value = moment()
+        }
+        //条件查询
+        const handleSearch = () => {
+            reload();
+        }
+        //移除资源
+        const handleDelete = (record) => {
+            // console.log(record)
+            Modal.confirm({
+                title: '移出提示',
+                icon: createVNode(ExclamationCircleOutlined),
+                content: '确定移出该资源?',
+                centered: true,
+                okText: '确定',
+                okType: 'danger',
+                cancelText: '取消',
+                onOk: (() => {
+                    let params = {
+                        idList: [record.serviceid]
+                    }
+                    deleteResInCar(params).then(res => {
+                        reload();
+                    })
+                })
+            });
+        }
+        //添加申请
+        const handleAdd = () => {
+            console.log('开始申请');
+            Modal.confirm({
+                title: '申请提示',
+                icon: createVNode(ExclamationCircleOutlined),
+                content: '确定提交申请该资源?',
+                centered: true,
+                okText: '确定',
+                cancelText: '取消',
+                onOk: (() => {
+                    queryFlowInfoPage({
+                        page: 1,
+                        rows: 1000000
+                    }).then(flowRes => {
+                        const rowKeys = getSelectRowKeys();
+                        let ids = rowKeys.toString();
+                        // console.log(flowRes);
+                        let flag = 0
+                        flowRes.forEach(item => {
+                            if (item.FLOWNAME === judgeType(ids)) {
+                                flag = 1
+                                let params = {
+                                    bussInfo: {
+                                        bussname: judgeType(ids),//业务名称
+                                        flowid: item.id,//流程id
+                                        serverids: ids//资源id
+                                    }
+                                }
+                                submitExamine(params).then(res => {
+                                    if(res.resp_code===0 && res.resp_msg==='新增成功'){
+                                        message.success('申请成功')
+                                        reload();
+                                    }else{
+                                        message.error('申请失败')
+                                    }
+                                })
+                            }
+                        })
+                        clearSelectedRowKeys();
+                        !flag && message.info('没有对应流程,请联系管理员');
+                    })
+                })
+            });
+        }
+        const judgeType = (id) => {
+            let resType = ''
+            resType = id.indexOf('MR') > -1 ? '地图资源授权' : id.indexOf('ER') > -1 ? '场景资源授权' : '文件资源授权';
+            // console.log(resType);
+            return resType
+        }
+        // 关闭请求弹窗
+        const onClose = (e) => {
+            emit('closeModal')
+        }
+        //初始化请求所需数据
+        onMounted(() => {
+
+        })
+        return {
+            // formRef,
+            searchValue,
+            selectValue,
+            searchTime,
+            statusOptions,
+            hasSelected,
+            ...toRefs(data),
+            registerTable,
+            handleReset,
+            handleSearch,
+            handleDelete,
+            handleAdd,
+            onClose
+        };
+    },
+});
+</script>
+<style lang="less" scoped>
+.modal-wrap {
+    .action-content {
+        padding: 20px;
+        max-height: 800px;
+        overflow: auto;
+        background-color: #eff0f5;
+
+        .top-search {
+            // padding-left: 20px;
+            width: 100%;
+            height: 74px;
+            border-radius: 6px;
+            background: #FFFFFF;
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+
+            .left-search-input {
+                margin-left: 20px;
+                display: flex;
+
+                .input {
+                    margin-right: 30px;
+
+                    span {
+                        margin-right: 10px;
+                    }
+                }
+            }
+
+            .right-btns {
+                margin-right: 20px;
+            }
+        }
+
+        .bottom-table {
+            // height: 825px;
+            margin-top: 20px;
+
+            .basic-table {
+                height: 100%;
+
+                ::v-deep .ant-table-title {
+                    padding: 0 !important;
+
+                    .vben-basic-title {
+                        font-family: '阿里巴巴普惠体 2.0';
+                        font-size: 16px;
+                        font-weight: bold;
+                        color: #333333;
+                    }
+
+                }
+            }
+        }
+    }
+}
+</style>

+ 11 - 6
src/views/resource/plat/item/child/Search.vue

@@ -16,9 +16,11 @@
             <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>
+        </a-modal> -->
+        <!-- 弹出框 -->
+        <ResCarModal v-if="visible" @closeModal="visible = false" />
     </div>
 </template>
 
@@ -26,13 +28,14 @@
 <script>
 import { defineComponent, ref, computed, unref, getCurrentInstance, onMounted } from 'vue';
 import library from "../../../library/index.vue";
+import ResCarModal from './ResCarModal.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 },
+    components: { library, ResCarModal },
     setup() {
         const statusValue = ref('1');
         const keyWord = ref('');
@@ -43,9 +46,10 @@ export default defineComponent({
         const currentInstance = getCurrentInstance();
         const parentSetup = currentInstance.parent.setupState;
         const resNum = ref(0)
+
         onMounted(() => {
             getResData();
-            eventBus.on('addResToCarEventBus',()=>{
+            eventBus.on('addResToCarEventBus', () => {
                 getResData();
             })
         })
@@ -53,8 +57,9 @@ export default defineComponent({
             getResInCar({
                 userId: session.getItem('userId'),
             }).then((res) => {
-                if(res.datas){
-                    resNum.value = res.datas.length
+                if (res.datas) {
+                    let resData = res.datas.filter(item=>item.applyCarInfo.workflowType==='MAP'||item.applyCarInfo.workflowType==='SCENE'||item.applyCarInfo.workflowType==='FILE')
+                    resNum.value = resData.length
                 }
             })
         }