diff --git a/src/utils/Url.ts b/src/utils/Url.ts index c942176..d32fdcf 100644 --- a/src/utils/Url.ts +++ b/src/utils/Url.ts @@ -13,6 +13,7 @@ export default class Url { static readonly SHOW_MENU : string = "show-menu/%d"; static readonly ALLOT_NODE_GROUP : string = "allot-node-group/%d"; static readonly ALLOT_MENU : string = "allot-menu/%d"; + static readonly UPDATE_NICKNAME : string = "update-nickname"; // TODO 菜单 static readonly MENUS : string = "menu"; @@ -42,6 +43,7 @@ export default class Url { static readonly DELETE_APPLY : string = "apply/%d"; static readonly APPLY_PASS : string = "apply/pass/%d"; static readonly APPLY_NO_PASS : string = "apply/no-pass/%d"; + static readonly EXECUTE_APPLY : string = "apply/execute/%d"; } diff --git a/src/views/home/Common/Types.ts b/src/views/home/Common/Types.ts index bc2509c..14de89f 100644 --- a/src/views/home/Common/Types.ts +++ b/src/views/home/Common/Types.ts @@ -28,6 +28,16 @@ export interface NodeGroupInterface{ name ?: string; } +export interface ApplyInterface{ + id : number; + item_id : number; + reason : string; + send_account : string; + state : number; + unikey : string; + execute_state ?: number; +} + export interface ElTreeDataInterface { id : number; label : string; diff --git a/src/views/home/pages/apply/apply.ts b/src/views/home/pages/apply/apply.ts index 8adcd47..014fe84 100644 --- a/src/views/home/pages/apply/apply.ts +++ b/src/views/home/pages/apply/apply.ts @@ -35,6 +35,9 @@ export default class Apply extends HomeParent { public showApplyDialog:boolean = false; public DataDetail:any=[]; public columns: TableColumn[] = [{ + title: "unikey", + key: "unikey" + },{ title: "申请者", key: "creator_account" }, { diff --git a/src/views/home/pages/audit/audit.ts b/src/views/home/pages/audit/audit.ts index b06799f..55535f3 100644 --- a/src/views/home/pages/audit/audit.ts +++ b/src/views/home/pages/audit/audit.ts @@ -24,7 +24,10 @@ export default class Audit extends HomeParent { public Data = [] public showApplyDialog:boolean = false; public DataDetail:any=[]; - public columns: TableColumn[] = [ { + public columns: TableColumn[] = [{ + title: "unikey", + key: "unikey" + }, { title: "申请者", key: "creator_account" }, { diff --git a/src/views/home/pages/execute/execute.ts b/src/views/home/pages/execute/execute.ts index 1281e1b..587c9b1 100644 --- a/src/views/home/pages/execute/execute.ts +++ b/src/views/home/pages/execute/execute.ts @@ -7,7 +7,7 @@ import { Mutation } from "vuex-class"; import HomeParent from "@/views/home/Common/HomeParent"; -import { ElTreeDataInterface, } from "@/views/home/Common/Types"; +import { ElTreeDataInterface, ApplyInterface } from "@/views/home/Common/Types"; import CustomPage from "@/components/page.vue"; import {Form, TableColumn} from "view-design"; import {Message, Tree} from "element-ui"; @@ -21,10 +21,13 @@ import {Request} from "@/utils/Request"; export default class Execute extends HomeParent { name: string = "execute"; - public Data = [] + public Data:ApplyInterface[] = [] public showApplyDialog:boolean = false; public DataDetail:any=[]; public columns: TableColumn[] = [ { + title: "unikey", + key: "unikey" + },{ title: "申请者", key: "creator_account" }, { @@ -40,9 +43,13 @@ export default class Execute extends HomeParent { title: "审核时间", key: "audit_time" }, { - title: "状态", + title: "审核状态", slot: "state", align: 'center', + }, { + title: "执行状态", + slot: "execute_state", + align: 'center', }, { title: "操作", slot: "operation", @@ -90,7 +97,19 @@ export default class Execute extends HomeParent { } public execute(row){ - + if (row.execute_state){ + this.error('无法再次执行') + return + } + let url : string = this.$sprintf(Url.EXECUTE_APPLY, row.id); + Request('get', url).then((res:any)=>{ + if (res.code == 200){ + this._getData(); + this.success() + }else { + this.error(res.message) + } + }) } private async _getData() { diff --git a/src/views/home/pages/execute/execute.vue b/src/views/home/pages/execute/execute.vue index 29153a9..acee979 100644 --- a/src/views/home/pages/execute/execute.vue +++ b/src/views/home/pages/execute/execute.vue @@ -9,6 +9,14 @@ 未通过 +