sujunling пре 2 година
родитељ
комит
cbc651e532

+ 39 - 4
src/api/dataAdmin/assembly.ts

@@ -29,13 +29,24 @@ export function list(text) {
     if (text && (text.source || text.servicename || text.status)) {
         delete text.pageSize;
         delete text.page;
+        // str = {
+        //     'type': 'SR',
+        //     'servicetype': 'WidgetService',
+        //     // "fields": {
+        //     //     'servicename': text.servicename
+        //     // },
+        //     "status": text.status
+        // }
+        // str = JSON.stringify(str);
+
         str = {
             'type': 'SR',
             'servicetype': 'WidgetService',
-            // "fields": {
-            //     'servicename': text.servicename
-            // },
-            "status": text.status
+            'fields': {
+                'DATA': ['servicename', 'serviceid'],
+            },
+            "status": text.status,
+            'filterValue': text.servicename
         }
         str = JSON.stringify(str);
     } else {
@@ -103,6 +114,30 @@ export function getAssemblyLibs(params) {
     })
 }
 
+/**
+ * @description:查询已经加入到申请库中的组件
+ */
+export function getAssemblyLibsTotal() {
+    var params = {
+        page: 1,
+        pageSize: 1000000,
+        userId: session.getItem('userId')
+    }
+    return new Promise<void>((resolve, reject) => {
+        defHttp.post({ url: Api.SelectUserRes, params })
+            .then((res) => {
+                if (res?.datas?.length) {
+                    var list = res.datas.filter(i => i.applyCarInfo.workflowType === 'ASSEMBLY');
+                    resolve(list.length);
+                } else {
+                    resolve(0)
+                }
+            }).catch((e) => {
+                reject(e);
+            })
+    })
+}
+
 /**
  * @description:获取资源类型字典
  */

BIN
src/assets/images/logo.png


BIN
src/assets/images/logo2.png


+ 3 - 3
src/components/Application/src/AppLogo.vue

@@ -1,7 +1,7 @@
 <template>
-  <div class="anticon" :class="getAppLogoClass" @click="goHome" style="margin-right: 184px;">
-    <!-- <img v-if="getLogo" :src="getLogo" />
-    <img v-else src="/src/assets/images/logo.png" /> -->
+  <div class="anticon" :class="getAppLogoClass" @click="goHome" style="margin-right: 184px;width: 260px !important;">
+    <!-- <img v-if="getLogo" :src="getLogo" /> -->
+    <img src="/src/assets/images/logo.png" style="width: 52px;height: 30px;" />
     <div class="headerName ml-2 truncate md:opacity-100" :class="getTitleClass" v-show="showTitle">
       <!-- {{ getTitle }} -->
       空间数据管理平台

+ 1 - 1
src/layouts/default/header/index.vue

@@ -163,7 +163,7 @@ export default defineComponent({
       if (!unref(getIsMixMode) || unref(getIsMobile)) {
         return {};
       }
-      const width = unref(getMenuWidth) < 180 ? 220 : unref(getMenuWidth);//sjl,之前是180
+      const width = unref(getMenuWidth) < 180 ? 280 : unref(getMenuWidth);//sjl,之前是180,
       return { width: `${width}px` };
     });
 

+ 11 - 4
src/views/assembly/item/child/Search.vue

@@ -1,11 +1,11 @@
 <template>
     <div class="wrapper">
-        <span class="sqrk" @click="showModal">申请库(1)</span>
-        <span>
+        <span class="sqrk" @click="showModal">申请库({{ total }})</span>
+        <!-- <span>
             <a-select ref="select" v-model:value="value" style="width: 200px" :options="options" @focus="focus"
                 @change="handleChange">
             </a-select>
-        </span>
+        </span> -->
         <span>
             <a-input-search v-model:value="key" placeholder="请输入搜索内容" style="width: 200px" @search="onSearch" />
         </span>
@@ -23,8 +23,9 @@
 
 
 <script lang="ts">
-import { defineComponent, ref, computed, unref, getCurrentInstance } from 'vue';
+import { defineComponent, ref, computed, unref, onMounted, getCurrentInstance } from 'vue';
 import library from "../../library/index.vue"
+import { getAssemblyLibsTotal } from '/@/api/dataAdmin/assembly';
 
 export default defineComponent({
     name: 'Search',
@@ -71,7 +72,13 @@ export default defineComponent({
             visible.value = false;
         };
 
+        const total = ref(0);
+        onMounted(() => {
+            getAssemblyLibsTotal().then(i => total.value = i)
+        })
+
         return {
+            total,
             visible,
             showModal,
             handleOk,

+ 35 - 18
src/views/assembly/library/index.vue

@@ -5,11 +5,11 @@
         <Authority>
           <a-button type="primary" @click="handleCreate">提交申请</a-button>
         </Authority>
-        <Authority>
+        <!-- <Authority>
           <Popconfirm title="您确定要批量删除数据" ok-text="确定" cancel-text="取消" @confirm="handleDeleteOrBatchDelete(null)">
             <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
           </Popconfirm>
-        </Authority>
+        </Authority> -->
       </template>
       <!-- <template #status="{ record }">
         <Switch :checked="record.status === 1" :loading="record.pendingStatus" checkedChildren="启用" unCheckedChildren="禁用"
@@ -54,6 +54,13 @@
             disabled: !(record.shzt == '未提交'),
             onClick: submitApply.bind(null, record),
           },
+          {
+            label: '移出',
+            tooltip: '移出',
+            // icon: 'ant-design:form-outlined',
+            onClick: handleDelete.bind(null, record),
+            disabled: !(record.shzt === '未提交')
+          },
         ]" />
       </template>
       <template #pdate="{ record }">
@@ -64,10 +71,9 @@
         </Tag>
       </template>
       <template #status="{ record }">
-        <Tag :style="`color:${record.status === 3 || record.status === 3 ? 'red' : ''};`">
+        <Tag :style="`color:${record.shzt == '未提交' ? 'red' : '#05B069'};`">
           {{
-            record.status === 0 ? '待审核' : (record.status === 1 ? '审核通过' : (record.status === 2 ? '审核不通过' : (record.status
-              === 3 ? '被驳回' : '未提交')))
+            record.shzt
           }}
         </Tag>
       </template>
@@ -77,24 +83,26 @@
   </div>
 </template>
 <script lang="ts">
-import { defineComponent, nextTick, onBeforeMount } from 'vue';
+import { defineComponent, nextTick, onBeforeMount, createVNode } from 'vue';
 import { BasicTable, useTable, TableAction } from '/@/components/Table';
 import { delRole, getRoleListByPage, setRoleStatus } from '/@/api/system/system';
 // import { useDrawer } from '/@/components/Drawer';
 import { useModal } from '/@/components/Modal';
 import MapDrawer from './MapDrawer.vue';
+import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
 import MapSourceModal from './MapSourceModal.vue';
 import { columns, searchFormSchema } from './lib.data';
 import { RoleEnum } from '/@/enums/roleEnum';
 import { Authority } from '/@/components/Authority';
 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
 import { useMessage } from '/@/hooks/web/useMessage';
-import { Switch, Popconfirm, message } from 'ant-design-vue';
+import { Switch, Popconfirm, message, Modal } from 'ant-design-vue';
 import { list, deleteService, getAssemblyLibs } from '/@/api/dataAdmin/assembly';
 //操作申请库资源
 // import { getResInCar, clearResInCar, deleteResInCar } from '/@/api/resource/plat';
 import Moment from 'moment'
 import { queryFlowInfoPage, submitExamine } from '/@/api/resource/examine';
+import { deleteResInCar } from '/@/api/resource/plat';
 
 export default defineComponent({
   name: 'RoleManagement',
@@ -170,17 +178,26 @@ export default defineComponent({
       if (e.servicealiasname) window.open(`../../mapview.html?onlineIde_${e.servicealiasname}`, '_blank');
     }
 
-    const handleDelete = async (record: Recordable) => {
-      if (record?.serviceid) {
-        const res = await deleteService(record?.serviceid)
-        if (res?.status !== '-1') {
-          reload();
-          createMessage.success('删除成功!', 1)
-        }
-        else {
-          createMessage.error('删除失败!失败原因:' + res?.message, 1)
-        }
-      }
+    //组件资源移出申请库
+    const handleDelete = (record) => {
+      console.log(record);
+      Modal.confirm({
+        title: '移出提示',
+        icon: createVNode(ExclamationCircleOutlined),
+        content: '确定移出该资源?',
+        centered: true,
+        okText: '确定',
+        okType: 'danger',
+        cancelText: '取消',
+        onOk: (() => {
+          let params = {
+            idList: [record.applyCarInfo.id]
+          }
+          deleteResInCar(params).then(res => {
+            reload();
+          })
+        })
+      });
     }
 
     function handleSuccess() {

+ 47 - 36
src/views/assembly/library/lib.data.ts

@@ -2,6 +2,7 @@ import { BasicColumn } from '/@/components/Table';
 import { FormSchema } from '/@/components/Table';
 import { RoleEnum } from '/@/enums/roleEnum';
 import { getServiceTypes, queryServiceTags, queryDicsByName, queryCoors } from '/@/api/resource/map';
+import moment from 'moment';
 
 const resTag = await queryServiceTags()
 let listTag = []
@@ -42,11 +43,10 @@ export const EPSGCodes = await queryDicsByName('EPSG code')
 
 
 const checkStatus = [
-  { label: '未提交', value: 1 },
-  { label: '审核中', value: 2 },
-  { label: '审核不通过', value: 3 },
-  { label: '被驳回', value: 4 },
-  { label: '审核通过', value: 5 },
+  { label: '未提交', value: '未提交' },
+  { label: '审核中', value: '审核中' },
+  { label: '审核不通过', value: '审核不通过' },
+  { label: '审核通过', value: '审核通过' },
 ]
 export enum KeysTypeEnum {
   DISABLED = 'disabled',
@@ -64,24 +64,24 @@ export const RoleMenuDictEnum: Recordable<{ key: string; keyType: KeysTypeEnum }
  * 查询条件
 */
 export const searchFormSchema: FormSchema[] = [
+  // {
+  //   field: 'resTag',
+  //   label: '资源标签',
+  //   component: 'Select',
+  //   componentProps: {
+  //     options: serviceTags,
+  //     // options: [
+  //     //   { label: '地图浏览工具', value: '地图浏览工具' },
+  //     //   { label: '服务加载工具', value: '服务加载工具' },
+  //     //   { label: 'GIS功能工具', value: 'GIS功能工具' },
+  //     //   { label: '空间分析工具', value: '空间分析工具' },
+  //     //   { label: '三维可视化效果工具', value: '三维可视化效果工具' },
+  //     // ],
+  //   },
+  //   colProps: { span: 5 },
+  // },
   {
-    field: 'resTag',
-    label: '资源标签',
-    component: 'Select',
-    componentProps: {
-      options: serviceTags,
-      // options: [
-      //   { label: '地图浏览工具', value: '地图浏览工具' },
-      //   { label: '服务加载工具', value: '服务加载工具' },
-      //   { label: 'GIS功能工具', value: 'GIS功能工具' },
-      //   { label: '空间分析工具', value: '空间分析工具' },
-      //   { label: '三维可视化效果工具', value: '三维可视化效果工具' },
-      // ],
-    },
-    colProps: { span: 5 },
-  },
-  {
-    field: 'resName',
+    field: 'keyword',
     label: '资源名称',
     component: 'Input',
     colProps: { span: 5 },
@@ -90,7 +90,7 @@ export const searchFormSchema: FormSchema[] = [
     },
   },
   {
-    field: 'checkStatus',
+    field: 'shzt',
     label: '审核状态',
     component: 'Select',
     componentProps: {
@@ -98,6 +98,17 @@ export const searchFormSchema: FormSchema[] = [
     },
     colProps: { span: 5 },
   },
+  {
+    field: 'sqsj',
+    label: '申请时间',
+    component: 'DatePicker',
+    componentProps: {
+      showTime: {
+        defaultValue: [moment('00:00:00', 'HH:mm:ss')],
+      },
+    },
+    colProps: { span: 6 },
+  },
 ];
 
 /**
@@ -119,11 +130,11 @@ export const columns: BasicColumn[] = [
     dataIndex: 'servicename',
     width: 160,
   },
-  {
-    title: '申请单位',
-    dataIndex: 'servicename',
-    width: 160,
-  },
+  // {
+  //   title: '申请单位',
+  //   dataIndex: 'servicename',
+  //   width: 160,
+  // },
   // {
   //   title: '发布人',
   //   dataIndex: 'publisher',
@@ -137,16 +148,16 @@ export const columns: BasicColumn[] = [
   // },
   {
     title: '申请时间',
-    dataIndex: 'checkTime',
-    width: 100,
-  },
-  {
-    title: '申请人',
-    dataIndex: 'curHandler',
-    width: 100,
+    dataIndex: 'applyCarInfo.createtime',
+    width: 130,
   },
+  // {
+  //   title: '申请人',
+  //   dataIndex: 'curHandler',
+  //   width: 100,
+  // },
   {
-    title: '审核状态',
+    title: '申请状态',
     dataIndex: 'shzt',
     width: 110,
     slots: { customRender: 'shzt' },