|
@@ -1,17 +1,7 @@
|
|
|
<template>
|
|
|
- <a-modal
|
|
|
- :width="1200"
|
|
|
- v-model:visible="visible"
|
|
|
- title="查看岗位信息"
|
|
|
- :closable="true"
|
|
|
- :keyboard="false"
|
|
|
- :mask-closable="true"
|
|
|
- ok-text="确定"
|
|
|
- @ok="onCommit"
|
|
|
- @cancel="onCancel"
|
|
|
- >
|
|
|
+ <Modal v-model:visible="visible" title="操作" ok-text="提交" @ok="onCommit" @cancel="onCancel()" >
|
|
|
<div class="modal-search">
|
|
|
- <a-form ref="modalFormRef" :model="thePostRecommend" autocomplete="off">
|
|
|
+ <Form ref="modalFormRef" :model="thePostRecommend" autocomplete="off">
|
|
|
<a-form-item label="入职状态" :label-col="{ span: 4}" name="entryState">
|
|
|
<a-select ref="select" v-model:value="thePostRecommend.entryState"
|
|
|
:options="entryStateList" :field-names="{ label: 'name', value: 'value' }">
|
|
@@ -20,78 +10,65 @@
|
|
|
<a-form-item label="备注" :label-col="{ span: 4 }" name="remark">
|
|
|
<a-textarea :auto-size="{ minRows: 4, maxRows: 10 }" v-model:value="thePostRecommend.remark" placeholder="请输入备注" :allow-clear="true"/>
|
|
|
</a-form-item>
|
|
|
- </a-form>
|
|
|
+ </Form>
|
|
|
</div>
|
|
|
- </a-modal>
|
|
|
+ </Modal>
|
|
|
</template>
|
|
|
-
|
|
|
-<script lang="ts">
|
|
|
-import {defineComponent, ref} from "vue";
|
|
|
-import type {SelectProps,FormInstance} from "ant-design-vue";
|
|
|
-import {saveRemark, setEntryState} from "@/api/jobUserManager/recommendMgt";
|
|
|
+<script setup lang="ts">
|
|
|
+import {Form, Modal, SelectProps} from 'ant-design-vue';
|
|
|
+import {ref} from "vue";
|
|
|
+import type {FormInstance} from 'ant-design-vue';
|
|
|
+import {setEntryState,saveRemark} from '@/api/jobUserManager/recommendMgt';
|
|
|
import {getSysDictionaryList} from "@/api/system/dictionary";
|
|
|
|
|
|
-export default defineComponent({
|
|
|
- props: {
|
|
|
- loadData: {
|
|
|
- type: Function,
|
|
|
- default: null
|
|
|
- }
|
|
|
- },
|
|
|
- setup() {
|
|
|
-
|
|
|
- const visible = ref<boolean>(false);
|
|
|
- const loading = ref<boolean>(false);
|
|
|
- const modalFormRef = ref<FormInstance>();
|
|
|
- const entryStateList = ref<SelectProps['options']>();
|
|
|
- const thePostRecommend = ref({
|
|
|
- recommendMgtID:"",
|
|
|
- entryState:0,
|
|
|
- remark:""
|
|
|
- });
|
|
|
+defineOptions({
|
|
|
+ name:'remarkAddModal',
|
|
|
+ inheritAttrs: false,
|
|
|
+ components: {
|
|
|
+ Form,Modal
|
|
|
+ }
|
|
|
+});
|
|
|
|
|
|
- const show = async function (curRecommend:any) {
|
|
|
- loading.value = true;
|
|
|
- getSysDictionaryList('EntryState').then((data) => {
|
|
|
- entryStateList.value = data;
|
|
|
- });
|
|
|
- thePostRecommend.value = curRecommend;
|
|
|
- console.log(thePostRecommend.value);
|
|
|
- loading.value = false;
|
|
|
- visible.value = true;
|
|
|
- };
|
|
|
+const visible = ref<boolean>(false);
|
|
|
+const loading = ref<boolean>(false);
|
|
|
+const entryStateList = ref<SelectProps['options']>();
|
|
|
+const thePostRecommend = ref({
|
|
|
+ recommendMgtID:"",
|
|
|
+ entryState:0,
|
|
|
+ remark:""
|
|
|
+});
|
|
|
+const modalFormRef = ref<FormInstance>();
|
|
|
|
|
|
+const show = async function (curRecommend:any) {
|
|
|
+ loading.value = true;
|
|
|
+ getSysDictionaryList('EntryState').then((data) => {
|
|
|
+ entryStateList.value = data;
|
|
|
+ });
|
|
|
+ thePostRecommend.value = curRecommend;
|
|
|
+ console.log(thePostRecommend.value);
|
|
|
+ loading.value = false;
|
|
|
+ visible.value = true;
|
|
|
+};
|
|
|
|
|
|
- const onCommit =() =>{
|
|
|
- saveRemark(thePostRecommend.value).then(()=>{
|
|
|
- setEntryState(thePostRecommend.value).then(()=>{
|
|
|
- visible.value = false;
|
|
|
- });
|
|
|
- });
|
|
|
- };
|
|
|
+defineExpose({show});
|
|
|
+const emits = defineEmits(['modalClosed']);
|
|
|
+const handleModalClosed = (e) => {
|
|
|
+ emits('modalClosed', e);
|
|
|
+};
|
|
|
|
|
|
- const onCancel =() =>{
|
|
|
+const onCommit =() =>{
|
|
|
+ saveRemark(thePostRecommend.value).then(()=>{
|
|
|
+ setEntryState(thePostRecommend.value).then(()=>{
|
|
|
visible.value = false;
|
|
|
- };
|
|
|
+ handleModalClosed(true);
|
|
|
+ });
|
|
|
+ });
|
|
|
+};
|
|
|
|
|
|
- return {
|
|
|
- visible,
|
|
|
- loading,
|
|
|
- modalFormRef,
|
|
|
- entryStateList,
|
|
|
- thePostRecommend,
|
|
|
- show,
|
|
|
- onCommit,
|
|
|
- onCancel,
|
|
|
- };
|
|
|
- },
|
|
|
- created() {
|
|
|
+const onCancel =() =>{
|
|
|
+ visible.value = false;
|
|
|
+ handleModalClosed(true);
|
|
|
+};
|
|
|
|
|
|
- }
|
|
|
-})
|
|
|
</script>
|
|
|
-<style scoped>
|
|
|
-
|
|
|
-</style>
|
|
|
-
|
|
|
|