feat: base 添加工作流分组select

This commit is contained in:
caoqianming 2025-11-18 11:24:58 +08:00
parent cea821e592
commit 0567d98b93
2 changed files with 24 additions and 0 deletions

View File

@ -10,6 +10,13 @@ export default {
return await http.get(this.url, data); return await http.get(this.url, data);
} }
}, },
cates: {
url: `${config.API_URL}/wf/workflow/cates/`,
name: "工作流分类",
req: async function(data){
return await http.get(this.url, data);
}
},
item: { item: {
name: "工作流详情", name: "工作流详情",
req: async function(id){ req: async function(id){

View File

@ -12,6 +12,15 @@
@click="batch_del" v-auth="'workflow.delete'"></el-button> --> @click="batch_del" v-auth="'workflow.delete'"></el-button> -->
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-select v-model="query.cate" placeholder="工作流分组" clearable style="width: 220px;"
@change="handleQuery">
<el-option
v-for="item in wfCateOptions"
:key="item"
:label="item"
:value="item"
/>
</el-select>
<el-input <el-input
v-model="query.search" v-model="query.search"
placeholder="工作流名称" placeholder="工作流名称"
@ -222,6 +231,7 @@ export default {
edit: "编辑", edit: "编辑",
show: "查看", show: "查看",
}, },
wfCateOptions: [],
// //
addForm: { addForm: {
name: "", name: "",
@ -248,6 +258,7 @@ export default {
}, },
mounted() { mounted() {
// this.getGroup(); // this.getGroup();
this.getWfCates();
}, },
methods: { methods: {
// //
@ -256,6 +267,12 @@ export default {
this.limitedVisible = true; this.limitedVisible = true;
}, },
getWfCates() {
this.$API.wf.workflow.cates.req().then(res=>{
this.wfCateOptions = res
})
},
submitHandle() { submitHandle() {
let that = this; let that = this;
this.$refs.addForm.validate((valid) => { this.$refs.addForm.validate((valid) => {