ソースを参照

Merge branch 'main' of http://221.182.8.141:2300/sujunling/xld-gis-admin

XiaXxxxxx 2 年 前
コミット
06f97945f0

+ 13 - 0
index.html

@@ -15,6 +15,19 @@
   <title>空间数据管理平台</title>
   <link rel="icon" href="/favicon.ico" />
   <style>
+    #account:-webkit-autofill {
+      -webkit-text-fill-color: white !important;
+      background: transparent;
+      box-shadow: 10px 10px 10px 10px rgba(176, 122, 122, 0) !important;
+    }
+
+    #password:-webkit-autofill {
+      -webkit-text-fill-color: white !important;
+      background: transparent;
+      box-shadow: 10px 10px 10px 10px rgba(176, 122, 122, 0) !important;
+    }
+
+
     .vben-layout-menu-logo img {
       width: 22px !important;
       opacity: 0 !important;

+ 31 - 4
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-19 18:37:16
+ * @LastEditTime: 2023-09-20 15:34:53
  * @FilePath: \xld-gis-admin\src\api\resource\examine.ts
  * @Description: 流程配置信息api
  */
@@ -13,8 +13,8 @@ enum Api {
     SaveFlowInfo = '/base-center/flow/saveFlowInfo',        //新增、更新流程信息
     SaveFlowInfoAll = '/base-center/flow/insertFlowInfoAll', //新增流程、节点、节点人员信息
     DelFLowInfo = '/base-center/flow/deleteFlowInfo',    //删除流程
+    SelectLowConfig = '/base-center/flow/selectFlowInfoAll',  //查询流程、节点、节点人员信息
 }
-
 /**
  * @description: 查询流程信息
  * @param: page:页数              must
@@ -35,6 +35,29 @@ export const queryFlowInfo = (params) => {
     })
 };
 
+/**
+ * @description:根据流程业务id查询流程配置所有信息
+ * @param: ids:字符串数组
+*/
+export const queryFlowInfoById = (param) => {
+    const data = param.toString()
+    // const dataFrom = new FormData()
+    // dataFrom.append('',data)
+    return new Promise<void>((resolve) => {
+        defHttp.post({
+            url: Api.SelectLowConfig,
+            data,
+            headers: {
+                'Content-Type': 'application/json;charset=UTF-8'
+            },
+        }).then((res) => {
+            const result = (res.resp_code === 0 && res.datas.length > 0) ? res.datas[0] : null
+            resolve(result)
+        })
+    })
+}
+
+
 /**
  * @description: 一次提交流程配置信息
  * @param: flowInfo:流程信息              must
@@ -56,10 +79,14 @@ export const addFlowInfoAll = (params) => {
  * @param:  ids:流程信息id       must
  * 
  */
- export const delFlowInfo = (params) => {
+export const delFlowInfo = (params) => {
     const data = params.toString()
     return new Promise<void>((resolve) => {
-        defHttp.post({ url: Api.DelFLowInfo, data }).then((res) => {
+        defHttp.post({
+            url: Api.DelFLowInfo, data, headers: {
+                'Content-Type': 'application/json;charset=UTF-8'
+            },
+        }).then((res) => {
             resolve(res)
         })
     })

+ 13 - 7
src/views/assembly/index.vue

@@ -33,13 +33,18 @@ export default defineComponent({
     var assemblylist = ref([]);
     const action = ref(0)
     var assemblyType = ref({
-      '地图基础功能': [],
-      '底图和模型加载': [],
-      '覆盖物': [],
-      '测量工具': [],
-      '绘制工具': [],
-      '空间分析': [],
-      '天气特效': [],
+      // '地图基础功能': [],
+      // '底图和模型加载': [],
+      // '覆盖物': [],
+      // '测量工具': [],
+      // '绘制工具': [],
+      // '空间分析': [],
+      // '天气特效': [],
+      '地图浏览工具': [],
+      '服务加载工具': [],
+      'GIS功能工具': [],
+      '空间分析工具': [],
+      '三维可视化效果工具': [],
     })
     onMounted(() => {
       list().then(res => {
@@ -111,6 +116,7 @@ export default defineComponent({
   height: 40px;
   text-align: left;
   height: 40px;
+  margin: 0px 0px 14px 9px;
   background: #FFFFFF;
   cursor: pointer;
 }

+ 12 - 7
src/views/dataAdmin/assembly/SourceDetail.vue

@@ -178,13 +178,18 @@ export default defineComponent({
       fileList: [],
     });
     var assemblyType = ref([
-      { value: '地图基础功能' },
-      { value: '底图和模型加载' },
-      { value: '覆盖物' },
-      { value: '测量工具' },
-      { value: '绘制工具' },
-      { value: '空间分析' },
-      { value: '天气特效' },
+      // { value: '地图基础功能' },
+      // { value: '底图和模型加载' },
+      // { value: '覆盖物' },
+      // { value: '测量工具' },
+      // { value: '绘制工具' },
+      // { value: '空间分析' },
+      // { value: '天气特效' },
+      { value: '地图浏览工具' },
+      { value: '服务加载工具' },
+      { value: 'GIS功能工具' },
+      { value: '空间分析工具' },
+      { value: '三维可视化效果工具' },
     ])
 
     const formRef = ref();

+ 68 - 25
src/views/dataAdmin/dataAdmin/configProcess/AddProcess.vue

@@ -24,7 +24,7 @@
               <a-select
                 v-model:value="formState.type"
                 placeholder="请选择业务类型"
-                :disabled="getTitle === '查看流程配置'"
+                :disabled="optType !== 1"
                 @change="businessChange"
               >
                 <template v-for="item in dicBusiness" :key="item.value">
@@ -131,12 +131,14 @@ export default defineComponent({
     const formRef = ref();
     let show1 = ref(true);
     const isUpdate = ref(true);
+    const optType = ref(1);  //操作类型  1:新增,2:修改 3:查看
     const rowId = ref('');
+    const currVersion = ref(0);   //当前版本
     const postData = ref(null);
     const formState = reactive({
       type: '',
       name: '',
-      steps: ref([{ xh: 1, name: '', model: 'update', dept: [], user: [] }]),
+      steps: ref([{ xh: 1, name: '', model: 'update', dept: [], user: [],userList:[] }]),
     });
 
     const rules = {
@@ -149,8 +151,8 @@ export default defineComponent({
     const addStepForm = ref(null);
     const { createMessage } = useMessage();
 
-    onMounted(async () => {
-      //判断当前类型是否新增
+    onMounted(() => {
+      
     });
     const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
       labelWidth: 100,
@@ -165,16 +167,59 @@ export default defineComponent({
       await resetFields();
       setModalProps({ confirmLoading: false });
       isUpdate.value = !!data?.isUpdate;
-      if (unref(isUpdate)) {
-        postData.value = data?.record ? data?.record : null;
-        rowId.value = data.record.id;
-        setFieldsValue(data.record);
+      postData.value = data?.record ? data.record : null;
+      //修改
+      if (isUpdate.value) {
+        optType.value = 2;  //操作类型  1:新增,2:修改 3:查看
+        rowId.value = data.record.id; 
+        //setFieldsValue(data.record);
+        setFormdata()
+      }
+      else{
+        if(postData.value){    //查看
+          optType.value = 3;
+          //setFieldsValue(data.record);
+          setFormdata()
+        }
+        else{ //新增
+          optType.value = 1;
+          //初始化
+          clearFormData()
+        }
       }
     });
 
     const getTitle = computed(() =>
       !unref(isUpdate) ? (unref(postData) ? '查看流程配置' : '新增流程配置') : '编辑流程配置'
     );
+    /**
+     * 根据查询的接口数据设置表单数据
+    */
+    const setFormdata = async () => {
+      if(postData.value){
+        const flowInfo =  (postData.value as any).flowInfo
+        const flowNode =  (postData.value as any).flowNode
+        const flowNodePerson = (postData.value as any).flowNodePerson
+        currVersion.value = parseInt(flowInfo?.VERSION ? flowInfo?.VERSION : 0)   //获取当前本版
+        const dbs = dicBusiness.find(item=>item.label === flowInfo['FLOWNAME'])
+        formState.type = dbs? dbs.value : '0'
+        formState.name = flowInfo['FLOWNAME']
+        formState.steps = [{ xh: 1, name: flowInfo['FLOWNAME'], model: '1', dept: [], user: [],userList:[] }]
+        flowNode.map((item,index)=>{
+          const user = flowNodePerson.filter(fp=>item['ID']===fp['FLOWNODEID'])
+          formState.steps.push({
+            xh:index+2,
+            name:item['NODENAME'],
+            model: '1', 
+            dept: item['DEPTS'].split(','), 
+            user: user ? user.map(u=>{return u['USERID']}) : [],
+            userList:[]
+          })
+        })
+
+        currStep.value = formState.steps[0]
+      }
+    };
 
     /**
      * 提交数据
@@ -183,14 +228,14 @@ export default defineComponent({
       setModalProps({ confirmLoading: true });
       try {
         //校验当前界面是否数据完整
-        const flag = await addStepForm.value.validateForm();
+        const flag = await (addStepForm.value as any).validateForm();
         if (!flag) {
           return createMessage.warning('请填写必填数据');
         }
         formRef.value
           .validate()
           .then(() => {
-            const forms = toRaw(formState);
+            const forms = toRaw(formState) as any;
             if (forms.steps.value.length < 2) {
               createMessage.warning('请维护至少两个步骤');
               return;
@@ -238,6 +283,9 @@ export default defineComponent({
       currStep.value = row;
     };
 
+    /**
+     * 修改步骤
+    */
     const updateStep = (row) => {
       nextTick(() => {
         const obj = formState.steps.find((item) => item.xh === row.xh);
@@ -266,7 +314,6 @@ export default defineComponent({
     const businessChange = (value) => {
       const obj = dicBusiness.find((item) => item.value === value);
       if (obj) formState.steps[0].name = obj.label;
-      //console.log('业务类型改变',value,obj)
       currStep.value = formState.steps[0];
       if (obj) formState.name = obj.label;
     };
@@ -276,11 +323,7 @@ export default defineComponent({
      */
     const addProcess = async (fdata) => {
       const processInfo = formDataHandle(fdata) as any;
-      console.log('提交数据', processInfo, JSON.stringify(processInfo));
-      // const formData = new FormData();
-      // formData.append("flowInfo",processInfo.flowInfo)
-      // formData.append("flowNode",processInfo.flowNode);
-      // formData.append("flowNodePerson",processInfo.flowNodePerson);
+      //console.log('提交数据', processInfo);
       const res = (await addFlowInfoAll(processInfo)) as any;
       if (res && res.resp_code === 0) {
         closeModal();
@@ -298,14 +341,9 @@ export default defineComponent({
     */
     const clearFormData = () => {
       resetForm()
-      // formState = {
-      //   type: '',
-      //   name: '',
-      //   steps: [{ xh: 1, name: '', model: 'update', dept: [], user: [] }],
-      // };
       formState.type = ''
       formState.name = ''
-      formState.steps = [{ xh: 1, name: '', model: 'update', dept: [], user: [] }]
+      formState.steps = [{ xh: 1, name: '', model: 'update', dept: [], user: [],userList:[] }]
       currStep.value = null;
       (addStepForm.value as any)?.clearFormData()
     };
@@ -321,15 +359,15 @@ export default defineComponent({
         flowdiscription: '',
         flowname: formData.name,
         id: flowId,
+        version:optType.value === 1 ? 0 : currVersion.value + 1,
       };
-      console.log('流程信息', flowInfo);
       //排除第一个
       const steps = formData.steps.value.filter((step) => step.xh !== 1);
       //生成步骤结点id
       steps.forEach((item) => {
         item['id'] = getBuildUUID();
       });
-      console.log('新增步骤', steps);
+
       //流程结点数据
       let flowNode: Array<FlowNode> = [];
       //审核人数据
@@ -353,7 +391,7 @@ export default defineComponent({
           user['id'] = getBuildUUID();
         });
       });
-      console.log('生成审核人id', steps);
+
       //生成审核数据
       for (let i = 0; i < steps.length; i++) {
         const step = steps[i];
@@ -421,6 +459,7 @@ export default defineComponent({
     };
 
     const customRow = (record, index) => {
+      console.log(record, index)
       return {
         on: {
           // 鼠标单击行
@@ -435,6 +474,8 @@ export default defineComponent({
     };
 
     return {
+      optType,
+      currVersion,
       postData,
       formRef,
       formState,
@@ -457,7 +498,9 @@ export default defineComponent({
       businessChange,
       addProcess,
       formDataHandle,
+      setFormdata,
       clearFormData,
+      paramsToFormData,
     };
   },
 });

+ 34 - 26
src/views/dataAdmin/dataAdmin/configProcess/addStepForm.vue

@@ -2,7 +2,7 @@
  * @Author: tengmingxue 1473375109@qq.com
  * @Date: 2023-08-29 16:44:32
  * @LastEditors: tengmingxue 1473375109@qq.com
- * @LastEditTime: 2023-09-19 22:40:41
+ * @LastEditTime: 2023-09-21 09:17:05
  * @FilePath: \xld-gis-admin\src\views\dataAdmin\dataAdmin\configProcess\addStepForm.vue
  * @Description: 流程步骤配置表单
 -->
@@ -39,7 +39,11 @@
       :labelCol="{ span: 4 }"
       :wrapper-col="{ span: 12 }"
     >
-      <a-input v-model:value="formState.name" @change="stepInfoChange" :disabled="formState.xh === 1" />
+      <a-input
+        v-model:value="formState.name"
+        @change="stepInfoChange"
+        :disabled="formState.xh === 1"
+      />
     </a-form-item>
     <a-form-item
       v-if="formState.xh !== 1"
@@ -92,11 +96,10 @@
         v-model:value="formState.user"
         placeholder="请选择处理人员"
         mode="multiple"
-        @change="stepInfoChange"
         style="width: 100%"
       >
         <template v-for="user in handlers" :key="user.userid">
-          <a-select-option :value="user.userId">{{ user.userName }}</a-select-option>
+          <a-select-option :value="user['userId']">{{ user['userName'] }}</a-select-option>
         </template>
       </a-select>
     </a-form-item>
@@ -177,13 +180,8 @@ export default defineComponent({
 
     const treeData = ref([]);
 
-    const handlers = ref([
-      // { userId: '001', userName: '张三' },
-      // { userId: '002', userName: '王维' },
-      // { userId: '003', userName: '李白' },
-    ]);
+    const handlers = ref([]);
 
-    const userList = ref([]);
     let formState = ref({
       xh: 1,
       name: '',
@@ -210,24 +208,34 @@ export default defineComponent({
         formState.value.name = currStep.value?.name ? currStep.value?.name : '';
         formState.value.model = currStep.value?.model ? currStep.value?.model : '1';
         formState.value.dept = currStep.value?.dept ? currStep.value?.dept : [];
+        treeSelectChange(formState.value.dept, null, null);
         formState.value.user = currStep.value?.user ? currStep.value?.user : [];
+        //formState.value.userList =  currStep.value?.userList ? currStep.value?.userList : [];
+        //changeUserId(formState.value.user)
       }
     );
 
     watch(
       () => formState.value.user,
       (list) => {
-        formState.value.userList = [];
-        if(!list || list.length < 1) return;
-        list.map((item, index) => {
-          const obj = handlers.value.find((user) => user.userId === item);
-          if (obj) {
-            obj['xh'] = index + 1;
-            formState.value.userList.push(obj);
-          }
-        });
+        changeUserId(list)
       }
     );
+    /**
+     * 用户改变
+    */
+    const changeUserId = async(ids) => {
+      formState.value.userList = [];
+      if (!ids || ids.length < 1) return;
+      if(handlers.value.length === 0) await queryUsers(formState.value.dept)
+      ids.map((item, index) => {
+        const obj = handlers.value.find((user) => user['userId'] === item) as any;
+        if (obj) {
+          obj['xh'] = index + 1;
+          formState.value.userList.push(obj);
+        }
+      });
+    };
 
     /**
      * 信息内容改变
@@ -289,7 +297,7 @@ export default defineComponent({
      */
     const moveClick = (flag, row) => {
       //1、修改顺序
-      const obj = formState.value.userList.find((item) => item.xh === row.xh);
+      const obj = formState.value.userList.find((item) => item['xh'] === row.xh);
       const index = formState.value.userList.indexOf(obj);
       if (index < 0) return;
       const temp = cloneDeep(formState.value.userList[index]);
@@ -303,7 +311,7 @@ export default defineComponent({
     };
 
     const queryDept = async () => {
-      const res = await structureList();
+      const res = await structureList() as any;
       if (res && res.length > 0) {
         treeData.value = dealData(res);
       }
@@ -314,16 +322,16 @@ export default defineComponent({
     const queryUsers = async (nodeIds) => {
       const formData = new FormData();
       formData.append('depId', nodeIds.toString());
-      const res = await queryPersonByDepId(formData);
+      const res = await queryPersonByDepId(formData) as any;
       if (res && res.resp_code === 0) {
         //过滤userId不存在的
         handlers.value = res?.datas ? res?.datas : [];
-        handlers.value = handlers.value.filter((user) => user.userId != null);
+        handlers.value = handlers.value.filter((user) => user['userId'] != null);
       }
     };
 
-    const treeSelectChange = (nodeIds, nodeNames, nodes) => {
-      //console.log('选择部门',nodeIds,nodeNames,nodes)
+    const treeSelectChange = async (nodeIds, nodeNames, nodes) => {
+       console.log('选择部门',nodeIds,nodeNames,nodes)
       if (nodeIds.length > 0) queryUsers(nodeIds);
       else {
         handlers.value = [];
@@ -369,7 +377,6 @@ export default defineComponent({
       rules1,
       handlers,
       columns,
-      userList,
       stepEdit,
       currStep,
       validateForm,
@@ -377,6 +384,7 @@ export default defineComponent({
       moveClick,
       queryDept,
       queryUsers,
+      changeUserId,
       dealData,
       treeSelectChange,
       clearFormData,

+ 5 - 1
src/views/dataAdmin/dataAdmin/configProcess/configData.js

@@ -2,7 +2,7 @@
  * @Author: tengmingxue 1473375109@qq.com
  * @Date: 2023-08-28 21:12:52
  * @LastEditors: tengmingxue 1473375109@qq.com
- * @LastEditTime: 2023-09-19 16:14:21
+ * @LastEditTime: 2023-09-21 08:37:42
  * @FilePath: \xld-gis-admin\src\views\dataAdmin\dataAdmin\configProcess\configData.js
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -13,6 +13,10 @@ export const columns = [
     title: '流程业务',
     dataIndex: 'flowname',
   },
+  {
+    title: '本版',
+    dataIndex: 'version',
+  },
   {
     title: '启用状态',
     dataIndex: 'status',

+ 40 - 18
src/views/dataAdmin/dataAdmin/configProcess/index.vue

@@ -79,8 +79,9 @@ import { columns, searchFormSchema } from './configData';
 import { list } from '/@/api/resource/files';
 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
 import AddProcess from './AddProcess.vue';
+import { useMessage } from '/@/hooks/web/useMessage';
 import Moment from 'moment';
-import { queryFlowInfo,delFlowInfo } from '/@/api/resource/examine'
+import { queryFlowInfo, queryFlowInfoById, delFlowInfo } from '/@/api/resource/examine';
 
 export default defineComponent({
   name: 'configProcess',
@@ -94,6 +95,7 @@ export default defineComponent({
       editAuth: bottomAuthority + 'processEdit', //编辑权限控制
     };
     const moment = Moment;
+    const { createMessage } = useMessage();
     // 新增和编辑界面
     const [registerModal, { openModal: openModal }] = useModal();
     // 新增和编辑界面操作函数
@@ -105,7 +107,7 @@ export default defineComponent({
       // 表格题目
       title: '流程配置列表',
       // 分页查询请求函数
-      api: queryFlowInfo,//list,
+      api: queryFlowInfo, //list,
       // 表头
       columns,
       // 查询条件框配置
@@ -129,14 +131,12 @@ export default defineComponent({
       pagination: {
         hideOnSinglePage: false,
         page: 1,
-        pageSize:20,
+        pageSize: 20,
       },
     });
     //
     const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions, resetSelectedRowKeys } =
-      //useBatchDelete(delFileResource, handleSuccess, setProps);
       useBatchDelete(delFlowInfo, handleSuccess, setProps);
-    //
     selectionOptions.rowSelection.getCheckboxProps = (record) => {
       // Demo:status为1的选择框禁用 控制选择框勾选状态
       // if (record.status === 1) {
@@ -151,7 +151,7 @@ export default defineComponent({
 
     /**
      * 新增
-    */
+     */
     function addMethod() {
       openModal(true, {
         isUpdate: false,
@@ -160,31 +160,53 @@ export default defineComponent({
 
     /**
      * 查看
-    */
-    function handleView(record){
-      openModal(true, {
-        record,
-        isUpdate: false,
-      });
+     */
+    const handleView = async (record) => {
+      const result = await queryFlowInfoById([record.id]);
+      console.log('查询流程配置信息',result)
+      if (result) {
+        openModal(true, {
+          record:result,
+          isUpdate: false,
+        });
+      }
+      else{
+        createMessage.error('查询流程明细异常!请联系管理员处理')
+      }
     }
+
     /**
      * 编辑
-    */
-    function handleEdit(record) {
-      openModal(true, {
-        record,
-        isUpdate: true,
-      });
+     */
+    const handleEdit = async(record) => {
+      // openModal(true, {
+      //   record,
+      //   isUpdate: true,
+      // });
+
+      const result = await queryFlowInfoById([record.id]);
+      console.log('查询流程配置信息',result)
+      if (result) {
+        openModal(true, {
+          record:result,
+          isUpdate: true,
+        });
+      }
+      else{
+        createMessage.error('查询流程明细异常!请联系管理员处理')
+      }
     }
 
     function changeCheck(row) {
       //console.log(row);
     }
 
+
     return {
       moment,
       registerModal,
       authList,
+      createMessage,
       registerTable,
       addMethod,
       handleView,

ファイルの差分が大きいため隠しています
+ 1 - 1
target/dist/assets/app-antd-dark-theme-style.e3b0c442.css


ファイルの差分が大きいため隠しています
+ 2 - 2
target/dist/index.html


BIN
target/xld-gis-admin.zip