日志详情
This commit is contained in:
parent
d85ee87215
commit
5b15ce2f32
@ -7,9 +7,9 @@
|
||||
:close-on-click-modal="false"
|
||||
:before-close="dialogClose"
|
||||
>
|
||||
<el-descriptions column="2">
|
||||
<el-descriptions-item label="消息标题:">{{formData.title}}</el-descriptions-item>
|
||||
<el-descriptions-item label="消息类型:">{{getTyepText(formData.type)}}</el-descriptions-item>
|
||||
<el-descriptions column="2" border>
|
||||
<el-descriptions-item label="消息标题:"label-class-name="des-width">{{formData.title}}</el-descriptions-item>
|
||||
<el-descriptions-item label="消息类型:"label-class-name="des-width">{{getTyepText(formData.type)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="业务类型:">{{formData.bizType==1?'订单':'其他'}}</el-descriptions-item>
|
||||
<el-descriptions-item label="消息状态:">{{formData.status==1?'已读':'未读'}}</el-descriptions-item>
|
||||
<el-descriptions-item label="消息内容:">{{formData.content}}</el-descriptions-item>
|
||||
@ -106,3 +106,11 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.des-width) {
|
||||
width:120px;
|
||||
}
|
||||
:deep(.el-descriptions__body .el-descriptions__table .el-descriptions__cell) {
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
@ -7,7 +7,7 @@
|
||||
:close-on-click-modal="false"
|
||||
:before-close="dialogClose"
|
||||
>
|
||||
<el-descriptions column="2">
|
||||
<el-descriptions column="2" border>
|
||||
<el-descriptions-item label="日志标题:">{{formData.title}}</el-descriptions-item>
|
||||
<el-descriptions-item label="日志类型:">{{getTyepText(formData.type)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="模板编号:">{{formData.number}}</el-descriptions-item>
|
||||
@ -26,22 +26,10 @@
|
||||
<script lang="ts" setup>
|
||||
import type {FormInstance} from "element-plus";
|
||||
import {getEmailLogDetail} from "@/api/logger/emailLog";
|
||||
import {onMounted, reactive, shallowRef} from "vue";
|
||||
import {message} from "@/utils/auth";
|
||||
import {useLockFn} from "@/utils/useLockFn";
|
||||
import {onMounted, ref} from "vue";
|
||||
|
||||
const emit = defineEmits(["success", "update:visible"]);
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
title: "",
|
||||
type:'',
|
||||
number:'',
|
||||
receiveMobile:'',
|
||||
receiveType:'',
|
||||
consumeTime:'',
|
||||
status:''
|
||||
});
|
||||
const formData = ref({});
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
@ -63,12 +51,7 @@ const dialogClose = () => {
|
||||
|
||||
const setFormData = async () => {
|
||||
const data = await getEmailLogDetail(props.emailId);
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
formData.value= data
|
||||
};
|
||||
const getReviceType =(type)=>{
|
||||
let typeText = ''
|
||||
@ -118,3 +101,11 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.des-width) {
|
||||
width:120px;
|
||||
}
|
||||
:deep(.el-descriptions__body .el-descriptions__table .el-descriptions__cell) {
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
|
@ -7,12 +7,22 @@
|
||||
:close-on-click-modal="false"
|
||||
:before-close="dialogClose"
|
||||
>
|
||||
<el-descriptions column="2">
|
||||
<el-descriptions column="2" border>
|
||||
<el-descriptions-item label="文件名称:"><a :href="formData.filePath" target="_blank">{{formData.originalName}}</a></el-descriptions-item>
|
||||
<el-descriptions-item label="文件类型:">{{formData.fileType}}</el-descriptions-item>
|
||||
<el-descriptions-item label="文件后缀:">{{formData.fileExtension}}</el-descriptions-item>
|
||||
<el-descriptions-item label="文件大小:">{{formData.fileSize}}B</el-descriptions-item>
|
||||
<el-descriptions-item label="请求耗时:">{{formData.consumeTime}}s</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="请求参数" label-class-name="des-width">
|
||||
{{formData.param}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="返回结果" label-class-name="des-width">
|
||||
{{formData.result}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogClose">关闭</el-button>
|
||||
@ -22,18 +32,10 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import {getFileLogDetail} from "@/api/logger/fileLog";
|
||||
import {onMounted, reactive, shallowRef} from "vue";
|
||||
import {onMounted, ref} from "vue";
|
||||
|
||||
const emit = defineEmits(["success", "update:visible"]);
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
fileName: "",
|
||||
filePath:'',
|
||||
fileSize:'',
|
||||
fileType:'',
|
||||
fileExtension:'',
|
||||
originalName:''
|
||||
});
|
||||
const formData = ref({});
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
@ -55,12 +57,7 @@ const dialogClose = () => {
|
||||
|
||||
const setFormData = async () => {
|
||||
const data = await getFileLogDetail(props.fileId);
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
formData.value = data
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
@ -70,3 +67,11 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.des-width) {
|
||||
width:120px;
|
||||
}
|
||||
:deep(.el-descriptions__body .el-descriptions__table .el-descriptions__cell) {
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
|
@ -7,15 +7,25 @@
|
||||
:close-on-click-modal="false"
|
||||
:before-close="dialogClose"
|
||||
>
|
||||
<el-descriptions column="2">
|
||||
<el-descriptions column="2" border>
|
||||
<el-descriptions-item label="日志标题:">{{formData.title}}</el-descriptions-item>
|
||||
<el-descriptions-item label="日志类型:">{{getTyepText(formData.type)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="模板编号:">{{formData.number}}</el-descriptions-item>
|
||||
<el-descriptions-item label="接收人手机:">{{formData.receiveMobile}}</el-descriptions-item>
|
||||
<el-descriptions-item label="接收人类型:">{{getReviceType(formData.receiveType)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="请求耗时:">{{formData.consumeTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="请求耗时:">{{formData.consumeTime}}s</el-descriptions-item>
|
||||
<el-descriptions-item label="日志状态:">{{formData.status==1?'已读':'未读'}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="请求参数" label-class-name="des-width">
|
||||
{{formData.param}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="返回结果" label-class-name="des-width">
|
||||
{{formData.result}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogClose">关闭</el-button>
|
||||
@ -26,22 +36,13 @@
|
||||
<script lang="ts" setup>
|
||||
import type {FormInstance} from "element-plus";
|
||||
import {getSmsLogDetail} from "@/api/logger/smsLog";
|
||||
import {onMounted, reactive, shallowRef} from "vue";
|
||||
import {onMounted, ref, shallowRef} from "vue";
|
||||
import {message} from "@/utils/auth";
|
||||
import {useLockFn} from "@/utils/useLockFn";
|
||||
|
||||
const emit = defineEmits(["success", "update:visible"]);
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
title: "",
|
||||
type:'',
|
||||
number:'',
|
||||
receiveMobile:'',
|
||||
receiveType:'',
|
||||
consumeTime:'',
|
||||
status:''
|
||||
});
|
||||
const formData = ref({});
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
@ -63,12 +64,7 @@ const dialogClose = () => {
|
||||
|
||||
const setFormData = async () => {
|
||||
const data = await getSmsLogDetail(props.smsId);
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
formData.value = data
|
||||
};
|
||||
const getReviceType =(type)=>{
|
||||
let typeText = ''
|
||||
@ -118,3 +114,11 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.des-width) {
|
||||
width:120px;
|
||||
}
|
||||
:deep(.el-descriptions__body .el-descriptions__table .el-descriptions__cell) {
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
@ -1,69 +1,65 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="props.visible"
|
||||
:title="props.positionId?'编辑':'新增'"
|
||||
|
||||
width="500"
|
||||
title="登录日志详情"
|
||||
width="700"
|
||||
:close-on-click-modal="false"
|
||||
:before-close="dialogClose"
|
||||
>
|
||||
<el-form
|
||||
class="ls-form"
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item
|
||||
label="名称"
|
||||
prop="name"
|
||||
:rules="{ required: true, message: '请输入名称', trigger: 'blur' }"
|
||||
>
|
||||
<el-input
|
||||
class="ls-input"
|
||||
v-model="formData.name"
|
||||
placeholder="请输入名称"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="岗位状态" prop="status">
|
||||
<el-radio-group v-model="formData.status" name="status">
|
||||
<el-radio :value="1">正常</el-radio>
|
||||
<el-radio :value="2">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input-number v-model="formData.sort"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="note">
|
||||
<el-input v-model="formData.note" type="textarea" placeholder="请输入备注" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-descriptions class="margin-top" :column="2" border>
|
||||
<el-descriptions-item label="操作用户" label-class-name="des-width">
|
||||
{{formData.createUser}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="IP地址" label-class-name="des-width">
|
||||
{{formData.ip}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="操作系统">
|
||||
{{formData.os}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="操作浏览器">
|
||||
{{formData.browser}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="请求耗时">
|
||||
{{formData.consumeTime}}s
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="请求地区">
|
||||
{{formData.location}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="请求方式">
|
||||
{{formData.requestMethod}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="请求状态">
|
||||
<el-tag :type="formData.status?'danger':'success'">{{formData.status?'异常':'正常'}}</el-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="调用方法"label-class-name="des-width">
|
||||
{{formData.method}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="请求参数"label-class-name="des-width">
|
||||
{{formData.param}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="返回结果" label-class-name="des-width">
|
||||
{{formData.result}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogClose">取消</el-button>
|
||||
<el-button :loading="subLoading" type="primary" @click="submit">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import type {FormInstance} from "element-plus";
|
||||
import {getPositionDetail,positionAdd,positionUpdate} from "@/api/system/position";
|
||||
import {onMounted, reactive, shallowRef} from "vue";
|
||||
import {message} from "@/utils/auth";
|
||||
import {useLockFn} from "@/utils/useLockFn";
|
||||
import {getLoginLogDetail} from "@/api/system/loginLog";
|
||||
import {onMounted, ref,} from "vue";
|
||||
|
||||
const emit = defineEmits(["success", "update:visible"]);
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
name: "",
|
||||
status: 1,
|
||||
sort: 0,
|
||||
note:'',
|
||||
});
|
||||
const formData = ref({});
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
@ -71,42 +67,36 @@ const props = defineProps({
|
||||
required: true,
|
||||
default: false
|
||||
},
|
||||
positionId: {
|
||||
loginlogId: {
|
||||
type: Number,
|
||||
required: true,
|
||||
default: 0
|
||||
}
|
||||
});
|
||||
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate();
|
||||
props.positionId ? await positionUpdate(formData) : await positionAdd(formData);
|
||||
message("操作成功");
|
||||
emit("update:visible", false);
|
||||
emit("success");
|
||||
};
|
||||
|
||||
const dialogClose = () => {
|
||||
emit("update:visible", false);
|
||||
};
|
||||
|
||||
const { isLock:subLoading,lockFn: submit } = useLockFn(handleSubmit);
|
||||
|
||||
|
||||
const setFormData = async () => {
|
||||
const data = await getPositionDetail(props.positionId);
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
const data = await getLoginLogDetail(props.loginlogId);
|
||||
formData.value = data
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
if (props.positionId) {
|
||||
if (props.loginlogId) {
|
||||
setFormData();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.des-width) {
|
||||
width:120px;
|
||||
}
|
||||
:deep(.el-descriptions__body .el-descriptions__table .el-descriptions__cell) {
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
<editDialog
|
||||
v-if="editVisible"
|
||||
:positionId="positionId"
|
||||
:loginlogId="loginlogId"
|
||||
v-model:visible="editVisible"
|
||||
@success="reloadTable('noRefresh')"
|
||||
>
|
||||
@ -47,7 +47,7 @@
|
||||
const editDialog = defineAsyncComponent(() =>
|
||||
import('./loginLog/edit.vue')
|
||||
)
|
||||
const positionId =ref(0)
|
||||
const loginlogId =ref(0)
|
||||
const editVisible=ref(false)
|
||||
const selectionData = ref([])
|
||||
const tableRef = ref();
|
||||
@ -64,15 +64,12 @@ const editVisible=ref(false)
|
||||
return h(TableAction, {
|
||||
style: 'button',
|
||||
actions: [
|
||||
// {
|
||||
// label: '编辑',
|
||||
// type: 'warning',
|
||||
// onClick: handleEdit.bind(null, record),
|
||||
// ifShow: () => {
|
||||
// return true;
|
||||
// },
|
||||
// auth: ['basic_list'],
|
||||
// },
|
||||
{
|
||||
label: '详情',
|
||||
type: 'warning',
|
||||
onClick: handleInfo.bind(null, record),
|
||||
auth: ['sys:loginlog:detail'],
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
type: 'danger',
|
||||
@ -112,8 +109,8 @@ const editVisible=ref(false)
|
||||
formParams[key] ='';
|
||||
}
|
||||
}
|
||||
const handleEdit = async (record: Recordable) => {
|
||||
positionId.value=record.row.id
|
||||
const handleInfo = async (record: Recordable) => {
|
||||
loginlogId.value=record.row.id
|
||||
await nextTick();
|
||||
editVisible.value=true
|
||||
};
|
||||
|
@ -1,68 +1,65 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="props.visible"
|
||||
:title="props.positionId?'编辑':'新增'"
|
||||
width="500"
|
||||
title="操作日志详情"
|
||||
width="700"
|
||||
:close-on-click-modal="false"
|
||||
:before-close="dialogClose"
|
||||
>
|
||||
<el-form
|
||||
class="ls-form"
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item
|
||||
label="名称"
|
||||
prop="name"
|
||||
:rules="{ required: true, message: '请输入名称', trigger: 'blur' }"
|
||||
>
|
||||
<el-input
|
||||
class="ls-input"
|
||||
v-model="formData.name"
|
||||
placeholder="请输入名称"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="岗位状态" prop="status">
|
||||
<el-radio-group v-model="formData.status" name="status">
|
||||
<el-radio :value="1">正常</el-radio>
|
||||
<el-radio :value="2">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input-number v-model="formData.sort"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="note">
|
||||
<el-input v-model="formData.note" type="textarea" placeholder="请输入备注" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-descriptions class="margin-top" :column="2" border>
|
||||
<el-descriptions-item label="日志标题" label-class-name="des-width">
|
||||
{{formData.title}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="操作用户" label-class-name="des-width">
|
||||
{{formData.createUser}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="IP地址">
|
||||
{{formData.ip}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="操作系统">
|
||||
{{formData.os}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="操作浏览器">
|
||||
{{formData.browser}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="请求耗时">
|
||||
{{formData.consumeTime}}s
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="请求方式">
|
||||
{{formData.requestMethod}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="请求状态">
|
||||
<el-tag :type="formData.status?'danger':'success'">{{formData.status?'异常':'正常'}}</el-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="调用方法"label-class-name="des-width">
|
||||
{{formData.method}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="请求参数"label-class-name="des-width">
|
||||
{{formData.param}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="返回结果" label-class-name="des-width">
|
||||
{{formData.result}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogClose">取消</el-button>
|
||||
<el-button :loading="subLoading" type="primary" @click="submit">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import type {FormInstance} from "element-plus";
|
||||
import {getPositionDetail,positionAdd,positionUpdate} from "@/api/system/position";
|
||||
import {onMounted, reactive, shallowRef} from "vue";
|
||||
import {message} from "@/utils/auth";
|
||||
import {useLockFn} from "@/utils/useLockFn";
|
||||
import {getOperLogDetail} from "@/api/system/operLog";
|
||||
import {onMounted, ref} from "vue";
|
||||
|
||||
const emit = defineEmits(["success", "update:visible"]);
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
name: "",
|
||||
status: 1,
|
||||
sort: 0,
|
||||
note:'',
|
||||
});
|
||||
const formData = ref({});
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
@ -70,42 +67,36 @@ const props = defineProps({
|
||||
required: true,
|
||||
default: false
|
||||
},
|
||||
positionId: {
|
||||
operlogId: {
|
||||
type: Number,
|
||||
required: true,
|
||||
default: 0
|
||||
}
|
||||
});
|
||||
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate();
|
||||
props.positionId ? await positionUpdate(formData) : await positionAdd(formData);
|
||||
message("操作成功");
|
||||
emit("update:visible", false);
|
||||
emit("success");
|
||||
};
|
||||
|
||||
const dialogClose = () => {
|
||||
emit("update:visible", false);
|
||||
};
|
||||
|
||||
const { isLock:subLoading,lockFn: submit } = useLockFn(handleSubmit);
|
||||
|
||||
|
||||
const setFormData = async () => {
|
||||
const data = await getPositionDetail(props.positionId);
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
const data = await getOperLogDetail(props.operlogId);
|
||||
formData.value = data
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
if (props.positionId) {
|
||||
if (props.operlogId) {
|
||||
setFormData();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.des-width) {
|
||||
width:120px;
|
||||
}
|
||||
:deep(.el-descriptions__body .el-descriptions__table .el-descriptions__cell) {
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
<editDialog
|
||||
v-if="editVisible"
|
||||
:positionId="positionId"
|
||||
:operlogId="operlogId"
|
||||
v-model:visible="editVisible"
|
||||
@success="reloadTable('noRefresh')"
|
||||
>
|
||||
@ -47,7 +47,7 @@
|
||||
const editDialog = defineAsyncComponent(() =>
|
||||
import('./operLog/edit.vue')
|
||||
)
|
||||
const positionId =ref(0)
|
||||
const operlogId =ref(0)
|
||||
const editVisible=ref(false)
|
||||
const selectionData = ref([])
|
||||
const tableRef = ref();
|
||||
@ -64,15 +64,12 @@ const editVisible=ref(false)
|
||||
return h(TableAction, {
|
||||
style: 'button',
|
||||
actions: [
|
||||
// {
|
||||
// label: '编辑',
|
||||
// type: 'warning',
|
||||
// onClick: handleEdit.bind(null, record),
|
||||
// ifShow: () => {
|
||||
// return true;
|
||||
// },
|
||||
// auth: ['basic_list'],
|
||||
// },
|
||||
{
|
||||
label: '详情',
|
||||
type: 'warning',
|
||||
onClick: handleInfo.bind(null, record),
|
||||
auth: ['sys:operlog:detail'],
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
type: 'danger',
|
||||
@ -112,8 +109,8 @@ const editVisible=ref(false)
|
||||
formParams[key] ='';
|
||||
}
|
||||
}
|
||||
const handleEdit = async (record: Recordable) => {
|
||||
positionId.value=record.row.id
|
||||
const handleInfo = async (record: Recordable) => {
|
||||
operlogId.value=record.row.id
|
||||
await nextTick();
|
||||
editVisible.value=true
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user