浏览代码

新增流程配置

tengmingxue 2 年之前
父节点
当前提交
45f2c85641

+ 33 - 3
src/api/resource/examine.ts

@@ -2,7 +2,7 @@
  * @Author: tengmingxue 1473375109@qq.com
  * @Date: 2023-09-11 19:36:34
  * @LastEditors: tengmingxue 1473375109@qq.com
- * @LastEditTime: 2023-09-21 14:51:09
+ * @LastEditTime: 2023-09-22 15:02:17
  * @FilePath: \xld-gis-admin\src\api\resource\examine.ts
  * @Description: 流程配置信息api
  */
@@ -26,7 +26,7 @@ export const queryFlowInfoPage = (params) => {
     params['rows'] = params?.pageSize ? params?.pageSize : 10
     return new Promise<void>((resolve) => {
         defHttp.post({ url: Api.SelectFlowInfo, params: params }).then((res) => {
-            const result = res.resp_code === 0 ? res.datas.pageData: []
+            const result = res.resp_code === 0 ? res.datas.pageData : []
             result.forEach(item => {
                 item['id'] = item['ID']
             });
@@ -64,7 +64,7 @@ export const queryFlowInfoById = (param) => {
  * @description:根据流程业务查询流程配置所有信息
  * @param: ids:字符串数组
 */
-export const queryFlowInfo = (params) => {
+export const queryFlowInfo = async(params) => {
     return new Promise<void>((resolve) => {
         defHttp.post({
             url: Api.SelectLowConfig,
@@ -113,3 +113,33 @@ export const delFlowInfo = (params) => {
         })
     })
 };
+
+/**
+ * 根据业务类型名称获取流程配置
+*/
+export const getFlowConfigByBusinessName = async (name) => {
+    return new Promise<void>(async(resolve) => {
+        const params = {
+            page:1,
+            pageSize:200,
+        }
+        const list = await queryFlowInfoPage(params)
+        let result = null
+        if(list.length > 0){
+            const obj = list.find(item=>item['FLOWNAME']===name)
+            if(obj){
+                const data = {
+                    flowInfo:{
+                        id:obj['ID']
+                    }
+                }
+                result = await queryFlowInfo(data)
+            }
+            else result = null
+        }
+        else{
+            result = null
+        }
+        resolve(result)
+    })
+}

+ 1 - 1
src/views/dataAdmin/dataAdmin/fileResourceUpload/AddMethod.vue

@@ -44,7 +44,7 @@
           </BasicForm>
         </a-tab-pane>
         <a-tab-pane key="2" tab="流程信息">
-          <FlowStep :flowTitle="'文件资源上传流程信息'" :flowCode="'20220523001'"></FlowStep>
+          <FlowStep :flowTitle="'文件资源上传'" :flowCode="'20220523001'"></FlowStep>
         </a-tab-pane>
       </a-tabs>
     </div>

+ 34 - 25
src/views/dataAdmin/dataAdmin/fileResourceUpload/fileUploadData.js

@@ -1,4 +1,4 @@
-import { serviceTags, serviceTypes, checkStatus } from '../sysDic'
+import { serviceTags, serviceTypes, checkStatus,EPSGCodes,sysCoors,secrets,respDept,collectDept } from '../sysDic'
 export const columns = [
   {
     title: '资源编号',
@@ -161,53 +161,54 @@ export const accountFormSchema = [
     },
   },
   {
-    field: 'parentId',
-    label: '责任处室',
-    required: true,
-    component: 'TreeSelect',
+    field: 'lymc',
+    label: '保管部门',
+    component: 'Select',
     colProps: { span: 12 },
     componentProps: {
       replaceFields: {
         title: 'name',
-        key: 'id',
-        value: 'id',
+        key: 'code',
+        value: 'code',
       },
       maxTagCount: 10,
-      getPopupContainer: () => document.body,
+      options:collectDept
     },
-  },
+  }, 
   {
-    field: 'lymc',
-    label: '保管单位',
-    component: 'TreeSelect',
+    field: 'parentId',
+    label: '责任科室',
+    required: true,
+    component: 'Select',
     colProps: { span: 12 },
     componentProps: {
       replaceFields: {
         title: 'name',
-        key: 'id',
-        value: 'id',
+        key: 'code',
+        value: 'code',
       },
       maxTagCount: 10,
-      getPopupContainer: () => document.body,
+      options:respDept
     },
-  }, {
+  },
+  {
     field: 'lymc',
     label: '密级',
-    component: 'TreeSelect',
+    component: 'lect',
     colProps: { span: 12 },
     componentProps: {
       replaceFields: {
         title: 'name',
-        key: 'id',
-        value: 'id',
+        key: 'code',
+        value: 'code',
       },
       maxTagCount: 10,
-      getPopupContainer: () => document.body,
+      options:secrets
     },
   }, {
     field: 'lymc',
     label: '坐标系',
-    component: 'TreeSelect',
+    component: 'Select',
     colProps: { span: 12 },
     componentProps: {
       replaceFields: {
@@ -216,7 +217,7 @@ export const accountFormSchema = [
         value: 'id',
       },
       maxTagCount: 10,
-      getPopupContainer: () => document.body,
+      options:sysCoors
     },
   },
   {
@@ -238,12 +239,20 @@ export const accountFormSchema = [
     },
   },
   {
-    field: 'lymc',
+    field: 'epsgcode',
     label: 'EPSC CODE',
-    component: 'Input',
+    required: true,
+    component: 'Select',
     colProps: { span: 24 },
     componentProps: {
-      placeholder: '请输入',
+      placeholder: '请输入EPSC CODE', 
+      replaceFields: {
+        title: 'name',
+        key: 'code',
+        value: 'code',
+      },
+      maxTagCount: 10,
+      options: EPSGCodes
     },
   },
 

+ 21 - 7
src/views/dataAdmin/dataAdmin/flowStep/handleLog.vue

@@ -2,7 +2,7 @@
  * @Author: tengmingxue 1473375109@qq.com
  * @Date: 2023-08-31 15:17:20
  * @LastEditors: tengmingxue 1473375109@qq.com
- * @LastEditTime: 2023-08-31 16:02:57
+ * @LastEditTime: 2023-09-22 17:18:58
  * @FilePath: \xld-gis-admin\src\views\dataAdmin\dataAdmin\flowStep\handleLog.vue
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 -->
@@ -33,27 +33,32 @@
   </div>
 </template>
   <script lang="ts">
-import { defineComponent, onBeforeMount } from 'vue';
+import { defineComponent, onBeforeMount,onMounted,ref,watch } from 'vue';
 import { BasicTable, useTable, TableAction } from '/@/components/Table';
 import { columns } from './table.data';
 import { RoleEnum } from '/@/enums/roleEnum';
 import { Authority } from '/@/components/Authority';
 import { useMessage } from '/@/hooks/web/useMessage';
 import { Switch, Popconfirm } from 'ant-design-vue';
-import { list } from '/@/api/resource/map';
-import Moment from 'moment';
 
+import Moment from 'moment';
+const props = {
+  flowStatus:{type:String,default:'1'}  //流程状态 1,新增  2 审核
+}
 export default defineComponent({
   name: 'RoleManagement',
   components: { BasicTable, TableAction, Authority, Switch, Popconfirm },
-  setup() {
+  props,
+  setup(props) {
+    const flowStatus = ref(props.flowStatus)
     const checkInfo = [
         {flowStep:'开始',handleDept:'发电组',handler:'张山',handlerTime:'2013-09-02 11:23:56',status:1,suggestion:'不按章程来',illustrate:'处理'},
         {flowStep:'审核1',handleDept:'发电组',handler:'张山',handlerTime:'2013-09-02 11:23:56',status:2,suggestion:'不按章程来',illustrate:'处理'}
     ]
+    const checkList = ref([]);
     const [registerTable] = useTable({
       //api: list,
-      dataSource:checkInfo,
+      dataSource:checkList,
       columns,
       useSearchForm: false,
       showTableSetting: false,
@@ -66,11 +71,20 @@ export default defineComponent({
     });
     const moment = Moment;
     const { createMessage } = useMessage();
-
+    watch(()=>props.flowStatus,(val)=>{
+      flowStatus.value = val
+      checkList.value = flowStatus.value === '1' ? [] : checkInfo as any;
+    })
+    onMounted(async () => {
+      checkList.value = flowStatus.value === '1' ? [] : checkInfo as any;
+    });
     onBeforeMount(async () => {});
 
     return {
       moment,
+      flowStatus,
+      checkInfo,
+      checkList,
       createMessage,
       registerTable,
       RoleEnum,

+ 106 - 46
src/views/dataAdmin/dataAdmin/flowStep/index.vue

@@ -2,13 +2,13 @@
  * @Author: tengmingxue 1473375109@qq.com
  * @Date: 2023-08-30 17:25:03
  * @LastEditors: tengmingxue 1473375109@qq.com
- * @LastEditTime: 2023-08-31 16:00:09
+ * @LastEditTime: 2023-09-22 17:21:45
  * @FilePath: \xld-gis-admin\src\views\dataAdmin\dataAdmin\flowStep\index.vue
  * @Description: 流程图表
 -->
 <template>
   <div class="flow-chart">
-    <div class="flow-title">{{ flowTitle }}</div>
+    <div class="flow-title">{{ flowTitle }}流程信息</div>
     <div class="flow-code">
       <span>流程编号:</span>
       <span>{{ flowCode }}</span>
@@ -42,7 +42,7 @@
               <!-- <div class="desc-step-name">{{ step.stepName }}</div> -->
               <div class="desc-handler">
                 <template v-for="user in step.handlers" :key="user.id">
-                  <span class="handler-name" :style="`background-color:${colors[user.status]};`">{{
+                  <span class="handler-name" :style="`background-color:${colors[user.status]};`" :title="user.handler">{{
                     user.handler
                   }}</span>
                 </template>
@@ -53,7 +53,7 @@
       </a-steps>
     </div>
     <div class="log-table">
-      <handle-log></handle-log>
+      <handle-log :flowStatus="flowStatus"></handle-log>
     </div>
   </div>
 </template>
@@ -68,18 +68,26 @@ import { columns, searchFormSchema } from './flowData';
 // 引入删除
 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
 import { message, Popconfirm } from 'ant-design-vue';
-import HandleLog from './handleLog.vue'
+import { useMessage } from '/@/hooks/web/useMessage';
+import HandleLog from './handleLog.vue';
+import { session } from '/@/utils/Memory.js';
+import { getFlowConfigByBusinessName } from '/@/api/resource/examine';
+import { getAccountList } from '/@/api/system/system';
 const props = {
   flowTitle: { type: String, require: true },
   flowCode: { type: String, default: '' },
+  flowStatus: { type: String, default: '1' }, //流程状态 1,新增  2 审核
 };
 export default defineComponent({
-  components: { BasicTable, Authority, Popconfirm, TableAction,HandleLog },
+  components: { BasicTable, Authority, Popconfirm, TableAction, HandleLog },
   props,
   setup(props, { emit }) {
     const data = reactive({
       flowTitle: ref(props.flowTitle),
       flowCode: ref(props.flowCode),
+      flowName: props.flowTitle,
+      flowStatus: props.flowStatus, //流程状态 1,新增  2 审核
+      sysUserInfo: {},
       legends: [
         { key: 1, name: '已完成', color: '#67C23A' },
         { key: 2, name: '进行中', color: '#2D74E7' },
@@ -90,54 +98,106 @@ export default defineComponent({
       status: ['wait', 'finish', 'process', 'back'],
       steps: [
         //status 1:已完成,2:进行中,3:驳回,0:未开始
+        // {
+        //   xh: 1,
+        //   stepName: '地图资源上传',
+        //   handlers: [{ handler: '张三', id: '1', status: '1' }],
+        //   status: '1',
+        // },
+        // { xh: 6, stepName: '完成', handlers: [], status: '0' },
+      ],
+    });
+    const { createMessage } = useMessage();
+    /**
+     * 获取系统人员信息,并存为字典
+     */
+    const queryAllUserInfos = async () => {
+      const res = await getAccountList({ page: 1, pageSize: 999 });
+      if (res) {
+        res.items.map((item) => {
+          data.sysUserInfo[item['EMPLOYEE_ID']] = item['NAME'];
+        });
+      }
+      console.log('人员信息',data.sysUserInfo)
+    };
+    const queryData = async () => {
+      const res = await getFlowConfigByBusinessName(data.flowName);
+      console.log('地图资源上传配置信息', res);
+      if (res) {
+        setFlowNodes(res);
+      } else {
+        createMessage.error(`获取流程【${data.flowName}】配置信息异常!请联系管理员检查!`);
+      }
+    };
+
+    const setFlowNodes = (flow) => {
+      if (!flow?.flowInfo || !flow?.flowNode || !flow?.flowNodePerson) {
+        createMessage.error(`获取流程【${data.flowName}】配置信息异常!请联系管理员检查!`);
+        return;
+      }
+      if (flow?.flowNode.length === 0) {
+        createMessage.error(`流程【${data.flowName}】未配置审核步骤!请联系管理员配置!`);
+        return;
+      }
+      const user = session.getItem('userInfo');
+      data.steps = [
         {
-          xh: '1',
-          stepName: '地图资源上传',
-          handlers: [{ handler: '张三', id: '1', status: '1' }],
-          status: '1',
-        },
-        {
-          xh: '2',
-          stepName: '审核1',
-          handlers: [
-            { handler: '张三', id: '1', status: '1' },
-            { handler: '李斯', id: '2', status: '1' },
-          ],
-          status: '1',
-        },
-        {
-          xh: '3',
-          stepName: '审核2',
-          handlers: [
-            { handler: '张三', id: '1', status: '1' },
-            { handler: '李斯', id: '2', status: '2' },
-          ],
-          status: '2',
-        },
-        {
-          xh: '4',
-          stepName: '审核3',
-          handlers: [{ handler: '张三', id: '1', status: '3' }],
-          status: '3',
-        },
-        {
-          xh: '5',
-          stepName: '审核4',
+          xh: 0,
+          stepName: flow.flowInfo['FLOWNAME'],
           handlers: [
-            { handler: '张三', id: '1', status: '0' },
-            { handler: '李斯', id: '2', status: '0' },
+            { handler: user['EMPLOYEE']['NAME'], id: user['EMPLOYEE']['EMPLOYEE_ID'], status: '1' },
           ],
-          status: '0',
+          status: '1', //status 1:已完成,2:进行中,3:驳回,0:未开始
         },
-        { xh: '6', stepName: '完成', handlers: [], status: '0' },
-      ],
-    });
+      ];
+      const step = getFlowNodes(flow.flowNode, flow.flowNodePerson);
+      if(step) data.steps.push(...step)
+      const length = step.length
+      //最后一步默认完成
+      data.steps.push({ xh: length+2, stepName: '完成', handlers: [], status: '0' })
+    };
+
+    const getFlowNodes = (flowNode, flowNodePerson) => {
+      let index = 1;
+      let steps = [];
+      function getNextNode(nodes, id) {
+        const node = flowNode.find((item) => item['PRENODEID'] === id);
+        if (node) {
+          const eximPersons = flowNodePerson.filter((item) => item['FLOWNODEID'] === node['ID']);
+          let handlers = [];
+          eximPersons.map((item) => {
+            handlers.push({
+              handler: data.sysUserInfo[item['USERID']],
+              id: item['USERID'],
+              status: '0',
+            });
+          });
+          steps.push({
+            xh: (index = index + 1),
+            stepName: node['NODENAME'],
+            handlers: handlers,
+            status: '0',
+          });
+          getNextNode(nodes, node['ID']);   //递归
+        }
+        else return false;
+      }
+      getNextNode(flowNode,'')
+      return steps
+    };
 
     // 生命周期函数
-    onMounted(() => {});
+    onMounted(() => {
+      queryAllUserInfos();
+      queryData();
+    });
 
     return {
       ...toRefs(data),
+      createMessage,
+      queryData,
+      setFlowNodes,
+      getFlowNodes,
     };
   },
 });
@@ -262,7 +322,7 @@ export default defineComponent({
     }
   }
 
-  .log-table{
+  .log-table {
     height: calc(100% - 374px);
   }
 }

+ 2 - 2
src/views/dataAdmin/dataAdmin/mapUpload/MapSourceModal.vue

@@ -2,7 +2,7 @@
  * @Author: tengmingxue 1473375109@qq.com
  * @Date: 2023-08-15 16:19:10
  * @LastEditors: tengmingxue 1473375109@qq.com
- * @LastEditTime: 2023-08-31 15:30:13
+ * @LastEditTime: 2023-09-22 17:21:08
  * @FilePath: \xld-gis-admin\src\views\resource\map\MapSourceModal.vue
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 -->
@@ -21,7 +21,7 @@
           <source-detail ref="refSourceDetail" @RtnMain="RtnMain" :formData="formData" :isUpdate="isUpdate" :isView="isView"></source-detail>
         </a-tab-pane>
         <a-tab-pane key="2" tab="流程信息">
-          <FlowStep :flowTitle="'地图资源上传流程信息'" :flowCode="'20220523001'"></FlowStep>
+          <FlowStep :flowTitle="'地图资源上传'" :flowCode="'20220523001'"></FlowStep>
         </a-tab-pane>
       </a-tabs>
     </div>

+ 25 - 4
src/views/dataAdmin/dataAdmin/mapUpload/SourceDetail.vue

@@ -2,7 +2,7 @@
  * @Author: tengmingxue 1473375109@qq.com
  * @Date: 2023-08-15 22:08:21
  * @LastEditors: tengmingxue 1473375109@qq.com
- * @LastEditTime: 2023-09-21 17:58:43
+ * @LastEditTime: 2023-09-22 19:05:39
  * @FilePath: \xld-gis-admin\src\views\resource\map\SourceDetail.vue
  * @Description: 地图资源明细界面
 -->
@@ -138,7 +138,7 @@
           </a-col>
 
           <a-col :span="12" class="form-col">
-            <a-form-item ref="collect" label="保管单位" name="collect" class="label-form-item">
+            <a-form-item ref="collect" label="管理部门" name="collect" class="label-form-item">
               <a-select v-model:value="formState.collect" :disabled="isView">
                 <template v-for="tag in collectDept" :key="tag.code">
                   <a-select-option :value="tag.code">{{ tag.name }}</a-select-option>
@@ -147,7 +147,7 @@
             </a-form-item>
           </a-col>
           <a-col :span="12" class="form-col">
-            <a-form-item ref="respUnit" label="责任室" name="respUnit" class="label-form-item">
+            <a-form-item ref="respUnit" label="责任室" name="respUnit" class="label-form-item">
               <a-select v-model:value="formState.respUnit" :disabled="isView">
                 <template v-for="tag in respDept" :key="tag.code">
                   <a-select-option :value="tag.code">{{ tag.name }}</a-select-option>
@@ -275,6 +275,17 @@
               />
             </a-form-item>
           </a-col>
+
+          <a-col :span="6" class="form-col">
+            <a-form-item ref="searched" label="立即发起审核" name="searched" class="label-form-item">
+              <a-switch
+                checked-children=""
+                un-checked-children=""
+                v-model:checked="formState.searched"
+                :disabled="isView"
+              />
+            </a-form-item>
+          </a-col>
         </a-row>
       </div>
     </a-form>
@@ -345,6 +356,7 @@ interface FormState {
   searched: boolean;
   externalApply: boolean;
   date1: undefined;
+  immExaim: boolean;  //是否立即发起审核
 }
 export default defineComponent({
   name: 'SourceDetail',
@@ -391,6 +403,7 @@ export default defineComponent({
       searched: true,
       externalApply: true,
       date1: undefined,
+      immExaim:true,
     });
     const moment = Moment;
     const rules = {
@@ -458,7 +471,15 @@ export default defineComponent({
                 } else createMessage.error('修改地图资源失败!,失败原因:' + res?.message, 1);
               } else {
                 const res = await insertService(params);
-                if (res && res?.status !== '-1') {
+                debugger
+                if (res && res?.status === '0') {
+                  //立即发起审核
+                  if(formState.immExaim){
+                    const result = JSON.parse(res['result'])
+                    console.log('发起流程审核工作',result)
+                    const serviceid = result.sucList[0].servicebase.serviceid
+                    console.log('业务id',serviceid)
+                  }
                   createMessage.success('新增地图资源成功!');
                   resetForm();
                   emit('RtnMain', true);

+ 14 - 0
src/views/dataAdmin/dataAdmin/mapUpload/index.vue

@@ -33,6 +33,12 @@
             color: 'warning',
             onClick: handleEdit.bind(null, record),
           },
+          {
+            label: '审核',
+            icon: '',
+            color: 'warning',
+            onClick: handleExam.bind(null, record),
+          },
           {
             label: '删除',
             icon: '' /**ant-design:delete-outlined'*/,
@@ -171,6 +177,13 @@ export default defineComponent({
       });
     }
 
+    function handleExam(record: Recordable){
+      openModal(true, {
+        record,
+        isUpdate: true,
+      });
+    }
+
     function handleViewMap(record: Recordable) {
       window.open(`http://106.12.170.138:8080/onemapV5.0/mapview.html?${record.serviceid}`, 'target', "")
     }
@@ -230,6 +243,7 @@ export default defineComponent({
       handleViewMap,
       handleEdit,
       handleView,
+      handleExam,
       handleDelete,
       handleSuccess,
       RoleEnum,

+ 2 - 10
src/views/dataAdmin/dataAdmin/sceneResourceUpload/AddMethod.vue

@@ -42,14 +42,6 @@
       <a-tabs v-model:activeKey="activeKey" class="res-a-tabs">
         <a-tab-pane key="1" tab="场景资源信息">
           <BasicForm @register="registerForm">
-            <!-- <template #title>
-              <div class="text-center text-black text-2xl">
-                <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>
-              </div>
-            </template> -->
             <template #basicinfo>
               <div class="basic-info-title">基础信息</div>
             </template>
@@ -72,7 +64,7 @@
           </BasicForm>
         </a-tab-pane>
         <a-tab-pane key="2" tab="流程信息">
-          <FlowStep :flowTitle="'场景资源上传流程信息'" :flowCode="'20220523001'"></FlowStep>
+          <FlowStep :flowTitle="'场景资源上传'" :flowCode="'20220523001'"></FlowStep>
         </a-tab-pane>
       </a-tabs>
     </div>
@@ -124,7 +116,7 @@ export default defineComponent({
       });
     };
     onMounted(async () => {
-      await getRoleList();
+      //await getRoleList();   //这个会导致查询失败
     });
 
     const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({

+ 81 - 61
src/views/dataAdmin/dataAdmin/sceneResourceUpload/sceneUploadData.js

@@ -1,3 +1,13 @@
+import {
+  serviceTypes,
+  serviceTags,
+  secrets,
+  sysCoors,
+  respDept,
+  collectDept,
+  EPSGCodes,
+} from '../sysDic';
+
 export const columns = [
   {
     title: '资源编号',
@@ -117,7 +127,7 @@ export const accountFormSchema = [
     },
   },
   {
-    field: 'serviceName',
+    field: 'servicename',
     label: '资源名称',
     required: true,
     component: 'Input',
@@ -127,7 +137,7 @@ export const accountFormSchema = [
     },
   },
   {
-    field: 'serviceAliasName',
+    field: 'servicealiasname',
     label: '资源别名',
     required: true,
     component: 'Input',
@@ -153,23 +163,23 @@ export const accountFormSchema = [
   //   },
   // },
   {
-    field: 'sysTag',
+    field: 'keywords',
     label: '系统标签',
     required: true,
-    component: 'TreeSelect',
+    component: 'Select',
     colProps: { span: 12 },
     componentProps: {
       replaceFields: {
-        title: 'name',
-        key: 'id',
-        value: 'id',
+        title: 'label',
+        key: 'value',
+        value: 'value',
       },
       maxTagCount: 10,
-      getPopupContainer: () => document.body,
+      options:serviceTags
     },
   },
   {
-    field: 'servicedesc',
+    field: 'description',
     label: '资源描述',
     component: 'InputTextArea',
     colProps: { span: 24 },
@@ -195,39 +205,39 @@ export const accountFormSchema = [
     component: 'Input',
   },
   {
-    field: 'serviceType',
+    field: 'servicetype',
     label: '资源类型',
     required: true,
-    component: 'TreeSelect',
+    component: 'Select',
     colProps: { span: 12 },
     componentProps: {
       replaceFields: {
-        title: 'name',
-        key: 'id',
-        value: 'id',
+        title: 'label',
+        key: 'value',
+        value: 'value',
       },
       maxTagCount: 10,
-      getPopupContainer: () => document.body,
+      options: serviceTypes
     },
   },
   {
-    field: 'coors',
+    field: 'crs',
     label: '坐标系',
     required: true,
-    component: 'TreeSelect',
+    component: 'Select',
     colProps: { span: 12 },
     componentProps: {
       replaceFields: {
-        title: 'name',
-        key: 'id',
-        value: 'id',
+        title: 'label',
+        key: 'value',
+        value: 'value',
       },
-      maxTagCount: 10,
-      getPopupContainer: () => document.body,
+      maxTagCount: 100,
+      options:sysCoors
     },
   },
   {
-    field: 'serviceAddr',
+    field: 'mapingurl',
     label: '服务地址',
     component: 'Input',
     colProps: { span: 24 },
@@ -236,7 +246,7 @@ export const accountFormSchema = [
     },
   },
   {
-    field: 'dataRange',
+    field: 'dataScope',
     label: '数据范围',
     component: 'Input',
     colProps: { span: 12 },
@@ -245,7 +255,7 @@ export const accountFormSchema = [
     },
   },
   {
-    field: 'dataSource',
+    field: 'source',
     label: '数据来源',
     component: 'Input',
     colProps: { span: 12 },
@@ -254,58 +264,60 @@ export const accountFormSchema = [
     },
   },
   {
-    field: 'classification',
+    field: 'secretlevel',
     label: '密级',
-    component: 'TreeSelect',
+    component: 'Select',
     colProps: { span: 12 },
     componentProps: {
       replaceFields: {
-        title: 'name',
-        key: 'id',
-        value: 'id',
+        title: 'label',
+        key: 'value',
+        value: 'value',
       },
       maxTagCount: 10,
-      getPopupContainer: () => document.body,
-    },
-  },
-  {
-    field: 'lymc',
-    label: '数据表',
-    component: 'Input',
-    colProps: { span: 12 },
-    componentProps: {
-      placeholder: '请输入数据表',
+      options:secrets
     },
   },
+  // {
+  //   field: 'lymc',
+  //   label: '数据表',
+  //   component: 'Input',
+  //   colProps: { span: 12 },
+  //   componentProps: {
+  //     placeholder: '请输入数据表',
+  //   },
+  // },
   {
-    field: 'lymc',
-    label: '保管单位',
-    component: 'TreeSelect',
+    field: 'keepingunit',
+    label: '管理部门',
+    component: 'Select',
     colProps: { span: 12 },
     componentProps: {
       replaceFields: {
-        title: 'name',
-        key: 'id',
-        value: 'id',
+        title: 'label',
+        key: 'value',
+        value: 'value',
       },
       maxTagCount: 10,
       getPopupContainer: () => document.body,
+      options:collectDept,
     },
   },
   {
-    field: 'parentId',
-    label: '责任室',
+    field: 'rboffice',
+    label: '责任室',
     required: true,
-    component: 'TreeSelect',
+    component: 'Select',
     colProps: { span: 12 },
     componentProps: {
       replaceFields: {
-        title: 'name',
-        key: 'id',
-        value: 'id',
+        title: 'label',
+        key: 'value',
+        value: 'value',
       },
       maxTagCount: 10,
       getPopupContainer: () => document.body,
+      options:respDept
     },
   },
   {
@@ -330,7 +342,7 @@ export const accountFormSchema = [
     },
   },
   {
-    field: 'updateWay',
+    field: 'updateType',
     label: '更新方式',
     component: 'Input',
     colProps: { span: 12 },
@@ -348,18 +360,26 @@ export const accountFormSchema = [
       placeholder: '请输入更新日期',
     },
   },
-  
+
   {
-    field: 'epsgcode',
+    field: 'epsgCode',
     label: 'EPSC CODE',
-    component: 'Input',
+    required: true,
+    component: 'Select',
     colProps: { span: 12 },
     componentProps: {
-      placeholder: '请输入EPSC CODE',
+      placeholder: '请输入EPSC CODE', 
+      replaceFields: {
+        title: 'label',
+        key: 'value',
+        value: 'value',
+      },
+      maxTagCount: 99,
+      options: EPSGCodes
     },
   },
   {
-    field: 'runstatus',
+    field: 'runtimestatus',
     label: "运行状态", //状态
     component: 'RadioButtonGroup',
     colProps: { span: 12 },
@@ -373,7 +393,7 @@ export const accountFormSchema = [
   },
 
   {
-    field: 'status',
+    field: 'ispublic',
     label: "是否公开", //状态
     component: 'RadioButtonGroup',
     colProps: { span: 8 },
@@ -387,7 +407,7 @@ export const accountFormSchema = [
   },
 
   {
-    field: 'status',
+    field: 'searched',
     label: "是否共享", //状态
     component: 'RadioButtonGroup',
     colProps: { span: 8 },
@@ -401,7 +421,7 @@ export const accountFormSchema = [
   },
 
   {
-    field: 'status',
+    field: 'isShow',
     label: "是否展开", //状态
     component: 'RadioButtonGroup',
     colProps: { span: 8 },

+ 40 - 10
src/views/dataAdmin/dataAdmin/sysDic.ts

@@ -2,11 +2,11 @@
  * @Author: tengmingxue 1473375109@qq.com
  * @Date: 2023-08-28 13:46:21
  * @LastEditors: tengmingxue 1473375109@qq.com
- * @LastEditTime: 2023-08-28 21:53:01
+ * @LastEditTime: 2023-09-22 22:49:55
  * @FilePath: \xld-gis-admin\src\views\dataAdmin\dataAdmin\sysDic.ts
  * @Description: 系统字典
  */
-import { getServiceTypes,queryServiceTags,queryDicsByName,queryCoors } from '/@/api/resource/map';
+import { getServiceTypes, queryServiceTags, queryDicsByName, queryCoors } from '/@/api/resource/map';
 
 const resTag = await queryServiceTags()
 let listTag = []
@@ -16,25 +16,41 @@ resTag.map(item => {
     value: item.code
   })
 })
+export const serviceTags = listTag;
 /**
  * 密级字典
 */
-export const secrets = await queryDicsByName('密级')
+const restSecretList = await queryDicsByName('密级')
+let secretList = []
+restSecretList.map(item=>{
+  secretList.push({...item,...{label:item.name,value:item.code}})
+})
+export const secrets = secretList;
+console.log('secrets',secrets)
 /**
  * 服务标签
 */
-export const serviceTags = listTag;
 /**
  * 坐标系列表
 */
-export const sysCoors = await queryCoors()
+const coors = await queryCoors()
+let coorList = []
+coors.map(item => {
+  coorList.push({
+    label: item.GEOMNAME,
+    value: item.GEOMTITLE,
+    GEOMNAME:item.GEOMNAME,
+    GEOMTITLE:item.GEOMTITLE,
+  })
+})
+export const sysCoors = coorList
 /**
  * 服务类型
 */
 const resTypes = await getServiceTypes()
 let listType = []
 resTypes.map(item => {
-    listType.push({
+  listType.push({
     label: item.name,
     value: item.id
   })
@@ -43,17 +59,31 @@ export const serviceTypes = listType
 /**
  * 责任处室
 */
-export const respDept = await queryDicsByName('责任处室')
+const respDepts = await queryDicsByName('责任科室')
+let respList = []
+respDepts.map(item => {
+  respList.push({...item,...{label:item.name,value:item.code}})
+})
+export const respDept = respList
 
 /**
  * 保管单位
 */
-export const collectDept = await queryDicsByName('保管单位')
+const collects = await queryDicsByName('管理部门')
+let collectList = []
+collects.map(item => {
+  collectList.push({...item,...{label:item.name,value:item.code}})
+})
+export const collectDept = collectList
 /**
  * EPSG code
 */
-export const EPSGCodes = await queryDicsByName('EPSG code')
-
+export const ECodes = await queryDicsByName('EPSG code')
+let epsgList = []
+ECodes.map(item => {
+  epsgList.push({...item,...{label:item.name,value:item.code}})
+})
+export const EPSGCodes = epsgList
 
 export const checkStatus = [
   { label: '未提交', value: 1 },