兰宝车间质量管理系统-前端
疯狂的狮子Li
2025-01-20 bbe94610a28e72414df1fb2b36a6d11385873e54
src/views/system/user/authRole.vue
@@ -2,7 +2,7 @@
  <div class="p-2">
    <div class="panel">
      <h4 class="panel-title">基本信息</h4>
      <el-form :model="form" label-width="80px" :inline="true">
      <el-form :model="form" :inline="true">
        <el-row :gutter="10">
          <el-col :span="2.5">
            <el-form-item label="用户昵称" prop="nickName">
@@ -39,7 +39,7 @@
          <el-table-column label="权限字符" align="center" prop="roleKey" />
          <el-table-column label="创建时间" align="center" prop="createTime" width="180">
            <template #default="scope">
              <span>{{ parseTime(scope.row.createTime) }}</span>
              <span>{{ proxy.parseTime(scope.row.createTime) }}</span>
            </template>
          </el-table-column>
        </el-table>
@@ -58,6 +58,8 @@
import { RoleVO } from '@/api/system/role/types';
import { getAuthRole, updateAuthRole } from '@/api/system/user';
import { UserForm } from '@/api/system/user/types';
import { RouteLocationNormalized } from 'vue-router';
import { parseTime } from '@/utils/ruoyi';
const route = useRoute();
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -78,8 +80,8 @@
/** 单击选中行数据 */
const clickRow = (row: RoleVO) => {
  // ele的方法有问题,selected应该为可选参数
  tableRef.value?.toggleRowSelection(row, false);
  row.flag = !row.flag;
  tableRef.value?.toggleRowSelection(row, row.flag);
};
/** 多选框选中数据 */
const handleSelectionChange = (selection: RoleVO[]) => {
@@ -91,7 +93,17 @@
};
/** 关闭按钮 */
const close = () => {
  const obj = { path: '/system/user' };
  const obj: RouteLocationNormalized = {
    fullPath: '',
    hash: '',
    matched: [],
    meta: undefined,
    name: undefined,
    params: undefined,
    query: undefined,
    redirectedFrom: undefined,
    path: '/system/user'
  };
  proxy?.$tab.closeOpenPage(obj);
};
/** 提交按钮 */