会签流程配置管理
This commit is contained in:
parent
8f968c1492
commit
253d7094cf
|
|
@ -0,0 +1,48 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
//会签流程管理列表信息
|
||||
export function getProcessList(query) {
|
||||
return request({
|
||||
url: '/material/sign_process/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
// 会签流程管理--新增
|
||||
export function addProcess(data) {
|
||||
return request({
|
||||
url: '/material/sign_process/addProcess',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//会签流程管理--详细信息
|
||||
export function getProcessDetail(id) {
|
||||
return request({
|
||||
url: '/material/sign_process/'+ id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 会签流程管理--修改
|
||||
export function editProcess(data) {
|
||||
return request({
|
||||
url: '/material/sign_process/editProcess',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 会签配置管理--删除
|
||||
export function delProcess(id) {
|
||||
return request({
|
||||
url: '/material/sign_process/delProcess/' + id,
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
v-loading="loading"
|
||||
:data="configList"
|
||||
ref="multipleTable"
|
||||
row-key="teamId"
|
||||
row-key="id"
|
||||
>
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<template slot-scope="scope">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,400 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键词"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
maxlength="20"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<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>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="processList"
|
||||
ref="multipleTable"
|
||||
row-key="id"
|
||||
>
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="会签流程"
|
||||
align="center"
|
||||
prop="processName"
|
||||
sortable
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="会签类型"
|
||||
align="center"
|
||||
prop="signTypeName"
|
||||
sortable
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="会签组织"
|
||||
align="center"
|
||||
prop="orgName"
|
||||
sortable
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['signConfig:info:edit']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['signConfig:info:remove']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 新增或修改弹窗 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="showProcess"
|
||||
width="600px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="流程名称" prop="processId">
|
||||
<el-select
|
||||
v-model="form.processId"
|
||||
placeholder="请选择流程名称"
|
||||
style="width: 100%;"
|
||||
filterable
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.countersign_process_config_name"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="会签类型" prop="signType">
|
||||
<el-select
|
||||
v-model="form.signType"
|
||||
placeholder="请选择会签类型"
|
||||
style="width: 100%;"
|
||||
filterable
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.countersign_process_type_name"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="会签组织" prop="orgId">
|
||||
<treeselect
|
||||
v-model="form.orgId"
|
||||
:searchable="true"
|
||||
:options="deptOptions"
|
||||
:normalizer="normalizer"
|
||||
placeholder="请选择会签组织"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getProcessList, addProcess, getProcessDetail, editProcess, delProcess } from "@/api/countersign/countersignProcess";
|
||||
import { listDept, } from "@/api/system/dept";
|
||||
import { deptTreeSelect } from "@/api/system/user";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
export default {
|
||||
name: "signProcess",
|
||||
dicts: ["countersign_process_config_name", "countersign_process_type_name"],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
showProcess: false,
|
||||
// 部门组织树选项
|
||||
deptOptions: [],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 会签配置表格数据
|
||||
processList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord: undefined,
|
||||
},
|
||||
|
||||
// 表单参数
|
||||
form: {
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
processId: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择流程名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
signType: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择会签类型",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
orgId: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择会签组织",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDeptList()
|
||||
this.getList();
|
||||
},
|
||||
components: { Treeselect },
|
||||
methods: {
|
||||
// /** 查询人员列表 */
|
||||
// getUserList() {
|
||||
// getDeptList({ userId:1}).then(response => {
|
||||
// console.log('response',response)
|
||||
// this.deptOptions = response.data
|
||||
// }
|
||||
// );
|
||||
// },
|
||||
|
||||
/** 查询部门列表 */
|
||||
getDeptList() {
|
||||
listDept({ userId:1}).then(response => {
|
||||
this.deptOptions = this.handleTree(response.data, "deptId");
|
||||
});
|
||||
},
|
||||
|
||||
/** 转换部门数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children;
|
||||
}
|
||||
return {
|
||||
id: node.deptId,
|
||||
label: node.deptName,
|
||||
children: node.children
|
||||
};
|
||||
},
|
||||
|
||||
/** 查询岗位列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getProcessList(this.queryParams).then((response) => {
|
||||
this.processList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.showProcess = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
|
||||
/** 编辑按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id;
|
||||
getProcessDetail(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.showProcess = true;
|
||||
this.title = "编辑";
|
||||
});
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams.keyWord = null;
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
//** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
editProcess(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.showProcess = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addProcess(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.showProcess = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.showProcess = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const id = row.id;
|
||||
this.$modal
|
||||
.confirm("是否确认删除数据项?")
|
||||
.then(function () {
|
||||
return delProcess(id);
|
||||
})
|
||||
.then(() => {
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
this.getList();
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.uploadImg {
|
||||
padding-top: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.deviceCode {
|
||||
margin-top: 10px;
|
||||
padding-bottom: 20px;
|
||||
font-size: 18px;
|
||||
}
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
//隐藏图片上传框的css
|
||||
::v-deep.disabled {
|
||||
.el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue