Kaynağa Gözat

修改流程相关功能

tengmingxue 2 yıl önce
ebeveyn
işleme
9978ae9448

+ 54 - 29
src/views/dataAdmin/dataAdmin/fileResourceUpload/AddMethod.vue

@@ -7,36 +7,46 @@
     @ok="handleSubmit"
     :useWrapper="true"
     :minHeight="500"
+    :maxHeight="600"
   >
     <div style="height: 50vh">
-      <div class="text-center text-black text-2xl">
-        <!-- <a-typography-title style="font-size: 16px;">流域基础信息</a-typography-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" @click="menuClick">
           <a-menu-item key="mail1"> 基础信息 </a-menu-item>
           <a-menu-item key="mail2"> 版本信息 </a-menu-item>
         </a-menu>
-      </div>
-      <BasicForm @register="registerForm" v-if="show1">
-        <template #upload>
-          <a-upload
-            name="file"
-            :multiple="true"
-            :fileList="fileList"
-            action=""
-            :showUploadList="true"
-            :customRequest="()=>{}"
-          >
-            <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-upload>
-        </template>
-      </BasicForm>
-      <upload-file-list :fileList="fileList"></upload-file-list>
+      </div> -->
+      <a-tabs v-model:activeKey="activeKey" class="res-a-tabs">
+        <a-tab-pane key="1" tab="基本信息">
+          <BasicForm @register="registerForm" v-if="show1">
+            <template #upload>
+              <a-upload
+                name="file"
+                :multiple="true"
+                :fileList="fileList"
+                action=""
+                :showUploadList="true"
+                :customRequest="() => {}"
+              >
+                <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-upload>
+            </template>
+            <template #upload-table>
+              <upload-file-list :fileList="fileList"></upload-file-list>
+            </template>
+          </BasicForm>
+        </a-tab-pane>
+        <a-tab-pane key="2" tab="流程信息">
+          <FlowStep :flowTitle="'文件资源上传流程信息'" :flowCode="'20220523001'"></FlowStep>
+        </a-tab-pane>
+      </a-tabs>
     </div>
   </BasicModal>
 </template>
@@ -52,6 +62,7 @@ import { TOption } from '/@/views/rule/linkedge/config/config.data';
 import { PlusOutlined } from '@ant-design/icons-vue';
 import { addFileResource } from '../../api/fileUploadApi';
 import UploadFileList from './uploadFileList.vue';
+import FlowStep from '../flowStep/index.vue';
 
 export default defineComponent({
   name: 'AccountModal',
@@ -61,10 +72,12 @@ export default defineComponent({
     Upload,
     PlusOutlined,
     UploadFileList,
+    FlowStep,
   },
   emits: ['success', 'register'],
   setup(_, { emit }) {
     let show1 = ref(true);
+    const activeKey = ref('1');
     const current = ref(['mail1']);
     const tenantLogo = ref('');
     const loading = ref(false);
@@ -95,9 +108,12 @@ export default defineComponent({
     });
     const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
 
-    watch(()=>fileList, (op) => {
-      console.log('文件改变', op);
-    });
+    watch(
+      () => fileList,
+      (op) => {
+        console.log('文件改变', op);
+      }
+    );
     async function handleSubmit() {
       setModalProps({ confirmLoading: true });
       try {
@@ -166,17 +182,18 @@ export default defineComponent({
     }
 
     // 菜单点击事件
-    const menuClick = (value) => {
-      console.log('canshu1111' + JSON.stringify(value));
+    const menuClick = async (value) => {
       if (value.key == 'mail1') {
         show1.value = true;
       } else {
         show1.value = false;
       }
+      await resetFields();
     };
 
     return {
       current,
+      activeKey,
       registerModal,
       registerForm,
       handleSubmit,
@@ -205,4 +222,12 @@ export default defineComponent({
 :deep(.is-flod) {
   display: none !important;
 }
+
+:deep(.ant-menu-item-selected) {
+  background: #ffffff !important;
+  color: #231e1e !important;
+  height: 46px !important;
+  border-radius: 35px !important;
+  line-height: 46px !important;
+}
 </style>

+ 45 - 1
src/views/dataAdmin/dataAdmin/fileResourceUpload/fileUploadData.js

@@ -299,7 +299,6 @@ export const accountFormSchema = [
       ],
     },
   },
-
   {
     field: 'file',
     label: '上传附件',
@@ -310,6 +309,51 @@ export const accountFormSchema = [
     //   maxLength: 255,
     // },
   },
+
+  {
+    field: 'fileList',
+    label: '',
+    slot: 'upload-table',
+    required: false,
+    component: 'Input',
+  },
+  {
+    field: 'version',
+    label: '版本',
+    component: 'TreeSelect',
+    colProps: { span: 24 },
+    componentProps: {
+      replaceFields: {
+        title: 'name',
+        key: 'id',
+        value: 'id',
+      },
+      maxTagCount: 10,
+      getPopupContainer: () => document.body,
+    },
+  },
+  {
+    field: 'versionCode',
+    label: '版本号',
+    component: 'Input',
+    colProps: { span: 24 },
+    componentProps: {
+      placeholder: '请输入版本号',
+    },
+  },
+  {
+    field: 'isnew',
+    label: "是否最新版本", //状态
+    component: 'RadioButtonGroup',
+    colProps: { span: 24 },
+    defaultValue: '0',
+    componentProps: {
+      options: [
+        { label: "是", value: '0' },
+        { label: "否", value: '1' },
+      ],
+    },
+  },
 ]
 
 

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

@@ -1,5 +1,5 @@
 <template>
-  <a-table :columns="columns" :dataSource="dataSource" bordered :customRow="rowClick">
+  <a-table :columns="columns" :dataSource="dataSource" bordered :customRow="rowClick" :pagination="false">
     <template v-for="col in ['scode', 'sname']" #[col]="{ text, record }" :key="col">
       <span>
         <a-input

+ 87 - 0
src/views/dataAdmin/dataAdmin/flowStep/handleLog.vue

@@ -0,0 +1,87 @@
+<!--
+ * @Author: tengmingxue 1473375109@qq.com
+ * @Date: 2023-08-31 15:17:20
+ * @LastEditors: tengmingxue 1473375109@qq.com
+ * @LastEditTime: 2023-08-31 16:02:57
+ * @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
+-->
+<template>
+  <div class="handle-log-table">
+    <BasicTable @register="registerTable" :clickToRowSelect="false">
+      <template #pdate="{ record }">
+        <Tag :color="'red'">
+          {{ record.handlerTime ? moment(record.handlerTime).format('YYYY-MM-DD HH:mm:ss') : '' }}
+        </Tag>
+      </template>
+      <template #status="{ record }">
+        <Tag :style="`color:${record.status === 3 || record.status === 3 ? 'red' : '#05B069'};`">
+          {{
+            record.status === 0
+              ? '待审核'
+              : record.status === 1
+              ? '审核通过'
+              : record.status === 2
+              ? '审核不通过'
+              : record.status === 3
+              ? '被驳回'
+              : '未提交'
+          }}
+        </Tag>
+      </template>
+    </BasicTable>
+  </div>
+</template>
+  <script lang="ts">
+import { defineComponent, onBeforeMount } 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';
+
+export default defineComponent({
+  name: 'RoleManagement',
+  components: { BasicTable, TableAction, Authority, Switch, Popconfirm },
+  setup() {
+    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 [registerTable] = useTable({
+      //api: list,
+      dataSource:checkInfo,
+      columns,
+      useSearchForm: false,
+      showTableSetting: false,
+      bordered: true,
+      showIndexColumn: true,
+      pagination:false,
+    //   pagination: {
+    //     hideOnSinglePage: false,
+    //   },
+    });
+    const moment = Moment;
+    const { createMessage } = useMessage();
+
+    onBeforeMount(async () => {});
+
+    return {
+      moment,
+      createMessage,
+      registerTable,
+      RoleEnum,
+    };
+  },
+});
+</script>
+  <style lang="less" scoped>
+.handle-log-table {
+  height: 100%;
+}
+</style>
+
+  

+ 55 - 24
src/views/dataAdmin/dataAdmin/flowStep/index.vue

@@ -2,7 +2,7 @@
  * @Author: tengmingxue 1473375109@qq.com
  * @Date: 2023-08-30 17:25:03
  * @LastEditors: tengmingxue 1473375109@qq.com
- * @LastEditTime: 2023-08-30 23:18:14
+ * @LastEditTime: 2023-08-31 16:00:09
  * @FilePath: \xld-gis-admin\src\views\dataAdmin\dataAdmin\flowStep\index.vue
  * @Description: 流程图表
 -->
@@ -26,16 +26,25 @@
         <template v-for="(step, index) in steps" :key="step.xh">
           <!-- status 1:已完成,2:进行中,3:驳回,0:未开始 -->
           <a-step :status="status[step.status]">
+            <template #title>
+              <div class="step-title">{{ step.stepName }}</div>
+            </template>
             <template #icon>
               <div class="cicle-out">
-                <div class="cicle" style="border: 2px solid #67c23a">{{ index + 1 }}</div>
+                <div
+                  class="cicle"
+                  :style="`border: 2px solid ${colors[step.status]};color:${colors[step.status]};`"
+                  >{{ index + 1 }}</div
+                >
               </div>
             </template>
             <template #description>
-              <div class="desc-step-name">{{ step.stepName }}</div>
+              <!-- <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">{{ user.handler }}</span>
+                  <span class="handler-name" :style="`background-color:${colors[user.status]};`">{{
+                    user.handler
+                  }}</span>
                 </template>
               </div>
             </template>
@@ -43,6 +52,9 @@
         </template>
       </a-steps>
     </div>
+    <div class="log-table">
+      <handle-log></handle-log>
+    </div>
   </div>
 </template>
 <script>
@@ -56,12 +68,13 @@ import { columns, searchFormSchema } from './flowData';
 // 引入删除
 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
 import { message, Popconfirm } from 'ant-design-vue';
+import HandleLog from './handleLog.vue'
 const props = {
   flowTitle: { type: String, require: true },
   flowCode: { type: String, default: '' },
 };
 export default defineComponent({
-  components: { BasicTable, Authority, Popconfirm, TableAction },
+  components: { BasicTable, Authority, Popconfirm, TableAction,HandleLog },
   props,
   setup(props, { emit }) {
     const data = reactive({
@@ -73,21 +86,22 @@ export default defineComponent({
         { key: 3, name: '驳回', color: '#E6A23C' },
         { key: 4, name: '未开始', color: '#989898' },
       ],
+      colors: ['#989898', '#67C23A', '#2D74E7', '#E6A23C'],
       status: ['wait', 'finish', 'process', 'back'],
       steps: [
         //status 1:已完成,2:进行中,3:驳回,0:未开始
         {
           xh: '1',
           stepName: '地图资源上传',
-          handlers: [{ handler: '张三', id: '1' }],
+          handlers: [{ handler: '张三', id: '1', status: '1' }],
           status: '1',
         },
         {
           xh: '2',
           stepName: '审核1',
           handlers: [
-            { handler: '张三', id: '1' },
-            { handler: '李斯', id: '2' },
+            { handler: '张三', id: '1', status: '1' },
+            { handler: '李斯', id: '2', status: '1' },
           ],
           status: '1',
         },
@@ -95,18 +109,23 @@ export default defineComponent({
           xh: '3',
           stepName: '审核2',
           handlers: [
-            { handler: '张三', id: '1' },
-            { handler: '李斯', id: '2' },
+            { handler: '张三', id: '1', status: '1' },
+            { handler: '李斯', id: '2', status: '2' },
           ],
           status: '2',
         },
-        { xh: '4', stepName: '审核3', handlers: [{ handler: '张三', id: '1' }], status: '3' },
+        {
+          xh: '4',
+          stepName: '审核3',
+          handlers: [{ handler: '张三', id: '1', status: '3' }],
+          status: '3',
+        },
         {
           xh: '5',
           stepName: '审核4',
           handlers: [
-            { handler: '张三', id: '1' },
-            { handler: '李斯', id: '2' },
+            { handler: '张三', id: '1', status: '0' },
+            { handler: '李斯', id: '2', status: '0' },
           ],
           status: '0',
         },
@@ -177,7 +196,7 @@ export default defineComponent({
   }
 
   .flow {
-    height: 200px;
+    height: 140px;
     width: 100%;
     padding: 0 20px;
 
@@ -190,12 +209,20 @@ export default defineComponent({
           margin-top: 20px;
           height: 100%;
           .ant-steps-item-content {
+            position: absolute;
             height: 100%;
+            width: 100%;
             margin-top: 20px;
+            left: 16px;
+            .ant-steps-item-title {
+              .step-title {
+                position: absolute;
+                top: -33px;
+                left: -16px;
+              }
+            }
             .ant-steps-item-description {
-              margin-top: -30px;
-              margin-left: -15px;
-              height: 100%;
+              margin-left: -16px;
               .desc-step-name {
                 margin-top: 4px;
               }
@@ -204,10 +231,10 @@ export default defineComponent({
                 .handler-name {
                   display: flex;
                   float: left;
-                  height: 50px;
-                  line-height: 50px;
-                  width: 58px;
-                  margin-right: 6px;
+                  height: 36px;
+                  line-height: 36px;
+                  width: 44px;
+                  margin-right: 3px;
                   justify-content: center;
                   color: #fff;
                   background-color: #2d74e7;
@@ -217,11 +244,11 @@ export default defineComponent({
             }
           }
           .ant-steps-item-icon {
-            margin-right: -15px;
             margin-top: 20px;
+            margin-right: 0px;
             .cicle-out {
-              height: 50px;
-              width: 30px;
+              height: 40px;
+              width: 40px;
               .cicle {
                 height: 30px;
                 width: 30px;
@@ -234,6 +261,10 @@ export default defineComponent({
       }
     }
   }
+
+  .log-table{
+    height: calc(100% - 374px);
+  }
 }
 </style>
   

+ 56 - 0
src/views/dataAdmin/dataAdmin/flowStep/table.data.ts

@@ -0,0 +1,56 @@
+import { BasicColumn } from '/@/components/Table';
+import { FormSchema } from '/@/components/Table';
+import { RoleEnum } from '/@/enums/roleEnum';
+export enum KeysTypeEnum {
+  DISABLED = 'disabled',
+  ENABLED = 'enabled',
+}
+
+export const RoleMenuDictEnum: Recordable<{ key: string; keyType: KeysTypeEnum }> = {
+  [RoleEnum.PLATFORM_ADMIN]: { key: 'enabled_platform_admin_auth', keyType: KeysTypeEnum.ENABLED },
+  [RoleEnum.SYS_ADMIN]: { key: 'enabled_sysadmin_auth', keyType: KeysTypeEnum.ENABLED },
+  [RoleEnum.TENANT_ADMIN]: { key: 'disabled_tenant_auth', keyType: KeysTypeEnum.DISABLED },
+  [RoleEnum.CUSTOMER_USER]: { key: 'disabled_tenant_auth', keyType: KeysTypeEnum.DISABLED },
+};
+
+/**
+ * 列表显示信息
+*/
+export const columns: BasicColumn[] = [
+  {
+    title: '流程环节',
+    dataIndex: 'flowStep',
+    width: 100,
+  },
+  {
+    title: '处理岗位',
+    dataIndex: 'handleDept',
+    width: 110,
+  },
+  {
+    title: '处理人',
+    dataIndex: 'handler',
+    width: 110,
+  },
+  {
+    title: '处理时间',
+    dataIndex: 'handlerTime',
+    width: 160,
+    slots: { customRender: 'pdate' },
+  },
+  {
+    title: '处理状态',
+    dataIndex: 'status',
+    width: 90,
+    slots: { customRender: 'status' },
+  },
+  {
+    title: '处理意见',
+    dataIndex: 'suggestion',
+  },
+  {
+    title: '说明',
+    dataIndex: 'illustrate',
+  }
+];
+

+ 1 - 1
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-30 18:21:07
+ * @LastEditTime: 2023-08-31 15:30:13
  * @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
 -->

+ 45 - 7
src/views/dataAdmin/dataAdmin/sceneResourceUpload/AddMethod.vue

@@ -1,6 +1,6 @@
 <template>
   <BasicModal
-    width="800px"
+    width="1200px"
     v-bind="$attrs"
     @register="registerModal"
     :title="getTitle"
@@ -9,10 +9,9 @@
     :minHeight="500"
   >
     <div style="height: 50vh">
-      <BasicForm @register="registerForm">
+      <!-- <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>
@@ -36,10 +35,46 @@
             <span style="font-size: 14px; margin-left: 10px"
               >支持上传png、jpeg、gif、tif等格式文件</span
             >
-            <!-- 支持上传png、jpeg、gif、tif、doc、xls、pdf等格式文件 -->
           </a-upload>
         </template>
-      </BasicForm>
+      </BasicForm> -->
+
+      <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>
+
+            <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等格式文件</span
+                >
+              </a-upload>
+            </template>
+          </BasicForm>
+        </a-tab-pane>
+        <a-tab-pane key="2" tab="流程信息">
+          <FlowStep :flowTitle="'场景资源上传流程信息'" :flowCode="'20220523001'"></FlowStep>
+        </a-tab-pane>
+      </a-tabs>
     </div>
   </BasicModal>
 </template>
@@ -57,6 +92,7 @@ import { useMessage } from '/@/hooks/web/useMessage';
 import { TOption } from '/@/views/rule/linkedge/config/config.data';
 import { PlusOutlined } from '@ant-design/icons-vue';
 // import { upload } from '/@/api/oss/ossFileUploader';
+import FlowStep from '../flowStep/index.vue'
 import { addFileResource } from '../../api/fileUploadApi';
 export default defineComponent({
   name: 'AccountModal',
@@ -65,6 +101,7 @@ export default defineComponent({
     BasicForm,
     Upload,
     PlusOutlined,
+    FlowStep,
   },
   emits: ['success', 'register'],
   setup(_, { emit }) {
@@ -75,7 +112,7 @@ export default defineComponent({
     const isUpdate = ref(true);
     const rowId = ref('');
     const postData = reactive({});
-
+    const activeKey = ref('1');
     const getRoleList = async () => {
       const res = await filterRoleList();
       console.log(res);
@@ -182,6 +219,7 @@ export default defineComponent({
     }
     return {
       current,
+      activeKey,
       registerModal,
       registerForm,
       handleSubmit,
@@ -219,7 +257,7 @@ export default defineComponent({
   font-weight: 350;
   letter-spacing: 0px;
 }
-:deep(.ant-calendar-picker){
+:deep(.ant-calendar-picker) {
   width: 100% !important;
 }
 </style>