瀏覽代碼

平台管理+统计管理

ming 3 年之前
父節點
當前提交
e259a43321

+ 2 - 0
public/static/svgIcons/platManage.svg

@@ -0,0 +1,2 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1653875874167" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1789" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
+</style></defs><path d="M162.889143 102.838857h-4.973714c-42.422857 0-76.8 34.377143-76.8 76.8v628.150857c0 42.422857 34.377143 76.8 76.8 76.8h635.026285c42.422857 0 76.8-34.377143 76.8-76.8V179.638857c0-42.422857-34.377143-76.8-76.8-76.8h-8.850285V404.48c0 55.954286-45.348571 101.229714-101.229715 101.229714H264.118857c-55.954286 0-101.229714-45.348571-101.229714-101.229714V102.838857z m62.829714 0V404.48c0 21.211429 17.188571 38.4 38.4 38.4h418.742857c21.211429 0 38.4-17.188571 38.4-38.4V102.838857H225.718857zM157.915429 40.009143h635.026285c77.092571 0 139.629714 62.537143 139.629715 139.629714v628.150857a139.629714 139.629714 0 0 1-139.629715 139.629715H157.988571A139.629714 139.629714 0 0 1 18.285714 807.789714V179.638857c0-77.092571 62.464-139.629714 139.629715-139.629714z m420.278857 114.468571c19.236571 0 34.889143 15.579429 34.889143 34.889143V365.714286a34.889143 34.889143 0 1 1-69.778286 0V189.44c0-19.309714 15.579429-34.889143 34.889143-34.889143z" fill="#fff" p-id="1790"></path></svg>

+ 2 - 0
public/static/svgIcons/statisManage.svg

@@ -0,0 +1,2 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1653901021291" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1772" width="200" height="200" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
+</style></defs><path d="M163.914722 847.857281l0-69.354578c0-6.698562 5.489014-12.227486 12.227486-12.227486l671.715585 0c6.698562 0 12.226462 5.528923 12.226462 12.227486l0 69.354578c0 6.698562-5.5279 12.227486-12.226462 12.227486L176.141184 860.084767C169.402713 860.084767 163.914722 854.600869 163.914722 847.857281L163.914722 847.857281zM225.091036 394.954237l138.710178 0c6.739495 0 12.227486 5.483898 12.227486 12.227486L376.028701 719.714785c0 6.748704-5.487991 12.226462-12.227486 12.226462L225.091036 731.941248c-6.698562 0-12.227486-5.478781-12.227486-12.226462L212.863551 407.181723C212.863551 400.479067 218.352565 394.954237 225.091036 394.954237L225.091036 394.954237zM442.643887 295.185976 581.354066 295.185976c6.698562 0 12.227486 5.523807 12.227486 12.227486L593.581552 719.714785c0 6.748704-5.528923 12.226462-12.227486 12.226462L442.643887 731.941248c-6.738471 0-12.227486-5.478781-12.227486-12.226462L430.416402 307.413462C430.416402 300.710806 435.906439 295.185976 442.643887 295.185976L442.643887 295.185976zM660.197762 163.91421l138.710178 0c6.698562 0 12.227486 5.523807 12.227486 12.227486L811.135426 719.714785c0 6.748704-5.528923 12.226462-12.227486 12.226462L660.197762 731.941248c-6.698562 0-12.227486-5.478781-12.227486-12.226462L647.970276 176.141696C647.970276 169.398108 653.4992 163.91421 660.197762 163.91421z" p-id="1773" fill="#ffffff"></path></svg>

+ 67 - 0
src/api/platManage/index.js

@@ -0,0 +1,67 @@
+import request from '@/utils/request'
+
+//平台管理-列表查询
+export function getPlatformList(params) {
+    return request({
+        url: '/sysPlatform/getPlatformList',
+        method: 'GET',
+        params,
+    })
+}
+
+//树结构回显
+export function getPlatformMenu(params) {
+    return request({
+        url: '/sysPlatform/getPlatformMenu',
+        method: 'GET',
+        params,
+    })
+}
+
+//单位配置-注销
+export function plannedOutageDel(params) {
+    return request({
+        url: '/wcBlackoutPlan/plannedOutageDel',
+        method: 'GET',
+        params,
+    })
+}
+
+//单位配置-新增
+export function updatePlatformMenu(params) {
+    return request({
+        url: '/sysPlatform/updatePlatformMenu',
+        method: 'POST',
+        data: params,
+    })
+}
+
+//单位配置-系统平台下拉
+export function getPlatformBoxList(params) {
+    return request({
+        url: '/tenantConfig/getPlatformBoxList',
+        method: 'GET',
+        params,
+    })
+}
+
+
+
+//单位配置-修改
+export function updateTenantData(params) {
+    return request({
+        url: '/tenantConfig/updateTenantData',
+        method: 'POST',
+        data: params,
+    })
+}
+
+
+//单位配置-导出
+export function outagePlanListExport(params) {
+    return request({
+        url: 'wcBlackoutPlan/outagePlanListExport',
+        method: 'GET',
+        params,
+    })
+}

+ 2 - 0
src/icons/svgIcon/platManage.svg

@@ -0,0 +1,2 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1653875874167" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1789" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
+</style></defs><path d="M162.889143 102.838857h-4.973714c-42.422857 0-76.8 34.377143-76.8 76.8v628.150857c0 42.422857 34.377143 76.8 76.8 76.8h635.026285c42.422857 0 76.8-34.377143 76.8-76.8V179.638857c0-42.422857-34.377143-76.8-76.8-76.8h-8.850285V404.48c0 55.954286-45.348571 101.229714-101.229715 101.229714H264.118857c-55.954286 0-101.229714-45.348571-101.229714-101.229714V102.838857z m62.829714 0V404.48c0 21.211429 17.188571 38.4 38.4 38.4h418.742857c21.211429 0 38.4-17.188571 38.4-38.4V102.838857H225.718857zM157.915429 40.009143h635.026285c77.092571 0 139.629714 62.537143 139.629715 139.629714v628.150857a139.629714 139.629714 0 0 1-139.629715 139.629715H157.988571A139.629714 139.629714 0 0 1 18.285714 807.789714V179.638857c0-77.092571 62.464-139.629714 139.629715-139.629714z m420.278857 114.468571c19.236571 0 34.889143 15.579429 34.889143 34.889143V365.714286a34.889143 34.889143 0 1 1-69.778286 0V189.44c0-19.309714 15.579429-34.889143 34.889143-34.889143z" fill="#000000" p-id="1790"></path></svg>

+ 2 - 0
src/icons/svgIcon/statisManage.svg

@@ -0,0 +1,2 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1653901021291" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1772" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
+</style></defs><path d="M163.914722 847.857281l0-69.354578c0-6.698562 5.489014-12.227486 12.227486-12.227486l671.715585 0c6.698562 0 12.226462 5.528923 12.226462 12.227486l0 69.354578c0 6.698562-5.5279 12.227486-12.226462 12.227486L176.141184 860.084767C169.402713 860.084767 163.914722 854.600869 163.914722 847.857281L163.914722 847.857281zM225.091036 394.954237l138.710178 0c6.739495 0 12.227486 5.483898 12.227486 12.227486L376.028701 719.714785c0 6.748704-5.487991 12.226462-12.227486 12.226462L225.091036 731.941248c-6.698562 0-12.227486-5.478781-12.227486-12.226462L212.863551 407.181723C212.863551 400.479067 218.352565 394.954237 225.091036 394.954237L225.091036 394.954237zM442.643887 295.185976 581.354066 295.185976c6.698562 0 12.227486 5.523807 12.227486 12.227486L593.581552 719.714785c0 6.748704-5.528923 12.226462-12.227486 12.226462L442.643887 731.941248c-6.738471 0-12.227486-5.478781-12.227486-12.226462L430.416402 307.413462C430.416402 300.710806 435.906439 295.185976 442.643887 295.185976L442.643887 295.185976zM660.197762 163.91421l138.710178 0c6.698562 0 12.227486 5.523807 12.227486 12.227486L811.135426 719.714785c0 6.748704-5.528923 12.226462-12.227486 12.226462L660.197762 731.941248c-6.698562 0-12.227486-5.478781-12.227486-12.226462L647.970276 176.141696C647.970276 169.398108 653.4992 163.91421 660.197762 163.91421z" p-id="1773"></path></svg>

+ 1 - 1
src/store/index.js

@@ -162,7 +162,7 @@ export default createStore({
                         state.homeTitle = requset.data[0].middleTitle
                         state.largeScreenUrl = requset.data[0].largeScreenUrl
                         state.middleStatus = requset.data[0].middleStatus
-                        alert('中间页请求后' + state.middleStatus)
+                            // alert('中间页请求后' + state.middleStatus)
                     } else {
                         ElMessage.error(requset.msg)
                     }

+ 53 - 49
src/store/modules/routes.js

@@ -78,58 +78,62 @@ const actions = {
         //     }]
         // })
 
-        // data.push({
-        //     path: "/tenantManage",
-        //     hidden: false,
-        //     redirect: "/tenantManage/tenantUnit",
-        //     component: "Layout",
-        //     meta: {
-        //         title: "租户管理",
-        //         icon: "tenantManage",
 
-        //     },
-        //     children: [{
-        //         meta: {
-        //             title: "租户单位配置",
-        //             icon: "tenantManage",
 
-        //         },
-        //         path: "/tenantUnit",
-        //         hidden: false,
-        //         component: "@/views/tenantManage/tenantUnit",
-
-        //     }, {
-        //         meta: {
-        //             title: "管理员配置",
-        //             icon: "tenantManage",
-
-        //         },
-        //         path: "/adminConfig",
-        //         hidden: false,
-        //         component: "@/views/tenantManage/adminConfig",
 
-        //     }, {
-        //         meta: {
-        //             title: "系统配置",
-        //             icon: "tenantManage",
-
-        //         },
-        //         path: "/systemConfig",
-        //         hidden: false,
-        //         component: "@/views/tenantManage/systemConfig",
-
-        //     }, {
-        //         meta: {
-        //             title: "权限配置",
-        //             icon: "tenantManage",
-
-        //         },
-        //         path: "/authConfig",
-        //         hidden: false,
-        //         component: "@/views/tenantManage/authConfig",
-
-        //     }, ]
-        // })
+        data.push({
+            path: "/platManage",
+            hidden: false,
+            redirect: "/platManage/index",
+            component: "Layout",
+            meta: {
+                title: "平台管理",
+                icon: "platManage",
+
+            },
+            children: [{
+                meta: {
+                    title: "平台管理",
+                    icon: "platManage",
+
+                },
+                path: "/platManage",
+                hidden: false,
+                component: "@/views/platManage/index",
+
+            }, ]
+        }, {
+            path: "/statisManage",
+            hidden: false,
+            redirect: "/statisManage/loginLog",
+            component: "Layout",
+            meta: {
+                title: "统计管理",
+                icon: "statisManage",
+
+            },
+            children: [{
+                meta: {
+                    title: "登录日志",
+                    icon: "statisManage",
+
+                },
+                path: "/loginLog",
+                hidden: false,
+                component: "@/views/statisManage/loginLog",
+
+            }, {
+                meta: {
+                    title: "操作日志",
+                    icon: "statisManage",
+
+                },
+                path: "/operLog",
+                hidden: false,
+                component: "@/views/statisManage/operLog",
+
+            }]
+        })
 
 
 

+ 1 - 1
src/vab/plugins/permissions.js

@@ -67,7 +67,7 @@ router.beforeEach(async(to, from, next) => {
 
                     store.commit('getMiddleConfig')
 
-                    alert('判断是否显示中间页的middleStatus值' + store.state.middleStatus)
+                    // alert('判断是否显示中间页的middleStatus值' + store.state.middleStatus)
 
 
                     if (store.state.middleStatus == 1) {

+ 303 - 0
src/views/platManage/dialogComponent.vue

@@ -0,0 +1,303 @@
+<template>
+  <el-dialog
+    :title="dialogTitle"
+    v-model="showDialog"
+    @open="open()"
+    @close="closeDialog(0)"
+  >
+    <el-form
+      ref="formInfo"
+      :model="form"
+      class="demo-form-inline"
+      label-width="150px"
+      :rules="rules"
+    >
+      <el-form-item
+        label="平台名称:"
+        prop="platformName"
+        v-if="dialogTitle == '添加模板'"
+      >
+        <el-input v-model="form.platformName"></el-input>
+      </el-form-item>
+      <el-form-item label="" prop="aa">
+        <el-tree
+          v-if="data.length"
+          :data="data"
+          :props="defaultProps"
+          @node-click="handleNodeClick"
+          show-checkbox
+          node-key="id"
+          :default-expand-all="isExpand"
+          :default-checked-keys="checkedArr"
+          :check-strictly="isStrictly"
+          @check="currentChecked"
+        />
+      </el-form-item>
+
+      <br />
+
+      <div style="text-align: right">
+        <el-button @click="closeDialog(0)">取消</el-button>
+        <el-button type="primary" @click="submitForm()">保存</el-button>
+      </div>
+    </el-form>
+  </el-dialog>
+</template>
+<script>
+// 地图
+import AMap from 'AMap'
+import { useStore } from 'vuex'
+import { defineComponent, ref, watchEffect, onMounted } from 'vue'
+import * as api from '@/api/platManage/index.js'
+import { ElMessage } from 'element-plus'
+
+export default defineComponent({
+  name: 'DialogComponent',
+  emits: ['closeDialog'],
+  props: {
+    show_Dialog: Boolean,
+    dialogTitle: String,
+    itemInfo: {
+      type: Object,
+      default: function () {
+        return {}
+      },
+    },
+  },
+  setup(props, { emit }) {
+    const store = useStore()
+    const beginTime = ref('')
+    const showDialog = ref(false)
+    const form = ref({})
+    const formInfo = ref(null)
+    const nowDate = ref(new Date().getTime())
+
+    const data = ref([])
+    const checkedArr = ref([])
+    const getPlatformBoxList = ref([])
+
+    const roleValid = (rule, value, callback) => {
+      rule
+      if (value.length === 0) {
+        callback(new Error('角色不能为空'))
+      } else {
+        callback()
+      }
+    }
+
+    const disabledDate = (time) => {
+      return time.getTime() < Date.now()
+    }
+
+    const currentChecked = (nodeObj, SelectedObj) => {
+      nodeObj, SelectedObj
+       console.log('SelectedObj.checkedNodes')
+      console.log(SelectedObj.checkedNodes)
+      checkedArr.value = []
+ 
+
+      SelectedObj.checkedNodes.forEach((item) => {
+        checkedArr.value.push(item.id)
+      })
+      console.log(checkedArr.value)
+    }
+
+    //树结构回显
+    function getPlatformMenu() {
+      var platformId = ''
+      if (props.dialogTitle == '添加模板') {
+        platformId = 0
+      } else {
+        platformId = form.value.id
+      }
+
+      api
+        .getPlatformMenu({
+          platformId: platformId,
+        })
+        .then((requset) => {
+          if (requset.status === 'SUCCESS') {
+            console.log('requset.data111')
+            console.log(requset.data)
+            var jsona = JSON.stringify(requset.data.menus)
+            var jsonb = jsona.replace(/"menu"/g, '"label"')
+            jsonb = jsonb.replace(/"authority"/g, '"children"')
+            jsonb = jsonb.replace(/"name"/g, '"label"')
+            var jsonc = JSON.parse(jsonb)
+            data.value = jsonc
+            console.log('data.value')
+            console.log(data.value)
+
+            checkedArr.value = requset.data.checkedKeys
+            console.log('checkedArr.value')
+            console.log(checkedArr.value)
+          } else {
+            ElMessage.error(requset.msg)
+          }
+        })
+    }
+
+    // 保存操作
+    const submitForm = () => {
+      formInfo.value.validate((valid) => {
+        if (valid) {
+          var params = {}
+          if (props.dialogTitle == '添加模板') {
+            params = {
+              platformId: 0,
+              platformName: form.value.platformName,
+              menuIds: checkedArr.value,
+            }
+          } else {
+            params = {
+              platformId: form.value.id,
+              menuIds: checkedArr.value,
+            }
+          }
+          if (checkedArr.value.length) {
+            api.updatePlatformMenu(params).then((requset) => {
+              if (requset.status === 'SUCCESS') {
+                ElMessage.success({
+                  message: '新增成功',
+                  type: 'success',
+                })
+                closeDialog()
+              } else {
+                ElMessage.error(requset.msg)
+              }
+            })
+          }else{
+            ElMessage.warning('请至少选择一个权限保存')
+          }
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    }
+    const marker = ref([])
+
+    function initMap() {
+      // AMap start
+      var map = new AMap.Map('mapF', {
+        resizeEnable: true,
+      })
+      //为地图注册click事件获取鼠标点击出的经纬度坐标
+
+      var marker = new AMap.Marker({})
+      map.on('click', function (e) {
+        form.value.geoPosition = e.lnglat.getLng() + ',' + e.lnglat.getLat()
+
+        map.remove([marker])
+        marker = new AMap.Marker({
+          position: new AMap.LngLat(e.lnglat.getLng(), e.lnglat.getLat()), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+        })
+
+        map.add([marker])
+      })
+      // AMap end
+    }
+
+    const open = () => {
+      form.value = props.itemInfo
+      console.log('form.value')
+      console.log(form.value)
+
+      // optionselect()
+      getPlatformMenu()
+    }
+
+    // 关闭弹框
+    const closeDialog = (flag) => {
+      checkedArr.value = []
+      resetForm()
+      showDialog.value = false
+      emit('closeDialog', flag)
+    }
+
+    function resetForm() {
+      formInfo.value.resetFields()
+    }
+
+    watchEffect((fn, options) => {
+      fn, options
+      showDialog.value = props.show_Dialog
+    })
+
+    //禁止选择以前的时间
+    const pickerEndDate = (time) => {
+      const timeRange = 1 * 24 * 60 * 60 * 1000
+      return time.getTime() <= Date.now() - timeRange * 1
+    }
+
+    onMounted(() => {})
+
+    return {
+      pickerEndDate,
+      roleValid,
+      submitForm,
+      closeDialog,
+      open,
+
+      data,
+
+      getPlatformMenu,
+
+      // map123,
+      store,
+      beginTime,
+      showDialog,
+      checkedArr,
+
+      initMap,
+      nowDate,
+      disabledDate,
+      marker,
+
+      checked: true,
+      form,
+      formInfo,
+      getPlatformBoxList,
+      currentChecked,
+
+      rules: {
+        platformName: [
+          { required: true, message: '请输入平台名称', trigger: 'blur' },
+          {
+            min: 1,
+            max: 30,
+            message: '长度在 1 到 30个字符',
+            trigger: 'blur',
+          },
+        ],
+        
+      },
+    }
+  },
+})
+</script>
+ 
+<style scoped lang="scss">
+.el-input,
+.el-select,
+.el-date-editor.el-input,
+.el-date-editor.el-input__inner {
+  width: 240px;
+}
+
+.el-form-item {
+  margin: 0 0 20px !important;
+}
+// label样式
+.el-form-item__label {
+  width: 120px !important;
+}
+.el-form-item__content {
+  margin-left: 100px;
+}
+.demo-form-inline .el-form-item:not(.user-layout .el-form-item) {
+  margin: 0 auto 20px 55px;
+}
+</style>
+<style>
+</style>

+ 358 - 0
src/views/platManage/index.vue

@@ -0,0 +1,358 @@
+<template>
+  <div class="app-container">
+    <!-- 筛选start -->
+    <div class="filter-container mb-10">
+      <div class="left">
+        <div>
+          <a class="" style="margin-right: 30px">平台管理列表</a>
+          <el-button
+            icon="el-icon-plus"
+            type="success"
+            @click="addItem()"
+          >
+           添加模板
+          </el-button>
+        </div>
+      </div>
+    </div>
+
+    <div class="filter-container mb-10">
+      <div style="margin-top: 20px">
+        <div class="filter-item">
+          平台名称:
+          <el-input
+            v-model="platformName"
+            placeholder="请输入内容"
+            style="width: 150px"
+          ></el-input>
+        </div>
+       
+
+        <div class="filter-item planOutage">
+          选择时间范围:
+          <el-date-picker
+            v-model="dateTime"
+            type="datetimerange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            style="width: auto"
+          ></el-date-picker>
+        </div>
+
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          @click="Select()"
+          class="search-button"
+        >
+          查询
+        </el-button>
+      </div>
+    </div>
+
+    <!-- 筛选end -->
+
+    <!-- 表格start -->
+    <el-table
+      :data="tableData"
+      border
+      stripe
+      :header-cell-style="headClass"
+      :cell-style="cellStyle"
+    >
+      <el-table-column type="index" label="序号" width="50px"></el-table-column>
+      <el-table-column
+        prop="platformName"
+        label="平台名称"
+      ></el-table-column>
+      <el-table-column
+        prop="tenantCount"
+        label="在用租户数"
+      ></el-table-column>
+      <el-table-column
+        prop="createTime"
+        label="创建时间"
+      ></el-table-column>
+     
+
+  
+      <el-table-column fixed="right" label="操作" width="80">
+        <template #default="scope">
+          <el-button
+            type="text"
+            size="small"
+            @click.prevent="editRow(scope.row)"
+          >
+            编辑
+          </el-button>
+          
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 表格end -->
+
+    <!-- 分页start -->
+    <div class="paginationBlock">
+      <el-pagination
+        v-model:currentPage="page"
+        :page-sizes="[15, 20, 25, 30]"
+        :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        background
+      ></el-pagination>
+    </div>
+
+    <!-- 分页end -->
+
+    <!--弹框组件开始-----------------------start-->
+    <dialog-component
+      :dialog-title="dialogTitle"
+      :item-info="tableItem"
+      @closeDialog="closeDialog"
+      :show_Dialog="showDialog"
+    ></dialog-component>
+    <!--弹框组件开始-----------------------end-->
+  </div>
+</template>
+
+<script>
+import { useStore } from 'vuex'
+import { defineComponent, onMounted, ref } from 'vue'
+import DialogComponent from './dialogComponent'
+import * as api from '@/api/platManage/index.js'
+import { ElMessage } from 'element-plus'
+
+export default defineComponent({
+  name: 'VariableList',
+
+  components: { DialogComponent },
+  setup() {
+    const store = useStore()
+
+    const tableItem = ref()
+    const dialogTitle = ref('')
+    const showDialog = ref(false)
+
+    const tableData = ref()
+    const currentPage = ref(1)
+    const pageSize = ref(15)
+    const total = ref(0)
+
+    const status = ref(0)
+    const createTime = ref('')
+    const platformName = ref('')
+    const tenantCount = ref('')
+
+    const dateTime = ref('')
+    const select = ref(1)
+
+    const input = ref('')
+    const region = ref()
+
+    // 添加操作
+    const addItem = () => {
+      tableItem.value = {
+        platformName: '',
+        tenantCount: '',
+        tenantTerm: 3,
+        geoPosition: '',
+        createTime: '',
+        phoneNumber: '',
+        systemName: '',
+        email: '',
+        address: '',
+        status:0,
+        domain:''
+      }
+      dialogTitle.value = '添加模板'
+      showDialog.value = true
+    }
+    // 编辑操作
+    const editRow = (row) => {
+      console.log(row)
+      tableItem.value = {
+        id:row.id,
+        platformName: row.platformName,
+        tenantCount: row.tenantCount,
+        tenantTerm: row.tenantTerm=='永久有效'?3:4,
+        value1:row.tenantTerm,
+        status: Number(row.status),
+        geoPosition: row.geoPosition,
+        createTime: Number(row.createTime),
+        phoneNumber: row.phoneNumber,
+        systemName: Number(row.systemName),
+        email: row.email,
+        address: row.address,
+        remark:row.remark,
+        domain:row.domain
+      }
+      dialogTitle.value = '编辑'
+      showDialog.value = true
+    }
+
+    // 关闭操作
+    const closeDialog = (flag) => {
+      if (flag) {
+        // 重新刷新表格内容
+        // this.fetchData()
+        console.log(1)
+      }
+      showDialog.value = false
+      Select()
+    }
+
+    //删除 是否删除  ---- 是
+    const handleDelete = (row) => {
+      api.plannedOutageDel({ id: row.id }).then((requset) => {
+        if (requset.status === 'SUCCESS') {
+          ElMessage.success({
+            message: '删除成功',
+            type: 'success',
+          })
+          Select()
+        } else {
+          ElMessage.error(requset.msg)
+        }
+      })
+    }
+    //是否删除  ---- 否
+    const cancelEvent = () => {
+      console.log('cancel!')
+    }
+
+    //查询列表
+    function Select() {
+      store.commit('TimeAll_function', dateTime.value)
+      const time = store.state.Time_Data
+      api
+        .getPlatformList({
+          size: pageSize.value,
+          page: currentPage.value,
+          startTime: time[0] ? time[0] : '',
+          endTime: time[1] ? time[1] : '',
+          // status: status.value,
+          // createTime: createTime.value,
+          platformName: platformName.value,
+          // tenantCount: tenantCount.value,
+        })
+        .then((requset) => {
+          if (requset.status === 'SUCCESS') {
+            tableData.value = requset.data.records.map((val) => {
+              store.commit('getTimestampAll', val.startTime)
+              val.startTime = store.state.timeProcessing
+              store.commit('getTimestampAll', val.endTime)
+              val.endTime = store.state.timeProcessing
+              store.commit('getTimestampAll', val.createTime)
+              val.createTime = store.state.timeProcessing
+            })
+            tableData.value = requset.data.records
+            total.value = requset.data.total
+          } else {
+            ElMessage.error(requset.msg)
+          }
+        })
+    }
+
+    onMounted(() => {
+      Select()
+    })
+
+    const handleSizeChange = (val) => {
+      pageSize.value = val
+      Select()
+    }
+    const handleCurrentChange = (val) => {
+      currentPage.value = val
+      Select()
+    }
+    // 表头样式设置
+    const goVariableList = () => {
+      // 跳转至订单列表页面传参
+      this.$router.push({
+        path: '../siteManage/variableList/index.vue',
+      })
+      // this.$router.push({ name:'variableList'})
+    }
+    const headClass = () => {
+      return 'background:#FAFAFA;'
+    }
+    //处理状态状态值变色
+    const cellStyle = ({ row, column, rowIndex, columnIndex }) => {
+      row, column, rowIndex
+      // console.log(row, column, rowIndex)
+
+      if (columnIndex) {
+        // return `text-align:left;cursor:pointer;`
+      } else {
+        return ''
+      }
+    }
+
+    //导出
+    const DataReportExport = () => {
+      store.commit('TimeAll_function', dateTime.value)
+      const time = store.state.Time_Data
+      api
+        .outagePlanListExport({
+          type: region.value,
+          startTime: time[0] ? time[0] : '',
+          endTime: time[1] ? time[1] : '',
+        })
+        .then((requset) => {
+          if (requset.status === 'SUCCESS') {
+            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            ElMessage.success({
+              message: '导出成功',
+              type: 'success',
+            })
+          } else {
+            ElMessage.error(requset.msg)
+          }
+        })
+    }
+    return {
+      cellStyle,
+      headClass,
+      goVariableList,
+
+      handleDelete,
+      cancelEvent,
+      closeDialog,
+      editRow,
+      addItem,
+      Select,
+
+      store,
+
+      total,
+      pageSize,
+      currentPage,
+      handleSizeChange,
+      handleCurrentChange,
+
+      createTime,
+      tableData,
+      platformName,
+      tenantCount,
+      status,
+
+      showDialog,
+      select,
+      dateTime,
+      tableItem,
+      dialogTitle,
+      input,
+      region,
+
+      DataReportExport,
+    }
+  },
+})
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 303 - 0
src/views/statisManage/loginLog/dialogComponent.vue

@@ -0,0 +1,303 @@
+<template>
+  <el-dialog
+    :title="dialogTitle"
+    v-model="showDialog"
+    @open="open()"
+    @close="closeDialog(0)"
+  >
+    <el-form
+      ref="formInfo"
+      :model="form"
+      class="demo-form-inline"
+      label-width="150px"
+      :rules="rules"
+    >
+      <el-form-item
+        label="平台名称:"
+        prop="platformName"
+        v-if="dialogTitle == '添加模板'"
+      >
+        <el-input v-model="form.platformName"></el-input>
+      </el-form-item>
+      <el-form-item label="" prop="aa">
+        <el-tree
+          v-if="data.length"
+          :data="data"
+          :props="defaultProps"
+          @node-click="handleNodeClick"
+          show-checkbox
+          node-key="id"
+          :default-expand-all="isExpand"
+          :default-checked-keys="checkedArr"
+          :check-strictly="isStrictly"
+          @check="currentChecked"
+        />
+      </el-form-item>
+
+      <br />
+
+      <div style="text-align: right">
+        <el-button @click="closeDialog(0)">取消</el-button>
+        <el-button type="primary" @click="submitForm()">保存</el-button>
+      </div>
+    </el-form>
+  </el-dialog>
+</template>
+<script>
+// 地图
+import AMap from 'AMap'
+import { useStore } from 'vuex'
+import { defineComponent, ref, watchEffect, onMounted } from 'vue'
+import * as api from '@/api/platManage/index.js'
+import { ElMessage } from 'element-plus'
+
+export default defineComponent({
+  name: 'DialogComponent',
+  emits: ['closeDialog'],
+  props: {
+    show_Dialog: Boolean,
+    dialogTitle: String,
+    itemInfo: {
+      type: Object,
+      default: function () {
+        return {}
+      },
+    },
+  },
+  setup(props, { emit }) {
+    const store = useStore()
+    const beginTime = ref('')
+    const showDialog = ref(false)
+    const form = ref({})
+    const formInfo = ref(null)
+    const nowDate = ref(new Date().getTime())
+
+    const data = ref([])
+    const checkedArr = ref([])
+    const getPlatformBoxList = ref([])
+
+    const roleValid = (rule, value, callback) => {
+      rule
+      if (value.length === 0) {
+        callback(new Error('角色不能为空'))
+      } else {
+        callback()
+      }
+    }
+
+    const disabledDate = (time) => {
+      return time.getTime() < Date.now()
+    }
+
+    const currentChecked = (nodeObj, SelectedObj) => {
+      nodeObj, SelectedObj
+       console.log('SelectedObj.checkedNodes')
+      console.log(SelectedObj.checkedNodes)
+      checkedArr.value = []
+ 
+
+      SelectedObj.checkedNodes.forEach((item) => {
+        checkedArr.value.push(item.id)
+      })
+      console.log(checkedArr.value)
+    }
+
+    //树结构回显
+    function getPlatformMenu() {
+      var platformId = ''
+      if (props.dialogTitle == '添加模板') {
+        platformId = 0
+      } else {
+        platformId = form.value.id
+      }
+
+      api
+        .getPlatformMenu({
+          platformId: platformId,
+        })
+        .then((requset) => {
+          if (requset.status === 'SUCCESS') {
+            console.log('requset.data111')
+            console.log(requset.data)
+            var jsona = JSON.stringify(requset.data.menus)
+            var jsonb = jsona.replace(/"menu"/g, '"label"')
+            jsonb = jsonb.replace(/"authority"/g, '"children"')
+            jsonb = jsonb.replace(/"name"/g, '"label"')
+            var jsonc = JSON.parse(jsonb)
+            data.value = jsonc
+            console.log('data.value')
+            console.log(data.value)
+
+            checkedArr.value = requset.data.checkedKeys
+            console.log('checkedArr.value')
+            console.log(checkedArr.value)
+          } else {
+            ElMessage.error(requset.msg)
+          }
+        })
+    }
+
+    // 保存操作
+    const submitForm = () => {
+      formInfo.value.validate((valid) => {
+        if (valid) {
+          var params = {}
+          if (props.dialogTitle == '添加模板') {
+            params = {
+              platformId: 0,
+              platformName: form.value.platformName,
+              menuIds: checkedArr.value,
+            }
+          } else {
+            params = {
+              platformId: form.value.id,
+              menuIds: checkedArr.value,
+            }
+          }
+          if (checkedArr.value.length) {
+            api.updatePlatformMenu(params).then((requset) => {
+              if (requset.status === 'SUCCESS') {
+                ElMessage.success({
+                  message: '新增成功',
+                  type: 'success',
+                })
+                closeDialog()
+              } else {
+                ElMessage.error(requset.msg)
+              }
+            })
+          }else{
+            ElMessage.warning('请至少选择一个权限保存')
+          }
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    }
+    const marker = ref([])
+
+    function initMap() {
+      // AMap start
+      var map = new AMap.Map('mapF', {
+        resizeEnable: true,
+      })
+      //为地图注册click事件获取鼠标点击出的经纬度坐标
+
+      var marker = new AMap.Marker({})
+      map.on('click', function (e) {
+        form.value.geoPosition = e.lnglat.getLng() + ',' + e.lnglat.getLat()
+
+        map.remove([marker])
+        marker = new AMap.Marker({
+          position: new AMap.LngLat(e.lnglat.getLng(), e.lnglat.getLat()), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+        })
+
+        map.add([marker])
+      })
+      // AMap end
+    }
+
+    const open = () => {
+      form.value = props.itemInfo
+      console.log('form.value')
+      console.log(form.value)
+
+      // optionselect()
+      getPlatformMenu()
+    }
+
+    // 关闭弹框
+    const closeDialog = (flag) => {
+      checkedArr.value = []
+      resetForm()
+      showDialog.value = false
+      emit('closeDialog', flag)
+    }
+
+    function resetForm() {
+      formInfo.value.resetFields()
+    }
+
+    watchEffect((fn, options) => {
+      fn, options
+      showDialog.value = props.show_Dialog
+    })
+
+    //禁止选择以前的时间
+    const pickerEndDate = (time) => {
+      const timeRange = 1 * 24 * 60 * 60 * 1000
+      return time.getTime() <= Date.now() - timeRange * 1
+    }
+
+    onMounted(() => {})
+
+    return {
+      pickerEndDate,
+      roleValid,
+      submitForm,
+      closeDialog,
+      open,
+
+      data,
+
+      getPlatformMenu,
+
+      // map123,
+      store,
+      beginTime,
+      showDialog,
+      checkedArr,
+
+      initMap,
+      nowDate,
+      disabledDate,
+      marker,
+
+      checked: true,
+      form,
+      formInfo,
+      getPlatformBoxList,
+      currentChecked,
+
+      rules: {
+        platformName: [
+          { required: true, message: '请输入平台名称', trigger: 'blur' },
+          {
+            min: 1,
+            max: 30,
+            message: '长度在 1 到 30个字符',
+            trigger: 'blur',
+          },
+        ],
+        
+      },
+    }
+  },
+})
+</script>
+ 
+<style scoped lang="scss">
+.el-input,
+.el-select,
+.el-date-editor.el-input,
+.el-date-editor.el-input__inner {
+  width: 240px;
+}
+
+.el-form-item {
+  margin: 0 0 20px !important;
+}
+// label样式
+.el-form-item__label {
+  width: 120px !important;
+}
+.el-form-item__content {
+  margin-left: 100px;
+}
+.demo-form-inline .el-form-item:not(.user-layout .el-form-item) {
+  margin: 0 auto 20px 55px;
+}
+</style>
+<style>
+</style>

+ 358 - 0
src/views/statisManage/loginLog/index.vue

@@ -0,0 +1,358 @@
+<template>
+  <div class="app-container">
+    <!-- 筛选start -->
+    <div class="filter-container mb-10">
+      <div class="left">
+        <div>
+          <a class="" style="margin-right: 30px">登录日志列表待排版</a>
+          <!-- <el-button
+            icon="el-icon-plus"
+            type="success"
+            @click="addItem()"
+          >
+           添加模板
+          </el-button> -->
+        </div>
+      </div>
+    </div>
+
+    <div class="filter-container mb-10">
+      <div style="margin-top: 20px">
+        <div class="filter-item">
+          平台名称:
+          <el-input
+            v-model="platformName"
+            placeholder="请输入内容"
+            style="width: 150px"
+          ></el-input>
+        </div>
+       
+
+        <div class="filter-item planOutage">
+          选择时间范围:
+          <el-date-picker
+            v-model="dateTime"
+            type="datetimerange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            style="width: auto"
+          ></el-date-picker>
+        </div>
+
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          @click="Select()"
+          class="search-button"
+        >
+          查询
+        </el-button>
+      </div>
+    </div>
+
+    <!-- 筛选end -->
+
+    <!-- 表格start -->
+    <el-table
+      :data="tableData"
+      border
+      stripe
+      :header-cell-style="headClass"
+      :cell-style="cellStyle"
+    >
+      <el-table-column type="index" label="序号" width="50px"></el-table-column>
+      <el-table-column
+        prop="platformName"
+        label="平台名称"
+      ></el-table-column>
+      <el-table-column
+        prop="tenantCount"
+        label="在用租户数"
+      ></el-table-column>
+      <el-table-column
+        prop="createTime"
+        label="创建时间"
+      ></el-table-column>
+     
+
+  
+      <el-table-column fixed="right" label="操作" width="80">
+        <template #default="scope">
+          <el-button
+            type="text"
+            size="small"
+            @click.prevent="editRow(scope.row)"
+          >
+            编辑
+          </el-button>
+          
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 表格end -->
+
+    <!-- 分页start -->
+    <div class="paginationBlock">
+      <el-pagination
+        v-model:currentPage="page"
+        :page-sizes="[15, 20, 25, 30]"
+        :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        background
+      ></el-pagination>
+    </div>
+
+    <!-- 分页end -->
+
+    <!--弹框组件开始-----------------------start-->
+    <dialog-component
+      :dialog-title="dialogTitle"
+      :item-info="tableItem"
+      @closeDialog="closeDialog"
+      :show_Dialog="showDialog"
+    ></dialog-component>
+    <!--弹框组件开始-----------------------end-->
+  </div>
+</template>
+
+<script>
+import { useStore } from 'vuex'
+import { defineComponent, onMounted, ref } from 'vue'
+import DialogComponent from './dialogComponent'
+import * as api from '@/api/platManage/index.js'
+import { ElMessage } from 'element-plus'
+
+export default defineComponent({
+  name: 'VariableList',
+
+  components: { DialogComponent },
+  setup() {
+    const store = useStore()
+
+    const tableItem = ref()
+    const dialogTitle = ref('')
+    const showDialog = ref(false)
+
+    const tableData = ref()
+    const currentPage = ref(1)
+    const pageSize = ref(15)
+    const total = ref(0)
+
+    const status = ref(0)
+    const createTime = ref('')
+    const platformName = ref('')
+    const tenantCount = ref('')
+
+    const dateTime = ref('')
+    const select = ref(1)
+
+    const input = ref('')
+    const region = ref()
+
+    // 添加操作
+    const addItem = () => {
+      tableItem.value = {
+        platformName: '',
+        tenantCount: '',
+        tenantTerm: 3,
+        geoPosition: '',
+        createTime: '',
+        phoneNumber: '',
+        systemName: '',
+        email: '',
+        address: '',
+        status:0,
+        domain:''
+      }
+      dialogTitle.value = '添加模板'
+      showDialog.value = true
+    }
+    // 编辑操作
+    const editRow = (row) => {
+      console.log(row)
+      tableItem.value = {
+        id:row.id,
+        platformName: row.platformName,
+        tenantCount: row.tenantCount,
+        tenantTerm: row.tenantTerm=='永久有效'?3:4,
+        value1:row.tenantTerm,
+        status: Number(row.status),
+        geoPosition: row.geoPosition,
+        createTime: Number(row.createTime),
+        phoneNumber: row.phoneNumber,
+        systemName: Number(row.systemName),
+        email: row.email,
+        address: row.address,
+        remark:row.remark,
+        domain:row.domain
+      }
+      dialogTitle.value = '编辑'
+      showDialog.value = true
+    }
+
+    // 关闭操作
+    const closeDialog = (flag) => {
+      if (flag) {
+        // 重新刷新表格内容
+        // this.fetchData()
+        console.log(1)
+      }
+      showDialog.value = false
+      Select()
+    }
+
+    //删除 是否删除  ---- 是
+    const handleDelete = (row) => {
+      api.plannedOutageDel({ id: row.id }).then((requset) => {
+        if (requset.status === 'SUCCESS') {
+          ElMessage.success({
+            message: '删除成功',
+            type: 'success',
+          })
+          Select()
+        } else {
+          ElMessage.error(requset.msg)
+        }
+      })
+    }
+    //是否删除  ---- 否
+    const cancelEvent = () => {
+      console.log('cancel!')
+    }
+
+    //查询列表
+    function Select() {
+      store.commit('TimeAll_function', dateTime.value)
+      const time = store.state.Time_Data
+      api
+        .getPlatformList({
+          size: pageSize.value,
+          page: currentPage.value,
+          startTime: time[0] ? time[0] : '',
+          endTime: time[1] ? time[1] : '',
+          // status: status.value,
+          // createTime: createTime.value,
+          platformName: platformName.value,
+          // tenantCount: tenantCount.value,
+        })
+        .then((requset) => {
+          if (requset.status === 'SUCCESS') {
+            tableData.value = requset.data.records.map((val) => {
+              store.commit('getTimestampAll', val.startTime)
+              val.startTime = store.state.timeProcessing
+              store.commit('getTimestampAll', val.endTime)
+              val.endTime = store.state.timeProcessing
+              store.commit('getTimestampAll', val.createTime)
+              val.createTime = store.state.timeProcessing
+            })
+            tableData.value = requset.data.records
+            total.value = requset.data.total
+          } else {
+            ElMessage.error(requset.msg)
+          }
+        })
+    }
+
+    onMounted(() => {
+      Select()
+    })
+
+    const handleSizeChange = (val) => {
+      pageSize.value = val
+      Select()
+    }
+    const handleCurrentChange = (val) => {
+      currentPage.value = val
+      Select()
+    }
+    // 表头样式设置
+    const goVariableList = () => {
+      // 跳转至订单列表页面传参
+      this.$router.push({
+        path: '../siteManage/variableList/index.vue',
+      })
+      // this.$router.push({ name:'variableList'})
+    }
+    const headClass = () => {
+      return 'background:#FAFAFA;'
+    }
+    //处理状态状态值变色
+    const cellStyle = ({ row, column, rowIndex, columnIndex }) => {
+      row, column, rowIndex
+      // console.log(row, column, rowIndex)
+
+      if (columnIndex) {
+        // return `text-align:left;cursor:pointer;`
+      } else {
+        return ''
+      }
+    }
+
+    //导出
+    const DataReportExport = () => {
+      store.commit('TimeAll_function', dateTime.value)
+      const time = store.state.Time_Data
+      api
+        .outagePlanListExport({
+          type: region.value,
+          startTime: time[0] ? time[0] : '',
+          endTime: time[1] ? time[1] : '',
+        })
+        .then((requset) => {
+          if (requset.status === 'SUCCESS') {
+            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            ElMessage.success({
+              message: '导出成功',
+              type: 'success',
+            })
+          } else {
+            ElMessage.error(requset.msg)
+          }
+        })
+    }
+    return {
+      cellStyle,
+      headClass,
+      goVariableList,
+
+      handleDelete,
+      cancelEvent,
+      closeDialog,
+      editRow,
+      addItem,
+      Select,
+
+      store,
+
+      total,
+      pageSize,
+      currentPage,
+      handleSizeChange,
+      handleCurrentChange,
+
+      createTime,
+      tableData,
+      platformName,
+      tenantCount,
+      status,
+
+      showDialog,
+      select,
+      dateTime,
+      tableItem,
+      dialogTitle,
+      input,
+      region,
+
+      DataReportExport,
+    }
+  },
+})
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 303 - 0
src/views/statisManage/operLog/dialogComponent.vue

@@ -0,0 +1,303 @@
+<template>
+  <el-dialog
+    :title="dialogTitle"
+    v-model="showDialog"
+    @open="open()"
+    @close="closeDialog(0)"
+  >
+    <el-form
+      ref="formInfo"
+      :model="form"
+      class="demo-form-inline"
+      label-width="150px"
+      :rules="rules"
+    >
+      <el-form-item
+        label="平台名称:"
+        prop="platformName"
+        v-if="dialogTitle == '添加模板'"
+      >
+        <el-input v-model="form.platformName"></el-input>
+      </el-form-item>
+      <el-form-item label="" prop="aa">
+        <el-tree
+          v-if="data.length"
+          :data="data"
+          :props="defaultProps"
+          @node-click="handleNodeClick"
+          show-checkbox
+          node-key="id"
+          :default-expand-all="isExpand"
+          :default-checked-keys="checkedArr"
+          :check-strictly="isStrictly"
+          @check="currentChecked"
+        />
+      </el-form-item>
+
+      <br />
+
+      <div style="text-align: right">
+        <el-button @click="closeDialog(0)">取消</el-button>
+        <el-button type="primary" @click="submitForm()">保存</el-button>
+      </div>
+    </el-form>
+  </el-dialog>
+</template>
+<script>
+// 地图
+import AMap from 'AMap'
+import { useStore } from 'vuex'
+import { defineComponent, ref, watchEffect, onMounted } from 'vue'
+import * as api from '@/api/platManage/index.js'
+import { ElMessage } from 'element-plus'
+
+export default defineComponent({
+  name: 'DialogComponent',
+  emits: ['closeDialog'],
+  props: {
+    show_Dialog: Boolean,
+    dialogTitle: String,
+    itemInfo: {
+      type: Object,
+      default: function () {
+        return {}
+      },
+    },
+  },
+  setup(props, { emit }) {
+    const store = useStore()
+    const beginTime = ref('')
+    const showDialog = ref(false)
+    const form = ref({})
+    const formInfo = ref(null)
+    const nowDate = ref(new Date().getTime())
+
+    const data = ref([])
+    const checkedArr = ref([])
+    const getPlatformBoxList = ref([])
+
+    const roleValid = (rule, value, callback) => {
+      rule
+      if (value.length === 0) {
+        callback(new Error('角色不能为空'))
+      } else {
+        callback()
+      }
+    }
+
+    const disabledDate = (time) => {
+      return time.getTime() < Date.now()
+    }
+
+    const currentChecked = (nodeObj, SelectedObj) => {
+      nodeObj, SelectedObj
+       console.log('SelectedObj.checkedNodes')
+      console.log(SelectedObj.checkedNodes)
+      checkedArr.value = []
+ 
+
+      SelectedObj.checkedNodes.forEach((item) => {
+        checkedArr.value.push(item.id)
+      })
+      console.log(checkedArr.value)
+    }
+
+    //树结构回显
+    function getPlatformMenu() {
+      var platformId = ''
+      if (props.dialogTitle == '添加模板') {
+        platformId = 0
+      } else {
+        platformId = form.value.id
+      }
+
+      api
+        .getPlatformMenu({
+          platformId: platformId,
+        })
+        .then((requset) => {
+          if (requset.status === 'SUCCESS') {
+            console.log('requset.data111')
+            console.log(requset.data)
+            var jsona = JSON.stringify(requset.data.menus)
+            var jsonb = jsona.replace(/"menu"/g, '"label"')
+            jsonb = jsonb.replace(/"authority"/g, '"children"')
+            jsonb = jsonb.replace(/"name"/g, '"label"')
+            var jsonc = JSON.parse(jsonb)
+            data.value = jsonc
+            console.log('data.value')
+            console.log(data.value)
+
+            checkedArr.value = requset.data.checkedKeys
+            console.log('checkedArr.value')
+            console.log(checkedArr.value)
+          } else {
+            ElMessage.error(requset.msg)
+          }
+        })
+    }
+
+    // 保存操作
+    const submitForm = () => {
+      formInfo.value.validate((valid) => {
+        if (valid) {
+          var params = {}
+          if (props.dialogTitle == '添加模板') {
+            params = {
+              platformId: 0,
+              platformName: form.value.platformName,
+              menuIds: checkedArr.value,
+            }
+          } else {
+            params = {
+              platformId: form.value.id,
+              menuIds: checkedArr.value,
+            }
+          }
+          if (checkedArr.value.length) {
+            api.updatePlatformMenu(params).then((requset) => {
+              if (requset.status === 'SUCCESS') {
+                ElMessage.success({
+                  message: '新增成功',
+                  type: 'success',
+                })
+                closeDialog()
+              } else {
+                ElMessage.error(requset.msg)
+              }
+            })
+          }else{
+            ElMessage.warning('请至少选择一个权限保存')
+          }
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    }
+    const marker = ref([])
+
+    function initMap() {
+      // AMap start
+      var map = new AMap.Map('mapF', {
+        resizeEnable: true,
+      })
+      //为地图注册click事件获取鼠标点击出的经纬度坐标
+
+      var marker = new AMap.Marker({})
+      map.on('click', function (e) {
+        form.value.geoPosition = e.lnglat.getLng() + ',' + e.lnglat.getLat()
+
+        map.remove([marker])
+        marker = new AMap.Marker({
+          position: new AMap.LngLat(e.lnglat.getLng(), e.lnglat.getLat()), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+        })
+
+        map.add([marker])
+      })
+      // AMap end
+    }
+
+    const open = () => {
+      form.value = props.itemInfo
+      console.log('form.value')
+      console.log(form.value)
+
+      // optionselect()
+      getPlatformMenu()
+    }
+
+    // 关闭弹框
+    const closeDialog = (flag) => {
+      checkedArr.value = []
+      resetForm()
+      showDialog.value = false
+      emit('closeDialog', flag)
+    }
+
+    function resetForm() {
+      formInfo.value.resetFields()
+    }
+
+    watchEffect((fn, options) => {
+      fn, options
+      showDialog.value = props.show_Dialog
+    })
+
+    //禁止选择以前的时间
+    const pickerEndDate = (time) => {
+      const timeRange = 1 * 24 * 60 * 60 * 1000
+      return time.getTime() <= Date.now() - timeRange * 1
+    }
+
+    onMounted(() => {})
+
+    return {
+      pickerEndDate,
+      roleValid,
+      submitForm,
+      closeDialog,
+      open,
+
+      data,
+
+      getPlatformMenu,
+
+      // map123,
+      store,
+      beginTime,
+      showDialog,
+      checkedArr,
+
+      initMap,
+      nowDate,
+      disabledDate,
+      marker,
+
+      checked: true,
+      form,
+      formInfo,
+      getPlatformBoxList,
+      currentChecked,
+
+      rules: {
+        platformName: [
+          { required: true, message: '请输入平台名称', trigger: 'blur' },
+          {
+            min: 1,
+            max: 30,
+            message: '长度在 1 到 30个字符',
+            trigger: 'blur',
+          },
+        ],
+        
+      },
+    }
+  },
+})
+</script>
+ 
+<style scoped lang="scss">
+.el-input,
+.el-select,
+.el-date-editor.el-input,
+.el-date-editor.el-input__inner {
+  width: 240px;
+}
+
+.el-form-item {
+  margin: 0 0 20px !important;
+}
+// label样式
+.el-form-item__label {
+  width: 120px !important;
+}
+.el-form-item__content {
+  margin-left: 100px;
+}
+.demo-form-inline .el-form-item:not(.user-layout .el-form-item) {
+  margin: 0 auto 20px 55px;
+}
+</style>
+<style>
+</style>

+ 358 - 0
src/views/statisManage/operLog/index.vue

@@ -0,0 +1,358 @@
+<template>
+  <div class="app-container">
+    <!-- 筛选start -->
+    <div class="filter-container mb-10">
+      <div class="left">
+        <div>
+          <a class="" style="margin-right: 30px">操作日志列表待排版</a>
+          <!-- <el-button
+            icon="el-icon-plus"
+            type="success"
+            @click="addItem()"
+          >
+           添加模板
+          </el-button> -->
+        </div>
+      </div>
+    </div>
+
+    <div class="filter-container mb-10">
+      <div style="margin-top: 20px">
+        <div class="filter-item">
+          平台名称:
+          <el-input
+            v-model="platformName"
+            placeholder="请输入内容"
+            style="width: 150px"
+          ></el-input>
+        </div>
+       
+
+        <div class="filter-item planOutage">
+          选择时间范围:
+          <el-date-picker
+            v-model="dateTime"
+            type="datetimerange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            style="width: auto"
+          ></el-date-picker>
+        </div>
+
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          @click="Select()"
+          class="search-button"
+        >
+          查询
+        </el-button>
+      </div>
+    </div>
+
+    <!-- 筛选end -->
+
+    <!-- 表格start -->
+    <el-table
+      :data="tableData"
+      border
+      stripe
+      :header-cell-style="headClass"
+      :cell-style="cellStyle"
+    >
+      <el-table-column type="index" label="序号" width="50px"></el-table-column>
+      <el-table-column
+        prop="platformName"
+        label="平台名称"
+      ></el-table-column>
+      <el-table-column
+        prop="tenantCount"
+        label="在用租户数"
+      ></el-table-column>
+      <el-table-column
+        prop="createTime"
+        label="创建时间"
+      ></el-table-column>
+     
+
+  
+      <el-table-column fixed="right" label="操作" width="80">
+        <template #default="scope">
+          <el-button
+            type="text"
+            size="small"
+            @click.prevent="editRow(scope.row)"
+          >
+            编辑
+          </el-button>
+          
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 表格end -->
+
+    <!-- 分页start -->
+    <div class="paginationBlock">
+      <el-pagination
+        v-model:currentPage="page"
+        :page-sizes="[15, 20, 25, 30]"
+        :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        background
+      ></el-pagination>
+    </div>
+
+    <!-- 分页end -->
+
+    <!--弹框组件开始-----------------------start-->
+    <dialog-component
+      :dialog-title="dialogTitle"
+      :item-info="tableItem"
+      @closeDialog="closeDialog"
+      :show_Dialog="showDialog"
+    ></dialog-component>
+    <!--弹框组件开始-----------------------end-->
+  </div>
+</template>
+
+<script>
+import { useStore } from 'vuex'
+import { defineComponent, onMounted, ref } from 'vue'
+import DialogComponent from './dialogComponent'
+import * as api from '@/api/platManage/index.js'
+import { ElMessage } from 'element-plus'
+
+export default defineComponent({
+  name: 'VariableList',
+
+  components: { DialogComponent },
+  setup() {
+    const store = useStore()
+
+    const tableItem = ref()
+    const dialogTitle = ref('')
+    const showDialog = ref(false)
+
+    const tableData = ref()
+    const currentPage = ref(1)
+    const pageSize = ref(15)
+    const total = ref(0)
+
+    const status = ref(0)
+    const createTime = ref('')
+    const platformName = ref('')
+    const tenantCount = ref('')
+
+    const dateTime = ref('')
+    const select = ref(1)
+
+    const input = ref('')
+    const region = ref()
+
+    // 添加操作
+    const addItem = () => {
+      tableItem.value = {
+        platformName: '',
+        tenantCount: '',
+        tenantTerm: 3,
+        geoPosition: '',
+        createTime: '',
+        phoneNumber: '',
+        systemName: '',
+        email: '',
+        address: '',
+        status:0,
+        domain:''
+      }
+      dialogTitle.value = '添加模板'
+      showDialog.value = true
+    }
+    // 编辑操作
+    const editRow = (row) => {
+      console.log(row)
+      tableItem.value = {
+        id:row.id,
+        platformName: row.platformName,
+        tenantCount: row.tenantCount,
+        tenantTerm: row.tenantTerm=='永久有效'?3:4,
+        value1:row.tenantTerm,
+        status: Number(row.status),
+        geoPosition: row.geoPosition,
+        createTime: Number(row.createTime),
+        phoneNumber: row.phoneNumber,
+        systemName: Number(row.systemName),
+        email: row.email,
+        address: row.address,
+        remark:row.remark,
+        domain:row.domain
+      }
+      dialogTitle.value = '编辑'
+      showDialog.value = true
+    }
+
+    // 关闭操作
+    const closeDialog = (flag) => {
+      if (flag) {
+        // 重新刷新表格内容
+        // this.fetchData()
+        console.log(1)
+      }
+      showDialog.value = false
+      Select()
+    }
+
+    //删除 是否删除  ---- 是
+    const handleDelete = (row) => {
+      api.plannedOutageDel({ id: row.id }).then((requset) => {
+        if (requset.status === 'SUCCESS') {
+          ElMessage.success({
+            message: '删除成功',
+            type: 'success',
+          })
+          Select()
+        } else {
+          ElMessage.error(requset.msg)
+        }
+      })
+    }
+    //是否删除  ---- 否
+    const cancelEvent = () => {
+      console.log('cancel!')
+    }
+
+    //查询列表
+    function Select() {
+      store.commit('TimeAll_function', dateTime.value)
+      const time = store.state.Time_Data
+      api
+        .getPlatformList({
+          size: pageSize.value,
+          page: currentPage.value,
+          startTime: time[0] ? time[0] : '',
+          endTime: time[1] ? time[1] : '',
+          // status: status.value,
+          // createTime: createTime.value,
+          platformName: platformName.value,
+          // tenantCount: tenantCount.value,
+        })
+        .then((requset) => {
+          if (requset.status === 'SUCCESS') {
+            tableData.value = requset.data.records.map((val) => {
+              store.commit('getTimestampAll', val.startTime)
+              val.startTime = store.state.timeProcessing
+              store.commit('getTimestampAll', val.endTime)
+              val.endTime = store.state.timeProcessing
+              store.commit('getTimestampAll', val.createTime)
+              val.createTime = store.state.timeProcessing
+            })
+            tableData.value = requset.data.records
+            total.value = requset.data.total
+          } else {
+            ElMessage.error(requset.msg)
+          }
+        })
+    }
+
+    onMounted(() => {
+      Select()
+    })
+
+    const handleSizeChange = (val) => {
+      pageSize.value = val
+      Select()
+    }
+    const handleCurrentChange = (val) => {
+      currentPage.value = val
+      Select()
+    }
+    // 表头样式设置
+    const goVariableList = () => {
+      // 跳转至订单列表页面传参
+      this.$router.push({
+        path: '../siteManage/variableList/index.vue',
+      })
+      // this.$router.push({ name:'variableList'})
+    }
+    const headClass = () => {
+      return 'background:#FAFAFA;'
+    }
+    //处理状态状态值变色
+    const cellStyle = ({ row, column, rowIndex, columnIndex }) => {
+      row, column, rowIndex
+      // console.log(row, column, rowIndex)
+
+      if (columnIndex) {
+        // return `text-align:left;cursor:pointer;`
+      } else {
+        return ''
+      }
+    }
+
+    //导出
+    const DataReportExport = () => {
+      store.commit('TimeAll_function', dateTime.value)
+      const time = store.state.Time_Data
+      api
+        .outagePlanListExport({
+          type: region.value,
+          startTime: time[0] ? time[0] : '',
+          endTime: time[1] ? time[1] : '',
+        })
+        .then((requset) => {
+          if (requset.status === 'SUCCESS') {
+            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            ElMessage.success({
+              message: '导出成功',
+              type: 'success',
+            })
+          } else {
+            ElMessage.error(requset.msg)
+          }
+        })
+    }
+    return {
+      cellStyle,
+      headClass,
+      goVariableList,
+
+      handleDelete,
+      cancelEvent,
+      closeDialog,
+      editRow,
+      addItem,
+      Select,
+
+      store,
+
+      total,
+      pageSize,
+      currentPage,
+      handleSizeChange,
+      handleCurrentChange,
+
+      createTime,
+      tableData,
+      platformName,
+      tenantCount,
+      status,
+
+      showDialog,
+      select,
+      dateTime,
+      tableItem,
+      dialogTitle,
+      input,
+      region,
+
+      DataReportExport,
+    }
+  },
+})
+</script>
+
+<style lang="scss" scoped>
+</style>