提交代码
parent
4c985bc938
commit
a55c3b2796
|
@ -4,15 +4,20 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.flowable.common.constant.ProcessConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.flowable.common.enums.FlowComment;
|
||||
import com.ruoyi.flowable.domain.vo.ProcKeyRole;
|
||||
import com.ruoyi.flowable.service.IFlowBusinessKeyService;
|
||||
import com.ruoyi.system.domain.FlowProcDefDto;
|
||||
import com.ruoyi.flowable.factory.FlowServiceFactory;
|
||||
import com.ruoyi.flowable.service.IFlowDefinitionService;
|
||||
import com.ruoyi.flowable.service.ISysDeployFormService;
|
||||
import com.ruoyi.system.domain.FlowTaskEntity;
|
||||
import com.ruoyi.system.domain.SysForm;
|
||||
import com.ruoyi.system.mapper.FlowBusinessKeyMapper;
|
||||
import com.ruoyi.system.mapper.FlowDeployMapper;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.ruoyi.system.service.ISysPostService;
|
||||
|
@ -28,6 +33,7 @@ import org.flowable.engine.repository.ProcessDefinitionQuery;
|
|||
import org.flowable.engine.runtime.ProcessInstance;
|
||||
import org.flowable.image.impl.DefaultProcessDiagramGenerator;
|
||||
import org.flowable.task.api.Task;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
@ -62,6 +68,9 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
|
|||
@Resource
|
||||
private FlowDeployMapper flowDeployMapper;
|
||||
|
||||
@Autowired
|
||||
private FlowBusinessKeyMapper flowBusinessKeyMapper;
|
||||
|
||||
private static final String BPMN_FILE_SUFFIX = ".bpmn";
|
||||
|
||||
@Override
|
||||
|
@ -238,6 +247,21 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
|
|||
if (Objects.nonNull(processDefinition) && processDefinition.isSuspended()) {
|
||||
return AjaxResult.error("流程已被挂起,请联系管理员先激活流程");
|
||||
}
|
||||
/*try {
|
||||
//分包单位资质审批需要验证是否已经提交过相关审批
|
||||
if(Objects.equals("9",processDefinition.getCategory())){
|
||||
FlowTaskEntity flowTaskEntity = new FlowTaskEntity();
|
||||
flowTaskEntity.setBusinessKey(Convert.toStr(variables.get("businessKey")));
|
||||
flowTaskEntity.setProcDefKey(processDefinition.getKey());
|
||||
flowTaskEntity.setStartDeptName(SecurityUtils.getLoginUser().getUser().getDept().getDeptName());
|
||||
List<FlowTaskEntity> list = flowBusinessKeyMapper.selectAllFlowTaskByParams(flowTaskEntity);
|
||||
if(StringUtils.isNotEmpty(list)){
|
||||
return AjaxResult.error("当前单位已提交过分包单位资质审批,请勿重复提交");
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}*/
|
||||
// 设置流程发起人Id到流程中
|
||||
identityService.setAuthenticatedUserId(userId);
|
||||
variables.put(ProcessConstants.PROCESS_INITIATOR, userId);
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
<where>
|
||||
<if test="taskName != null and taskName != ''"> and fa.taskName like concat('%', #{taskName}, '%')</if>
|
||||
<if test="procDefName != null and procDefName != ''"> and fa.procDefName like concat('%', #{procDefName}, '%')</if>
|
||||
<if test="procDefKey != null and procDefKey != ''"> and fa.procDefKey = #{procDefKey}</if>
|
||||
<if test="businessKey != null and businessKey != ''"> and fa.businessKey = #{businessKey}</if>
|
||||
<if test="startDeptName != null and startDeptName != ''"> and fa.startDeptName like concat('%', #{startDeptName}, '%')</if>
|
||||
<if test="startUserName != null and startUserName != ''"> and fa.startUserName like concat('%', #{startUserName}, '%')</if>
|
||||
|
|
|
@ -171,6 +171,11 @@
|
|||
<dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="投诉时间" align="center" prop="createTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.checkTime, "{y}-{m}-{d} {h}:{i}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
|
|
|
@ -109,8 +109,42 @@
|
|||
<el-form-item label="审批事项">
|
||||
{{ title }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptType" label="分包类型">
|
||||
<dict-tag
|
||||
:options="dict.type.flow_sub_dept_type"
|
||||
:value="initData.subDeptType"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptScope" label="分包范围">
|
||||
<dict-tag
|
||||
v-for="scope in initData.subDeptScope.split(',')"
|
||||
:options="dict.type.flow_sub_dept_scope"
|
||||
:value="scope"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptName" label="分包名称">
|
||||
{{ initData.subDeptName }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptAptitude" label="分包资质">
|
||||
{{ initData.subDeptAptitude }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptChairman" label="法人代表">
|
||||
{{ initData.subDeptChairman }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptSafetyCertificate" label="安全证书">
|
||||
{{ initData.subDeptSafetyCertificate }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptCustodian" label="项目负责人">
|
||||
{{ initData.subDeptCustodian }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptCustodianCardId" label="负责人身份证">
|
||||
{{ initData.subDeptCustodianCardId }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptApproachDate" label="进场时间">
|
||||
{{ initData.subDeptApproachDate }}
|
||||
</el-form-item>
|
||||
<el-form-item label="审批内容">
|
||||
<div v-for="(file, index) in initData.files" :key="index">
|
||||
<div class="el-link_div" v-for="(file, index) in initData.files" :key="index">
|
||||
<el-link
|
||||
type="primary"
|
||||
icon="el-icon-paperclip"
|
||||
|
@ -119,7 +153,7 @@
|
|||
>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请说明">
|
||||
<el-form-item v-if="initData.remark" label="申请说明">
|
||||
{{ initData.remark }}
|
||||
</el-form-item>
|
||||
<div style="text-align: center">
|
||||
|
@ -142,6 +176,7 @@ import {
|
|||
export default {
|
||||
components: {},
|
||||
props: {},
|
||||
dicts: ["flow_sub_dept_type", "flow_sub_dept_scope"],
|
||||
data() {
|
||||
return {
|
||||
// 抽屉层
|
||||
|
@ -162,7 +197,7 @@ export default {
|
|||
//label样式
|
||||
labelStyle: { width: "180px" },
|
||||
initData: {},
|
||||
fileTypes:['pdf','png','jpg','jpeg'],
|
||||
fileTypes: ["pdf", "png", "jpg", "jpeg"],
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
|
@ -423,7 +458,9 @@ export default {
|
|||
},
|
||||
handledownload(url) {
|
||||
let fileType = url.split(".");
|
||||
if (this.fileTypes.indexOf(fileType[fileType.length-1].toLocaleLowerCase())>-1) {
|
||||
if (
|
||||
this.fileTypes.indexOf(fileType[fileType.length - 1].toLocaleLowerCase()) > -1
|
||||
) {
|
||||
window.open(process.env.VUE_APP_BASE_API + url);
|
||||
} else {
|
||||
this.$download.resource(url);
|
||||
|
@ -475,8 +512,9 @@ export default {
|
|||
float: left;
|
||||
padding-left: 20px;
|
||||
|
||||
.el-link .el-link--inner{
|
||||
word-break: break-all !important;
|
||||
.el-link_div {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
/>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div style="text-align: center;margin-top: 30px;">
|
||||
<div style="text-align: center;margin-top: 20px;margin-bottom: 20px;">
|
||||
<el-button type="primary" @click="submitForm">提交申请</el-button>
|
||||
<el-button @click="doCanel">取 消</el-button>
|
||||
</div>
|
||||
|
|
|
@ -50,6 +50,77 @@
|
|||
<el-form-item label="审批事项">
|
||||
{{ title }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="分包类型" prop="subDeptType">
|
||||
<el-select
|
||||
filterable
|
||||
v-model="form.subDeptType"
|
||||
placeholder="请选择送检类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.flow_sub_dept_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="分包范围" prop="subDeptScope">
|
||||
<el-select
|
||||
filterable
|
||||
multiple
|
||||
v-model="form.subDeptScope"
|
||||
placeholder="请选择送检类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.flow_sub_dept_scope"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="分包名称" prop="subDeptName">
|
||||
<el-input v-model="form.subDeptName" placeholder="请输入分包单位名称" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="分包资质" prop="subDeptAptitude">
|
||||
<el-input v-model="form.subDeptAptitude" placeholder="请输入分包单位资质" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="法人代表" prop="subDeptChairman">
|
||||
<el-input v-model="form.subDeptChairman" placeholder="请输入分包单位法人代表" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="安全证书" prop="subDeptSafetyCertificate">
|
||||
<el-input
|
||||
v-model="form.subDeptSafetyCertificate"
|
||||
placeholder="请输入分包单位安全生产许可证"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="项目负责人" prop="subDeptCustodian">
|
||||
<el-input
|
||||
v-model="form.subDeptCustodian"
|
||||
placeholder="请输入分包单位项目负责人"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="fbAptitude"
|
||||
label="负责人身份证"
|
||||
prop="subDeptCustodianCardId"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.subDeptCustodianCardId"
|
||||
placeholder="请输入分包单位负责人身份证号"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="进场时间" prop="subDeptApproachDate">
|
||||
<el-date-picker
|
||||
v-model="form.subDeptApproachDate"
|
||||
type="date"
|
||||
placeholder="请选择进场日期"
|
||||
style="width: 100%"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批内容" prop="files">
|
||||
<FileUpload
|
||||
@input="fileInput"
|
||||
|
@ -66,7 +137,7 @@
|
|||
rows="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div style="text-align: center">
|
||||
<div style="text-align: center;margin-bottom: 20px;">
|
||||
<el-button type="primary" @click="submitForm">提交流程</el-button>
|
||||
<el-button @click="doCanel">取 消</el-button>
|
||||
</div>
|
||||
|
@ -89,6 +160,7 @@ export default {
|
|||
type: Function,
|
||||
},
|
||||
},
|
||||
dicts: ["flow_sub_dept_type", "flow_sub_dept_scope"],
|
||||
data() {
|
||||
return {
|
||||
// 抽屉层
|
||||
|
@ -107,6 +179,59 @@ export default {
|
|||
// 表单校验
|
||||
rules: {
|
||||
businessKey: [{ required: true, message: "请选择所属项目", trigger: "blur" }],
|
||||
subDeptType: [{ required: true, message: "请选择分包类型", trigger: "blur" }],
|
||||
subDeptScope: [{ required: true, message: "请选择分包范围", trigger: "blur" }],
|
||||
subDeptName: [
|
||||
{ required: true, message: "请输入分包单位名称", trigger: "blur" },
|
||||
{
|
||||
max: 50,
|
||||
message: "分包单位名称最多50字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
subDeptAptitude: [
|
||||
{ required: true, message: "请选择分包单位资质", trigger: "blur" },
|
||||
{
|
||||
max: 50,
|
||||
message: "分包单位资质最多50字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
subDeptChairman: [
|
||||
{ required: true, message: "请输入分包单位法人代表", trigger: "blur" },
|
||||
{
|
||||
max: 20,
|
||||
message: "分包单位法人代表最多20字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
subDeptSafetyCertificate: [
|
||||
{ required: true, message: "请输入分包单位安全生产许可证", trigger: "blur" },
|
||||
{
|
||||
max: 50,
|
||||
message: "分包单位安全生产许可证最多50字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
subDeptCustodian: [
|
||||
{ required: true, message: "请输入分包单位项目负责人", trigger: "blur" },
|
||||
{
|
||||
max: 20,
|
||||
message: "分包单位项目负责人最多20字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
subDeptCustodianCardId: [
|
||||
{ required: true, message: "请输入分包单位负责人身份证号", trigger: "blur" },
|
||||
{
|
||||
pattern: /^[1-9]\d{5}(18|19|20|21|22)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$/,
|
||||
message: "请输入正确的身份证号",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
subDeptApproachDate: [
|
||||
{ required: true, message: "请选择分包单位进场时间", trigger: "blur" },
|
||||
],
|
||||
files: [{ required: true, message: "请上传申请内容", trigger: "blur" }],
|
||||
remark: [
|
||||
{ required: false, message: "请输入申请说明", trigger: "blur" },
|
||||
|
@ -126,6 +251,7 @@ export default {
|
|||
taskTitle: null,
|
||||
taskOpen: false,
|
||||
daterangeMarksTime: [],
|
||||
fbAptitude: false,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
|
@ -152,6 +278,10 @@ export default {
|
|||
this.options = options;
|
||||
this.onOpen = true;
|
||||
this.title = options.procDefName;
|
||||
//初始化流程类型
|
||||
if (options.category == "9") {
|
||||
this.fbAptitude = true;
|
||||
}
|
||||
this.initFormDate(options.procInsId);
|
||||
flowXmlAndNode({ procInsId: options.procInsId, deployId: options.deployId }).then(
|
||||
(res) => {
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
<el-button v-if="getActivate(scope.row)" @click="handleActivate(scope.row)" type="text" size="small" icon="el-icon-edit-outline">处理</el-button>
|
||||
<el-button @click="handleFlowRecord(scope.row)" type="text" size="small" icon="el-icon-finished">详情</el-button>
|
||||
<el-button v-if="scope.row.finishTime == null" @click="handleStop(scope.row)" type="text" size="small" icon="el-icon-switch-button">终止</el-button>
|
||||
<el-button v-if="scope.row.finishTime == null" @click="handleDelete(scope.row)" type="text" size="small" icon="el-icon-delete" v-hasPermi="['system:deployment:remove']">删除</el-button>
|
||||
<el-button v-if="scope.row.finishTime == null || superAdmin" @click="handleDelete(scope.row)" type="text" size="small" icon="el-icon-delete" v-hasPermi="['system:deployment:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -344,9 +344,13 @@ export default {
|
|||
activeName:"await",
|
||||
showPro:false,
|
||||
projectOptions: null,
|
||||
superAdmin:false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if(this.$store.getters.userId==1){
|
||||
this.superAdmin=true;
|
||||
}
|
||||
this.queryParams.activeName = this.activeName;
|
||||
this.getList();
|
||||
this.initMyProject();
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
/>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div style="text-align: center;margin-top: 30px;">
|
||||
<div style="text-align: center;margin-top: 20px;margin-bottom: 20px;">
|
||||
<el-button type="primary" @click="submitForm">提交申请</el-button>
|
||||
<el-button @click="doCanel">取 消</el-button>
|
||||
</div>
|
||||
|
|
|
@ -1,250 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-drawer
|
||||
v-if="onOpen"
|
||||
:visible.sync="onOpen"
|
||||
ref="drawer"
|
||||
direction="rtl"
|
||||
size="60%"
|
||||
@close="closeCallBack"
|
||||
style="padding-left: 20px; padding-right: 20px"
|
||||
>
|
||||
<template slot="title">
|
||||
<div>工程管理 【{{ title }}】</div>
|
||||
</template>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
v-loading="loading"
|
||||
label-width="120px"
|
||||
style="padding-right: 35px"
|
||||
>
|
||||
<div class="canvas" ref="flowCanvas"></div>
|
||||
<div class="maskLayer" />
|
||||
<el-form-item label="所属项目" prop="businessKey">
|
||||
<el-select
|
||||
v-model="form.businessKey"
|
||||
placeholder="请选择所属项目"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
:disabled="disPro"
|
||||
@change="projectChage"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in projectOptions"
|
||||
:key="index"
|
||||
:label="item.projectName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发起单位">
|
||||
{{ deptName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="发起人">
|
||||
{{ nickName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="审批事项">
|
||||
{{ title }}
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="审批内容"
|
||||
prop="files"
|
||||
v-if="
|
||||
options.flowKey != 'flow_xmglzdl_qjsp' && options.flowKey != 'flow_aql_sxkj'
|
||||
"
|
||||
>
|
||||
<FileUpload
|
||||
@input="fileInput"
|
||||
:limit="9"
|
||||
:fileType="['pdf', 'png', 'jpg', 'jpeg']"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="申请说明"
|
||||
prop="remark"
|
||||
v-if="
|
||||
options.flowKey != 'flow_xmglzdl_qjsp' && options.flowKey != 'flow_aql_sxkj'
|
||||
"
|
||||
>
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="form.remark"
|
||||
placeholder="请输入申请说明"
|
||||
rows="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: center">
|
||||
<el-button type="primary" @click="submitForm">提交流程</el-button>
|
||||
<el-button @click="doCanel">取 消</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import store from "@/store";
|
||||
import { definitionStart, flowXmlAndNode } from "@/api/flowable/definition";
|
||||
import { CustomViewer as BpmnViewer } from "@/components/customBpmn";
|
||||
import { getNextFlowNodeByStart } from "@/api/flowable/todo";
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
closeCallBack: {
|
||||
type: Function,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 抽屉层
|
||||
onOpen: false,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 标题
|
||||
title: "",
|
||||
// 表单参数
|
||||
form: {
|
||||
businessKey: "",
|
||||
projectName: "",
|
||||
files: "",
|
||||
remark: "",
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
businessKey: [{ required: true, message: "请选择所属项目", trigger: "blur" }],
|
||||
files: [{ required: true, message: "请上传申请内容", trigger: "blur" }],
|
||||
remark: [
|
||||
{ required: false, message: "请输入申请说明", trigger: "blur" },
|
||||
{
|
||||
max: 500,
|
||||
message: "申请说明最多输入500字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
projectOptions: null,
|
||||
deptName: null,
|
||||
nickName: null,
|
||||
disPro: false,
|
||||
bpmnViewer: null,
|
||||
options: {},
|
||||
taskTitle: null,
|
||||
taskOpen: false,
|
||||
daterangeMarksTime: [],
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
beforeDestroy() {},
|
||||
methods: {
|
||||
// 查询和我相关的项目信息
|
||||
initMyProject() {
|
||||
// 获取项目列表的接口
|
||||
this.$api.publics.getMyProjectList({}).then((response) => {
|
||||
this.projectOptions = response.rows;
|
||||
if (response.rows.length == 0) {
|
||||
this.$message.error("未查询到和您关联项目,请联系子公司或管理员...");
|
||||
} else if (response.rows.length == 1) {
|
||||
// 这里只有一个项目,默认选中并只读
|
||||
this.form.businessKey = response.rows[0].id;
|
||||
this.form.projectName = response.rows[0].projectName;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 项目选择
|
||||
projectChage(val) {
|
||||
let projectName = "";
|
||||
this.projectOptions.forEach((item) => {
|
||||
if ((item.id = val)) {
|
||||
projectName = item.projectName;
|
||||
return;
|
||||
}
|
||||
});
|
||||
this.form.projectName = projectName;
|
||||
},
|
||||
doCanel() {
|
||||
this.onOpen = false;
|
||||
},
|
||||
show(options) {
|
||||
this.options = options;
|
||||
this.initMyProject();
|
||||
this.title = options.name;
|
||||
this.deptName = store.getters.dept.deptName;
|
||||
this.nickName = store.getters.name;
|
||||
const self = this;
|
||||
this.onOpen = true;
|
||||
flowXmlAndNode({ deployId: options.deploymentId }).then((res) => {
|
||||
this.initFlowImage(res.data.xmlData);
|
||||
});
|
||||
},
|
||||
async initFlowImage(data) {
|
||||
try {
|
||||
self.bpmnViewer = new BpmnViewer({
|
||||
container: this.$refs.flowCanvas,
|
||||
height: "150px",
|
||||
});
|
||||
await self.bpmnViewer.importXML(data);
|
||||
// 自适应
|
||||
self.bpmnViewer.get("canvas").zoom("fit-viewport", "auto");
|
||||
} catch (err) {
|
||||
console.error(err.message, err.warnings);
|
||||
}
|
||||
},
|
||||
fileInput(files) {
|
||||
let fileUrls = "";
|
||||
if (files.length > 0) {
|
||||
fileUrls = "";
|
||||
files.forEach((item) => {
|
||||
fileUrls += "," + item.url;
|
||||
});
|
||||
fileUrls = fileUrls.substring(1);
|
||||
}
|
||||
this.form.files = fileUrls;
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
// 根据当前任务或者流程设计配置的下一步节点 todo 暂时未涉及到考虑网关、表达式和多节点情况
|
||||
// getNextFlowNodeByStart({
|
||||
// deploymentId: this.options.deploymentId,
|
||||
// variables: this.form,
|
||||
// }).then((res) => {
|
||||
// const data = res.data;
|
||||
// if (data) {
|
||||
// console.log(data);
|
||||
// this.loading = false;
|
||||
// }
|
||||
// });
|
||||
// 启动流程并将表单数据加入流程变量
|
||||
|
||||
definitionStart(this.options.id, JSON.stringify(this.form)).then((res) => {
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
this.loading = false;
|
||||
//关闭并刷新列表
|
||||
this.$refs.drawer.closeDrawer();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.bjs-powered-by {
|
||||
display: none !important;
|
||||
}
|
||||
.maskLayer {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
top: 66px;
|
||||
}
|
||||
</style>
|
|
@ -50,6 +50,77 @@
|
|||
<el-form-item label="审批事项">
|
||||
{{ title }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="分包类型" prop="subDeptType">
|
||||
<el-select
|
||||
filterable
|
||||
v-model="form.subDeptType"
|
||||
placeholder="请选择送检类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.flow_sub_dept_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="分包范围" prop="subDeptScope">
|
||||
<el-select
|
||||
filterable
|
||||
multiple
|
||||
v-model="form.subDeptScope"
|
||||
placeholder="请选择送检类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.flow_sub_dept_scope"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="分包名称" prop="subDeptName">
|
||||
<el-input v-model="form.subDeptName" placeholder="请输入分包单位名称" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="分包资质" prop="subDeptAptitude">
|
||||
<el-input v-model="form.subDeptAptitude" placeholder="请输入分包单位资质" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="法人代表" prop="subDeptChairman">
|
||||
<el-input v-model="form.subDeptChairman" placeholder="请输入分包单位法人代表" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="安全证书" prop="subDeptSafetyCertificate">
|
||||
<el-input
|
||||
v-model="form.subDeptSafetyCertificate"
|
||||
placeholder="请输入分包单位安全生产许可证"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="项目负责人" prop="subDeptCustodian">
|
||||
<el-input
|
||||
v-model="form.subDeptCustodian"
|
||||
placeholder="请输入分包单位项目负责人"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="fbAptitude"
|
||||
label="负责人身份证"
|
||||
prop="subDeptCustodianCardId"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.subDeptCustodianCardId"
|
||||
placeholder="请输入分包单位负责人身份证号"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="fbAptitude" label="进场时间" prop="subDeptApproachDate">
|
||||
<el-date-picker
|
||||
v-model="form.subDeptApproachDate"
|
||||
type="date"
|
||||
placeholder="请选择进场日期"
|
||||
style="width: 100%"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批内容" prop="files">
|
||||
<FileUpload
|
||||
@input="fileInput"
|
||||
|
@ -65,7 +136,7 @@
|
|||
rows="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div style="text-align: center">
|
||||
<div style="text-align: center;margin-bottom: 20px;">
|
||||
<el-button type="primary" @click="submitForm">提交流程</el-button>
|
||||
<el-button @click="doCanel">取 消</el-button>
|
||||
</div>
|
||||
|
@ -87,6 +158,7 @@ export default {
|
|||
type: Function,
|
||||
},
|
||||
},
|
||||
dicts: ["flow_sub_dept_type", "flow_sub_dept_scope"],
|
||||
data() {
|
||||
return {
|
||||
// 抽屉层
|
||||
|
@ -105,6 +177,59 @@ export default {
|
|||
// 表单校验
|
||||
rules: {
|
||||
businessKey: [{ required: true, message: "请选择所属项目", trigger: "blur" }],
|
||||
subDeptType: [{ required: true, message: "请选择分包类型", trigger: "blur" }],
|
||||
subDeptScope: [{ required: true, message: "请选择分包范围", trigger: "blur" }],
|
||||
subDeptName: [
|
||||
{ required: true, message: "请输入分包单位名称", trigger: "blur" },
|
||||
{
|
||||
max: 50,
|
||||
message: "分包单位名称最多50字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
subDeptAptitude: [
|
||||
{ required: true, message: "请选择分包单位资质", trigger: "blur" },
|
||||
{
|
||||
max: 50,
|
||||
message: "分包单位资质最多50字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
subDeptChairman: [
|
||||
{ required: true, message: "请输入分包单位法人代表", trigger: "blur" },
|
||||
{
|
||||
max: 20,
|
||||
message: "分包单位法人代表最多20字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
subDeptSafetyCertificate: [
|
||||
{ required: true, message: "请输入分包单位安全生产许可证", trigger: "blur" },
|
||||
{
|
||||
max: 50,
|
||||
message: "分包单位安全生产许可证最多50字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
subDeptCustodian: [
|
||||
{ required: true, message: "请输入分包单位项目负责人", trigger: "blur" },
|
||||
{
|
||||
max: 20,
|
||||
message: "分包单位项目负责人最多20字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
subDeptCustodianCardId: [
|
||||
{ required: true, message: "请输入分包单位负责人身份证号", trigger: "blur" },
|
||||
{
|
||||
pattern: /^[1-9]\d{5}(18|19|20|21|22)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$/,
|
||||
message: "请输入正确的身份证号",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
subDeptApproachDate: [
|
||||
{ required: true, message: "请选择分包单位进场时间", trigger: "blur" },
|
||||
],
|
||||
files: [{ required: true, message: "请上传申请内容", trigger: "blur" }],
|
||||
remark: [
|
||||
{ required: false, message: "请输入申请说明", trigger: "blur" },
|
||||
|
@ -124,6 +249,8 @@ export default {
|
|||
taskTitle: null,
|
||||
taskOpen: false,
|
||||
daterangeMarksTime: [],
|
||||
//分包资质审批
|
||||
fbAptitude: false,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
|
@ -166,6 +293,10 @@ export default {
|
|||
this.title = options.name;
|
||||
this.deptName = store.getters.dept.deptName;
|
||||
this.nickName = store.getters.name;
|
||||
//初始化流程类型
|
||||
if (options.category == "9") {
|
||||
this.fbAptitude = true;
|
||||
}
|
||||
const self = this;
|
||||
this.onOpen = true;
|
||||
flowXmlAndNode({ deployId: options.deploymentId }).then((res) => {
|
||||
|
|
|
@ -114,8 +114,42 @@
|
|||
<el-form-item label="审批事项">
|
||||
{{ title }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptType" label="分包类型">
|
||||
<dict-tag
|
||||
:options="dict.type.flow_sub_dept_type"
|
||||
:value="initData.subDeptType"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptScope" label="分包范围">
|
||||
<dict-tag
|
||||
v-for="scope in initData.subDeptScope.split(',')"
|
||||
:options="dict.type.flow_sub_dept_scope"
|
||||
:value="scope"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptName" label="分包名称">
|
||||
{{ initData.subDeptName }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptAptitude" label="分包资质">
|
||||
{{ initData.subDeptAptitude }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptChairman" label="法人代表">
|
||||
{{ initData.subDeptChairman }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptSafetyCertificate" label="安全证书">
|
||||
{{ initData.subDeptSafetyCertificate }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptCustodian" label="项目负责人">
|
||||
{{ initData.subDeptCustodian }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptCustodianCardId" label="负责人身份证">
|
||||
{{ initData.subDeptCustodianCardId }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="initData.subDeptApproachDate" label="进场时间">
|
||||
{{ initData.subDeptApproachDate }}
|
||||
</el-form-item>
|
||||
<el-form-item label="审批内容">
|
||||
<div v-for="(file, index) in initData.files" :key="index">
|
||||
<div class="el-link_div" v-for="(file, index) in initData.files" :key="index">
|
||||
<el-link
|
||||
type="primary"
|
||||
icon="el-icon-paperclip"
|
||||
|
@ -124,7 +158,7 @@
|
|||
>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请说明">
|
||||
<el-form-item v-if="initData.remark" label="申请说明">
|
||||
{{ initData.remark }}
|
||||
</el-form-item>
|
||||
<el-form-item label="审批意见" prop="comment">
|
||||
|
@ -218,6 +252,7 @@ export default {
|
|||
type: Function,
|
||||
},
|
||||
},
|
||||
dicts: ["flow_sub_dept_type", "flow_sub_dept_scope"],
|
||||
data() {
|
||||
return {
|
||||
// 抽屉层
|
||||
|
@ -672,9 +707,10 @@ export default {
|
|||
height: 100%;
|
||||
float: left;
|
||||
padding-left: 20px;
|
||||
|
||||
.el-link .el-link--inner{
|
||||
word-break: break-all !important;
|
||||
|
||||
.el-link_div {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
(select count(1) from vw_flow_all a where a.businessKey = sp.id and a.startDeptName = pui.unitName and a.finishTime is not null)as gcsp,
|
||||
(select count(1) from sur_project_standard a where a.project_id = sp.id and a.dept_id = pui.unitId and a.is_del=0)as bzh,
|
||||
(select count(1) from sur_project_photography a where a.project_id = sp.id and a.is_del=0)as yssys,
|
||||
(select count(1) from flow_labour_info a where a.project_id = sp.id and a.deptId=pui.unitId and a.is_del=0) as lzyjs,
|
||||
(select count(1) from flow_labour_info a where a.project_id = sp.id and a.dept_id=pui.unitId and a.is_del=0) as lzyjs,
|
||||
'0' as hjyjs,
|
||||
(select count(1) from smz_ssp_problemmodify a where a.projectId=sp.id and a.infoType=1 and a.isDel=0 and a.checkState!=4 and date(NOW())<![CDATA[ > ]]> date(a.nickedTime)) as zlyjs,
|
||||
(select count(1) from smz_ssp_problemmodify a where a.projectId=sp.id and a.infoType=0 and a.isDel=0 and a.checkState!=4 and date(NOW())<![CDATA[ > ]]> date(a.nickedTime)) as aqyjs,
|
||||
|
|
Loading…
Reference in New Issue