prod
lily.zhang 4 years ago
parent 6dbdef9aa0
commit c47ffe692f

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-10-08 09:26:42 * @Date: 2021-10-08 09:26:42
* @LastEditTime: 2021-10-25 09:09:47 * @LastEditTime: 2021-10-25 10:48:19
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/permission.js * @FilePath: /data-show/src/permission.js
@ -11,10 +11,10 @@ import NProgress from "nprogress"
import "nprogress/nprogress.css" import "nprogress/nprogress.css"
const whitePath = ['/', '/login', '/industryDataExport','/index'] const whitePath = ['/', '/login', '/industryDataExport','/index']
const token = sessionStorage.getItem('token');
// console.log(token) // console.log(token)
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start();
const token = sessionStorage.getItem('token');
if(!token && !whitePath.includes(to.path)) { if(!token && !whitePath.includes(to.path)) {
next('/login'); next('/login');
} else { } else {

@ -1,7 +1,7 @@
<!-- <!--
* @Author: xw * @Author: xw
* @Date: 2021-10-09 16:57:27 * @Date: 2021-10-09 16:57:27
* @LastEditTime: 2021-10-25 09:37:12 * @LastEditTime: 2021-10-25 10:45:46
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 个人中心 * @Description: 个人中心
* @FilePath: /data-show/src/views/Myself/index.vue * @FilePath: /data-show/src/views/Myself/index.vue
@ -45,7 +45,7 @@
<div class="ms-d2"> <div class="ms-d2">
<v-label-div title="数据导出管理"></v-label-div> <v-label-div title="数据导出管理"></v-label-div>
<div class="ms-d2-inner"> <div class="ms-d2-inner">
<v-table :columns="columns" :data="tbData" row-key="id"> <v-table :columns="columns" :data="tbData" :loading="tableLoading" row-key="id" :pagination="pagination" @change="handlerPage">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a :href="record.FilePath">下载</a> <a :href="record.FilePath">下载</a>
</span> </span>
@ -84,7 +84,7 @@
<script> <script>
import phoneForm from "./phoneForm"; import phoneForm from "./phoneForm";
import modifyForm from "./modifyForm"; import modifyForm from "./modifyForm";
import {getMyFileInfoExcel} from "@/api/mySelf" import { getMyFileInfoExcel } from "@/api/mySelf";
export default { export default {
name: "Myself", name: "Myself",
components: { components: {
@ -101,13 +101,19 @@ export default {
accout: { accout: {
sPhone: "", sPhone: "",
iCode: "", iCode: "",
token: "" token: "",
}, },
nextStr: "下一步", nextStr: "下一步",
nextType: 1, nextType: 1,
form: { form: {
iPageIndex: 1, iPageIndex: 1,
iPageSize: 20 iPageSize: 20,
},
tableLoading: false,
pagination: {
total: 0,
current: 1,
pageSize: 20,
}, },
columns: [ columns: [
{ {
@ -132,13 +138,11 @@ export default {
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
], ],
tbData: [ tbData: [],
],
}; };
}, },
created() { created() {
this.getTable() this.getTable();
}, },
methods: { methods: {
handlerPwd() { handlerPwd() {
@ -154,7 +158,7 @@ export default {
} else if (this.nextType === 2) { } else if (this.nextType === 2) {
this.$refs.modifyForm.onSuccess(); this.$refs.modifyForm.onSuccess();
} else { } else {
this.$router.push('/login') this.$router.push("/login");
} }
}, },
// //
@ -172,22 +176,30 @@ export default {
}, },
// //
getTable() { getTable() {
this.form.token = this.getToken; this.tableLoading = true;
getMyFileInfoExcel(this.form).then(res => { this.form.token = this.getToken;
let table = res.data.Table; getMyFileInfoExcel(this.form).then((res) => {
table.forEach(ele => { let table = res.data.Table;
if(ele.Status === 0) { this.pagination.total = res.totalNum;
ele.statuStr = '未完成' table.forEach((ele) => {
} else if(ele.Status === 1) { if (ele.Status === 0) {
ele.statuStr = '正在生成' ele.statuStr = "未完成";
} else { } else if (ele.Status === 1) {
ele.statuStr = '已完成' ele.statuStr = "正在生成";
} } else {
}) ele.statuStr = "已完成";
this.tbData = table; }
});
}) this.tbData = table;
} this.tableLoading = false;
});
},
handlerPage(p) {
let iPageIndex = p.current;
this.form.iPageIndex = iPageIndex;
this.pagination.current = iPageIndex;
this.getData();
},
}, },
}; };
</script> </script>
@ -263,20 +275,17 @@ export default {
cursor: pointer; cursor: pointer;
} }
.stepEst { .stepEst {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.m1 { .m1 {
width: 80px; width: 80px;
height: 80px; height: 80px;
} }
.s1 { .s1 {
display: block; display: block;
margin-top: 12px; margin-top: 12px;
} }
}
/deep/ .ant-table-body {
height: 600px;
} }
</style> </style>
Loading…
Cancel
Save