This commit is contained in:
guochunsi
2026-01-29 17:51:30 +08:00
parent 6ae091abff
commit 682af86d80
16 changed files with 48 additions and 217 deletions

View File

@@ -129,7 +129,12 @@
<el-table-column prop="inoutFlag" label="允许进出" width="100" align="center">
<template #default="scope">
<el-tag v-if="scope.row.inoutFlag">{{ getDictLabel(scope.row.inoutFlag) }}</el-tag>
<el-tag
v-if="scope.row.inoutFlag"
:type="scope.row.inoutFlag === '1' ? 'success' : 'danger'"
>
{{ getDictLabel(scope.row.inoutFlag) }}
</el-tag>
<span v-else>-</span>
</template>
</el-table-column>

View File

@@ -81,7 +81,7 @@
type="primary"
icon="FolderAdd"
@click="handleAdd"
v-if="permissions.professional_outercompanyemployee_add"
v-auth="'professional_outercompanyemployee_add'"
>
</el-button>
@@ -171,21 +171,21 @@
<el-table-column label="操作" width="250" align="center" fixed="right">
<template #default="scope">
<el-button
v-if="permissions.professional_outercompanyemployee_edit"
v-auth="'professional_outercompanyemployee_edit'"
icon="edit-pen"
link
type="primary"
@click="handleEdit(scope.row)">修改
</el-button>
<el-button
v-if="permissions.professional_outercompanyemployee_reset_pw"
v-auth="'professional_outercompanyemployee_reset_pw'"
icon="RefreshLeft"
link
type="primary"
@click="resetPassword(scope.row)">重置密码
</el-button>
<!-- <el-button
v-if="permissions.professional_outercompanyemployee_del"
v-auth="'professional_outercompanyemployee_del'"
icon="delete"
link
type="primary"
@@ -250,14 +250,11 @@
</template>
<script setup lang="ts">
import { ref, reactive, computed, onMounted } from 'vue'
import { storeToRefs } from 'pinia'
import { useUserInfo } from '/@/stores/userInfo'
import { ref, reactive, onMounted } from 'vue'
import { BasicTableProps, useTable } from '/@/hooks/table'
import { useMessage } from '/@/hooks/message'
import { useMessageBox } from '/@/hooks/message'
import { useDict } from '/@/hooks/dict'
import { Session } from '/@/utils/storage'
import { validateNull } from '/@/utils/validate'
import axios from 'axios'
import request from '/@/utils/request'
@@ -272,20 +269,8 @@ import {
resetPassWord
} from '/@/api/professional/stayschool/outercompanyemployee'
import { getList as getCompanyList } from '/@/api/professional/stayschool/outercompany'
import FormTrain from './formTrain.vue'
// 使用 Pinia store
const userInfoStore = useUserInfo()
const { userInfos } = storeToRefs(userInfoStore)
// 创建权限对象
const permissions = computed(() => {
const perms: Record<string, boolean> = {}
userInfos.value.authBtnList.forEach((perm: string) => {
perms[perm] = true
})
return perms
})
import { defineAsyncComponent } from 'vue';
const FormTrain = defineAsyncComponent(() => import('./formTrain.vue'))
// 消息提示 hooks
const message = useMessage()