index.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <div class="p-3">
  3. <div class="bg-fff flex1 ov-hd d-flex flex-cln">
  4. <div class="d-flex a-c pd-16 border-bottom">
  5. <div class="f-s-20 c-333 f-w-7 mr-10">抽取专家审核</div>
  6. <el-button @click="router.go(-1)" type="primary" text>
  7. <el-icon>
  8. <Back />
  9. </el-icon>
  10. 返回上一级
  11. </el-button>
  12. </div>
  13. <div class="flex1 over-auto"></div>
  14. <div class="d-flex a-c j-c pd-16">
  15. <el-button @click="router.go(-1)">取消</el-button>
  16. <!-- <el-button @click="save" type="primary">提交</el-button> -->
  17. </div>
  18. </div>
  19. </div>
  20. </template>
  21. <script setup name="authority-input" lang="ts">
  22. import { ref, reactive, onMounted } from 'vue';
  23. import { debounce } from 'lodash';
  24. import { useRouter } from 'vue-router';
  25. import { expertPersonAdd, expertPersonUpdate, expertPersonDetail } from '@/api/authority';
  26. const { proxy } = getCurrentInstance() as ComponentInternalInstance;
  27. const { sys_sex_type, dm_educational_type, dm_person_type, dm_position_status } = toRefs<any>(proxy?.useDict('sys_sex_type', 'dm_educational_type', 'dm_person_type', 'dm_position_status'));
  28. const router = useRouter();
  29. const route = useRoute();
  30. const form = ref<any>({
  31. id: undefined,
  32. avatar: '',
  33. name: '',
  34. sex: '0',
  35. status: '1',
  36. attachment: []
  37. });
  38. // 获取专家详情
  39. const getExpertDetail = async () => {
  40. if (route.query?.id) {
  41. const res = await expertPersonDetail(route.query.id);
  42. if (!res || res.code !== 200) return;
  43. form.value = res.data;
  44. }
  45. };
  46. onMounted(() => {
  47. getExpertDetail();
  48. });
  49. </script>