fuliqi
2024-03-20 00099fc737993004b37dd79645fee8f5f0140f71
临时角色切换按钮
3个文件已修改
23 ■■■■ 已修改文件
src/api/system/role.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Navbar.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/report/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/system/role.js
@@ -56,7 +56,13 @@
    data: data
  })
}
// 切换角色
export function exchangeRole(roleId) {
  return request({
    url: '/system/role/exchange/'+ roleId,
    method: 'get',
  })
}
// 删除角色
export function delRole(roleId) {
  return request({
src/layout/components/Navbar.vue
@@ -6,6 +6,11 @@
    <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
    <div class="right-menu">
      <el-button-group style="vertical-align: text-bottom;">
        <el-button @click="exchange(100)">省厅角色</el-button>
        <el-button @click="exchange(103)">区县角色</el-button>
        <el-button @click="exchange(2)">运维角色</el-button>
      </el-button-group>
      <template v-if="device!=='mobile'">
        <screenfull id="screenfull" class="right-menu-item hover-effect" />
        <el-tooltip content="布局大小" effect="dark" placement="bottom">
@@ -31,6 +36,7 @@
          </el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </div>
  </div>
</template>
@@ -45,7 +51,7 @@
import Search from '@/components/HeaderSearch'
import RuoYiGit from '@/components/RuoYi/Git'
import RuoYiDoc from '@/components/RuoYi/Doc'
import { exchangeRole} from "@/api/system/role";
export default {
  components: {
    Breadcrumb,
@@ -81,6 +87,11 @@
    }
  },
  methods: {
    exchange(roleId){
        exchangeRole(roleId).then(response => {
              this.$modal.msgSuccess("修改成功");
            }).catch(()=>{});
          },
    toggleSideBar() {
      this.$store.dispatch('app/toggleSideBar')
    },
src/views/system/report/index.vue
@@ -104,7 +104,7 @@
            type="text"
            icon="el-icon-edit"
            @click="handleAuditing(scope.row)"
            v-hasPermi="['system:report:auditing']"
            v-hasPermi="['system:report:audit']"
          >审核</el-button>
          <el-button
            size="mini"