删除审批流
This commit is contained in:
1 parent
4570db06ac
commit
a41ced621b
3 files changed
+40
-12
No files matched your search
@@ -56,16 +56,6 @@ class WorkflowService extends Service {
|
|||||||
columnName: "formId"
|
columnName: "formId"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
async createWorkflowId() {
|
|
||||||
const { actionData } = this.ctx.request.body.appData;
|
|
||||||
const { jianghuKnex } = this.app;
|
|
||||||
actionData.workflowId = await idGenerateUtil.idPlus({
|
|
||||||
knex: jianghuKnex,
|
|
||||||
startValue: 1000,
|
|
||||||
tableName: 'workflow',
|
|
||||||
columnName: "workflowId"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async assignTplData() {
|
async assignTplData() {
|
||||||
const { actionData } = this.ctx.request.body.appData;
|
const { actionData } = this.ctx.request.body.appData;
|
||||||
|
|||||||
@@ -346,7 +346,13 @@ Vue.component("workflow-editor-drawer", {
|
|||||||
appData: {
|
appData: {
|
||||||
pageId: 'workflowManagement',
|
pageId: 'workflowManagement',
|
||||||
actionId: 'insertItem',
|
actionId: 'insertItem',
|
||||||
actionData: this.formSubmitData
|
actionData: this.formSubmitData,
|
||||||
|
bizIdGenerate: {
|
||||||
|
tableName: "workflow",
|
||||||
|
prefix: "W",
|
||||||
|
type: "idSequence",
|
||||||
|
bizId: "workflowId",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})).data.appData.resultData;
|
})).data.appData.resultData;
|
||||||
|
|||||||
@@ -53,9 +53,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- pc端 -->
|
<!-- pc端 -->
|
||||||
<template v-if="!isMobile">
|
<template v-if="!isMobile">
|
||||||
<span role="button" class="success--text font-weight-medium font-size-2" @click="doUiAction('openWorkflowEditorDrawer', item)">
|
<span role="button" class="success--text font-weight-medium font-size-2 mr-2" @click="doUiAction('openWorkflowEditorDrawer', item)">
|
||||||
<v-icon size="16" class="success--text">mdi-note-edit-outline</v-icon>编辑
|
<v-icon size="16" class="success--text">mdi-note-edit-outline</v-icon>编辑
|
||||||
</span>
|
</span>
|
||||||
|
<span role="button" class="success--text font-weight-medium font-size-2" @click="doUiAction('deleteWorkflow', item)">
|
||||||
|
<v-icon size="16" class="success--text">mdi-note-edit-outline</v-icon>删除
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<!-- 手机端 -->
|
<!-- 手机端 -->
|
||||||
<v-menu offset-y v-if="isMobile">
|
<v-menu offset-y v-if="isMobile">
|
||||||
@@ -69,6 +72,9 @@
|
|||||||
<v-list-item @click="doUiAction('openWorkflowEditorDrawer', item)">
|
<v-list-item @click="doUiAction('openWorkflowEditorDrawer', item)">
|
||||||
<v-list-item-title>编辑</v-list-item-title>
|
<v-list-item-title>编辑</v-list-item-title>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
<v-list-item @click="doUiAction('deleteWorkflow', item)">
|
||||||
|
<v-list-item-title>删除</v-list-item-title>
|
||||||
|
</v-list-item>
|
||||||
</v-list>
|
</v-list>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
</template>
|
</template>
|
||||||
@@ -179,6 +185,11 @@
|
|||||||
case 'openWorkflowEditorDrawer':
|
case 'openWorkflowEditorDrawer':
|
||||||
await this.openWorkflowEditorDrawer(uiActionData);
|
await this.openWorkflowEditorDrawer(uiActionData);
|
||||||
break;
|
break;
|
||||||
|
case 'deleteWorkflow':
|
||||||
|
await this.confirmDeleteItemDialog();
|
||||||
|
await this.deleteWorkflow(uiActionData);
|
||||||
|
await this.doUiAction('getTableData')
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.error("[doUiAction] uiActionId not find", { uiActionId });
|
console.error("[doUiAction] uiActionId not find", { uiActionId });
|
||||||
break;
|
break;
|
||||||
@@ -233,6 +244,27 @@
|
|||||||
|
|
||||||
openWorkflowEditorDrawer(item) {
|
openWorkflowEditorDrawer(item) {
|
||||||
this.$refs.workflowEditorDrawer.doUiAction('open', item);
|
this.$refs.workflowEditorDrawer.doUiAction('open', item);
|
||||||
|
},
|
||||||
|
|
||||||
|
async confirmDeleteItemDialog() {
|
||||||
|
if (await window.confirmDialog({title: "删除", content: "确定删除吗?"}) === false) {
|
||||||
|
throw new Error("[confirmDeleteItemDialog] 否");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async deleteWorkflow({workflowId}){
|
||||||
|
await window.vtoast.loading("删除数据");
|
||||||
|
await window.jianghuAxios({
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
pageId: 'workflowManagement',
|
||||||
|
actionId: 'deleteItem',
|
||||||
|
actionData: {},
|
||||||
|
where: {workflowId: workflowId}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
await window.vtoast.success("删除数据成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in new issue
Block a user