|
@@ -13,11 +13,11 @@ export default {
|
|
|
AddButton: () => import("./add/index.vue"),
|
|
|
SeeButton: () => import("./see/index.vue"),
|
|
|
EditButton: () => import("./edit/index.vue"),
|
|
|
- ExportModel: () => import("./export/index.vue"),
|
|
|
- DeleteModel: () => import("./delete/index.vue"),
|
|
|
- TerminationModel: () => import("./termination/index.vue"),
|
|
|
- PigeonholeModel: () => import("./pigeonhole/index.vue"),
|
|
|
- SubmitModel: () => import("./submit/index.vue"),
|
|
|
+ DeleButton: () => import("./delete/index.vue"),
|
|
|
+ SubmButton: () => import("./submit/index.vue"),
|
|
|
+ TermButton: () => import("./termination/index.vue"),
|
|
|
+ PigeButton: () => import("./pigeonhole/index.vue"),
|
|
|
+ ExportButton: () => import("./export/index.vue"),
|
|
|
ElSuperTable: () => import("@/components/super-table/index.vue"),
|
|
|
ElSuperSearch: () => import("@/components/super-search/index.vue"),
|
|
|
},
|
|
@@ -34,33 +34,7 @@ export default {
|
|
|
page: { pageNum: 1, pageSize: 10, total: 0 },
|
|
|
};
|
|
|
},
|
|
|
- computed: {
|
|
|
- $power: {
|
|
|
- get() {
|
|
|
- const {
|
|
|
- selectData,
|
|
|
- selectData: [{ status, pigeonhole } = {}],
|
|
|
- } = this;
|
|
|
- const rule1 = selectData.length === 1;
|
|
|
- const rule2 = selectData.length > 1;
|
|
|
- const rule3 = status === "0" || status === "3";
|
|
|
- const rule4 = status === "2";
|
|
|
- const rule5 = pigeonhole === "Y";
|
|
|
- return {
|
|
|
- // 修 改
|
|
|
- edit: rule1 && rule3,
|
|
|
- // 删 除
|
|
|
- delt: rule1 && rule3,
|
|
|
- // 终 止
|
|
|
- term: rule1 && rule4,
|
|
|
- // 归 档
|
|
|
- pige: rule1 && !rule5,
|
|
|
- // 提 交
|
|
|
- subm: rule1,
|
|
|
- };
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
+ computed: {},
|
|
|
created() {
|
|
|
this.useQuery(this.params, this.page);
|
|
|
},
|
|
@@ -107,117 +81,38 @@ export default {
|
|
|
useSelect(prop) {
|
|
|
this.selectData = prop;
|
|
|
},
|
|
|
- // 删 除
|
|
|
- async useDelete(prop) {
|
|
|
- const [{ id }] = prop;
|
|
|
- const { open } = this.$refs.DeleteModel;
|
|
|
- await open(id);
|
|
|
- },
|
|
|
// 明 细
|
|
|
async useSee(prop) {
|
|
|
const { id } = prop;
|
|
|
const { open } = this.$refs.SeeButton;
|
|
|
await open(id);
|
|
|
},
|
|
|
- // 终 止
|
|
|
- async useTermination(prop) {
|
|
|
- const [{ id }] = prop;
|
|
|
- const { open } = this.$refs.TerminationModel;
|
|
|
- await open(id);
|
|
|
- },
|
|
|
// 归 档
|
|
|
async usePigeonhole(prop) {
|
|
|
+ const { open } = this.$refs.PigeButton;
|
|
|
const [{ id }] = prop;
|
|
|
- const { open } = this.$refs.PigeonholeModel;
|
|
|
await open(id);
|
|
|
},
|
|
|
// 导 出
|
|
|
async useExport(prop, page) {
|
|
|
const { pageNum, pageSize } = page;
|
|
|
- const { open } = this.$refs.ExportModel;
|
|
|
+ const { open } = this.$refs.ExportButton;
|
|
|
await open({ ...prop, pageNum, pageSize });
|
|
|
},
|
|
|
- // 提交OA
|
|
|
- async useSubmit(prop) {
|
|
|
- const [{ id }] = prop;
|
|
|
- const { open } = this.$refs.SubmitModel;
|
|
|
- await open(id);
|
|
|
- },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<el-card v-loading="loading" :body-style="{ padding: 0 }">
|
|
|
- <export-model ref="ExportModel"></export-model>
|
|
|
- <!-- <import-model ref="ImportModel"></import-model> -->
|
|
|
- <submit-model
|
|
|
- ref="SubmitModel"
|
|
|
- @success="useQuery(params, page)"
|
|
|
- ></submit-model>
|
|
|
- <delete-model
|
|
|
- ref="DeleteModel"
|
|
|
- @success="useQuery(params, page)"
|
|
|
- ></delete-model>
|
|
|
- <termination-model
|
|
|
- ref="TerminationModel"
|
|
|
- @success="useQuery(params, page)"
|
|
|
- ></termination-model>
|
|
|
- <pigeonhole-model
|
|
|
- ref="PigeonholeModel"
|
|
|
- @success="useQuery(params, page)"
|
|
|
- ></pigeonhole-model>
|
|
|
<el-super-search
|
|
|
v-model="params"
|
|
|
:size="size"
|
|
|
:dict="dict"
|
|
|
:columns="SearchColumns"
|
|
|
+ @reset="useReset"
|
|
|
@submit="useQuery(params, page)"
|
|
|
></el-super-search>
|
|
|
-
|
|
|
- <!-- <div style="padding: 0 20px; display: flex; justify-content: space-between">
|
|
|
-
|
|
|
- <el-button :size="size" @click="useExport(params, page)">
|
|
|
- 导 出
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- v-show="$power.edit"
|
|
|
- :size="size"
|
|
|
- @click="useEdit(selectData)"
|
|
|
- >
|
|
|
- 编 辑
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- :size="size"
|
|
|
- v-show="$power.subm"
|
|
|
- @click="useSubmit(selectData)"
|
|
|
- >
|
|
|
- 提交OA
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- v-show="$power.delt"
|
|
|
- :size="size"
|
|
|
- @click="useDelete(selectData)"
|
|
|
- >
|
|
|
- 删 除
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- v-show="$power.term"
|
|
|
- :size="size"
|
|
|
- @click="useTermination(selectData)"
|
|
|
- >
|
|
|
- 终 止
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- v-show="$power.pige"
|
|
|
- :size="size"
|
|
|
- @click="usePigeonhole(selectData)"
|
|
|
- >
|
|
|
- 归 档
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- <div></div>
|
|
|
- </div> -->
|
|
|
<div style="padding: 0 20px; text-align: right">
|
|
|
<el-button-group style="margin: 0 10px 0 0">
|
|
|
<add-button
|
|
@@ -232,12 +127,17 @@ export default {
|
|
|
@success="useQuery(params, page)"
|
|
|
></add-button>
|
|
|
</el-button-group>
|
|
|
- <el-button-group>
|
|
|
+ <el-button-group style="margin: 0 10px 0 0">
|
|
|
<edit-button
|
|
|
:size="size"
|
|
|
:select-data="selectData"
|
|
|
@success="useQuery(params, page)"
|
|
|
></edit-button>
|
|
|
+ <dele-button
|
|
|
+ :size="size"
|
|
|
+ :select-data="selectData"
|
|
|
+ @success="useQuery(params, page)"
|
|
|
+ ></dele-button>
|
|
|
<see-button
|
|
|
v-show="false"
|
|
|
:size="size"
|
|
@@ -245,6 +145,31 @@ export default {
|
|
|
ref="SeeButton"
|
|
|
></see-button
|
|
|
></el-button-group>
|
|
|
+ <el-button-group style="margin: 0 10px 0 0">
|
|
|
+ <subm-button
|
|
|
+ :size="size"
|
|
|
+ :select-data="selectData"
|
|
|
+ @success="useQuery(params, page)"
|
|
|
+ ></subm-button>
|
|
|
+ <term-button
|
|
|
+ :size="size"
|
|
|
+ :select-data="selectData"
|
|
|
+ @success="useQuery(params, page)"
|
|
|
+ ></term-button>
|
|
|
+ <pige-button
|
|
|
+ :size="size"
|
|
|
+ :select-data="selectData"
|
|
|
+ @success="useQuery(params, page)"
|
|
|
+ ></pige-button>
|
|
|
+ </el-button-group>
|
|
|
+ <el-button-group>
|
|
|
+ <export-button
|
|
|
+ :size="size"
|
|
|
+ :page="page"
|
|
|
+ :data="params"
|
|
|
+ @success="useQuery(params, page)"
|
|
|
+ ></export-button>
|
|
|
+ </el-button-group>
|
|
|
</div>
|
|
|
<el-super-table
|
|
|
v-model="tableData"
|