Compare commits

..

No commits in common. "9ed8f050e3962d2b84ab5807f1db37d4eaa4a971" and "f7c690bad73bfb8f4fd5bfcabaeddf39c7ae0cfe" have entirely different histories.

3 changed files with 19 additions and 39 deletions

View File

@ -14,10 +14,7 @@ export default {
return {
ip: "",
tableData: [],
ConfigFileCurrentPageData: [],
loading: false,
pageSize: 10,
currentPage: 1,
tokenData: {
token: localStorage.getItem("token"),
ip: localStorage.getItem("ip"),
@ -39,13 +36,6 @@ export default {
// methods
//
methods: {
currentPageData() {
const { tableData, currentPage, pageSize } = this;
this.ConfigFileCurrentPageData = tableData.slice(
(currentPage - 1) * pageSize,
currentPage * pageSize
);
},
roundNumber(number, decimals) {
let num = 3.14159;
let result = Math.round(number * 100) / 100;
@ -66,19 +56,19 @@ export default {
for(var i=0;i<data.length;i++){
data[i].RunTime = Math.round(data[i].RunTime * 100) / 100;
}
// console.log(data[i]);
this.tableData = data;
this.currentPageData();
},
onSubmit() {
getDeviceList({ token: token });
},
handleSizeChange(val) {
this.pageSize = val;
this.currentPageData();
handleSizeChange() {
alert("每页记录数变化" + val);
},
handleCurrentChange(val) {
this.currentPage = val;
this.currentPageData();
handleCurrentChange() {
alert("页码发生变化" + val);
},
//
@ -188,7 +178,6 @@ export default {
class="el-button--danger"
type="primary"
@click="getCIDLogList()"
:disabled="loading"
>刷新</el-button
>
</el-form-item>
@ -251,8 +240,9 @@ export default {
<!-- 表格 :row-style="this.tableRowClassName"-->
<el-table
:data="ConfigFileCurrentPageData"
:data="tableData"
width="100%"
border
v-loading="loading"
element-loading-text="数据加载中..."
>
@ -261,8 +251,7 @@ export default {
<el-table-column
prop="CreatedAt"
label="创建时间"
show-overflow-tooltip
width="200"
width="100"
></el-table-column>
<el-table-column
prop="Script"
@ -301,15 +290,14 @@ export default {
<br />
<!-- 分页条 -->
<el-pagination
<!-- Pagination 分页 -->
<!-- <el-pagination
background
layout="total,sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="tableData.length">
</el-pagination>
:total="1000"
></el-pagination> -->
</el-main>
</el-container>
</el-container>

View File

@ -69,15 +69,9 @@ const param = reactive({
password: defParam ? defParam.password : "",
});
onMounted(async () => {
onMounted(() => {
//
let res = getMyUserInfo(localStorage.getItem("userId"));
if(res.code === 0){
//
router.push("/user");
}else{
window.location.href = "https://sv.ljsea.top/#/login?site=gs-vp"; //https://sv.ljsea.top/
}
getMyUserInfo(localStorage.getItem("userId"));
});
//
@ -151,7 +145,6 @@ const getMyUserInfo = async (id) => {
} catch (e) {
console.log(e);
}
return result;
};
//

View File

@ -401,7 +401,6 @@ export default {
<el-button
class="el-button--danger"
type="primary"
:disabled="loading"
@click="getConfigFileList()"
>查询</el-button
>