fix:系统迭代
This commit is contained in:
parent
46324a4522
commit
88ea26163d
|
|
@ -376,6 +376,7 @@ watch(
|
|||
form.value = props.form;
|
||||
form.value.time = [form.value.startTime, form.value.endTime];
|
||||
getCheckDangers(form.value.workId || uuid.value)
|
||||
getCompanyList(form.value.workId);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
@ -383,7 +384,7 @@ watch(
|
|||
() => props.readonly,
|
||||
(val) => {
|
||||
if (val) {
|
||||
getCompanyList(props.form.workId);
|
||||
// getCompanyList(props.form.workId);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -691,7 +691,7 @@ const clickRadio = () => {
|
|||
const getList = () => {
|
||||
workcurrentPage.value = 1;
|
||||
getWkInfoReceive();
|
||||
getWkInfoFinishStatistic();
|
||||
// getWkInfoFinishStatistic();
|
||||
};
|
||||
//工作完成统计
|
||||
const worktenementRef = ref();
|
||||
|
|
|
|||
|
|
@ -70,17 +70,17 @@
|
|||
<div class="label-select filter-tab">
|
||||
<label>开始时间</label>
|
||||
<el-date-picker v-model="search.startTime" type="date" placeholder="选择开始时间" format="YYYY/MM/DD"
|
||||
value-format="YYYY-MM-DD" @change="getList" />
|
||||
value-format="YYYY-MM-DD" @change="refresh" />
|
||||
</div>
|
||||
<div class="label-select filter-tab">
|
||||
<label>结束时间</label>
|
||||
<el-date-picker v-model="search.endTime" type="date" placeholder="选择结束时间" format="YYYY/MM/DD"
|
||||
value-format="YYYY-MM-DD" @change="getList" />
|
||||
value-format="YYYY-MM-DD" @change="refresh" />
|
||||
</div>
|
||||
<div class="label-select filter-tab">
|
||||
<label>地区</label>
|
||||
<el-cascader
|
||||
@change="getList"
|
||||
@change="refresh"
|
||||
ref="cascader"
|
||||
v-model="search.areaCode"
|
||||
placeholder="请选择地区"
|
||||
|
|
@ -237,6 +237,10 @@ const onclone = () => {
|
|||
form.value = {};
|
||||
getList();
|
||||
};
|
||||
const refresh = () => {
|
||||
getWkAllFinishStats();
|
||||
getList();
|
||||
}
|
||||
//获取列表
|
||||
const tableDataloading = ref(false);
|
||||
const getList = () => {
|
||||
|
|
@ -266,9 +270,13 @@ const workOptions = ref([]);
|
|||
const getWkAllFinishStats = () => {
|
||||
let params = {
|
||||
userId: userId.value,
|
||||
endTime: "",
|
||||
startTime: "",
|
||||
startTime: search.value.startTime,
|
||||
endTime: search.value.endTime,
|
||||
areaCode:'',
|
||||
};
|
||||
if (search.value.areaCode) {
|
||||
params.areaCode = search.value.areaCode[search.value.areaCode.length - 1];
|
||||
}
|
||||
wkAllFinishStats(params).then((res: any) => {
|
||||
workOptions.value = res.data;
|
||||
});
|
||||
|
|
|
|||
93
src/views/system/log/domicile-log/details.vue
Normal file
93
src/views/system/log/domicile-log/details.vue
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
|
||||
<template>
|
||||
<BaseDialog
|
||||
:dialogVisible="props.visible"
|
||||
@close="onclone"
|
||||
:titleName="'请求参数对比'"
|
||||
width="50%"
|
||||
:footerclosed="true"
|
||||
:diafooter="true"
|
||||
:footerkeepnaem="false"
|
||||
>
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
<th>属性/名称</th>
|
||||
<th>修改前</th>
|
||||
<th>修改后</th>
|
||||
</tr>
|
||||
<tr v-for="(value, key) in sortedEntries" :key="key">
|
||||
<td>{{ value[0] }}</td>
|
||||
<td>{{ value[1] || '-' }}</td>
|
||||
<td>{{ value[2] || '-' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</BaseDialog>
|
||||
</template>
|
||||
<script setup lang="ts" >
|
||||
import { reactive, ref, onMounted, watch } from "vue";
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
form: Object,
|
||||
});
|
||||
const sortedEntries = ref([])
|
||||
const sortedfunctions = (paramsAfter,paramsBefore) => {
|
||||
// 这里简单按key排序,你可以根据需要调整排序逻辑
|
||||
if(paramsBefore){
|
||||
let arr = Object.entries(paramsBefore).sort(([a], [b]) => a.localeCompare(b));
|
||||
let brr = Object.entries(paramsAfter).sort(([a], [b]) => a.localeCompare(b));
|
||||
for (let i = 0; i < brr.length; i++) {
|
||||
arr[i].push(brr[i][1])
|
||||
}
|
||||
sortedEntries.value = arr;
|
||||
}else {
|
||||
let brr = Object.entries(paramsAfter).sort(([a], [b]) => a.localeCompare(b));
|
||||
for (let i = 0; i < brr.length; i++) {
|
||||
console.log(brr[i],123)
|
||||
brr[i].splice(1, 0, '');
|
||||
}
|
||||
sortedEntries.value = brr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const emits = defineEmits(["close", "onSubmit"]);
|
||||
|
||||
//关闭弹窗
|
||||
const onclone = () => {
|
||||
emits("close");
|
||||
};
|
||||
onMounted(() => {
|
||||
});
|
||||
watch(
|
||||
() => props.form,
|
||||
(val:any) => {
|
||||
if (val.paramsBefore || val.paramsAfter) {
|
||||
let After = val.paramsAfter?JSON.parse(val.paramsAfter):null;
|
||||
let Before = val.paramsBefore?JSON.parse(val.paramsBefore):null;
|
||||
sortedfunctions(After,Before)
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
table {
|
||||
border-collapse: collapse; /* 合并边框 */
|
||||
width: 100%; /* 设置表格宽度 */
|
||||
background-color: #f2f2f2; /* 设置背景颜色 */
|
||||
th, td {
|
||||
border: 1px solid #ddd; /* 设置边框 */
|
||||
padding: 8px; /* 设置内边距 */
|
||||
text-align: center; /* 设置文本对齐方式 */
|
||||
}
|
||||
td {
|
||||
text-align: center; /* 设置文本对齐方式 */
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -72,13 +72,30 @@
|
|||
3 ? '删除' : scope.row.operationType == 4 ? '注销' : '恢复' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="url" :resizable="true" align="center" label="请求地址" width="200">
|
||||
</el-table-column>
|
||||
<el-table-column prop="params" :resizable="true" label="请求参数">
|
||||
<el-table-column prop="url" :resizable="true" align="center" label="请求地址">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="params" :resizable="true" label="请求参数">
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="createTime" :resizable="true" align="center" label="操作时间" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column :resizable="true" align="center" width="100" label="请求参数">
|
||||
<template #default="scope">
|
||||
<span class="operate" @click="
|
||||
(dialogVisible = true), (form = scope.row)"
|
||||
>
|
||||
<svg-icon name="detail" class="icon"></svg-icon>
|
||||
<span class="detail">详情</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 详情 -->
|
||||
<getdetails
|
||||
:visible="dialogVisible"
|
||||
:form="form"
|
||||
@close="onclone"
|
||||
>
|
||||
</getdetails>
|
||||
<!-- 分页 -->
|
||||
<el-pagination class="pagination" @size-change="getList" @current-change="getList"
|
||||
v-model:current-page.sync="currentPage" :page-sizes="[10, 15, 20, 30]" v-model:page-size.sync="pageSize"
|
||||
|
|
@ -93,6 +110,7 @@ import { onMounted, reactive, ref } from "vue";
|
|||
import { crLogPageList } from "@/api/Sys";
|
||||
import { areaTree } from "@/api/account";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
import getdetails from "./details.vue";
|
||||
const userStore = useUserStore();
|
||||
const user = ref(JSON.parse(userStore.userInfo));
|
||||
const userId = ref(user.value.userId);
|
||||
|
|
@ -103,6 +121,15 @@ const search = ref({
|
|||
endTime: '',
|
||||
areaCode:'',
|
||||
});
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
const form = ref({})
|
||||
const onclone = () => {
|
||||
dialogVisible.value = false;
|
||||
form.value = {};
|
||||
getList();
|
||||
}
|
||||
|
||||
const tableData = ref<any>([]);
|
||||
const currentPage = ref(1);
|
||||
const pageSize = ref(10);
|
||||
|
|
@ -122,6 +149,7 @@ const getList = () => {
|
|||
};
|
||||
crLogPageList(params).then((res: any) => {
|
||||
tableData.value = res.data.list;
|
||||
// tableData.value = [{},{}];
|
||||
total.value = res.data.total;
|
||||
tableDataloading.value = false;
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user