Commit 10f83942 authored by “yiyousong”'s avatar “yiyousong”

pref:修改应用

parent 3d6a38fa
<template>
<div>123456789</div>
<div>暂未开通</div>
</template>
<script>
......
......@@ -21,6 +21,7 @@
"highlight.js": "^11.5.1",
"js-export-excel": "^1.1.4",
"lodash": "^4.17.21",
"moment": "^2.29.4",
"qs": "^6.10.3",
"vue": "^2.6.14",
"vue-highlightjs": "^1.3.3",
......
import http from "../request/http";
// 查看操作日志列表
export function getOperLogList(params) {
return http.post("/zwfw/oper/log/list", params);
}
// 查看操作日志
export function getOperLogInfo(params) {
return http.get("/zwfw/oper/log/info", params);
}
......@@ -20,7 +20,9 @@ import * as directives from "@/directive";
Object.keys(directives).forEach((name) =>
Vue.directive(name, directives[name])
);
// moment 时间处理
import moment from "moment";
Vue.prototype.$moment = moment;
// 全局过滤器
import * as filters from "@/filters";
Object.keys(filters).forEach((key) => {
......
......@@ -120,7 +120,6 @@ export default {
this.searchVal = "";
},
handleDowload(url, systemServiceName) {
console.log(url);
const a = document.createElement("a");
a.href = url;
a.download = systemServiceName;
......
<template>
<div class="logService">
<div class="header_box">
<span>
<a-space>
<a-input v-model="searchName" placeholder="请输入内容关键之搜索">
<a-icon slot="prefix" type="search" />
</a-input>
<a-select default-value="001">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
>
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 产品001 </a-select-option>
<a-select-option value="002"> 产品002 </a-select-option>
</a-select>
<a-select default-value="001">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
>
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 日志来源001 </a-select-option>
<a-select-option value="002"> 日志来源002 </a-select-option>
</a-select>
<a-select default-value="001">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
>
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 状态001 </a-select-option>
<a-select-option value="002"> 状态002 </a-select-option>
</a-select>
<a-range-picker
format="YYYY年MM月DD日"
class="range_picker_style"
@change="rangePickerChange"
valueFormat="YYYY-MM-DD"
v-model="BegindAndEndTime"
>
</a-range-picker>
<button class="search_btn">搜索</button>
</span>
<a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="resetSearch">重置</a-button>
</a-space>
</div>
<div class="main">
<a-table
......@@ -59,12 +21,25 @@
bordered
:scroll="{ y: 590 }"
:row-key="(record) => record.id"
:pagination="tablePagination"
@change="pagTableChange"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: current,
total: total,
pageSize: size,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: changePagination,
onShowSizeChange: showSizeChange,
}"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<!-- 序号 -->
<span slot="num" slot-scope="text, record, index">{{
(current - 1) * size + index + 1
}}</span>
</a-table>
</div>
</div>
......@@ -73,107 +48,114 @@
<script>
import common from "@/mixins/common";
import menu from "@/mixins/menu";
import { getOperLogList } from "@/api/logs";
export default {
mixins: [common, menu],
name: "PortalAdminVueService",
data() {
return {
searchName: undefined,
selectVal: "001",
tableLoading: false,
BegindAndEndTime: [],
tableSourceData: [],
tableHeaders: [
{
width: "60px",
title: "序号",
dataIndex: "index",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
{
title: "时间",
align: "center",
dataIndex: "shijian",
},
{
title: "TraceID",
align: "center",
dataIndex: "TraceID",
},
{
title: "消息内容",
align: "center",
dataIndex: "xiaoxineirong",
},
{
title: "DeviceName",
align: "center",
dataIndex: "DeviceName",
const tableHeaders = [
{
width: "60px",
title: "序号",
align: "center",
scopedSlots: {
customRender: "num",
},
{
title: "业务类型",
align: "center",
dataIndex: "yewuleixing",
},
{
title: "时间",
align: "center",
// dataIndex: "logDate",
customRender: (text) => {
return text.logDate
? this.$moment(text.logDate).format("YYYY-MM-DD hh:mm:ss")
: "--";
},
{
title: "操作",
align: "center",
dataIndex: "caozuo",
},
{
title: "ip",
align: "center",
dataIndex: "ip",
},
{
title: "账号",
align: "center",
customRender: (text) => {
return text.loginName ? text.loginName : "--";
},
{
width: "230px",
title: "内容",
align: "center",
dataIndex: "neirong",
ellipsis: true,
},
{
title: "日志来源",
align: "center",
dataIndex: "rizhilaiyuan",
},
{
width: "100px",
title: "状态",
align: "center",
dataIndex: "zhuangtai",
// scopedSlots: { customRender: "loginName" },
},
{
title: "操作人",
align: "center",
// scopedSlots: { customRender: "userName" },
customRender: (text) => {
return text.userName ? text.userName : "--";
},
],
},
{
title: "平台",
align: "center",
dataIndex: "platformMark",
},
{
title: "内容",
align: "center",
dataIndex: "content",
},
];
return {
tableHeaders,
searchName: "",
tableLoading: false,
BegindAndEndTime: [],
tableSourceData: [],
pageSizeOptions: ["10", "30", "50", "100"],
current: 1,
size: 10,
total: 0,
dict: {}, // 日志字典
};
},
components: {},
mounted() {
for (let key = 0; key < 20; key++) {
this.tableSourceData.push({
id: `00${key + 1}`,
shijian: `2022-06-09 12:00:00`,
TraceID: `traceid 00${key + 1}`,
xiaoxineirong: `查询 00${key + 1}`,
DeviceName: `devicename 00${key + 1}`,
yewuleixing: `服务端订阅 00${key + 1}`,
caozuo: `AMQP 00${key + 1}`,
neirong: `{"Content":"Transmit to target 00${key + 1}`,
rizhilaiyuan: `设备本地 00${key + 1}`,
zhuangtai: `200 00${key + 1}`,
});
}
created() {
this.getOperLogList();
},
methods: {
rangePickerChange(val) {
console.log(val);
// 获取日志列表
async getOperLogList() {
this.tableLoading = true;
let res = await getOperLogList({
page: this.current,
size: this.size,
});
this.tableLoading = false;
this.dict = res.data.dict;
if (res.code === 1) {
let { result, total } = res.data;
this.tableSourceData = result;
this.total = total;
}
console.log(res);
},
changePagination(cur) {
this.current = cur;
this.getOperLogList();
},
showSizeChange(current, size) {
this.current = current;
this.size = size;
this.getOperLogList();
},
handleSearch() {
this.current = 1;
this.getOperLogList();
},
pagTableChange(pag, filters) {
// console.log(pag);
this.tablePagination = pag;
// this.$nextTick(() => {
// this.getMenuList();
// });
resetSearch() {
this.current = 1;
this.getOperLogList();
},
},
};
......
......@@ -320,9 +320,6 @@ export default {
this.compileInfoForm.imgPath = "";
}
},
onChange(val) {
console.log(val);
},
Modal_Ok() {
this.$refs.compileInfoForm.validate((valid) => {
......@@ -349,7 +346,6 @@ export default {
this.compileInfoForm.id && this.$delete(this.compileInfoForm, "id");
this.compileInfoForm.menuType = type;
this.compileInfoForm.parentId = parent;
console.log(this.compileInfoForm);
},
// 编辑
onEdit(row) {
......
......@@ -214,7 +214,6 @@ export default {
this.firstStair = data.filter((v) => v.parentId === -1);
let childrens = data.filter((v) => v.parentId !== -1);
this.menusTreeData = this.fliterEvent(this.firstStair, childrens);
console.log(this.MenuDict);
},
// 搜索
async searchData() {
......
......@@ -157,7 +157,6 @@ export default {
this.getRoleList();
},
pushRouter(row) {
console.log(row);
this.$router.push({
path: "/home/thePlatformIsSet/setMenuPerms",
query: { roleId: row.id, roleName: row.name },
......
......@@ -148,7 +148,6 @@ export default {
},
// 编辑
onEdit(row) {
console.log(row);
this.form = { ...row };
this.form.areaNames = JSON.parse(this.form.areaNames);
if (this.form.areaNames.length) {
......@@ -174,10 +173,6 @@ export default {
: (hash[next.areaCode] = true && item.push(next));
return item;
}, []);
console.log(
JSON.stringify(this.form.areaNames),
this.form.areaNames.map((v) => v.areaCode).join(",")
);
let res = await userSave({
...this.form,
areaNames: JSON.stringify(this.form.areaNames),
......
......@@ -126,9 +126,7 @@ export default {
if (this.formTitle == "编辑") {
submitObj["id"] = this.compileInfoForm["id"];
}
console.log(submitObj);
roleSave(submitObj).then((res) => {
console.log(res);
if (res.code == 1) {
this.$emit("getRoleList");
// this.$message.success(res.msg);
......
......@@ -184,10 +184,6 @@ export default {
onSubmit() {
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
console.log(
this.form.areaCodes.join(","),
JSON.stringify(this.changeSelect)
);
let res = await userSave({
...this.form,
areaCodes: this.form.areaCodes.join(","),
......
......@@ -4068,6 +4068,11 @@ moment@^2.21.0:
resolved "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz"
integrity sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw==
moment@^2.29.4:
version "2.29.4"
resolved "https://registry.npmmirror.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==
mrmime@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/mrmime/-/mrmime-1.0.0.tgz"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment