|
|
@@ -21,8 +21,7 @@
|
|
|
|
|
|
<template #table="{ data, loading, tableRef, onSelectionChange }">
|
|
|
<div class="data-table__content">
|
|
|
- <el-table :ref="tableRef as any" v-loading="loading" :data="data" height="100%" border
|
|
|
- @selection-change="onSelectionChange">
|
|
|
+ <el-table :ref="tableRef as any" v-loading="loading" :data="data" height="100%" border @selection-change="onSelectionChange">
|
|
|
<template #empty>
|
|
|
<el-empty :image-size="80" description="暂无数据" />
|
|
|
</template>
|
|
|
@@ -30,14 +29,14 @@
|
|
|
min-width="55" align="center" />
|
|
|
<!-- <el-table-column v-if="contentCols.find((col) => col.prop === 'employee_id')?.show" key="employee_id"
|
|
|
label="员工ID" prop="employee_id" min-width="150" show-overflow-tooltip /> -->
|
|
|
- <el-table-column v-if="contentCols.find((col) => col.prop === 'employee_name')?.show" key="employee_name" label="员工姓名"
|
|
|
- prop="employee_name" min-width="120" show-overflow-tooltip />
|
|
|
+ <el-table-column v-if="contentCols.find((col) => col.prop === 'employee_name')?.show"
|
|
|
+ key="employee_name" label="员工姓名" prop="employee_name" min-width="120" show-overflow-tooltip />
|
|
|
<el-table-column v-if="contentCols.find((col) => col.prop === 'employee_no')?.show" key="employee_no"
|
|
|
label="员工工号" prop="employee_no" min-width="120" show-overflow-tooltip />
|
|
|
- <el-table-column v-if="contentCols.find((col) => col.prop === 'employee_mobile')?.show" key="employee_mobile" label="手机号"
|
|
|
- prop="employee_mobile" min-width="120" />
|
|
|
- <el-table-column v-if="contentCols.find((col) => col.prop === 'employee_email')?.show" key="employee_email" label="邮箱"
|
|
|
- prop="employee_email" min-width="150" show-overflow-tooltip />
|
|
|
+ <el-table-column v-if="contentCols.find((col) => col.prop === 'employee_mobile')?.show"
|
|
|
+ key="employee_mobile" label="手机号" prop="employee_mobile" min-width="120" />
|
|
|
+ <el-table-column v-if="contentCols.find((col) => col.prop === 'employee_email')?.show"
|
|
|
+ key="employee_email" label="邮箱" prop="employee_email" min-width="150" show-overflow-tooltip />
|
|
|
<el-table-column v-if="contentCols.find((col) => col.prop === 'status')?.show" key="status" label="激活状态"
|
|
|
prop="status" min-width="100">
|
|
|
<template #default="scope">
|
|
|
@@ -101,13 +100,13 @@
|
|
|
prop="name" min-width="150" show-overflow-tooltip />
|
|
|
<el-table-column v-if="deptContentCols.find((col) => col.prop === 'code')?.show" key="code" label="部门编码"
|
|
|
prop="code" min-width="120" show-overflow-tooltip />
|
|
|
- <el-table-column v-if="deptContentCols.find((col) => col.prop === 'created_time')?.show" key="created_time"
|
|
|
- label="创建时间" prop="created_time" min-width="160" sortable />
|
|
|
+ <el-table-column v-if="deptContentCols.find((col) => col.prop === 'created_time')?.show"
|
|
|
+ key="created_time" label="创建时间" prop="created_time" min-width="160" sortable />
|
|
|
<el-table-column v-if="deptContentCols.find((col) => col.prop === 'operation')?.show" fixed="right"
|
|
|
label="操作" align="center" min-width="160">
|
|
|
<template #default="scope">
|
|
|
- <el-button v-hasPerm="['module_payment:department:detail']" type="info" size="small" link :icon="View"
|
|
|
- @click="handleOpenDeptDialog('detail', scope.row.department_id)">
|
|
|
+ <el-button v-hasPerm="['module_payment:department:detail']" type="info" size="small" link
|
|
|
+ :icon="View" @click="handleOpenDeptDialog('detail', scope.row.department_id)">
|
|
|
详情
|
|
|
</el-button>
|
|
|
<el-button v-hasPerm="['module_payment:department:update']" type="primary" size="small" link
|
|
|
@@ -133,10 +132,10 @@
|
|
|
<EmployeeDetail :employee-id="currentEmployeeId" :enterprise-id="currentEnterpriseId" />
|
|
|
</template>
|
|
|
<template v-else-if="dialogVisible.entity === 'department'">
|
|
|
- <DepartmentDetail :department-id="currentDepartmentId" />
|
|
|
+ <DepartmentDetail :department-id="currentDepartmentId" :enterprise-id="currentEnterpriseId" />
|
|
|
</template>
|
|
|
</template>
|
|
|
-
|
|
|
+
|
|
|
<template v-else>
|
|
|
<template v-if="dialogVisible.entity === 'employee'">
|
|
|
<EmployeeForm ref="formRef" :type="dialogVisible.type" :employee-id="currentEmployeeId"
|
|
|
@@ -154,7 +153,8 @@
|
|
|
<el-button v-if="dialogVisible.type !== 'detail'" @click="handleResetForm">
|
|
|
重置
|
|
|
</el-button>
|
|
|
- <el-button v-if="dialogVisible.type !== 'detail' && dialogVisible.type === 'create'" type="primary" @click="handleSaveAndAddNext">
|
|
|
+ <el-button v-if="dialogVisible.type !== 'detail' && dialogVisible.type === 'create'" type="primary"
|
|
|
+ @click="handleSaveAndAddNext">
|
|
|
保存并添加下一个
|
|
|
</el-button>
|
|
|
<el-button v-if="dialogVisible.type !== 'detail'" type="primary" @click="handleSubmit">
|
|
|
@@ -171,19 +171,15 @@
|
|
|
保存并添加下一个
|
|
|
</el-button>
|
|
|
<el-button v-else type="primary" @click="handleCloseDialog">确定</el-button>
|
|
|
- </template>
|
|
|
+ </template>
|
|
|
<!-- <el-button @click="handleCloseDialog">取消</el-button> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
</EnhancedDialog>
|
|
|
|
|
|
<!-- 签约链接对话框 -->
|
|
|
- <el-dialog
|
|
|
- v-model="inviteDialogVisible.visible"
|
|
|
- :title="inviteDialogVisible.title"
|
|
|
- width="600px"
|
|
|
- @close="inviteDialogVisible.data = null"
|
|
|
- >
|
|
|
+ <el-dialog v-model="inviteDialogVisible.visible" :title="inviteDialogVisible.title" width="600px"
|
|
|
+ @close="inviteDialogVisible.data = null">
|
|
|
<div v-if="inviteDialogVisible.data" class="invite-link-container">
|
|
|
<el-descriptions :column="1" border>
|
|
|
<el-descriptions-item label="邀请链接">
|
|
|
@@ -196,7 +192,7 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</el-descriptions-item>
|
|
|
-
|
|
|
+
|
|
|
<!-- <el-descriptions-item label="小程序签约二维码">
|
|
|
<div class="qrcode-item">
|
|
|
<div v-if="miniAppQrCode" class="qrcode-container">
|
|
|
@@ -259,7 +255,6 @@ import { useRoute } from "vue-router";
|
|
|
import { ref, reactive, computed } from "vue";
|
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
import { useEnterpriseStore } from "@/store/modules/enterprise.store";
|
|
|
-import QRCode from "qrcode";
|
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
|
@@ -316,15 +311,10 @@ const inviteDialogVisible = reactive({
|
|
|
|
|
|
const useEnterprise = useEnterpriseStore();
|
|
|
|
|
|
-const currentEmployeeId = ref<string>('');
|
|
|
-const currentDepartmentId = ref<string>('');
|
|
|
+const currentEmployeeId = ref<string>("");
|
|
|
+const currentDepartmentId = ref<string>("");
|
|
|
const currentEnterpriseId = computed(() => useEnterprise.getCurrentEnterprise?.enterprise_id || "");
|
|
|
|
|
|
-// 小程序链接二维码
|
|
|
-const miniAppQrCode = computed(() => {
|
|
|
- return '';
|
|
|
-});
|
|
|
-
|
|
|
// 部门搜索配置
|
|
|
const deptSearchConfig = reactive<ISearchConfig>({
|
|
|
permPrefix: "module_payment:department",
|
|
|
@@ -339,12 +329,12 @@ const deptSearchConfig = reactive<ISearchConfig>({
|
|
|
type: "input",
|
|
|
attrs: { placeholder: "请输入部门名称", clearable: true },
|
|
|
},
|
|
|
- {
|
|
|
- prop: "code",
|
|
|
- label: "部门编码",
|
|
|
- type: "input",
|
|
|
- attrs: { placeholder: "请输入部门编码", clearable: true },
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // prop: "code",
|
|
|
+ // label: "部门编码",
|
|
|
+ // type: "input",
|
|
|
+ // attrs: { placeholder: "请输入部门编码", clearable: true },
|
|
|
+ // },
|
|
|
// {
|
|
|
// prop: "status",
|
|
|
// label: "状态",
|
|
|
@@ -536,7 +526,7 @@ async function handleDeleteDepartment(departmentId: string, departmentName: stri
|
|
|
ElMessage.warning("请先选择企业");
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
await ElMessageBox.confirm(
|
|
|
`确定要删除部门「${departmentName}」吗?`,
|
|
|
"删除部门",
|
|
|
@@ -546,7 +536,7 @@ async function handleDeleteDepartment(departmentId: string, departmentName: stri
|
|
|
type: "warning"
|
|
|
}
|
|
|
);
|
|
|
-
|
|
|
+
|
|
|
const res = await DepartmentAPI.deleteDepartment(departmentId, enterpriseId);
|
|
|
if (res.data.code === 200) {
|
|
|
ElMessage.success("删除部门成功");
|
|
|
@@ -616,7 +606,7 @@ async function copyInviteLink(text: string) {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
gap: 8px;
|
|
|
-
|
|
|
+
|
|
|
.el-link {
|
|
|
flex: 1;
|
|
|
word-break: break-all;
|