|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="ele-body">
|
|
<div class="ele-body">
|
|
|
<el-card shadow="never">
|
|
<el-card shadow="never">
|
|
|
- <index-search @search="reload"/>
|
|
|
|
|
|
|
+ <index-search @search="reload" />
|
|
|
<!-- 数据表格 -->
|
|
<!-- 数据表格 -->
|
|
|
<ele-pro-table
|
|
<ele-pro-table
|
|
|
ref="table"
|
|
ref="table"
|
|
@@ -20,7 +20,8 @@
|
|
|
type="primary"
|
|
type="primary"
|
|
|
icon="el-icon-plus"
|
|
icon="el-icon-plus"
|
|
|
class="ele-btn-icon"
|
|
class="ele-btn-icon"
|
|
|
- @click="openEdit('','add')">
|
|
|
|
|
|
|
+ @click="openEdit('', 'add')"
|
|
|
|
|
+ >
|
|
|
新建
|
|
新建
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
@@ -34,13 +35,14 @@
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-slot:code="{ row }">
|
|
<template v-slot:code="{ row }">
|
|
|
- <el-button type="text" @click="openDetail(row)">{{ row.code }}</el-button>
|
|
|
|
|
|
|
+ <el-button type="text" @click="openDetail(row)">{{
|
|
|
|
|
+ row.code
|
|
|
|
|
+ }}</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<!-- 操作列 -->
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:action="{ row }">
|
|
<template v-slot:action="{ row }">
|
|
|
- <el-link
|
|
|
|
|
|
|
+ <!-- <el-link
|
|
|
type="primary"
|
|
type="primary"
|
|
|
:underline="false"
|
|
:underline="false"
|
|
|
icon="el-icon-plus"
|
|
icon="el-icon-plus"
|
|
@@ -48,21 +50,22 @@
|
|
|
v-if="[0, 3].includes(row.processStatus)"
|
|
v-if="[0, 3].includes(row.processStatus)"
|
|
|
>
|
|
>
|
|
|
提交
|
|
提交
|
|
|
- </el-link>
|
|
|
|
|
|
|
+ </el-link> -->
|
|
|
<el-link
|
|
<el-link
|
|
|
type="primary"
|
|
type="primary"
|
|
|
:underline="false"
|
|
:underline="false"
|
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
|
- v-if="[0].includes(row.processStatus)"
|
|
|
|
|
- @click="openEdit(row,'edit')"
|
|
|
|
|
|
|
+ @click="openEdit(row, 'edit')"
|
|
|
>
|
|
>
|
|
|
|
|
+ <!-- v-if="[0,2].includes(row.processStatus)" -->
|
|
|
修改
|
|
修改
|
|
|
</el-link>
|
|
</el-link>
|
|
|
<el-popconfirm
|
|
<el-popconfirm
|
|
|
class="ele-action"
|
|
class="ele-action"
|
|
|
title="确定要删除吗?"
|
|
title="确定要删除吗?"
|
|
|
- v-if="[0].includes(row.processStatus)"
|
|
|
|
|
- @confirm="remove([row.id])">
|
|
|
|
|
|
|
+ @confirm="remove([row.id])"
|
|
|
|
|
+ >
|
|
|
|
|
+ <!-- v-if="[0].includes(row.processStatus)" -->
|
|
|
<template v-slot:reference>
|
|
<template v-slot:reference>
|
|
|
<el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
<el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
删除
|
|
删除
|
|
@@ -73,11 +76,23 @@
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
<!-- 编辑弹窗 -->
|
|
<!-- 编辑弹窗 -->
|
|
|
- <add-or-edit-dialog v-if="addOrEditDialogFlag" @reload="reload" :addOrEditDialogFlag.sync="addOrEditDialogFlag"
|
|
|
|
|
- ref="addOrEditDialogRef"></add-or-edit-dialog>
|
|
|
|
|
- <detail-dialog v-if="detailDialogFlag" :detailDialogFlag.sync="detailDialogFlag"
|
|
|
|
|
- ref="detailDialogRef"></detail-dialog>
|
|
|
|
|
- <process-submit-dialog :processSubmitDialogFlag.sync="processSubmitDialogFlag" v-if="processSubmitDialogFlag" ref="processSubmitDialogRef" @reload="reload"></process-submit-dialog>
|
|
|
|
|
|
|
+ <add-or-edit-dialog
|
|
|
|
|
+ v-if="addOrEditDialogFlag"
|
|
|
|
|
+ @reload="reload"
|
|
|
|
|
+ :addOrEditDialogFlag.sync="addOrEditDialogFlag"
|
|
|
|
|
+ ref="addOrEditDialogRef"
|
|
|
|
|
+ ></add-or-edit-dialog>
|
|
|
|
|
+ <detail-dialog
|
|
|
|
|
+ v-if="detailDialogFlag"
|
|
|
|
|
+ :detailDialogFlag.sync="detailDialogFlag"
|
|
|
|
|
+ ref="detailDialogRef"
|
|
|
|
|
+ ></detail-dialog>
|
|
|
|
|
+ <process-submit-dialog
|
|
|
|
|
+ :processSubmitDialogFlag.sync="processSubmitDialogFlag"
|
|
|
|
|
+ v-if="processSubmitDialogFlag"
|
|
|
|
|
+ ref="processSubmitDialogRef"
|
|
|
|
|
+ @reload="reload"
|
|
|
|
|
+ ></process-submit-dialog>
|
|
|
<!-- 多选删除弹窗 -->
|
|
<!-- 多选删除弹窗 -->
|
|
|
<pop-modal
|
|
<pop-modal
|
|
|
:visible.sync="delVisible"
|
|
:visible.sync="delVisible"
|
|
@@ -88,174 +103,177 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ import indexSearch from './components/index-search.vue';
|
|
|
|
|
+ import addOrEditDialog from './components/add-or-edit-dialog.vue';
|
|
|
|
|
+ import detailDialog from './components/detail-dialog.vue';
|
|
|
|
|
+ import popModal from '@/components/pop-modal';
|
|
|
|
|
+ import {
|
|
|
|
|
+ projectsTeamDeleteAPI,
|
|
|
|
|
+ projectsTeamPageAPI,
|
|
|
|
|
+ submit
|
|
|
|
|
+ } from '@/api/project-manage/team';
|
|
|
|
|
+ import { reviewStatusEnum } from '@/enum/dict';
|
|
|
|
|
+ import { mapGetters } from 'vuex';
|
|
|
|
|
+ import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
|
|
|
|
|
|
|
|
-import indexSearch from "./components/index-search.vue";
|
|
|
|
|
-import addOrEditDialog from "./components/add-or-edit-dialog.vue";
|
|
|
|
|
-import detailDialog from "./components/detail-dialog.vue";
|
|
|
|
|
-import popModal from '@/components/pop-modal';
|
|
|
|
|
-import {projectsTeamDeleteAPI, projectsTeamPageAPI, submit} from "@/api/project-manage/team";
|
|
|
|
|
-import {reviewStatusEnum} from '@/enum/dict';
|
|
|
|
|
-import {mapGetters} from "vuex";
|
|
|
|
|
-import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-export default {
|
|
|
|
|
- name: 'index',
|
|
|
|
|
- components: {
|
|
|
|
|
- processSubmitDialog,
|
|
|
|
|
- addOrEditDialog,
|
|
|
|
|
- detailDialog,
|
|
|
|
|
- indexSearch,
|
|
|
|
|
- popModal,
|
|
|
|
|
- },
|
|
|
|
|
- computed: {
|
|
|
|
|
- ...mapGetters(['getDictValue']),
|
|
|
|
|
-
|
|
|
|
|
- columns() {
|
|
|
|
|
- return [
|
|
|
|
|
- {
|
|
|
|
|
- width: 45,
|
|
|
|
|
- type: 'selection',
|
|
|
|
|
- columnKey: 'selection',
|
|
|
|
|
- align: 'center'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- columnKey: 'index',
|
|
|
|
|
- label: '序号',
|
|
|
|
|
- type: 'index',
|
|
|
|
|
- width: 55,
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- fixed: 'left'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'code',
|
|
|
|
|
- label: '团队编码',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- slot: 'code',
|
|
|
|
|
- minWidth: 160
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'name',
|
|
|
|
|
- label: '团队名称',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 100,
|
|
|
|
|
- slot: 'type',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'remark',
|
|
|
|
|
- label: '备注',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 100,
|
|
|
|
|
- slot: 'remark',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'processStatus',
|
|
|
|
|
- label: '审核状态',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 100,
|
|
|
|
|
- formatter: (_row, _column, cellValue) => {
|
|
|
|
|
- return reviewStatusEnum[_row.processStatus]?.label;
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- columnKey: 'action',
|
|
|
|
|
- label: '操作',
|
|
|
|
|
- width: 190,
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- resizable: false,
|
|
|
|
|
- slot: 'action',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- fixed: 'right'
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ export default {
|
|
|
|
|
+ name: 'index',
|
|
|
|
|
+ components: {
|
|
|
|
|
+ processSubmitDialog,
|
|
|
|
|
+ addOrEditDialog,
|
|
|
|
|
+ detailDialog,
|
|
|
|
|
+ indexSearch,
|
|
|
|
|
+ popModal
|
|
|
},
|
|
},
|
|
|
- },
|
|
|
|
|
- data() {
|
|
|
|
|
- return {
|
|
|
|
|
- selection: [],
|
|
|
|
|
- addOrEditDialogFlag: false,
|
|
|
|
|
- detailDialogFlag: false,
|
|
|
|
|
- delVisible: false,
|
|
|
|
|
- processSubmitDialogFlag: false,
|
|
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ ...mapGetters(['getDictValue']),
|
|
|
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
- async created() {
|
|
|
|
|
- },
|
|
|
|
|
- methods: {
|
|
|
|
|
- /* 表格数据源 */
|
|
|
|
|
- async datasource({page, limit, where, parent}) {
|
|
|
|
|
- return projectsTeamPageAPI({
|
|
|
|
|
- pageNum: page,
|
|
|
|
|
- size: limit,
|
|
|
|
|
- ...where
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- /* 刷新表格 */
|
|
|
|
|
- reload(where) {
|
|
|
|
|
- this.$refs.table.reload({where, size: 1, pageNum: 10});
|
|
|
|
|
- },
|
|
|
|
|
- /* 显示编辑 */
|
|
|
|
|
- openEdit(row = {}, type) {
|
|
|
|
|
- this.addOrEditDialogFlag = true;
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- this.$refs.addOrEditDialogRef.init(row, type)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ columns() {
|
|
|
|
|
+ return [
|
|
|
|
|
+ {
|
|
|
|
|
+ width: 45,
|
|
|
|
|
+ type: 'selection',
|
|
|
|
|
+ columnKey: 'selection',
|
|
|
|
|
+ align: 'center'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ columnKey: 'index',
|
|
|
|
|
+ label: '序号',
|
|
|
|
|
+ type: 'index',
|
|
|
|
|
+ width: 55,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ fixed: 'left'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'code',
|
|
|
|
|
+ label: '团队编码',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ slot: 'code',
|
|
|
|
|
+ minWidth: 160
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'name',
|
|
|
|
|
+ label: '团队名称',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 100,
|
|
|
|
|
+ slot: 'type'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'remark',
|
|
|
|
|
+ label: '备注',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 100,
|
|
|
|
|
+ slot: 'remark'
|
|
|
|
|
+ },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'processStatus',
|
|
|
|
|
+ // label: '审核状态',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true,
|
|
|
|
|
+ // minWidth: 100,
|
|
|
|
|
+ // formatter: (_row, _column, cellValue) => {
|
|
|
|
|
+ // return reviewStatusEnum[_row.processStatus]?.label;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
|
|
+ {
|
|
|
|
|
+ columnKey: 'action',
|
|
|
|
|
+ label: '操作',
|
|
|
|
|
+ width: 190,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ resizable: false,
|
|
|
|
|
+ slot: 'action',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ fixed: 'right'
|
|
|
|
|
+ }
|
|
|
|
|
+ ];
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
- openDetail(row = {}) {
|
|
|
|
|
- this.detailDialogFlag = true;
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- this.$refs.detailDialogRef.init(row)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ selection: [],
|
|
|
|
|
+ addOrEditDialogFlag: false,
|
|
|
|
|
+ detailDialogFlag: false,
|
|
|
|
|
+ delVisible: false,
|
|
|
|
|
+ processSubmitDialogFlag: false
|
|
|
|
|
+ };
|
|
|
},
|
|
},
|
|
|
|
|
+ async created() {},
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ /* 表格数据源 */
|
|
|
|
|
+ async datasource({ page, limit, where, parent }) {
|
|
|
|
|
+ return projectsTeamPageAPI({
|
|
|
|
|
+ pageNum: page,
|
|
|
|
|
+ size: limit,
|
|
|
|
|
+ ...where
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ /* 刷新表格 */
|
|
|
|
|
+ reload(where) {
|
|
|
|
|
+ this.$refs.table.reload({ where, size: 1, pageNum: 10 });
|
|
|
|
|
+ },
|
|
|
|
|
+ /* 显示编辑 */
|
|
|
|
|
+ openEdit(row = {}, type) {
|
|
|
|
|
+ this.addOrEditDialogFlag = true;
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$refs.addOrEditDialogRef.init(row, type);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ openDetail(row = {}) {
|
|
|
|
|
+ this.detailDialogFlag = true;
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$refs.detailDialogRef.init(row);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- //流程提交
|
|
|
|
|
- processSubmit(row) {
|
|
|
|
|
- // this.processSubmitDialogFlag = true
|
|
|
|
|
- // this.$nextTick(()=>{
|
|
|
|
|
- // row.businessKey = 'pro_team_approve'
|
|
|
|
|
- // this.$refs.processSubmitDialogRef.init(row)
|
|
|
|
|
- // })
|
|
|
|
|
- submit({
|
|
|
|
|
- teamId: row.id
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- this.$message.success('提交成功');
|
|
|
|
|
- this.reload();
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- //批量删除
|
|
|
|
|
- allDelBtn() {
|
|
|
|
|
- if (this.selection.length === 0) return;
|
|
|
|
|
- let flag = this.selection.some(item => [1, 2, 3].includes(item.processStatus))
|
|
|
|
|
- if (flag) return this.$message.warning('抱歉已审核、审核中的数据不能删除,请检查')
|
|
|
|
|
- this.delVisible = true;
|
|
|
|
|
- },
|
|
|
|
|
- //删除弹框确定
|
|
|
|
|
- commitBtn() {
|
|
|
|
|
- const dataId = this.selection.map((v) => v.id);
|
|
|
|
|
- this.remove(dataId);
|
|
|
|
|
- },
|
|
|
|
|
- /* 删除 */
|
|
|
|
|
- remove(ids) {
|
|
|
|
|
- const loading = this.$loading({lock: true});
|
|
|
|
|
- projectsTeamDeleteAPI(ids)
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- this.$message.success('删除成功');
|
|
|
|
|
|
|
+ //流程提交
|
|
|
|
|
+ processSubmit(row) {
|
|
|
|
|
+ // this.processSubmitDialogFlag = true
|
|
|
|
|
+ // this.$nextTick(()=>{
|
|
|
|
|
+ // row.businessKey = 'pro_team_approve'
|
|
|
|
|
+ // this.$refs.processSubmitDialogRef.init(row)
|
|
|
|
|
+ // })
|
|
|
|
|
+ submit({
|
|
|
|
|
+ teamId: row.id
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ this.$message.success('提交成功');
|
|
|
this.reload();
|
|
this.reload();
|
|
|
- })
|
|
|
|
|
- .catch((e) => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- // this.$message.error(e.message);
|
|
|
|
|
});
|
|
});
|
|
|
- },
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ //批量删除
|
|
|
|
|
+ allDelBtn() {
|
|
|
|
|
+ if (this.selection.length === 0) return;
|
|
|
|
|
+ let flag = this.selection.some((item) =>
|
|
|
|
|
+ [1, 2, 3].includes(item.processStatus)
|
|
|
|
|
+ );
|
|
|
|
|
+ if (flag)
|
|
|
|
|
+ return this.$message.warning(
|
|
|
|
|
+ '抱歉已审核、审核中的数据不能删除,请检查'
|
|
|
|
|
+ );
|
|
|
|
|
+ this.delVisible = true;
|
|
|
|
|
+ },
|
|
|
|
|
+ //删除弹框确定
|
|
|
|
|
+ commitBtn() {
|
|
|
|
|
+ const dataId = this.selection.map((v) => v.id);
|
|
|
|
|
+ this.remove(dataId);
|
|
|
|
|
+ },
|
|
|
|
|
+ /* 删除 */
|
|
|
|
|
+ remove(ids) {
|
|
|
|
|
+ const loading = this.$loading({ lock: true });
|
|
|
|
|
+ projectsTeamDeleteAPI(ids)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ loading.close();
|
|
|
|
|
+ this.$message.success('删除成功');
|
|
|
|
|
+ this.reload();
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((e) => {
|
|
|
|
|
+ loading.close();
|
|
|
|
|
+ // this.$message.error(e.message);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
</script>
|
|
</script>
|