| @@ -5,8 +5,8 @@ | |||
| <link rel="icon" type="image/svg+xml" href="/logo_1.jpg" /> | |||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |||
| <title>菊城人才市场后台管理</title> | |||
| <script type="module" crossorigin src="/assets/index-AZrlCp8c.js"></script> | |||
| <link rel="stylesheet" crossorigin href="/assets/index-CfxQrvHe.css"> | |||
| <script type="module" crossorigin src="/assets/index-dwm8dLBC.js"></script> | |||
| <link rel="stylesheet" crossorigin href="/assets/index-3v74tuIc.css"> | |||
| </head> | |||
| <body> | |||
| <div id="app"></div> | |||
| @@ -4,6 +4,16 @@ | |||
| :expanded-row-keys="state.expandRowKeys" | |||
| :rowClassName="(record, index) => (index % 2 === 1 ? 'table-striped' : null)" :loading="loading" | |||
| :scroll="{ y: 600 }"> | |||
| <template #image="{ record }"> | |||
| <slot name="image" :record='record'></slot> | |||
| </template> | |||
| <template #hide_ad="{ record }"> | |||
| <slot name="hide_ad" :record='record'></slot> | |||
| </template> | |||
| <template #status="{ record }"> | |||
| <slot name="status" :record='record'></slot> | |||
| </template> | |||
| <template #stick_top="{ record }"> | |||
| <slot name="stick_top" :record='record'></slot> | |||
| </template> | |||
| @@ -36,7 +36,7 @@ | |||
| watch(() => [props.list, props.select_value, props.select_disabled], | |||
| (newVal, oldVal) => { | |||
| listOptions.value = newVal[0] | |||
| selectValue.value = newVal[1] == '' ? placeholder.value : newVal[1]; | |||
| selectValue.value = newVal[1] ? newVal[1] : null; | |||
| selectDisabled.value = newVal[2]; | |||
| mode.value = newVal[3] | |||
| }, { immediate: true }) | |||
| @@ -1,7 +1,7 @@ | |||
| <template> | |||
| <div style="display: flex;"> | |||
| <a-upload-dragger v-model:file-list="fileList" class="avatar-uploader" :show-upload-list="false" | |||
| :before-upload="beforeUpload" :data="uploadData" :customRequest="uploadCustom" @drop="handleDrop"> | |||
| :before-upload="beforeUpload" :data="uploadData" :customRequest="uploadCustom" @drop="handleDrop" > | |||
| <p class="ant-upload-drag-icon"> | |||
| <inbox-outlined></inbox-outlined> | |||
| </p> | |||
| @@ -59,10 +59,12 @@ | |||
| console.log(res.data.data.filename) | |||
| message.success(`上传文件成功`); | |||
| emit('uploadSuccess', res.data.data.filename) | |||
| }).catch(err => { | |||
| message.danger('上传失败,请联系管理员'); | |||
| }).catch(error => { | |||
| message.warn('文件上传失败,请检查文件类型,如有疑问,请咨询管理员'); | |||
| }) | |||
| } | |||
| </script> | |||
| <style scoped lang="less"> | |||
| @@ -129,14 +129,18 @@ export const useCommon = () => { | |||
| // 禁止使用日期 | |||
| const disabledDate = (val : Dayjs) => { | |||
| return val && val < dayjs().endOf('day'); | |||
| }; | |||
| const disabledDateFront = (val : Dayjs) => { | |||
| return val && val > dayjs().endOf('day'); | |||
| }; | |||
| // 照片前缀 | |||
| // const imageprefix : string = 'https://admin1.jcjob.cn/img/' | |||
| const imageprefix : string = 'https://rcsc-test.jcjob.cn/img/' | |||
| return { | |||
| store, | |||
| commomParams, | |||
| @@ -153,6 +157,7 @@ export const useCommon = () => { | |||
| ExclamationCircleOutlined, | |||
| Modal, | |||
| disabledDate, | |||
| disabledDateFront, | |||
| imageprefix, | |||
| openSearchModel, | |||
| showSearch, | |||
| @@ -1,7 +1,7 @@ | |||
| <template> | |||
| <a-modal v-model:visible="openAddModel" :title="title" ok-text="提交" cancel-text="取消" @ok="sumbitForm" | |||
| @cancel="cancelModal" width="50%"> | |||
| <a-form :model="createForm" :label-col="{span: 4}" labelAlign="right"> | |||
| <a-form :model="createForm" layout="vertical"> | |||
| <a-row gutter="20"> | |||
| <a-col span="24"> | |||
| <a-form-item required label="选择门店地址"> | |||
| @@ -64,8 +64,8 @@ | |||
| let title = ref<String>('新增活动地址'); | |||
| let showMap = ref<Boolean>(false); | |||
| let createForm = ref<companyDepartmentType.addFormType>(dataForm) | |||
| let addOtherForm = ref<companyDepartmentType.addOtherFormType>(otherDataForm) | |||
| let createForm = ref(dataForm) | |||
| let addOtherForm = ref(otherDataForm) | |||
| onMounted(() => { | |||
| @@ -87,7 +87,7 @@ | |||
| const getCateValue = (val : Object) => { | |||
| createForm.value.cate = val.key; | |||
| } | |||
| // 经纬度 | |||
| const getLoc = (mapData : Object) => { | |||
| console.log(mapData) | |||
| @@ -46,7 +46,7 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'desc', | |||
| keyword: '' | |||
| } | |||
| } | |||
| @@ -9,13 +9,13 @@ | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="地址" v-model:value="commomParams.search.keyword" | |||
| placeholder="请输入地址" /> | |||
| placeholder="请输入地址" @keyup.enter="getData"/> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="请输入地址分类" v-model:value="commomParams.search.cate" | |||
| placeholder="请输入地址分类" /> | |||
| <search-select placeholder="请搜索选择地址分类" :list="cate_list" :select_value="commomParams.search.cate" | |||
| @searchData="cateSearch" @getSelectValue="getCateValue"></search-select> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| @@ -25,6 +25,8 @@ | |||
| <script lang="ts" setup> | |||
| import { ref, onMounted, watch, computed } from 'vue'; | |||
| import { GetActivityaddressCate} from '@/apis/models'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| let { store, commomParams, openSearchModel, hideSearch } = useCommon(); | |||
| let props = defineProps(['search_params']); | |||
| @@ -33,6 +35,10 @@ | |||
| openSearchModel = computed(() => { | |||
| return store.state.openSearchModel; | |||
| }) | |||
| onMounted(() => { | |||
| cateSearch() | |||
| }) | |||
| interface listType { | |||
| @@ -40,10 +46,10 @@ | |||
| } | |||
| commomParams.value.search = commomParams.value.search as listType; | |||
| commomParams.value.search.cate = ''; | |||
| watch(() => props.search_params, (newVal) => { | |||
| emit('searchData', commomParams.value.search) | |||
| }) | |||
| commomParams.value.search.cate = null; | |||
| // watch(() => props.search_params, (newVal) => { | |||
| // emit('searchData', commomParams.value.search) | |||
| // }) | |||
| const getData = () => { | |||
| emit('searchData', commomParams.value.search); | |||
| @@ -56,15 +62,32 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'desc', | |||
| keyword: '' | |||
| } | |||
| emit('clearData', commomParams.value.search); | |||
| hideSearch() | |||
| } | |||
| const onClose = () => { | |||
| clearSearch() | |||
| hideSearch() | |||
| } | |||
| let cate_list = ref<Object[]>([]) | |||
| const cateSearch = (val : Object) => { | |||
| GetActivityaddressCate(val).then((res : object) => { | |||
| const data = res.data.activity_address_cate.map((item : object) => ({ | |||
| label: item, | |||
| value: item, | |||
| })); | |||
| cate_list.value = data; | |||
| }) | |||
| } | |||
| const getCateValue = (val : Object) => { | |||
| commomParams.value.search.cate = val.key; | |||
| getData() | |||
| } | |||
| </script> | |||
| <style> | |||
| @@ -1,7 +1,7 @@ | |||
| <template> | |||
| <a-modal v-model:visible="openAddModel" title="新增广告位置" ok-text="提交" cancel-text="取消" @ok="sumbitForm" | |||
| @cancel="cancelModal" width="50%"> | |||
| <a-form :model="createForm" :label-col="{span: 4}" labelAlign="right"> | |||
| <a-form :model="createForm" layout="vertical"> | |||
| <a-row gutter="20"> | |||
| <a-col span="24"> | |||
| <a-form-item required label="广告类别名称" name="name"> | |||
| @@ -6,7 +6,7 @@ | |||
| <template #default="{ record }"> | |||
| <a-row :gutter="10"> | |||
| <a-col><a-button type="primary" size="small" primary @click="edit(record)">编辑</a-button></a-col> | |||
| <a-popconfirm title="是否删除该广告位置?" @confirm="delOneRole(record.id)"> | |||
| <a-popconfirm title="是否删除该广告位置?" @confirm="del(record.id)"> | |||
| <a-col><a-button type="primary" size="small" danger>删除</a-button></a-col> | |||
| </a-popconfirm> | |||
| </a-row> | |||
| @@ -42,7 +42,7 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'desc', | |||
| keyword: '' | |||
| } | |||
| } | |||
| @@ -91,7 +91,7 @@ | |||
| // 删除 | |||
| const delOneRole = (id : number) => { | |||
| const del = (id : number) => { | |||
| commomParams.value.delRecord = { id: id }; | |||
| PostAdvertareaDel(commomParams.value.delRecord).then(res => { | |||
| message.success('删除成功'); | |||
| @@ -8,7 +8,7 @@ | |||
| <a-row :gutter="[10]"> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="广告类别名称" v-model:value="commomParams.search.keyword" placeholder="广告类别名称" /> | |||
| <a-input addon-before="广告类别名称" v-model:value="commomParams.search.keyword" placeholder="广告类别名称" @keyup.enter="getData"/> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| @@ -27,9 +27,9 @@ | |||
| return store.state.openSearchModel; | |||
| }) | |||
| watch(() => props.search_params, (newVal) => { | |||
| emit('searchData', commomParams.value.search) | |||
| }) | |||
| // watch(() => props.search_params, (newVal) => { | |||
| // emit('searchData', commomParams.value.search) | |||
| // }) | |||
| const getData = () => { | |||
| emit('searchData', commomParams.value.search); | |||
| @@ -42,7 +42,7 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'desc', | |||
| keyword: '' | |||
| } | |||
| emit('clearData', commomParams.value.search); | |||
| @@ -1,7 +1,7 @@ | |||
| <template> | |||
| <a-modal v-model:visible="openAddModel" title="投放广告" ok-text="提交" cancel-text="取消" @ok="sumbitForm" | |||
| @cancel="cancelModal" width="50%"> | |||
| <a-form :model="createForm" :label-col="{span: 4}" labelAlign="right" style="margin-top: 20px;"> | |||
| <a-form :model="createForm" layout="vertical"> | |||
| <a-row gutter="20"> | |||
| <a-col span="24"> | |||
| <a-form-item required label="投放位置" name="area_id"> | |||
| @@ -36,8 +36,8 @@ | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="有效期至" name="valid_date"> | |||
| <a-date-picker v-model:value="dataForm.valid_date" @Change="validDateChange" | |||
| <a-form-item required label="有效期至"> | |||
| <a-date-picker v-model:value="dataForm.valid_date" @Change="validDateChange" :disabled-date="disabledDate" | |||
| style="width: 100%;" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| @@ -65,17 +65,18 @@ | |||
| import { GetAdvertareaList, getCompanyList, PostAdvertscheduleAdd, PostAdvertscheduleUpdate } from '@/apis/models'; | |||
| import { dataForm, otherDataForm, reset } from '@/views/advertisement/putin/add/data.ts'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| let { store, openAddModel, hideModal, message, dayjs, } = useCommon(); | |||
| let { store, openAddModel, hideModal, message, dayjs, disabledDate, imageprefix } = useCommon(); | |||
| const dayjsRef = ref(dayjs); | |||
| const emit = defineEmits(); | |||
| let props = defineProps(['edit_record']); | |||
| let success_img = ref<String>('') | |||
| let createForm = ref<companyDepartmentType.addFormType>(dataForm) | |||
| let addOtherForm = ref<companyDepartmentType.addOtherFormType>(otherDataForm) | |||
| let createForm = ref(dataForm) | |||
| let addOtherForm = ref(otherDataForm) | |||
| onMounted(() => { | |||
| areaSearch({ page: 1, pagesize: 10 }) | |||
| areaSearch({ page: 1, pagesize: 1000 }) | |||
| companySearch({ page: 1, pagesize: 10 }) | |||
| }) | |||
| @@ -99,7 +100,7 @@ | |||
| // 上传图片 | |||
| const uploadSuccess = (data : Object) => { | |||
| createForm.value.image_url = data; | |||
| addOtherForm.value.image_url = "https://rcsc-test.jcjob.cn/img" + data; | |||
| addOtherForm.value.image_url = imageprefix + data; | |||
| } | |||
| @@ -177,13 +178,13 @@ | |||
| ad_description: newVal.ad_description, | |||
| target_url: newVal.target_url, | |||
| show_order: newVal.show_order, | |||
| valid_date: newVal.valid_dateimage_url, | |||
| valid_date: newVal.valid_dateimage_url ? dayjsRef.value(newVal.valid_dateimage_url) : '' , | |||
| hide_ad: newVal.hide_ad, | |||
| company_id: newVal.company_id, | |||
| } | |||
| addOtherForm.value = { | |||
| area_name: newVal.area_name, | |||
| image_url: newVal.image_url, | |||
| image_url: imageprefix + newVal.image_url, | |||
| company_name: newVal.company_name | |||
| } | |||
| } | |||
| @@ -13,7 +13,10 @@ export const cols = <ColType.type[]>[ | |||
| }, | |||
| { | |||
| title: '是否显示', | |||
| dataIndex: 'hide_ad' | |||
| dataIndex: 'hide_ad', | |||
| slots: { | |||
| customRender: 'hide_ad' | |||
| } | |||
| }, | |||
| { | |||
| title: '操作', | |||
| @@ -5,6 +5,11 @@ | |||
| </a-c-operation> | |||
| <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page" | |||
| @page="getPage" :loading="loading"> | |||
| <template #hide_ad="{ record }"> | |||
| <a-tag color="green" v-if="record.hide_ad == 2">显示</a-tag> | |||
| <a-tag color="red" v-if="record.hide_ad == 1">隐藏</a-tag> | |||
| </template> | |||
| <template #default="{ record }"> | |||
| <a-row :gutter="10"> | |||
| <a-col><a-button type="primary" size="small" primary @click="edit(record)">编辑</a-button></a-col> | |||
| @@ -38,17 +43,13 @@ | |||
| } | |||
| const clearData = (data : object) => { | |||
| if (data) { | |||
| commomParams.value.search = data | |||
| } else { | |||
| commomParams.value.search = { | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| keyword: '', | |||
| hide_ad: 0 | |||
| } | |||
| commomParams.value.search = { | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'desc', | |||
| keyword: '', | |||
| hide_ad: 0 | |||
| } | |||
| getData(); | |||
| } | |||
| @@ -8,7 +8,7 @@ | |||
| <a-row :gutter="[10]"> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="广告类别名称" v-model:value="commomParams.search.keyword" placeholder="广告类别名称" /> | |||
| <a-input addon-before="投放位置" v-model:value="commomParams.search.keyword" placeholder="请输入投放位置" @keyup.enter="getData"/> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| @@ -27,9 +27,9 @@ | |||
| return store.state.openSearchModel; | |||
| }) | |||
| watch(() => props.search_params, (newVal) => { | |||
| emit('searchData', commomParams.value.search) | |||
| }) | |||
| // watch(() => props.search_params, (newVal) => { | |||
| // emit('searchData', commomParams.value.search) | |||
| // }) | |||
| const getData = () => { | |||
| emit('searchData', commomParams.value.search); | |||
| @@ -42,7 +42,7 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'desc', | |||
| keyword: '' | |||
| } | |||
| emit('clearData', commomParams.value.search); | |||
| @@ -1,4 +1,4 @@ | |||
| declare namespace companyDepartmentType { | |||
| declare namespace CompanyDepartmentType { | |||
| type addFormType = { | |||
| id ?: Number, | |||
| name?: String, | |||
| @@ -1,7 +1,7 @@ | |||
| <template> | |||
| <a-modal v-model:visible="openAddModel" :title="title" ok-text="提交" cancel-text="取消" @ok="sumbitForm" | |||
| @cancel="cancelModal" width="50%"> | |||
| <a-form :model="createForm" :label-col="{span: 2}" labelAlign="right" style="margin-top: 20px;"> | |||
| <a-form :model="createForm" layout="vertical"> | |||
| <a-row gutter="20"> | |||
| <a-col span="24"> | |||
| <a-form-item required label="选择企业" name="company_id"> | |||
| @@ -50,8 +50,8 @@ | |||
| let title = ref<String>('新增部门'); | |||
| let selectDisabled = ref<Boolean>(false) | |||
| let createForm = ref<companyDepartmentType.addFormType>(dataForm) | |||
| let addOtherForm = ref<companyDepartmentType.addOtherFormType>(otherDataForm) | |||
| let createForm = ref<CompanyDepartmentType.addFormType>(dataForm) | |||
| let addOtherForm = ref<CompanyDepartmentType.addOtherFormType>(otherDataForm) | |||
| onMounted(() => { | |||
| @@ -8,7 +8,7 @@ export let dataForm = { | |||
| } | |||
| export let otherDataForm = { | |||
| full_name: '', | |||
| full_name: null, | |||
| } | |||
| export const reset = () => { | |||
| @@ -21,7 +21,7 @@ export const reset = () => { | |||
| email: '', | |||
| }; | |||
| otherDataForm = { | |||
| full_name: '', | |||
| full_name: null, | |||
| } | |||
| return { dataForm, otherDataForm } | |||
| @@ -40,7 +40,7 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'desc', | |||
| keyword: '' | |||
| } | |||
| } | |||
| @@ -1,17 +1,22 @@ | |||
| <template> | |||
| <a-drawer :width="500" title="搜索" placement="right" :open="openSearchModel" @close="onClose"> | |||
| <template #extra> | |||
| <a-button style="margin-right: 8px" @click="clearSearch">清空搜索</a-button> | |||
| <a-button type="primary" @click="getData">搜索</a-button> | |||
| </template> | |||
| <a-form :model="commomParams.search"> | |||
| <a-row :gutter="[10]"> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="企业名称" v-model:value="commomParams.search.keyword" | |||
| placeholder="请输入企业名称" /> | |||
| <a-input addon-before="部门名称" v-model:value="commomParams.search.keyword" placeholder="请输入部门名称" | |||
| @keyup.enter="getData" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="请选择公司" v-model:value="commomParams.search.company_id" | |||
| placeholder="请输入企业名称" /> | |||
| <search-select placeholder="请搜索选择企业" :list="company_list" | |||
| :select_value="commomParams.search.company_id" @searchData="companySearch" | |||
| @getSelectValue="getCompanyValue"></search-select> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| @@ -21,26 +26,30 @@ | |||
| <script lang="ts" setup> | |||
| import { ref, onMounted, watch, computed } from 'vue'; | |||
| import { getCompanyList } from '@/apis/models'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| let { store, commomParams, openSearchModel, hideSearch } = useCommon(); | |||
| let props = defineProps(['search_params']); | |||
| const emit = defineEmits(); | |||
| onMounted(() => { | |||
| companySearch() | |||
| }) | |||
| openSearchModel = computed(() => { | |||
| return store.state.openSearchModel; | |||
| }) | |||
| interface listType { | |||
| expired : Number | 0, | |||
| status : Number | 0 | |||
| company_id : Number | 0, | |||
| } | |||
| commomParams.value.search = commomParams.value.search as listType; | |||
| commomParams.value.search.company_id = 0; | |||
| watch(() => props.search_params, (newVal) => { | |||
| emit('searchData', commomParams.value.search) | |||
| }) | |||
| commomParams.value.search.company_id = null; | |||
| // watch(() => props.search_params, (newVal) => { | |||
| // emit('searchData', commomParams.value.search) | |||
| // }) | |||
| const getData = () => { | |||
| emit('searchData', commomParams.value.search); | |||
| @@ -53,15 +62,33 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'desc', | |||
| keyword: '' | |||
| } | |||
| emit('clearData', commomParams.value.search); | |||
| hideSearch() | |||
| } | |||
| const onClose = () => { | |||
| clearSearch() | |||
| hideSearch() | |||
| } | |||
| // 选择企业 | |||
| let company_list = ref<Object[]>([]) | |||
| const companySearch = (val : Object) => { | |||
| getCompanyList(val).then((res : object) => { | |||
| const data = res.data.list.map((item : object) => ({ | |||
| label: item.full_name, | |||
| value: item.id, | |||
| })); | |||
| company_list.value = data; | |||
| }) | |||
| } | |||
| const getCompanyValue = (val : Object) => { | |||
| commomParams.value.search.company_id = val.key; | |||
| getData() | |||
| } | |||
| </script> | |||
| <style> | |||
| @@ -1,4 +1,4 @@ | |||
| declare namespace companyListType { | |||
| declare namespace CompanyListType { | |||
| type addrFormType = { | |||
| full_name ?: String, | |||
| registration_number ?: String, | |||
| @@ -24,7 +24,9 @@ declare namespace companyListType { | |||
| license_status : '', | |||
| login_name ?: String, | |||
| login_pwd ?: String, | |||
| company_photos ?: Object[] | |||
| company_photos ?: Object[], | |||
| longitude?: Number, | |||
| latitude?: Number, | |||
| } | |||
| type addOtherFormType = { | |||
| @@ -1,7 +1,7 @@ | |||
| <template> | |||
| <a-modal v-model:visible="openAddModel" title="新增企业" ok-text="提交" cancel-text="取消" @ok="sumbitForm" | |||
| @cancel="cancelModal" width="50%"> | |||
| <a-form :model="createForm" :label-col="{span: 6}" labelAlign="right"> | |||
| <a-form :model="createForm" layout="vertical"> | |||
| <a-steps :current="current" :items="steps"></a-steps> | |||
| <div class="steps-content"> | |||
| <div v-show="current == 0"> | |||
| @@ -18,7 +18,7 @@ | |||
| </a-col> | |||
| <a-col span="12"> | |||
| <a-form-item required label="成立日期" name="establishment_date"> | |||
| <a-date-picker v-model:value="addOtherForm.chengli_date" :disabled-date="disabledDate" | |||
| <a-date-picker v-model:value="addOtherForm.chengli_date" :disabled-date="disabledDateFront" | |||
| @Change="establishmentDateChange" style="width: 100%;" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| @@ -60,17 +60,20 @@ | |||
| </a-col> | |||
| <a-col span="12"> | |||
| <a-form-item label="选择经度"> | |||
| <a-input v-model:value="createForm.address" placeholder="选择经度" disabled/> | |||
| <a-input v-model:value="createForm.longitude" placeholder="选择经度" disabled/> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="12"> | |||
| <a-form-item label="选择纬度"> | |||
| <a-input v-model:value="createForm.address" placeholder="选择纬度" disabled/> | |||
| <a-input v-model:value="createForm.latitude" placeholder="选择纬度" disabled/> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item label="选择经纬度" :label-col="{span: 0}"> | |||
| <v-map @getLoc="getLoc"></v-map> | |||
| <a-form-item label="选择经纬度"> | |||
| <a-switch v-model:checked="showMap"> </a-switch> | |||
| <div v-if="showMap"> | |||
| <v-map @getLoc="getLoc"></v-map> | |||
| </div> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="12"> | |||
| @@ -78,7 +81,6 @@ | |||
| <a-input v-model:value="createForm.address" placeholder="请输入详细地址" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="12"> | |||
| <a-form-item label="所属行业"> | |||
| <a-c-cascader :dict="2004" @saveCascader="industrySave" placeholder="请选择所属行业" | |||
| @@ -98,7 +100,7 @@ | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item label="企业简介" :label-col="{span: 0}"> | |||
| <a-form-item label="企业简介" > | |||
| <QuillEditor theme="snow" :options="options" toolbar="full" | |||
| v-model:content="addOtherForm.content" @update:content="onEditorUpdate($event)" | |||
| contentType="html" /> | |||
| @@ -139,7 +141,7 @@ | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="企业相册" :label-col="{span: 0}"> | |||
| <a-form-item required label="企业相册" > | |||
| <upload-one upload_txt="上传企业相册" @uploadSuccess="uploadSuccess" | |||
| :success_image="addOtherForm.company_photo_img" images_length="5" :image_type="3" | |||
| :images_list="addOtherForm.company_photos" | |||
| @@ -186,7 +188,7 @@ | |||
| import { EyeTwoTone, EyeInvisibleOutlined } from '@ant-design/icons-vue'; | |||
| import { steps, dataForm, otherDataForm, reset } from '@/views/company/list/add/data.js'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| let { store, openAddModel, hideModal, dayjs, disabledDate, richOption, message, imageprefix } = useCommon(); | |||
| let { store, openAddModel, hideModal, dayjs, disabledDateFront, richOption, message, imageprefix } = useCommon(); | |||
| const dayjsRef = ref(dayjs); | |||
| const emit = defineEmits(); | |||
| let props = defineProps(['edit_record']); | |||
| @@ -199,8 +201,8 @@ | |||
| current.value--; | |||
| }; | |||
| let createForm = ref<companyListType.addFormType>(dataForm) | |||
| let addOtherForm = ref<companyListType.addOtherFormType>(otherDataForm) | |||
| let createForm = ref<CompanyListType.addFormType>(dataForm) | |||
| let addOtherForm = ref<CompanyListType.addOtherFormType>(otherDataForm) | |||
| // 上传图片 | |||
| // 企业照片 | |||
| @@ -216,7 +218,7 @@ | |||
| } | |||
| // 企业相册 | |||
| const uploadSuccess = (data : Object) => { | |||
| addOtherForm.value.company_photo_img = imageprefix + data | |||
| addOtherForm.value.company_photo_img.push(`imageprefix + data`) | |||
| createForm.value.company_photos.push({ photo: data }) | |||
| } | |||
| const delImageAfter = (data : Object[]) => { | |||
| @@ -236,6 +238,15 @@ | |||
| createForm.value.district = data.arr1[2] ? data.arr1[2] : 0; | |||
| createForm.value.street = data.arr1[3] ? data.arr1[3] : 0; | |||
| } | |||
| let showMap = ref<Boolean>(false); | |||
| // 经纬度 | |||
| const getLoc = (mapData : Object) => { | |||
| createForm.value.address = mapData.poiaddress; | |||
| createForm.value.longitude = mapData.latlng.lng; | |||
| createForm.value.latitude = mapData.latlng.lat; | |||
| showMap.value = false; | |||
| } | |||
| // 所属行业 industrySave | |||
| const industrySave = (data) => { | |||
| @@ -308,12 +319,12 @@ | |||
| } | |||
| let newVal = res.data; | |||
| addOtherForm.value = { | |||
| chengli_date: dayjsRef.value(newVal.establishment_date), | |||
| chengli_date: newVal.establishment_date ? dayjsRef.value(newVal.establishment_date) : '', | |||
| content: newVal.introduction, | |||
| photo_img: imageprefix + newVal.photo, | |||
| license_img: imageprefix + newVal.photo, | |||
| company_photos: addOtherForm.value.company_photos, | |||
| company_address_cascader: newVal.province_name + newVal.city_name + newVal.district_name + newVal.street_name, | |||
| company_address_cascader: newVal.province_name ? [newVal.province , newVal.city , newVal.district , newVal.street] : [], | |||
| company_industry_cascader: newVal.industry_text, | |||
| company_nature_cascader: newVal.nature_text, | |||
| } | |||
| @@ -42,7 +42,9 @@ export let dataForm = { | |||
| license_path: '', | |||
| license_status: 1, | |||
| login_pwd: '', | |||
| company_photos: [] | |||
| company_photos: [], | |||
| longitude: 0, | |||
| latitude: 0 | |||
| } | |||
| export let otherDataForm = { | |||
| @@ -82,7 +84,9 @@ export const reset = () => { | |||
| license_path: '', | |||
| license_status: 1, | |||
| login_pwd: '', | |||
| company_photos: [] | |||
| company_photos: [], | |||
| longitude: 0, | |||
| latitude: 0 | |||
| }; | |||
| otherDataForm = { | |||
| chengli_date: '', | |||
| @@ -42,20 +42,6 @@ export const cols = <ColType.type[]>[ | |||
| title: '会员状态', | |||
| dataIndex: 'member_status_text', | |||
| width: 100 | |||
| },{ | |||
| title: '操作', | |||
| dataIndex: 'code', | |||
| width: 100 | |||
| }, | |||
| { | |||
| title: '招聘会', | |||
| dataIndex: 'description', | |||
| width: 100 | |||
| }, | |||
| { | |||
| title: '开通状态', | |||
| dataIndex: 'description', | |||
| width: 100 | |||
| }, | |||
| { | |||
| title: '企业照片', | |||
| @@ -33,8 +33,7 @@ | |||
| import { getCompanyList } from '@/apis/models'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| import { cols } from '@/views/company/list/columns'; | |||
| import { message } from 'ant-design-vue'; | |||
| let { store, commomParams, showModal, showOtherModal1, imageprefix } = useCommon(); | |||
| let { store, commomParams, showModal, showOtherModal1, imageprefix, message } = useCommon(); | |||
| let loading = ref<Boolean>(true); | |||
| onMounted(() => { | |||
| getData(commomParams.value.search); | |||
| @@ -53,7 +52,7 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'desc', | |||
| keyword: '' | |||
| } | |||
| } | |||
| @@ -23,21 +23,37 @@ | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="会员类型" v-model:value="commomParams.search.member_type" placeholder="请输入会员类型" @keyup.enter="getData"/> | |||
| <a-select v-model:value="commomParams.search.member_type" placeholder="请选择会员类型" @change="memberTypeChange"> | |||
| <a-select-option :value="0">全部</a-select-option> | |||
| <a-select-option :value="1">试用申请中</a-select-option> | |||
| <a-select-option :value="2">试用正式</a-select-option> | |||
| <a-select-option :value="3">普通申请中</a-select-option> | |||
| <a-select-option :value="4">普通正式</a-select-option> | |||
| <a-select-option :value="5">VIP申请中</a-select-option> | |||
| <a-select-option :value="6">VIP正式</a-select-option> | |||
| </a-select> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="会员状态" v-model:value="commomParams.search.member_status" placeholder="请输入会员状态" @keyup.enter="getData"/> | |||
| <a-select v-model:value="commomParams.search.member_status" placeholder="请选择会员状态" @change="memberStatusChange"> | |||
| <a-select-option :value="0">全部</a-select-option> | |||
| <a-select-option :value="1">待审</a-select-option> | |||
| <a-select-option :value="2">正常</a-select-option> | |||
| <a-select-option :value="3">到期</a-select-option> | |||
| <a-select-option :value="4">推荐</a-select-option> | |||
| </a-select> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="开通状态" v-model:value="commomParams.search.status" placeholder="请输入开通状态" @keyup.enter="getData"/> | |||
| <a-select v-model:value="commomParams.search.status" placeholder="请选择开通状态" @change="statusChange"> | |||
| <a-select-option :value="0">全部</a-select-option> | |||
| <a-select-option :value="1">开启</a-select-option> | |||
| <a-select-option :value="2">关闭</a-select-option> | |||
| </a-select> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| </a-form> | |||
| </a-drawer> | |||
| @@ -65,13 +81,13 @@ | |||
| commomParams.value.search = commomParams.value.search as listType; | |||
| commomParams.value.search.login_name = ''; | |||
| commomParams.value.search.id = 0; | |||
| commomParams.value.search.member_type = ''; | |||
| commomParams.value.search.member_status = 0; | |||
| commomParams.value.search.status = 0; | |||
| commomParams.value.search.member_type = null; | |||
| commomParams.value.search.member_status = null; | |||
| commomParams.value.search.status = null; | |||
| watch(() => props.search_params, (newVal) => { | |||
| emit('searchData', commomParams.value.search) | |||
| }) | |||
| // watch(() => props.search_params, (newVal) => { | |||
| // emit('searchData', commomParams.value.search) | |||
| // }) | |||
| const getData = () => { | |||
| emit('searchData', commomParams.value.search); | |||
| @@ -84,16 +100,30 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'desc', | |||
| keyword: '' | |||
| } | |||
| emit('clearData', commomParams.value.search); | |||
| hideSearch() | |||
| } | |||
| const onClose = () => { | |||
| clearSearch() | |||
| hideSearch() | |||
| } | |||
| const memberTypeChange = (val) => { | |||
| getData() | |||
| } | |||
| const memberStatus = (val) => { | |||
| getData() | |||
| } | |||
| const statusChange = (val) => { | |||
| getData() | |||
| } | |||
| </script> | |||
| <style> | |||
| @@ -1,7 +1,7 @@ | |||
| <template> | |||
| <a-modal v-model:visible="openAddModel" title="职位信息" ok-text="提交" cancel-text="取消" @ok="sumbitForm" | |||
| @cancel="cancelModal" width="60%" style="top: 20px"> | |||
| <a-form :model="createForm" labelAlign="right"> | |||
| <a-form :model="createForm" layout="vertical"> | |||
| <a-steps :current="current" :items="steps"></a-steps> | |||
| <div class="steps-content"> | |||
| <div v-show="current == 0"> | |||
| @@ -40,14 +40,14 @@ | |||
| <a-col span="24"> | |||
| <a-form-item required label="职位类别"> | |||
| <a-shujilian :dict="2004" placeholder="职位类别(最多三个,多选只取前三)" @saveTreeNode="jobTypeChange" | |||
| :select_content="createForm.job_type"></a-shujilian> | |||
| :tree_content="createForm.job_type"></a-shujilian> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="工作区域"> | |||
| <a-shujilian :dict="2009" placeholder="工作区域(最多四个,多选只取前四)" | |||
| @saveTreeNode="jobAddressChange" | |||
| :select_content="createForm.job_location"></a-shujilian> | |||
| :tree_content="createForm.job_location"></a-shujilian> | |||
| </a-form-item> | |||
| </a-col> | |||
| @@ -518,12 +518,49 @@ | |||
| openAddModel = computed(() => { | |||
| return store.state.openAddModel; | |||
| }) | |||
| const addToLocationArray = (data) => { | |||
| let locationArray = []; | |||
| if (data.location_province !== 0) { | |||
| locationArray.push(data.location_province); | |||
| } | |||
| if (data.location_city !== 0) { | |||
| locationArray.push(data.location_city); | |||
| } | |||
| if (data.location_town !== 0) { | |||
| locationArray.push(data.location_town); | |||
| } | |||
| return locationArray; | |||
| } | |||
| watch(() => props.edit_record, (newVal1) => { | |||
| if (newVal1) { | |||
| PostCompanyJobInfo({ id: newVal1.id }).then(res => { | |||
| let newVal = res.data; | |||
| let resData = res.data; | |||
| createForm.value = intersectionAlike(createForm.value, res.data) | |||
| createForm.value.id = resData.id; | |||
| addOtherForm.value = { | |||
| department_name: resData.department_id, | |||
| describe_content: resData.describe_text, | |||
| daoqi_date: dayjsRef.value(resData.disabled_date), | |||
| pay_range_cascader: resData.pay_range, | |||
| shisu_select: resData.shisu, | |||
| holidays_select: resData.holidays, | |||
| company_jiguan_cascader: [resData.household_province, resData.household_city], | |||
| company_suozaidi_cascader: addToLocationArray(resData) | |||
| } | |||
| if (resData.fulltime == 1) { | |||
| addOtherForm.value.job_nature = 1 | |||
| } else if (resData.parttime == 1) { | |||
| addOtherForm.value.job_nature = 2 | |||
| } else if (resData.casual == 1) { | |||
| addOtherForm.value.job_nature = 3 | |||
| } else if (resData.practical == 1) { | |||
| addOtherForm.value.job_nature = 4 | |||
| } else if (resData.campus == 1) { | |||
| addOtherForm.value.job_nature = 5 | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| @@ -43,7 +43,7 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'desc', | |||
| keyword: '' | |||
| } | |||
| } | |||
| @@ -8,16 +8,28 @@ | |||
| <a-row :gutter="[10]"> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="职位名称" v-model:value="commomParams.search.expired" | |||
| placeholder="请输入企业名称" /> | |||
| <a-input addon-before="职位名称" v-model:value="commomParams.search.keyword" | |||
| placeholder="请输入职位名称" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="登录名称" v-model:value="commomParams.search.status" placeholder="请输入登录名称" /> | |||
| <a-select v-model:value="commomParams.search.expired" placeholder="请选择过期状态" @change="expiredChange"> | |||
| <a-select-option :value="0">全部</a-select-option> | |||
| <a-select-option :value="1">未过期</a-select-option> | |||
| <a-select-option :value="2">已过期</a-select-option> | |||
| </a-select> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-select v-model:value="commomParams.search.status" placeholder="请选择职位状态" @change="statusChange"> | |||
| <a-select-option :value="0">全部</a-select-option> | |||
| <a-select-option :value="1">开启</a-select-option> | |||
| <a-select-option :value="2">关闭</a-select-option> | |||
| </a-select> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| </a-form> | |||
| </a-drawer> | |||
| @@ -41,12 +53,12 @@ | |||
| } | |||
| commomParams.value.search = commomParams.value.search as listType; | |||
| commomParams.value.search.expired = 1; | |||
| commomParams.value.search.status = 0; | |||
| commomParams.value.search.expired = null; | |||
| commomParams.value.search.status = null; | |||
| watch(() => props.search_params, (newVal) => { | |||
| emit('searchData', commomParams.value.search) | |||
| }) | |||
| // watch(() => props.search_params, (newVal) => { | |||
| // emit('searchData', commomParams.value.search) | |||
| // }) | |||
| const getData = () => { | |||
| emit('searchData', commomParams.value.search); | |||
| @@ -59,7 +71,7 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'dsec', | |||
| keyword: '' | |||
| } | |||
| emit('clearData', commomParams.value.search); | |||
| @@ -70,6 +82,14 @@ | |||
| clearSearch() | |||
| hideSearch() | |||
| } | |||
| const expiredChange = (val) => { | |||
| getData() | |||
| } | |||
| const statusChange = (val) => { | |||
| getData() | |||
| } | |||
| </script> | |||
| <style> | |||
| @@ -1,4 +1,4 @@ | |||
| declare namespace companyVipType { | |||
| declare namespace CompanyVipType { | |||
| type addFormType = { | |||
| id ?: Number, | |||
| probation ?: Number, | |||
| @@ -1,7 +1,7 @@ | |||
| <template> | |||
| <a-modal v-model:visible="openAddModel" title="修改VIP信息" ok-text="提交" cancel-text="取消" @ok="sumbitForm" | |||
| @cancel="cancelModal" width="50%"> | |||
| <a-form :model="createForm" labelAlign="right"> | |||
| <a-form :model="createForm" layout="vertical"> | |||
| <a-row gutter="20"> | |||
| <a-col span="24"> | |||
| <a-form-item label="企业名称" name="full_name"> | |||
| @@ -54,7 +54,7 @@ | |||
| </a-col> | |||
| <a-col span="12"> | |||
| <a-form-item label="会员到期时间" name="end_date"> | |||
| <a-date-picker v-model:value="addOtherForm.jieshu_date" | |||
| <a-date-picker v-model:value="addOtherForm.jieshu_date" :disabled-date="disabledDate" | |||
| @Change="endDateChange" style="width: 100%;" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| @@ -78,8 +78,8 @@ | |||
| const emit = defineEmits(); | |||
| let props = defineProps(['edit_record']); | |||
| let createForm = ref<companyVipType.addFormType>(dataForm) | |||
| let addOtherForm = ref<companyVipType.addOtherFormType>(otherDataForm) | |||
| let createForm = ref<CompanyVipType.addFormType>(dataForm) | |||
| let addOtherForm = ref<CompanyVipType.addOtherFormType>(otherDataForm) | |||
| // 时间选择 | |||
| const startDateChange = (val) => { | |||
| @@ -40,7 +40,7 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'desc', | |||
| keyword: '' | |||
| } | |||
| } | |||
| @@ -8,8 +8,8 @@ | |||
| <a-row :gutter="[10,10]"> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="企业名称" v-model:value="commomParams.search.full_name" | |||
| placeholder="请输入企业名称" /> | |||
| <a-input addon-before="企业名称" v-model:value="commomParams.search.keyword" | |||
| placeholder="请输入企业名称" @keyup.enter="getData"/> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| @@ -28,16 +28,10 @@ | |||
| return store.state.openSearchModel; | |||
| }) | |||
| interface listType { | |||
| full_name ?: String | |||
| } | |||
| commomParams.value.search = commomParams.value.search as listType; | |||
| commomParams.value.search.full_name = ''; | |||
| watch(() => props.search_params, (newVal) => { | |||
| emit('searchData', commomParams.value.search) | |||
| }) | |||
| // watch(() => props.search_params, (newVal) => { | |||
| // emit('searchData', commomParams.value.search) | |||
| // }) | |||
| const getData = () => { | |||
| emit('searchData', commomParams.value.search); | |||
| @@ -50,7 +44,7 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'desc', | |||
| keyword: '' | |||
| } | |||
| emit('clearData', commomParams.value.search); | |||
| @@ -1,7 +1,6 @@ | |||
| <template> | |||
| <list-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></list-search> | |||
| <a-c-operation @refresh="clearData"> | |||
| </a-c-operation> | |||
| <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page" | |||
| @page="getPage" :loading="loading"> | |||
| @@ -8,8 +8,8 @@ | |||
| <a-row :gutter="[10]"> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="配置项名称" v-model:value="commomParams.search.keyword" | |||
| placeholder="请输入配置项名称" /> | |||
| <a-input addon-before="关键字" v-model:value="commomParams.search.keyword" | |||
| placeholder="请输入关键字" @keyup.enter="getData"/> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| @@ -30,9 +30,9 @@ | |||
| watch(() => props.search_params, (newVal) => { | |||
| emit('searchData', commomParams.value.search) | |||
| }) | |||
| // watch(() => props.search_params, (newVal) => { | |||
| // emit('searchData', commomParams.value.search) | |||
| // }) | |||
| const getData = () => { | |||
| emit('searchData', commomParams.value.search); | |||
| @@ -48,6 +48,8 @@ | |||
| sortby: 'asc', | |||
| keyword: '' | |||
| } | |||
| emit('clearData', commomParams.value.search); | |||
| hideSearch() | |||
| } | |||
| const onClose = () => { | |||
| @@ -1,11 +1,18 @@ | |||
| declare namespace accountType { | |||
| type addAccountType = { | |||
| mobile ?: String, | |||
| password: String, | |||
| repassword: String, | |||
| nickname: String, | |||
| avatar: String, | |||
| email: String, | |||
| roleids: String, | |||
| declare namespace InformationArticleType { | |||
| type addFormType = { | |||
| title?: String, | |||
| cover_img?: String, | |||
| doc_url?: String, | |||
| section_id?: Number, | |||
| content?: String, | |||
| stick_top?: Number, | |||
| hot?: Number, | |||
| author?: String, | |||
| } | |||
| type addOtherFormType = { | |||
| name?: String, | |||
| content?: String, | |||
| } | |||
| } | |||
| @@ -1,7 +1,7 @@ | |||
| <template> | |||
| <a-modal v-model:visible="openAddModel" :title="title" ok-text="提交" cancel-text="取消" @ok="sumbitForm" | |||
| @cancel="cancelModal" width="50%"> | |||
| <a-form :model="createForm" :label-col="{span: 2}" labelAlign="right" style="margin-top: 20px;"> | |||
| <a-form :model="createForm" layout="vertical"> | |||
| <a-row gutter="20"> | |||
| <a-col span="24"> | |||
| <a-form-item required label="文章标题" name="title"> | |||
| @@ -80,8 +80,8 @@ | |||
| const options = ref(richOption) | |||
| let showUplaod = ref<Boolean>(false) | |||
| let createForm = ref<companyDepartmentType.addFormType>(dataForm) | |||
| let addOtherForm = ref<companyDepartmentType.addOtherFormType>(otherDataForm) | |||
| let createForm = ref<InformationArticleType.addFormType>(dataForm) | |||
| let addOtherForm = ref<InformationArticleType.addOtherFormType>(otherDataForm) | |||
| onMounted(() => { | |||
| @@ -175,7 +175,9 @@ | |||
| cover_img: newVal.cover_img, | |||
| section_id: newVal.section_id, | |||
| content: newVal.content, | |||
| author: newVal.author | |||
| author: newVal.author, | |||
| stick_top:newVal.stick_top, | |||
| hot: newVal.hot, | |||
| } | |||
| } else { | |||
| title.value = '新增文章'; | |||
| @@ -9,7 +9,7 @@ | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="文章" v-model:value="commomParams.search.keyword" | |||
| placeholder="请输入文章" /> | |||
| placeholder="请输入文章" @keyup.enter="getData"/> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| @@ -28,9 +28,9 @@ | |||
| return store.state.openSearchModel; | |||
| }) | |||
| watch(() => props.search_params, (newVal) => { | |||
| emit('searchData', commomParams.value.search) | |||
| }) | |||
| // watch(() => props.search_params, (newVal) => { | |||
| // emit('searchData', commomParams.value.search) | |||
| // }) | |||
| const getData = () => { | |||
| emit('searchData', commomParams.value.search); | |||
| @@ -1,11 +1,14 @@ | |||
| declare namespace accountType { | |||
| type addAccountType = { | |||
| declare namespace InformationSectionType { | |||
| type addFormType = { | |||
| mobile ?: String, | |||
| password: String, | |||
| repassword: String, | |||
| nickname: String, | |||
| avatar: String, | |||
| email: String, | |||
| roleids: String, | |||
| name ?: String, | |||
| cover_img ?: String, | |||
| parent_id ?: Number, | |||
| description ?: String, | |||
| display ?: Number, | |||
| } | |||
| type addOtherFormType = { | |||
| name?: String, | |||
| } | |||
| } | |||
| @@ -1,7 +1,7 @@ | |||
| <template> | |||
| <a-modal v-model:visible="openAddModel" :title="title" ok-text="提交" cancel-text="取消" @ok="sumbitForm" | |||
| @cancel="cancelModal" width="50%"> | |||
| <a-form :model="createForm" :label-col="{span: 2}" labelAlign="right" style="margin-top: 20px;"> | |||
| <a-form :model="createForm" layout="vertical"> | |||
| <a-row gutter="20"> | |||
| <a-col span="24"> | |||
| <a-form-item required label="栏目名称" name="name"> | |||
| @@ -15,7 +15,7 @@ | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item label="上级栏目" name="parent_id"> | |||
| <a-form-item label="上级栏目"> | |||
| <search-select placeholder="请选择上级栏目" :list="section_list" :select_value="addOtherForm.name" | |||
| @searchData="sectionSearch" @getSelectValue="getSectionValue" | |||
| :select_disabled="false"></search-select> | |||
| @@ -45,24 +45,24 @@ | |||
| import { addSection, updateSection, listSection } from '@/apis/models'; | |||
| import { dataForm, otherDataForm, reset } from '@/views/information/section/add/data.ts'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| let { store, openAddModel, hideModal, message } = useCommon(); | |||
| let { store, openAddModel, hideModal, message, imageprefix } = useCommon(); | |||
| const emit = defineEmits(); | |||
| let props = defineProps(['edit_record']); | |||
| let title = ref<String>('新增栏目/频道'); | |||
| let selectDisabled = ref<Boolean>(false) | |||
| let success_img = ref<String>('') | |||
| let createForm = ref<companyDepartmentType.addFormType>(dataForm) | |||
| let addOtherForm = ref<companyDepartmentType.addOtherFormType>(otherDataForm) | |||
| let createForm = ref<InformationSectionType.addFormType>(dataForm) | |||
| let addOtherForm = ref<InformationSectionType.addOtherFormType>(otherDataForm) | |||
| onMounted(() => { | |||
| sectionSearch({ page: 1, pagesize: 10 }) | |||
| sectionSearch({ page: 1, pagesize: 100 }) | |||
| }) | |||
| // 上传图片 | |||
| const uploadSuccess = (data : Object) => { | |||
| success_img.value = "http://114.132.85.7:8894" + data | |||
| success_img.value = imageprefix + data | |||
| createForm.value.cover_img = data | |||
| } | |||
| @@ -110,12 +110,13 @@ | |||
| const resetForm = () => { | |||
| addOtherForm.value = reset().otherDataForm; | |||
| console.log( addOtherForm.value) | |||
| createForm.value = reset().dataForm; | |||
| } | |||
| const cancelModal = () => { | |||
| emit('closeAdd'); | |||
| resetForm(); | |||
| hideModal(); | |||
| emit('closeAdd'); | |||
| } | |||
| @@ -124,12 +125,13 @@ | |||
| }) | |||
| watch(() => props.edit_record, (newVal) => { | |||
| sectionSearch({ page: 1, pagesize: 100 }) | |||
| if (newVal) { | |||
| title.value = '编辑栏目/频道'; | |||
| addOtherForm.value = { | |||
| name: '' | |||
| name: newVal.parent_id == -1 ? '' : newVal.parent_id | |||
| } | |||
| success_img.value = newVal.cover_img ? "http://114.132.85.7:8894" + newVal.cover_img : '' | |||
| success_img.value = newVal.cover_img ? imageprefix + newVal.cover_img : '' | |||
| createForm.value = { | |||
| id: newVal.id, | |||
| name: newVal.name, | |||
| @@ -7,7 +7,7 @@ export let dataForm = { | |||
| } | |||
| export let otherDataForm = { | |||
| name: '', | |||
| name: null, | |||
| } | |||
| export const reset = () => { | |||
| @@ -19,7 +19,7 @@ export const reset = () => { | |||
| display: 1 | |||
| }; | |||
| otherDataForm = { | |||
| name: '', | |||
| name: null, | |||
| } | |||
| return { dataForm, otherDataForm } | |||
| @@ -4,10 +4,13 @@ | |||
| <a-c-operation @refresh="clearData"></a-c-operation> | |||
| <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page" | |||
| @page="getPage" :loading="loading"> | |||
| <template #image="{ record }"> | |||
| <image-container :need="true" :imgObj="{src: imageprefix + record.cover_img,width: '50px',height: '50px', mode: 'fill'}"></image-container> | |||
| </template> | |||
| <template #default="{ record }"> | |||
| <a-row :gutter="10"> | |||
| <a-col><a-button type="primary" size="small" primary @click="edit(record)">编辑</a-button></a-col> | |||
| <a-popconfirm title="是否删除该栏目/频道?" @confirm="delOneRole(record.id)"> | |||
| <a-popconfirm title="是否删除该栏目/频道?" @confirm="del(record.id)"> | |||
| <a-col><a-button danger size="small" primary>删除</a-button></a-col> | |||
| </a-popconfirm> | |||
| </a-row> | |||
| @@ -24,7 +27,7 @@ | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| import { cols } from '@/views/information/section/columns'; | |||
| import { message } from 'ant-design-vue'; | |||
| let { store, commomParams, showModal, showOtherModal1 } = useCommon(); | |||
| let { store, commomParams, showModal, showOtherModal1, imageprefix } = useCommon(); | |||
| let loading = ref<Boolean>(true); | |||
| onMounted(() => { | |||
| getData(commomParams.value.search); | |||
| @@ -40,7 +43,7 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'desc', | |||
| keyword: '' | |||
| } | |||
| getData(); | |||
| @@ -88,13 +91,13 @@ | |||
| } | |||
| // 删除 | |||
| // const delOneRole = (id: number) => { | |||
| // commomParams.value.delRecord = { id: id }; | |||
| // delSection(commomParams.value.delRecord).then(res => { | |||
| // message.success('删除成功'); | |||
| // getData(); | |||
| // }) | |||
| // } | |||
| const del = (id: number) => { | |||
| commomParams.value.delRecord = { id: id }; | |||
| delSection(commomParams.value.delRecord).then(res => { | |||
| message.success('删除成功'); | |||
| getData(); | |||
| }) | |||
| } | |||
| </script> | |||
| <style lang="less" scoped> | |||
| @@ -9,7 +9,7 @@ | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="栏目/频道" v-model:value="commomParams.search.keyword" | |||
| placeholder="请输入栏目/频道" /> | |||
| placeholder="请输入栏目/频道" @keyup.enter="getData" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| @@ -5,7 +5,7 @@ export let dataForm = { | |||
| } | |||
| export let otherDataForm = { | |||
| full_name: "" | |||
| full_name: null | |||
| } | |||
| export const reset = () => { | |||
| @@ -15,7 +15,7 @@ export const reset = () => { | |||
| status: 1, | |||
| }; | |||
| otherDataForm = { | |||
| full_name: "" | |||
| full_name: null | |||
| } | |||
| return { dataForm, otherDataForm } | |||
| @@ -1,7 +1,7 @@ | |||
| <template> | |||
| <a-modal v-model:visible="openAddModel" :title="title" ok-text="提交" cancel-text="取消" @ok="sumbitForm" | |||
| @cancel="cancelModal" width="50%"> | |||
| <a-form :model="createForm" :label-col="{span: 4}" labelAlign="right" style="margin-top: 20px;"> | |||
| <a-form :model="createForm" layout="vertical"> | |||
| <a-row gutter="20"> | |||
| <a-col span="24"> | |||
| <a-form-item required label="招聘会主题" name="title"> | |||
| @@ -10,7 +10,8 @@ export const cols = <ColType.type[]>[ | |||
| dataIndex: 'open_date' | |||
| }, { | |||
| title: '开通状态', | |||
| dataIndex: 'status' | |||
| dataIndex: 'status', | |||
| slots: { customRender: 'status' }, | |||
| }, { | |||
| title: '操作', | |||
| dataIndex: 'operation', | |||
| @@ -7,7 +7,8 @@ export const cols = <ColType.type[]>[ | |||
| dataIndex: 'nature' | |||
| }, { | |||
| title: '审核状态', | |||
| dataIndex: 'status' | |||
| dataIndex: 'status', | |||
| slots: { customRender: 'status' }, | |||
| },{ | |||
| title: '操作', | |||
| dataIndex: 'operation', | |||
| @@ -2,6 +2,10 @@ | |||
| <a-modal v-model:visible="showCompanyModel" title="查看参加招聘会的企业" @cancel="cancelModal" width="80%" :footer="null"> | |||
| <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page" | |||
| @page="getPage" :loading="loading"> | |||
| <template #status="{ record }"> | |||
| <a-tag color="green" v-if="record.status == 2">通过</a-tag> | |||
| <a-tag color="red" v-if="record.status == 3">不通过</a-tag> | |||
| </template> | |||
| <template #default="{ record }"> | |||
| <a-row :gutter="10"> | |||
| <template v-if="record.status == 1"> | |||
| @@ -3,6 +3,10 @@ | |||
| <a-c-operation @refresh="clearData"></a-c-operation> | |||
| <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page" | |||
| @page="getPage" :loading="loading"> | |||
| <template #status="{ record }"> | |||
| <a-tag color="green" v-if="record.status == 1">进行中</a-tag> | |||
| <a-tag color="red" v-if="record.status == 2">已结束</a-tag> | |||
| </template> | |||
| <template #default="{ record }"> | |||
| <a-row :gutter="10"> | |||
| <a-col><a-button type="primary" size="small" primary @click="edit(record)">编辑/审核</a-button></a-col> | |||
| @@ -9,7 +9,7 @@ | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="招聘会名称" v-model:value="commomParams.search.keyword" | |||
| placeholder="请输入招聘会名称" /> | |||
| placeholder="请输入招聘会名称" @keyup.enter="getData"/> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| @@ -28,9 +28,9 @@ | |||
| return store.state.openSearchModel; | |||
| }) | |||
| watch(() => props.search_params, (newVal) => { | |||
| emit('searchData', commomParams.value.search) | |||
| }) | |||
| // watch(() => props.search_params, (newVal) => { | |||
| // emit('searchData', commomParams.value.search) | |||
| // }) | |||
| const getData = () => { | |||
| emit('searchData', commomParams.value.search); | |||
| @@ -1,9 +1,13 @@ | |||
| <template> | |||
| <a-modal v-model:visible="openOtherModel_1" title="预览简历" ok-text="提交" cancel-text="取消" @ok="sumbitForm" | |||
| @cancel="cancelModal" width="40%"> | |||
| @cancel="cancelModal" width="50%" :footer="null"> | |||
| <a-spin :spinning="spinning"> | |||
| <a-typography> | |||
| <a-typography-title :level="4">基本资料</a-typography-title> | |||
| <a-typography-title :level="4"> | |||
| <div class="text-decoration"> | |||
| <div class="text-content">基本资料</div> | |||
| </div> | |||
| </a-typography-title> | |||
| <a-typography-paragraph> | |||
| <a-row :gutter="[20,20]"> | |||
| <a-col span="24"> | |||
| @@ -62,18 +66,25 @@ | |||
| </a-row> | |||
| </a-col> | |||
| <a-col span="4"> | |||
| <a-image | |||
| :src="'https://rcsc-test.jcjob.cn/img'+detail.photo" /> | |||
| <a-image :src="'https://rcsc-test.jcjob.cn/img'+detail.photo" /> | |||
| </a-col> | |||
| </a-row> | |||
| </a-col> | |||
| </a-row> | |||
| </a-typography-paragraph> | |||
| <a-typography-title :level="4">个人简介</a-typography-title> | |||
| <a-typography-title :level="4"> | |||
| <div class="text-decoration"> | |||
| <div class="text-content">个人简介</div> | |||
| </div> | |||
| </a-typography-title> | |||
| <a-typography-paragraph> | |||
| <div v-html="detail.description"></div> | |||
| <div v-html="detail.introduction"></div> | |||
| </a-typography-paragraph> | |||
| <a-typography-title :level="4">求职期望</a-typography-title> | |||
| <a-typography-title :level="4"> | |||
| <div class="text-decoration"> | |||
| <div class="text-content">求职期望</div> | |||
| </div> | |||
| </a-typography-title> | |||
| <a-typography-paragraph> | |||
| <a-row> | |||
| <a-col span="24"> | |||
| @@ -91,7 +102,7 @@ | |||
| </a-col> | |||
| </a-row> | |||
| </a-col> | |||
| <a-col span="8" v-if="detail.desire_positions"> | |||
| <a-col span="8" v-if="detail.desire_positions"> | |||
| <a-row> | |||
| <a-col span="24" v-for="(item,index) in detail.desire_positions"> | |||
| 期望职位{{index + 1}}:{{item.level1_txt ? item.level1_txt : ''}}{{item.level2_txt ? item.level2_txt : ''}} | |||
| @@ -110,7 +121,12 @@ | |||
| </a-row> | |||
| </a-typography-paragraph> | |||
| </a-typography> | |||
| <a-typography-title :level="4">专业技能掌握能力</a-typography-title> | |||
| <a-typography-title :level="4"> | |||
| <div class="text-decoration"> | |||
| <div class="text-content">专业技能掌握能力</div> | |||
| </div> | |||
| </a-typography-title> | |||
| <a-typography-paragraph> | |||
| <a-row> | |||
| <a-col span="24"> | |||
| @@ -130,7 +146,11 @@ | |||
| </a-col> | |||
| </a-row> | |||
| </a-typography-paragraph> | |||
| <a-typography-title :level="4">工作经历</a-typography-title> | |||
| <a-typography-title :level="4"> | |||
| <div class="text-decoration"> | |||
| <div class="text-content">工作经历</div> | |||
| </div> | |||
| </a-typography-title> | |||
| <a-typography-paragraph> | |||
| <template v-for="(item,index) in detail.experiences"> | |||
| <a-card :title="item.company_name" style="margin-bottom: 10px;"> | |||
| @@ -140,7 +160,10 @@ | |||
| </a-card> | |||
| </template> | |||
| </a-typography-paragraph> | |||
| <a-typography-title :level="4">教育/培训经历</a-typography-title> | |||
| <a-typography-title :level="4"> | |||
| <div class="text-decoration"> | |||
| <div class="text-content">教育/培训经历</div> | |||
| </div></a-typography-title> | |||
| <a-typography-paragraph> | |||
| <template v-for="(item,index) in detail.trainings"> | |||
| <a-card :title="item.school_or_institution" style="margin-bottom: 10px;"> | |||
| @@ -226,4 +249,24 @@ | |||
| padding: 6px; | |||
| // padding-top: 6px; | |||
| } | |||
| .text-decoration { | |||
| position: relative; | |||
| display: inline-block; | |||
| overflow: visible; | |||
| } | |||
| .text-decoration::before { | |||
| content: ''; | |||
| width: 6px; | |||
| height: 22px; | |||
| background-color: #4FBE70; | |||
| position: absolute; | |||
| top: 4px | |||
| } | |||
| .text-content { | |||
| position: relative; | |||
| margin-left: 20px; | |||
| } | |||
| </style> | |||
| @@ -1,16 +1,16 @@ | |||
| <template> | |||
| <!-- <a-c-operation @refresh="clearData"> | |||
| </a-c-operation> --> | |||
| <resume-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></resume-search> | |||
| <a-c-operation @refresh="clearData" :need_add="false"></a-c-operation> | |||
| <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page" | |||
| @page="getPage" :loading="loading"> | |||
| <template #default="{ record }"> | |||
| <a-row :gutter="10"> | |||
| <!-- <a-col><a-button type="primary" size="small" primary @click="edit(record)">编辑</a-button></a-col> --> | |||
| <a-col><a-button type="primary" size="small" primary @click="detail(record)">预览</a-button></a-col> | |||
| <a-popconfirm title="该简历通过审核?" @confirm="pass(record.customer_id)"> | |||
| <a-popconfirm title="该简历通过审核?" @confirm="pass(record)"> | |||
| <a-col><a-button type="primary" size="small" primary>通过</a-button></a-col> | |||
| </a-popconfirm> | |||
| <a-popconfirm title="该简历不通过审核?" @confirm="unpass(record.customer_id)"> | |||
| <a-popconfirm title="该简历不通过审核?" @confirm="unpass(record)"> | |||
| <a-col><a-button type="primary" size="small" primary>不通过</a-button></a-col> | |||
| </a-popconfirm> | |||
| <a-popconfirm title="是否要推送该简历到ES?" @confirm="pushEs(record.customer_id)"> | |||
| @@ -50,7 +50,7 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'desc', | |||
| keyword: '' | |||
| } | |||
| } | |||
| @@ -107,14 +107,14 @@ | |||
| // } | |||
| // 审核 | |||
| const pass = (customer_id) => { | |||
| PostJobapplicantUpdate({ id: customer_id, status: 2 }).then(res => { | |||
| const pass = (record) => { | |||
| PostJobapplicantUpdate({ customer_id: record.customer_id, id: record.id, status: 2 }).then(res => { | |||
| message.success('审核通过'); | |||
| }) | |||
| } | |||
| const unpass = (customer_id) => { | |||
| PostJobapplicantUpdate({ id: customer_id, status: 3 }).then(res => { | |||
| const unpass = (record) => { | |||
| PostJobapplicantUpdate({ customer_id: record.customer_id, id: record.id, status: 3 }).then(res => { | |||
| message.success('审核不通过'); | |||
| }) | |||
| } | |||
| @@ -1,85 +1,56 @@ | |||
| <template> | |||
| <a-form :model="commomParams.search"> | |||
| <a-row :gutter="[10]"> | |||
| <a-col span="6"> | |||
| <a-form-item> | |||
| <a-input addon-before="企业名称" v-model:value="commomParams.search.full_name" placeholder="请输入企业名称" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="6"> | |||
| <a-form-item> | |||
| <a-input addon-before="登录名称" v-model:value="commomParams.search.login_name" placeholder="请输入登录名称" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="6"> | |||
| <a-form-item> | |||
| <a-input addon-before="企业ID" v-model:value="commomParams.search.id" placeholder="请输入企业ID" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="6"> | |||
| <a-form-item> | |||
| <a-input addon-before="会员类型" v-model:value="commomParams.search.member_type" placeholder="请输入会员类型" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="6"> | |||
| <a-form-item> | |||
| <a-input addon-before="会员状态" v-model:value="commomParams.search.member_status" placeholder="请输入会员状态" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="6"> | |||
| <a-form-item> | |||
| <a-input addon-before="开通状态" v-model:value="commomParams.search.status" placeholder="请输入开通状态" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col> | |||
| <a-form-item> | |||
| <a-button type="primary" @click="getData"> | |||
| 搜索 | |||
| </a-button> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col> | |||
| <a-form-item> | |||
| <a-button danger @click="clearSearch"> | |||
| 清空搜索 | |||
| </a-button> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| </a-form> | |||
| <a-drawer :width="500" title="搜索" placement="right" :open="openSearchModel" @close="onClose"> | |||
| <template #extra> | |||
| <a-button style="margin-right: 8px" @click="clearSearch">清空搜索</a-button> | |||
| <a-button type="primary" @click="getData">搜索</a-button> | |||
| </template> | |||
| <a-form :model="commomParams.search"> | |||
| <a-row :gutter="[10]"> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="求职者名称" v-model:value="commomParams.search.keyword" placeholder="请输入求职者名称" @keyup.enter="getData"/> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-select v-model:value="commomParams.search.gender" placeholder="请选择性别" @change="genderChange"> | |||
| <a-select-option value="">全部</a-select-option> | |||
| <a-select-option value="男">男</a-select-option> | |||
| <a-select-option value="女">女</a-select-option> | |||
| </a-select> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| </a-form> | |||
| </a-drawer> | |||
| </template> | |||
| <script lang="ts" setup> | |||
| import { ref, onMounted, watch, computed } from 'vue'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| let { commomParams } = useCommon(); | |||
| let { store, commomParams, openSearchModel, hideSearch } = useCommon(); | |||
| let props = defineProps(['search_params']); | |||
| const emit = defineEmits(); | |||
| openSearchModel = computed(() => { | |||
| return store.state.openSearchModel; | |||
| }) | |||
| interface listType { | |||
| full_name ?: String | |||
| login_name ?: String | |||
| id : Number | 0, | |||
| member_type ?: String | |||
| member_status : Number | 0, | |||
| status : Number | 0, | |||
| gender ?: String | |||
| } | |||
| commomParams.value.search = commomParams.value.search as listType; | |||
| commomParams.value.search.full_name = ''; | |||
| commomParams.value.search.login_name = ''; | |||
| commomParams.value.search.id = 0; | |||
| commomParams.value.search.member_type = ''; | |||
| commomParams.value.search.member_status = 0; | |||
| commomParams.value.search.status = 0; | |||
| commomParams.value.search.gender = null; | |||
| watch(() => props.search_params, (newVal) => { | |||
| console.log(newVal) | |||
| }) | |||
| // watch(() => props.search_params, (newVal) => { | |||
| // emit('searchData', commomParams.value.search) | |||
| // }) | |||
| const getData = () => { | |||
| emit('searchData', commomParams.value.search) | |||
| emit('searchData', commomParams.value.search); | |||
| hideSearch() | |||
| } | |||
| // 清空搜索 | |||
| @@ -88,11 +59,23 @@ | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| sortby: 'desc', | |||
| keyword: '' | |||
| } | |||
| emit('clearData', commomParams.value.search) | |||
| emit('clearData', commomParams.value.search); | |||
| hideSearch() | |||
| } | |||
| const onClose = () => { | |||
| clearSearch() | |||
| hideSearch() | |||
| } | |||
| const genderChange = (val) => { | |||
| getData() | |||
| } | |||
| </script> | |||
| <style> | |||
| @@ -9,7 +9,7 @@ | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <a-input addon-before="配置项名称" v-model:value="commomParams.search.keyword" | |||
| placeholder="请输入配置项名称" /> | |||
| placeholder="请输入配置项名称" @keyup.enter="getData"/> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||