zhangwei
2025-08-22 83af3dd309889489f541fc8e21894c9f79e5788c
用户管理
4个文件已修改
47 ■■■■ 已修改文件
src/router/modules/item.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/types.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/auth.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mine/index.vue 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/modules/item.ts
@@ -24,7 +24,7 @@
    path: "/user",
    meta: {
      title: "用户管理",
      icon: "mdi:chart-timeline"
      icon: "streamline-logos:my-space-logo"
    },
    children: [
      {
src/store/types.ts
@@ -40,6 +40,7 @@
  code?: string;
  name?: string;
  hasFlsh?: boolean;
  id?: string;
};
export type userType = {
src/utils/auth.ts
@@ -139,7 +139,7 @@
  /**
   * 交易主体 代码 同角色代码
   */
  transactionCode: string;
  transactionCode?: string;
  /**
   * 交易主体名称
   */
src/views/mine/index.vue
@@ -13,14 +13,28 @@
import { enterpriseTypes } from "@/api/register/index";
import { initRouter, getTopMenu, handleAliveRoute } from "@/router/utils";
const isManager = useUserStoreHook().isManager;
import { type CusExtendDto } from "@/utils/auth";
const ruleFormRef = ref<FormInstance>();
const isLoading = ref(false);
const showDialog = ref(false);
const nowRole = computed(() => {
  return useUserStoreHook()?.nowRole;
  if (!state?.ruleForm?.exRoles) {
    return {};
  }
  let nowRoleLiet;
  let obj = {};
  let nowRole = useUserStoreHook()?.nowRole;
  if (state?.ruleForm?.exRoles.length > 1) {
    nowRoleLiet = state.ruleForm.exRoles.find(item => {
      return item.exRoleId == nowRole.id;
    });
    obj = Object.assign(nowRole, nowRoleLiet);
  } else {
    obj = Object.assign(nowRole, state.ruleForm.exRoles[0]);
  }
  return obj;
});
const userInfo = computed(() => {
const userInfo = computed<CusExtendDto>(() => {
  let obj = useUserStoreHook().enterpriseInfo;
  return obj;
});
@@ -80,7 +94,8 @@
    bankName: null, // string,可空
    // 企业银行账号
    bankAccount: null, // string,可空
    bankAccountIMG: null
    bankAccountIMG: null,
    exRoles: null
  },
  enterpriseList: [],
  type: "",
@@ -197,10 +212,19 @@
  // nowRole.value = useUserStoreHook()?.nowRole;
  if (nowRole.value) {
    state.ruleForm.transactionCode = nowRole.value.code;
    // let nowRoleLiet;
    // if (state.ruleForm.exRoles.length > 1) {
    //   nowRoleLiet = state.ruleForm.exRoles.find(item => {
    //     return item.exRoleId == nowRole.value.id;
    //   });
    //   nowRole.value = Object.assign(nowRole.value, nowRoleLiet);
    // } else {
    //   nowRole.value = Object.assign(nowRole.value, state.ruleForm.exRoles[0]);
    // }
    // state.userInfo.transactionName = nowRole.value.name;
  } else {
    state.ruleForm.transactionCode = route.query.code;
    state.userInfo.enterpriseTypeName = route.query.name;
    state.ruleForm.transactionCode = route.query.code as string;
    // state.userInfo.enterpriseTypeName = route.query.name;
  }
  let restypes = await enterpriseTypes();
  state.enterpriseList = restypes?.result;
@@ -366,7 +390,7 @@
    <el-descriptions
      v-if="state.userInfo.enterpriseName"
      class="margin-top"
      title="企业资料"
      title=""
      :column="3"
      border
    >
@@ -378,8 +402,8 @@
          <div class="cell-item">交易主体</div>
        </template>
        {{ nowRole?.name }}
        <el-tag v-if="userInfo.steps == 2" type="success">审核已通过 </el-tag>
        <el-tag v-else-if="userInfo.steps == 3" type="danger"
        <el-tag v-if="nowRole.steps == 2" type="success">审核已通过 </el-tag>
        <el-tag v-else-if="nowRole.steps == 3" type="danger"
          >资料未通过
        </el-tag>
        <el-tag v-else type="warning">资料审核中 </el-tag>