瀏覽代碼

Merge branch 'master' of http://18.167.157.193:1026/guanli/ngds

kevin_zhangl 3 年之前
父節點
當前提交
78cad63ae3
共有 3 個文件被更改,包括 176 次插入177 次删除
  1. 1 1
      backendEle/src/utils/permission.js
  2. 173 174
      backendEle/src/views/atlas/network-opt.vue
  3. 2 2
      backendEle/src/views/atlas/relation-opt.vue

+ 1 - 1
backendEle/src/utils/permission.js

@@ -32,4 +32,4 @@ const permission = {
   },
 }
 
-export default permission
+export default permission

+ 173 - 174
backendEle/src/views/atlas/network-opt.vue

@@ -17,24 +17,24 @@
           </div>
           <el-tree :props="props" :data="treeData" node-key="USER_ID" @node-click="getChildData" ref="tree" :indent="0"
                    default-expand-all :height="tool.getTableHeight(true)">
-                <span :id="'node_'+data.USER_ID" :class="'custom-tree-node '+data.className"
-                      slot-scope="{ node, data }">
-                    <span :class="'el-icon-loading '+ data.displayNone"></span>
-                    <span :class="data.icon"></span>
-                    <span>
-                      <el-tag type="danger">Number of Layers:{{countTopDeep(data.TOP_NETWORK_DEEP,topDeep)}}</el-tag>
-                      <el-tag><!-- 会员编号 -->Member code:{{ node.label }}</el-tag>
-                      <el-tag>Name<!-- 姓名 -->:{{data.REAL_NAME}}</el-tag>
-                      <el-tag type="danger"><!-- 区位 -->Location:{{data.RELATIVE_LOCATION}}</el-tag>
-                      <el-tag type="success"><!-- 级别 -->Level:{{data.DEC_LV_NAME}}</el-tag>
-                      <el-tag type="warning"><!-- 聘级 -->Rank:{{data.EMP_LV_NAME}}</el-tag>
-                      <el-tag type="warning"><!-- 聘级 -->Star:{{data.STAR_LV_NAME}}</el-tag>
-                      <el-tag><!-- 加入期数 -->Number of joining periods:{{data.PERIOD_AT}}</el-tag>
-                    </span>
-                </span>
+            <span :id="'node_'+data.USER_ID" :class="'custom-tree-node '+data.className"
+                  slot-scope="{ node, data }">
+              <span :class="'el-icon-loading '+ data.displayNone"></span>
+              <span :class="data.icon"></span>
+              <span>
+                <el-tag type="danger">Number of Layers:{{countTopDeep(data.TOP_NETWORK_DEEP,topDeep)}}</el-tag>
+                <el-tag><!-- 会员编号 -->Member code:{{ node.label }}</el-tag>
+                <el-tag>Name<!-- 姓名 -->:{{data.REAL_NAME}}</el-tag>
+                <el-tag type="danger"><!-- 区位 -->Location:{{data.RELATIVE_LOCATION}}</el-tag>
+                <el-tag type="success"><!-- 级别 -->Level:{{data.DEC_LV_NAME}}</el-tag>
+                <el-tag type="warning"><!-- 聘级 -->Rank:{{data.EMP_LV_NAME}}</el-tag>
+                <el-tag type="warning"><!-- 聘级 -->Star:{{data.STAR_LV_NAME}}</el-tag>
+                <el-tag><!-- 加入期数 -->Number of joining periods:{{data.PERIOD_AT}}</el-tag>
+              </span>
+            </span>
           </el-tree>
         </el-tab-pane>
-        <el-tab-pane label="Placement network list" name="two" v-if="permission.hasPermission(`atlas/network`)"><!-- 安置网络列表 -->
+        <el-tab-pane label="Placement network list" name="two" v-if="permission.hasPermission(`atlas/network-list`)"><!-- 安置网络列表 -->
           <div class="filter-user">
             <el-input v-model="filterForm.userName" size="small" style="width:300px;">
               <template slot="prepend"><!-- 会员编号 -->Member code</template>
@@ -87,171 +87,170 @@
 </template>
 
 <script>
-  import network from '@/utils/network'
-  import tool from '@/utils/tool'
-  import store from '@/utils/vuexStore'
-  import permission from '@/utils/permission'
-  import Pagination from '@/components/Pagination'
-  import baseInfo from '@/utils/baseInfo'
+import network from '@/utils/network'
+import tool from '@/utils/tool'
+import store from '@/utils/vuexStore'
+import permission from '@/utils/permission'
+import Pagination from '@/components/Pagination'
+import baseInfo from '@/utils/baseInfo'
 
-  export default {
-    name: 'atlas_network-opt',
-    components: {Pagination},
-    mounted() {
-      this.getData()
-      store.state.socket.onMessageCallback = this.onMessageCallback
-    },
-    data() {
-      return {
-        loading: true,
-        tabActiveName: 'first',
-        permission: permission,
-        //relation
-        props: {
-          label: 'USER_NAME',
-          children: 'children',
-          //isLeaf: 'leaf',
-          icon: 'icon',
-        },
-        treeData: null,
-        expandDeep: 2,
-        topDeep: 0,
-        mainUserName: '',
+export default {
+  name: 'atlas_network-opt',
+  components: {Pagination},
+  mounted() {
+    this.getData()
+    store.state.socket.onMessageCallback = this.onMessageCallback
+  },
+  data() {
+    return {
+      loading: true,
+      tabActiveName: 'first',
+      permission: permission,
+      //relation
+      props: {
+        label: 'USER_NAME',
+        children: 'children',
+        //isLeaf: 'leaf',
+        icon: 'icon',
+      },
+      treeData: null,
+      expandDeep: 2,
+      topDeep: 0,
+      mainUserName: '',
+      periodNum: null,
+      listPeriodNum: null,
+      allData: null,
+      tableHeaders: null,
+      tableData: null,
+      currentPage: 1,
+      totalPages: 1,
+      totalCount: 1,
+      pageSize: 20,
+      tool: tool,
+      filterForm: {
+        userName: null,
+        deep: 2,
         periodNum: null,
-        listPeriodNum: null,
-        allData: null,
-        tableHeaders: null,
-        tableData: null,
-        currentPage: 1,
-        totalPages: 1,
-        totalCount: 1,
-        pageSize: 20,
-        tool: tool,
-        filterForm: {
-          userName: null,
-          deep: 2,
-          periodNum: null,
-        },
-        listTopDeep: 0,
+      },
+      listTopDeep: 0,
+    }
+  },
+  methods: {
+    getData() {
+      this.$message({
+        message: 'Getting data, please wait', // 正在获取数据,请稍后
+      })
+      this.periodNum = baseInfo.nowPeriodNum()
+      this.filterForm.periodNum = baseInfo.nowPeriodNum()
+      if (permission.hasPermission(`atlas/network-list`) && !permission.hasPermission(`atlas/network`)) {
+        this.tabActiveName = 'two'
+        this.getListData()
       }
-    },
-    methods: {
-      getData() {
-        this.$message({
-          message: 'Getting data, please wait',//正在获取数据,请稍后
-        })
-        this.periodNum = baseInfo.nowPeriodNum()
-        this.filterForm.periodNum = baseInfo.nowPeriodNum()
-        if (permission.hasPermission(`atlas/network-list`) && !permission.hasPermission(`atlas/network`)) {
-          this.tabActiveName = 'two'
-          this.getListData()
-        }
-        if (permission.hasPermission(`atlas/network`)) {
-          this.tabActiveName = 'first'
-          if(permission.hasPermission(`atlas/network-list`)){
-            this.getMainData(null,true)
-          }else{
-            this.getMainData()
-          }
+      if (permission.hasPermission(`atlas/network`)) {
+        this.tabActiveName = 'first'
+        if(permission.hasPermission(`atlas/network-list`)){
+          this.getMainData(null,true)
+        }else{
+          this.getMainData()
         }
-      },
-      getMainData (userName = null, getList = false) {
-        this.$message.closeAll()
+      }
+    },
+    getMainData (userName = null, getList = false) {
+      this.$message.closeAll()
+      this.$message({
+        message: 'Getting data, please wait',//正在获取数据,请稍后
+      })
+      let thisObj = this
+      let requestData = {
+        periodNum: this.periodNum
+      }
+      if (this.mainUserName !== null) {
+        requestData = {userName: this.mainUserName,periodNum: this.periodNum}
+      }
+      network.getData('atlas/main-user-info', requestData).then(response => {
+        thisObj.treeData = response
+        thisObj.topDeep = Number(response[0].TOP_NETWORK_DEEP)
+        thisObj.listPeriodNum = response[0].listPeriodNum
+        if(getList) thisObj.getListData()
+        thisObj.loading = false
+      }).catch(response => {
+        thisObj.loading = false
+      })
+    },
+    getChildData (data, node) {
+      let thisObj = this
+      let userId = data.USER_ID
+      let thisData = data
+      if (thisData.leaf) {
+        return ''
+      }
+      if (thisData.isExpanded) {
+        return ''
+      }
+      if (thisData.children !== null && thisData.children.length > 0) {
+        return ''
+      }
+      thisData.displayNone = ''
+      network.getData('atlas/network', {
+        id: userId,
+        deep: thisObj.expandDeep,
+        periodNum: this.periodNum
+      }).then(response => {
+        thisObj.$refs.tree.updateKeyChildren(userId, response.allData)
+        thisObj.listPeriodNum = response.periodNum
+        thisData.displayNone = 'display-none'
+        thisData.isExpanded = true
+      })
+    },
+    countTopDeep(deep,topDeep){
+      return Number(deep)-Number(topDeep)
+    },
+    handleCurrentChange (page) {
+      this.getListData(page, this.pageSize)
+    },
+    handleSizeChange (pageSize) {
+      this.getListData(this.currentPage, pageSize)
+    },
+    handleFilter () {
+      this.getListData(1, this.pageSize)
+      this.tabActiveName = 'two'
+    },
+    handleShow(row) {
+      this.loading = true
+      this.filterForm.userName = row.SEE_USER_NAME
+      this.getListData(1, this.pageSize)
+      this.tabActiveName = 'two'
+    },
+    getListData (page, pageSize) {
+      let obj = this
+      network.getPageData(this, 'atlas/network-list', page, pageSize, this.filterForm, function (response) {
+        obj.allData = response
+        obj.listTopDeep = response.listTopDeep
+      })
+    },
+    onMessageCallback(data) {
+      //this.getData(this.currentPage, this.pageSize, false)
+    },
+    handleExport(){
+      this.$confirm(`Are you sure you want to export the current data?`, 'Hint', {//`确定要导出当前数据吗?`, '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return network.getData(`atlas/network-list-export`, this.filterForm)
+      }).then(response => {
         this.$message({
-          message: 'Getting data, please wait',//正在获取数据,请稍后
+          message: response,
+          type: 'success'
         })
-        let thisObj = this
-        let requestData = {
-          periodNum: this.periodNum
-        }
-        if (this.mainUserName !== null) {
-          requestData = {userName: this.mainUserName,periodNum: this.periodNum}
-        }
-        network.getData('atlas/main-user-info', requestData).then(response => {
-          thisObj.treeData = response
-          thisObj.topDeep = Number(response[0].TOP_NETWORK_DEEP)
-          thisObj.listPeriodNum = response[0].listPeriodNum
-          if(getList) thisObj.getListData()
-          thisObj.loading = false
-        }).catch(response => {
-          thisObj.loading = false
-        })
-      },
-      getChildData (data, node) {
-        let thisObj = this
-        let userId = data.USER_ID
-        let thisData = data
-        if (thisData.leaf) {
-          return ''
-        }
-        if (thisData.isExpanded) {
-          return ''
-        }
-        if (thisData.children !== null && thisData.children.length > 0) {
-          return ''
-        }
-        thisData.displayNone = ''
-        network.getData('atlas/network', {
-          id: userId,
-          deep: thisObj.expandDeep,
-          periodNum: this.periodNum
-        }).then(response => {
-          thisObj.$refs.tree.updateKeyChildren(userId, response.allData)
-          thisObj.listPeriodNum = response.periodNum
-          thisData.displayNone = 'display-none'
-          thisData.isExpanded = true
-        })
-      },
-      countTopDeep(deep,topDeep){
-        return Number(deep)-Number(topDeep)
-      },
-      handleCurrentChange (page) {
-        this.getListData(page, this.pageSize)
-      },
-      handleSizeChange (pageSize) {
-        this.getListData(this.currentPage, pageSize)
-      },
-      handleFilter () {
-        this.getListData(1, this.pageSize)
-        this.tabActiveName = 'two'
-      },
-      handleShow(row) {
-        this.loading = true
-        this.filterForm.userName = row.SEE_USER_NAME
-        this.getListData(1, this.pageSize)
-        this.tabActiveName = 'two'
-      },
-      getListData (page, pageSize) {
-        let obj = this
-        network.getPageData(this, 'atlas/network-list', page, pageSize, this.filterForm, function (response) {
-          obj.allData = response
-          obj.listTopDeep = response.listTopDeep
-        })
-      },
-      onMessageCallback(data) {
-        //this.getData(this.currentPage, this.pageSize, false)
-      },
-      handleExport(){
-        this.$confirm(`Are you sure you want to export the current data?`, 'Hint', {//`确定要导出当前数据吗?`, '提示'
-          confirmButtonText: 'confirm', // 确定
-          cancelButtonText: 'cancel', // 取消
-          type: 'warning'
-        }).then(() => {
-          return network.getData(`atlas/network-list-export`, this.filterForm)
-        }).then(response => {
-          this.$message({
-            message: response,
-            type: 'success'
-          })
-        }).catch(response => {
-
-        })
-      },
-      enterToGetData (ev) {
-        this.getMainData()
-      },
-    }
+      }).catch(response => {
+      })
+    },
+    enterToGetData (ev) {
+      this.getMainData()
+    },
   }
+}
 </script>
 
 <style>

+ 2 - 2
backendEle/src/views/atlas/relation-opt.vue

@@ -32,7 +32,7 @@
                 </span>
           </el-tree>
         </el-tab-pane>
-        <el-tab-pane label="Development network list" name="two" v-if="permission.hasPermission(`user/relation-list`)"><!-- 开拓网络列表 -->
+        <el-tab-pane label="Development network list" name="two" v-if="permission.hasPermission(`atlas/relation-list`)"><!-- 开拓网络列表 -->
           <div class="filter-user">
             <el-input v-model="filterForm.userName" size="small" style="width:300px;">
               <template slot="prepend"><!-- 会员编号 -->Member code</template>
@@ -153,7 +153,7 @@
       getData() {
         this.$message({
           message: 'Getting data, please wait',//正在获取数据,请稍后
-          duration:0
+          duration: 0
         })
         this.periodNum = baseInfo.nowPeriodNum()
         this.filterForm.periodNum = baseInfo.nowPeriodNum()