end.vue 8.36 KB
<template>
  <div class="app-container">

    <taskCard :task="task"  v-for="task in taskList" @sendToParent="showTask"/>

    <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />

    <!-- 审批对话框 -->
    <el-dialog :title="title" :visible.sync="open" v-if="open" width="500px" append-to-body>

      <div slot="footer" class="dialog-footer">
        <el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button>
        <el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">通过</el-button>
      </div>
    </el-dialog>


    <el-dialog :title="title" :visible.sync="open2" width="800px" append-to-body>
      <threestepInfo :businessKey="businessKey"  v-if="open2"/>

      </el-dialog>
    <el-dialog :title="title" :visible.sync="construct" width="800px" append-to-body>
      <constructsiteInfo :businessKey="businessKey" :signData="signData" v-if="construct" />
    </el-dialog>
    <!--  会议管理  -->
    <el-dialog :title="title" :visible.sync="conferenceOpen" width="850px" append-to-body>
      <conferenceInfo :idInfo="idInfo" v-if="conferenceOpen"/>
    </el-dialog>

    <!--  请假申请  -->
    <el-dialog :title="title" :visible.sync="leaveApplicationOpen" width="500px" append-to-body>
      <leaveApplicationInfo :idInfo="idInfo" v-if="leaveApplicationOpen"/>
    </el-dialog>


    <el-dialog :title="title" :visible.sync="earthsites" width="800px" append-to-body>
      <earthsitesInfo :businessKey="businessKey"  v-if="earthsites" />
    </el-dialog>

    <el-dialog :title="title" :visible.sync="contract" width="800px" append-to-body>
      <contractInfo :businessKey="businessKey"  v-if="contract" />
    </el-dialog>



    <!--  后勤管理  -->
    <el-dialog :title="title" :visible.sync="logisticsInfoOpen" width="500px" append-to-body
               :close-on-click-modal="false">
      <logisticsInfo :idInfo="idInfo" v-if="logisticsInfoOpen"/>
    </el-dialog>

    <!--  办文办事  -->
    <el-dialog :title="title" :visible.sync="handleAffairsInfoOpen" width="600px" append-to-body
               :close-on-click-modal="false">
      <handleInfo ref="handleAffairsInfoRef" :idInfo="idInfo" v-if="handleAffairsInfoOpen" :depts="depts"
                  :businessKey="definitionKey"
                  :controlId="controlId"/>
    </el-dialog>

    <!--  线下案卷交办  -->
    <el-dialog :title="title" :visible.sync="caseOffline" width="600px" append-to-body :close-on-click-modal="false">
      <caseOfflineInfo :businessKey="businessKey" v-if="caseOffline"/>
    </el-dialog>

    <!--  平台违规信息  -->
    <el-dialog :title="title" :visible.sync="violationCaseFile" width="850px" append-to-body :close-on-click-modal="false">
      <violationCaseFileInfo :idInfo="businessKey" v-if="violationCaseFile"/>
    </el-dialog>

    <!--  违规预警信息  -->
    <el-dialog :title="title" :visible.sync="violationCaseFile1" width="850px" append-to-body :close-on-click-modal="false">
      <violationWarningInformationInfo :idInfo="businessKey" v-if="violationCaseFile1"/>
    </el-dialog>

  </div>
</template>


<style>
  @import '../../../assets/css/task.css'
</style>

<script>
  import {
    listEndTask,
    formDataShow
  } from "@/api/activiti/taskhistory";

  import {  getSignByObjId, addSign, updateSign } from "@/api/sign/sign";
  import taskCard from "@/views/activiti/task/taskCard";
  import earthSitesForm from "@/views/workflow/earthSitesForm";
  import threestepInfo from "@/views/business/threestep/threestepInfo";
  import constructsiteInfo from "@/views/activiti/task/constructsiteInfo";
  import conferenceInfo from "@/views/office/conference/conferenceInfo";
  import leaveApplicationInfo from "@/views/office/leaveApplication/leaveApplicationInfo";
  import earthsitesInfo from "@/views/activiti/task/earthsitesInfo";
  import contractInfo from "@/views/activiti/task/contractInfo";
  import logisticsInfo from "@/views/office/logistics/logisticsInfo";
  import handleInfo from "@/views/office/handle/handleInfo";
  import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";
  import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo";
  import violationWarningInformationInfo from "@/views/casefile/violationWarningInformation/violationWarningInformationInfo";


  export default {
    name: "taskHistory",
    components: {
      taskCard,
      threestepInfo,
      earthSitesForm,
      leaveApplicationInfo,
      conferenceInfo,
      constructsiteInfo
    },
    data() {
      return {
        id: '',
        definitionKey: '',
        businessKey: '',
        // 遮罩层
        loading: true,
        // 选中数组
        ids: [],
        // 非单个禁用
        single: true,
        // 非多个禁用
        multiple: true,
        // 显示搜索条件
        showSearch: true,
        // 总条数
        total: 0,
        // 请假表格数据
        taskList: [],
        // 弹出层标题
        title: "",
        // 是否显示弹出层
        open: false,
        // 查询参数
        queryParams: {
          pageNum: 1,
          pageSize: 10,
        },

        open2:false,
        // 表单参数
        form: {
          formData: []
        },
        needShow:false,
        // 表单校验
        rules: {},

        uploadImageDialog: false,
        conferenceOpen: false,
        construct:false,
        idInfo:null,
        leaveApplicationOpen:false,
        signData:null,
        earthsites:false,
        contract:false,
      };
    },
    created() {
      this.getList();
    },
    methods: {
      /** 查询请假列表 */
      getList() {
        this.loading = true;
        listEndTask(this.queryParams).then(response => {
          this.taskList = response.rows;
          this.total = response.total;
          this.loading = false;
        });
      },

      // 取消按钮
      cancel() {
        this.open = false;
        this.reset();
      },
      // 表单重置
      reset() {
        this.definitionKey = '',
          this.businessKey = '',
          this.form = {
            formData: [],
          };
        this.resetForm("form");
      },
      showTask(row) {

        this.needShow = false;
        this.reset();
        this.definitionKey = row.definitionKey;
        this.businessKey = row.businessKey;
        this.id = row.id;

        this.title = "详情";

        if(this.definitionKey == "conference"){
          this.idInfo = row.businessKey.substring(row.businessKey.indexOf(":")+1);
          this.conferenceOpen = true;
          return;
        }
        if(this.definitionKey == "workflow_leave"){
          this.idInfo = row.businessKey.substring(row.businessKey.lastIndexOf(":")+1);
          this.leaveApplicationOpen = true;
          return;
        }

        if(this.definitionKey == "workflow_constructsite"){
          getSignByObjId(this.businessKey.split(":")[1]).then(res=>{
              this.signData = res;
              this.construct = true;
          });
          return;
        }
          if(this.definitionKey == "workflow_earthsites"){
            this.earthsites = true;
            return;
          }
          if(this.definitionKey == "workflow_conract"){
            this.contract = true;
            return;
          }


        if(this.definitionKey == "workflow_threestep"){
          this.open2 = true;
          return;
        }

          if (this.definitionKey == "logistics") {
            this.idInfo = row.businessKey.substring(row.businessKey.lastIndexOf(":") + 1);
            this.logisticsInfoOpen = true;
            return;
          }
          if (this.definitionKey == "handleAffairs" || this.definitionKey == "gongwenchuli" || this.definitionKey == "yuelan" || this.definitionKey=="yuelanxuexi") {
            this.controlId = this.form.formData[0].controlId;
            this.idInfo = row.businessKey.split(":")[1];
            this.handleAffairsInfoOpen = true;
            return;
          }
          if(this.definitionKey == "workflow_caseoffline"){
            this.caseOffline = true;
            return;
          }

          if(this.definitionKey == "workflow_casefile"){
            this.violationCaseFile = true;
            return;
          }

          if(this.definitionKey == "violation_warning"){
            this.violationCaseFile1 = true;
            return;
          }


      },
    }
  };
</script>