| | |
| | | *ä¸å¡è¯·å¨@/extension/system/Sys_Log.jsæ¤å¤ç¼å |
| | | --> |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/system/Sys_Log.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "Id", |
| | | footer: "Foots", |
| | | cnName: "ç³»ç»æ¥å¿", |
| | | name: "Sys_Log", |
| | | url: "/Sys_Log/", |
| | | sortName: "Id", |
| | | }); |
| | | const editFormFields = ref({}); |
| | | const editFormOptions = ref([]); |
| | | const searchFormFields = ref({ |
| | | BeginDate: "", |
| | | Url: "", |
| | | LogType: [], |
| | | Success: [], |
| | | UserIP: "", |
| | | ServiceIP: "", |
| | | Role_Id: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "请æ±å°å", field: "url", type: "text" }, |
| | | { title: "ç¨æ·IP", field: "userIP", type: "text" }, |
| | | { title: "æå¡å¨IP", field: "serviceIP", type: "text" }, |
| | | ], |
| | | [ |
| | | { title: "å¼å§æ¶é´", field: "beginDate", type: "datetime" }, |
| | | // { |
| | | // dataKey: "restatus", |
| | | // data: [], |
| | | // title: "ååºç¶æ", |
| | | // field: "success", |
| | | // type: "selectList", |
| | | // }, |
| | | // { |
| | | // dataKey: "roles", |
| | | // data: [], |
| | | // title: "è§è²ID", |
| | | // field: "role_Id", |
| | | // type: "select", |
| | | // }, |
| | | ], |
| | | // [ |
| | | // { |
| | | // dataKey: "log", |
| | | // data: [], |
| | | // title: "æ¥å¿ç±»å", |
| | | // field: "logType", |
| | | // colSize: 12, |
| | | // type: "checkbox", |
| | | // }, |
| | | // ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "beginDate", |
| | | title: "å¼å§æ¶é´", |
| | | type: "datetime", |
| | | width: 140, |
| | | align: "left", |
| | | sortable: true, |
| | | }, |
| | | { |
| | | field: "userName", |
| | | title: "ç¨æ·åç§°", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "url", |
| | | title: "请æ±å°å", |
| | | type: "string", |
| | | width: 110, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "logType", |
| | | title: "æ¥å¿ç±»å", |
| | | type: "string", |
| | | bind: { key: "log", data: [] }, |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "success", |
| | | title: "ååºç¶æ", |
| | | type: "int", |
| | | bind: { key: "restatus", data: [] }, |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "elapsedTime", |
| | | title: "æ¶é¿", |
| | | type: "int", |
| | | width: 60, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "requestParam", |
| | | title: "请æ±åæ°", |
| | | type: "string", |
| | | width: 70, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "responseParam", |
| | | title: "ååºåæ°", |
| | | type: "string", |
| | | width: 70, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "exceptionInfo", |
| | | title: "å¼å¸¸ä¿¡æ¯", |
| | | type: "string", |
| | | width: 70, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "userIP", |
| | | title: "ç¨æ·IP", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "serviceIP", |
| | | title: "æå¡å¨IP", |
| | | type: "string", |
| | | width: 90, |
| | | hidden: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "browserType", |
| | | title: "æµè§å¨ç±»å", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "userId", |
| | | title: "ç¨æ·ID", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "roleId", |
| | | title: "è§è²ID", |
| | | type: "int", |
| | | bind: { key: "roles", data: [] }, |
| | | width: 90, |
| | | hidden: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "endDate", |
| | | title: "ç»ææ¶é´", |
| | | type: "datetime", |
| | | width: 150, |
| | | hidden: true, |
| | | align: "left", |
| | | sortable: true, |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | columns: [], |
| | | sortName: "", |
| | | key: "", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | import extend from "@/extension/system/Sys_Log.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "Id", |
| | | footer: "Foots", |
| | | cnName: "ç³»ç»æ¥å¿", |
| | | name: "Sys_Log", |
| | | url: "/Sys_Log/", |
| | | sortName: "Id", |
| | | }); |
| | | const editFormFields = ref({}); |
| | | const editFormOptions = ref([]); |
| | | const searchFormFields = ref({ |
| | | url: "", |
| | | requestParam: "", |
| | | responseParam: "", |
| | | beginDate: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "请æ±å°å", field: "url", type: "like" }, |
| | | { title: "请æ±åæ°", field: "requestParam", type: "like" }, |
| | | { title: "ååºåæ°", field: "responseParam", type: "like" }, |
| | | ], |
| | | [{ title: "å¼å§æ¶é´", field: "beginDate", type: "datetime" }], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "beginDate", |
| | | title: "å¼å§æ¶é´", |
| | | type: "datetime", |
| | | width: 140, |
| | | align: "left", |
| | | sortable: true, |
| | | }, |
| | | { |
| | | field: "elapsedTime", |
| | | title: "æ¶é¿", |
| | | type: "int", |
| | | width: 60, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "endDate", |
| | | title: "ç»ææ¶é´", |
| | | type: "datetime", |
| | | width: 150, |
| | | hidden: true, |
| | | align: "left", |
| | | sortable: true, |
| | | }, |
| | | { |
| | | field: "requestParam", |
| | | title: "请æ±åæ°", |
| | | type: "string", |
| | | width: 70, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "responseParam", |
| | | title: "ååºåæ°", |
| | | type: "string", |
| | | width: 70, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "url", |
| | | title: "请æ±å°å", |
| | | type: "string", |
| | | width: 110, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "userName", |
| | | title: "ç¨æ·åç§°", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "success", |
| | | title: "ååºç¶æ", |
| | | type: "int", |
| | | bind: { key: "restatus", data: [] }, |
| | | width: 80, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "userIP", |
| | | title: "ç¨æ·IP", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "userId", |
| | | title: "ç¨æ·ID", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | align: "left", |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | columns: [], |
| | | sortName: "", |
| | | key: "", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |