zhaoke 1 жил өмнө
parent
commit
f93c3648b0

+ 14 - 2
src/components/publicPageForm/index.vue

@@ -137,15 +137,27 @@ export default {
     },
   },
   methods: {
+    //格式化传递参数数据
+    formatDefault (item) {
+      if (typeof item != 'string') return {}
+      const filterItem = {}
+      const parameters = item.replace('{', '').replace('}', '')
+      const parametersSplit = parameters?.split(',')
+      parametersSplit.map(item => {
+        const [key, val] = item?.split(':')
+        filterItem[key] = val
+      })
+      return filterItem
+    },
     //获取表单下拉数据
     getSelectData (formItem = []) {
       this.loading = true
       if (!formItem.length || !Array.isArray(formItem)) return
       const formItemCopy = _.cloneDeep(formItem)
       const [allResult, allResultKey] = [[], []]
-      formItemCopy.map(({ dropdownlist, pagecode }) => {
+      formItemCopy.map(({ dropdownlist, pagecode, defaultfilter }) => {
         if (dropdownlist || dropdownlist == 0) {
-          const datacontent = { filter: { 1: 1 } }
+          const datacontent = { filter: dropdownlist == 19 ? this.formatDefault(defaultfilter) : { 1: 1 } }
           allResultKey.push(pagecode)
           allResult.push(Query({ serviceid: dropdownlist, datacontent, event: '0' }))
         }

+ 12 - 0
src/views/dataAccessPage/components/accessPageTable.vue

@@ -0,0 +1,12 @@
+<template>
+  <div>2</div>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style>
+</style>

+ 224 - 0
src/views/dataAccessPage/components/accessPageTree.vue

@@ -0,0 +1,224 @@
+
+<template>
+  <div v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" class="publicPageTree">
+    <div class="publicPageTree_add">
+      <PublicPageHeader class="publicPageTree_add_title" page-title="服务列表">
+        <el-button size="small" @click="append" type="primary">新增</el-button>
+      </PublicPageHeader>
+    </div>
+    <div class="publicPageTree_search">
+      <el-input size="small" placeholder="输入关键字进行过滤" clearable v-model="filterText"></el-input>
+    </div>
+    <div class="publicPageTree_tree">
+      <el-scrollbar style="height: 100%" :horizontal="false">
+        <el-tree class="filter-tree" :data="data" :props="defaultProps" node-key="serviceid" :default-expanded-keys="defaultKeys" :filter-node-method="filterNode" ref="tree" @node-click="treeNodeClick">
+          <span class="custom-tree-node" slot-scope="{node,data}">
+            <span class="custom-tree-node-label">{{node.label}}</span>
+            <span class="custom-tree-node-btn">
+              <el-button size="mini" type="text" @click.stop="() => edit(data)">编辑</el-button>
+              <el-button size="mini" class="del" type="text" @click.stop="() => remove(node, data)">删除</el-button>
+            </span>
+          </span>
+        </el-tree>
+      </el-scrollbar>
+    </div>
+    <div class="publicPageTree_dialog">
+      <PublicPageDialog :dialog-title="tableTitle" dialogSize="630px" :dialog-drawer="flag" @handleClose="submitClickClose('ruleForm')" @handleSubmit="submitClickHandler">
+        <PublicPageForm ref="ruleForm" :label-width="labelWidth" :form-item="formItem" :form-data="tableForm" />
+      </PublicPageDialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import { Query } from "@/api/webApi"
+import PublicPageHeader from '@/components/PublicPageHeader'
+import PublicPageDialog from '@/components/PublicPageDialog'
+import PublicPageForm from '@/components/publicPageForm'
+import { listToTree } from '@/utils/validate'
+import { mapGetters } from 'vuex'
+import { formatChange } from '@/utils/validate'
+
+export default {
+  name: 'PublicPageTree',
+  components: { PublicPageDialog, PublicPageForm, PublicPageHeader },
+  data () {
+    return {
+      loading: false,
+      filterText: '',
+      data: [],
+      defaultProps: {
+        children: 'children',
+        label: 'servicename'
+      },
+      defaultKeys: [],
+      formItem: [], //弹框表单渲染数据
+      flag: false, //弹框表单开关
+      tableType: "add", //弹框表单弹框类型
+      tableTitle: "新增", //弹框表单标题
+      tableForm: {}, //弹框表单数据
+      rmFlag: false, //删除弹框开关
+      rmTitle: '', //删除弹框标题
+      tableObj: {}, //删除数据
+      tableOptions: {}, //表单数据下拉
+      labelWidth: '120px', //表单文字距离
+    }
+  },
+  watch: {
+    filterText (val) {
+      this.$refs.tree.filter(val);
+    },
+  },
+  computed: {
+    ...mapGetters(['authArrs']),
+  },
+  mounted () {
+    //获取页面配置
+    const { auth_id } = this.$route.meta
+    //获取页面权限类型组件  pagetype 1模块  2页面  3按钮 4表格 5树形  6弹窗
+    const pageAuths = this.authArrs
+    if (!pageAuths.length) return
+    //获取当前页面权限类型
+    const pageAuthArrs = pageAuths.filter(item => item['superiorid'] == auth_id)
+    if (!pageAuthArrs.length) return
+    //获取tree权限
+    const pageAuthtrees = pageAuthArrs.filter(item => item.pagetype == 'tree')
+    if (!pageAuthtrees.length) return
+
+    const { pagename, serviceid } = pageAuthtrees[0]
+    this.queryTreeData(serviceid, pagename)
+  },
+  methods: {
+    filterNode (value, data) {
+      if (!value) return true;
+      return data.servicename.indexOf(value) !== -1;
+    },
+
+    treeNodeClick (data) {
+      console.log(data)
+    },
+
+    append () {
+      this.flag = true;
+      this.tableType = "add";
+      this.tableTitle = "新增-服务";
+      this.tableForm = {};
+      // this.formItem = tableColumnArrs.filter(item => item.isdisplay == 1)
+    },
+
+    edit (data) {
+      console.log(data)
+    },
+
+    remove (node, data) {
+      console.log(data)
+    },
+
+    restData () {
+      this.flag = false;
+      this.rmFlag = false;
+      this.tableObj = {};
+      this.tableForm = {};
+    },
+
+    // 新增/编辑-取消
+    submitClickClose (formName) {
+      this.flag = false
+      this.$refs[formName].restForm()
+    },
+
+    // 新增/编辑-确认
+    submitClickHandler () {
+      const flag = this.$refs["ruleForm"].submitClickHandler()
+      if (flag) this.tableType == "add" ? this.generalDataReception(1, this.tableForm) : this.generalDataReception(2, this.tableForm, this.tableKey)
+    },
+
+    //表格-增/删/改
+    async generalDataReception (event, data, key) {
+      try {
+        const params = {
+          serviceid: this.pageServiceId,
+          datacontent: formatChange(data, event, key),
+          event: `${event}`,
+        };
+        const { code } =
+          event == 1
+            ? await newData(params)
+            : event == 2
+              ? await modifyData(params)
+              : await moveData(params);
+        if (code == 0) {
+          this.$message.success("操作成功");
+          this.restData()
+        } else {
+          this.$message.error("操作失败");
+          this.restData();
+        }
+      } catch (error) {
+        this.restData()
+      }
+    },
+
+    async queryTreeData (serviceid, pagename) {
+      this.loading = true;
+      const datacontent = { filter: { 1: 1 } }
+      try {
+        const { code, returnData } = await Query({
+          serviceid,
+          datacontent,
+          event: '0'
+        });
+        if (code == 0 && returnData?.length) {
+          // const name = '全部'
+          // const treeMenu = listToTree(returnData, 'superiorid', 'pageconfigurationid')
+          // const treeMenuAll = [{ pagename: name, serviceid: name, superiorid: name, pageconfigurationid: -1, children: treeMenu }]
+          // this.defaultKeys = [-1]
+          // this.data = treeMenuAll
+          this.data = returnData
+        } else {
+          this.$message.error(`获取${pagename}数据失败`);
+        }
+      } catch (error) {
+        this.$message.error(`获取${pagename}数据失败`);
+      }
+      this.loading = false;
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.publicPageTree {
+  background-color: #fff;
+  padding: 20px;
+  height: 100%;
+  width: 100%;
+  &_add {
+    margin-bottom: 20px;
+    line-height: 32px;
+    &_title {
+      font-size: 16px;
+      font-weight: 600;
+    }
+  }
+  ::v-deep &_tree {
+    margin-top: 20px;
+    height: calc(100% - 114px);
+    .el-scrollbar__wrap {
+      overflow-x: hidden;
+    }
+    .is-horizontal {
+      display: none;
+    }
+    .custom-tree-node {
+      display: flex;
+      width: 100%;
+      justify-content: space-between;
+      line-height: 28px;
+      .del {
+        color: #ff0000;
+      }
+    }
+  }
+}
+</style>

+ 0 - 173
src/views/dataAccessPage/css/index.scss

@@ -1,173 +0,0 @@
-.newService {
-  height: calc(100vh - 80px);
-  padding: 24px;
-  &-head {
-    line-height: 30px;
-    .icons {
-      &-list {
-        font-size: 14px;
-        margin-right: 35px;
-        &-box {
-          width: 14px;
-          height: 14px;
-          display: inline-block;
-          border-radius: 2px;
-          margin-right: 12px;
-          vertical-align: middle;
-        }
-        &:last-child {
-          margin-right: 0;
-        }
-      }
-      .start {
-        .icons-list-box {
-          background-color: #50c183;
-        }
-      }
-      .stop {
-        .icons-list-box {
-          background-color: #afb4bf;
-        }
-      }
-      .error {
-        .icons-list-box {
-          background-color: #ef4747;
-        }
-      }
-    }
-  }
-  &-content {
-    margin-top: 30px;
-    height: calc(100% - 58px);
-    &-left {
-      width: 360px;
-      height: 100%;
-      background: #ffffff;
-      box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.1);
-      border-radius: 4px;
-      margin-right: 16px;
-      &-top {
-        padding: 24px 24px 18px 24px;
-        .head {
-          line-height: 32px;
-          .title {
-            font-size: 20px;
-            font-family: Microsoft YaHei;
-            font-weight: bold;
-            color: #101116;
-          }
-        }
-        .search {
-          margin-top: 18px;
-        }
-      }
-      ::v-deep &-bottom {
-        height: calc(100% - 138px);
-        .el-scrollbar__wrap {
-          overflow-x: hidden;
-        }
-        .is-horizontal {
-          display: none;
-        }
-        .contents {
-          padding: 0 24px;
-          height: 42px;
-          line-height: 42px;
-          .left {
-            max-width: 230px;
-            white-space: nowrap;
-            text-overflow: ellipsis;
-            overflow: hidden;
-            .box {
-              width: 16px;
-              height: 16px;
-              display: inline-block;
-              border-radius: 2px;
-              margin-right: 15px;
-              vertical-align: middle;
-            }
-            .txt {
-              font-size: 16px;
-              font-family: Microsoft YaHei;
-              font-weight: bold;
-              color: #101116;
-            }
-            .success {
-              background-color: #50c183;
-            }
-            .error {
-              background: #afb4bf;
-            }
-          }
-          .right {
-            font-size: 14px;
-            span {
-              margin-right: 16px;
-              cursor: pointer;
-              &:last-child {
-                margin-right: 0;
-              }
-            }
-            .start,
-            .stop {
-              color: #2579a0;
-            }
-            .error {
-              color: #eb3434;
-            }
-          }
-        }
-        .active {
-          background: #e4f3f9;
-        }
-      }
-    }
-    &-right {
-      width: calc(100% - 376px);
-      height: 100%;
-      &-top {
-        
-        background: #ffffff;
-        border-radius: 4px;
-        padding: 24px 24px 0 24px;
-        margin-bottom: 16px;
-        .title {
-          font-size: 20px;
-          font-family: Microsoft YaHei;
-          font-weight: bold;
-          color: #303133;
-        }
-        .demo-form,.cj-form {
-          margin-top: 20px;
-          .el-form-item {
-            &:last-child {
-              margin-right: 0;
-            }
-          }
-        }
-        .cj-form{
-          .el-form-item{
-            margin-bottom: 22px;
-          }
-          margin-top: 0;
-        }
-      }
-      &-bottom {
-        background: #ffffff;
-        border-radius: 4px;
-        .data-table{
-          height: 100%;
-        }
-      }
-    }
-    .serButton {
-      border: 1px solid #b2cbde;
-      color: #2579a0;
-      border-radius: 4px;
-    }
-    .bcButton {
-      background: #2579a0;
-      border-radius: 4px;
-    }
-  }
-}

+ 30 - 387
src/views/dataAccessPage/index.vue

@@ -1,400 +1,43 @@
 <template>
-  <div class="newService">
-    <div class="newService-head flex-wrap">
-      <div class="manageTitle">{{ title }}</div>
-      <div class="icons flex-wrap">
-        <div class="icons-list start">
-          <span class="icons-list-box"></span>
-          <span class="icons-list-text">启用</span>
-        </div>
-        <div class="icons-list stop">
-          <span class="icons-list-box"></span>
-          <span class="icons-list-text">停用</span>
-        </div>
-        <div class="icons-list error">
-          <span class="icons-list-box"></span>
-          <span class="icons-list-text">异常</span>
-        </div>
+  <div class="dataAccessPage">
+    <PublicPageHeader class="dataAccessPage_header" page-title="服务管理" />
+    <div class="dataAccessPage_content flex-wrap">
+      <div class="dataAccessPage_content_left">
+        <AccessPageTree />
       </div>
-    </div>
-    <div class="newService-content flex-wrap">
-      <div class="newService-content-left">
-        <div class="newService-content-left-top">
-          <div class="flex head">
-            <div class="title">服务列表</div>
-            <el-button @click="handleAdd" type="primary" size="small">新增</el-button>
-          </div>
-          <div class="search">
-            <el-input size="small" placeholder="请输入内容" clearable prefix-icon="el-icon-search" v-model="search">
-            </el-input>
-          </div>
-        </div>
-        <div class="newService-content-left-bottom">
-          <template v-if="dataList.length">
-            <el-scrollbar ref="scroll" style="height: 100%">
-              <div v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)">
-                <div v-for="(item,index) in dataList" :key="index" @click.stop="handleClick(item,index)" :class="index == activeIndex ? 'active':''" class="contents flex">
-                  <div class="left">
-                    <span :class="item.runstate ? 'success' : 'error'" class="box"></span>
-                    <el-tooltip class="item" effect="dark" :content="item.servicename" placement="top">
-                      <span class="txt">{{ item.servicename }}</span>
-                    </el-tooltip>
-                  </div>
-                  <div v-show="activeIndex == index" class="right">
-                    <template v-if="!flag && item.serviceid">
-                      <template v-if="item.servicetype == 4">
-                        <span @click.stop="handleStart" v-if="!item.runstate" class="start">启用</span>
-                        <span @click.stop="handleStop" v-else class="stop">停用</span>
-                      </template>
-                      <template v-else>
-                        <span @click.stop="handleRest(item)" class="rest">重置</span>
-                      </template>
-                    </template>
-                    <span @click.stop="handleError" class="error">删除</span>
-                  </div>
-                </div>
-              </div>
-            </el-scrollbar>
-          </template>
-          <template v-else>
-            <el-empty description="暂无数据"></el-empty>
-          </template>
-        </div>
-      </div>
-      <div class="newService-content-right">
-        <div class="newService-content-right-top">
-          <div class="flex">
-            <div class="title">服务配置 {{ dataObj.servicename }}</div>
-            <el-button type="primary" @click="handleSave" :disabled="flag" size="small">保存</el-button>
-          </div>
-          <div class="demo-form">
-            <PublicPageForm ref="rulesForm" :form-item="jqList" :formData="dataObj" labelWidth="200px" form-type="horizontal" />
-          </div>
-        </div>
-        <div style="height: calc(100% - 280px);overflow: hidden;" class="newService-content-right-bottom">
-          <PublicPageTable :dataId="dataId" :msgContent="msgContent" dataTitle="算法配置" />
-        </div>
+      <div class="dataAccessPage_content_right">
+        <!-- <AccessPageTable data-title="算法配置" :msg-content="{}" /> -->
       </div>
     </div>
   </div>
 </template>
 
 <script>
-import PublicPageTable from '@/views/tablePage'
-import PublicPageDialog from '@/components/PublicPageDialog'
-import PublicPageForm from '@/components/publicPageForm'
-import { Query, newData, modifyData, moveData, start, stop } from "@/api/webApi"
-import * as _ from 'lodash'
-
+import PublicPageHeader from '@/components/PublicPageHeader'
+import AccessPageTree from './components/accessPageTree.vue'
+import AccessPageTable from '@/views/tablePage'
 export default {
-  name: 'NewService',
-  components: { PublicPageForm, PublicPageDialog, PublicPageTable },
-  data () {
-    return {
-      title: '服务设置',
-      search: '',
-      arrs: [],
-      flag: true,
-      rmFlag: false,
-      formInline: {
-        servicename: '',
-        servicetype: '',
-        containerid: '',
-        loopcount: '',
-        frequencyCount: '',
-        frequencyUnit: '',
-        taskValid: '',
-        taskInvalid: '',
-        tasktype: '',
-        cronexpress: ''
-      },
-      activeIndex: null,
-      pageIndex: 0,
-      pageSize: 9999,
-      dataContent: { filter: { 1: 1 } },
-      queryId: '',
-      dataObj: {},
-      dataType: 'edit',
-      noMore: false,
-      loading: false,
-      dataId: 15,
-      msgContent: {
-        serviceid: '15',
-        pagecode: 'algorithmlibraryManagementTable'
-      },
-      jqList: []
-    }
-  },
-  computed: {
-    dataList () {
-      return this.arrs.filter(data => !this.search || data.servicename.toLowerCase().includes(this.search.toLowerCase()))
-    },
-  },
-  created () {
-    const { title, qid } = this.$route.meta
-    this.title = title
-    this.queryId = qid
-    this.getQuery(qid)
-    this.getMsgList(14)
-  },
-  updated () {
-    this.scrollDown()
-  },
-  methods: {
-    async getQuery (id) {
-      try {
-        this.loading = true;
-        const { code, returnData } = await Query({
-          serviceid: id,
-          datacontent: this.dataContent,
-          event: '0'
-        })
-        if (code == 0) {
-          if (returnData.length === 0) {
-            this.pageIndex--;
-            this.noMore = true;
-          }
-          this.arrs.push(...returnData)
-          if (this.dataType == 'add') {
-            const item = this.arrs[this.arrs.length - 1]
-            if (Object.keys(item).length) {
-              this.dataObj = item
-              this.flag = false
-              this.msgContent = {
-                service_id: item.serviceID
-              }
-            }
-          }
-          this.loading = false;
-        } else {
-          this.pageIndex--;
-          this.loading = false;
-        }
-      } catch (error) {
-        this.pageIndex--;
-        this.loading = false;
-      }
-    },
-    async getMsgList (id) {
-      try {
-        const { code, returnData } = await Query({
-          serviceid: '3',
-          datacontent: { filter: { pagecode: 'serviceinfoManagementTable', serviceid: id } },
-          event: '0'
-        })
-        if (code == 0) {
-          const formItemCopy = _.cloneDeep(returnData).filter((item) => item.isdisplay == 2 || item.isdisplay == 3);
-          this.jqList = _.orderBy(formItemCopy, ['displaynumber'], ['asc']);
-        }
-      } catch (error) {
-        this.jqList = []
-      }
-    },
-    load () {
-      if (!this.noMore) {
-        this.getQuery(this.queryId);
-      }
-    },
-    scrollDown () {
-      if (this.$refs['scroll'] && this.dataType == 'add') {
-        this.$refs['scroll'].wrap.scrollTop = this.$refs['scroll'].wrap.scrollHeight
-      }
-    },
-    resetTable () {
-      this.pageIndex = 0;
-      this.noMore = false;
-      this.arrs = [];
-    },
-    //服务列表-新增
-    handleAdd () {
-      this.dataType = 'add'
-    },
-    //服务列表-点击
-    handleClick (item, index) {
-      this.dataType = 'edit'
-      this.dataObj = _.cloneDeep(item)
-      this.activeIndex = index
-      this.flag = false
-    },
-    //服务列表-启用
-    handleStart () {
-      if (this.dataObj.serviceID && this.dataType == 'edit') {
-        this.dataObj.runState = 1
-        this.controlService(1, this.dataObj)
-      } else if (this.dataType == 'add' && this.arrs[this.arrs.length - 1].serviceID) {
-        this.arrs[this.arrs.length - 1].runState = 1
-        this.controlService(1, this.arrs[this.arrs.length - 1])
-      }
-      else {
-        this.$message.error('请先添加当前服务后再操作')
-      }
-    },
-    //服务列表-停用
-    handleStop () {
-      if (this.dataObj.serviceID && this.dataType == 'edit') {
-        this.dataObj.runState = 0
-        this.controlService(0, this.dataObj)
-      } else if (this.dataType == 'add' && this.arrs[this.arrs.length - 1].serviceID) {
-        this.arrs[this.arrs.length - 1].runState = 0
-        this.controlService(0, this.arrs[this.arrs.length - 1])
-      }
-      else {
-        this.$message.error('请先添加当前服务后再操作')
-      }
-    },
-    //服务列表-重置
-    handleRest (item) {
-      this.controlService(0, item)
-    },
-    //服务列表-保存
-    handleSave () {
-      console.log(this.$refs['rulesForm'].tableForm)
-      return
-      if (this.dataObj.serviceID && this.dataType == 'edit') {
-        const obj = {}
-        obj.Value = this.formInline
-        obj.filter = {
-          serviceID: this.dataObj.serviceID
-        }
-        if (obj.Value.serviceID) {
-          delete obj.Value.serviceID
-        }
-        this.generalDataReception(2, [obj])
-      } else if (this.dataType == 'add' && this.arrs[this.arrs.length - 1].serviceID) {
-        this.formInline.serviceID = this.arrs[this.arrs.length - 1].serviceID
-        const obj = {}
-        obj.Value = this.formInline
-        obj.filter = [{
-          "left": "(",
-          "column": `serviceID`,
-          "comparator": "=",
-          "value": `${this.formInline.serviceID}`,
-          "right": ")",
-          "connector": "and"
-        }]
-        if (obj.Value.serviceID) {
-          delete obj.Value.serviceID
-        }
-        this.generalDataReception(2, [obj])
-      } else if (this.dataType == 'add') {
-        const obj = {}
-        obj.Value = this.formInline
-        this.generalDataReception(1, [obj])
-      }
-      else {
-        this.$message.error('请先选中服务后再操作')
-      }
-    },
-    tableRemove () {
-      if (this.dataObj.serviceID && this.dataType == 'edit') {
-        // const obj = {}
-        // obj.filter = this.dataObj
-        this.generalDataReception(3, [this.dataObj])
-        this.msgContent = {
-          service_id: ''
-        }
-        this.activeIndex = null;
-        this.dataObj = {};
-        for (const key in this.formInline) {
-          if (Object.hasOwnProperty.call(this.formInline, key)) {
-            this.formInline[key] = null
-          }
-        }
-        this.flag = true
-      } else if (this.dataType == 'add' && this.arrs[this.arrs.length - 1].serviceID) {
-        // const obj = {}
-        // obj.filter = this.arrs[this.arrs.length - 1]
-        this.generalDataReception(3, [this.arrs[this.arrs.length - 1]])
-        this.msgContent = {
-          service_id: ''
-        }
-        this.activeIndex = null;
-        this.dataObj = {};
-        for (const key in this.formInline) {
-          if (Object.hasOwnProperty.call(this.formInline, key)) {
-            this.formInline[key] = null
-          }
-        }
-        this.flag = true
-        this.dataType = 'edit'
-      }
-      else {
-        this.arrs.splice(this.activeIndex, 1)
-        this.activeIndex = null
-        this.flag = true
-        this.dataObj = {}
-        for (const key in this.formInline) {
-          if (Object.hasOwnProperty.call(this.formInline, key)) {
-            this.formInline[key] = null
-          }
-        }
-      }
-      this.rmFlag = false
-    },
-    //服务列表-删除
-    handleError () {
-      this.rmFlag = true
-    },
-    //服务列表-增/删/改
-    async generalDataReception (event, data) {
-      try {
-        const params = {
-          serviceId: this.queryId,
-          dataContent: data,
-          event: `${event}`,
-        };
-        const { code } =
-          event == 1
-            ? await newData(params)
-            : event == 2
-              ? await modifyData(params)
-              : await moveData(params);
-        if (code == 0) {
-          this.$message.success("操作成功");
-          this.resetTable();
-          this.getQuery(this.queryId);
-        } else {
-          this.$message.error("操作失败");
-        }
-      } catch (error) {
-        this.$message.error("操作失败");
-      }
-    },
-
-    //服务启停
-    async controlService (event, data) {
-      try {
-        const params = {
-          serviceId: data.serviceID
-        };
-        const { code } =
-          event == 1
-            ? await start(params)
-            : await stop(params);
-        if (code == 0) {
-          this.resetTable()
-          this.getQuery(this.queryId)
-          this.$message.success("操作成功")
-          // const obj = {}
-          // obj.Value = data
-          // obj.filter = {
-          //   serviceID: data.serviceID
-          // }
-          // if (obj.Value.serviceID) {
-          //   delete obj.Value.serviceID
-          // }
-          // this.generalDataReception(2, [obj])
-        } else {
-          this.$message.error("操作失败");
-        }
-      } catch (error) {
-        this.$message.error("操作失败");
-      }
-    },
-  }
+  name: 'DataAccessPage',
+  components: { PublicPageHeader, AccessPageTree, AccessPageTable }
 }
 </script>
 
 <style lang="scss" scoped>
-@import "./css/index.scss";
-</style>
+.dataAccessPage {
+  height: calc(100vh - 80px);
+  padding: 20px;
+  &_content {
+    margin-top: 20px;
+    height: calc(100vh - 180px);
+    &_left {
+      width: 350px;
+      margin-right: 20px;
+      height: 100%;
+    }
+    &_right {
+      width: calc(100% - 370px);
+      height: 100%;
+    }
+  }
+}
+</style>