加入领导树展示
This commit is contained in:
parent
b46ba62357
commit
a1de52de8f
|
|
@ -3836,3 +3836,39 @@ export function importFile (data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取审核流列表
|
||||||
|
export function getAuditFlowList (data) {
|
||||||
|
return request({
|
||||||
|
url: '/greenH5/greenWebmodul/rest/greenRole/getAuditFlowList',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询审核流详情
|
||||||
|
export function getAuditFlowDetails (data) {
|
||||||
|
return request({
|
||||||
|
url: '/greenH5/greenWebmodul/rest/greenRole/getAuditFlowDetails',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//查询审核流详情
|
||||||
|
export function getFlowRoleList (data) {
|
||||||
|
return request({
|
||||||
|
url: '/greenH5/greenWebmodul/rest/greenRole/getFlowRoleList',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//新增审核流
|
||||||
|
export function addAuditFlow (data) {
|
||||||
|
return request({
|
||||||
|
url: '/greenH5/greenWebmodul/rest/greenRole/addAuditFlow',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,314 @@
|
||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<div class="left">
|
||||||
|
<el-timeline>
|
||||||
|
<el-timeline-item
|
||||||
|
v-for="(activity, index) in roleData"
|
||||||
|
:key="index"
|
||||||
|
:icon="activity.icon"
|
||||||
|
:type="activity.type"
|
||||||
|
:color="activity.color"
|
||||||
|
:size="activity.size"
|
||||||
|
:timestamp="activity.timestamp"
|
||||||
|
>
|
||||||
|
<span @click="handleCheckedChange(activity)" class="activity-label">{{ activity.LABEL }}</span>
|
||||||
|
</el-timeline-item>
|
||||||
|
</el-timeline>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<div class="right-content">
|
||||||
|
<div class="start-end">开始</div>
|
||||||
|
<div class="arrow-container">
|
||||||
|
<div class="line"></div>
|
||||||
|
<div class="arrow-down"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-for="(item, index) in auditPersonArr" :key="index" class="audit-item">
|
||||||
|
<div class="audit-label">
|
||||||
|
<span>{{ item.LABEL }}</span>
|
||||||
|
<i class="el-icon-error remove-icon" @click="removeItem(item, index)"></i>
|
||||||
|
</div>
|
||||||
|
<div class="arrow-container">
|
||||||
|
<div class="line"></div>
|
||||||
|
<div class="arrow-down"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="start-end">结束</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="button-container">
|
||||||
|
<el-button type="primary" @click="submit()">提交</el-button>
|
||||||
|
<el-button type="info" @click="cancel()">取消</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {addAuditFlow, getAuditFlowDetails, getFlowRoleList} from "@/api/getdata";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: ["row"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
auditPersonArr: [],
|
||||||
|
roleData: [],
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getDetails();
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getRoleList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleCheckedChange(data) {
|
||||||
|
if (!data.isSpecial && this.auditPersonArr.filter(item => item.LABEL === data.LABEL).length > 0) {
|
||||||
|
this.$message({
|
||||||
|
type: 'warning',
|
||||||
|
message: '已经添加过了当前角色',
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (data.isSpecial && this.auditPersonArr.filter(item => item.isSpecial).length >= 2) {
|
||||||
|
this.$message({
|
||||||
|
type: 'warning',
|
||||||
|
message: '特殊角色最多添加两个',
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.auditPersonArr.push(data);
|
||||||
|
},
|
||||||
|
removeItem(item, index) {
|
||||||
|
this.auditPersonArr.splice(index, 1);
|
||||||
|
if (item.isSpecial) {
|
||||||
|
this.auditPersonArr.forEach(i => {
|
||||||
|
if (i.isSpecial) {
|
||||||
|
i.num = 1;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getRoleList() {
|
||||||
|
this.roleData = [];
|
||||||
|
getFlowRoleList({}).then(res => {
|
||||||
|
console.log("res===>" + JSON.stringify(res));
|
||||||
|
if (res.returnCode === "1") {
|
||||||
|
//对roleData进行赋值
|
||||||
|
res.returnData.forEach(item => {
|
||||||
|
let obj = {
|
||||||
|
...item,
|
||||||
|
isSpecial: false
|
||||||
|
};
|
||||||
|
if (item.LABEL === '房管经办人') {
|
||||||
|
obj.isSpecial = true;
|
||||||
|
}
|
||||||
|
this.roleData.push(obj);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
type: 'warning',
|
||||||
|
message: res.returnMsg,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log(this.roleData);
|
||||||
|
},
|
||||||
|
getDetails() {
|
||||||
|
let params = {
|
||||||
|
id: this.row.ID
|
||||||
|
};
|
||||||
|
getAuditFlowDetails(params).then(res => {
|
||||||
|
if (res.returnCode === "1") {
|
||||||
|
//对auditPersonArr 进行赋值
|
||||||
|
res.returnData.forEach(item => {
|
||||||
|
if (item.LABEL === '房管经办人') {
|
||||||
|
this.auditPersonArr.push({
|
||||||
|
...item,
|
||||||
|
isSpecial: true,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.auditPersonArr.push({
|
||||||
|
...item,
|
||||||
|
isSpecial: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
type: 'warning',
|
||||||
|
message: res.returnMsg,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
let specialCount = 0; // 用于计数特殊角色的出现次数
|
||||||
|
let arr = [];
|
||||||
|
this.auditPersonArr.forEach(item => {
|
||||||
|
if (item.isSpecial) {
|
||||||
|
if (specialCount === 0) {
|
||||||
|
let obj = {
|
||||||
|
...item,
|
||||||
|
checkOperate: "1",
|
||||||
|
checkType: "1"
|
||||||
|
};
|
||||||
|
arr.push(obj);
|
||||||
|
} else if (specialCount === 1) {
|
||||||
|
let obj = {
|
||||||
|
...item,
|
||||||
|
checkOperate: "2",
|
||||||
|
checkType: "1"
|
||||||
|
};
|
||||||
|
arr.push(obj);
|
||||||
|
}
|
||||||
|
specialCount++; // 每次遇到特殊角色时递增
|
||||||
|
} else {
|
||||||
|
let obj = {
|
||||||
|
...item,
|
||||||
|
checkOperate: "0",
|
||||||
|
checkType: "2"
|
||||||
|
};
|
||||||
|
arr.push(obj);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let param = {
|
||||||
|
arr: arr,
|
||||||
|
num: arr.length,
|
||||||
|
id: this.row.ID
|
||||||
|
};
|
||||||
|
//新增审核流配置
|
||||||
|
addAuditFlow(param).then(res => {
|
||||||
|
if (res.returnCode === "1") {
|
||||||
|
this.$message({
|
||||||
|
message: "配置成功",
|
||||||
|
type: "success"
|
||||||
|
});
|
||||||
|
this.$emit("cancel");
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: res.returnMsg,
|
||||||
|
type: "error"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
this.$emit("cancel");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left {
|
||||||
|
width: 400px;
|
||||||
|
padding: 10px;
|
||||||
|
height: 65vh;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
width: 380px;
|
||||||
|
height: 65vh;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
max-height: 70vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.start-end {
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 15px;
|
||||||
|
border: 1.5px solid black;
|
||||||
|
width: 50%;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.audit-item {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.audit-label {
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 15px;
|
||||||
|
border: 1.5px solid black;
|
||||||
|
width: 50%;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.remove-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: -8px;
|
||||||
|
right: -8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Arrow styles */
|
||||||
|
.arrow-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line {
|
||||||
|
width: 2px;
|
||||||
|
height: 40px;
|
||||||
|
background-color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow-down {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-left: 5px solid transparent;
|
||||||
|
border-right: 5px solid transparent;
|
||||||
|
border-top: 10px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Scrollbar styles */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 6px;
|
||||||
|
height: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
background: #f1f1f1;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: #a6a6a6;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: #737373;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 按钮容器样式 */
|
||||||
|
.button-container {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20px;
|
||||||
|
right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.activity-label{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,207 @@
|
||||||
|
<template>
|
||||||
|
<el-container class="container">
|
||||||
|
<el-header class="filter-container">
|
||||||
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||||
|
<!-- <el-row> -->
|
||||||
|
<div>
|
||||||
|
<el-form-item label="关键字" class="form-flex">
|
||||||
|
<el-input @input="e => formInline.keyWord = validForbid(e)" :value="formInline.keyWord" maxlength="20"
|
||||||
|
placeholder="请输入关键字"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit()">查询</el-button>
|
||||||
|
<el-button type="primary" @click="onRest()">重置</el-button>
|
||||||
|
<!-- <el-button type="primary" @click="edit({})">添加</el-button>-->
|
||||||
|
</div>
|
||||||
|
<!-- </el-row> -->
|
||||||
|
</el-form>
|
||||||
|
</el-header>
|
||||||
|
<!-- max-height="500" -->
|
||||||
|
<div class="table">
|
||||||
|
<el-table :element-loading-text="loadingMsg" v-loading="loading" :data="tableData" stripe border
|
||||||
|
style="width:100%"
|
||||||
|
>
|
||||||
|
<el-table-column fixed prop="num" label="序号" min-width="50" width="50" align="center">
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
page.sizePage * ((page.limit == 0 ? 1 : page.limit) - 1) + (scope.$index + 1)
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="real_name" label="流程名称" min-width="150" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-popover placement="top-start" title width="200" trigger="hover" :content="scope.row.NAME">
|
||||||
|
<div class="maxsize" slot="reference">{{ scope.row.NAME }}</div>
|
||||||
|
</el-popover>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="dept_name_url" label="流程总数" min-width="50" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-popover placement="top-start" title width="50" trigger="hover" :content="(scope.row.NUM)">
|
||||||
|
<div class="maxsize" slot="reference">{{ scope.row.NUM }}</div>
|
||||||
|
</el-popover>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="org_name" label="流程类型" min-width="200" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-popover placement="top-start" title width="200" trigger="hover" :content="(scope.row.TYPENAME)">
|
||||||
|
<div class="maxsize" slot="reference">{{ scope.row.TYPENAME }}</div>
|
||||||
|
</el-popover>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" min-width="200" align="center">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-button type="primary" size="mini" @click="edit(row)">编辑</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<div class="foot-total">
|
||||||
|
<Paging @currentChanges="currentChanges" :pageNum="parseInt(page.limit)" :size="parseInt(page.sizePage)"
|
||||||
|
:total="parseInt(page.total)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<el-dialog
|
||||||
|
class="l-dialog"
|
||||||
|
title="审批流配置"
|
||||||
|
width="980px"
|
||||||
|
:visible.sync="isflag"
|
||||||
|
v-if="isflag"
|
||||||
|
:destroy-on-close="true"
|
||||||
|
>
|
||||||
|
<EditFlow
|
||||||
|
:style="{width: '980px',maxHeight: '65vh',overflow: 'auto'}"
|
||||||
|
:row="row"
|
||||||
|
v-on:cancel="closeDialog"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import Paging from "@/views/Public/paging.vue";
|
||||||
|
import {getAuditFlowList} from "@/api/getdata";
|
||||||
|
import EditFlow from "@/views/auditFlow/editFlow.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false, //初始化loading
|
||||||
|
isShowTree: false,
|
||||||
|
loadingMsg: "",
|
||||||
|
row: {},
|
||||||
|
validation: false,
|
||||||
|
food_name: "",
|
||||||
|
formInline: {
|
||||||
|
keyWord: "",
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
limit: 0 /** 当前点击*/,
|
||||||
|
sizePage: 10 /** 当前多少页*/,
|
||||||
|
total: 0 /**总数 */
|
||||||
|
},
|
||||||
|
tableData: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "流程1",
|
||||||
|
num: 10,
|
||||||
|
type: "流程类型1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
isflag: false /**用于设置弹窗 */,
|
||||||
|
num: 3
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
Paging,
|
||||||
|
EditFlow
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getlist();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
createLoad() {
|
||||||
|
this.loading = true;
|
||||||
|
this.loadingMsg = "加载中...";
|
||||||
|
},
|
||||||
|
clearLoad() {
|
||||||
|
this.loading = false;
|
||||||
|
this.loadingMsg = "";
|
||||||
|
},
|
||||||
|
// 分页
|
||||||
|
currentChanges(val) {
|
||||||
|
this.createLoad();
|
||||||
|
this.page.limit = val;
|
||||||
|
this.getlist();
|
||||||
|
},
|
||||||
|
|
||||||
|
getlist() {
|
||||||
|
let Content = {
|
||||||
|
pageSize: 10, //数量 必传
|
||||||
|
pageIndex: this.page.limit == "0" ? 1 : this.page.limit, //页码 必传
|
||||||
|
keyWord: this.formInline.keyWord,
|
||||||
|
};
|
||||||
|
getAuditFlowList(Content)
|
||||||
|
.then(res => {
|
||||||
|
console.log("res===>" + JSON.stringify(res));
|
||||||
|
if (res.returnCode == "1") {
|
||||||
|
this.clearLoad();
|
||||||
|
this.tableData = res.returnData.data;
|
||||||
|
this.page.total = res.returnData.total;
|
||||||
|
this.page.limit = res.returnData.currentPage;
|
||||||
|
this.tableData.id = res.returnData.data.id;
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: res.returnMsg,
|
||||||
|
type: "warning"
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.clearLoad();
|
||||||
|
}, 300);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.clearLoad();
|
||||||
|
}, 300);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
this.page.limit = 1;
|
||||||
|
this.createLoad();
|
||||||
|
this.getlist();
|
||||||
|
},
|
||||||
|
onRest() {
|
||||||
|
this.formInline.keyWord = "";
|
||||||
|
this.page.limit = 1;
|
||||||
|
this.createLoad();
|
||||||
|
this.getlist();
|
||||||
|
},
|
||||||
|
edit(data) {
|
||||||
|
this.row = Object.assign({}, data);
|
||||||
|
this.isflag = true;
|
||||||
|
},
|
||||||
|
closeDialog() {
|
||||||
|
this.isflag = false;
|
||||||
|
this.row = {};
|
||||||
|
this.getlist();
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.filter-container {
|
||||||
|
width: 100%;
|
||||||
|
height: auto !important;
|
||||||
|
/* flex-basis: 120px; */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.table {
|
||||||
|
/* width: */
|
||||||
|
background: #eeeeee;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue