feat: base 优化工作流配置的参与人选择等
This commit is contained in:
parent
d2f41f69ab
commit
d817601437
|
|
@ -85,6 +85,14 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
state: {
|
||||||
|
item: {
|
||||||
|
name: "节点详情",
|
||||||
|
req: async function(id){
|
||||||
|
return await http.get(`${config.API_URL}/wf/state/${id}/`);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
ticket: {
|
ticket: {
|
||||||
list: {
|
list: {
|
||||||
url: `${config.API_URL}/wf/ticket/`,
|
url: `${config.API_URL}/wf/ticket/`,
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding" style="height: 100%">
|
<el-main class="nopadding">
|
||||||
<scTable
|
<scTable
|
||||||
ref="table"
|
ref="table"
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
stripe
|
stripe
|
||||||
highlightCurrentRow
|
highlightCurrentRow
|
||||||
hidePagination
|
hidePagination
|
||||||
hideDo
|
|
||||||
>
|
>
|
||||||
<el-table-column label="#" type="index"></el-table-column>
|
<el-table-column label="#" type="index"></el-table-column>
|
||||||
<el-table-column label="ID" prop="id" width="160"></el-table-column>
|
<el-table-column label="ID" prop="id" width="160"></el-table-column>
|
||||||
|
|
@ -32,14 +31,14 @@
|
||||||
<el-table-column label="顺序ID" prop="sort" width="80"></el-table-column>
|
<el-table-column label="顺序ID" prop="sort" width="80"></el-table-column>
|
||||||
<el-table-column label="类型" width="100">
|
<el-table-column label="类型" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag effect="plain" v-if="scope.row.type == 0">
|
<el-tag type="info" v-if="scope.row.type == 0">
|
||||||
普通类型
|
普通
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag effect="plain" v-if="scope.row.type == 1">
|
<el-tag type="primary" v-if="scope.row.type == 1">
|
||||||
初始状态
|
初始
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag effect="plain" v-if="scope.row.type == 2">
|
<el-tag type="success" v-if="scope.row.type == 2">
|
||||||
结束状态
|
结束
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -53,7 +52,7 @@
|
||||||
{{ options2_[scope.row.distribute_type] }}</template
|
{{ options2_[scope.row.distribute_type] }}</template
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="到达调用">
|
<el-table-column label="到达调用" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.on_reach_func }}
|
{{ scope.row.on_reach_func }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -136,7 +135,17 @@
|
||||||
prop="participant"
|
prop="participant"
|
||||||
v-if="addForm.participant_type == 1"
|
v-if="addForm.participant_type == 1"
|
||||||
>
|
>
|
||||||
<el-select
|
<xtSelect
|
||||||
|
v-model="addForm.participant"
|
||||||
|
v-model:obj = "addForm.participant_"
|
||||||
|
style="width:100%"
|
||||||
|
:apiObj="$API.system.user.list"
|
||||||
|
>
|
||||||
|
<el-table-column prop="name" label="姓名" />
|
||||||
|
<el-table-column prop="phone" label="手机号" />
|
||||||
|
<el-table-column prop="belong_dept_name" label="部门" />
|
||||||
|
</xtSelect>
|
||||||
|
<!-- <el-select
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="addForm.participant"
|
v-model="addForm.participant"
|
||||||
placeholder="请选择参与者"
|
placeholder="请选择参与者"
|
||||||
|
|
@ -158,14 +167,25 @@
|
||||||
>{{ item.phone }}</span
|
>{{ item.phone }}</span
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="参与者"
|
label="参与者"
|
||||||
prop="participant"
|
prop="participant"
|
||||||
v-if="addForm.participant_type == 2"
|
v-if="addForm.participant_type == 2"
|
||||||
>
|
>
|
||||||
<el-select
|
<xtSelect
|
||||||
|
v-model="addForm.participant"
|
||||||
|
v-model:obj = "addForm.participant_"
|
||||||
|
style="width:100%"
|
||||||
|
:apiObj="$API.system.user.list"
|
||||||
|
:multiple="true"
|
||||||
|
>
|
||||||
|
<el-table-column prop="name" label="姓名" />
|
||||||
|
<el-table-column prop="phone" label="手机号" />
|
||||||
|
<el-table-column prop="belong_dept_name" label="部门" />
|
||||||
|
</xtSelect>
|
||||||
|
<!-- <el-select
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="addForm.participant"
|
v-model="addForm.participant"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -188,7 +208,7 @@
|
||||||
>{{ item.phone }}</span
|
>{{ item.phone }}</span
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="参与者"
|
label="参与者"
|
||||||
|
|
@ -236,40 +256,31 @@
|
||||||
prop="participant"
|
prop="participant"
|
||||||
v-if="addForm.participant_type == 4"
|
v-if="addForm.participant_type == 4"
|
||||||
>
|
>
|
||||||
<el-select
|
<xtSelect
|
||||||
style="width: 100%"
|
|
||||||
v-model="addForm.participant"
|
v-model="addForm.participant"
|
||||||
multiple
|
v-model:obj = "addForm.participant_"
|
||||||
placeholder="请选择角色"
|
style="width:100%"
|
||||||
|
:apiObj="$API.system.role.list"
|
||||||
|
:multiple="true"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-table-column prop="name" label="名称" />
|
||||||
v-for="item in roles"
|
</xtSelect>
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="岗位"
|
label="岗位"
|
||||||
prop="participant"
|
prop="participant"
|
||||||
v-if="addForm.participant_type == 10"
|
v-if="addForm.participant_type == 10"
|
||||||
>
|
>
|
||||||
<el-select
|
<xtSelect
|
||||||
style="width: 100%"
|
|
||||||
v-model="addForm.participant"
|
v-model="addForm.participant"
|
||||||
multiple
|
v-model:obj = "addForm.participant_"
|
||||||
placeholder="请选择岗位"
|
style="width:100%"
|
||||||
|
:apiObj="$API.system.post.list"
|
||||||
|
:multiple="true"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-table-column prop="name" label="名称" />
|
||||||
v-for="item in posts"
|
<el-table-column prop="code" label="标识" />
|
||||||
:key="item.id"
|
</xtSelect>
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="部门过滤"
|
label="部门过滤"
|
||||||
|
|
@ -524,10 +535,6 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.id = sessionStorage.getItem("jinYuWorkflowId");
|
this.id = sessionStorage.getItem("jinYuWorkflowId");
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getUsers();
|
|
||||||
this.getRole();
|
|
||||||
this.getPost();
|
|
||||||
this.getField();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//添加字段选项
|
//添加字段选项
|
||||||
|
|
@ -559,6 +566,7 @@ export default {
|
||||||
this.fieldList = fieldList;
|
this.fieldList = fieldList;
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
|
this.getField();
|
||||||
this.type = "add";
|
this.type = "add";
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
// if(this.dialogInitNum === 0){
|
// if(this.dialogInitNum === 0){
|
||||||
|
|
@ -616,10 +624,13 @@ export default {
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
|
this.getField();
|
||||||
|
this.$API.wf.state.item.req(row.id).then(res=>{
|
||||||
this.type = "edit";
|
this.type = "edit";
|
||||||
this.editId = row.id;
|
this.editId = row.id;
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.addForm = Object.assign({}, row);
|
this.addForm = Object.assign({}, res);
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$API.wf.state.delete.req(row.id).then((res) => {
|
this.$API.wf.state.delete.req(row.id).then((res) => {
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,24 @@
|
||||||
|
|
||||||
<scTable
|
<scTable
|
||||||
:data="list" ref="table"
|
:data="list" ref="table"
|
||||||
row-key="id" stripe highlightCurrentRow hidePagination hideDo
|
row-key="id" stripe highlightCurrentRow hidePagination
|
||||||
>
|
>
|
||||||
<el-table-column label="#" type="index"></el-table-column>
|
<el-table-column label="#" type="index"></el-table-column>
|
||||||
<el-table-column label="ID" prop="id" width="160"></el-table-column>
|
<el-table-column label="ID" prop="id" width="160"></el-table-column>
|
||||||
<el-table-column label="名称" prop="name"></el-table-column>
|
<el-table-column label="名称" prop="name"></el-table-column>
|
||||||
<!-- <el-table-column label="定时器(s)" prop="timer" width="100"></el-table-column> -->
|
<el-table-column label="属性" width="100">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag type="primary" v-if="scope.row.attribute_type == 1">
|
||||||
|
同意
|
||||||
|
</el-tag>
|
||||||
|
<el-tag type="danger" v-if="scope.row.attribute_type == 2">
|
||||||
|
拒绝
|
||||||
|
</el-tag>
|
||||||
|
<el-tag type="info" v-if="scope.row.attribute_type == 3">
|
||||||
|
其他
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="源状态">
|
<el-table-column label="源状态">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.source_state_">{{scope.row.source_state_.name}}</span>
|
<span v-if="scope.row.source_state_">{{scope.row.source_state_.name}}</span>
|
||||||
|
|
@ -25,7 +37,7 @@
|
||||||
<span v-if="scope.row.destination_state_">{{scope.row.destination_state_.name}}</span>
|
<span v-if="scope.row.destination_state_">{{scope.row.destination_state_.name}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="提交时调用">
|
<el-table-column label="提交时调用" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.on_submit_func }}
|
{{ scope.row.on_submit_func }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -167,7 +179,6 @@
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getStateList();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onJsonChange (value) {
|
onJsonChange (value) {
|
||||||
|
|
@ -187,10 +198,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
|
this.getStateList();
|
||||||
this.type = 'add';
|
this.type = 'add';
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
|
this.getStateList();
|
||||||
this.type = 'edit';
|
this.type = 'edit';
|
||||||
this.editId = row.id;
|
this.editId = row.id;
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
|
|
@ -208,7 +221,6 @@
|
||||||
},
|
},
|
||||||
async getStateList() {
|
async getStateList() {
|
||||||
let res = await this.$API.wf.workflow.states.req(this.id);
|
let res = await this.$API.wf.workflow.states.req(this.id);
|
||||||
console.log(res);
|
|
||||||
this.stateList = res;
|
this.stateList = res;
|
||||||
},
|
},
|
||||||
async submitHandle(){
|
async submitHandle(){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue