2213980799@qq.com hace 1 año
padre
commit
b39d43b4bd

+ 33 - 0
src/api/bpm/components/doc/index.js

@@ -0,0 +1,33 @@
+import request from '@/utils/request';
+
+/**
+ * 获取信息详情
+ */
+ export async function sendGetById(id) {
+  const res = await request.get(`/fm/release_management/getById/`+id, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 获取信息详情
+ */
+
+ export async function getById(id) {
+  const res = await request.get(`/fm/file/getById/`+id, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 获取信息详情
+ */
+ export async function recycleGetById(id) {
+  const res = await request.get(`/fm/recycle_management/getById/`+id, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 150 - 0
src/views/bpm/handleTask/components/doc/index.vue

@@ -0,0 +1,150 @@
+<template>
+  <ele-pro-table
+    ref="table"
+    :columns="columns"
+    :datasource="tableList"
+    tool-class="ele-toolbar-form"
+    :needPage="false"
+    row-key="id"
+  >
+  </ele-pro-table>
+</template>
+  
+  <script>
+import { getById } from '@/api/bpm/components/doc';
+
+export default {
+  components: {},
+  props: {
+    businessId: {
+      default: ''
+    }
+  },
+  //add:新建 fileEdit:修改  filePigeonhole:归档 fileUnPigeonhole:取消归档  fileIssue:发布 fileChange:变更 fileDel:删除
+
+  data() {
+    return {
+      // 表格列配置
+      columns: [
+        {
+          label: '编码',
+          prop: 'code',
+          width: 180,
+          align: 'center',
+          fixed: 'left',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'name',
+          label: '文档名称',
+          align: 'center',
+          slot: 'name',
+          showOverflowTooltip: true,
+          minWidth: 200
+        },
+        {
+          prop: 'storagePath',
+          label: '文件名称',
+          align: 'center',
+
+          showOverflowTooltip: true,
+          minWidth: 200,
+          formatter: (_row, _column, cellValue) => {
+            return cellValue[0]?.name;
+          }
+        },
+        {
+          prop: 'version',
+          label: '版本',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100
+        },
+        {
+          prop: 'checkOutUserName',
+          label: '检出人',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100
+        },
+        {
+          prop: 'checkOutStatus',
+          label: '检出状态',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100,
+          formatter: (_row, _column, cellValue) => {
+            return cellValue == 1 ? '已检出' : '';
+          }
+        },
+        {
+          prop: 'checkOutTime',
+          label: '检出时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 160
+        },
+        {
+          prop: 'createUserName',
+          label: '创建人',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100
+        },
+        {
+          prop: 'createTime',
+          label: '创建时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 160,
+          formatter: (_row, _column, cellValue) => {
+            return this.$util.toDateString(cellValue);
+          }
+        },
+        {
+          prop: 'updateUserName',
+          label: '修改人',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100
+        },
+        {
+          prop: 'updateTime',
+          label: '修改时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 160
+        },
+        {
+          prop: 'sizeUnit',
+          label: '文档大小',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100
+        },
+        {
+          prop: '',
+          label: '状态',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100
+        }
+      ],
+      tableList:[]
+    };
+  },
+  created() {
+    this.init();
+  },
+
+  methods: {
+    async init() {
+      const data = await getById(this.businessId);
+      this.tableList = [data];
+ 
+    },
+
+  }
+};
+</script>
+  

+ 127 - 0
src/views/bpm/handleTask/components/doc/send/power.vue

@@ -0,0 +1,127 @@
+<template>
+  <div>
+    <!-- 数据表格 -->
+    <ele-pro-table
+      ref="table"
+      :columns="columns"
+      :datasource="tableList"
+      :height="height"
+      tool-class="ele-toolbar-form"
+      cache-key="systemOrgUserTable"
+      :needPage="false"
+    >
+      <template v-for="(item, i) in powerList" v-slot:[item]="{ row }">
+        <el-checkbox
+          :key="i"
+          v-model="row[item]"
+          true-label="1"
+          false-label="0"
+        ></el-checkbox>
+      </template>
+     
+  
+    </ele-pro-table>
+  </div>
+</template>
+  
+  <script>
+
+export default {
+  props: {
+    powerArr: {
+      type: Array,
+      default: () => [
+        { name: 'visible', label: '可见' },
+        { name: 'check', label: '查看' },
+        { name: 'browse', label: '浏览' },
+        { name: 'revise', label: '修改' },
+        { name: 'del', label: '删除' },
+        { name: 'copy', label: '复制' },
+        { name: 'shear', label: '剪切' },
+        { name: 'checkEnter', label: '检入' },
+        { name: 'checkOut', label: '检出' },
+        { name: 'archive', label: '归档' },
+        { name: 'cancelArchive', label: '取消归档' },
+        { name: 'release', label: '发布' },
+        { name: 'abolish', label: '废止' },
+        { name: 'download', label: '下载' },
+        { name: 'print', label: '打印' }
+      ]
+    },
+    isSave: {
+      default: true
+    },
+    isAdd: {
+      default: true
+    },
+    height: {
+      default: 'calc(70vh - 339px)'
+    }
+  },
+
+  data() {
+    return {
+      // 表格列配置
+
+      tableList: []
+    };
+  },
+  computed: {
+    powerList() {
+      return this.powerArr.map((item) => item.name);
+    },
+    columns() {
+      return [
+        {
+          columnKey: 'index',
+          type: 'index',
+          label: '序号',
+          width: 55,
+          align: 'center',
+          showOverflowTooltip: true,
+          fixed: 'left'
+        },
+
+        {
+          align: 'center',
+          prop: 'deptName',
+          label: '部门',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          align: 'center',
+          prop: 'name',
+          label: '姓名',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        ...this.powerArr.map((item) => {
+          return {
+            slot: item.name,
+            prop: item.name,
+            align: 'center',
+            label: item.label,
+            showOverflowTooltip: true,
+            width: 80
+          };
+        }),
+  
+      ];
+    }
+  },
+
+  methods: {
+    setTableList(data) {
+      this.tableList = JSON.parse(JSON.stringify(data));
+    }
+  }
+};
+</script>
+  <style scoped lang="scss">
+:deep(.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner) {
+  background-color: var(--color-primary);
+  border-color: var(--color-primary);
+}
+</style>
+  

+ 195 - 0
src/views/bpm/handleTask/components/doc/send/receiveDialog.vue

@@ -0,0 +1,195 @@
+<!-- 用户编辑弹窗 -->
+<template>
+   <el-form
+      ref="form"
+      :model="form"
+      :rules="rules"
+      label-width="82px"
+      :disabled="true"
+    >
+      <el-row :gutter="15">
+        <el-col :span="8">
+          <el-form-item label="主题" prop="name">
+            <el-input v-model="form.name" placeholder="请输入主题"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="回收人" prop="recycleUserName">
+            <el-input v-model="form.recycleUserName" disabled></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="回收时间" prop="recycleTime">
+            <el-date-picker
+              v-model="form.recycleTime"
+              type="datetime"
+              placeholder="选择日期时间"
+              format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              style="width: 100%"
+            >
+            </el-date-picker>
+          
+          </el-form-item>
+        </el-col>
+       
+       
+        <el-col :span="8">
+          <el-form-item label="创建时间" prop="createTime">
+            <el-input v-model="form.createTime" disabled style="width: 100%">
+            </el-input>
+         
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="回收说明" prop="remark">
+            <el-input v-model="form.remark" type="textarea"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="回收信息" prop="releaseList">
+            <ele-pro-table
+              ref="table"
+              :columns="columns"
+              :datasource="form.releaseList"
+              tool-class="ele-toolbar-form"
+              cache-key="systemOrgUserTable"
+              :needPage="false"
+            >
+      
+  
+            </ele-pro-table>
+          </el-form-item>
+        </el-col>
+      
+      </el-row>
+    </el-form>
+</template>
+  
+  <script>
+import power from './power.vue';
+import { recycleGetById } from '@/api/bpm/components/doc';
+
+const defaultForm = {
+  name: '',
+  releaseList: [], //回收信息集合
+  recycleTime: '', //回收时间
+  recycleUserId: '', //回收人id
+  recycleUserName: '', //回收人名称
+  remark: '', //描述
+  status: '',
+  type: ''
+};
+export default {
+  components: { power },
+  props: {
+    businessId: {
+      default: ''
+    }
+  },
+  props: {
+    businessId: {
+      default: ''
+    }
+  },
+  data() {
+    return {
+      form: {
+        ...defaultForm
+      },
+
+      columns: [
+        {
+          width: 45,
+          type: 'index',
+          columnKey: 'index',
+          align: 'center'
+        },
+
+        {
+          label: '主题',
+          align: 'center',
+          prop: 'name',
+          width: 220,
+          showOverflowTooltip: true
+        },
+
+        // {
+        //   align: 'center',
+        //   label: '是否回收权限',
+        //   prop: 'isAuthority',
+        //   width: 120,
+        //   formatter: (_row, _column, cellValue) => {
+        //     return cellValue == 1 ? '是' : '否';
+        //   }
+        // },
+        {
+          align: 'center',
+          label: '回收权限时间',
+          prop: 'isAuthorityTime',
+          width: 180,
+          showOverflowTooltip: true
+        },
+        {
+          align: 'center',
+          label: '失效时间',
+          prop: 'failureTime',
+          width: 180,
+          showOverflowTooltip: true
+        },
+
+        {
+          prop: 'userAuthority',
+          label: '通知用户',
+          align: 'center',
+          formatter: (_row, _column, cellValue) => {
+            return cellValue.map((item) => item.name).toString();
+          }
+        },
+        {
+          align: 'center',
+          label: '发布人',
+          prop: 'releaseUserName',
+          width: 180
+        },
+
+        {
+          prop: 'releaseTime',
+          align: 'center',
+          label: '发布时间',
+          width: 180
+        }
+      ],
+      powerArr: [
+        // { name: 'visible', label: '可见' },
+        // { name: 'check', label: '查看' },
+        // { name: 'browse', label: '浏览' },
+        // { name: 'download', label: '下载' },
+        // { name: 'print', label: '打印' }
+      ]
+    };
+  },
+  computed: {
+    // 是否开启响应式布局
+    styleResponsive() {
+      return this.$store.state.theme.styleResponsive;
+    }
+  },
+  created() {
+    this.init();
+  },
+  methods: {
+    async init() {
+      const data = await recycleGetById(this.businessId);
+      this.form = data;
+      this.$nextTick(() => {
+        this.$refs.powerRef &&
+          this.$refs.powerRef.setTableList(data.userAuthority);
+      });
+    }
+  }
+};
+</script>
+  <style scoped lang="scss">
+</style>
+  

+ 249 - 0
src/views/bpm/handleTask/components/doc/send/sendDialog.vue

@@ -0,0 +1,249 @@
+<!-- 用户编辑弹窗 -->
+<template>
+  <el-form
+    ref="form"
+    :model="form"
+    label-width="82px"
+    :disabled="true"
+  >
+    <el-row :gutter="15">
+      <el-col :span="6">
+        <el-form-item label="主题" prop="name">
+          <el-input v-model="form.name"></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col :span="6">
+        <el-form-item label="发布人" prop="releaseUserName">
+          <el-input v-model="form.releaseUserName"></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col :span="12">
+        <el-form-item label="发布时间" prop="releaseTime">
+          <el-date-picker
+            v-model="form.releaseTime"
+            type="datetime"
+            format="yyyy-MM-dd HH:mm:ss"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            style="width: 60%"
+          >
+          </el-date-picker>
+          <el-checkbox
+            style="margin-left: 5px"
+            v-model="form.isTimeRelease"
+            :true-label="1"
+            :false-label="0"
+            >按照发布时间进行计划发布</el-checkbox
+          >
+        </el-form-item>
+      </el-col>
+      <el-col :span="6">
+        <el-form-item label="失效时间" prop="failureTime">
+          <el-date-picker
+            v-model="form.failureTime"
+            type="datetime"
+            format="yyyy-MM-dd HH:mm:ss"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            style="width: 100%"
+          >
+          </el-date-picker>
+        </el-form-item>
+      </el-col>
+      
+      <el-col :span="12">
+        <el-form-item label="创建时间" prop="createTime">
+          <el-input v-model="form.createTime" style="width: 60%"> </el-input>
+          <el-checkbox
+            style="margin-left: 5px"
+            v-model="form.isAuthority"
+            :true-label="1"
+            :false-label="0"
+            >到失效时间自动回收权限</el-checkbox
+          >
+        </el-form-item>
+      </el-col>
+      <el-col :span="24">
+        <el-form-item label="发布说明" prop="remark">
+          <el-input v-model="form.remark" type="textarea"></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col :span="24">
+        <el-form-item label="发布文档" prop="fileList">
+          <ele-pro-table
+            ref="table"
+            :columns="columns"
+            :datasource="form.fileList"
+            tool-class="ele-toolbar-form"
+            cache-key="systemOrgUserTable"
+            :needPage="false"
+          >
+          </ele-pro-table>
+        </el-form-item>
+      </el-col>
+      <el-col :span="24">
+        <el-form-item label="通知用户" prop="storagePath">
+          <power
+            height="200px"
+            :powerArr="powerArr"
+            :isSave="false"
+            ref="powerRef"
+          />
+        </el-form-item>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+  
+  <script>
+import power from './power.vue';
+import { sendGetById } from '@/api/bpm/components/doc';
+
+const defaultForm = {
+  name: '', //名称
+  fileList: [], //文档集合json
+  userAuthority: [], //用户权限集合json
+  releaseTime: '', //发布时间
+  failureTime: '', //失效时间
+  isAuthority: '', //是否回收权限 0 1
+  remark: ''
+};
+export default {
+  components: { power },
+  props: {
+    businessId: {
+      default: ''
+    }
+  },
+  data() {
+    return {
+      form: {
+        ...defaultForm
+      },
+
+      columns: [
+        {
+          label: '编码',
+          prop: 'code',
+          width: 180,
+          align: 'center',
+          fixed: 'left',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'name',
+          label: '文档名称',
+          align: 'center',
+          slot: 'name',
+          showOverflowTooltip: true,
+          minWidth: 200
+        },
+        {
+          prop: 'storagePath',
+          label: '文件名称',
+          align: 'center',
+
+          showOverflowTooltip: true,
+          minWidth: 200,
+          formatter: (_row, _column, cellValue) => {
+            return cellValue[0]?.name;
+          }
+        },
+        {
+          prop: 'version',
+          label: '版本',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100
+        },
+
+        {
+          prop: 'createUserName',
+          label: '创建人',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100
+        },
+        {
+          prop: 'createTime',
+          label: '创建时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 160,
+          formatter: (_row, _column, cellValue) => {
+            return this.$util.toDateString(cellValue);
+          }
+        },
+        {
+          prop: 'updateUserName',
+          label: '修改人',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100
+        },
+        {
+          prop: 'updateTime',
+          label: '修改时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 160
+        },
+        {
+          prop: 'sizeUnit',
+          label: '文档大小',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100
+        },
+        {
+          prop: '',
+          label: '状态',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100
+        },
+        {
+          columnKey: 'action',
+          label: '操作',
+          width: 200,
+          align: 'center',
+          resizable: false,
+          slot: 'action',
+          showOverflowTooltip: true,
+          fixed: 'right'
+        }
+      ],
+
+      powerArr: [
+        { name: 'visible', label: '可见' },
+        { name: 'check', label: '查看' },
+        { name: 'browse', label: '浏览' },
+
+        { name: 'download', label: '下载' },
+        { name: 'print', label: '打印' }
+      ]
+    };
+  },
+  computed: {
+    // 是否开启响应式布局
+    styleResponsive() {
+      return this.$store.state.theme.styleResponsive;
+    }
+  },
+  created() {
+    this.init();
+  },
+  methods: {
+    async init() {
+      const data = await sendGetById(this.businessId);
+      this.form = data;
+
+      this.$nextTick(() => {
+        this.$refs.powerRef &&
+          this.$refs.powerRef.setTableList(data.userAuthority);
+      });
+    }
+  }
+};
+</script>
+  <style scoped lang="scss">
+</style>
+  

+ 145 - 0
src/views/bpm/handleTask/components/doc/submit.vue

@@ -0,0 +1,145 @@
+<template>
+  <el-col :span="16" :offset="6">
+    <el-form label-width="100px" ref="formRef" :model="form">
+      <el-form-item
+        label="审批建议"
+        prop="reason"
+        style="margin-bottom: 20px"
+        :rules="{
+          required: true,
+          message: '请选择',
+          trigger: 'change'
+        }"
+      >
+        <el-input
+          type="textarea"
+          v-model="form.reason"
+          placeholder="请输入审批建议"
+        />
+      </el-form-item>
+    </el-form>
+    <div style="margin-left: 10%; margin-bottom: 20px; font-size: 14px">
+      <el-button
+        icon="el-icon-edit-outline"
+        type="success"
+        size="mini"
+        @click="handleAudit(1)"
+        >通过
+      </el-button>
+
+      <el-button
+        icon="el-icon-circle-close"
+        type="danger"
+        size="mini"
+        @click="handleAudit(0)"
+        v-if="!['starter'].includes(taskDefinitionKey)"
+        >驳回
+      </el-button>
+
+      <el-dropdown
+        @command="(command) => handleCommand(command)"
+        style="margin-left: 30px"
+      >
+        <span class="el-dropdown-link"
+          >更多<i class="el-icon-arrow-down el-icon--right"></i
+        ></span>
+        <el-dropdown-menu slot="dropdown">
+          <el-dropdown-item command="cancel">作废</el-dropdown-item>
+        </el-dropdown-menu>
+      </el-dropdown>
+    </div>
+  </el-col>
+</template>
+
+<script>
+import { approveTaskWithVariables } from '@/api/bpm/task';
+// 流程实例的详情页,可用于审批
+export default {
+  name: '',
+  components: {
+  },
+  props: {
+    businessId: {
+      default: ''
+    },
+    taskId: {
+      default: ''
+    },
+    id: {
+      default: ''
+    },
+    taskDefinitionKey: {
+      default: ''
+    }
+  },
+  data() {
+    return {
+      form: {
+        reason: ''
+      },
+    };
+  },
+  created() {
+
+  },
+  methods: {
+    /** 处理转办审批人 */
+    handleUpdateAssignee() {
+      this.$emit('handleUpdateAssignee');
+    },
+    /** 退回 */
+    handleBackList() {
+      this.$emit('handleBackList');
+    },
+
+    async handleAudit(status, type) {
+      this._approveTaskWithVariables(status);
+    },
+    async _approveTaskWithVariables(status) {
+      let variables = {
+        pass: !!status
+      };
+
+      approveTaskWithVariables({
+        id: this.taskId,
+        reason: this.form.reason,
+        variables
+      }).then((res) => {
+        if (res.data.code != '-1') {
+          this.$emit('handleAudit', {
+            status,
+            title: status === 0 ? '驳回' : ''
+          });
+        }
+      });
+    },
+
+    //更多
+    handleCommand(command) {
+      if (command === 'cancel') {
+        this.$confirm('是否确认作废?', {
+          type: 'warning',
+          cancelButtonText: '取消',
+          confirmButtonText: '确定'
+        })
+          .then(() => {
+            cancel({
+              id: this.taskId,
+              reason: this.form.reason,
+              businessId: this.businessId
+            })
+              .then(() => {
+                this.$emit('handleClose');
+              })
+              .catch(() => {
+                this.$message.error('流程作废失败');
+              });
+          })
+          .catch(() => {});
+      }
+    }
+  }
+};
+</script>
+
+<style lang="scss"></style>