Browse Source

文件审批流,报表管理菜单分类bug修改-提交

lxh 11 months ago
parent
commit
a0e42570cf

+ 1 - 1
src/views/vent/performance/approvalPend/approvalPend.data.ts

@@ -42,7 +42,7 @@ export const columns: BasicColumn[] = [
     ellipsis: true,
   },
   {
-    title: '当前审批人',
+    title: '创建人',
     dataIndex: 'createBy',
     key: 'createBy',
     align: 'center',

+ 2 - 98
src/views/vent/performance/approvalPend/index.vue

@@ -3,42 +3,19 @@
         <a-table size="small" :dataSource="dataSource" :columns="columns" :scroll="{ y: 620 }" :pagination="pagination"
             @change="pageChange">
             <template #actionSp="{ record }">
-                <a class="table-action-link" @click="handleTo(record)">提交</a>
                 <a class="table-action-link" @click="handleSpDetail(record)">审批详情</a>
-                <a class="table-action-link" @click="handleSpRevoke(record)">撤回</a>
             </template>
             <template #actionWj="{ record }">
                 <a class="table-action-link" @click="handleEdit(record)">编辑</a>
                 <a class="table-action-link" @click="handleDownLoad(record)">下载</a>
-                <!-- <a-popconfirm title="确定删除?" @confirm="handleDelete(record)">
-                    <a class="table-action-link">删除</a>
-                </a-popconfirm> -->
             </template>
         </a-table>
-        <!-- 审批-提交弹窗 -->
-        <a-modal v-model:visible="visibleTj" centered :width="600" title="提交文件" @ok="handleTjOk"
-            @cancel="handleTjCancel">
-            <a-form :model="formStateTj" labelAlign="right" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
-                <a-form-item label="选择审批" :rules="[{ required: true, message: '请选择是否提交' }]">
-                    <a-select v-model:value="formStateTj.file" style="width: 260px">
-                        <a-select-option v-for="file in fileList " :key="file.label" :value="file.value">{{ file.label
-                            }}</a-select-option>
-                    </a-select>
-                </a-form-item>
-            </a-form>
-        </a-modal>
         <!-- 审批详情弹窗 -->
         <a-modal v-model:visible="visibleSp" width="1000px" :footer="null" :title="titleSp" centered destroyOnClose>
             <HistorySp :historySpList="historySpList" :imgSrc="imgSrc" :isShow="isShow" :spInfo="spInfo"
                 @spClose="spClose">
             </HistorySp>
         </a-modal>
-        <!-- 审批-撤销申请弹窗 -->
-        <a-modal v-model:visible="visibleCx" centered :width="600" title="撤销申请" @ok="handleCxOk"
-            @cancel="handleCxCancel">
-            <a-textarea v-model:value="revokeDes" placeholder="请输入撤回原因..." :rows="4"
-                style="width:96%;margin:10px;background-color: transparent;color: #fff;" />
-        </a-modal>
         <DeviceModal :editID="editID" :fileType="fileType" @register="registerDeviceModal" />
         <CADModal @register="registerCADModal" />
     </div>
@@ -50,9 +27,8 @@ import HistorySp from '../comment/HistorySp.vue'
 import DeviceModal from '../comment/DeviceModal.vue';
 import CADModal from '../comment/CADModal.vue';
 import { columns } from './approvalPend.data'
-import { getNowUserAgencyData, downLoad, listData, commit } from '../fileDetail/fileDetail.api';
-import { historicFlowNew, getHighlightImgNew, getTodoTask, getCancelNew } from '../comment/comment.api'
-import { message } from 'ant-design-vue';
+import { getNowUserAgencyData, downLoad, } from '../fileDetail/fileDetail.api';
+import { historicFlowNew, getHighlightImgNew, getTodoTask, } from '../comment/comment.api'
 import { useModal } from '/@/components/Modal';
 
 let props = defineProps({
@@ -86,24 +62,11 @@ let imgSrc = ref('')
 let isShow = ref(true)
 //审批通过/驳回参数信息
 let spInfo = reactive({})
-//审批-撤销
-let visibleCx = ref(false)
-let revokeDes = ref('')
-let cxInfo = reactive({})
 const isUpdate = ref(false);
 const record = reactive<Record<string, any>>({});
 provide('formData', record);
 let fileType = ref(''); //文件类型
 let editID = ref(0); //文件ID
-//是否显示文件审批弹窗
-let visibleTj = ref(false)
-//文件审批-弹窗参数
-let formStateTj = reactive({
-    file: '',
-    id: '',
-})
-//文件审批-提交信息弹窗下拉选项数据
-let fileList = reactive<any[]>([])
 // CAD预览相关的逻辑
 let [registerCADModal, { openModal: openCADModal }] = useModal();
 let [registerDeviceModal, { openModal, closeModal }] = useModal();
@@ -122,42 +85,6 @@ function pageChange(val) {
     getNowUserAgencyDataList()
 }
 
-// 审批提交
-async function handleTo(data) {
-    visibleTj.value = true
-    let res = await listData({ zx: true, column: 'createTime', order: 'desc', status: 1 })
-    if (res.length != 0) {
-        fileList.length = 0
-        res.forEach(el => {
-            fileList.push({ label: el.name, value: el.id })
-        })
-        formStateTj.id = data.id
-    }
-
-
-}
-//确认提交
-async function handleTjOk() {
-    if (formStateTj.file) {
-        let res = await commit({ procDefId: formStateTj.file, tableId: formStateTj.id, firstGateway: true })
-        if (res == '提交成功') {
-            message.success(res);
-            visibleTj.value = false
-            pagination.current = 1
-            getNowUserAgencyDataList()
-        } else {
-            message.warning(res.message);
-        }
-    } else {
-        message.warning('请先选择要提交的文件!');
-    }
-}
-//取消提交
-function handleTjCancel() {
-    formStateTj.file = ''
-    visibleTj.value = false
-}
-
 //审批通过/驳回弹窗关闭
 function spClose() {
     visibleSp.value = false
@@ -197,29 +124,6 @@ async function getHighlightImgNewList(params) {
     let imageUrl = window.URL.createObjectURL(res);
     imgSrc.value = imageUrl
 }
-//审批-撤回提交
-function handleSpRevoke(data) {
-    visibleCx.value = true
-    cxInfo = Object.assign({}, data)
-}
-//审批-撤销-确定
-async function handleCxOk() {
-    let res = await getCancelNew({ reason: revokeDes.value, tableId: cxInfo.id, tableName: cxInfo.tableName })
-    if (res == '操作成功') {
-        message.success(res);
-    } else {
-        message.warning(res.message);
-    }
-    visibleCx.value = false
-    revokeDes.value = ''
-    pagination.current = 1
-    getNowUserAgencyDataList()
-}
-//审批-撤销-取消
-function handleCxCancel() {
-    revokeDes.value = ''
-    visibleCx.value = false
-}
 
 /**
  * 编辑事件

+ 1 - 1
src/views/vent/performance/comment/NormalTable.vue

@@ -244,7 +244,7 @@ async function getHistoricFlowNewList(params) {
   let res = await historicFlowNew({ ...params })
   if (res.length != 0) {
     res.forEach(el => {
-      historySpList.push({ name: el.name, username: el.assignees[0].username, deleteReason: el.deleteReason, comment: el.comment, startTime: el.startTime, endTime: el.endTime, status: el.status || '待处理' })
+      historySpList.push({ name: el.name, username: el.assignees[0].username, deleteReason: el.deleteReason, comment: el.comment, startTime: el.startTime, endTime: el.endTime, status:el.assignees[0].isExecutor ? '已处理' : '待处理' })
     })
 
   }

+ 7 - 0
src/views/vent/performance/comment/comment.data.ts

@@ -44,6 +44,13 @@ export const columns: BasicColumn[] = [
     width: 150
   },
   {
+    title: '处理意见',
+    dataIndex: 'comment',
+    key: 'comment',
+    align: 'center',
+    ellipsis: true,
+  },
+  {
     title: '状态',
     dataIndex: 'status',
     key: 'status',

+ 1 - 40
src/views/vent/performance/endEd/index.vue

@@ -4,29 +4,18 @@
             @change="pageChange">
             <template #actionSp="{ record }">
                 <a class="table-action-link" @click="handleSpDetail(record)">审批详情</a>
-                <a class="table-action-link" @click="handleSpRevoke(record)">撤回</a>
             </template>
             <template #actionWj="{ record }">
                 <a class="table-action-link" @click="handleEdit(record)">编辑</a>
                 <a class="table-action-link" @click="handleDownLoad(record)">下载</a>
-                <!-- <a-popconfirm title="确定删除?" @confirm="handleDelete(record)">
-                    <a class="table-action-link">删除</a>
-                </a-popconfirm> -->
             </template>
         </a-table>
-
         <!-- 审批详情弹窗 -->
         <a-modal v-model:visible="visibleSp" width="1000px" :footer="null" :title="titleSp" centered destroyOnClose>
             <HistorySp :historySpList="historySpList" :imgSrc="imgSrc" :isShow="isShow" :spInfo="spInfo"
                 @spClose="spClose">
             </HistorySp>
         </a-modal>
-        <!-- 审批-撤销申请弹窗 -->
-        <a-modal v-model:visible="visibleCx" centered :width="600" title="撤销申请" @ok="handleCxOk"
-            @cancel="handleCxCancel">
-            <a-textarea v-model:value="revokeDes" placeholder="请输入撤回原因..." :rows="4"
-                style="width:96%;margin:10px;background-color: transparent;color: #fff;" />
-        </a-modal>
         <DeviceModal :editID="editID" :fileType="fileType" @register="registerDeviceModal" />
         <CADModal @register="registerCADModal" />
     </div>
@@ -39,8 +28,7 @@ import DeviceModal from '../comment/DeviceModal.vue';
 import CADModal from '../comment/CADModal.vue';
 import { columns } from './endEd.data'
 import { getNowUserApprovedData, downLoad } from '../fileDetail/fileDetail.api';
-import { historicFlowNew, getHighlightImgNew, getTodoTask, getCancelNew } from '../comment/comment.api'
-import { message } from 'ant-design-vue';
+import { historicFlowNew, getHighlightImgNew, getTodoTask, } from '../comment/comment.api'
 import { useModal } from '/@/components/Modal';
 
 let props = defineProps({
@@ -74,10 +62,6 @@ let imgSrc = ref('')
 let isShow = ref(true)
 //审批通过/驳回参数信息
 let spInfo = reactive({})
-//审批-撤销
-let visibleCx = ref(false)
-let revokeDes = ref('')
-let cxInfo = reactive({})
 const isUpdate = ref(false);
 const record = reactive<Record<string, any>>({});
 provide('formData', record);
@@ -139,29 +123,6 @@ async function getHighlightImgNewList(params) {
     let imageUrl = window.URL.createObjectURL(res);
     imgSrc.value = imageUrl
 }
-//审批-撤回提交
-function handleSpRevoke(data) {
-    visibleCx.value = true
-    cxInfo = Object.assign({}, data)
-}
-//审批-撤销-确定
-async function handleCxOk() {
-    let res = await getCancelNew({ reason: revokeDes.value, tableId: cxInfo.id, tableName: cxInfo.tableName })
-    if (res == '操作成功') {
-        message.success(res);
-    } else {
-        message.warning(res.message);
-    }
-    visibleCx.value = false
-    revokeDes.value = ''
-    pagination.current = 1
-    getNowUserApprovedDataList()
-}
-//审批-撤销-取消
-function handleCxCancel() {
-    revokeDes.value = ''
-    visibleCx.value = false
-}
 
 /**
  * 编辑事件

+ 1 - 1
src/views/vent/performance/fileDetail/fileDetail.data.ts

@@ -49,7 +49,7 @@ export const columns: BasicColumn[] = [
     align:'center',
   },
   {
-    title: '当前审批人',
+    title: '创建人',
     dataIndex: 'createBy',
     width:110,
     align:'center',

+ 14 - 10
src/views/vent/reportManager/comment/common/treeList.vue

@@ -3,9 +3,9 @@
     <div :class="treeNodeClass" @mouseover="mouseOver" @mouseout="mouseOut" @click.stop="toggle">
       <div class="vtl-border-text">
         <template v-if="isFolder">
-          <slot v-if="expanded" :item="{ title: model.title, isFolder: true, expanded: true }" name="icon"> </slot>
-          <slot v-else :item="{ title: model.title, isFolder: true, expanded: false }" name="icon"></slot>
-
+          <slot v-if="isexpanded" :item="{ title: model.title, isFolder: true, isexpanded:true }"
+            name="icon"> </slot>
+          <slot v-else :item="{ title: model.title, isFolder: true,isexpanded:false  }" name="icon"></slot>
         </template>
         <slot v-else :item="{ title: model.title, isFolder: false }" name="icon"></slot>
         <span class="vtl-node-content ellipsis">
@@ -19,7 +19,7 @@
       </div>
     </div>
   </div>
-  <div class="vtl-tree-margin" v-show="expanded">
+  <div class="vtl-tree-margin" v-show="isexpanded">
     <!-- 这里无法使用$attr来透传属性官方还未解决此bug -->
     <treeList @on-click="(depth) => $emit('onClick', depth)" @detail-node="(depth) => $emit('detailNode', depth)"
       v-for="newmodel in model.children" :selected="selected" :model="newmodel" :key="newmodel.id">
@@ -40,6 +40,7 @@ interface IFileSystem {
   pid: string;
   ppid: string,
   isFolder: boolean;
+  isexpanded:boolean;
   isAdd: boolean;
   children?: IFileSystem[];
 }
@@ -60,23 +61,26 @@ const props = withDefaults(
 );
 //是否移入
 const isHover = ref(false);
-// 是否展开
-const expanded = ref(true);
 // 是否是文件夹
 const isFolder = computed(() => {
   return props.model.isFolder;
 });
+//是否展开
+const isexpanded = computed(() => {
+  return props.model.isexpanded;
+});
 const isSelected = computed(() => {
   if (props.model.pid == '0' || props.model.pid == '1' || props.model.pid == '2') {
     return props.selected.id === props.model.id && props.selected.pid === props.model.pid;
   } else if (props.model.ppid == '0' || props.model.ppid == '1' || props.model.ppid == '2') {
     return props.selected.id === props.model.id && props.selected.ppid === props.model.ppid;
   } else {
-    return props.selected.id === props.model.id ;
+    return props.selected.id === props.model.id;
   }
 })
-  // 拖拽样式
-  const treeNodeClass = computed(() => {
+
+// 拖拽样式
+const treeNodeClass = computed(() => {
   return {
     'vtl-node-main': true,
     selected: isSelected.value,
@@ -96,7 +100,7 @@ const delNode = () => {
 const toggle = () => {
   if (isFolder.value) {
     console.log(props.model, 'props.model---------')
-    expanded.value = !expanded.value;
+    props.model.isexpanded=!props.model.isexpanded
     emit('onClick', {
       ...props.model,
     }); //lxh

+ 6 - 3
src/views/vent/reportManager/index.vue

@@ -7,7 +7,7 @@
         <fileSystem :selected="selected" :list="listArr" :draggable="true" @on-click="onClick">
           <template #icon="{ item }">
             <template v-if="item.isFolder">
-              <SvgIcon v-if="item.expanded" size="18" name="file-open" />
+              <SvgIcon v-if="item.isexpanded" size="18" name="file-open" />
               <SvgIcon v-else size="18" name="file-close" />
             </template>
             <treeIcon class="iconfont" :title="item.title" v-else />
@@ -46,6 +46,7 @@ let listArr = reactive<any[]>([
   {
     pid: 'auto',
     isFolder: true,
+    isexpanded:true,
     title: '自动报表',
     id: '0',
     children: []
@@ -53,6 +54,7 @@ let listArr = reactive<any[]>([
   {
     pid: 'hand',
     isFolder: true,
+    isexpanded:true,
     title: '手动报表',
     id: '1',
     children: []
@@ -60,6 +62,7 @@ let listArr = reactive<any[]>([
   {
     pid: 'temp',
     isFolder: true,
+    isexpanded:true,
     title: '报表模板',
     id: '2',
     children: []
@@ -84,10 +87,10 @@ async function getTreeList() {
         let childre: any[] = []
         if (v.children.length != 0) {
           v.children.forEach(m => {
-            childre.push({ pid: v.itemValue, ppid: el.id, isFolder: false, title: m.itemText, id: m.itemValue })
+            childre.push({ pid: v.itemValue, ppid: el.id, isFolder: false,isexpanded:false, title: m.itemText, id: m.itemValue })
           })
         }
-        el.children.push({ pid: el.id, isFolder: true, title: v.itemText, id: v.itemValue, children: childre })
+        el.children.push({ pid: el.id, isFolder: true,isexpanded:false, title: v.itemText, id: v.itemValue, children: childre })
       })
     })
     console.log(listArr, 'listArr-----------')