| | |
| | | url: 'User_logAction!analyzeData', |
| | | data: null |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 获取异常事件 |
| | | * @returns {AxiosPromise} |
| | | */ |
| | | unReadLog() { |
| | | return axios({ |
| | | method: 'post', |
| | | url: 'User_logAction!getUnread', |
| | | data: null |
| | | }); |
| | | }, |
| | | /** |
| | | * 标记已读 |
| | | * @param value |
| | | * @returns {AxiosPromise} |
| | | */ |
| | | setToRead(value) { |
| | | return axios({ |
| | | method: 'post', |
| | | url: 'User_logAction!setToRead', |
| | | data: 'json='+value |
| | | }); |
| | | } |
| | | } |
| | |
| | | logCap: { |
| | | label: "审计容量", |
| | | des: "显示审计容量的健康度", |
| | | value: false |
| | | value: true |
| | | } |
| | | }; |
| | |
| | | icon="el-icon-xinxi" |
| | | :state="logCountFlag" |
| | | :content="logCountMsg"></progress-state> |
| | | <progress-state |
| | | v-if="isAudit" |
| | | icon="el-icon-icon-sms" |
| | | :state="0" |
| | | content="异常通知" |
| | | :value="singularNum" |
| | | show-badge |
| | | @handleClick="showSingularDrawer"></progress-state> |
| | | </div> |
| | | <!-- <weather-component--> |
| | | <!-- v-if="weatherState"--> |
| | |
| | | > |
| | | <pifu-list></pifu-list> |
| | | </el-drawer> |
| | | <el-drawer |
| | | title="我是标题" |
| | | :visible.sync="showSingular" |
| | | size="640px" |
| | | :with-header="false"> |
| | | <singular-drawer v-if="showSingular"></singular-drawer> |
| | | </el-drawer> |
| | | <!-- 密码修改 --> |
| | | <el-dialog |
| | | title="密码修改" |
| | |
| | | import WeatherComponent from "@/components/weatherComponent"; |
| | | import BMapTools from "@/assets/js/tools/BMapTools"; |
| | | import getScreenUrl from "@/assets/js/tools/getScreenUrl"; |
| | | import SingularDrawer from "@/components/singularDrawer"; |
| | | |
| | | export default { |
| | | bMapTools: new BMapTools(BMap), |
| | | components: { |
| | | SingularDrawer, |
| | | WeatherComponent, |
| | | HdwBadgeBtn, |
| | | ProgressState, |
| | |
| | | }, |
| | | data() { |
| | | let platformName = sessionStorage.getItem("platformName"); |
| | | let userId = sessionStorage.getItem("userId"); |
| | | |
| | | return { |
| | | userId: userId, |
| | | alarmAlertStatus: false, |
| | | skinActive: "science-blue", |
| | | logoConfig: platform.logo, |
| | |
| | | city: "", |
| | | district: "", |
| | | }, |
| | | showSingular: false, |
| | | singularNum: 0, |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | } |
| | | this.timer2.start(()=>{ |
| | | this.$axios.all([ |
| | | this.logUseCount() |
| | | this.logUseCount(), |
| | | this.unReadLog(), |
| | | ]).then(res=>{ |
| | | this.timer2.open(); |
| | | }).catch(error=>{ |
| | |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | unReadLog(){ |
| | | if(this.isAudit) { |
| | | this.$apis.userMager.operationRecord.unReadLog().then(res=>{ |
| | | let rs = JSON.parse(res.data.result); |
| | | this.singularNum = rs.data.length; |
| | | }).catch(error => {}); |
| | | } |
| | | }, |
| | | startSearch() { |
| | | this.timer.start(() => { |
| | |
| | | this.$store.dispatch('user/changeRealTabsConfig', []); |
| | | }) |
| | | }, |
| | | showSingularDrawer() { |
| | | this.showSingular = true; |
| | | } |
| | | }, |
| | | computed: { |
| | | processAlarmMsg() { |
| | |
| | | } |
| | | return image; |
| | | }, |
| | | isAudit() { |
| | | let userId = this.userId; |
| | | if(userId == 2) { |
| | | return true; |
| | | }else { |
| | | return false; |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.skinActive = localStorage.getItem("activeSkin"); |
| | |
| | | <template> |
| | | <el-tooltip :class="stateName" effect="dark" :content="content" placement="bottom"> |
| | | <div class="statusWarp" @click="handleClick"> |
| | | <i class="iconfont" :class="icon"></i> |
| | | <el-badge :value="value" :max="99" class="item" v-if="showBadge"> |
| | | <i class="iconfont" :class="icon"></i> |
| | | </el-badge> |
| | | <i class="iconfont" :class="icon" v-else></i> |
| | | </div> |
| | | </el-tooltip> |
| | | </template> |
| | |
| | | content: { |
| | | type: String, |
| | | default: '未知' |
| | | } |
| | | }, |
| | | showBadge: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | value: { |
| | | type: [String, Number], |
| | | default: 0 |
| | | }, |
| | | }, |
| | | methods: { |
| | | handleClick() { |
| | | this.$emit('handleClick') |
| | | } |
| | | }, |
| | | methods: { |
| | | handleClick() { |
| | | this.$emit('handleClick') |
| | | } |
| | | }, |
| | | computed: { |
| | | stateName() { |
| | | let result = ''; |
| | |
| | | break; |
| | | } |
| | | return result; |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <flex-layout> |
| | | <el-table |
| | | stripe |
| | | size="small" |
| | | :data="list" |
| | | height="100%"> |
| | | <el-table-column |
| | | v-for="header in headers" |
| | | :key="header.prop" |
| | | :prop="header.prop" |
| | | :label="header.label" |
| | | :width="header.width" |
| | | :min-width="header.minWidth" |
| | | align="center" |
| | | show-overflow-tooltip |
| | | ></el-table-column> |
| | | </el-table> |
| | | </flex-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "singularDrawer", |
| | | data() { |
| | | return { |
| | | headers: [ |
| | | { |
| | | prop: "UName", |
| | | label: "异常来源", |
| | | width: 120, |
| | | }, |
| | | { |
| | | prop: "uOprateMsg", |
| | | label: "异常信息", |
| | | minWidth: 220, |
| | | }, |
| | | { |
| | | prop: "uOprateDay", |
| | | label: "异常日期", |
| | | width: 180, |
| | | }, |
| | | ], |
| | | list: [], |
| | | } |
| | | }, |
| | | methods: { |
| | | unReadLog(){ |
| | | let loading = this.$layer.loading(); |
| | | this.$apis.userMager.operationRecord.unReadLog().then(res=>{ |
| | | this.$layer.close(loading); |
| | | let rs = JSON.parse(res.data.result); |
| | | let data = []; |
| | | if(rs.code == 1) { |
| | | data = rs.data.map(item=>{ |
| | | return { |
| | | UName: item.uinf.UName, |
| | | uOprateMsg: item.ulog.uOprateMsg, |
| | | uOprateDay: item.ulog.uOprateDay |
| | | }; |
| | | }); |
| | | } |
| | | this.list = data; |
| | | }).catch(error => { |
| | | this.$layer.close(loading); |
| | | }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.unReadLog(); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | this.init(); |
| | | } |
| | | }); |
| | | console.log(AES.encrypt("123456")); |
| | | //console.log(AES.encrypt("123456")); |
| | | // console.log(encodeURIComponent("B17jjjYoBkbfZChw/fHzcA==")); |
| | | // console.log(decodeURIComponent("B17jjjYoBkbfZChw%2FfHzcA%3D%3D")) |
| | | console.log(AES.decrypt("AWylOpV7qDVaFsqLE/YXXg==")); |
| | | //console.log(AES.decrypt("AWylOpV7qDVaFsqLE/YXXg==")); |
| | | // console.log(md5("a123456")); |
| | | // console.log(JSON.stringify("5OUaEnC33sVNY+jeXlx3Qg==")); |
| | | }, |