Compare commits

..

No commits in common. "33094c8161cdc4d1508b4c5f8a46bbd11bcd2afb" and "69c63eea06542dad325530d127c848dd6b365055" have entirely different histories.

3 changed files with 52 additions and 83 deletions

View File

@ -85,14 +85,6 @@ 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/`,

View File

@ -9,7 +9,7 @@
></el-button> ></el-button>
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding" style="height: 100%">
<scTable <scTable
ref="table" ref="table"
v-loading="listLoading" v-loading="listLoading"
@ -18,6 +18,7 @@
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>
@ -31,14 +32,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 type="info" v-if="scope.row.type == 0"> <el-tag effect="plain" v-if="scope.row.type == 0">
普通 普通类型
</el-tag> </el-tag>
<el-tag type="primary" v-if="scope.row.type == 1"> <el-tag effect="plain" v-if="scope.row.type == 1">
初始 初始状态
</el-tag> </el-tag>
<el-tag type="success" v-if="scope.row.type == 2"> <el-tag effect="plain" v-if="scope.row.type == 2">
结束 结束状态
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -52,7 +53,7 @@
{{ options2_[scope.row.distribute_type] }}</template {{ options2_[scope.row.distribute_type] }}</template
> >
</el-table-column> </el-table-column>
<el-table-column label="到达调用" :show-overflow-tooltip="true"> <el-table-column label="到达调用">
<template #default="scope"> <template #default="scope">
{{ scope.row.on_reach_func }} {{ scope.row.on_reach_func }}
</template> </template>
@ -135,17 +136,7 @@
prop="participant" prop="participant"
v-if="addForm.participant_type == 1" v-if="addForm.participant_type == 1"
> >
<xtSelect <el-select
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="请选择参与者"
@ -167,25 +158,14 @@
>{{ 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"
> >
<xtSelect <el-select
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
@ -208,7 +188,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="参与者"
@ -256,31 +236,40 @@
prop="participant" prop="participant"
v-if="addForm.participant_type == 4" v-if="addForm.participant_type == 4"
> >
<xtSelect <el-select
v-model="addForm.participant" style="width: 100%"
v-model:obj = "addForm.participant_" v-model="addForm.participant"
style="width:100%" multiple
:apiObj="$API.system.role.list" placeholder="请选择角色"
:multiple="true"
> >
<el-table-column prop="name" label="名称" /> <el-option
</xtSelect> v-for="item in roles"
: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"
> >
<xtSelect <el-select
v-model="addForm.participant" style="width: 100%"
v-model:obj = "addForm.participant_" v-model="addForm.participant"
style="width:100%" multiple
:apiObj="$API.system.post.list" placeholder="请选择岗位"
:multiple="true"
> >
<el-table-column prop="name" label="名称" /> <el-option
<el-table-column prop="code" label="标识" /> v-for="item in posts"
</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="部门过滤"
@ -535,6 +524,10 @@ 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: {
// //
@ -566,7 +559,6 @@ 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){
@ -624,13 +616,10 @@ export default {
// }) // })
}, },
handleEdit(row) { handleEdit(row) {
this.getField(); this.type = "edit";
this.$API.wf.state.item.req(row.id).then(res=>{ this.editId = row.id;
this.type = "edit"; this.dialogVisible = true;
this.editId = row.id; this.addForm = Object.assign({}, row);
this.dialogVisible = true;
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) => {

View File

@ -9,24 +9,12 @@
<scTable <scTable
:data="list" ref="table" :data="list" ref="table"
row-key="id" stripe highlightCurrentRow hidePagination row-key="id" stripe highlightCurrentRow 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>
<el-table-column label="名称" prop="name"></el-table-column> <el-table-column label="名称" prop="name"></el-table-column>
<el-table-column label="属性" width="100"> <!-- <el-table-column label="定时器(s)" prop="timer" width="100"></el-table-column> -->
<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>
@ -37,7 +25,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="提交时调用" :show-overflow-tooltip="true"> <el-table-column label="提交时调用">
<template #default="scope"> <template #default="scope">
{{ scope.row.on_submit_func }} {{ scope.row.on_submit_func }}
</template> </template>
@ -179,6 +167,7 @@
}, },
mounted() { mounted() {
this.getList(); this.getList();
this.getStateList();
}, },
methods: { methods: {
onJsonChange (value) { onJsonChange (value) {
@ -198,12 +187,10 @@
} }
}, },
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;
@ -221,6 +208,7 @@
}, },
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(){