This commit is contained in:
王创世 2025-03-24 18:06:30 +08:00
parent c8d7594858
commit 78d39f7f3f
3 changed files with 23 additions and 47 deletions

View File

@ -233,12 +233,12 @@ export default [
] ]
}, { }, {
path: '/file_bag', path: '/file_bag',
redirect: '/file_bag/index', redirect: '/file_bag',
component: BasicLayout, component: BasicLayout,
meta: { title: '医德医风档案' }, meta: { title: '医德医风档案' },
children: [ children: [
{ {
path: '/file_bag/index/:id*', path: '/file_bag/index/:id?',
name: 'fileBagIndex', name: 'fileBagIndex',
component: () => import('../../views/file_bag/index.vue'), component: () => import('../../views/file_bag/index.vue'),
meta: { title: '我的档案', closable: true }, meta: { title: '我的档案', closable: true },

View File

@ -26,14 +26,14 @@
<lay-row> <lay-row>
<lay-col :md="5"> <lay-col :md="5">
<lay-form-item label="姓名" label-width="80"> <lay-form-item label="姓名" label-width="80">
<lay-input v-model="searchQuery.nickname" placeholder="请输入" <lay-input v-model="searchQuery.nickname" placeholder="请输入" :allow-clear="true"
:allow-clear="true" style="width: 98%"></lay-input> style="width: 98%"></lay-input>
</lay-form-item> </lay-form-item>
</lay-col> </lay-col>
<lay-col :md="5"> <lay-col :md="5">
<lay-form-item label="手机号" label-width="80px"> <lay-form-item label="手机号" label-width="80px">
<lay-input v-model="searchQuery.mobile" placeholder="请输入" <lay-input v-model="searchQuery.mobile" placeholder="请输入" :allow-clear="true"
:allow-clear="true" style="width: 98%"></lay-input> style="width: 98%"></lay-input>
</lay-form-item> </lay-form-item>
</lay-col> </lay-col>
<lay-col :md="5"> <lay-col :md="5">
@ -47,34 +47,17 @@
</lay-row> </lay-row>
</lay-form> </lay-form>
</lay-card> </lay-card>
<lay-table :page="page" height="600px" :columns="columns" :loading="loading" :default-toolbar="false" <lay-table :page="page" height="600px" :columns="columns" :data-source="dataSource"
:data-source="dataSource" @change="changePage"> @change="changePage">
<template #status="{ row }">
<lay-tag type="danger" v-if="row.status == 0">已禁用</lay-tag>
<lay-tag type="primary" v-if="row.status == 1">正常</lay-tag>
</template>
<template #gender="{ row }"> <template #gender="{ row }">
<span v-if="row.gender == 0">未选择</span> <span v-if="row.gender == 0">未选择</span>
<span v-if="row.gender == 1"></span> <span v-if="row.gender == 1"></span>
<span v-if="row.gender == 2"></span> <span v-if="row.gender == 2"></span>
</template> </template>
<template v-slot:toolbar>
<!-- 移除了新增按钮 -->
</template>
<template v-slot:operator="{ row }"> <template v-slot:operator="{ row }">
<lay-button size="xs" border="green" border-style="dashed" @click="getInfo(row)"> <lay-button size="xs" border="green" border-style="dashed" @click="getInfo(row)">
员工档案 员工档案
</lay-button> </lay-button>
<!-- <lay-button size="xs" border="green" border-style="dashed" @click="getOpenAvg(row,1)">
月度考评
</lay-button>
<lay-button size="xs" border="green" border-style="dashed" @click="getOpenAvg(row,2)">
季度考评
</lay-button>
<lay-button size="xs" border="green" border-style="dashed" @click="getOpenAvg(row,3)">
年度考评
</lay-button> -->
<!-- 移除了删除按钮 -->
</template> </template>
</lay-table> </lay-table>
</div> </div>
@ -94,10 +77,7 @@ import {
import { useUserStore } from "@/store/user"; import { useUserStore } from "@/store/user";
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
const router = useRouter(); const router = useRouter();
const userStore = useUserStore() const userStore = useUserStore()
onMounted(() => { onMounted(() => {
getLeftList(); getLeftList();
}) })
@ -111,7 +91,6 @@ const getUserList = () => {
page.total = res.data.count; page.total = res.data.count;
} else { } else {
dataSource.value = []; dataSource.value = [];
layer.msg(res.msg, { icon: 2 })
} }
}) })
} }
@ -129,8 +108,6 @@ const getLeftList = () => {
data.value = res.data; data.value = res.data;
leftId.value = res.data[0].id; leftId.value = res.data[0].id;
getUserList(); getUserList();
} else {
layer.msg(res.msg, { icon: 2 })
} }
}) })
} }
@ -156,7 +133,6 @@ function handleClick(node: any) {
getUserList(); getUserList();
} }
const loading = ref(false)
const page = reactive({ current: 1, limit: 10, total: 1 }) const page = reactive({ current: 1, limit: 10, total: 1 })
const columns = ref([ const columns = ref([
{ title: '编号', width: '80px', key: 'id', align: 'center' }, { title: '编号', width: '80px', key: 'id', align: 'center' },
@ -169,23 +145,19 @@ const columns = ref([
{ title: '操作', width: '250px', customSlot: 'operator', key: 'operator', fixed: 'right', align: 'center' } { title: '操作', width: '250px', customSlot: 'operator', key: 'operator', fixed: 'right', align: 'center' }
]) ])
const addShow = ref(false)
const title = ref('新增')
// leftId // leftId
const toSearch = () => { const toSearch = () => {
page.current = 1; page.current = 1;
leftId.value = 0;
getUserList(); getUserList();
} }
const userInfo = ref();
const getInfo = (row) => { const getInfo = (row) => {
console.log(row.id);
router.push({ path: '/file_bag/index/' + row.id }); router.push({ path: '/file_bag/index/' + row.id });
} }
</script> </script>
<style scoped> <style>
.organization-box { .organization-box {
width: calc(100vw - 240px); width: calc(100vw - 240px);
height: calc(100vh - 110px); height: calc(100vh - 110px);
@ -344,4 +316,12 @@ const getInfo = (row) => {
.layui-card-body { .layui-card-body {
padding: 0px; padding: 0px;
} }
.layui-table-header .layui-table-cell {
background-color: #ECF8FA !important;
}
.layui-table thead tr {
background-color: #ECF8FA !important;
}
</style> </style>

View File

@ -261,11 +261,6 @@ const genderText = computed(() => {
} }
}); });
//
const formatDate = (dateString) => {
if (!dateString) return '暂无';
return dateString;
};
const jiaList = ref([]); const jiaList = ref([]);
// 使 // 使
const getUserDetail = () => { const getUserDetail = () => {
@ -292,8 +287,9 @@ const toSearchHz = () => {
// 使 // 使
onMounted(() => { onMounted(() => {
//query使userStore.userInfo.id //query使userStore.userInfo.id
if (route.query.id) { console.log(route.params.id);
user_id.value = route.query.id; if (route.params.id != '') {
user_id.value = route.params.id;
} else { } else {
user_id.value = userStore.userInfo.id; user_id.value = userStore.userInfo.id;
} }