优化代码

dev_xds
姜玉琦 2023-09-20 22:28:45 +08:00
parent 3803bb90f6
commit 9d617720df
13 changed files with 306 additions and 44 deletions

View File

@ -7,6 +7,7 @@ import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.flowable.domain.dto.FlowSaveXmlVo; import com.ruoyi.flowable.domain.dto.FlowSaveXmlVo;
import com.ruoyi.flowable.domain.vo.ProcKeyRole;
import com.ruoyi.flowable.service.IFlowDefinitionService; import com.ruoyi.flowable.service.IFlowDefinitionService;
import com.ruoyi.system.domain.FlowProcDefDto; import com.ruoyi.system.domain.FlowProcDefDto;
import com.ruoyi.system.domain.SysExpression; import com.ruoyi.system.domain.SysExpression;
@ -62,9 +63,10 @@ public class FlowDefinitionController extends BaseController {
@ApiOperation(value = "流程定义列表", response = FlowProcDefDto.class) @ApiOperation(value = "流程定义列表", response = FlowProcDefDto.class)
public AjaxResult list(@ApiParam(value = "当前页码", required = true) @RequestParam Integer pageNum, public AjaxResult list(@ApiParam(value = "当前页码", required = true) @RequestParam Integer pageNum,
@ApiParam(value = "每页条数", required = true) @RequestParam Integer pageSize, @ApiParam(value = "每页条数", required = true) @RequestParam Integer pageSize,
@ApiParam(value = "发起角色", required = false) @RequestParam(required = false) String roleId,
@ApiParam(value = "流程类型", required = false) @RequestParam(required = false) String category, @ApiParam(value = "流程类型", required = false) @RequestParam(required = false) String category,
@ApiParam(value = "流程名称", required = false) @RequestParam(required = false) String name) { @ApiParam(value = "流程名称", required = false) @RequestParam(required = false) String name) {
return AjaxResult.success(flowDefinitionService.list(category, name, pageNum, pageSize)); return AjaxResult.success(flowDefinitionService.list(roleId, category, name, pageNum, pageSize));
} }
@GetMapping(value = "/myList") @GetMapping(value = "/myList")
@ -176,6 +178,22 @@ public class FlowDefinitionController extends BaseController {
} }
@ApiOperation(value = "流程发起角色配置")
@Log(title = "流程发起角色配置", businessType = BusinessType.UPDATE)
@PostMapping("/updateProcKeyByRoleId")
public AjaxResult updateProcKeyByRoleId(@RequestBody ProcKeyRole procKeyRole) {
flowDefinitionService.updateProcKeyByRoleId(procKeyRole.getRoleId(),procKeyRole.getKeys());
return success();
}
@ApiOperation(value = "流程发起排序设置")
@Log(title = "流程发起排序设置", businessType = BusinessType.UPDATE)
@PostMapping("/updateProcKeyRoleSort")
public AjaxResult updateProcKeyRoleSort(@RequestBody ProcKeyRole procKeyRole) {
flowDefinitionService.updateProcKeyRoleSort(procKeyRole);
return success();
}
@ApiOperation(value = "激活或挂起流程定义") @ApiOperation(value = "激活或挂起流程定义")
@PutMapping(value = "/updateState") @PutMapping(value = "/updateState")
public AjaxResult updateState(@ApiParam(value = "1:激活,2:挂起", required = true) @RequestParam Integer state, public AjaxResult updateState(@ApiParam(value = "1:激活,2:挂起", required = true) @RequestParam Integer state,

View File

@ -0,0 +1,50 @@
package com.ruoyi.flowable.domain.vo;
import java.io.Serializable;
import java.util.List;
public class ProcKeyRole implements Serializable
{
private static final long serialVersionUID = 1L;
private String roleId;
private String key;
private String sort;
private List<String> keys;
public String getRoleId() {
return roleId;
}
public void setRoleId(String roleId) {
this.roleId = roleId;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public List<String> getKeys() {
return keys;
}
public void setKeys(List<String> keys) {
this.keys = keys;
}
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
}
}

View File

@ -2,6 +2,7 @@ package com.ruoyi.flowable.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.flowable.domain.vo.ProcKeyRole;
import com.ruoyi.system.domain.FlowProcDefDto; import com.ruoyi.system.domain.FlowProcDefDto;
import org.flowable.bpmn.model.FlowElement; import org.flowable.bpmn.model.FlowElement;
@ -21,13 +22,14 @@ public interface IFlowDefinitionService {
/** /**
* *
* *
* @param roleId
* @param category * @param category
* @param name * @param name
* @param pageNum * @param pageNum
* @param pageSize * @param pageSize
* @return * @return
*/ */
Page<FlowProcDefDto> list(String category,String name,Integer pageNum, Integer pageSize); Page<FlowProcDefDto> list(String roleId, String category, String name, Integer pageNum, Integer pageSize);
/** /**
* *
@ -93,5 +95,25 @@ public interface IFlowDefinitionService {
*/ */
InputStream readImage(String deployId); InputStream readImage(String deployId);
/**
*
* @param deployId
* @return
*/
public List<FlowElement> readNodes(String deployId); public List<FlowElement> readNodes(String deployId);
/**
*
* @param roleId
* @param keys
* @return
*/
public void updateProcKeyByRoleId(String roleId,List<String> keys);
/**
*
* @param procKeyRole
* @return
*/
public void updateProcKeyRoleSort(ProcKeyRole procKeyRole);
} }

View File

@ -7,6 +7,7 @@ import com.ruoyi.common.core.text.Convert;
import com.ruoyi.flowable.common.constant.ProcessConstants; import com.ruoyi.flowable.common.constant.ProcessConstants;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.flowable.common.enums.FlowComment; import com.ruoyi.flowable.common.enums.FlowComment;
import com.ruoyi.flowable.domain.vo.ProcKeyRole;
import com.ruoyi.system.domain.FlowProcDefDto; import com.ruoyi.system.domain.FlowProcDefDto;
import com.ruoyi.flowable.factory.FlowServiceFactory; import com.ruoyi.flowable.factory.FlowServiceFactory;
import com.ruoyi.flowable.service.IFlowDefinitionService; import com.ruoyi.flowable.service.IFlowDefinitionService;
@ -74,6 +75,7 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
/** /**
* *
* *
* @param roleId
* @param category * @param category
* @param name * @param name
* @param pageNum * @param pageNum
@ -81,18 +83,18 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
* @return * @return
*/ */
@Override @Override
public Page<FlowProcDefDto> list(String category, String name, Integer pageNum, Integer pageSize) { public Page<FlowProcDefDto> list(String roleId, String category, String name, Integer pageNum, Integer pageSize) {
Page<FlowProcDefDto> page = new Page<>(); Page<FlowProcDefDto> page = new Page<>();
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
final List<FlowProcDefDto> dataList = flowDeployMapper.selectDeployList(category,name); final List<FlowProcDefDto> dataList = flowDeployMapper.selectDeployList(roleId,category,name);
// 加载挂表单 // 加载挂表单
for (FlowProcDefDto procDef : dataList) { //for (FlowProcDefDto procDef : dataList) {
SysForm sysForm = sysDeployFormService.selectSysDeployFormByDeployId(procDef.getDeploymentId()); // SysForm sysForm = sysDeployFormService.selectSysDeployFormByDeployId(procDef.getDeploymentId());
if (Objects.nonNull(sysForm)) { // if (Objects.nonNull(sysForm)) {
procDef.setFormName(sysForm.getFormName()); // procDef.setFormName(sysForm.getFormName());
procDef.setFormId(sysForm.getFormId()); // procDef.setFormId(sysForm.getFormId());
} // }
} //}
page.setTotal(new PageInfo(dataList).getTotal()); page.setTotal(new PageInfo(dataList).getTotal());
page.setRecords(dataList); page.setRecords(dataList);
return page; return page;
@ -183,6 +185,11 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
} }
/**
*
* @param deployId
* @return
*/
@Override @Override
public List<FlowElement> readNodes(String deployId) { public List<FlowElement> readNodes(String deployId) {
List<FlowElement> list = new ArrayList<>(); List<FlowElement> list = new ArrayList<>();
@ -271,5 +278,35 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
repositoryService.deleteDeployment(deployId, true); repositoryService.deleteDeployment(deployId, true);
} }
/**
*
* @param roleId
* @param keys
* @return
*/
@Override
public void updateProcKeyByRoleId(String roleId,List<String> keys) {
//根据角色删除原有流程定义
flowDeployMapper.deleteDeployByRoleId(roleId);
if(keys.size()>0){
List<Map<String, Object>> list = new ArrayList<>();
for(int i=0;i<keys.size();i++){
Map<String, Object> map = new HashMap<>();
map.put("key",keys.get(i));
map.put("roleId",roleId);
list.add(map);
}
flowDeployMapper.batchDeployRoleRole(list);
}
}
/**
*
* @param procKeyRole
* @return
*/
public void updateProcKeyRoleSort(ProcKeyRole procKeyRole) {
flowDeployMapper.updateProcKeyRoleSort(procKeyRole.getRoleId(),procKeyRole.getKey(),procKeyRole.getSort());
}
} }

View File

@ -55,5 +55,10 @@ public class FlowProcDefDto implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date deploymentTime; private Date deploymentTime;
@ApiModelProperty("发起角色")
private String roleNames;
@ApiModelProperty("流程角色排序")
private String sorts;
} }

View File

@ -4,6 +4,7 @@ import com.ruoyi.system.domain.FlowProcDefDto;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* *
@ -16,11 +17,12 @@ public interface FlowDeployMapper {
/** /**
* *
* @param roleId
* @param category * @param category
* @param name * @param name
* @return * @return
*/ */
List<FlowProcDefDto> selectDeployList(@Param("category")String category, @Param("name")String name); List<FlowProcDefDto> selectDeployList(@Param("roleId")String roleId, @Param("category")String category, @Param("name")String name);
/** /**
* *
@ -30,4 +32,28 @@ public interface FlowDeployMapper {
* @return * @return
*/ */
List<FlowProcDefDto> selectMyDeployList(@Param("username")String username, @Param("category")String category, @Param("name")String name); List<FlowProcDefDto> selectMyDeployList(@Param("username")String username, @Param("category")String category, @Param("name")String name);
/**
*
* @param roleId
* @return
*/
int deleteDeployByRoleId(String roleId);
/**
*
* @param items
* @return
*/
int batchDeployRoleRole(List<Map<String, Object>> items);
/**
*
* @param roleId
* @param key
* @param sort
* @return
*/
int updateProcKeyRoleSort(@Param("roleId")String roleId, @Param("key")String key, @Param("sort")String sort);
} }

View File

@ -13,11 +13,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
rp.key_ as flowKey, rp.key_ as flowKey,
rp.version_ as version, rp.version_ as version,
rp.suspension_state_ as suspensionState, rp.suspension_state_ as suspensionState,
rd.deploy_time_ as deploymentTime rd.deploy_time_ as deploymentTime,
group_concat(sr.role_name) as roleNames,
group_concat(rpr.SORT_) as sorts
FROM FROM
act_re_procdef rp act_re_procdef rp
LEFT JOIN act_re_deployment rd ON rp.deployment_id_ = rd.id_ LEFT JOIN act_re_deployment rd ON rp.deployment_id_ = rd.id_
left join act_re_procdef_role rpr on rp.key_ = rpr.PROCDEF_KEY_
left join sys_role sr on sr.role_id = rpr.ROLE_ID_
<where> <where>
<if test="roleId != null and roleId != ''">
and rpr.ROLE_ID_ = #{roleId}
</if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and rd.name_ like concat('%', #{name}, '%') and rd.name_ like concat('%', #{name}, '%')
</if> </if>
@ -25,7 +32,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and rd.category_ = #{category} and rd.category_ = #{category}
</if> </if>
</where> </where>
order by rd.deploy_time_ desc GROUP BY rp.key_
order by rpr.SORT_
</select> </select>
<select id="selectMyDeployList" resultType="com.ruoyi.system.domain.FlowProcDefDto"> <select id="selectMyDeployList" resultType="com.ruoyi.system.domain.FlowProcDefDto">
@ -58,5 +66,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by rd.deploy_time_ desc order by rd.deploy_time_ desc
</select> </select>
<delete id="deleteDeployByRoleId" parameterType="string">
delete from act_re_procdef_role where ROLE_ID_ = #{roleId}
</delete>
<insert id="batchDeployRoleRole">
insert into act_re_procdef_role( PROCDEF_KEY_, ROLE_ID_) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.key}, #{item.roleId})
</foreach>
</insert>
<update id="updateProcKeyRoleSort">
update act_re_procdef_role set SORT_=#{sort} where PROCDEF_KEY_=#{key} and ROLE_ID_=#{roleId}
</update>
</mapper> </mapper>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -147,3 +147,21 @@ export function exportDeployment(query) {
params: query params: query
}) })
} }
// 流程角色设置
export function updateProcKeyByRoleId(data) {
return request({
url: '/flowable/definition/updateProcKeyByRoleId',
method: 'post',
data: data
})
}
// 流程排序设置
export function updateProcKeyRoleSort(data) {
return request({
url: '/flowable/definition/updateProcKeyRoleSort',
method: 'post',
data: data
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 77 KiB

View File

@ -2,13 +2,13 @@
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"> <div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<transition name="sidebarLogoFade"> <transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/"> <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logo" src="logo/logo.png" class="sidebar-logo" style="width: 90%;"/> <img v-if="logo" src="logo/logo.png" class="sidebar-logo" style="width: 80%;margin-top: 10px;"/>
<!-- <!--
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1> <h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
--> -->
</router-link> </router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/"> <router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo" src="logo/logo.png" class="sidebar-logo" style="height: 90%;"/> <img v-if="logo" src="logo/logo.png" class="sidebar-logo" style="width: 80%;margin-top: 10px;"/>
<!-- <!--
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1> <h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
--> -->

View File

@ -1,16 +1,46 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名称" prop="name"> <el-form-item label="流程名称" prop="name">
<el-input <el-input
v-model="queryParams.name" v-model="queryParams.name"
placeholder="请输入名称" placeholder="请输入流程名称"
clearable clearable
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="开始时间" prop="deployTime"> <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="roleId">
<el-select
v-model="queryParams.roleId"
@keyup.enter.native="handleQuery"
placeholder="请选择流程角色"
clearable
>
<el-option
v-for="(it,idx) in roleNodes"
:key="idx"
:label="it.roleName"
:value="it.roleId"
/>
</el-select>
</el-form-item>
<el-form-item label="开始时间" prop="deployTime" v-if="false">
<el-date-picker clearable size="small" <el-date-picker clearable size="small"
v-model="queryParams.deployTime" v-model="queryParams.deployTime"
type="date" type="date"
@ -54,6 +84,24 @@
v-hasPermi="['system:deployment:remove']" v-hasPermi="['system:deployment:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-s-custom"
size="mini"
@click="handleRole"
>流程发起角色配置</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-medal-1"
size="mini"
@click="handleRoleOrder"
>流程发起排序设置</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-alert title="流程设计说明" type="success"> <el-alert title="流程设计说明" type="success">
@ -69,15 +117,19 @@
<el-table-column type="selection" width="55" align="center" /> <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="deploymentId" :show-overflow-tooltip="true"/>
<el-table-column label="流程标识" align="center" prop="flowKey" :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" prop="category" >
<el-table-column label="流程名称" align="center" width="120" :show-overflow-tooltip="true"> <template slot-scope="scope">
<dict-tag :options="dict.type.sys_process_category" :value="scope.row.category" />
</template>
</el-table-column>
<el-table-column label="流程名称" align="center" width="250" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="handleReadImage(scope.row.deploymentId)"> <el-button type="text" @click="handleReadImage(scope.row.deploymentId)">
<span>{{ scope.row.name }}</span> <span>{{ scope.row.name }}</span>
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="业务表单" align="center" :show-overflow-tooltip="true"> <el-table-column label="业务表单" align="center" width="100" :show-overflow-tooltip="true">
<template slot-scope="scope"> <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> <span>{{ scope.row.formName }}</span>
@ -85,7 +137,7 @@
<label v-else></label> <label v-else></label>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="流程版本" align="center"> <el-table-column label="流程版本" align="center" width="100">
<template slot-scope="scope"> <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> </template>
@ -97,7 +149,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="部署时间" align="center" prop="deploymentTime" width="180"/> <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="操作" width="250" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="handleLoadXml(scope.row)" icon="el-icon-edit-outline" type="text" size="small">设计</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="handleAddForm(scope.row)" icon="el-icon-edit-el-icon-s-promotion" type="text" size="small" v-if="scope.row.formId == null"></el-button>
@ -221,17 +273,8 @@
</el-col> </el-col>
</el-row> </el-row>
</el-dialog> </el-dialog>
<indexDrawer ref="indexDrawer"></indexDrawer>
<!-- &lt;!&ndash;流程设计器&ndash;&gt;--> <indexOrderDrawer ref="indexOrderDrawer"></indexOrderDrawer>
<!-- <el-dialog-->
<!-- title="流程配置"-->
<!-- :visible.sync="dialogVisible"-->
<!-- :close-on-press-escape="false"-->
<!-- :fullscreen=true-->
<!-- :before-close="handleClose"-->
<!-- append-to-body>-->
<!-- <Model :deployId="deployId"/>-->
<!-- </el-dialog>-->
</div> </div>
</template> </template>
@ -244,13 +287,16 @@ import {
updateDeployment, updateDeployment,
exportDeployment, exportDeployment,
definitionStart, definitionStart,
flowXmlAndNode flowXmlAndNode,
roleList
} from "@/api/flowable/definition"; } from "@/api/flowable/definition";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { getForm, addDeployForm ,listForm } from "@/api/flowable/form"; import { getForm, addDeployForm ,listForm } from "@/api/flowable/form";
import Parser from '@/components/parser/Parser' import Parser from '@/components/parser/Parser'
import flow from '@/views/flowable/task/myProcess/send/flow' import flow from '@/views/flowable/task/myProcess/send/flow'
import Model from './model'; import Model from './model';
import indexDrawer from "./indexDrawer.vue";
import indexOrderDrawer from "./indexOrderDrawer.vue";
export default { export default {
name: "Definition", name: "Definition",
@ -258,7 +304,9 @@ export default {
components: { components: {
Parser, Parser,
flow, flow,
Model Model,
indexDrawer,
indexOrderDrawer
}, },
data() { data() {
return { return {
@ -319,7 +367,8 @@ export default {
derivedFrom: null, derivedFrom: null,
derivedFromRoot: null, derivedFromRoot: null,
parentDeploymentId: null, parentDeploymentId: null,
engineVersion: null engineVersion: null,
roleId:null,
}, },
formQueryParams:{ formQueryParams:{
pageNum: 1, pageNum: 1,
@ -337,12 +386,13 @@ export default {
// //
form: {}, form: {},
// //
rules: { rules: {},
} roleNodes:[]
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getRoleList();
}, },
activated() { activated() {
const time = this.$route.query.t; const time = this.$route.query.t;
@ -390,6 +440,11 @@ export default {
}; };
this.resetForm("form"); this.resetForm("form");
}, },
getRoleList(){
roleList({pageNum:1,pageSize:100,roleKey:'lc_'}).then(response => {
this.roleNodes = response.data;
});
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
@ -541,6 +596,14 @@ export default {
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}) })
}, },
/** 流程发起角色设置 */
handleRole(){
this.$refs.indexDrawer.show();
},
/** 流程发起排序设置 */
handleRoleOrder(){
this.$refs.indexOrderDrawer.show();
},
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams; const queryParams = this.queryParams;

View File

@ -33,7 +33,7 @@
v-model="loginForm.code" v-model="loginForm.code"
auto-complete="off" auto-complete="off"
placeholder="验证码" placeholder="验证码"
style="width: 63%" style="width: 68%"
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin"
> >
<svg-icon <svg-icon
@ -169,13 +169,13 @@ export default {
<style rel="stylesheet/scss" lang="scss"> <style rel="stylesheet/scss" lang="scss">
.login-bg { .login-bg {
background-image: url("/images/bg.jpg"); background-image: url("/images/bg1.png");
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
top: 0px; top: 0px;
left: 0px; left: 0px;
opacity: 0.4; /** opacity: 0.4; */
} }
.login { .login {
display: flex; display: flex;
@ -197,6 +197,8 @@ export default {
background: #ffffff; background: #ffffff;
width: 400px; width: 400px;
padding: 25px 25px 5px 25px; padding: 25px 25px 5px 25px;
z-index: 9;
opacity: 0.9;
.el-input { .el-input {
height: 38px; height: 38px;
input { input {
@ -215,7 +217,7 @@ export default {
color: #bfbfbf; color: #bfbfbf;
} }
.login-code { .login-code {
width: 33%; width: 29%;
height: 38px; height: 38px;
float: right; float: right;
img { img {