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

pref:修改应用

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