refactor(缺陷管理): 删除增加二次提醒
This commit is contained in:
parent
60055f9587
commit
54e1dbaa20
|
@ -1,40 +0,0 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
title=""
|
||||
:visible.sync="dialogVisible"
|
||||
width="25%">
|
||||
<span>{{ $t('test_track.issue.delete_tip') }}{{issue.title}} ?</span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false" size="medium">{{$t('commons.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="confirm" size="medium">{{$t('commons.confirm')}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "IssueDeleteConfirm",
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
issue: {
|
||||
title: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(issue) {
|
||||
this.issue = issue;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
confirm() {
|
||||
this.$emit('delete', this.issue);
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -149,8 +149,6 @@
|
|||
:total="page.total"/>
|
||||
|
||||
<issue-edit @refresh="getIssues" ref="issueEdit"/>
|
||||
<issue-delete-confirm @delete="_handleDelete" ref="issueDeleteConfirm"/>
|
||||
|
||||
</el-card>
|
||||
</ms-main-container>
|
||||
</ms-container>
|
||||
|
@ -181,12 +179,10 @@ import MsMainContainer from "@/business/components/common/components/MsMainConta
|
|||
import {getCurrentProjectID, getCurrentWorkspaceId} from "@/common/js/utils";
|
||||
import {getProjectMember} from "@/network/user";
|
||||
import {LOCAL} from "@/common/js/constants";
|
||||
import IssueDeleteConfirm from "@/business/components/track/issue/IssueDeleteConfirm";
|
||||
|
||||
export default {
|
||||
name: "IssueList",
|
||||
components: {
|
||||
IssueDeleteConfirm,
|
||||
MsMainContainer,
|
||||
MsContainer,
|
||||
IssueEdit,
|
||||
|
@ -315,7 +311,14 @@ export default {
|
|||
this.$refs.issueEdit.open(copyData, 'copy');
|
||||
},
|
||||
handleDelete(data) {
|
||||
this.$refs.issueDeleteConfirm.open(data);
|
||||
this.$alert(this.$t('test_track.issue.delete_tip') + ' ' + data.title + " ?", '', {
|
||||
confirmButtonText: this.$t('commons.confirm'),
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
this._handleDelete(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
_handleDelete(data) {
|
||||
this.page.result = this.$get('issues/delete/' + data.id, () => {
|
||||
|
|
Loading…
Reference in New Issue