This commit is contained in:
parent
0d9cf0e0b4
commit
97cdd4528d
|
|
@ -0,0 +1,38 @@
|
|||
import request from '@/axios';
|
||||
|
||||
// 移交接收管理列表
|
||||
export function getTransferReceiceListApi(params) {
|
||||
return request({
|
||||
url: '/blade-system/transferReceice/getTransferReceiceList',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 详情
|
||||
export function getTransferReceiceDetailApi(params) {
|
||||
return request({
|
||||
url: '/blade-system/transferReceice/getTransferReceiceDetail',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 详情列表
|
||||
export function getTransferReceiceFilesApi(params) {
|
||||
return request({
|
||||
url: '/blade-system/transferReceice/getTransferReceiceFiles',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 确认接收
|
||||
export function transferReceiveApi(data) {
|
||||
return request({
|
||||
url: '/blade-system/transferReceice/transferReceive',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
import request from '@/axios';
|
||||
|
||||
// 档案移交申请列表
|
||||
export function getTransferApplyListApi(params) {
|
||||
return request({
|
||||
url: '/blade-system/transferApply/getTransferApplyList',
|
||||
method: 'POST',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 新增档案移交申请
|
||||
export function saveTransferApplyApi(data) {
|
||||
return request({
|
||||
url: '/blade-system/transferApply/saveTransferApply',
|
||||
method: 'POST',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 编辑档案移交申请
|
||||
export function editTransferApplyApi(data) {
|
||||
return request({
|
||||
url: '/blade-system/transferApply/editTransferApply',
|
||||
method: 'POST',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 档案移交申请详情
|
||||
export function getTransferApplyApi(params) {
|
||||
return request({
|
||||
url: '/blade-system/transferApply/getTransferApply',
|
||||
method: 'POST',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 档案移交申请-列表详情
|
||||
export function getTransferApplyFilesByApplyIdApi(params) {
|
||||
return request({
|
||||
url: '/blade-system/transferApply/getTransferApplyFilesByApplyId',
|
||||
method: 'POST',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 删除档案移交申请
|
||||
export function delTransferApplyApi(data) {
|
||||
return request({
|
||||
url: '/blade-system/transferApply/delTransferApply',
|
||||
method: 'POST',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 已移交确认工程下拉选
|
||||
export async function getProSelectApi(data) {
|
||||
return await request({
|
||||
url: '/blade-system/transferApply/getProSelect',
|
||||
method: 'POST',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 获取档案目录树
|
||||
export function getFileManageTreeApi(params) {
|
||||
return request({
|
||||
url: '/blade-system/fileManage/getFileManageTree',
|
||||
method: 'POST',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 获取移交档案文件
|
||||
export function getTransferApplyFilesApi(params) {
|
||||
return request({
|
||||
url: '/blade-system/transferApply/getTransferApplyFiles',
|
||||
method: 'POST',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
import request from '@/axios';
|
||||
|
||||
// 档案移交审核列表
|
||||
export function getTransferAuditListApi(params) {
|
||||
return request({
|
||||
url: '/blade-system/transferApply/getTransferAuditList',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 审核
|
||||
export function auditTransferApplyApi(data) {
|
||||
return request({
|
||||
url: '/blade-system/transferApply/auditTransferApply',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 档案移交审核详情
|
||||
export function getTransferAuditApi(params) {
|
||||
return request({
|
||||
url: '/blade-system/transferApply/getTransferAudit',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 档案移交审核-列表详情
|
||||
export function getTransferAudieFilesByApplyIdApi(params) {
|
||||
return request({
|
||||
url: '/blade-system/transferApply/getTransferAudieFilesByApplyId',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
import request from '@/axios';
|
||||
|
||||
// 新增加密类型列表
|
||||
export function addEncryTypeAPI(data) {
|
||||
return request({
|
||||
url: '/blade-system/system/encry/type/addEncryType',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 修改加密类型列表
|
||||
export function updateEncryTypeAPI(data) {
|
||||
return request({
|
||||
url: '/blade-system/system/encry/type/editEncryType',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 删除加密类型列表
|
||||
export function deleteEncryTypeAPI(id) {
|
||||
let data = {
|
||||
id: id
|
||||
};
|
||||
return request({
|
||||
url: '/blade-system/system/encry/type/delEncryType',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 档案加密类型列表
|
||||
export function getEncryTypeListAPI(data) {
|
||||
return request({
|
||||
url: '/blade-system/system/encry/type/list',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
import request from '@/axios';
|
||||
|
||||
// 新增加密类型列表
|
||||
export function addEncryTypeAPI(data) {
|
||||
return request({
|
||||
url: '/blade-system/system/encry/type/addEncryTypeFile',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 修改加密类型列表
|
||||
export function updateEncryTypeAPI(data) {
|
||||
return request({
|
||||
url: '/blade-system/system/encry/type/editEncryTypeFile',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 删除加密类型列表
|
||||
export function deleteEncryTypeAPI(id) {
|
||||
let data = {
|
||||
id: id
|
||||
};
|
||||
return request({
|
||||
url: '/blade-system/system/encry/type/delEncryTypeFile',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 档案加密类型列表
|
||||
export function getEncryTypeListAPI(data) {
|
||||
return request({
|
||||
url: '/blade-system/system/encry/type/listFile',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
import request from '@/axios';
|
||||
|
||||
// 移交问题管理列表
|
||||
export function getTransferProblemListApi(params) {
|
||||
return request({
|
||||
url: '/blade-system/transferProblem/getTransferProblemList',
|
||||
method: 'POST',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 新增移交问题
|
||||
export function addTransferProblemApi(data) {
|
||||
return request({
|
||||
url: '/blade-system/transferProblem/addTransferProblem',
|
||||
method: 'POST',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改移交问题
|
||||
export function editTransferProblemApi(data) {
|
||||
return request({
|
||||
url: '/blade-system/transferProblem/editTransferProblem',
|
||||
method: 'POST',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除移交问题
|
||||
export function delTransferProblemApi(data) {
|
||||
return request({
|
||||
url: '/blade-system/transferProblem/delTransferProblem',
|
||||
method: 'POST',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 已移交确认工程下拉选
|
||||
export async function getProSelectApi(data) {
|
||||
return await request({
|
||||
url: '/blade-system/transferApply/getProSelect',
|
||||
method: 'POST',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
import request from '@/axios';
|
||||
|
||||
// 档案移交申请列表
|
||||
export function getTransferRecordListApi(params) {
|
||||
return request({
|
||||
url: '/blade-system/transferRecord/getTransferRecordList',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 移交清单
|
||||
export function getTransferRecordFilesApi(params) {
|
||||
return request({
|
||||
url: '/blade-system/transferRecord/getTransferRecordFiles',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 维护
|
||||
export function updateTransferRecordFileApi(data) {
|
||||
return request({
|
||||
url: '/blade-system/transferRecord/updateTransferRecordFile',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 移交
|
||||
export function updateTransferRecordFilesStatusApi(data) {
|
||||
return request({
|
||||
url: '/blade-system/transferRecord/updateTransferRecordFilesStatus',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 详情
|
||||
export function getTransferRecordDetailApi(params) {
|
||||
return request({
|
||||
url: '/blade-system/transferRecord/getTransferRecordDetail',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
import request from '@/axios';
|
||||
|
||||
// 归档配置查询
|
||||
export function queryAPI(params) {
|
||||
return request({
|
||||
url: '/blade-system/archivedSetting/query',
|
||||
method: 'POST',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 修改归档配置
|
||||
export function editAPI(data) {
|
||||
return request({
|
||||
url: '/blade-system/archivedSetting/edit',
|
||||
method: 'POST',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
|
@ -0,0 +1,253 @@
|
|||
<template>
|
||||
<basic-container>
|
||||
<avue-crud
|
||||
:option="option"
|
||||
:table-loading="loading"
|
||||
:data="data"
|
||||
v-model:page="page"
|
||||
:permission="permissionList"
|
||||
:before-open="beforeOpen"
|
||||
v-model="form"
|
||||
ref="crud"
|
||||
@row-update="rowUpdate"
|
||||
@row-save="rowSave"
|
||||
@row-del="rowDel"
|
||||
@search-change="searchChange"
|
||||
@search-reset="searchReset"
|
||||
@selection-change="selectionChange"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
@on-load="onLoad"
|
||||
>
|
||||
</avue-crud>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
addEncryTypeAPI,
|
||||
updateEncryTypeAPI,
|
||||
deleteEncryTypeAPI,
|
||||
getEncryTypeListAPI,
|
||||
} from '@/api/filesTransfer/encryption';
|
||||
import { mapGetters } from 'vuex';
|
||||
import website from '@/config/website';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
query: {},
|
||||
loading: true,
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
selectionList: [],
|
||||
option: {
|
||||
height: 'auto',
|
||||
calcHeight: 32,
|
||||
tip: false,
|
||||
searchShow: true,
|
||||
searchMenuSpan: 6,
|
||||
border: true,
|
||||
index: true,
|
||||
viewBtn: true,
|
||||
selection: false,
|
||||
addBtn:true,
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
|
||||
{
|
||||
label: '数据加密名称',
|
||||
prop: 'encryptName',
|
||||
search: true,
|
||||
},
|
||||
|
||||
{
|
||||
label: '数据加密类型',
|
||||
prop: 'encryptType', //该列对应的数据字段名(即后端返回或提交时使用的 key)。
|
||||
type: 'select', //指定该字段在表单中的输入类型为“下拉选择框”
|
||||
dicUrl: '/blade-system/system/dict/data/type', // 接口地址
|
||||
dicMethod: 'post', // 指定为 POST 请求
|
||||
dicQuery: {
|
||||
dictType: 'file_encryption_type' //作为请求体(body)发送(Avue 内部会处理)
|
||||
},
|
||||
props: {
|
||||
label: 'dictLabel',
|
||||
value: 'dictValue',
|
||||
},
|
||||
slot: true,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择数据加密类型',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
label: '加密参数',
|
||||
prop: 'encryptParams',
|
||||
},
|
||||
],
|
||||
},
|
||||
data: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['permission']),
|
||||
permissionList() {
|
||||
return {
|
||||
addBtn: this.validData(this.permission.post_add, false),
|
||||
viewBtn: this.validData(this.permission.post_view, false),
|
||||
delBtn: this.validData(this.permission.post_delete, false),
|
||||
editBtn: this.validData(this.permission.post_edit, false),
|
||||
};
|
||||
},
|
||||
ids() {
|
||||
let ids = [];
|
||||
this.selectionList.forEach(ele => {
|
||||
ids.push(ele.id);
|
||||
});
|
||||
return ids.join(',');
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
rowSave(row, done, loading) {
|
||||
// 只提取需要的字段
|
||||
const submitData = {
|
||||
encryptName: row.encryptName,
|
||||
encryptParams: row.encryptParams,
|
||||
encryptType: row.encryptType,
|
||||
};
|
||||
addEncryTypeAPI(submitData).then(
|
||||
() => {
|
||||
this.onLoad(this.page);
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '操作成功!',
|
||||
});
|
||||
done();
|
||||
},
|
||||
error => {
|
||||
console.error('新增失败:', error);
|
||||
loading(); // 恢复按钮 loading 状态
|
||||
}
|
||||
);
|
||||
},
|
||||
rowUpdate(row, index, done, loading) {
|
||||
// 只保留需要的字段
|
||||
const submitData = {
|
||||
id: row.id,
|
||||
encryptName: row.encryptName,
|
||||
encryptParams: row.encryptParams,
|
||||
encryptType: row.encryptType,
|
||||
};
|
||||
|
||||
updateEncryTypeAPI(submitData).then(
|
||||
() => {
|
||||
this.onLoad(this.page);
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '操作成功!',
|
||||
});
|
||||
done();
|
||||
},
|
||||
error => {
|
||||
console.log(error);
|
||||
loading(); // 恢复按钮状态
|
||||
}
|
||||
);
|
||||
},
|
||||
rowDel(row) {
|
||||
this.$confirm('确定将选择数据删除?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
return deleteEncryTypeAPI(row.id);
|
||||
})
|
||||
.then(() => {
|
||||
this.onLoad(this.page);
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '操作成功!',
|
||||
});
|
||||
});
|
||||
},
|
||||
handleDelete() {
|
||||
if (this.selectionList.length === 0) {
|
||||
this.$message.warning('请选择至少一条数据');
|
||||
return;
|
||||
}
|
||||
this.$confirm('确定将选择数据删除?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
return deleteEncryTypeAPI(this.ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.onLoad(this.page);
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '操作成功!',
|
||||
});
|
||||
this.$refs.crud.toggleSelection();
|
||||
});
|
||||
},
|
||||
beforeOpen(done, type, row) {
|
||||
done(); // 必须调用 done()
|
||||
},
|
||||
searchReset() {
|
||||
this.query = {};
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
searchChange(params, done) {
|
||||
this.query = params;
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page, params);
|
||||
done();
|
||||
},
|
||||
selectionChange(list) {
|
||||
this.selectionList = list;
|
||||
},
|
||||
selectionClear() {
|
||||
this.selectionList = [];
|
||||
this.$refs.crud.toggleSelection();
|
||||
},
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
onLoad(page, params = {}) {
|
||||
this.loading = true;
|
||||
let data = {
|
||||
...params,
|
||||
pageNum:page.currentPage,
|
||||
pageSize:page.pageSize
|
||||
};
|
||||
getEncryTypeListAPI(data).then(res => {
|
||||
const data = res.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data.rows;
|
||||
this.loading = false;
|
||||
this.selectionClear();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
|
@ -0,0 +1,253 @@
|
|||
<template>
|
||||
<basic-container>
|
||||
<avue-crud
|
||||
:option="option"
|
||||
:table-loading="loading"
|
||||
:data="data"
|
||||
v-model:page="page"
|
||||
:permission="permissionList"
|
||||
:before-open="beforeOpen"
|
||||
v-model="form"
|
||||
ref="crud"
|
||||
@row-update="rowUpdate"
|
||||
@row-save="rowSave"
|
||||
@row-del="rowDel"
|
||||
@search-change="searchChange"
|
||||
@search-reset="searchReset"
|
||||
@selection-change="selectionChange"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
@on-load="onLoad"
|
||||
>
|
||||
</avue-crud>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
addEncryTypeAPI,
|
||||
updateEncryTypeAPI,
|
||||
deleteEncryTypeAPI,
|
||||
getEncryTypeListAPI,
|
||||
} from '@/api/filesTransfer/encryptionFile';
|
||||
import { mapGetters } from 'vuex';
|
||||
import website from '@/config/website';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
query: {},
|
||||
loading: true,
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
selectionList: [],
|
||||
option: {
|
||||
height: 'auto',
|
||||
calcHeight: 32,
|
||||
tip: false,
|
||||
searchShow: true,
|
||||
searchMenuSpan: 6,
|
||||
border: true,
|
||||
index: true,
|
||||
viewBtn: true,
|
||||
selection: false,
|
||||
addBtn:true,
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
|
||||
{
|
||||
label: '数据加密名称',
|
||||
prop: 'encryptName',
|
||||
search: true,
|
||||
},
|
||||
|
||||
{
|
||||
label: '数据加密类型',
|
||||
prop: 'encryptType', //该列对应的数据字段名(即后端返回或提交时使用的 key)。
|
||||
type: 'select', //指定该字段在表单中的输入类型为“下拉选择框”
|
||||
dicUrl: '/blade-system/system/dict/data/type', // 接口地址
|
||||
dicMethod: 'post', // 指定为 POST 请求
|
||||
dicQuery: {
|
||||
dictType: 'file_encryption_type' //作为请求体(body)发送(Avue 内部会处理)
|
||||
},
|
||||
props: {
|
||||
label: 'dictLabel',
|
||||
value: 'dictValue',
|
||||
},
|
||||
slot: true,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择数据加密类型',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
label: '加密参数',
|
||||
prop: 'encryptParams',
|
||||
},
|
||||
],
|
||||
},
|
||||
data: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['permission']),
|
||||
permissionList() {
|
||||
return {
|
||||
addBtn: this.validData(this.permission.post_add, false),
|
||||
viewBtn: this.validData(this.permission.post_view, false),
|
||||
delBtn: this.validData(this.permission.post_delete, false),
|
||||
editBtn: this.validData(this.permission.post_edit, false),
|
||||
};
|
||||
},
|
||||
ids() {
|
||||
let ids = [];
|
||||
this.selectionList.forEach(ele => {
|
||||
ids.push(ele.id);
|
||||
});
|
||||
return ids.join(',');
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
rowSave(row, done, loading) {
|
||||
// 只提取需要的字段
|
||||
const submitData = {
|
||||
encryptName: row.encryptName,
|
||||
encryptParams: row.encryptParams,
|
||||
encryptType: row.encryptType,
|
||||
};
|
||||
addEncryTypeAPI(submitData).then(
|
||||
() => {
|
||||
this.onLoad(this.page);
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '操作成功!',
|
||||
});
|
||||
done();
|
||||
},
|
||||
error => {
|
||||
console.error('新增失败:', error);
|
||||
loading(); // 恢复按钮 loading 状态
|
||||
}
|
||||
);
|
||||
},
|
||||
rowUpdate(row, index, done, loading) {
|
||||
// 只保留需要的字段
|
||||
const submitData = {
|
||||
id: row.id,
|
||||
encryptName: row.encryptName,
|
||||
encryptParams: row.encryptParams,
|
||||
encryptType: row.encryptType,
|
||||
};
|
||||
|
||||
updateEncryTypeAPI(submitData).then(
|
||||
() => {
|
||||
this.onLoad(this.page);
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '操作成功!',
|
||||
});
|
||||
done();
|
||||
},
|
||||
error => {
|
||||
console.log(error);
|
||||
loading(); // 恢复按钮状态
|
||||
}
|
||||
);
|
||||
},
|
||||
rowDel(row) {
|
||||
this.$confirm('确定将选择数据删除?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
return deleteEncryTypeAPI(row.id);
|
||||
})
|
||||
.then(() => {
|
||||
this.onLoad(this.page);
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '操作成功!',
|
||||
});
|
||||
});
|
||||
},
|
||||
handleDelete() {
|
||||
if (this.selectionList.length === 0) {
|
||||
this.$message.warning('请选择至少一条数据');
|
||||
return;
|
||||
}
|
||||
this.$confirm('确定将选择数据删除?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
return deleteEncryTypeAPI(this.ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.onLoad(this.page);
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '操作成功!',
|
||||
});
|
||||
this.$refs.crud.toggleSelection();
|
||||
});
|
||||
},
|
||||
beforeOpen(done, type, row) {
|
||||
done(); // 必须调用 done()
|
||||
},
|
||||
searchReset() {
|
||||
this.query = {};
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
searchChange(params, done) {
|
||||
this.query = params;
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page, params);
|
||||
done();
|
||||
},
|
||||
selectionChange(list) {
|
||||
this.selectionList = list;
|
||||
},
|
||||
selectionClear() {
|
||||
this.selectionList = [];
|
||||
this.$refs.crud.toggleSelection();
|
||||
},
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
onLoad(page, params = {}) {
|
||||
this.loading = true;
|
||||
let data = {
|
||||
...params,
|
||||
pageNum:page.currentPage,
|
||||
pageSize:page.pageSize
|
||||
};
|
||||
getEncryTypeListAPI(data).then(res => {
|
||||
const data = res.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data.rows;
|
||||
this.loading = false;
|
||||
this.selectionClear();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
Loading…
Reference in New Issue