|
@@ -49,6 +49,8 @@
|
|
class="grid-content bg-purple"
|
|
class="grid-content bg-purple"
|
|
style="display: flex; justify-content: flex-end"
|
|
style="display: flex; justify-content: flex-end"
|
|
>
|
|
>
|
|
|
|
+ <el-button type="primary" @click="Exports">全部导出</el-button>
|
|
|
|
+ <el-button type="primary" @click="batchExports">批量导出</el-button>
|
|
<el-button type="primary">下载</el-button>
|
|
<el-button type="primary">下载</el-button>
|
|
<el-button type="danger" @click="moreDelete">删除</el-button>
|
|
<el-button type="danger" @click="moreDelete">删除</el-button>
|
|
</div>
|
|
</div>
|
|
@@ -65,7 +67,12 @@
|
|
>
|
|
>
|
|
<el-table-column align="center" label="" width="55" type="selection">
|
|
<el-table-column align="center" label="" width="55" type="selection">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="文件名称" align="center" prop="fileName" width="200">
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="文件名称"
|
|
|
|
+ align="center"
|
|
|
|
+ prop="fileName"
|
|
|
|
+ width="200"
|
|
|
|
+ >
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="存储对象" align="center" prop="storeType">
|
|
<el-table-column label="存储对象" align="center" prop="storeType">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -85,8 +92,8 @@
|
|
<el-tag
|
|
<el-tag
|
|
type="success"
|
|
type="success"
|
|
style="cursor: pointer; margin-right: 15px"
|
|
style="cursor: pointer; margin-right: 15px"
|
|
- @click="recover(scope.row.fileName)"
|
|
|
|
- >恢复</el-tag
|
|
|
|
|
|
+ @click="modifyRemarks(scope.row.fileName)"
|
|
|
|
+ >修改备注</el-tag
|
|
>
|
|
>
|
|
<el-tag
|
|
<el-tag
|
|
type="warning"
|
|
type="warning"
|
|
@@ -130,11 +137,25 @@
|
|
>尾页
|
|
>尾页
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <!--修改出票人弹窗 -->
|
|
|
|
+ <el-dialog title="修改出票人" :visible.sync="dialogVisible" width="500px">
|
|
|
|
+ <el-form ref="form" label-width="80px">
|
|
|
|
+ <el-form-item label="备注" >
|
|
|
|
+ <el-input style="width: 100%"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" >提交修改</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getDatabase } from '@/api/database';
|
|
|
|
|
|
+import { dataConversionUtil } from "../../utils/Excel.js";
|
|
|
|
+import { getDatabase,deletDatabase } from "@/api/database";
|
|
export default {
|
|
export default {
|
|
filters: {
|
|
filters: {
|
|
statusFilter(status) {
|
|
statusFilter(status) {
|
|
@@ -148,11 +169,14 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ // 弹窗显示
|
|
|
|
+ dialogVisible: false,
|
|
|
|
+ tableData:{},
|
|
// 表单数据
|
|
// 表单数据
|
|
formData: {
|
|
formData: {
|
|
startTime: "",
|
|
startTime: "",
|
|
endTime: "",
|
|
endTime: "",
|
|
- fileName:'',//文件名
|
|
|
|
|
|
+ fileName: "", //文件名
|
|
},
|
|
},
|
|
/* 当前页数 */
|
|
/* 当前页数 */
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
@@ -205,12 +229,11 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
-
|
|
|
|
mounted() {
|
|
mounted() {
|
|
this.getAllList();
|
|
this.getAllList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- /* 获取列表数据 */
|
|
|
|
|
|
+ /* 获取列表数据 */
|
|
getAllList(searchForm = {}) {
|
|
getAllList(searchForm = {}) {
|
|
const params = {
|
|
const params = {
|
|
pageIndex: this.currentPage,
|
|
pageIndex: this.currentPage,
|
|
@@ -223,39 +246,37 @@ export default {
|
|
this.srcList = data.result;
|
|
this.srcList = data.result;
|
|
this.total = res.data.total;
|
|
this.total = res.data.total;
|
|
});
|
|
});
|
|
- },
|
|
|
|
|
|
+ },
|
|
|
|
|
|
- /* 存储对象查询 */
|
|
|
|
|
|
+ /* 存储对象查询 */
|
|
handleCommand(command) {
|
|
handleCommand(command) {
|
|
this.status = command;
|
|
this.status = command;
|
|
- if(command === '全部'){
|
|
|
|
- this.formData.isDeleted=''
|
|
|
|
- }
|
|
|
|
- if (command === '正常') {
|
|
|
|
- this.formData.isDeleted = 0
|
|
|
|
- }
|
|
|
|
- if (command === '删除') {
|
|
|
|
- this.formData.isDeleted = 1
|
|
|
|
- }
|
|
|
|
- this.currentPage = 1;
|
|
|
|
- this.searchForm = { ...this.formData };
|
|
|
|
- this.getAllList(this.searchForm);
|
|
|
|
-
|
|
|
|
|
|
+ if (command === "全部") {
|
|
|
|
+ this.formData.isDeleted = "";
|
|
|
|
+ }
|
|
|
|
+ if (command === "正常") {
|
|
|
|
+ this.formData.isDeleted = 0;
|
|
|
|
+ }
|
|
|
|
+ if (command === "删除") {
|
|
|
|
+ this.formData.isDeleted = 1;
|
|
|
|
+ }
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.searchForm = { ...this.formData };
|
|
|
|
+ this.getAllList(this.searchForm);
|
|
},
|
|
},
|
|
- /* 请输入查询内容 */
|
|
|
|
|
|
+ /* 请输入查询内容 */
|
|
Search() {
|
|
Search() {
|
|
this.currentPage = 1;
|
|
this.currentPage = 1;
|
|
this.searchForm = { ...this.formData };
|
|
this.searchForm = { ...this.formData };
|
|
this.getAllList(this.searchForm);
|
|
this.getAllList(this.searchForm);
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
|
|
- // 日期审核状态查询
|
|
|
|
|
|
+ // 日期审核状态查询
|
|
startEndTime(item) {
|
|
startEndTime(item) {
|
|
- if (item == null) {
|
|
|
|
|
|
+ if (item == null) {
|
|
item = [];
|
|
item = [];
|
|
- this.formData.startTime ='';
|
|
|
|
- this.formData.endTime = '';
|
|
|
|
|
|
+ this.formData.startTime = "";
|
|
|
|
+ this.formData.endTime = "";
|
|
this.currentPage = 1;
|
|
this.currentPage = 1;
|
|
this.searchForm = { ...this.formData };
|
|
this.searchForm = { ...this.formData };
|
|
this.getAllList(this.searchForm);
|
|
this.getAllList(this.searchForm);
|
|
@@ -285,17 +306,13 @@ export default {
|
|
let cpage = Math.ceil(font.total / font.pageSize);
|
|
let cpage = Math.ceil(font.total / font.pageSize);
|
|
font.handleCurrentChange(cpage);
|
|
font.handleCurrentChange(cpage);
|
|
},
|
|
},
|
|
-
|
|
|
|
- handleSelectionChange(data) {
|
|
|
|
- this.multipleSelection = data;
|
|
|
|
- console.log(this.multipleSelection);
|
|
|
|
- },
|
|
|
|
- handleAll(data) {
|
|
|
|
- this.multipleSelection = data;
|
|
|
|
- console.log(this.multipleSelection);
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /* 下载数据备份 */
|
|
download(fileName) {
|
|
download(fileName) {
|
|
- window.open('https://ht.9026.com/api/Database/export?fileName='+fileName)
|
|
|
|
|
|
+ window.open(
|
|
|
|
+ "https://ht.9026.com/api/Database/export?fileName=" + fileName
|
|
|
|
+ );
|
|
// this.$request({
|
|
// this.$request({
|
|
// url:'/api/Database/export',
|
|
// url:'/api/Database/export',
|
|
// method:'post',
|
|
// method:'post',
|
|
@@ -306,31 +323,55 @@ export default {
|
|
// console.log(res)
|
|
// console.log(res)
|
|
// })
|
|
// })
|
|
},
|
|
},
|
|
- recover(fileName) {
|
|
|
|
- this.$request({
|
|
|
|
- url: "/api/Database/restore",
|
|
|
|
- method: "post",
|
|
|
|
- headers: {
|
|
|
|
- "Content-Type": "application/json",
|
|
|
|
- },
|
|
|
|
- data: {
|
|
|
|
- fileName: fileName,
|
|
|
|
- },
|
|
|
|
- }).then((res) => {
|
|
|
|
- console.log(res);
|
|
|
|
- if (res.code == 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: "恢复成功",
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- type: "danger",
|
|
|
|
- message: "恢复失败",
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ // recover(fileName) {
|
|
|
|
+ // this.$request({
|
|
|
|
+ // url: "/api/Database/restore",
|
|
|
|
+ // method: "post",
|
|
|
|
+ // headers: {
|
|
|
|
+ // "Content-Type": "application/json",
|
|
|
|
+ // },
|
|
|
|
+ // data: {
|
|
|
|
+ // fileName: fileName,
|
|
|
|
+ // },
|
|
|
|
+ // }).then((res) => {
|
|
|
|
+ // console.log(res);
|
|
|
|
+ // if (res.code == 200) {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // type: "success",
|
|
|
|
+ // message: "恢复成功",
|
|
|
|
+ // });
|
|
|
|
+ // } else {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // type: "danger",
|
|
|
|
+ // message: "恢复失败",
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ // },
|
|
|
|
+
|
|
|
|
+ /* 修改备注 */
|
|
|
|
+ modifyRemarks(fileName){
|
|
|
|
+ console.log(fileName);
|
|
|
|
+ // this.dialogVisible = true;
|
|
|
|
+ // let params ={
|
|
|
|
+ // fileNameList:fileName
|
|
|
|
+ // }
|
|
|
|
+ // deletDatabase({...params}).then(res=>{
|
|
|
|
+ // console.log(res);
|
|
|
|
+ // })
|
|
},
|
|
},
|
|
|
|
+ // // 修改信息弹窗
|
|
|
|
+ // modify(id) {
|
|
|
|
+
|
|
|
|
+ // this.$request({
|
|
|
|
+ // url: "/api/Drawer/" + id,
|
|
|
|
+ // method: "get",
|
|
|
|
+ // }).then((res) => {
|
|
|
|
+ // this.tableData = res.data;
|
|
|
|
+ // this.talbeData = this.$route.query.id;
|
|
|
|
+ // });
|
|
|
|
+ // },
|
|
|
|
+
|
|
deleted(fileName) {
|
|
deleted(fileName) {
|
|
this.$request({
|
|
this.$request({
|
|
url: "/api/Database/delete",
|
|
url: "/api/Database/delete",
|
|
@@ -377,6 +418,92 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ /* 批量导出 */
|
|
|
|
+ handleSelectionChange(data) {
|
|
|
|
+ this.multipleSelection = data;
|
|
|
|
+ },
|
|
|
|
+ handleAll(data) {
|
|
|
|
+ this.multipleSelection = data;
|
|
|
|
+ },
|
|
|
|
+ /* 批量导出数据 */
|
|
|
|
+ batchExports() {
|
|
|
|
+ if (this.multipleSelection == "") {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "warning",
|
|
|
|
+ message: "请选择数据!",
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ var tableHeader = [
|
|
|
|
+ [
|
|
|
|
+ "序号",
|
|
|
|
+ '文件名称',
|
|
|
|
+ '存储对象',
|
|
|
|
+ '文件大小',
|
|
|
|
+ '时间',
|
|
|
|
+ '备注'
|
|
|
|
+
|
|
|
|
+ ],
|
|
|
|
+ ];
|
|
|
|
+ var dataList = [];
|
|
|
|
+ this.multipleSelection.forEach((item, index) => {
|
|
|
|
+ dataList.push([
|
|
|
|
+ index + 1,
|
|
|
|
+ item.fileName,
|
|
|
|
+ item.storeType,
|
|
|
|
+ item.fileSize,
|
|
|
|
+ item.backupTime,
|
|
|
|
+ item.remark
|
|
|
|
+ ]);
|
|
|
|
+ });
|
|
|
|
+ dataConversionUtil.dataToExcel("数据备份列表", tableHeader, dataList);
|
|
|
|
+ this.$message.success("导出成功!");
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ /* 全部导出承兑人列表数据 */
|
|
|
|
+ getContacts() {
|
|
|
|
+ const data = {
|
|
|
|
+ pageIndex: "",
|
|
|
|
+ pageSize: -1,
|
|
|
|
+ startTime: "",
|
|
|
|
+ endTime: "",
|
|
|
|
+ fileName: "",
|
|
|
|
+
|
|
|
|
+ };
|
|
|
|
+ getDatabase({ data }).then((res) => {
|
|
|
|
+ const { result } = res.data;
|
|
|
|
+ this.multipleSelection = result;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /* 全部导出 */
|
|
|
|
+ Exports() {
|
|
|
|
+ this.getContacts();
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ var tableHeader = [
|
|
|
|
+ [ "序号",
|
|
|
|
+ '文件名称',
|
|
|
|
+ '存储对象',
|
|
|
|
+ '文件大小',
|
|
|
|
+ '时间',
|
|
|
|
+ '备注'],
|
|
|
|
+ ];
|
|
|
|
+ var dataList = [];
|
|
|
|
+ this.multipleSelection.forEach((item, index) => {
|
|
|
|
+ dataList.push([
|
|
|
|
+ index + 1,
|
|
|
|
+ item.fileName,
|
|
|
|
+ item.storeType,
|
|
|
|
+ item.fileSize,
|
|
|
|
+ item.backupTime,
|
|
|
|
+ item.remark
|
|
|
|
+ ]);
|
|
|
|
+ });
|
|
|
|
+ dataConversionUtil.dataToExcel("数据备份列表", tableHeader, dataList);
|
|
|
|
+ this.$message.success("导出成功!");
|
|
|
|
+ this.multipleSelection=[]
|
|
|
|
+ }, 1000);
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|