|
|
@@ -63,23 +63,38 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tjm_card_table">
|
|
|
- <el-table v-loading="loading" row-key="id" header-cell-class-name="tjm_card_table_header" height="400" :data="tableData" border @row-click="table_detail($event)">
|
|
|
+ <el-table v-loading="loading" row-key="id" header-cell-class-name="tjm_card_table_header" height="400" :data="tableData" border @row-click="(row, column) => !column.fixed && table_detail(row)">
|
|
|
<el-table-column type="index" label="序号" width="55"></el-table-column>
|
|
|
<template v-for="(item, index) in columns" :key="index">
|
|
|
<el-table-column :label="item.label" :prop="item.props" :width="item.width || 180" show-overflow-tooltip>
|
|
|
<template #default="scope">{{ columnFormat(scope.row, item.props) }}</template>
|
|
|
</el-table-column>
|
|
|
</template>
|
|
|
- <el-table-column label="操作" fixed="right" width="230">
|
|
|
+ <el-table-column label="操作" fixed="right" width="280">
|
|
|
<template #default="scope">
|
|
|
<template v-if="scope.row.status == 'active' || scope.row.status == 'inactive'">
|
|
|
- <el-button type="primary" link icon="edit" @click.stop="table_edit(scope.row)">修改</el-button>
|
|
|
- <el-button type="primary" link icon="upload" @click.stop="table_edit(scope.row)">上报</el-button>
|
|
|
+ <template v-if="scope.row.status == 'active'">
|
|
|
+ <el-button type="primary" link icon="edit" @click.stop="table_edit(scope.row)">修改</el-button>
|
|
|
+ <el-button type="primary" link icon="upload" @click.stop="table_edit(scope.row)">上报</el-button>
|
|
|
+ </template>
|
|
|
+ <template v-if="scope.row.status == 'inactive'">
|
|
|
+ <el-button type="primary" link icon="tickets" @click.stop="table_edit(scope.row)">重新上报</el-button>
|
|
|
+ <el-button v-if="scope.row.processTaskId && scope.row.processInstanceId" type="primary" link @click.stop="table_process(scope.row)">
|
|
|
+ <template #icon><tjm-icon-uis-process /></template>
|
|
|
+ 审批流程
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
<el-button type="primary" link icon="delete" @click.stop="table_del(scope.row)">删除</el-button>
|
|
|
</template>
|
|
|
- <el-button v-if="scope.row.status == 'approve' || scope.row.status == 'done'" type="primary" link icon="tickets" @click.stop="table_detail(scope.row)">详情</el-button>
|
|
|
- <el-button v-if="scope.row.status == 'approve'" type="primary" link icon="refresh-right" @click.stop="table_withdraw(scope.row)">撤回</el-button>
|
|
|
- <el-button v-if="scope.row.status == 'done'" type="primary" link icon="info-filled" @click.stop="table_detail(scope.row, 'explain')">月度争取情况说明</el-button>
|
|
|
+ <template v-if="scope.row.status == 'approve' || scope.row.status == 'done'">
|
|
|
+ <el-button type="primary" link icon="tickets" @click.stop="table_detail(scope.row)">详情</el-button>
|
|
|
+ <el-button v-if="scope.row.processTaskId && scope.row.processInstanceId" type="primary" link @click.stop="table_process(scope.row)">
|
|
|
+ <template #icon><tjm-icon-uis-process /></template>
|
|
|
+ 审批流程
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <el-button v-if="scope.row.status == 'approve' && scope.row.isWithdraw == 1" type="primary" link icon="refresh-right" @click.stop="table_withdraw(scope.row)">撤回</el-button>
|
|
|
+ <el-button v-if="scope.row.status == 'done'" class="no-m-l" type="primary" link icon="info-filled" @click.stop="table_detail(scope.row, 'explain')">月度争取情况说明</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -91,25 +106,32 @@
|
|
|
|
|
|
<policy-detail v-if="dialog.detail" ref="policyDetail" @success="reloadTable" @closed="closed"></policy-detail>
|
|
|
<policy-explain v-if="dialog.explain" ref="policyExplain" @success="reloadTable" @closed="dialog.explain = false"></policy-explain>
|
|
|
+ <policy-process-dialog v-if="dialog.process" ref="processDialog" @success="reloadTable" @closed="dialog.process = false"></policy-process-dialog>
|
|
|
+ <yh-workflow v-if="dialog.workflow" ref="yhWorkflow" @closed="dialog.workflow = false"></yh-workflow>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import API from "@/api/policy/strive";
|
|
|
+import { useUserStore } from "@/store/user";
|
|
|
import { exportExcel } from "@/utils/exportExcel";
|
|
|
import { levelDic, typeDic, whetherDic } from "@/views/policyShare/main";
|
|
|
import { columns, statusDic } from "./main";
|
|
|
|
|
|
import tableImport from "@/components/Upload/tableImport.vue";
|
|
|
import yhPagination from "@/components/Pagination/index.vue";
|
|
|
+import yhWorkflow from "@/components/Workflow/index.vue";
|
|
|
import policyDetail from "./dialog.vue";
|
|
|
import policyExplain from "./explain.vue";
|
|
|
+import policyProcessDialog from "@/views/toDo/strive.vue";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
tableImport,
|
|
|
yhPagination,
|
|
|
+ yhWorkflow,
|
|
|
policyDetail,
|
|
|
- policyExplain
|
|
|
+ policyExplain,
|
|
|
+ policyProcessDialog
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
@@ -120,7 +142,8 @@ export default {
|
|
|
createTime: [],
|
|
|
params: {
|
|
|
page: 1,
|
|
|
- size: 10
|
|
|
+ size: 10,
|
|
|
+ deptId: useUserStore().userInfo.deptId
|
|
|
},
|
|
|
|
|
|
total: 0,
|
|
|
@@ -128,7 +151,9 @@ export default {
|
|
|
|
|
|
dialog: {
|
|
|
detail: false,
|
|
|
- explain: false
|
|
|
+ explain: false,
|
|
|
+ process: false,
|
|
|
+ workflow: false
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -161,10 +186,10 @@ export default {
|
|
|
|
|
|
reset() {
|
|
|
this.createTime = [];
|
|
|
- for (const key in this.params) {
|
|
|
- if (key == "page") this.params[key] = 1;
|
|
|
- else if (key == "size") this.params[key] = 10;
|
|
|
- else this.params[key] = null;
|
|
|
+ this.params = {
|
|
|
+ page: 1,
|
|
|
+ size: 10,
|
|
|
+ deptId: useUserStore().userInfo.deptId
|
|
|
}
|
|
|
this.reloadTable();
|
|
|
},
|
|
|
@@ -182,8 +207,19 @@ export default {
|
|
|
},
|
|
|
|
|
|
table_edit(row) {
|
|
|
- this.dialog.detail = true;
|
|
|
- this.$nextTick(() => this.$refs.policyDetail.open("edit").setData(row.id));
|
|
|
+ if (row.status == "inactive") {
|
|
|
+ this.dialog.process = true;
|
|
|
+ this.$nextTick(() => this.$refs.processDialog.open("resubmit").setData(row.id));
|
|
|
+ }
|
|
|
+ if (row.status == "active") {
|
|
|
+ this.dialog.detail = true;
|
|
|
+ this.$nextTick(() => this.$refs.policyDetail.open("edit").setData(row.id));
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ table_detail(row, mode = "detail") {
|
|
|
+ this.dialog.explain = true;
|
|
|
+ this.$nextTick(() => this.$refs.policyExplain.open(mode).setData(row.id));
|
|
|
},
|
|
|
|
|
|
table_del(row) {
|
|
|
@@ -216,14 +252,14 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- table_detail(row, mode = "detail") {
|
|
|
- this.dialog.explain = true;
|
|
|
- this.$nextTick(() => this.$refs.policyExplain.open(mode).setData(row.id));
|
|
|
- },
|
|
|
-
|
|
|
closed(e) {
|
|
|
e && this.reloadTable();
|
|
|
this.dialog.detail = false;
|
|
|
+ },
|
|
|
+
|
|
|
+ table_process(row) {
|
|
|
+ this.dialog.workflow = true;
|
|
|
+ this.$nextTick(() => this.$refs.yhWorkflow.getDetail(row));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -233,4 +269,8 @@ export default {
|
|
|
.export-btn {
|
|
|
margin-left: 12px;
|
|
|
}
|
|
|
+
|
|
|
+.no-m-l {
|
|
|
+ margin-left: 0;
|
|
|
+}
|
|
|
</style>
|