فهرست منبع

新增文件上传场景上传

tengmingxue 2 سال پیش
والد
کامیت
933459a421

+ 2 - 2
src/api/resource/map.ts

@@ -2,9 +2,9 @@
  * @Author: tengmingxue 1473375109@qq.com
  * @Date: 2023-08-15 11:20:48
  * @LastEditors: tengmingxue 1473375109@qq.com
- * @LastEditTime: 2023-08-17 16:02:14
+ * @LastEditTime: 2023-08-21 17:13:06
  * @FilePath: \xld-gis-admin\src\api\resource\map.ts
- * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @Description: 地图资源接口
  */
 import { defHttp } from '/@/utils/http/axios';
 import { session } from "/@/utils/Memory.js";

+ 35 - 0
src/api/resource/scene.ts

@@ -0,0 +1,35 @@
+/*
+ * @Author: tengmingxue 1473375109@qq.com
+ * @Date: 2023-08-15 11:20:48
+ * @LastEditors: tengmingxue 1473375109@qq.com
+ * @LastEditTime: 2023-08-21 17:19:02
+ * @FilePath: \xld-gis-admin\src\api\resource\scene.ts
+ * @Description: 场景资源接口
+ */
+import { defHttp } from '/@/utils/http/axios';
+import { session } from "/@/utils/Memory.js";
+enum Api {
+    Login = '/callProvider'
+}
+const interfaceType = { apiUrl2: true };
+
+/**
+ * @description:获取地图资源列表
+ */
+export function list() {
+    const formData = new FormData();
+    formData.append("interfaceName", "antu.space.provider.sservicebase.ServiceBaseMetaDataViewProvider");
+    formData.append("methodName", "getResourcePagedList");
+    formData.append("args[]", session.getItem('tokenV2'));
+    formData.append("args[]", '{"type":"ER","pageIndex":1,"pageSize":20,"orderBy":"updatedate DESC"}');
+    return new Promise<void>((resolve, reject) => {
+        defHttp.post({ url: Api.Login, params: formData, ...interfaceType })
+            .then((r) => {
+                let result = r.result === '' ? {} : JSON.parse(r.result)
+                console.log('场景资源数据',result)
+                resolve(result);
+            })
+    })
+}
+
+

+ 6 - 6
src/mock/menu.json

@@ -482,11 +482,11 @@
                         "name": "场景资源上传",
                         "parentId": "c084fce9-9b70-4ae0-b094-7cfe30c87f52",
                         "children": [],
-                        "path": "/scene/send",
+                        "path": "/dataAdmin/dataAdmin/sceneResourceUpload",
                         "type": "SYSADMIN",
-                        "permission": "",
+                        "permission": "scene:souce:upload",
                         "sort": 25,
-                        "component": "LAYOUT",
+                        "component": "/dataAdmin/dataAdmin/sceneResourceUpload/index",
                         "meta": {
                             "icon": "mdi:earth-box-plus",
                             "title": "场景资源上传",
@@ -526,11 +526,11 @@
                         "name": "文件型数据上传",
                         "parentId": "c084fce9-9b70-4ae0-b094-7cfe30c87f52",
                         "children": [],
-                        "path": "/fild/send",
+                        "path": "/dataAdmin/dataAdmin/fileResourceUpload",
                         "type": "SYSADMIN",
-                        "permission": "",
+                        "permission": "file:souce:upload",
                         "sort": 26,
-                        "component": "LAYOUT",
+                        "component": "/dataAdmin/dataAdmin/fileResourceUpload/index",
                         "meta": {
                             "icon": "mdi:exit-to-app",
                             "title": "文件型数据上传",

+ 3 - 1
src/mock/menu_get_ids.json

@@ -149,5 +149,7 @@
     "ca60b93b-fc8e-487b-bbff-1831ccc6e518",
     "4dd7d7af-aba5-4b55-98a8-599a2475149d",
     "6f625574-6061-4989-aeb1-a6a1eb8ed668",
-    "7e0c2dfc-a6d1-4855-914f-51d70f6d291b"
+    "7e0c2dfc-a6d1-4855-914f-51d70f6d291b",
+    "619676b7-2496-4d8d-a2b7-65f6553a8a9b",
+    "8e979a41-8533-44d1-9b09-2216f2af8761"
 ]

+ 4 - 1
src/mock/role_me_permissions.json

@@ -133,5 +133,8 @@
     "api:yt:schedule:update",
     "api:yt:user:reset",
     "map:resource:examine",
-    "map:source:upload"
+    "map:source:upload",
+    "file:souce:upload",
+    "scene:souce:upload",
+    "api:dataresource:fileupload:fileuploadAdd"
 ]

+ 4 - 1
src/views/dataAdmin/dataAdmin/fileResourceUpload/index.vue

@@ -9,7 +9,10 @@
     >
     <!-- 表格右上角按钮 -->
     <template #toolbar>
-        <Authority :value="authList.addAuth">
+        <!-- <Authority :value="authList.addAuth">
+          <a-button type="primary" @click="addMethod" >新增文件</a-button>
+        </Authority> -->
+        <Authority >
           <a-button type="primary" @click="addMethod" >新增文件</a-button>
         </Authority>
         <Authority :value="authList.deleteAuth">

+ 183 - 159
src/views/dataAdmin/dataAdmin/sceneResourceUpload/AddMethod.vue

@@ -8,28 +8,35 @@
     :useWrapper="true"
     :minHeight="500"
   >
-    <div style="height: 50vh;">
+    <div style="height: 50vh">
       <BasicForm @register="registerForm">
         <template #title>
           <div class="text-center text-black text-2xl">
             <!-- <a-typography-title style="font-size: 16px;">流域基础信息</a-typography-title> -->
             <a-menu v-model:selectedKeys="current" mode="horizontal">
-              <a-menu-item key="mail1">
-                基础信息
-              </a-menu-item>
-              <a-menu-item key="mail2">
-                版本信息
-              </a-menu-item>
+              <a-menu-item key="mail1"> 场景资源信息 </a-menu-item>
+              <a-menu-item key="mail2"> 流程信息 </a-menu-item>
             </a-menu>
           </div>
         </template>
+        <template #basicinfo>
+          <div class="basic-info-title">基础信息</div>
+        </template>
+
+        <template #descinfo>
+          <div class="basic-info-title">描述信息</div>
+        </template>
+
         <template #upload>
           <a-upload name="file" :multiple="true">
-           <a-button  type="primary">
-             <upload-outlined></upload-outlined>
-              选择文件
-           </a-button>
-           <span style="font-size: 14px; margin-left: 10px;">支持上传png、jpeg、gif、tif、doc、xls、pdf等格式文件</span>
+            <a-button type="primary">
+              <upload-outlined></upload-outlined>
+              文件上传
+            </a-button>
+            <span style="font-size: 14px; margin-left: 10px"
+              >支持上传png、jpeg、gif、tif等格式文件</span
+            >
+            <!-- 支持上传png、jpeg、gif、tif、doc、xls、pdf等格式文件 -->
           </a-upload>
         </template>
       </BasicForm>
@@ -37,165 +44,182 @@
   </BasicModal>
 </template>
 <script lang="ts">
-  import { defineComponent, ref, computed, unref, reactive, onMounted } from 'vue';
-  import { BasicModal, useModalInner } from '/@/components/Modal';
-  import { BasicForm, useForm } from '/@/components/Form/index';
-  import { accountFormSchema } from './sceneUploadData';
-  import { filterRoleList } from '/@/api/system/system';
-  // import { addDzsbsjjr } from '/@/api/datamanager/groundDisasterId/muSourceData';
+import { defineComponent, ref, computed, unref, reactive, onMounted } from 'vue';
+import { BasicModal, useModalInner } from '/@/components/Modal';
+import { BasicForm, useForm } from '/@/components/Form/index';
+import { accountFormSchema } from './sceneUploadData';
+import { filterRoleList } from '/@/api/system/system';
+// import { addDzsbsjjr } from '/@/api/datamanager/groundDisasterId/muSourceData';
 
-  import { message, Upload, } from 'ant-design-vue';
-  import { useMessage } from '/@/hooks/web/useMessage';
-  // import { FileItem } from '/@/components/Upload/src/typing';
-  import { TOption } from '/@/views/rule/linkedge/config/config.data';
-  import { PlusOutlined } from '@ant-design/icons-vue';
-  // import { upload } from '/@/api/oss/ossFileUploader';
-  import { addFileResource } from '../../api/fileUploadApi'
-  export default defineComponent({
-    name: 'AccountModal',
-    components: {
-      BasicModal,
-      BasicForm,
-      Upload,
-      PlusOutlined,
-    },
-    emits: ['success', 'register'],
-    setup(_, { emit }) {
-      const current = ref(['mail1']);
-      const tenantLogo = ref('');
-      const loading = ref(false);
-      const roleOptions = ref<TOption[]>([]);
-      const isUpdate = ref(true);
-      const rowId = ref('');
-      const postData = reactive({});
+import { message, Upload } from 'ant-design-vue';
+import { useMessage } from '/@/hooks/web/useMessage';
+// import { FileItem } from '/@/components/Upload/src/typing';
+import { TOption } from '/@/views/rule/linkedge/config/config.data';
+import { PlusOutlined } from '@ant-design/icons-vue';
+// import { upload } from '/@/api/oss/ossFileUploader';
+import { addFileResource } from '../../api/fileUploadApi';
+export default defineComponent({
+  name: 'AccountModal',
+  components: {
+    BasicModal,
+    BasicForm,
+    Upload,
+    PlusOutlined,
+  },
+  emits: ['success', 'register'],
+  setup(_, { emit }) {
+    const current = ref(['mail1']);
+    const tenantLogo = ref('');
+    const loading = ref(false);
+    const roleOptions = ref<TOption[]>([]);
+    const isUpdate = ref(true);
+    const rowId = ref('');
+    const postData = reactive({});
 
-      const getRoleList = async () => {
-        const res = await filterRoleList();
-        console.log(res);
-        roleOptions.value = res.map((m) => {
-          return {
-            label: m.name,
-            value: m.id,
-          };
-        });
-      };
-      onMounted(async () => {
-        await getRoleList();
+    const getRoleList = async () => {
+      const res = await filterRoleList();
+      console.log(res);
+      roleOptions.value = res.map((m) => {
+        return {
+          label: m.name,
+          value: m.id,
+        };
       });
+    };
+    onMounted(async () => {
+      await getRoleList();
+    });
 
-      const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
-        labelWidth: 100,
-        schemas: accountFormSchema,
-        showActionButtonGroup: false,
-        actionColOptions: {
-          span: 18,
-        },
-      });
+    const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
+      labelWidth: 100,
+      schemas: accountFormSchema,
+      showActionButtonGroup: false,
+      actionColOptions: {
+        span: 18,
+      },
+    });
 
-      const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
-        await resetFields();
-        setModalProps({ confirmLoading: false });
-        isUpdate.value = !!data?.isUpdate;
-        if (unref(isUpdate)) {
-          rowId.value = data.record.id;
-          setFieldsValue(data.record);
-        }
-      });
-      const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
+    const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
+      await resetFields();
+      setModalProps({ confirmLoading: false });
+      isUpdate.value = !!data?.isUpdate;
+      if (unref(isUpdate)) {
+        rowId.value = data.record.id;
+        setFieldsValue(data.record);
+      }
+    });
+    const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
 
-      async function handleSubmit() {
-        setModalProps({ confirmLoading: true });
-        try {
-          const { createMessage } = useMessage();
-          const values = await validate([
-            'parentId'
-          ]);
-          Object.assign(postData, values);
+    async function handleSubmit() {
+      setModalProps({ confirmLoading: true });
+      try {
+        const { createMessage } = useMessage();
+        const values = await validate(['parentId']);
+        Object.assign(postData, values);
 
-          console.log("准备传递的参数"+JSON.stringify(postData))
+        console.log('准备传递的参数' + JSON.stringify(postData));
 
-          await addFileResource(paramsToFormData(postData as any), unref(isUpdate));
-          closeModal();
-          emit('success');
-          createMessage.success(unref(isUpdate) ? '编辑成功' : '新增成功');
-        } finally {
-          setTimeout(() => {
-            setModalProps({ confirmLoading: false });
-          }, 300);
-        }
-      }
-      // async function customUpload({ file }) {
-      //   if (beforeUpload(file)) {
-      //     tenantLogo.value = '';
-      //     loading.value = true;
-      //     const formData = new FormData();
-      //     formData.append('file', file);
-      //     const response = await upload(formData);
-      //     if (response.fileStaticUri) {
-      //       tenantLogo.value = response.fileStaticUri;
-      //       loading.value = false;
-      //     }
-      //   }
-      // }
-      // const beforeUpload = (file: FileItem) => {
-      //   const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
-      //   if (!isJpgOrPng) {
-      //     message.error('只能上传图片文件!');
-      //   }
-      //   const isLt2M = (file.size as number) / 1024 / 1024 < 5;
-      //   if (!isLt2M) {
-      //     message.error('图片大小不能超过5MB!');
-      //   }
-      //   return isJpgOrPng && isLt2M;
-      // };
-      function preProcessData(data) {
-        Object.keys(data).forEach((item) => {
-          if (typeof data[item] === 'undefined' || data[item] === null || data[item] === '') {
-            delete data[item];
-          }
-        });
-        return data;
+        await addFileResource(paramsToFormData(postData as any), unref(isUpdate));
+        closeModal();
+        emit('success');
+        createMessage.success(unref(isUpdate) ? '编辑成功' : '新增成功');
+      } finally {
+        setTimeout(() => {
+          setModalProps({ confirmLoading: false });
+        }, 300);
       }
+    }
+    // async function customUpload({ file }) {
+    //   if (beforeUpload(file)) {
+    //     tenantLogo.value = '';
+    //     loading.value = true;
+    //     const formData = new FormData();
+    //     formData.append('file', file);
+    //     const response = await upload(formData);
+    //     if (response.fileStaticUri) {
+    //       tenantLogo.value = response.fileStaticUri;
+    //       loading.value = false;
+    //     }
+    //   }
+    // }
+    // const beforeUpload = (file: FileItem) => {
+    //   const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
+    //   if (!isJpgOrPng) {
+    //     message.error('只能上传图片文件!');
+    //   }
+    //   const isLt2M = (file.size as number) / 1024 / 1024 < 5;
+    //   if (!isLt2M) {
+    //     message.error('图片大小不能超过5MB!');
+    //   }
+    //   return isJpgOrPng && isLt2M;
+    // };
+    function preProcessData(data) {
+      Object.keys(data).forEach((item) => {
+        if (typeof data[item] === 'undefined' || data[item] === null || data[item] === '') {
+          delete data[item];
+        }
+      });
+      return data;
+    }
 
-      function paramsToFormData(obj) {
-        const data = preProcessData(obj);
-        const formData = new FormData();
-        Object.keys(data).forEach((key) => {
-          if (data[key] instanceof Array) {
-            data[key].forEach((item) => {
-              formData.append(key, item);
-            });
-            return;
-          }
-          formData.append(key, obj[key]);
-        });
-        return formData;
-      }
-      return {
-        current,
-        registerModal,
-        registerForm,
-        handleSubmit,
-        getTitle,
-        roleOptions,
-        // customUpload,
-        // beforeUpload,
-        tenantLogo,
-        loading,
-      };
-    },
-  });
+    function paramsToFormData(obj) {
+      const data = preProcessData(obj);
+      const formData = new FormData();
+      Object.keys(data).forEach((key) => {
+        if (data[key] instanceof Array) {
+          data[key].forEach((item) => {
+            formData.append(key, item);
+          });
+          return;
+        }
+        formData.append(key, obj[key]);
+      });
+      return formData;
+    }
+
+    function func(row, label) {
+      console.log(row, label);
+    }
+    return {
+      current,
+      registerModal,
+      registerForm,
+      handleSubmit,
+      getTitle,
+      roleOptions,
+      // customUpload,
+      // beforeUpload,
+      tenantLogo,
+      loading,
+      func,
+    };
+  },
+});
 </script>
 <style scoped lang="less">
-  :deep(.vben-basic-tree) {
-    width: 100% !important;
-  }
+:deep(.vben-basic-tree) {
+  width: 100% !important;
+}
 
-  :deep(.is-unflod) {
-    display: none !important;
-  }
+:deep(.is-unflod) {
+  display: none !important;
+}
 
-  :deep(.is-flod) {
-    display: none !important;
-  }
+:deep(.is-flod) {
+  display: none !important;
+}
+.basic-info-title {
+  height: 19px;
+  line-height: 18px;
+  padding-left: 6px;
+  margin-left: 20px;
+  border-left: 3px solid #0671dd;
+  font-family: Source Han Sans CN;
+  font-size: 16px;
+  font-weight: 350;
+  letter-spacing: 0px;
+}
+:deep(.ant-calendar-picker){
+  width: 100% !important;
+}
 </style>

+ 134 - 97
src/views/dataAdmin/dataAdmin/sceneResourceUpload/index.vue

@@ -1,18 +1,18 @@
 <!-- 场景资源上传 -->
 <template>
-  <div style="height: 100%; width: 100%; margin-top: 0; padding: 0;">
+  <div style="height: 100%; width: 100%; margin-top: 0; padding: 0">
     <!-- 使用搜索框和表格封装组件 -->
     <BasicTable
-    :rowSelection="{ type: 'checkbox' }" 
-    @register="registerTable"
-    :clickToRowSelect="false"
+      :rowSelection="{ type: 'checkbox' }"
+      @register="registerTable"
+      :clickToRowSelect="false"
     >
-    <!-- 表格右上角按钮 -->
-    <template #toolbar>
-        <Authority :value="authList.addAuth">
-          <a-button type="primary" @click="addMethod" >新增场景</a-button>
+      <!-- 表格右上角按钮 -->
+      <template #toolbar>
+        <Authority>
+          <a-button type="primary" @click="addMethod">新增场景</a-button>
         </Authority>
-        <Authority :value="authList.deleteAuth">
+        <Authority>
           <Popconfirm
             title="您确定要批量删除数据"
             ok-text="确定"
@@ -27,28 +27,28 @@
       <template #action="{ record }">
         <TableAction
           :actions="[
-                        {
+            {
               label: '浏览',
-              auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
-              icon: 'clarity:note-edit-line',//图标
-              onClick: handleEdit.bind(null, record),
+              // auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
+              icon: '',//'clarity:note-edit-line', //图标
+              onClick: viewScene.bind(null, record),
             },
             {
               label: '查看',
-              auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
-              icon: 'clarity:note-edit-line',
+              //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
+              icon: '',//'clarity:note-edit-line',
               onClick: handleEdit.bind(null, record),
             },
             {
               label: '编辑',
-              auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
-              icon: 'clarity:note-edit-line',
+              //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
+              icon: '',//'clarity:note-edit-line',
               onClick: handleEdit.bind(null, record),
             },
             {
               label: '删除',
-              auth: 'api:yt:role:delete',
-              icon: 'ant-design:delete-outlined',
+              //auth: 'api:yt:role:delete',
+              icon: '',//'ant-design:delete-outlined',
               color: 'error',
               ifShow: true,
               popConfirm: {
@@ -59,6 +59,31 @@
           ]"
         />
       </template>
+      <template #pdate="{ record }">
+        <Tag :color="'red'">
+          {{ record.publishdate ? moment(record.publishdate).format('YYYY-MM-DD HH:mm:ss') : '' }}
+        </Tag>
+      </template>
+      <template #edate="{ record }">
+        <Tag :color="'red'">
+          {{ record.edate ? moment(record.edate).format('YYYY-MM-DD HH:mm:ss') : '' }}
+        </Tag>
+      </template>
+      <template #status="{ record }">
+        <Tag :style="`color:${record.status === 2 || record.status === 3 ? 'red' : '#05B069'};`">
+          {{
+            record.status === 0
+              ? '待审核'
+              : record.status === 1
+              ? '审核通过'
+              : record.status === 2
+              ? '审核不通过'
+              : record.status === 3
+              ? '被驳回'
+              : '未提交'
+          }}
+        </Tag>
+      </template>
     </BasicTable>
     <!-- 新增和编辑 -->
     <!-- <RoleDrawer @register="registerDrawer" @success="handleSuccess" /> -->
@@ -72,103 +97,115 @@ import { BasicTable, TableAction, useTable } from '/@/components/Table';
 import { Authority } from '/@/components/Authority';
 import { useModal } from '/@/components/Modal';
 import { Popconfirm } from 'ant-design-vue';
-import { getSceneListByPage, delSceneResource  } from '../../api/sceneUploadApi';
+import { getSceneListByPage, delSceneResource } from '../../api/sceneUploadApi';
 import { columns, searchFormSchema } from './sceneUploadData';
 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
-import AddMethod from './AddMethod.vue'
+import AddMethod from './AddMethod.vue';
+import Moment from 'moment';
+import { list } from '/@/api/resource/scene';
 
 export default defineComponent({
   name: 'mapUpload',
   components: { BasicTable, Authority, Popconfirm, TableAction, AddMethod },
   setup() {
+    const moment = Moment;
     //按钮的权限控制标识
-    const bottomAuthority = "api:dataresource:sceneupload:";
+    const bottomAuthority = 'api:dataresource:sceneupload:';
     const authList = {
-      addAuth: bottomAuthority + "sceneuploadAdd",//新增权限控制
-      deleteAuth: bottomAuthority + "sceneuploadDelete",//删除权限控制
-      editAuth: bottomAuthority + "sceneuploadEdit",//编辑权限控制
-    }
+      addAuth: bottomAuthority + 'sceneuploadAdd', //新增权限控制
+      deleteAuth: bottomAuthority + 'sceneuploadDelete', //删除权限控制
+      editAuth: bottomAuthority + 'sceneuploadEdit', //编辑权限控制
+    };
     // 新增和编辑界面
     // const [registerDrawer, { openDrawer }] = useDrawer();
     const [registerModal, { openModal: openModal }] = useModal();
     // 新增和编辑界面操作函数
     function handleSuccess() {
-        reload();
-      };
+      reload();
+    }
     // 配置下方表格
     const [registerTable, { setProps, reload, setSelectedRowKeys }] = useTable({
       // 表格题目
-        title: '场景资源列表',
-        // 分页查询请求函数
-        api: getSceneListByPage,
-        // 表头
-        columns,
-        // 查询条件框配置
-        formConfig: {
-          labelWidth: 120,
-          schemas: searchFormSchema,
-        },
-        useSearchForm: true,
-        showTableSetting: true,
-        bordered: true,
-        // 表格控制序号显示
-        showIndexColumn: true,
-        // 表格操作栏
-        actionColumn: {
-          width: 200,
-          title: '操作',
-          dataIndex: 'action',
-          slots: { customRender: 'action' },
-          fixed: 'right',
-        },
+      title: '场景资源列表',
+      // 分页查询请求函数
+      api: list,
+      // 表头
+      columns,
+      // 查询条件框配置
+      formConfig: {
+        labelWidth: 120,
+        schemas: searchFormSchema,
+      },
+      useSearchForm: true,
+      showTableSetting: true,
+      bordered: true,
+      // 表格控制序号显示
+      showIndexColumn: true,
+      // 表格操作栏
+      actionColumn: {
+        width: 200,
+        title: '操作',
+        dataIndex: 'action',
+        slots: { customRender: 'action' },
+        fixed: 'right',
+      },
+    });
+    //
+    const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions, resetSelectedRowKeys } =
+      useBatchDelete(delSceneResource, handleSuccess, setProps);
+    //
+    selectionOptions.rowSelection.getCheckboxProps = (record) => {
+      // Demo:status为1的选择框禁用
+      if (record.status === 1) {
+        return { disabled: true };
+      } else {
+        return { disabled: false };
+      }
+    };
+    //
+    nextTick(() => {
+      setProps(selectionOptions);
+    });
+    // 新增
+    function handleCreate() {
+      openModal(true, {
+        isUpdate: false,
       });
-      // 
-      const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions, resetSelectedRowKeys } = useBatchDelete(delSceneResource, handleSuccess, setProps);
-      // 
-      selectionOptions.rowSelection.getCheckboxProps = (record) => {
-        // Demo:status为1的选择框禁用
-        if (record.status === 1) {
-          return { disabled: true };
-        } else {
-          return { disabled: false };
-        }
-      };
-      // 
-      nextTick(() => {
-        setProps(selectionOptions);
-      });
-      // 新增
-      // function handleCreate() {
-      //   // openDrawer(true, {
-      //   //   isUpdate: false,
-      //   // });
-      // };
-            // 新增
-            function addMethod(){
-        openModal(true, {
-          isUpdate: false,
-        });
-      };
-      // 编辑
-      function handleEdit(record) {
-        // openDrawer(true, {
-        //   record,
-        //   isUpdate: true,
-        // });
-      };
+    }
+    /**
+     * 浏览
+    */
+   function viewScene(record){
+    window.open(`http://106.12.170.138:8080/onemapV5.0/mapview.html?${record.serviceid}`,'target',"")
+   }
 
-      return {
-        registerModal,
-        authList,
-        registerTable,
-        // handleCreate,
-        addMethod,
-        handleEdit,
-        handleSuccess,
-        hasBatchDelete,
-        handleDeleteOrBatchDelete,
-      };
+    function addMethod() {
+      openModal(true, {
+        isUpdate: false,
+      });
+    }
+    // 编辑
+    function handleEdit(record) {
+      openModal(true, {
+        record,
+        isUpdate: true,
+      });
+    }
+    
 
+    return {
+      moment,
+      registerModal,
+      authList,
+      registerTable,
+      // handleCreate,
+      addMethod,
+      viewScene,
+      handleEdit,
+      handleSuccess,
+      hasBatchDelete,
+      handleDeleteOrBatchDelete,
+    };
   },
-})
+});
 </script>

+ 361 - 250
src/views/dataAdmin/dataAdmin/sceneResourceUpload/sceneUploadData.js

@@ -1,85 +1,93 @@
 export const columns = [
-    {
-      title: '资源编号',
-      dataIndex: 'resourceNumber',
-      width: 200,
-    },
-    {
-        title: '资源名称',
-        dataIndex: 'resourceName',
-        width: 200,
-      },
-      {
-        title: '坐标系名称',
-        dataIndex: 'coordinateName',
-        width: 200,
-      },
-      {
-        title: '资源标签',
-        dataIndex: 'resourceTags',
-        width: 200,
-      },
-      {
-        title: '发布人',
-        dataIndex: 'publisher',
-        width: 200,
-      },
-      {
-        title: '发布时间',
-        dataIndex: 'publisherTime',
-        width: 200,
-      },
-      {
-        title: '审核状态',
-        dataIndex: 'auditStatus',
-        width: 200,
-      },
-      {
-        title: '审核人',
-        dataIndex: 'reviewer',
-        width: 200,
-      },
-      {
-        title: '审核时间',
-        dataIndex: 'reviewTime',
-        width: 200,
-      },
+  {
+    title: '资源编号',
+    dataIndex: 'serviceid',
+    width: 200,
+  },
+  {
+    title: '资源名称',
+    dataIndex: 'servicename',
+    width: 200,
+  },
+  {
+    title: '资源类型',
+    dataIndex: 'typename',
+    width: 200,
+  },
+  {
+    title: '资源标签',
+    dataIndex: 'servicetype',
+    width: 200,
+  },
+  {
+    title: '发布人',
+    dataIndex: 'publisher',
+    width: 200,
+  },
+  {
+    title: '发布时间',
+    dataIndex: 'publisherdate',
+    width: 200,
+    slots: { customRender: 'pdate' },
+  },
+  {
+    title: '当前环节',
+    dataIndex: 'currHj',
+    width: 200,
+  },
+  {
+    title: '当前处理人',
+    dataIndex: 'auditStatus',
+    width: 200,
+  },
+  {
+    title: '审核状态',
+    dataIndex: 'status',
+    width: 200,
+    slots: { customRender: 'status' },
+  },
+  {
+    title: '审核时间',
+    dataIndex: 'eximdata',
+    width: 200,
+    slots: { customRender: 'edate' },
+  },
 ];
 
 export const searchFormSchema = [
-    {
-        field: 'resourceTags',
-        label: '资源标签',
-        component: 'Select',
-        componentProps: {
-          options: [
-            { label: '无', value: 0 },
-          ],
-        },
-        colProps: { span: 6 },
-      },
-    {
-        field: 'resourceName',
-        label: '资源名称',
-        component: 'Input',
-        colProps: { span: 6 },
-        componentProps: {
-            maxLength: 255,
-        },
+  {
+    field: 'resourceTags',
+    label: '资源标签',
+    component: 'Select',
+    componentProps: {
+      options: [
+        { label: '无', value: 0 },
+      ],
     },
-    {
-        field: 'auditStatus',
-        label: '审核状态',
-        component: 'Select',
-        componentProps: {
-          options: [
-            { label: '审核不通过', value: 2 },
-            { label: '审核中', value: 1 },
-            { label: '审核通过', value: 0 },
-          ],
-        },
-        colProps: { span: 6 },
-      },
+    colProps: { span: 6 },
+  },
+  {
+    field: 'resourceName',
+    label: '资源名称',
+    component: 'Input',
+    colProps: { span: 6 },
+    componentProps: {
+      maxLength: 255,
+    },
+  },
+  {
+    field: 'auditStatus',
+    label: '审核状态',
+    component: 'Select',
+    componentProps: {
+      options: [
+        { label: '审核不通过', value: 2 },
+        { label: '审核中', value: 1 },
+        { label: '审核通过', value: 0 },
+      ],
+    },
+    colProps: { span: 6 },
+  },
 ]
 
 // 新增表单配置
@@ -90,6 +98,12 @@ export const accountFormSchema = [
     slot: 'title',
     component: 'Input',
   },
+  {
+    field: 'basicinfo',
+    label: '',
+    slot: 'basicinfo',
+    component: 'Input',
+  },
   {
     field: 'id',
     label: 'id',
@@ -100,8 +114,53 @@ export const accountFormSchema = [
     },
   },
   {
-    field: 'parentId',
-    label: '服务类型',
+    field: 'serviceCode',
+    label: '资源编码',
+    component: 'Input',
+    colProps: { span: 12 },
+    componentProps: {
+      placeholder: '请输入资源编码',
+    },
+  },
+  {
+    field: 'serviceName',
+    label: '资源名称',
+    required: true,
+    component: 'Input',
+    colProps: { span: 12 },
+    componentProps: {
+      placeholder: '请输入资源名称',
+    },
+  },
+  {
+    field: 'serviceAliasName',
+    label: '资源别名',
+    required: true,
+    component: 'Input',
+    colProps: { span: 12 },
+    componentProps: {
+      placeholder: '请输入资源别名',
+    },
+  },
+  // {
+  //   field: 'parentId',
+  //   label: '服务类型',
+  //   required: true,
+  //   component: 'TreeSelect',
+  //   colProps: { span: 12 },
+  //   componentProps: {
+  //     replaceFields: {
+  //       title: 'name',
+  //       key: 'id',
+  //       value: 'id',
+  //     },
+  //     maxTagCount: 10,
+  //     getPopupContainer: () => document.body,
+  //   },
+  // },
+  {
+    field: 'sysTag',
+    label: '系统标签',
     required: true,
     component: 'TreeSelect',
     colProps: { span: 12 },
@@ -116,8 +175,34 @@ export const accountFormSchema = [
     },
   },
   {
-    field: 'parentId',
-    label: '系统标签',
+    field: 'servicedesc',
+    label: '资源描述',
+    component: 'InputTextArea',
+    colProps: { span: 24 },
+    componentProps: {
+      maxLength: 255,
+      placeholder: '请输入备注',
+    },
+  },
+
+  {
+    field: 'thumbnail',
+    label: '缩略图',
+    slot: 'upload',
+    component: 'Input',
+    // componentProps: {
+    //   maxLength: 255,
+    // },
+  },
+  {
+    field: 'descinfo',
+    label: '',
+    slot: 'descinfo',
+    component: 'Input',
+  },
+  {
+    field: 'serviceType',
+    label: '资源类型',
     required: true,
     component: 'TreeSelect',
     colProps: { span: 12 },
@@ -131,181 +216,207 @@ export const accountFormSchema = [
       getPopupContainer: () => document.body,
     },
   },
-{
-  field: 'lymc',
-  label: '数据版本',
-  component: 'Input',
-  colProps: { span: 12 },
-  componentProps: {
-    placeholder: '请输入',
-  },
-},
-{
-  field: 'lymc',
-  label: '运行状态',
-  component: 'Input',
-  colProps: { span: 12 },
-  componentProps: {
-    placeholder: '请输入',
-  },
-},
-{
-  field: 'lymc',
-  label: '资源描述',
-  component: 'Input',
-  colProps: { span: 24 },
-  componentProps: {
-    placeholder: '请输入',
-  },
-},
-{
-  field: 'parentId',
-  label: '责任处室',
-  required: true,
-  component: 'TreeSelect',
-  colProps: { span: 12 },
-  componentProps: {
-    replaceFields: {
-      title: 'name',
-      key: 'id',
-      value: 'id',
+  {
+    field: 'coors',
+    label: '坐标系',
+    required: true,
+    component: 'TreeSelect',
+    colProps: { span: 12 },
+    componentProps: {
+      replaceFields: {
+        title: 'name',
+        key: 'id',
+        value: 'id',
+      },
+      maxTagCount: 10,
+      getPopupContainer: () => document.body,
     },
-    maxTagCount: 10,
-    getPopupContainer: () => document.body,
-  },
-},
-{
-  field: 'lymc',
-  label: '保管单位',
-  component: 'TreeSelect',
-  colProps: { span: 12 },
-  componentProps: {
-    replaceFields: {
-      title: 'name',
-      key: 'id',
-      value: 'id',
+  },
+  {
+    field: 'serviceAddr',
+    label: '服务地址',
+    component: 'Input',
+    colProps: { span: 24 },
+    componentProps: {
+      placeholder: '请输入服务地址',
     },
-    maxTagCount: 10,
-    getPopupContainer: () => document.body,
-  },
-},  {
-  field: 'lymc',
-  label: '密级',
-  component: 'TreeSelect',
-  colProps: { span: 12 },
-  componentProps: {
-    replaceFields: {
-      title: 'name',
-      key: 'id',
-      value: 'id',
+  },
+  {
+    field: 'dataRange',
+    label: '数据范围',
+    component: 'Input',
+    colProps: { span: 12 },
+    componentProps: {
+      placeholder: '请输入',
     },
-    maxTagCount: 10,
-    getPopupContainer: () => document.body,
-  },
-},  {
-  field: 'lymc',
-  label: '坐标系',
-  component: 'TreeSelect',
-  colProps: { span: 12 },
-  componentProps: {
-    replaceFields: {
-      title: 'name',
-      key: 'id',
-      value: 'id',
+  },
+  {
+    field: 'dataSource',
+    label: '数据来源',
+    component: 'Input',
+    colProps: { span: 12 },
+    componentProps: {
+      placeholder: '请输入',
     },
-    maxTagCount: 10,
-    getPopupContainer: () => document.body,
-  },
-},
-{
-  field: 'lymc',
-  label: '数据范围',
-  component: 'Input',
-  colProps: { span: 12 },
-  componentProps: {
-    placeholder: '请输入',
-  },
-},
-{
-  field: 'lymc',
-  label: '数据来源',
-  component: 'Input',
-  colProps: { span: 12 },
-  componentProps: {
-    placeholder: '请输入',
-  },
-},
-{
-  field: 'lymc',
-  label: 'EPSC CODE',
-  component: 'Input',
-  colProps: { span: 24 },
-  componentProps: {
-    placeholder: '请输入',
-  },
-},
-
-{
-  field: 'sjms',
-  label: '备注:',
-  component: 'InputTextArea',
-  colProps: { span: 24 },
-  componentProps: {
-    maxLength: 255,
-    placeholder: '请输入备注',
-  },
-},
+  },
+  {
+    field: 'classification',
+    label: '密级',
+    component: 'TreeSelect',
+    colProps: { span: 12 },
+    componentProps: {
+      replaceFields: {
+        title: 'name',
+        key: 'id',
+        value: 'id',
+      },
+      maxTagCount: 10,
+      getPopupContainer: () => document.body,
+    },
+  },
+  {
+    field: 'lymc',
+    label: '数据表',
+    component: 'Input',
+    colProps: { span: 12 },
+    componentProps: {
+      placeholder: '请输入数据表',
+    },
+  },
+  {
+    field: 'lymc',
+    label: '保管单位',
+    component: 'TreeSelect',
+    colProps: { span: 12 },
+    componentProps: {
+      replaceFields: {
+        title: 'name',
+        key: 'id',
+        value: 'id',
+      },
+      maxTagCount: 10,
+      getPopupContainer: () => document.body,
+    },
+  },
+  {
+    field: 'parentId',
+    label: '责任处室',
+    required: true,
+    component: 'TreeSelect',
+    colProps: { span: 12 },
+    componentProps: {
+      replaceFields: {
+        title: 'name',
+        key: 'id',
+        value: 'id',
+      },
+      maxTagCount: 10,
+      getPopupContainer: () => document.body,
+    },
+  },
+  {
+    field: 'publishdata',
+    label: '发布日期',
+    component: 'DatePicker',
+    colProps: { span: 12 },
+    dynamicDisabled:true,
+    componentProps: {
+      placeholder: '请输入',
+    },
+  },
 
-{
-  field: 'status',
-  label: "是否公开", //状态
-  component: 'RadioButtonGroup',
-  colProps: { span: 8 },
-  defaultValue: '0',
-  componentProps: {
-    options: [
-      { label: "是", value: '0' }, //启用
-      { label:"否", value: '1' }, //禁用
-    ],
-  },
-},
+  {
+    field: 'publisher',
+    label: '发布者',
+    component: 'Input',
+    colProps: { span: 12 },
+    dynamicDisabled:true,
+    componentProps: {
+      placeholder: '请输入',
+    },
+  },
+  {
+    field: 'updateWay',
+    label: '更新方式',
+    component: 'Input',
+    colProps: { span: 12 },
+    componentProps: {
+      placeholder: '请输入更新方式',
+    },
+  },
+  {
+    field: 'publishdata',
+    label: '更新日期',
+    component: 'DatePicker',
+    colProps: { span: 12 },
+    dynamicDisabled:true,
+    componentProps: {
+      placeholder: '请输入更新日期',
+    },
+  },
+  
+  {
+    field: 'epsgcode',
+    label: 'EPSC CODE',
+    component: 'Input',
+    colProps: { span: 12 },
+    componentProps: {
+      placeholder: '请输入EPSC CODE',
+    },
+  },
+  {
+    field: 'runstatus',
+    label: "运行状态", //状态
+    component: 'RadioButtonGroup',
+    colProps: { span: 12 },
+    defaultValue: '0',
+    componentProps: {
+      options: [
+        { label: "是", value: '0' }, //启用
+        { label: "否", value: '1' }, //禁用
+      ],
+    },
+  },
 
-{
-  field: 'status',
-  label: "是否共享", //状态
-  component: 'RadioButtonGroup',
-  colProps: { span: 8 },
-  defaultValue: '0',
-  componentProps: {
-    options: [
-      { label: "是", value: '0' }, //启用
-      { label:"否", value: '1' }, //禁用
-    ],
-  },
-},
+  {
+    field: 'status',
+    label: "是否公开", //状态
+    component: 'RadioButtonGroup',
+    colProps: { span: 8 },
+    defaultValue: '0',
+    componentProps: {
+      options: [
+        { label: "是", value: '0' }, //启用
+        { label: "否", value: '1' }, //禁用
+      ],
+    },
+  },
 
-{
-  field: 'status',
-  label: "是否展开", //状态
-  component: 'RadioButtonGroup',
-  colProps: { span: 8 },
-  defaultValue: '0',
-  componentProps: {
-    options: [
-      { label: "是", value: '0' }, //启用
-      { label:"否", value: '1' }, //禁用
-    ],
-  },
-},
+  {
+    field: 'status',
+    label: "是否共享", //状态
+    component: 'RadioButtonGroup',
+    colProps: { span: 8 },
+    defaultValue: '0',
+    componentProps: {
+      options: [
+        { label: "是", value: '0' }, //启用
+        { label: "否", value: '1' }, //禁用
+      ],
+    },
+  },
 
-{
-  field: 'file',
-  label: '上传附件',
-  slot: 'upload',
-  required: true,
-  component: 'Input',
-  // componentProps: {
-  //   maxLength: 255,
-  // },
-},
+  {
+    field: 'status',
+    label: "是否展开", //状态
+    component: 'RadioButtonGroup',
+    colProps: { span: 8 },
+    defaultValue: '0',
+    componentProps: {
+      options: [
+        { label: "是", value: '0' }, //启用
+        { label: "否", value: '1' }, //禁用
+      ],
+    },
+  },
 ]