wupengfei
14 小时以前 a686faf1c2132f55e40119df28ce9f6e46206b74
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<template>
  <ProDialog
    title="人员详情"
    v-model="visible"
    @close="onDialogClose"
    destroy-on-close
    draggable
    :width="900"
  >
    <ProTabs v-model="form.tabType" hasBorder>
      <ProTabPane lazy label="人员信息" name="info">
        <StaffDetailInfoView :form="form" />
      </ProTabPane>
      <ProTabPane lazy label="人员简历" name="resume">
        <StaffResumeView :form="form" />
      </ProTabPane>
      <ProTabPane lazy label="签约详情" name="sign">
        <SignDetailView :form="form" />
      </ProTabPane>
    </ProTabs>
 
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="emit('onCancel')">关闭</el-button>
      </span>
    </template>
  </ProDialog>
</template>
 
<script setup lang="ts">
import { FormInstance } from 'element-plus';
import { ProDialog, ProTabs, ProTabPane } from '@bole-core/components';
import StaffDetailInfoView from './StaffDetailInfoView.vue';
import StaffResumeView from './StaffResumeView.vue';
import SignDetailView from './SignDetailView.vue';
 
defineOptions({
  name: 'StaffDetailInfoDialog',
});
 
type Form = {
  title?: string;
  tabType: string;
  id: string;
};
 
const visible = defineModel<boolean>('modelValue');
const form = defineModel<Form>('form');
 
const emit = defineEmits<{
  (e: 'onConfirm'): void;
  (e: 'onCancel'): void;
}>();
 
const dialogForm = ref<FormInstance>();
 
function onDialogClose() {
  if (!dialogForm.value) return;
  dialogForm.value.resetFields();
}
</script>