日志管理对接数据

This commit is contained in:
du 2024-03-11 17:30:47 +08:00
parent 3368f3f0f6
commit e8e04d9135
15 changed files with 279 additions and 433 deletions

View File

@ -17,8 +17,8 @@ VITE_PROXY_API = /dev-api
# VITE_PROXY = [ ["/dev-api", "http://192.168.110.186:8017" ],["/dev-img-api", "http://file.sczysoft.com" ]] # VITE_PROXY = [ ["/dev-api", "http://192.168.110.186:8017" ],["/dev-img-api", "http://file.sczysoft.com" ]]
# VITE_UPLOAD_URL = http://192.168.110.186 # VITE_UPLOAD_URL = http://192.168.110.186
# 陈游 # 陈游
VITE_PROXY = [ ["/dev-api", "http://192.168.110.10:8017" ],["/dev-img-api", "http://file.sczysoft.com" ]] VITE_PROXY = [ ["/dev-api", "http://192.168.110.10:8017" ],["/dev-img-api", "http://42.193.40.239:8017" ]]
VITE_UPLOAD_URL = http://192.168.110.10 VITE_UPLOAD_URL = http://42.193.40.239:8888/
# #
VITE_GLOB_UPLOAD_URL=/dev-api VITE_GLOB_UPLOAD_URL=/dev-api
VITE_UPLOAD_IMG_URL=/dev-img-api VITE_UPLOAD_IMG_URL=/dev-img-api

View File

@ -356,6 +356,27 @@ export function saveUser(data) {
method: "POST", method: "POST",
}); });
} }
/**
*-
*/
export function loginLogPage(params) {
return request({
url: `/admin/Sys/loginLogPage`,
method: "GET",
params:params,
});
}
/**
*-
*/
export function operationLogPage(params) {
return request({
url: `/admin/Sys/operationLogPage`,
method: "GET",
params:params,
});
}

View File

@ -53,7 +53,7 @@ export function domicileDel(params) {
}); });
} }
/** /**
*- *-
*/ */
export function domicileCancel(params) { export function domicileCancel(params) {
return request({ return request({
@ -63,6 +63,15 @@ export function domicileCancel(params) {
}); });
} }
/** /**
*-
*/
export function domicileRestore(params) {
return request({
url: `/admin/people/domicileRestore/${params.domicileId}`,
method: "PUT",
});
}
/**
*- *-
*/ */
export function domicileDetail(params) { export function domicileDetail(params) {

View File

@ -1,4 +1,5 @@
import request from "@/utils/request"; // import request from "@/utils/request";
import {fileRequest} from "@/utils/request";
function getMethod(type: string) { function getMethod(type: string) {
if (type.startsWith("/upload")) return "POST"; if (type.startsWith("/upload")) return "POST";
@ -19,7 +20,7 @@ export function apiFile(
type: string, type: string,
data: { OTCId: string } data: { OTCId: string }
) { ) {
return request({ return fileRequest({
url: type, url: type,
method: getMethod(type), method: getMethod(type),
params: { params: {
@ -46,7 +47,7 @@ export function uploadFile(
otcType: string, otcType: string,
data: object data: object
) { ) {
return request({ return fileRequest({
url: "/common/upload/uploadFile", url: "/common/upload/uploadFile",
method: "POST", method: "POST",
params: { params: {
@ -62,7 +63,7 @@ export function uploadFile(
*/ */
export function getFile(otcid:string,otctype:string) { export function getFile(otcid:string,otctype:string) {
return request({ return fileRequest({
url: `/common/upload/getFile`, url: `/common/upload/getFile`,
method: "GET", method: "GET",
params:{ otcid,otctype } params:{ otcid,otctype }
@ -72,7 +73,7 @@ export function uploadFile(
* *
*/ */
export function delFile(documentId) { export function delFile(documentId) {
return request({ return fileRequest({
url: `/common/upload/delFile`, url: `/common/upload/delFile`,
method: "GET", method: "GET",
params:{ documentId } params:{ documentId }

View File

@ -111,7 +111,7 @@ export default {
meta: { meta: {
icon: 'point', icon: 'point',
auth: "emer.command", auth: "emer.command",
title: '指挥体系', title: '应急通讯录',
breadcrumb: true, //是否显示面包屑 breadcrumb: true, //是否显示面包屑
} }
}, },
@ -122,7 +122,7 @@ export default {
meta: { meta: {
icon: 'point', icon: 'point',
auth: "emer.address", auth: "emer.address",
title: '应急通讯录', title: '指挥体系',
breadcrumb: true, //是否显示面包屑 breadcrumb: true, //是否显示面包屑
} }
} }

View File

@ -42,7 +42,7 @@ function configRequest(service: {
const tokencancel = localStorage.getItem('token-cancel'); const tokencancel = localStorage.getItem('token-cancel');
let user= JSON.parse(localStorage.getItem("user_df")); let user= JSON.parse(localStorage.getItem("user_df"));
if (!tokencancel && token) { if (!tokencancel && token) {
// config.headers["userToken"] = token || ""; config.headers["Token"] = token || "";
config.headers[user.tokenName] = user.tokenValue; config.headers[user.tokenName] = user.tokenValue;
} }
return config; return config;

View File

@ -145,6 +145,7 @@
> >
<template #default="scope"> <template #default="scope">
<span <span
v-if="scope.row.domicileState == 1"
class="operate" class="operate"
@click=" @click="
(form = scope.row), (form = scope.row),
@ -162,7 +163,7 @@
<svg-icon name="detail" class="icon"></svg-icon> <svg-icon name="detail" class="icon"></svg-icon>
<span class="detail">详情</span> <span class="detail">详情</span>
</span> </span>
<span class="operate" @click="del(scope.row.peopleId)"> <span v-if="scope.row.domicileState == 1" class="operate" @click="del(scope.row.peopleId)">
<svg-icon name="delete" class="icon"></svg-icon> <svg-icon name="delete" class="icon"></svg-icon>
<span class="func">删除</span> <span class="func">删除</span>
</span> </span>

View File

@ -145,6 +145,7 @@
> >
<template #default="scope"> <template #default="scope">
<span <span
v-if="scope.row.domicileState == 1"
class="operate" class="operate"
@click=" @click="
(form = scope.row), (form = scope.row),
@ -162,7 +163,7 @@
<svg-icon name="detail" class="icon"></svg-icon> <svg-icon name="detail" class="icon"></svg-icon>
<span class="detail">详情</span> <span class="detail">详情</span>
</span> </span>
<span class="operate" @click="del(scope.row.peopleId)"> <span class="operate" v-if="scope.row.domicileState == 1" @click="del(scope.row.peopleId)">
<svg-icon name="delete" class="icon"></svg-icon> <svg-icon name="delete" class="icon"></svg-icon>
<span class="func">删除</span> <span class="func">删除</span>
</span> </span>

View File

@ -145,6 +145,7 @@
> >
<template #default="scope"> <template #default="scope">
<span <span
v-if="scope.row.domicileState == 1"
class="operate" class="operate"
@click=" @click="
(form = scope.row), (form = scope.row),
@ -162,7 +163,7 @@
<svg-icon name="detail" class="icon"></svg-icon> <svg-icon name="detail" class="icon"></svg-icon>
<span class="detail">详情</span> <span class="detail">详情</span>
</span> </span>
<span class="operate" @click="del(scope.row.peopleId)"> <span class="operate" v-if="scope.row.domicileState == 1" @click="del(scope.row.peopleId)">
<svg-icon name="delete" class="icon"></svg-icon> <svg-icon name="delete" class="icon"></svg-icon>
<span class="func">删除</span> <span class="func">删除</span>
</span> </span>

View File

@ -250,7 +250,7 @@
</template> </template>
<script lang='ts' setup> <script lang='ts' setup>
import { onMounted, reactive, ref } from "vue"; import { onMounted, reactive, ref } from "vue";
import { domicilePage, domicileDel } from "@/api/base"; import { domicilePage, domicileDel, domicileRestore } from "@/api/base";
import AddEdit from "./dialog/add-edit.vue"; import AddEdit from "./dialog/add-edit.vue";
import Cancel from "./dialog/cancel.vue"; import Cancel from "./dialog/cancel.vue";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
@ -327,18 +327,18 @@ const restore = (id) => {
let params = { let params = {
domicileId: id, domicileId: id,
}; };
// domicileDel(params).then((res: any) => { domicileRestore(params).then((res: any) => {
// if (res.code == 1) { if (res.code == 1) {
// ElMessage.success({ ElMessage.success({
// message: "", message: "删除成功",
// }); });
// } else { } else {
// ElMessage.error({ ElMessage.error({
// message: res.message, message: res.message,
// }); });
// } }
// getList(); getList();
// }); });
}); });
}; };
// //

View File

@ -1,14 +1,29 @@
<template> <template>
<div class="percentage-content"> <div class="percentage-content">
<div class="content"> <div class="content">
<div class="tree-wrap"> <div class="tree-wrap">
<vue3-tree-org
<vue3-tree-org style="margin-top: 10px;" ref="tree" :data="data" :center="true" :horizontal="horizontal" style="margin-top: 10px;"
:collapsable="collapsable" :label-style="style" :node-draggable="true" :scalable="true" ref="tree"
:only-one-node="onlyOneNode" :default-expand-level="3" :filter-node-method="filterNodeMethod" :data="dataList"
:clone-node-drag="cloneNodeDrag" @on-restore="restore" @on-contextmenu="onMenus" :on-expand-all="expandAll" :center="true"
@on-node-blur="nodeBlur" @on-node-delete="nodeDelete" :props="props" :define-menus="defineMenus"> :horizontal="horizontal"
:collapsable="collapsable"
:label-style="style"
:node-draggable="true"
:scalable="true"
:only-one-node="onlyOneNode"
:default-expand-level="2"
:filter-node-method="filterNodeMethod"
:clone-node-drag="cloneNodeDrag"
@on-restore="restore"
@on-contextmenu="onMenus"
:on-expand-all="expandAll"
@on-node-blur="nodeBlur"
@on-node-delete="nodeDelete"
:props="props"
:define-menus="defineMenus"
>
<!-- :define-menus="defineMenus" --> <!-- :define-menus="defineMenus" -->
<template v-slot="{ node }"> <template v-slot="{ node }">
<div class="tree-org-node__text node-label tree-div"> <div class="tree-org-node__text node-label tree-div">
@ -17,40 +32,52 @@
</div> </div>
</template> </template>
</vue3-tree-org> </vue3-tree-org>
</div> </div>
<div> <div>
<el-button class="topButton" type="primary" @click="click">提交</el-button> <el-button class="topButton" type="primary" @click="click"
>提交</el-button
>
</div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script setup lang='ts'> <script setup lang='ts'>
import { reactive, ref, onMounted } from "vue"; import { reactive, ref, onMounted } from "vue";
// import { getEmergencyUserTree, saveEmergencyUser, delEmergencyUser } from "@/api/emergency"; // import { getEmergencyUserTree, saveEmergencyUser, delEmergencyUser } from "@/api/emergency";
import { getUUID } from "@/utils/common"; import { getUUID } from "@/utils/common";
import { ElMessage } from 'element-plus' import { ElMessage } from "element-plus";
const data = ref({ const dataList = ref({
id:1,label:"道孚县鲜水镇", id: getUUID(),
children:[ label: "道孚县鲜水镇",
children: [
{ {
id:2,pid:1,label:"街道", id: 2,
style:{color:"#fff",background:"#108ffe"}, label: "街道",
children:[ style: { color: "#fff", background: "#108ffe" },
{id:6,pid:2,label:"办公室",disabled:true}, children: [
{id:8,pid:2,label:"安居办",noDragging:true}, { id: 6, label: "办公室" },
{id:10,pid:2,label:"规划办"} { id: 8, label: "安居办" },
] { id: 10, label: "规划办" },
],
}, },
{ {
id:3,pid:1,label:"应急", id: 3,
children:[ label: "应急",
{id:11,pid:3,label:"应急一部"}, children: [
{id:12,pid:3,label:"应急二部"} {
] id: 11,
label: "应急一部",
children: [
{ id: 15, label: "应急一部" },
{ id: 16, label: "应急二部" },
],
}, },
]}); { id: 12, label: "应急二部" },
],
},
],
});
const horizontal = ref(false); const horizontal = ref(false);
const collapsable = ref(true); const collapsable = ref(true);
const onlyOneNode = ref(true); const onlyOneNode = ref(true);
@ -59,19 +86,18 @@ const expandAll = ref(true);
const style = reactive({ const style = reactive({
background: "#fff", background: "#fff",
color: "#5e6d82", color: "#5e6d82",
height: "50%" height: "50%",
}); });
const props = reactive({ const props = reactive({
id: 'id', id: "id",
pid: 'pid', label: "label",
label: 'label', children: "children",
children: 'children'
}); });
const defineMenus = ref([ const defineMenus = ref([
{ name: '新增', command: 'add' }, { name: "新增", command: "add" },
{ name: '编辑', command: 'edit' }, { name: "编辑", command: "edit" },
{ name: '删除', command: 'delete' }, { name: "删除", command: "delete" },
]) ]);
/* defineMenus:[ /* defineMenus:[
{ name:'复制', command: 'copy' }, { name:'复制', command: 'copy' },
{ name:'新建', command: 'add' }, { name:'新建', command: 'add' },
@ -79,16 +105,14 @@ const defineMenus = ref([
{ name:'自定义', command: 'defind' }, { name:'自定义', command: 'defind' },
], */ ], */
// //
const deleteData = ref([]) const deleteData = ref([]);
/// ///
const addModifyData = ref([]) const addModifyData = ref([]);
const onMenus = ({ node, command }) => { const onMenus = ({ node, command }) => {};
}; const restore = () => {};
const restore = () => {
};
const filterNodeMethod = (value, data) => { const filterNodeMethod = (value, data) => {
console.log(value, data) console.log(value, data);
if (!value) return true; if (!value) return true;
return data.label.indexOf(value) !== -1; return data.label.indexOf(value) !== -1;
}; };
@ -96,9 +120,9 @@ const filterNodeMethod = (value, data) => {
const click = () => { const click = () => {
addModifyData.value = [...new Set(addModifyData.value)]; addModifyData.value = [...new Set(addModifyData.value)];
// //
addModifyData.value.forEach(item => { addModifyData.value.forEach((item) => {
console.log(item); console.log(item);
let emergencyUserId = ''; let emergencyUserId = "";
if (item.newNode == true) { if (item.newNode == true) {
emergencyUserId = getUUID(); emergencyUserId = getUUID();
} else { } else {
@ -108,8 +132,8 @@ const click = () => {
emergencyUserId: emergencyUserId, emergencyUserId: emergencyUserId,
name: item.name, name: item.name,
superId: item.superId, superId: item.superId,
} };
console.log(params,'params====>'); console.log(params, "params====>");
// saveEmergencyUser(params).then((res: any) => { // saveEmergencyUser(params).then((res: any) => {
// }); // });
@ -129,26 +153,29 @@ const click = () => {
// addModifyData.value = []; // addModifyData.value = [];
// getEmergencyUserTrees(); // getEmergencyUserTrees();
// }, 2000) // }, 2000)
}; };
//- //-
const nodeBlur = (e, data) => { const nodeBlur = (e, data) => {
addModifyData.value.push(data) console.log(e, data, "e, data=>");
addModifyData.value.push(data);
console.log(addModifyData.value, "addModifyData.value==>");
console.log(dataList.value, "data===>");
}; };
// //
const nodeDelete = (e) => { const nodeDelete = (e) => {
deleteData.value.push(e) deleteData.value.push(e);
} console.log(dataList.value, "data===>");
};
// //
const getEmergencyUserTrees = () => { const getEmergencyUserTrees = () => {
// getEmergencyUserTree().then((res: any) => { // getEmergencyUserTree().then((res: any) => {
// console.log(data.value, ' data.value '); // console.log(data.value, ' data.value ');
// if (res.code == 1) { // if (res.code == 1) {
// data.value = res.data[0] // dataList.value = res.data[0]
// } // }
// }); // });
} };
onMounted(() => { onMounted(() => {
getEmergencyUserTrees(); getEmergencyUserTrees();
}); });
@ -192,16 +219,13 @@ onMounted(() => {
} }
.tree-div { .tree-div {
padding: 20px 10px; padding: 20px 10px;
>div { > div {
font-size: 18px; font-size: 18px;
} }
} }
</style>
<style lang="scss" scoped>
.tree-wrap { .tree-wrap {
padding-top: 52px; padding-top: 52px;
height: 700px; height: 100%;
position: relative; position: relative;
margin-top: -50px; margin-top: -50px;
} }

View File

@ -1,251 +0,0 @@
<!-- <template>
<div class="percentage-content">
<div class="content">
<div class="tree-wrap">
<vue3-tree-org
style="margin-top: 10px;"
ref="tree"
:data="data"
:center="true"
:horizontal="horizontal"
:collapsable="collapsable"
:label-style="style"
:node-draggable="true"
:scalable="true"
:only-one-node="onlyOneNode"
:default-expand-level="3"
:filter-node-method="filterNodeMethod"
:clone-node-drag="cloneNodeDrag"
@on-restore="restore"
@on-contextmenu="onMenus"
:on-expand-all="expandAll"
@on-node-blur="nodeBlur"
@on-node-delete="nodeDelete"
:props="props"
:define-menus="defineMenus"
>
<template v-slot="{ node }">
<div class="tree-org-node__text node-label tree-div">
<div>{{ node.label }}</div>
</div>
</template>
</vue3-tree-org>
</div>
<div>
<el-button class="topButton" type="primary" @click="click"
>提交</el-button
>
</div>
</div>
</div>
</template>
<script lang='ts' setup>
import { onMounted, reactive, ref } from "vue";
import useUserStore from "@/store/modules/user";
const userStore = useUserStore();
const user = ref(JSON.parse(userStore.userInfo));
const userId = ref(user.value.userId);
// import { getEmergencyUserTree, saveEmergencyUser, delEmergencyUser } from "@/api/emergency";
import { getUUID } from "@/utils/common";
import { ElMessage } from 'element-plus'
const data = ref({});
const horizontal = ref(false);
const collapsable = ref(true);
const onlyOneNode = ref(true);
const cloneNodeDrag = ref(true);
const expandAll = ref(true);
const style = reactive({
background: "#fff",
color: "#5e6d82",
height: "50%"
});
const props = reactive({
id: 'emergencyUserId',
pid: 'superId',
label: 'name',
children: 'children'
});
const defineMenus = ref([
{ name: '新增', command: 'add' },
{ name: '编辑', command: 'edit' },
{ name: '删除', command: 'delete' },
])
/* defineMenus:[
{ name:'复制', command: 'copy' },
{ name:'新建', command: 'add' },
{ name:'编辑', command: 'edit' },
{ name:'自定义', command: 'defind' },
], */
//
const deleteData = ref([])
///
const addModifyData = ref([])
const onMenus = ({ node, command }) => {
};
const restore = () => {
};
const filterNodeMethod = (value, data) => {
console.log(value, data)
if (!value) return true;
return data.label.indexOf(value) !== -1;
};
//
const click = () => {
addModifyData.value = [...new Set(addModifyData.value)];
//
addModifyData.value.forEach(item => {
console.log(item);
let emergencyUserId = '';
if (item.newNode == true) {
emergencyUserId = getUUID();
} else {
emergencyUserId = item.emergencyUserId;
}
let params = {
emergencyUserId: emergencyUserId,
name: item.name,
superId: item.superId,
}
// saveEmergencyUser(params).then((res: any) => {
// });
});
//
deleteData.value.forEach(item => {
// delEmergencyUser({ emergencyUserId: item.emergencyUserId }).then((res: any) => {
// });
})
setTimeout(() => {
ElMessage({
message: '修改成功',
type: 'success',
})
deleteData.value = [];
addModifyData.value = [];
// getEmergencyUserTrees();
}, 2000)
};
//-
const nodeBlur = (e, data) => {
addModifyData.value.push(data)
};
//
const nodeDelete = (e) => {
deleteData.value.push(e)
}
//
const getEmergencyUserTrees = () => {
// getEmergencyUserTree().then((res: any) => {
// console.log(data.value, ' data.value ');
// if (res.code == 1) {
// data.value = res.data[0]
// }
// });
}
onMounted(() => {
// getEmergencyUserTrees();
});
</script>
<style lang="scss" scoped>
.content {
width: 100%;
background: #fff;
border-radius: 0.26042vw;
box-shadow: 0 0 0.41667vw 0 rgb(8 33 85 / 10%);
height: 100%;
padding: 0.83333vw;
overflow-y: auto;
overflow-x: hidden !important;
/* stylelint-disable-next-line property-no-vendor-prefix */
-moz-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-webkit-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-o-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-ms-box-sizing: border-box;
box-sizing: border-box;
}
</style>
<style lang="scss" scoped>
.box-style {
display: flex !important;
}
:deep(.el-table--border th.el-table__cell) {
color: #333;
background-color: #e6e6e6;
}
:deep(.cell) {
color: #777;
}
.filter-border {
border: 1px solid rgb(220 220 220);
background-color: #e6e6e6;
width: 40%;
height: 32px;
text-align: center;
}
:deep(.el-input__inner) {
border-radius: 0%;
}
.size-style {
color: #787878;
font-size: 13px;
position: relative;
top: 5px;
}
.topButton {
position: absolute;
width: 100px;
height: 35px;
left: 50%;
bottom: 50px;
font-size: 18px;
margin-left: -100px;
}
.tree-div {
padding: 20px 10px;
> div {
font-size: 18px;
}
}
</style>
<style lang="scss" scoped>
.tree-wrap {
padding-top: 52px;
height: 700px;
position: relative;
margin-top: -50px;
}
.search-box {
padding: 8px 15px;
position: absolute;
top: 0;
left: 0;
input {
width: 200px;
height: 32px;
border: 1px solid #ddd;
outline: none;
border-radius: 5px;
padding-left: 10px;
}
}
.tree-org-node__text {
text-align: left;
font-size: 14px;
.custom-content {
padding-bottom: 8px;
margin-bottom: 8px;
border-bottom: 1px solid currentcolor;
}
}
</style>
-->

View File

@ -3,17 +3,30 @@
<div class="content"> <div class="content">
<div class="h-layout space-between h-center"> <div class="h-layout space-between h-center">
<div> <div>
<div class="h-layout"> <div class="h-layout h-center">
<div class="tool-item" @click="getList"> <div class="tool-item" @click="getList">
<svg-icon name="refurbish" class="icon" /> <svg-icon name="refurbish" class="icon" />
<span>刷新</span> <span>刷新</span>
</div> </div>
<div class="label-select filter-tab">
<label>时间</label>
<el-date-picker
v-model="search.date"
type="daterange"
range-separator="至"
start-placeholder="起始时间"
end-placeholder="结束时间"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
@change="getList"
/>
</div> </div>
</div> </div>
<div style="width: 30%"> </div>
<div style="width: 30%;">
<div> <div>
<el-input <el-input
v-model="search" v-model="search.condition"
@keydown.enter.native="getList" @keydown.enter.native="getList"
placeholder="请输入关键字" placeholder="请输入关键字"
class="search-input" class="search-input"
@ -46,20 +59,16 @@
{{ scope.$index + 1 + (currentPage - 1) * pageSize }} {{ scope.$index + 1 + (currentPage - 1) * pageSize }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="authUserName" :resizable="true" label="登录用户">
prop="performclassname"
:resizable="true"
label="登录用户"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="performname" prop="authOptIp"
:resizable="true" :resizable="true"
align="center" align="center"
label="IP地址" label="IP地址"
> >
</el-table-column> </el-table-column>
<el-table-column prop="areaPathName" :resizable="true" label="登录时间"> <el-table-column prop="authOptTime" :resizable="true" label="登录时间">
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页 --> <!-- 分页 -->
@ -81,8 +90,11 @@
<script lang='ts' setup> <script lang='ts' setup>
import { onMounted, reactive, ref } from "vue"; import { onMounted, reactive, ref } from "vue";
import { loginLogPage } from "@/api/Sys";
const search = ref([]); const search = ref({
condition: "",
date: "",
});
const tableData = ref<any>([]); const tableData = ref<any>([]);
const currentPage = ref(1); const currentPage = ref(1);
const pageSize = ref(10); const pageSize = ref(10);
@ -93,15 +105,20 @@ const tableDataloading = ref(false);
const getList = () => { const getList = () => {
tableDataloading.value = true; tableDataloading.value = true;
let params = { let params = {
condition: search.value, condition: search.value.condition,
limit: pageSize.value, limit: pageSize.value,
page: currentPage.value, page: currentPage.value,
state: null, startTime: search.value.date ? search.value.date[0] : "",
unitId: null, endTime: search.value.date ? search.value.date[1] : "",
}; };
loginLogPage(params).then((res: any) => {
tableData.value = [{}, {}]; tableData.value = res.data.list;
total.value = 10; total.value = res.data.total;
tableDataloading.value = false;
});
};
const text1 = () => {
console.log(search.value);
}; };
onMounted(() => { onMounted(() => {
@ -114,17 +131,21 @@ onMounted(() => {
width: 100%; width: 100%;
background: #fff; background: #fff;
border-radius: 0.26042vw; border-radius: 0.26042vw;
box-shadow: 0 0 0.41667vw 0 rgba(8, 33, 85, 0.1); box-shadow: 0 0 0.41667vw 0 rgb(8 33 85 / 10%);
height: 100%; height: 100%;
padding: 0.83333vw; padding: 0.83333vw;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden !important; overflow-x: hidden !important;
/* stylelint-disable-next-line property-no-vendor-prefix */
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-o-box-sizing: border-box; -o-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-ms-box-sizing: border-box; -ms-box-sizing: border-box;
/* stylelint-disable-next-line indentation */
box-sizing: border-box; box-sizing: border-box;
.table { .table {
margin-top: 16px; margin-top: 16px;
} }

View File

@ -3,17 +3,30 @@
<div class="content"> <div class="content">
<div class="h-layout space-between h-center"> <div class="h-layout space-between h-center">
<div> <div>
<div class="h-layout"> <div class="h-layout h-center">
<div class="tool-item" @click="getList"> <div class="tool-item" @click="getList">
<svg-icon name="refurbish" class="icon" /> <svg-icon name="refurbish" class="icon" />
<span>刷新</span> <span>刷新</span>
</div> </div>
<div class="label-select filter-tab">
<label>时间</label>
<el-date-picker
v-model="search.date"
type="daterange"
range-separator="至"
start-placeholder="起始时间"
end-placeholder="结束时间"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
@change="getList"
/>
</div> </div>
</div> </div>
<div style="width: 30%"> </div>
<div style="width: 30%;">
<div> <div>
<el-input <el-input
v-model="search" v-model="search.condition"
@keydown.enter.native="getList" @keydown.enter.native="getList"
placeholder="请输入关键字" placeholder="请输入关键字"
class="search-input" class="search-input"
@ -46,11 +59,7 @@
{{ scope.$index + 1 + (currentPage - 1) * pageSize }} {{ scope.$index + 1 + (currentPage - 1) * pageSize }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="nickname" :resizable="true" label="操作用户">
prop="performclassname"
:resizable="true"
label="操作用户"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="ipAddress" prop="ipAddress"
@ -85,8 +94,11 @@
<script lang='ts' setup> <script lang='ts' setup>
import { onMounted, reactive, ref } from "vue"; import { onMounted, reactive, ref } from "vue";
import { operationLogPage } from "@/api/Sys";
const search = ref([]); const search = ref({
condition: "",
date: "",
});
const tableData = ref<any>([]); const tableData = ref<any>([]);
const currentPage = ref(1); const currentPage = ref(1);
const pageSize = ref(10); const pageSize = ref(10);
@ -97,15 +109,17 @@ const tableDataloading = ref(false);
const getList = () => { const getList = () => {
tableDataloading.value = true; tableDataloading.value = true;
let params = { let params = {
condition: search.value, condition: search.value.condition,
limit: pageSize.value, limit: pageSize.value,
page: currentPage.value, page: currentPage.value,
state: null, startTime: search.value.date ? search.value.date[0] : "",
unitId: null, endTime: search.value.date ? search.value.date[1] : "",
}; };
operationLogPage(params).then((res: any) => {
tableData.value = [{}, {}]; tableData.value = res.data.list;
total.value = 10; total.value = res.data.total;
tableDataloading.value = false;
});
}; };
onMounted(() => { onMounted(() => {
@ -118,17 +132,21 @@ onMounted(() => {
width: 100%; width: 100%;
background: #fff; background: #fff;
border-radius: 0.26042vw; border-radius: 0.26042vw;
box-shadow: 0 0 0.41667vw 0 rgba(8, 33, 85, 0.1); box-shadow: 0 0 0.41667vw 0 rgb(8 33 85 / 10%);
height: 100%; height: 100%;
padding: 0.83333vw; padding: 0.83333vw;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden !important; overflow-x: hidden !important;
/* stylelint-disable-next-line property-no-vendor-prefix */
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-o-box-sizing: border-box; -o-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-ms-box-sizing: border-box; -ms-box-sizing: border-box;
/* stylelint-disable-next-line indentation */
box-sizing: border-box; box-sizing: border-box;
.table { .table {
margin-top: 16px; margin-top: 16px;
} }

View File

@ -197,7 +197,7 @@ const clickRadio = ()=>{
} }
}); });
getList() getList()
} };
// //
const onclone = () => { const onclone = () => {
dialogVisible.value = false; dialogVisible.value = false;