提交代码

dev_xds
姜玉琦 2023-09-05 00:45:38 +08:00
parent 5e1c11b9a4
commit 0f0ab5dc80
27 changed files with 978 additions and 370 deletions

View File

@ -9,6 +9,9 @@ public enum SysRoleEnum {
JLDW("5", "监理单位"),
ZBDW("6", "总包单位"),
FBDW("7", "分包单位"),
JLDWGR("15", "监理单位"),
ZBDWGR("16", "总包单位"),
FBDWGR("17", "分包单位"),
COMMON("99", "普通角色");
private final String code;

View File

@ -60,8 +60,9 @@ public class FlowDefinitionController extends BaseController {
@ApiOperation(value = "流程定义列表", response = FlowProcDefDto.class)
public AjaxResult list(@ApiParam(value = "当前页码", required = true) @RequestParam Integer pageNum,
@ApiParam(value = "每页条数", required = true) @RequestParam Integer pageSize,
@ApiParam(value = "流程名称", required = false) @RequestParam(required = false) String name) {
return AjaxResult.success(flowDefinitionService.list(name, pageNum, pageSize));
@ApiParam(value = "流程名称", required = false) @RequestParam(required = false) String name,
@ApiParam(value = "流程类型", required = false) @RequestParam(required = false) String category) {
return AjaxResult.success(flowDefinitionService.list(category, name, pageNum, pageSize));
}

View File

@ -20,6 +20,9 @@ public class FlowQueryVo {
@ApiModelProperty("流程名称")
private String name;
@ApiModelProperty("流程类型")
private String category;
@ApiModelProperty("开始时间")
private String startTime;

View File

@ -24,7 +24,7 @@ public interface IFlowDefinitionService {
* @param pageSize
* @return
*/
Page<FlowProcDefDto> list(String name,Integer pageNum, Integer pageSize);
Page<FlowProcDefDto> list(String category, String name,Integer pageNum, Integer pageSize);
/**
*

View File

@ -80,7 +80,7 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
* @return
*/
@Override
public Page<FlowProcDefDto> list(String name, Integer pageNum, Integer pageSize) {
public Page<FlowProcDefDto> list(String category, String name, Integer pageNum, Integer pageSize) {
Page<FlowProcDefDto> page = new Page<>();
// // 流程定义列表数据查询
// final ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery();
@ -107,15 +107,18 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
// dataList.add(reProcDef);
// }
PageHelper.startPage(pageNum, pageSize);
final List<FlowProcDefDto> dataList = flowDeployMapper.selectDeployList(name);
final List<FlowProcDefDto> dataList = flowDeployMapper.selectDeployList(category, name);
/**
*
*/
// 加载挂表单
for (FlowProcDefDto procDef : dataList) {
SysForm sysForm = sysDeployFormService.selectSysDeployFormByDeployId(procDef.getDeploymentId());
if (Objects.nonNull(sysForm)) {
procDef.setFormName(sysForm.getFormName());
procDef.setFormId(sysForm.getFormId());
}
}
//for (FlowProcDefDto procDef : dataList) {
//SysForm sysForm = sysDeployFormService.selectSysDeployFormByDeployId(procDef.getDeploymentId());
//if (Objects.nonNull(sysForm)) {
// procDef.setFormName(sysForm.getFormName());
// procDef.setFormId(sysForm.getFormId());
//}
//}
page.setTotal(new PageInfo(dataList).getTotal());
page.setRecords(dataList);
return page;

View File

@ -1,6 +1,7 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.FlowProcDefDto;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -18,5 +19,5 @@ public interface FlowDeployMapper {
* @param name
* @return
*/
List<FlowProcDefDto> selectDeployList(String name);
List<FlowProcDefDto> selectDeployList(@Param("category")String category, @Param("name")String name);
}

View File

@ -23,6 +23,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="name != null and name != ''">
and rd.name_ like concat('%', #{name}, '%')
</if>
<if test="category != null and category != ''">
and rd.category_ = #{category}
</if>
</where>
order by rd.deploy_time_ desc
</select>

View File

@ -1,25 +1,51 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名称" prop="name">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="流程名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入名称"
placeholder="请输入流程名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="开始时间" prop="deployTime">
<el-date-picker clearable size="small"
v-model="queryParams.deployTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择时间">
<el-form-item label="流程分类" prop="category">
<el-select
v-model="queryParams.category"
@keyup.enter.native="handleQuery"
placeholder="请选择流程分类"
clearable
>
<el-option
v-for="dict in dict.type.sys_process_category"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="开始时间" prop="deployTime" v-if="false">
<el-date-picker
clearable
size="small"
v-model="queryParams.deployTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择时间"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
@ -41,7 +67,8 @@
icon="el-icon-plus"
size="mini"
@click="handleLoadXml"
>新增</el-button>
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
@ -52,25 +79,53 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:deployment:remove']"
>删除</el-button>
>删除</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-alert title="流程设计说明" type="success">
<template slot='title'>
<template slot="title">
<p>流程设计说明:</p>
<div>1XML文件中的流程定义id属性用作流程定义的key参数</div>
<div>2XML文件中的流程定义name属性用作流程定义的name参数如果未给定name属性会使用id作为name</div>
<div>3当每个唯一key的流程第一次部署时指定版本为1对其后所有使用相同key的流程定义部署时版本会在该key当前已部署的最高版本号基础上加1key参数用于区分流程定义</div>
<div>4id参数设置为{processDefinitionKey}:{processDefinitionVersion}:{generated-id}其中generated-id是一个唯一数字用以保证在集群环境下流程定义缓存中流程id的唯一性</div>
<div>
2XML文件中的流程定义name属性用作流程定义的name参数如果未给定name属性会使用id作为name
</div>
<div>
3当每个唯一key的流程第一次部署时指定版本为1对其后所有使用相同key的流程定义部署时版本会在该key当前已部署的最高版本号基础上加1key参数用于区分流程定义
</div>
<div>
4id参数设置为{processDefinitionKey}:{processDefinitionVersion}:{generated-id}其中generated-id是一个唯一数字用以保证在集群环境下流程定义缓存中流程id的唯一性
</div>
</template>
</el-alert>
<el-table v-loading="loading" fit :data="definitionList" border @selection-change="handleSelectionChange">
<el-table
v-loading="loading"
fit
:data="definitionList"
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="流程编号" align="center" prop="deploymentId" :show-overflow-tooltip="true"/>
<el-table-column label="流程标识" align="center" prop="flowKey" :show-overflow-tooltip="true" />
<el-table-column
label="流程编号"
align="center"
prop="deploymentId"
:show-overflow-tooltip="true"
/>
<el-table-column
label="流程标识"
align="center"
prop="flowKey"
:show-overflow-tooltip="true"
/>
<el-table-column label="流程分类" align="center" prop="category" />
<el-table-column label="流程名称" align="center" width="120" :show-overflow-tooltip="true">
<el-table-column
label="流程名称"
align="center"
width="120"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<el-button type="text" @click="handleReadImage(scope.row.deploymentId)">
<span>{{ scope.row.name }}</span>
@ -79,7 +134,11 @@
</el-table-column>
<el-table-column label="业务表单" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-button v-if="scope.row.formId" type="text" @click="handleForm(scope.row.formId)">
<el-button
v-if="scope.row.formId"
type="text"
@click="handleForm(scope.row.formId)"
>
<span>{{ scope.row.formName }}</span>
</el-button>
<label v-else></label>
@ -87,7 +146,7 @@
</el-table-column>
<el-table-column label="流程版本" align="center">
<template slot-scope="scope">
<el-tag size="medium" >v{{ scope.row.version }}</el-tag>
<el-tag size="medium">v{{ scope.row.version }}</el-tag>
</template>
</el-table-column>
<el-table-column label="状态" align="center">
@ -96,20 +155,64 @@
<el-tag type="warning" v-if="scope.row.suspensionState === 2"></el-tag>
</template>
</el-table-column>
<el-table-column label="部署时间" align="center" prop="deploymentTime" width="180"/>
<el-table-column label="操作" width="250" fixed="right"class-name="small-padding fixed-width">
<el-table-column
label="部署时间"
align="center"
prop="deploymentTime"
width="180"
/>
<el-table-column
label="操作"
width="250"
fixed="right"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button @click="handleLoadXml(scope.row)" icon="el-icon-edit-outline" type="text" size="small">设计</el-button>
<el-button @click="handleAddForm(scope.row)" icon="el-icon-edit-el-icon-s-promotion" type="text" size="small" v-if="scope.row.formId == null"></el-button>
<el-button @click="handleUpdateSuspensionState(scope.row)" icon="el-icon-video-pause" type="text" size="small" v-if="scope.row.suspensionState === 1"></el-button>
<el-button @click="handleUpdateSuspensionState(scope.row)" icon="el-icon-video-play" type="text" size="small" v-if="scope.row.suspensionState === 2"></el-button>
<el-button @click="handleDelete(scope.row)" icon="el-icon-delete" type="text" size="small" v-hasPermi="['system:deployment:remove']"></el-button>
<el-button
@click="handleLoadXml(scope.row)"
icon="el-icon-edit-outline"
type="text"
size="small"
>设计</el-button
>
<el-button
@click="handleAddForm(scope.row)"
icon="el-icon-edit-el-icon-s-promotion"
type="text"
size="small"
v-if="scope.row.formId == null"
>配置主表单</el-button
>
<el-button
@click="handleUpdateSuspensionState(scope.row)"
icon="el-icon-video-pause"
type="text"
size="small"
v-if="scope.row.suspensionState === 1"
>挂起</el-button
>
<el-button
@click="handleUpdateSuspensionState(scope.row)"
icon="el-icon-video-play"
type="text"
size="small"
v-if="scope.row.suspensionState === 2"
>激活</el-button
>
<el-button
@click="handleDelete(scope.row)"
icon="el-icon-delete"
type="text"
size="small"
v-hasPermi="['system:deployment:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@ -130,13 +233,18 @@
</el-dialog>
<!-- bpmn20.xml导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-dialog
:title="upload.title"
:visible.sync="upload.open"
width="400px"
append-to-body
>
<el-upload
ref="upload"
:limit="1"
accept=".xml"
:headers="upload.headers"
:action="upload.url + '?name=' + upload.name+'&category='+ upload.category"
:action="upload.url + '?name=' + upload.name + '&category=' + upload.category"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
@ -149,7 +257,7 @@
<em>点击上传</em>
</div>
<div class="el-upload__tip" slot="tip">
流程名称<el-input v-model="upload.name"/>
流程名称<el-input v-model="upload.name" />
流程分类
<div>
<!-- <el-input v-model="upload.category"/>-->
@ -163,7 +271,9 @@
</el-select>
</div>
</div>
<div class="el-upload__tip" style="color:red" slot="tip">提示仅允许导入bpmn20.xml格式文件</div>
<div class="el-upload__tip" style="color: red" slot="tip">
提示仅允许导入bpmn20.xml格式文件
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
@ -172,20 +282,30 @@
</el-dialog>
<!-- 流程图 -->
<el-dialog :title="readImage.title" :visible.sync="readImage.open" width="70%" append-to-body>
<el-dialog
:title="readImage.title"
:visible.sync="readImage.open"
width="70%"
append-to-body
>
<!-- <el-image :src="readImage.src"></el-image> -->
<flow :flowData="flowData"/>
<flow :flowData="flowData" />
</el-dialog>
<!--表单配置详情-->
<el-dialog :title="formTitle" :visible.sync="formConfOpen" width="50%" append-to-body>
<div class="test-form">
<parser :key="new Date().getTime()" :form-conf="formConf" />
<parser :key="new Date().getTime()" :form-conf="formConf" />
</div>
</el-dialog>
<!--挂载表单-->
<el-dialog :title="formDeployTitle" :visible.sync="formDeployOpen" width="60%" append-to-body>
<el-dialog
:title="formDeployTitle"
:visible.sync="formDeployOpen"
width="60%"
append-to-body
>
<el-row :gutter="24">
<el-col :span="10" :xs="24">
<el-table
@ -194,12 +314,19 @@
border
highlight-current-row
@current-change="handleCurrentChange"
style="width: 100%">
style="width: 100%"
>
<el-table-column label="表单编号" align="center" prop="formId" />
<el-table-column label="表单名称" align="center" prop="formName" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button size="mini" type="text" @click="submitFormDeploy(scope.row)"></el-button>
<el-button size="mini" type="text" @click="submitFormDeploy(scope.row)"
>确定</el-button
>
</template>
</el-table-column>
</el-table>
@ -207,7 +334,7 @@
<pagination
small
layout="prev, pager, next"
v-show="formTotal>0"
v-show="formTotal > 0"
:total="formTotal"
:page.sync="formQueryParams.pageNum"
:limit.sync="formQueryParams.pageSize"
@ -244,21 +371,21 @@ import {
updateDeployment,
exportDeployment,
definitionStart,
flowXmlAndNode
flowXmlAndNode,
} from "@/api/flowable/definition";
import { getToken } from "@/utils/auth";
import { getForm, addDeployForm ,listForm } from "@/api/flowable/form";
import Parser from '@/components/parser/Parser'
import flow from '@/views/flowable/task/myProcess/send/flow'
import Model from './model';
import { getForm, addDeployForm, listForm } from "@/api/flowable/form";
import Parser from "@/components/parser/Parser";
import flow from "@/views/flowable/task/myProcess/send/flow";
import Model from "./model";
export default {
name: "Definition",
dicts: ['sys_process_category'],
dicts: ["sys_process_category"],
components: {
Parser,
flow,
Model
Model,
},
data() {
return {
@ -286,9 +413,9 @@ export default {
formDeployOpen: false,
formDeployTitle: "",
formList: [],
formTotal:0,
formTotal: 0,
formConf: {}, //
readImage:{
readImage: {
open: false,
src: "",
},
@ -305,7 +432,7 @@ export default {
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/flowable/definition/import"
url: process.env.VUE_APP_BASE_API + "/flowable/definition/import",
},
//
queryParams: {
@ -319,26 +446,25 @@ export default {
derivedFrom: null,
derivedFromRoot: null,
parentDeploymentId: null,
engineVersion: null
engineVersion: null,
},
formQueryParams:{
formQueryParams: {
pageNum: 1,
pageSize: 10,
},
//
formDeployParam:{
formDeployParam: {
formId: null,
deployId: null
deployId: null,
},
deployId: '',
deployId: "",
currentRow: null,
// xml
flowData: {},
//
form: {},
//
rules: {
}
rules: {},
};
},
created() {
@ -354,20 +480,22 @@ export default {
/** 查询流程定义列表 */
getList() {
this.loading = true;
listDefinition(this.queryParams).then(response => {
listDefinition(this.queryParams).then((response) => {
this.definitionList = response.data.records;
this.total = response.data.total;
this.loading = false;
});
},
handleClose(done) {
this.$confirm('确定要关闭吗?关闭未保存的修改都会丢失?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
done();
}).catch(() => {});
this.$confirm("确定要关闭吗?关闭未保存的修改都会丢失?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
done();
})
.catch(() => {});
},
//
cancel() {
@ -386,7 +514,7 @@ export default {
derivedFrom: null,
derivedFromRoot: null,
parentDeploymentId: null,
engineVersion: null
engineVersion: null,
};
this.resetForm("form");
},
@ -402,9 +530,9 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.deploymentId)
this.single = selection.length!==1
this.multiple = !selection.length
this.ids = selection.map((item) => item.deploymentId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
@ -413,47 +541,50 @@ export default {
this.title = "添加流程定义";
},
/** 跳转到流程设计页面 */
handleLoadXml(row){
handleLoadXml(row) {
// this.dialogVisible = true;
// this.deployId = row.deploymentId;
this.$router.push({ path: '/flowable/definition/model',query: { deployId: row.deploymentId }})
this.$router.push({
path: "/flowable/definition/model",
query: { deployId: row.deploymentId },
});
},
/** 流程图查看 */
handleReadImage(deployId){
handleReadImage(deployId) {
this.readImage.title = "流程图";
this.readImage.open = true;
// this.readImage.src = process.env.VUE_APP_BASE_API + "/flowable/definition/readImage/" + deploymentId;
flowXmlAndNode({deployId:deployId}).then(res => {
flowXmlAndNode({ deployId: deployId }).then((res) => {
this.flowData = res.data;
})
});
},
/** 表单查看 */
handleForm(formId){
getForm(formId).then(res =>{
handleForm(formId) {
getForm(formId).then((res) => {
this.formTitle = "表单详情";
this.formConfOpen = true;
this.formConf = JSON.parse(res.data.formContent)
})
this.formConf = JSON.parse(res.data.formContent);
});
},
/** 启动流程 */
handleDefinitionStart(row){
definitionStart(row.id).then(res =>{
handleDefinitionStart(row) {
definitionStart(row.id).then((res) => {
this.$modal.msgSuccess(res.msg);
})
});
},
/** 挂载表单弹框 */
handleAddForm(row){
this.formDeployParam.deployId = row.deploymentId
this.ListFormDeploy()
handleAddForm(row) {
this.formDeployParam.deployId = row.deploymentId;
this.ListFormDeploy();
},
/** 挂载表单列表 */
ListFormDeploy(){
listForm(this.formQueryParams).then(res =>{
ListFormDeploy() {
listForm(this.formQueryParams).then((res) => {
this.formList = res.rows;
this.formTotal = res.total;
this.formDeployOpen = true;
this.formDeployTitle = "挂载表单";
})
});
},
// /** */
// handleEditForm(row){
@ -469,13 +600,13 @@ export default {
// })
// },
/** 挂载表单 */
submitFormDeploy(row){
submitFormDeploy(row) {
this.formDeployParam.formId = row.formId;
addDeployForm(this.formDeployParam).then(res =>{
addDeployForm(this.formDeployParam).then((res) => {
this.$modal.msgSuccess(res.msg);
this.formDeployOpen = false;
this.getList();
})
});
},
handleCurrentChange(data) {
if (data) {
@ -483,16 +614,16 @@ export default {
}
},
/** 挂起/激活流程 */
handleUpdateSuspensionState(row){
handleUpdateSuspensionState(row) {
let state = 1;
if (row.suspensionState === 1) {
state = 2
state = 2;
}
const params = {
deployId: row.deploymentId,
state: state
}
updateState(params).then(res => {
state: state,
};
updateState(params).then((res) => {
this.$modal.msgSuccess(res.msg);
this.getList();
});
@ -500,8 +631,8 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.deploymentId || this.ids
getDeployment(id).then(response => {
const id = row.deploymentId || this.ids;
getDeployment(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改流程定义";
@ -509,16 +640,16 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateDeployment(this.form).then(response => {
updateDeployment(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addDeployment(this.form).then(response => {
addDeployment(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
@ -530,32 +661,40 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const deploymentIds = row.deploymentId || this.ids;
this.$confirm('是否确认删除流程定义编号为"' + deploymentIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delDeployment(deploymentIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
this.$confirm(
'是否确认删除流程定义编号为"' + deploymentIds + '"的数据项?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(function () {
return delDeployment(deploymentIds);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有流程定义数据项?', "警告", {
this.$confirm("是否确认导出所有流程定义数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportDeployment(queryParams);
}).then(response => {
this.download(response.msg);
type: "warning",
})
.then(function () {
return exportDeployment(queryParams);
})
.then((response) => {
this.download(response.msg);
});
},
/** 导入bpmn.xml文件 */
handleImport(){
handleImport() {
this.upload.title = "bpmn20.xml文件导入";
this.upload.open = true;
},
@ -574,7 +713,7 @@ export default {
//
submitFileForm() {
this.$refs.upload.submit();
}
}
},
},
};
</script>

View File

@ -1,25 +1,36 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名称" prop="name">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="流程名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入名称"
placeholder="请输入流程名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="开始时间" prop="deployTime">
<el-date-picker clearable size="small"
v-model="queryParams.deployTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择时间">
<el-date-picker
clearable
size="small"
v-model="queryParams.deployTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择时间"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
@ -34,45 +45,70 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:deployment:remove']"
>删除</el-button>
>删除</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="finishedList" border @selection-change="handleSelectionChange">
<el-table
v-loading="loading"
:data="finishedList"
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="任务编号" align="center" prop="taskId" :show-overflow-tooltip="true"/>
<el-table-column label="流程名称" align="center" prop="procDefName" :show-overflow-tooltip="true"/>
<el-table-column
label="任务编号"
align="center"
prop="taskId"
:show-overflow-tooltip="true"
/>
<el-table-column
label="流程名称"
align="center"
prop="procDefName"
:show-overflow-tooltip="true"
/>
<el-table-column label="任务节点" align="center" prop="taskName" />
<el-table-column label="流程发起人" align="center">
<template slot-scope="scope">
<label>{{scope.row.startUserName}} <el-tag type="info" size="mini">{{scope.row.startDeptName}}</el-tag></label>
<label
>{{ scope.row.startUserName }}
<el-tag type="info" size="mini">{{ scope.row.startDeptName }}</el-tag></label
>
</template>
</el-table-column>
<el-table-column label="接收时间" align="center" prop="createTime" width="180"/>
<el-table-column label="审批时间" align="center" prop="finishTime" width="180"/>
<el-table-column label="耗时" align="center" prop="duration" width="180"/>
<el-table-column label="操作" width="150" fixed="right" class-name="small-padding fixed-width">
<el-table-column label="接收时间" align="center" prop="createTime" width="180" />
<el-table-column label="审批时间" align="center" prop="finishTime" width="180" />
<el-table-column label="耗时" align="center" prop="duration" width="180" />
<el-table-column
label="操作"
width="150"
fixed="right"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-tickets"
@click="handleFlowRecord(scope.row)"
>流转记录</el-button>
<el-button
>流转记录</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-refresh-left"
@click="handleRevoke(scope.row)"
>撤回
>撤回
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@ -82,12 +118,19 @@
</template>
<script>
import { finishedList, getDeployment, delDeployment, addDeployment, updateDeployment, exportDeployment, revokeProcess } from "@/api/flowable/finished";
import {
finishedList,
getDeployment,
delDeployment,
addDeployment,
updateDeployment,
exportDeployment,
revokeProcess,
} from "@/api/flowable/finished";
export default {
name: "Deploy",
components: {
},
components: {},
data() {
return {
//
@ -121,13 +164,12 @@ export default {
derivedFrom: null,
derivedFromRoot: null,
parentDeploymentId: null,
engineVersion: null
engineVersion: null,
},
//
form: {},
//
rules: {
}
rules: {},
};
},
created() {
@ -137,7 +179,7 @@ export default {
/** 查询流程定义列表 */
getList() {
this.loading = true;
finishedList(this.queryParams).then(response => {
finishedList(this.queryParams).then((response) => {
this.finishedList = response.data.records;
this.total = response.data.total;
this.loading = false;
@ -160,25 +202,23 @@ export default {
derivedFrom: null,
derivedFromRoot: null,
parentDeploymentId: null,
engineVersion: null
engineVersion: null,
};
this.resetForm("form");
},
setIcon(val){
if (val){
setIcon(val) {
if (val) {
return "el-icon-check";
}else {
} else {
return "el-icon-time";
}
},
setColor(val){
if (val){
setColor(val) {
if (val) {
return "#2bc418";
}else {
} else {
return "#b3bdbb";
}
},
/** 搜索按钮操作 */
handleQuery() {
@ -192,9 +232,9 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
@ -203,29 +243,31 @@ export default {
this.title = "添加流程定义";
},
/** 流程流转记录 */
handleFlowRecord(row){
this.$router.push({ path: '/flowable/task/finished/detail/index',
handleFlowRecord(row) {
this.$router.push({
path: "/flowable/task/finished/detail/index",
query: {
procInsId: row.procInsId,
deployId: row.deployId,
taskId: row.taskId,
}})
},
});
},
/** 撤回任务 */
handleRevoke(row){
handleRevoke(row) {
const params = {
instanceId: row.procInsId
}
revokeProcess(params).then( res => {
this.$modal.msgSuccess(res.msg);
instanceId: row.procInsId,
};
revokeProcess(params).then((res) => {
this.$modal.msgSuccess(res.msg);
this.getList();
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getDeployment(id).then(response => {
const id = row.id || this.ids;
getDeployment(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改流程定义";
@ -233,16 +275,16 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateDeployment(this.form).then(response => {
updateDeployment(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addDeployment(this.form).then(response => {
addDeployment(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
@ -257,28 +299,31 @@ export default {
this.$confirm('是否确认删除流程定义编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delDeployment(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
type: "warning",
})
.then(function () {
return delDeployment(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有流程定义数据项?', "警告", {
this.$confirm("是否确认导出所有流程定义数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportDeployment(queryParams);
}).then(response => {
this.download(response.msg);
type: "warning",
})
}
}
.then(function () {
return exportDeployment(queryParams);
})
.then((response) => {
this.download(response.msg);
});
},
},
};
</script>

View File

@ -1,25 +1,51 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名称" prop="name">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="流程名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入名称"
placeholder="请输入流程名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="流程分类" prop="category">
<el-select
v-model="queryParams.category"
@keyup.enter.native="handleQuery"
placeholder="请选择流程分类"
clearable
>
<el-option
v-for="dict in dict.type.sys_process_category"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="开始时间" prop="deployTime">
<el-date-picker clearable size="small"
v-model="queryParams.deployTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择时间">
<el-date-picker
clearable
size="small"
v-model="queryParams.deployTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择时间"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
@ -33,7 +59,8 @@
size="mini"
@click="handleAdd"
v-hasPermi="['system:deployment:add']"
>新增流程</el-button>
>新增流程</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
@ -44,47 +71,85 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:deployment:remove']"
>删除</el-button>
>删除</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="myProcessList" border @selection-change="handleSelectionChange">
<el-table
v-loading="loading"
:data="myProcessList"
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="流程编号" align="center" prop="procInsId" :show-overflow-tooltip="true"/>
<el-table-column label="流程名称" align="center" prop="procDefName" :show-overflow-tooltip="true"/>
<el-table-column
label="流程编号"
align="center"
prop="procInsId"
:show-overflow-tooltip="true"
/>
<el-table-column
label="流程名称"
align="center"
prop="procDefName"
:show-overflow-tooltip="true"
/>
<el-table-column label="流程类别" align="center" prop="category" width="100px" />
<el-table-column label="流程版本" align="center" width="80px">
<template slot-scope="scope">
<el-tag size="medium" >v{{ scope.row.procDefVersion }}</el-tag>
<el-tag size="medium">v{{ scope.row.procDefVersion }}</el-tag>
</template>
</el-table-column>
<el-table-column label="提交时间" align="center" prop="createTime" width="180"/>
<el-table-column label="提交时间" align="center" prop="createTime" width="180" />
<el-table-column label="流程状态" align="center" width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.finishTime == null" size="mini"></el-tag>
<el-tag type="success" v-if="scope.row.finishTime != null" size="mini"></el-tag>
<el-tag type="success" v-if="scope.row.finishTime != null" size="mini"
>已完成</el-tag
>
</template>
</el-table-column>
<el-table-column label="耗时" align="center" prop="duration" width="180"/>
<el-table-column label="当前节点" align="center" prop="taskName"/>
<el-table-column label="耗时" align="center" prop="duration" width="180" />
<el-table-column label="当前节点" align="center" prop="taskName" />
<el-table-column label="办理人" align="center">
<template slot-scope="scope">
<label v-if="scope.row.assigneeName">{{scope.row.assigneeName}} <el-tag type="info" size="mini">{{scope.row.assigneeDeptName}}</el-tag></label>
<!-- <label v-if="scope.row.candidate">{{scope.row.candidate}}</label>-->
<label v-if="scope.row.assigneeName"
>{{ scope.row.assigneeName }}
<el-tag type="info" size="mini">{{
scope.row.assigneeDeptName
}}</el-tag></label
>
<!-- <label v-if="scope.row.candidate">{{scope.row.candidate}}</label>-->
</template>
</el-table-column>
<el-table-column label="操作" width="150" fixed="right" class-name="small-padding fixed-width">
<el-table-column
label="操作"
width="150"
fixed="right"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button @click="handleFlowRecord(scope.row)" type="text" size="small">详情</el-button>
<el-button @click="handleStop(scope.row)" type="text" size="small">取消申请</el-button>
<el-button @click="handleDelete(scope.row)" type="text" size="small" v-hasPermi="['system:deployment:remove']"></el-button>
<el-button @click="handleFlowRecord(scope.row)" type="text" size="small"
>详情</el-button
>
<el-button @click="handleStop(scope.row)" type="text" size="small"
>取消申请</el-button
>
<el-button
@click="handleDelete(scope.row)"
type="text"
size="small"
v-hasPermi="['system:deployment:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@ -93,49 +158,83 @@
<!-- 发起流程 -->
<el-dialog :title="title" :visible.sync="open" width="60%" append-to-body>
<el-form :model="queryProcessParams" ref="queryProcessForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名称" prop="name">
<el-form
:model="queryProcessParams"
ref="queryProcessForm"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="流程名称" prop="name">
<el-input
v-model="queryProcessParams.name"
placeholder="请输入名称"
placeholder="请输入流程名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="流程分类" prop="category">
<el-select
v-model="queryParams.category"
@keyup.enter.native="handleQuery"
placeholder="请选择流程分类"
clearable
>
<el-option
v-for="dict in dict.type.sys_process_category"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleProcessQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetProcessQuery"></el-button>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleProcessQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetProcessQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table v-loading="processLoading" fit :data="definitionList" border >
<el-table v-loading="processLoading" fit :data="definitionList" border>
<el-table-column label="流程名称" align="center" prop="name" />
<el-table-column label="流程版本" align="center">
<template slot-scope="scope">
<el-tag size="medium" >v{{ scope.row.version }}</el-tag>
<el-tag size="medium">v{{ scope.row.version }}</el-tag>
</template>
</el-table-column>
<el-table-column label="流程分类" align="center" prop="category" />
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
<el-table-column
label="操作"
align="center"
width="300"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit-outline"
@click="handleStartProcess(scope.row)"
>发起流程</el-button>
>发起流程</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="processTotal>0"
v-show="processTotal > 0"
:total="processTotal"
:page.sync="queryProcessParams.pageNum"
:limit.sync="queryProcessParams.pageSize"
@pagination="listDefinition"
/>
</el-dialog>
</div>
</template>
@ -146,14 +245,14 @@ import {
addDeployment,
updateDeployment,
exportDeployment,
flowRecord
flowRecord,
} from "@/api/flowable/finished";
import { myProcessList,stopProcess } from "@/api/flowable/process";
import {listDefinition} from "@/api/flowable/definition";
import { myProcessList, stopProcess } from "@/api/flowable/process";
import { listDefinition } from "@/api/flowable/definition";
export default {
name: "Deploy",
components: {
},
dicts: ["sys_process_category"],
components: {},
data() {
return {
//
@ -169,7 +268,7 @@ export default {
showSearch: true,
//
total: 0,
processTotal:0,
processTotal: 0,
//
myProcessList: [],
//
@ -177,7 +276,7 @@ export default {
//
open: false,
src: "",
definitionList:[],
definitionList: [],
//
queryParams: {
pageNum: 1,
@ -190,7 +289,7 @@ export default {
derivedFrom: null,
derivedFromRoot: null,
parentDeploymentId: null,
engineVersion: null
engineVersion: null,
},
//
queryProcessParams: {
@ -204,13 +303,12 @@ export default {
derivedFrom: null,
derivedFromRoot: null,
parentDeploymentId: null,
engineVersion: null
engineVersion: null,
},
//
form: {},
//
rules: {
},
rules: {},
};
},
created() {
@ -220,7 +318,7 @@ export default {
/** 查询流程定义列表 */
getList() {
this.loading = true;
myProcessList(this.queryParams).then(response => {
myProcessList(this.queryParams).then((response) => {
this.myProcessList = response.data.records;
this.total = response.data.total;
this.loading = false;
@ -243,7 +341,7 @@ export default {
derivedFrom: null,
derivedFromRoot: null,
parentDeploymentId: null,
engineVersion: null
engineVersion: null,
};
this.resetForm("form");
},
@ -269,9 +367,9 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.procInsId)
this.single = selection.length!==1
this.multiple = !selection.length
this.ids = selection.map((item) => item.procInsId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
@ -279,46 +377,49 @@ export default {
this.title = "发起流程";
this.listDefinition();
},
listDefinition(){
listDefinition(this.queryProcessParams).then(response => {
listDefinition() {
listDefinition(this.queryProcessParams).then((response) => {
this.definitionList = response.data.records;
this.processTotal = response.data.total;
this.processLoading = false;
});
},
/** 发起流程申请 */
handleStartProcess(row){
this.$router.push({ path: '/flowable/task/myProcess/send/index',
handleStartProcess(row) {
this.$router.push({
path: "/flowable/task/myProcess/send/index",
query: {
deployId: row.deploymentId,
procDefId: row.id
}
})
procDefId: row.id,
},
});
},
/** 取消流程申请 */
handleStop(row){
handleStop(row) {
const params = {
instanceId: row.procInsId
}
stopProcess(params).then( res => {
this.$modal.msgSuccess(res.msg);
instanceId: row.procInsId,
};
stopProcess(params).then((res) => {
this.$modal.msgSuccess(res.msg);
this.getList();
});
},
/** 流程流转记录 */
handleFlowRecord(row){
this.$router.push({ path: '/flowable/task/myProcess/detail/index',
handleFlowRecord(row) {
this.$router.push({
path: "/flowable/task/myProcess/detail/index",
query: {
procInsId: row.procInsId,
deployId: row.deployId,
taskId: row.taskId
}})
taskId: row.taskId,
},
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getDeployment(id).then(response => {
const id = row.id || this.ids;
getDeployment(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改流程定义";
@ -326,17 +427,17 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateDeployment(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
updateDeployment(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addDeployment(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
addDeployment(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
@ -346,32 +447,35 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.procInsId || this.ids;//
const ids = row.procInsId || this.ids; //
this.$confirm('是否确认删除流程定义编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
return delDeployment(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
type: "warning",
})
.then(() => {
return delDeployment(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有流程定义数据项?', "警告", {
this.$confirm("是否确认导出所有流程定义数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
return exportDeployment(queryParams);
}).then(response => {
this.download(response.msg);
type: "warning",
})
}
}
.then(() => {
return exportDeployment(queryParams);
})
.then((response) => {
this.download(response.msg);
});
},
},
};
</script>

View File

@ -0,0 +1,279 @@
<template>
<div class="app-container">
<el-card
class="box-card"
v-for="dict in dict.type.sys_process_category"
:key="dict.value"
>
<div slot="header" class="clearfix">
<span>{{ dict.label }}</span>
</div>
<div :key="o" class="text item">
{{ "列表内容 " + o }}
</div>
</el-card>
</div>
</template>
<script>
import {
getDeployment,
delDeployment,
addDeployment,
updateDeployment,
exportDeployment,
flowRecord,
} from "@/api/flowable/finished";
import { myProcessList, stopProcess } from "@/api/flowable/process";
import { listDefinition } from "@/api/flowable/definition";
export default {
name: "Deploy",
dicts: ["sys_process_category"],
components: {},
data() {
return {
//
loading: true,
processLoading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
processTotal: 0,
//
myProcessList: [],
//
title: "",
//
open: false,
src: "",
definitionList: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
name: null,
category: null,
key: null,
tenantId: null,
deployTime: null,
derivedFrom: null,
derivedFromRoot: null,
parentDeploymentId: null,
engineVersion: null,
},
//
queryProcessParams: {
pageNum: 1,
pageSize: 10,
name: null,
category: null,
key: null,
tenantId: null,
deployTime: null,
derivedFrom: null,
derivedFromRoot: null,
parentDeploymentId: null,
engineVersion: null,
},
//
form: {},
//
rules: {},
processCategoryList: [],
};
},
created() {
this.getList();
},
methods: {
/** 查询流程定义列表 */
getList() {
this.loading = true;
myProcessList(this.queryParams).then((response) => {
this.myProcessList = response.data.records;
this.total = response.data.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
name: null,
category: null,
key: null,
tenantId: null,
deployTime: null,
derivedFrom: null,
derivedFromRoot: null,
parentDeploymentId: null,
engineVersion: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 搜索按钮操作 */
handleProcessQuery() {
this.queryProcessParams.pageNum = 1;
this.listDefinition();
},
/** 重置按钮操作 */
resetProcessQuery() {
this.resetForm("queryProcessForm");
this.handleProcessQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.procInsId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.open = true;
this.title = "发起流程";
this.listDefinition();
},
listDefinition() {
listDefinition(this.queryProcessParams).then((response) => {
this.definitionList = response.data.records;
this.processTotal = response.data.total;
this.processLoading = false;
});
},
/** 发起流程申请 */
handleStartProcess(row) {
this.$router.push({
path: "/flowable/task/myProcess/send/index",
query: {
deployId: row.deploymentId,
procDefId: row.id,
},
});
},
/** 取消流程申请 */
handleStop(row) {
const params = {
instanceId: row.procInsId,
};
stopProcess(params).then((res) => {
this.$modal.msgSuccess(res.msg);
this.getList();
});
},
/** 流程流转记录 */
handleFlowRecord(row) {
this.$router.push({
path: "/flowable/task/myProcess/detail/index",
query: {
procInsId: row.procInsId,
deployId: row.deployId,
taskId: row.taskId,
},
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getDeployment(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改流程定义";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateDeployment(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addDeployment(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.procInsId || this.ids; //
this.$confirm('是否确认删除流程定义编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
return delDeployment(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有流程定义数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
return exportDeployment(queryParams);
})
.then((response) => {
this.download(response.msg);
});
},
},
};
</script>
<style>
.text {
font-size: 14px;
}
.item {
margin-bottom: 18px;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both;
}
.box-card {
width: 28%;
margin-left: 3%;
}
</style>

View File

@ -1,25 +1,36 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名称" prop="name">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="流程名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入名称"
placeholder="请输入流程名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="开始时间" prop="deployTime">
<el-date-picker clearable size="small"
v-model="queryParams.deployTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择时间">
<el-date-picker
clearable
size="small"
v-model="queryParams.deployTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择时间"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
@ -34,28 +45,41 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:deployment:remove']"
>删除
>删除
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="todoList" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="任务编号" align="center" prop="taskId" :show-overflow-tooltip="true"/>
<el-table-column label="流程名称" align="center" prop="procDefName"/>
<el-table-column label="当前节点" align="center" prop="taskName"/>
<el-table
v-loading="loading"
:data="todoList"
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
label="任务编号"
align="center"
prop="taskId"
:show-overflow-tooltip="true"
/>
<el-table-column label="流程名称" align="center" prop="procDefName" />
<el-table-column label="当前节点" align="center" prop="taskName" />
<el-table-column label="流程版本" align="center">
<template slot-scope="scope">
<el-tag size="medium" >v{{scope.row.procDefVersion}}</el-tag>
<el-tag size="medium">v{{ scope.row.procDefVersion }}</el-tag>
</template>
</el-table-column>
<el-table-column label="流程发起人" align="center">
<template slot-scope="scope">
<label>{{scope.row.startUserName}} <el-tag type="info" size="mini">{{scope.row.startDeptName}}</el-tag></label>
<label
>{{ scope.row.startUserName }}
<el-tag type="info" size="mini">{{ scope.row.startDeptName }}</el-tag></label
>
</template>
</el-table-column>
<el-table-column label="接收时间" align="center" prop="createTime" width="180"/>
<el-table-column label="接收时间" align="center" prop="createTime" width="180" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -63,14 +87,14 @@
type="text"
icon="el-icon-edit-outline"
@click="handleProcess(scope.row)"
>处理
>处理
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@ -88,7 +112,7 @@ import {
rejectTask,
getDeployment,
delDeployment,
exportDeployment
exportDeployment,
} from "@/api/flowable/todo";
export default {
@ -119,12 +143,12 @@ export default {
pageNum: 1,
pageSize: 10,
name: null,
category: null
category: null,
},
//
form: {},
//
rules: {}
rules: {},
};
},
created() {
@ -134,23 +158,25 @@ export default {
/** 查询流程定义列表 */
getList() {
this.loading = true;
todoList(this.queryParams).then(response => {
todoList(this.queryParams).then((response) => {
this.todoList = response.data.records;
this.total = response.data.total;
this.loading = false;
});
},
//
handleProcess(row){
this.$router.push({ path: '/flowable/task/todo/detail/index',
handleProcess(row) {
this.$router.push({
path: "/flowable/task/todo/detail/index",
query: {
procInsId: row.procInsId,
executionId: row.executionId,
deployId: row.deployId,
taskId: row.taskId,
taskName: row.taskName,
startUser: row.startUserName + '-' + row.startDeptName,
}})
startUser: row.startUserName + "-" + row.startDeptName,
},
});
},
//
cancel() {
@ -169,7 +195,7 @@ export default {
derivedFrom: null,
derivedFromRoot: null,
parentDeploymentId: null,
engineVersion: null
engineVersion: null,
};
this.resetForm("form");
},
@ -185,9 +211,9 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.taskId)
this.single = selection.length !== 1
this.multiple = !selection.length
this.ids = selection.map((item) => item.taskId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 删除按钮操作 */
handleDelete(row) {
@ -195,15 +221,16 @@ export default {
this.$confirm('是否确认删除流程定义编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function () {
return delDeployment(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
type: "warning",
})
.then(function () {
return delDeployment(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
});
},
}
},
};
</script>

View File

@ -61,7 +61,7 @@
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = spi.id</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = spi.id</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = spi.id</if>
WHERE
spi.isDel = 0
<!--检索条件-->
@ -71,7 +71,7 @@
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDeptId}</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> and spu.user_id = #{userId} and spu.is_del=0</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.user_id = #{userId} and spu.is_del=0</if>
<!--子公司选择-->
<if test='nowRole == "3"'>
<if test='deptId != null and deptId != "0"'>AND spi.deptId =#{deptId}</if>

View File

@ -144,7 +144,7 @@ public class SurProjectUserinfoServiceImpl implements ISurProjectUserinfoService
SurProjectUnitInfo surProjectUnitInfo = new SurProjectUnitInfo();
surProjectUnitInfo.setProjectId(projectId);
List<SurProjectUnitInfo> surProjectUnitInfoList = surProjectUnitInfoMapper.selectSurProjectUnitInfoList(surProjectUnitInfo);
List<SurProjectUserinfo> projectUserList = new ArrayList<>();
List<SurProjectUserinfo> projectUserList;
SurProjectUserinfo surProjectUserinfo = new SurProjectUserinfo();
surProjectUserinfo.setProjectId(projectId);
surProjectUserinfo.setCreateBy(loginName);
@ -178,7 +178,7 @@ public class SurProjectUserinfoServiceImpl implements ISurProjectUserinfoService
//查询相关人员
List<SurProjectUserinfo> deptUserList = new ArrayList<>();
if(!SysRoleEnum.COMMON.getCode().equals(nowRole)){
if(Convert.toInt(nowRole)<11){
deptUserList = surProjectUserinfoMapper.selectProjectDeptUserinfoList(surProjectUserinfo);
projectUserList.addAll(deptUserList);
}

View File

@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<where>
and spcd.is_del='0'
<if test="projectId != null "> and spcd.project_id = #{projectId}</if>
@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and (spui.unitId = #{nowDept} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
<if test='activeName == "sjz"'> and spcd.check_state = '1'</if>
<if test='activeName == "ywc"'> and spcd.check_state = '2'</if>
</where>
@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<where>
and spcd.is_del='0'
<if test="projectId != null "> and spcd.project_id = #{projectId}</if>
@ -106,7 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and (spui.unitId = #{nowDept} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
GROUP BY check_state
</where>
</select>

View File

@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<where>
and spc.is_del=0
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spc.quality_user=#{nowUserName} or spc.supervise_user=#{nowUserName})</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spc.quality_user=#{nowUserName} or spc.supervise_user=#{nowUserName})</if>
</where>
order by checking_date desc
</select>
@ -87,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<where>
and spc.is_del=0
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
@ -114,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
</where>
order by checking_date desc
limit 0,10

View File

@ -76,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND spi.insurance_type = sdd.dict_value
AND spi.is_del = 0
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<where>
and sp.isDel=0
and spui.del_flag=0
@ -97,7 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
</where>
ORDER BY
sp.projectSort,

View File

@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<where>
<if test="deptId != null "> and sp.deptId like concat('%', #{deptId}, '%')</if>
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
@ -111,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
</where>
order by sp.projectSort ASC,sp.projectName
</select>

View File

@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<where>
and spme.is_del='0'
<if test="projectId != null "> and spme.project_id = #{projectId}</if>
@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
</where>
</select>

View File

@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<where>
and spm.is_del='0'
<if test="projectId != null "> and spm.project_id = #{projectId}</if>
@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and (spui.unitId = #{nowDept} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
</where>
</select>

View File

@ -47,14 +47,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = p.id</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = p.id</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = p.id</if>
where 1=1
<!--子部门数据-->
<if test='nowRole == "4"'> and p.deptId = #{nowDept}</if>
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
<!-- 查询条件-项目部门 -->
<if test="projectDeptId != null "> and p.deptId = #{projectDeptId}</if>
) as a

View File

@ -53,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept})</if>
<if test='nowRole == "99"'> and sp.id in (select spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and sp.id in (select spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
<if test="createBy != null and createBy != ''"> and su.phonenumber != #{createBy}</if>
</where>
</select>

View File

@ -50,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<where>
and spwa.is_del=0
<if test="projectId != null "> and spwa.project_id = #{projectId}</if>
@ -66,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
</where>
</select>

View File

@ -61,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and sp.id in (select DISTINCT spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept})</if>
<if test='nowRole == "99"'> and sp.id in (select DISTINCT spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and sp.id in (select DISTINCT spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
<if test='activeName == "wgq"'> and date(spwp.credential_expiration_time) <![CDATA[ > ]]> date(NOW())</if>
<if test='activeName == "ygq"'> and date(spwp.credential_expiration_time) <![CDATA[ <= ]]> date(NOW())</if>
</where>
@ -90,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and sp.id in (select DISTINCT spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept})</if>
<if test='nowRole == "99"'> and sp.id in (select DISTINCT spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and sp.id in (select DISTINCT spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
</where>
</select>
@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and sp.id in (select DISTINCT spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept})</if>
<if test='nowRole == "99"'> and sp.id in (select DISTINCT spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and sp.id in (select DISTINCT spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
</where>
</select>

View File

@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
<!--普通整改人是我,复检人是我,抄送人是我,提交人是我的数据-->
<if test='nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser like concat('%', #{nowUser}, '%') or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser like concat('%', #{nowUser}, '%') or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
<if test='activeName == "dzg"'> and ssp.checkState in (0,3)</if>
<if test='activeName == "dqr"'> and ssp.checkState in (1)</if>
<if test='activeName == "ycl"'> and ssp.checkState = 4 </if>
@ -154,7 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
<!--普通整改人是我,复检人是我,抄送人是我,提交人是我的数据-->
<if test='nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser like concat('%', #{nowUser}, '%') or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser like concat('%', #{nowUser}, '%') or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
<if test='activeName == "dzg"'> and ssp.checkState in (0,1,3)</if>
<if test='activeName == "ycl"'> and ssp.checkState = 4 </if>
<if test='activeName == "zgcs"'> and (date(NOW())<![CDATA[ > ]]> date(ssp.nickedTime) and (ssp.updateTime is null or date(ssp.updateTime) <![CDATA[ > ]]> date(ssp.nickedTime))) </if>
@ -211,7 +211,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
<!--普通整改人是我,复检人是我,抄送人是我,提交人是我的数据-->
<if test='nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser like concat('%', #{nowUser}, '%') or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser like concat('%', #{nowUser}, '%') or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
GROUP BY checkState
</select>
@ -237,7 +237,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
<!--普通整改人是我,复检人是我,抄送人是我,提交人是我的数据-->
<if test='nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser like concat('%', #{nowUser}, '%') or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser like concat('%', #{nowUser}, '%') or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
</select>
<select id="selectSmzSspProblemmodifyById" parameterType="Long" resultMap="SmzSspProblemmodifyResult">

View File

@ -64,7 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and sp.id in (select DISTINCT spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept})</if>
<if test='nowRole == "99"'> and sp.id in (select DISTINCT spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and sp.id in (select DISTINCT spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
</where>
order by spvc.video_sort asc, spvc.video_name
</select>

View File

@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<if test="deptId != null"> left join work_train_dept wtd2 on wtd2.train_id = wt.id and wtd2.is_main ='Y'</if>
<where>
<if test="projectId != null"> and wt.project_id = #{projectId}</if>
@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
<!--普通用户查询项目人员-->
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
</where>
group by wt.id
order by wt.create_time desc