流程模型-流程分类下拉

This commit is contained in:
xusd 2024-08-20 16:19:52 +08:00
parent 7014f351ad
commit 055ad608fa
2 changed files with 19 additions and 1 deletions

View File

@ -51,3 +51,11 @@ export function exportCategoryExcel(params) {
responseType: 'blob' responseType: 'blob'
}) })
} }
// 获得流程分类下拉
export function getCategorySelect() {
return request({
url: '/bpm/category/simple-list',
method: 'get'
})
}

View File

@ -140,7 +140,7 @@
</el-form-item> </el-form-item>
<el-form-item v-if="form.id" label="流程分类" prop="category"> <el-form-item v-if="form.id" label="流程分类" prop="category">
<el-select v-model="form.category" placeholder="请选择流程分类" clearable style="width: 100%"> <el-select v-model="form.category" placeholder="请选择流程分类" clearable style="width: 100%">
<el-option v-for="dict in categoryDictDatas" :key="dict.value" :label="dict.label" :value="dict.value"/> <el-option v-for="item in categorySelect" :key="item.id" :label="item.name" :value="item.id"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="流程描述" prop="description"> <el-form-item label="流程描述" prop="description">
@ -228,6 +228,11 @@ import {
createModel, createModel,
updateModel updateModel
} from "@/api/bpm/model"; } from "@/api/bpm/model";
import {
getCategorySelect
} from '@/api/bpm/category';
import {DICT_TYPE, getDictDatas} from "@/utils/dict"; import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import {getForm, getSimpleForms} from "@/api/bpm/form"; import {getForm, getSimpleForms} from "@/api/bpm/form";
import {decodeFields} from "@/utils/formGenerator"; import {decodeFields} from "@/utils/formGenerator";
@ -247,6 +252,7 @@ export default {
}, },
data() { data() {
return { return {
categorySelect:[],
// //
loading: true, loading: true,
// //
@ -318,6 +324,10 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
//
getCategorySelect().then(response =>{
this.categorySelect = response.data;
})
// //
getSimpleForms().then(response => { getSimpleForms().then(response => {
this.forms = response.data this.forms = response.data