huahaiyan 6 éve
szülő
commit
b926437994

+ 14 - 4
src/dashoo.cn/backend/api/routers/router.go

@@ -43,26 +43,36 @@ func init() {
 				&controllers.TokenController{},
 			),
 		),
-		beego.NSNamespace("/casbin/users",
+		beego.NSNamespace("/users",
 			beego.NSInclude(
 				&casbin.UserController{},
 			),
 		),
-		beego.NSNamespace("/casbin/role",
+		beego.NSNamespace("/role",
 			beego.NSInclude(
 				&casbin.RoleController{},
 			),
 		),
-		beego.NSNamespace("/casbin/permission",
+		beego.NSNamespace("/permission",
 			beego.NSInclude(
 				&casbin.PermissionController{},
 			),
 		),
-		beego.NSNamespace("/casbin/organizes",
+		beego.NSNamespace("/organizes",
 			beego.NSInclude(
 				&casbin.OrganizesController{},
 			),
 		),
+		beego.NSNamespace("/module",
+			beego.NSInclude(
+				&casbin.ModuleController{},
+			),
+		),
+		beego.NSNamespace("/district",
+			beego.NSInclude(
+				&casbin.DistrictController{},
+			),
+		),
 
 		//授权码管理
 		beego.NSNamespace("/channels",

+ 1 - 1
src/dashoo.cn/backend/api/swagger/swagger.json

@@ -7139,7 +7139,7 @@
                 }
             }
         },
-        "/casbin/users/me": {
+        "/users/me": {
             "get": {
                 "tags": [
                     "users"

+ 1 - 1
src/dashoo.cn/backend/api/swagger/swagger.yml

@@ -4531,7 +4531,7 @@ paths:
         "200":
           schema:
             $ref: '#/definitions/models.User'
-  /casbin/users/me:
+  /users/me:
     get:
       tags:
       - users

+ 1 - 1
src/dashoo.cn/frontend_web/nuxt.config.ignore.js

@@ -106,7 +106,7 @@ module.exports = {
   ],
   auth: {
     user: {
-     endpoint: 'casbin/users/me',
+     endpoint: 'users/me',
      propertyName: '',
      resetOnFail: true
    },

+ 1 - 1
src/dashoo.cn/frontend_web/nuxt.config.js

@@ -133,7 +133,7 @@ module.exports = {
   ],
   auth: {
     user: {
-      endpoint: 'casbin/users/me',
+      endpoint: 'users/me',
       propertyName: '',
       resetOnFail: true
     },

+ 2 - 2
src/dashoo.cn/frontend_web/src/components/Headbar.vue

@@ -6,12 +6,12 @@
       </router-link>
     </h1> -->
     <div v-if="!isMenuHidden" class="brand" style="background-color:#002140;padding-top:7px;padding-left:20px;width:180px;">
-      <router-link to="/indexlims">
+      <router-link to="/">
         <img src="../assets/img/logo_dagang2.png" style="height:35px;" />
       </router-link>
     </div>
     <div v-if="isMenuHidden" class="brand" style="background-color:#002140;padding-top:7px;padding-left:20px;width:36px;">
-      <router-link to="/indexlims">
+      <router-link to="/">
         <img src="../assets/img/title.png" style="height:35px;" />
       </router-link>
     </div>

+ 1 - 1
src/dashoo.cn/frontend_web/src/components/Headbar1.vue

@@ -6,7 +6,7 @@
       </router-link>
     </h1>
     <!-- <h1 class="brand" style="text-align:center;margin-left:10px;margin-right:1px;margin-top:10px;">
-      <router-link to="/indexlims">
+      <router-link to="/">
         <img src="/img/logo_dagang.png" style="height:26px;">
       </router-link>
     </h1> -->

+ 2 - 2
src/dashoo.cn/frontend_web/src/components/sidebar.vue

@@ -18,7 +18,7 @@
       :collapse="isCollapse"
       class="el-menu-vertical-demo"
       :router="true"
-      default-active="/indexlims"
+      default-active="/"
       background-color="#001529"
       text-color="#fff"
       active-text-color="#1890FF"
@@ -157,7 +157,7 @@ export default class Sidebar extends Vue {
 
   async beforeMount () {
     // 暂时从本地取菜单
-    let {data: menus1} = await this.$axios.get('casbin/users/getusermoduletree')
+    let {data: menus1} = await this.$axios.get('users/getusermoduletree')
     let menus = this.toolfun_gettreejson(menus1, 'id', 'pId', 'id,name,url,icon')
     if (menus[0].id == '30000000') {
       menus = menus[0].children

+ 1 - 1
src/dashoo.cn/frontend_web/src/components/sidebar1.vue

@@ -89,7 +89,7 @@ export default class Sidebar extends Vue {
 
   async beforeMount () {
     // 暂时从本地取菜单
-    let {data: menus1} = await this.$axios.get('casbin/users/getusermoduletree')
+    let {data: menus1} = await this.$axios.get('users/getusermoduletree')
     let menus = this.toolfun_gettreejson(menus1, 'id', 'pId', 'id,name,url,icon')
     if (menus[0].id == '30000000') {
       menus = menus[0].children

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/login.vue

@@ -86,7 +86,7 @@
               }
             })
             if (process.env.appclient == 'lims') {
-              this.$router.push(this.$route.query.page || '/indexlims')
+              this.$router.push(this.$route.query.page || '/')
             } else if (process.env.appclient == 'cellbank') {
               this.$router.push(this.$route.query.page || '/indexdqm')
             } else {

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/login1.vue

@@ -72,7 +72,7 @@
               }
             })
             if (process.env.appclient == 'lims') {
-              this.$router.push(this.$route.query.page || '/indexlims')
+              this.$router.push(this.$route.query.page || '/')
             } else if (process.env.appclient == 'cellbank') {
               this.$router.push(this.$route.query.page || '/indexdqm')
             } else {

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/login_bio.vue

@@ -70,7 +70,7 @@ export default class Login extends Vue {
               }
           })
           if (process.env.appclient == 'lims') {
-            this.$router.push(this.$route.query.page || '/indexlims')
+            this.$router.push(this.$route.query.page || '/')
           } else if (process.env.appclient == 'cellbank') {
             this.$router.push(this.$route.query.page || '/indexdqm')
           } else {

+ 2 - 2
src/dashoo.cn/frontend_web/src/pages/system/district.vue

@@ -50,11 +50,11 @@
             <el-table-column prop="Fullname" align="center" label="区域名称" show-overflow-tooltip></el-table-column>
             <el-table-column prop="Parentname" align="center" label="上级区域" show-overflow-tooltip></el-table-column>
             <el-table-column prop="Description" align="center" label="备注" show-overflow-tooltip></el-table-column>
-            <el-table-column label="操作时间" align="center" prop="CreateOn">
+            <!-- <el-table-column label="操作时间" align="center" prop="CreateOn">
               <template slot-scope="scope">
                 <p>{{jstimehandle(scope.row.CreateOn)}}</p>
               </template>
-            </el-table-column>
+            </el-table-column> -->
           </el-table>
         </el-col>
       </el-row>

+ 480 - 0
src/dashoo.cn/frontend_web/src/pages/system/module.vue

@@ -0,0 +1,480 @@
+<template>
+<div>
+    <el-card class="box-card" style="height: calc(100vh - 92px);">
+      <div slot="header" style="height: 20px;">
+        <span style="float: left;">
+          <i class="icon icon-table2"></i>
+        </span>
+        <el-breadcrumb class="heading" style="float: left; margin-left: 5px">
+          <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+          <el-breadcrumb-item :to="{ path: '/system/module' }">菜单管理</el-breadcrumb-item>
+        </el-breadcrumb>
+        <span style="float: right;">
+          <el-button size="mini" type="primary" style="margin-left:10px; margin-top: -4px;" @click="opendatadialog(1,null,-1);resetForm('moduleform')">新增菜单</el-button>
+        </span>
+        <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+          <el-form-item label="菜单名称">
+            <el-input size="mini" style="width: 165px;" v-model="keyword" placeholder="请输入菜单名称"></el-input>
+          </el-form-item>
+          <el-form-item>
+            <el-dropdown split-button type="primary" size="mini" @click="seachdata" @command="searchCommand">
+              查询
+              <el-dropdown-menu slot="dropdown">
+                <!-- <el-dropdown-item command="search">高级查询</el-dropdown-item> -->
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </el-form-item>
+        </el-form>
+      </div>
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-tree highlight-current="true" :expand-on-click-node="true" node-key="id" :data="moduletreelist" :props="orgtreeprops" :default-expanded-keys="userdepartment"
+            @node-click="orgtreeNodeClick" ref="orgmanagetree">
+          </el-tree>
+        </el-col>
+        <el-col :span="18">
+          <el-table :data="tablelist" border>
+            <el-table-column label="操作" width="70" align="center">
+              <template slot-scope="scope">
+                <template v-if="scope.row.Parentid !== 0">
+                  <el-button size="small" type="text" @click="opendatadialog(2,scope.row,scope.$index);resetForm('moduleform')" icon="el-icon-edit"
+                    title="编辑"></el-button>
+                  <el-button size="small" type="text" @click="deletedata(scope.row)" icon="el-icon-delete" title="删除" style="margin-left: 3px"></el-button>
+                  <!--暂时隐藏-->
+                  <el-button v-if="1==2" size="small" type="success" @click="permission(scope.row)">权限</el-button>
+                </template>
+              </template>
+            </el-table-column>
+            <el-table-column prop="Fullname" align="center" label="菜单名称" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="Parentname" align="center" label="上级菜单" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="NavigateUrl" align="center" label="菜单地址" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="ImageIndex" align="center" label="菜单图标" show-overflow-tooltip></el-table-column>
+          </el-table>
+        </el-col>
+      </el-row>
+      <!--分页-->
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[10, 15, 20, 25]"
+        :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+      </el-pagination>
+    </el-card>
+    <!--新增、编辑组织信息-->
+    <el-dialog :title="dialogtitle" :visible.sync="datadialogVisible" top="5vh">
+      <el-form :model="moduleform" :rules="rulesorganize" ref="moduleform">
+        <el-form-item label="上级菜单" label-width="120px" required>
+          <el-cascader :options="moduletreelist" :props="orgtreeprops" change-on-select :show-all-levels="false" v-model="selectedorg"
+            placeholder="请选择菜单"></el-cascader>
+        </el-form-item>
+        <el-form-item label="菜单名称" prop="fullname" label-width="120px">
+          <el-input v-model="moduleform.fullname" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="菜单地址" prop="NavigateUrl" label-width="120px">
+          <el-input v-model="moduleform.NavigateUrl" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="菜单图标" prop="ImageIndex" label-width="120px">
+          <el-input v-model="moduleform.ImageIndex" auto-complete="off"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="datadialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="savedata('moduleform')">确 定</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog :title="permissiondialogtitle" :visible.sync="permissiondatadialogVisible" top="5vh">
+      <el-form ref="alertform">
+        <el-form-item>
+          <div style="margin-left:1px;border:1px #CCCCCC solid;overflow:auto;height:300px;">
+            <el-checkbox-group v-model="binddevices">
+              <el-checkbox v-for="item in devices" :label="item.Id" :key="item.Id" style="margin-left:15px;">{{item.Code}}</el-checkbox>
+            </el-checkbox-group>
+          </div>
+          <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" style="margin-left:15px;">全选</el-checkbox>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top:-35px;">
+        <el-button @click="permissiondatadialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="savepermission()">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  export default {
+    name: 'organize',
+
+    data() {
+      return {
+        downloading: true,
+        selectedNode: 0,
+        currentItemCount: 0,
+        currentPage: 1,
+        size: 10,
+        tablelist: [], // 处理分页用
+        keyword: '',
+        parentid: '',
+        datadialogVisible: false,
+        dialogtitle: '',
+        moduleform: {
+          parentid: 0,
+          fullname: '',
+          description: '',
+          NavigateUrl:'',
+          ImageIndex:'',
+          id: 0
+        },
+        rulesorganize: {
+          fullname: [{
+            required: true,
+            message: '请输入菜单名称',
+            trigger: 'blur'
+          }]
+        },
+        operatingitem: 0,
+        permissiondialogtitle: '',
+        permissiondatadialogVisible: false,
+        binddevices: [],
+        devices: [],
+        devicesallid: [],
+        isIndeterminate: true,
+        checkAll: false,
+        update: true,
+        childArr: [],
+        parentArr: [],
+        // 级联选项
+        options: [],
+        currentOrgan: '请选择菜单',
+        havechild: false,
+        // 数据传输
+        currId: 0,
+        currOrganName: '',
+        moduletreelist: [],
+        orgtreeprops: {
+          value: 'id',
+          label: 'Fullname',
+          children: 'children'
+        },
+        selectedorg: [],
+        userdepartment: []
+      }
+    },
+
+    created() {
+      // initial data
+      this.initData()
+      this.getmoduletreelist()
+    },
+    updated() {},
+    watch: {},
+    computed: mapGetters({
+      authUser: 'authUser'
+    }),
+    methods: {
+      initData() {
+        let _this = this
+        // paginate
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          keyword: this.keyword,
+          parentid: this.parentid,
+        }
+        // request
+        this.$axios.get('/module/listbandparentname', {
+            params
+          })
+          .then(res => {
+            console.log("======res.data.items1=====",res.data.items)
+            // response
+            _this.tablelist = res.data.items
+            _this.currentItemCount = res.data.currentItemCount
+            _this.downloading = false
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      getmoduletreelist() {
+        let _this = this
+        // request
+        _this.$axios.get('/module/list', {
+          })
+          .then(res => {
+            console.log("======res.data.items2=====",res.data.items)
+            _this.moduletreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      orgtreeNodeClick(data) {
+        this.parentid = data.id + ''
+        this.currentPage = 1
+        this.initData()
+      },
+      seachdata() {
+        this.currentPage = 1
+        this.initData()
+      },
+      permission(v) {
+        this.binddevices = []
+        this.permissiondialogtitle = '权限设置'
+        this.permissiondatadialogVisible = true
+        this.currId = v.Id
+        this.currOrganName = v.Fullname
+        this.$axios.get('/equipment/bindequipment/' + this.currId, null)
+          .then(res => {
+            // response
+            for (var i = 0; i < res.data.items.length; i++) {
+              this.binddevices.push(res.data.items[i].Id)
+            }
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      savepermission() {
+        let _this = this
+        _this.$axios.put('/equipment/permission/' + this.currId, {
+            EquipmentIds: this.binddevices + '',
+            OrganizeName: this.currOrganName
+          })
+          .then(res => {
+            // response
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+              _this.permissiondatadialogVisible = false
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(() => {})
+      },
+      handleSizeChange(value) {
+        this.size = value
+        this.currentPage = 1
+        this.initData()
+      },
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.initData()
+      },
+      jstimehandle(val) {
+        val = val.replace('T', ' ')
+        return val.substring(0, 19)
+      },
+      opendatadialog(item, v, index) {
+        this.operatingitem = item
+        this.datadialogVisible = true
+        this.clearorganizeform()
+        let _this = this
+        if (item === 1) {
+          _this.dialogtitle = `新增菜单`
+          if (this.parentid !== '') {
+            this.$axios.get('/module/parentlist/' + this.parentid, {})
+              .then(res => {
+                if (res.data.code === 0) {
+                  // 选中状态
+                  _this.selectedorg = []
+                  let pidarr = res.data.message.split(',')
+                  for (var i = pidarr.length - 1; i >= 0; i--) {
+                    if (pidarr[i] !== '0') {
+                      _this.selectedorg.push(parseInt(pidarr[i]))
+                    }
+                  }
+                } else {
+                  _this.$message({
+                    type: 'warning',
+                    message: '出现错误!'
+                  })
+                  this.datadialogVisible = false
+                }
+              })
+              .catch(err => {
+                // handle error
+                console.error(err)
+              })
+          }
+        } else if (item === 2) {
+          this.$axios.get('/module/parentlist/' + v.Parentid, {})
+            .then(res => {
+              if (res.data.code === 0) {
+                _this.dialogtitle = `编辑菜单信息(${v.Fullname})`
+                _this.moduleform.parentid = v.Parentid
+                _this.moduleform.fullname = v.Fullname
+                _this.moduleform.description = v.Description
+                _this.moduleform.id = v.Id
+                _this.moduleform.NavigateUrl = v.NavigateUrl
+                _this.moduleform.ImageIndex =v.ImageIndex
+                _this.selectedorg.push(parseInt(v.Parentid))
+              } else {
+                _this.$message({
+                  type: 'warning',
+                  message: '出现错误!'
+                })
+                this.datadialogVisible = false
+              }
+            })
+            .catch(err => {
+              // handle error
+              console.error(err)
+            })
+        }
+      },
+      savedata(formName) {
+        let _this = this
+        this.$refs[formName].validate((valid) => {
+          if (valid) {
+            _this.moduleform.parentid = parseInt(_this.selectedorg[_this.selectedorg.length - 1])
+            if (_this.moduleform.parentid === 0) {
+              _this.$message({
+                type: 'warning',
+                message: '请选择上一级组织!'
+              })
+              return
+            }
+            if (_this.moduleform.parentid === _this.moduleform.id) {
+              _this.$message({
+                type: 'warning',
+                message: '上一级组织不能为自身数据!'
+              })
+              return
+            }
+            if (_this.operatingitem === 1) {
+              _this.$axios.post('module/', _this.moduleform)
+                .then(res => {
+                  // response
+                  if (res.data.code === 0) {
+                    _this.$message({
+                      type: 'success',
+                      message: res.data.message
+                    })
+                    _this.datadialogVisible = false
+                    this.initData()
+                    // 重新加载tree数据
+                    _this.getmoduletreelist()
+                  } else {
+                    _this.$message({
+                      type: 'warning',
+                      message: res.data.message
+                    })
+                  }
+                })
+                .catch(err => {
+                  // handle error
+                  console.error(err)
+                })
+            } else if (_this.operatingitem === 2) {
+              _this.$axios.put('module/' + _this.moduleform.id, _this.moduleform)
+                .then(res => {
+                  // response
+                  if (res.data.code === 0) {
+                    _this.$message({
+                      type: 'success',
+                      message: res.data.message
+                    })
+                    _this.datadialogVisible = false
+                    // 更新界面
+                    _this.initData()
+                    // 重新加载tree数据
+                    _this.getmoduletreelist()
+                  } else {
+                    _this.$message({
+                      type: 'warning',
+                      message: res.data.message
+                    })
+                  }
+                })
+                .catch(() => {})
+            }
+          } else {
+            return false
+          }
+        })
+      },
+      deletedata(val) {
+        let _this = this
+        _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          _this.$axios.delete('module/' + val.Id, null)
+            .then(res => {
+              // response
+              if (res.data.code === 0) {
+                _this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+                // 更新界面
+                _this.initData()
+                // 重新加载tree数据
+                _this.getmoduletreelist()
+              } else {
+                _this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            })
+            .catch(() => {})
+        }).catch(() => {})
+      },
+      resetForm(formName) {
+        //this.$refs[formName].resetFields()
+      },
+      clearorganizeform() {
+        this.moduleform = {
+          parentid: 0,
+          fullname: '',
+          description: '',
+          NavigateUrl:'',
+          ImageIndex:'',
+          id: 0
+        }
+      },
+      searchCommand(command) {
+        if (command == 'clear') {
+          this.clearSearch()
+        }
+      },
+      clearSearch() {
+        this.keyword = ''
+        this.initData()
+      }
+    }
+  }
+
+</script>
+
+<style lang="scss">
+  .el-pagination {
+    margin: 1rem 0 2rem;
+    text-align: right;
+  }
+
+  .triggerone {
+    font-size: 13px;
+    margin-left: 80px;
+  }
+
+  .plab {
+    font-size: 13px;
+    color: #999;
+  }
+
+</style>

+ 7 - 7
src/dashoo.cn/frontend_web/src/pages/system/organize.vue

@@ -187,7 +187,7 @@
           IsInnerOrganize: this.organizeform.IsInnerOrganize
         }
         // request
-        this.$axios.get('casbin/organizes/listbandparentname', {
+        this.$axios.get('organizes/listbandparentname', {
             params
           })
           .then(res => {
@@ -215,7 +215,7 @@
         let params = {
           IsInnerOrganize: this.organizeform.IsInnerOrganize
         }
-        _this.$axios.get('casbin/organizes/list', {
+        _this.$axios.get('organizes/list', {
             params
           })
           .then(res => {
@@ -296,7 +296,7 @@
         let _this = this
         if (item === 1) {
           if (this.parentid !== '') {
-            this.$axios.get('casbin/organizes/parentlist/' + this.parentid, {})
+            this.$axios.get('organizes/parentlist/' + this.parentid, {})
               .then(res => {
                 if (res.data.code === 0) {
                   _this.dialogtitle = `新增组织`
@@ -322,7 +322,7 @@
               })
           }
         } else if (item === 2) {
-          this.$axios.get('casbin/organizes/parentlist/' + v.Parentid, {})
+          this.$axios.get('organizes/parentlist/' + v.Parentid, {})
             .then(res => {
               if (res.data.code === 0) {
                 _this.dialogtitle = `编辑组织信息(${v.Fullname})`
@@ -373,7 +373,7 @@
             }
             if (_this.operatingitem === 1) {
               _this.organizeform.IsInnerOrganize = 1
-              _this.$axios.post('casbin/organizes/', _this.organizeform)
+              _this.$axios.post('organizes/', _this.organizeform)
                 .then(res => {
                   // response
                   if (res.data.code === 0) {
@@ -398,7 +398,7 @@
                 })
             } else if (_this.operatingitem === 2) {
               _this.organizeform.IsInnerOrganize = 1
-              _this.$axios.put('casbin/organizes/' + _this.organizeform.id, _this.organizeform)
+              _this.$axios.put('organizes/' + _this.organizeform.id, _this.organizeform)
                 .then(res => {
                   // response
                   if (res.data.code === 0) {
@@ -432,7 +432,7 @@
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          _this.$axios.delete('casbin/organizes/' + val.Id, null)
+          _this.$axios.delete('organizes/' + val.Id, null)
             .then(res => {
               // response
               if (res.data.code === 0) {

+ 16 - 16
src/dashoo.cn/frontend_web/src/pages/system/userrole.vue

@@ -292,7 +292,7 @@
         // paginate
         const params = { _currentPage: this.currentPage, _size: this.size, keyword: this.searchform.name }
         // request
-        this.$axios.get('casbin/role/list', { params })
+        this.$axios.get('role/list', { params })
           .then(res => {
             // response
             _this.list = res.data.items
@@ -307,7 +307,7 @@
       },
        getpartuserlist() {
          let _this =this
-        this.$axios.get('casbin/users/list', {})
+        this.$axios.get('users/list', {})
           .then(res => {
             // response
             _this.partuserlist = res.data.items
@@ -364,7 +364,7 @@
         let useridlist = tempOfficers.join(',');
         let useridliststring = useridlist.toString()
         // request
-        this.$axios.put('casbin/role/setuserrole/' + useridliststring + '_' + this.selectRoleId, {})
+        this.$axios.put('role/setuserrole/' + useridliststring + '_' + this.selectRoleId, {})
           .then(res => {
             // response
             if (res.data.code === 0) {
@@ -396,7 +396,7 @@
           _size: this.userSize
         }
         // request
-        this.$axios.get('/casbin/role/getusersforrole/'+rid, {
+        this.$axios.get('role/getusersforrole/'+rid, {
           params
         })
           .then(res => {
@@ -437,7 +437,7 @@
       setpower(val) {
         let _this = this
         _this.operationid = val.Id
-        _this.$axios.get('/casbin/role/getpower?id=' + _this.operationid, null)
+        _this.$axios.get('role/getpower?id=' + _this.operationid, null)
           .then(res => {
             // response
             _this.modulepowerdata = window.toolfun_gettreejson(res.data.Module, 'id', 'pId', 'id,name')
@@ -470,7 +470,7 @@
         console.log(val)
         let _this = this
         _this.operationid = val.Id
-        _this.$axios.get('/casbin/role/getItemPower?id=' + _this.operationid, null)
+        _this.$axios.get('role/getItemPower?id=' + _this.operationid, null)
           .then(res => {
             console.log(res.data)
             // response
@@ -491,7 +491,7 @@
         console.log(val)
         let _this = this
         _this.operationid = val.Id
-        _this.$axios.get('/casbin/role/getItemPower?id=' + _this.operationid, null)
+        _this.$axios.get('role/getItemPower?id=' + _this.operationid, null)
           .then(res => {
             console.log(res.data)
             // response
@@ -518,7 +518,7 @@
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          _this.$axios.delete('/casbin/role/deleteuser/'+val.Id+ '_' +this.selectRoleId, null)
+          _this.$axios.delete('role/deleteuser/'+val.Id+ '_' +this.selectRoleId, null)
             .then(res => {
               // response
               if (res.data.code === 0) {
@@ -546,7 +546,7 @@
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          _this.$axios.delete('/casbin/role/deletealluser/'+this.selectRoleId + '', null)
+          _this.$axios.delete('role/deletealluser/'+this.selectRoleId + '', null)
             .then(res => {
               // response
               if (res.data.code === 0) {
@@ -573,7 +573,7 @@
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          _this.$axios.delete('/casbin/role/deleterole/'+val.Id + '', null)
+          _this.$axios.delete('role/deleterole/'+val.Id + '', null)
             .then(res => {
               // response
               if (res.data.code === 0) {
@@ -653,7 +653,7 @@
           orgids.push(row.id)
         })
         let _this = this
-        _this.$axios.put('/casbin/role/savepower?id=' + _this.operationid + '&moduleids=' + orgids, {})
+        _this.$axios.put('role/savepower?id=' + _this.operationid + '&moduleids=' + orgids, {})
           .then(res => {
             // response
             if (res.data.code === 0) {
@@ -681,7 +681,7 @@
           organizeids.push(row.id)
         })
         // request
-        this.$axios.put('casbin/role/savedepartmentmessageview?id=' + this.selectedroleid + '&organizeids=' + organizeids, {})
+        this.$axios.put('role/savedepartmentmessageview?id=' + this.selectedroleid + '&organizeids=' + organizeids, {})
           .then(res => {
             // response
             if (res.data.code === 0) {
@@ -709,7 +709,7 @@
         this.selectedroleid = val.Id
         let _this = this
         // request
-        this.$axios.get('/casbin/role/getdepartment?id=' + this.selectedroleid, {})
+        this.$axios.get('role/getdepartment?id=' + this.selectedroleid, {})
           .then(res => {
            // response
             _this.operationOrganizeData = window.toolfun_gettreejson(res.data.Organize, 'id', 'pId', 'id,name,scope')
@@ -731,7 +731,7 @@
         this.selectedroleid = val.Id
         let _this = this
         // request
-        this.$axios.get('/casbin/role/getdistrict?id=' + this.selectedroleid, {})
+        this.$axios.get('role/getdistrict?id=' + this.selectedroleid, {})
           .then(res => {
            // response
             _this.operationdistrictData = window.toolfun_gettreejson(res.data.District, 'id', 'pId', 'id,name,scope')
@@ -756,7 +756,7 @@
           districtids.push(row.id)
         })
         // request
-        this.$axios.put('casbin/role/savedistrict?id=' + this.selectedroleid + '&districtids=' + districtids, {})
+        this.$axios.put('role/savedistrict?id=' + this.selectedroleid + '&districtids=' + districtids, {})
           .then(res => {
             // response
             if (res.data.code === 0) {
@@ -794,7 +794,7 @@
           orgids.push(row.id)
         })
         let _this = this
-        _this.$axios.put('/casbin/role/saveOperationPower?id=' + this.operationid + '&operids=' + orgids, {})
+        _this.$axios.put('role/saveOperationPower?id=' + this.operationid + '&operids=' + orgids, {})
           .then(res => {
             // response
             if (res.data.code === 0) {

+ 7 - 7
src/dashoo.cn/frontend_web/src/pages/system/users.vue

@@ -265,7 +265,7 @@
           keyword: this.keyword
         }
         // request
-        this.$axios.get('casbin/users/list', {
+        this.$axios.get('users/list', {
             params
           })
           .then(res => {
@@ -277,7 +277,7 @@
             // handle error
             console.error(err)
           })
-        this.$axios.get('casbin/role/list', {})
+        this.$axios.get('role/list', {})
           .then(res => {
             // response
             _this.rolelist = res.data.items
@@ -316,7 +316,7 @@
         this.selectedrole = []
         let _this = this
         // request
-        this.$axios.get('casbin/users/getuserrole/' + this.selecteduserid, {})
+        this.$axios.get('casb/users/getuserrole/' + this.selecteduserid, {})
           .then(res => {
             _this.mustrolelist = []
             // response
@@ -357,7 +357,7 @@
         }
         let rolestring = this.selectedrole.join(',')
         // request
-        this.$axios.put('casbin/users/setuserrole/' + this.selecteduserid + '_' + rolestring, {})
+        this.$axios.put('users/setuserrole/' + this.selecteduserid + '_' + rolestring, {})
           .then(res => {
             // response
             if (res.data.code === 0) {
@@ -495,7 +495,7 @@
           if (valid) {
             this.userform.departmentid = this.selectedorg[this.selectedorg.length - 1] + ''
             if (_this.operatingitem === 1) {
-              _this.$axios.post('casbin/users', _this.userform)
+              _this.$axios.post('users', _this.userform)
                 .then(res => {
                   // response
                   if (res.data.code === 0) {
@@ -518,7 +518,7 @@
                   console.error(err)
                 })
             } else if (_this.operatingitem === 2) {
-              _this.$axios.put('casbin/users/' + _this.userform.id, _this.userform)
+              _this.$axios.put('users/' + _this.userform.id, _this.userform)
                 .then(res => {
                   // response
                   if (res.data.code === 0) {
@@ -551,7 +551,7 @@
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          _this.$axios.delete('casbin/users/' + val.Id, null)
+          _this.$axios.delete('users/' + val.Id, null)
             .then(res => {
               // response
               if (res.data.code === 0) {