| @@ -5,7 +5,7 @@ | |||
| <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-V-a0HeGP.js"></script> | |||
| <script type="module" crossorigin src="/assets/index-AHTnyh3r.js"></script> | |||
| <link rel="stylesheet" crossorigin href="/assets/index-7KXeZgtg.css"> | |||
| </head> | |||
| <body> | |||
| @@ -14,6 +14,7 @@ | |||
| "axios": "^1.6.2", | |||
| "dayjs": "^1.11.10", | |||
| "echarts": "^5.4.3", | |||
| "he": "^1.2.0", | |||
| "moment": "^2.30.1", | |||
| "vue": "^3.2.36", | |||
| "vue-router": "^4.2.5", | |||
| @@ -1901,9 +1902,8 @@ | |||
| }, | |||
| "node_modules/he": { | |||
| "version": "1.2.0", | |||
| "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", | |||
| "resolved": "https://registry.npmmirror.com/he/-/he-1.2.0.tgz", | |||
| "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", | |||
| "dev": true, | |||
| "bin": { | |||
| "he": "bin/he" | |||
| } | |||
| @@ -4518,9 +4518,8 @@ | |||
| }, | |||
| "he": { | |||
| "version": "1.2.0", | |||
| "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", | |||
| "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", | |||
| "dev": true | |||
| "resolved": "https://registry.npmmirror.com/he/-/he-1.2.0.tgz", | |||
| "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" | |||
| }, | |||
| "iconv-lite": { | |||
| "version": "0.6.3", | |||
| @@ -14,6 +14,7 @@ | |||
| "axios": "^1.6.2", | |||
| "dayjs": "^1.11.10", | |||
| "echarts": "^5.4.3", | |||
| "he": "^1.2.0", | |||
| "moment": "^2.30.1", | |||
| "vue": "^3.2.36", | |||
| "vue-router": "^4.2.5", | |||
| @@ -204,3 +204,28 @@ export const GetStatsEducation = getModel(url.StatsEducation); | |||
| export const GetStatsPosition = getModel(url.StatsPosition); | |||
| export const GetStatsTitleAndSkill = getModel(url.StatsTitleAndSkill); | |||
| export const GetStatsJobMajor = getModel(url.StatsJobMajor); | |||
| // 设置 | |||
| export const PostSysconfigAdd = postModel(url.SysconfigAdd); // | |||
| export const PostSysconfigDel = postModel(url.SysconfigDel); // | |||
| export const PostSysconfigUpdate = postModel(url.SysconfigUpdate); // | |||
| export const GetSysconfigList = getModel(url.SysconfigList); // | |||
| export const GetSysconfigDetail = getModel(url.SysconfigDetail); | |||
| // 反馈 | |||
| export const PostFeedbackAdd = postModel(url.FeedbackAdd); | |||
| export const PostFeedbackDel = postModel(url.FeedbackDel); | |||
| export const PostFeedbackUpdate = postModel(url.FeedbackUpdate); | |||
| export const GetFeedbackList = getModel(url.FeedbackList); | |||
| export const GetFeedbackDetail = getModel(url.FeedbackDetail); | |||
| // 反馈 | |||
| export const PostCustomerAdd = postModel(url.CustomerAdd); | |||
| export const PostCustomerDel = postModel(url.CustomerDel); | |||
| export const GetCustomerUpdate = getModel(url.CustomerUpdate); | |||
| export const GetCustomerList = getModel(url.CustomerList); | |||
| export const GetCustomerDetail = getModel(url.CustomerDetail); | |||
| export const PostEsJobseeker = postModel(url.EsJobseeker); | |||
| export const PostTokenizerModify = postModel(url.TokenizerModify); | |||
| export const GetTokenizerGet = getModel(url.TokenizerGet); | |||
| @@ -184,6 +184,31 @@ declare namespace urlType { | |||
| StatsPosition : String, | |||
| StatsTitleAndSkill : String, | |||
| StatsJobMajor : String, | |||
| 'SysconfigAdd':String, | |||
| 'SysconfigDel': String, | |||
| 'SysconfigUpdate':String, | |||
| 'SysconfigList': String, | |||
| 'SysconfigDetail': String, | |||
| // 反馈 | |||
| FeedbackAdd: String, | |||
| FeedbackDel: String, | |||
| FeedbackUpdate: String, | |||
| FeedbackList: String, | |||
| FeedbackDetail: String, | |||
| // 反馈 | |||
| CustomerAdd: String, | |||
| CustomerDel: String, | |||
| CustomerUpdate: String, | |||
| CustomerList: String, | |||
| CustomerDetail:String, | |||
| DocUpload: String, | |||
| EsJobseeker: String, | |||
| TokenizerModify: String, | |||
| TokenizerGet:String, | |||
| } | |||
| } | |||
| @@ -94,6 +94,10 @@ export const url : urlType.url = { | |||
| // 字典 | |||
| dictTree: common + '/dict/tree', | |||
| ImageUpload: common + '/image/upload?imgtype=1', | |||
| DocUpload: common + '/doc/upload?doctype=1', | |||
| EsJobseeker: common + '/es/jobseeker', | |||
| TokenizerModify: admin + '/tokenizer/modify', | |||
| TokenizerGet: admin + '/tokenizer/get', | |||
| // 广告 | |||
| // 广告列表 | |||
| @@ -194,4 +198,27 @@ export const url : urlType.url = { | |||
| StatsTitleAndSkill: admin + '/stats/titleandskill', // 求职者职称与技能统计 | |||
| StatsJobMajor: admin + '/stats/job_major', // 企业职位统计 | |||
| // 系统设置 | |||
| 'SysconfigAdd': common + '/sysconfig/add', // 添加 | |||
| 'SysconfigDel': common + '/sysconfig/del', // 删除 | |||
| 'SysconfigUpdate': common + '/sysconfig/update', // 修改 | |||
| 'SysconfigList': common + '/sysconfig/list', // 查看 | |||
| 'SysconfigDetail': common + '/sysconfig/detail', // 详情 | |||
| // 用户反馈 | |||
| // 反馈 | |||
| FeedbackAdd: common + '/feedback/add', // 添加 | |||
| FeedbackDel: common + '/feedback/del', // 删除 | |||
| FeedbackUpdate: common + '/feedback/update', // 编辑 | |||
| FeedbackList: common + '/feedback/list', // 列表 | |||
| FeedbackDetail: common + '/feedback/detail', // 详情 | |||
| // 用户反馈 | |||
| // 反馈 | |||
| CustomerAdd: common + '/customer/add', // 添加 | |||
| CustomerDel: common + '/customer/del', // 删除 | |||
| CustomerUpdate: common + '/customer/update', // 编辑 | |||
| CustomerList: common + '/customer/list', // 列表 | |||
| CustomerDetail: common + '/customer/detail', // 详情 | |||
| } | |||
| @@ -102,7 +102,7 @@ export const useCommon = () => { | |||
| openSearchModel: true | |||
| }) | |||
| }; | |||
| const hideSearch = () => { | |||
| store.commit('getSearchModel', { | |||
| openSearchModel: false | |||
| @@ -113,18 +113,28 @@ export const useCommon = () => { | |||
| let richOption = ref<Object>({ | |||
| debug: 'info', | |||
| modules: { | |||
| toolbar: [ | |||
| [{ 'header': [1, 2, 3, 4, 5, 6, false] }], | |||
| ['bold', 'italic', 'underline', 'strike'], | |||
| [{ 'list': 'ordered' }, { 'list': 'bullet' }], | |||
| [{ 'indent': '-1' }, { 'indent': '+1' }], | |||
| [{ 'size': ['small', false, 'large', 'huge'] }], | |||
| [{ 'header': [1, 2, 3, 4, 5, 6, false] }, { 'align': [] }], | |||
| // 添加字体选择器,确保包含黑体和仿宋_GB2312 | |||
| [{ 'font': ['黑体', '仿宋_GB2312', 'Arial', /* 其他字体 */] }] // remove formatting button | |||
| ] | |||
| }, | |||
| placeholder: '请输入文字' | |||
| }); | |||
| // 禁止使用日期 | |||
| const disabledDate = (val: Dayjs) => { | |||
| return val && val > dayjs().endOf('day'); | |||
| const disabledDate = (val : Dayjs) => { | |||
| return val && val > dayjs().endOf('day'); | |||
| }; | |||
| // 照片前缀 | |||
| const imageprefix : string = 'https://rcsc-test.jcjob.cn/img/' | |||
| return { | |||
| @@ -407,4 +407,102 @@ const StatisticsRoute : AppRouteRecordRaw = { | |||
| }; | |||
| export const routesModuleList : AppRouteModule[] = [CompanyRoute,HomemakeRoute, JokSeekerRoute, JokFairRoute, InformationRoute, AdvertisementRoute, ActivityRoute, StatisticsRoute,PermissionRoute]; | |||
| // 设置 | |||
| // 活动管理 | |||
| const SettingRoute : AppRouteRecordRaw = { | |||
| path: '/setting', | |||
| name: 'setting', | |||
| component: routerList.Setting, | |||
| meta: { | |||
| title: '系统设置', | |||
| icon: HomeOutlined | |||
| }, | |||
| children: [ | |||
| // { | |||
| // path: '/activity/list', | |||
| // name: 'activityList', | |||
| // component: routerList.ActivityList, | |||
| // meta: { | |||
| // title: '活动列表', | |||
| // icon: HomeOutlined | |||
| // }, | |||
| // }, | |||
| { | |||
| path: '/setting/item', | |||
| name: 'settingItem', | |||
| component: routerList.SettingItem, | |||
| meta: { | |||
| title: '配置项', | |||
| icon: HomeOutlined | |||
| }, | |||
| } | |||
| ], | |||
| }; | |||
| // 其他管理 | |||
| const OtherRoute : AppRouteRecordRaw = { | |||
| path: '/other', | |||
| name: 'other', | |||
| component: routerList.Other, | |||
| meta: { | |||
| title: '其他设置', | |||
| icon: HomeOutlined | |||
| }, | |||
| children: [ | |||
| // { | |||
| // path: '/activity/list', | |||
| // name: 'activityList', | |||
| // component: routerList.ActivityList, | |||
| // meta: { | |||
| // title: '活动列表', | |||
| // icon: HomeOutlined | |||
| // }, | |||
| // }, | |||
| { | |||
| path: '/other/tokenizer', | |||
| name: 'otherTokenizer', | |||
| component: routerList.Tokenizer, | |||
| meta: { | |||
| title: '分词器', | |||
| icon: HomeOutlined | |||
| }, | |||
| } | |||
| ], | |||
| }; | |||
| // 其他管理 | |||
| const FeedbackRoute : AppRouteRecordRaw = { | |||
| path: '/feedback', | |||
| name: 'feedback', | |||
| component: routerList.Feedback, | |||
| meta: { | |||
| title: '反馈管理', | |||
| icon: HomeOutlined | |||
| }, | |||
| children: [ | |||
| // { | |||
| // path: '/activity/list', | |||
| // name: 'activityList', | |||
| // component: routerList.ActivityList, | |||
| // meta: { | |||
| // title: '活动列表', | |||
| // icon: HomeOutlined | |||
| // }, | |||
| // }, | |||
| { | |||
| path: '/feedback/list', | |||
| name: 'feedbackList', | |||
| component: routerList.FeedbackList, | |||
| meta: { | |||
| title: '反馈列表', | |||
| icon: HomeOutlined | |||
| }, | |||
| } | |||
| ], | |||
| }; | |||
| export const routesModuleList : AppRouteModule[] = [CompanyRoute,HomemakeRoute, JokSeekerRoute, JokFairRoute, InformationRoute, AdvertisementRoute, ActivityRoute, StatisticsRoute,PermissionRoute, SettingRoute, OtherRoute, FeedbackRoute]; | |||
| @@ -55,6 +55,15 @@ import StatisticsResumeWorkExperience from '@/views/statistics/resume/workExperi | |||
| import StatisticsCompany from '@/views/statistics/company/index.vue'; | |||
| import StatisticsCompanyJob from '@/views/statistics/company/job/index.vue'; | |||
| import Setting from '@/views/setting/index.vue'; | |||
| import SettingItem from '@/views/setting/item/index.vue'; | |||
| import Other from '@/views/other/index.vue'; | |||
| import Tokenizer from '@/views/other/tokenizer/index.vue'; | |||
| import Feedback from '@/views/feedback/index.vue'; | |||
| import FeedbackList from '@/views/feedback/list/index.vue'; | |||
| export const routerList = { | |||
| Permission, | |||
| ROLE, | |||
| @@ -95,5 +104,11 @@ export const routerList = { | |||
| StatisticsResumeTitleSkill, | |||
| StatisticsResumeWorkExperience, | |||
| StatisticsCompany, | |||
| StatisticsCompanyJob | |||
| StatisticsCompanyJob, | |||
| Setting, | |||
| SettingItem, | |||
| Other, | |||
| Tokenizer, | |||
| Feedback, | |||
| FeedbackList | |||
| } | |||
| @@ -11,6 +11,11 @@ | |||
| </div> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="门店地址" name="address"> | |||
| <a-input v-model:value="createForm.address" placeholder="请选择门店地址" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="门店名" name="store_name"> | |||
| <a-input v-model:value="createForm.store_name" placeholder="请输入门店名" /> | |||
| @@ -87,8 +92,8 @@ | |||
| const getLoc = (mapData : Object) => { | |||
| console.log(mapData) | |||
| createForm.value.address = mapData.poiaddress; | |||
| createForm.value.lat = mapData.latlng.lng; | |||
| createForm.value.lng = mapData.latlng.lat; | |||
| createForm.value.lat = mapData.latlng.lat; | |||
| createForm.value.lng = mapData.latlng.lng; | |||
| showMap.value = false; | |||
| } | |||
| @@ -1,6 +1,10 @@ | |||
| <template> | |||
| <address-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></address-search> | |||
| <a-c-operation @refresh="clearData"></a-c-operation> | |||
| <a-c-operation @refresh="clearData"> | |||
| <a-col> | |||
| <a-button type="primary" @click="download">导出参与活动用户</a-button> | |||
| </a-col> | |||
| </a-c-operation> | |||
| <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page" | |||
| @page="getPage" :loading="loading"> | |||
| <template #default="{ record }"> | |||
| @@ -19,7 +23,7 @@ | |||
| import { ref, onMounted, watch, computed } from 'vue'; | |||
| import AddressSearch from '@/views/activity/address/search/index.vue'; | |||
| import AddressAdd from '@/views/activity/address/add/add.vue'; | |||
| import { GetActivityaddressList, PostActivityaddressDel } from '@/apis/models'; | |||
| import { GetActivityaddressList, PostActivityaddressDel, PostActivityExportUsers } from '@/apis/models'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| import { cols } from '@/views/activity/address/columns'; | |||
| import { message } from 'ant-design-vue'; | |||
| @@ -98,6 +102,13 @@ | |||
| getData(); | |||
| }) | |||
| } | |||
| const download = () => { | |||
| PostActivityExportUsers().then(res => { | |||
| let url = 'https://rcsc-test.jcjob.cn/img' + res.data.excel_url; | |||
| window.open(url); | |||
| }) | |||
| } | |||
| </script> | |||
| <style lang="less" scoped> | |||
| @@ -1,9 +1,7 @@ | |||
| <template> | |||
| <list-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></list-search> | |||
| <a-c-operation @refresh="clearData"> | |||
| <a-col> | |||
| <a-button type="primary" @click="download">导出参与活动用户</a-button> | |||
| </a-col> | |||
| </a-c-operation> | |||
| <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page" | |||
| @page="getPage" :loading="loading"> | |||
| @@ -23,7 +21,7 @@ | |||
| import { ref, onMounted, watch, computed } from 'vue'; | |||
| import ListSearch from '@/views/advertisement/putin/search/index.vue'; | |||
| import ListAdd from '@/views/advertisement/putin/add/add.vue'; | |||
| import { GetAdvertscheduleList, PostAdvertscheduleDel, PostActivityExportUsers } from '@/apis/models'; | |||
| import { GetAdvertscheduleList, PostAdvertscheduleDel } from '@/apis/models'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| import { cols } from '@/views/advertisement/putin/columns'; | |||
| import { message } from 'ant-design-vue'; | |||
| @@ -105,12 +103,7 @@ | |||
| }) | |||
| } | |||
| const download = () => { | |||
| PostActivityExportUsers().then(res => { | |||
| let url = 'https://rcsc-test.jcjob.cn/img' + res.data.excel_url; | |||
| window.open(url); | |||
| }) | |||
| } | |||
| </script> | |||
| <style lang="less" scoped> | |||
| @@ -0,0 +1,9 @@ | |||
| <template> | |||
| <router-view></router-view> | |||
| </template> | |||
| <script> | |||
| </script> | |||
| <style> | |||
| </style> | |||
| @@ -0,0 +1,15 @@ | |||
| declare namespace FeedbackListType { | |||
| type addrFormType = { | |||
| name?: String, | |||
| address?: String, | |||
| telephone?: String, | |||
| fax?: String, | |||
| postal?: String, | |||
| email?: String, | |||
| content?: String, | |||
| } | |||
| type addOtherFormType = { | |||
| } | |||
| } | |||
| @@ -0,0 +1,118 @@ | |||
| <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-row gutter="20"> | |||
| <a-col span="24"> | |||
| <a-form-item required label="姓名" name="name"> | |||
| <a-input v-model:value="createForm.name" placeholder="请输入姓名" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="地址" name="address"> | |||
| <a-input v-model:value="createForm.address" placeholder="请输入地址" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="电话" name="telephone"> | |||
| <a-input v-model:value="createForm.telephone" placeholder="请输入电话" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="传真" name="fax"> | |||
| <a-input v-model:value="createForm.fax" placeholder="请输入传真" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="邮政编码" name="postal"> | |||
| <a-input v-model:value="createForm.postal" placeholder="请输入邮政编码" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="邮箱" name="email"> | |||
| <a-input v-model:value="createForm.email" placeholder="请输入邮箱" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="消息内容" name="content"> | |||
| <a-input v-model:value="createForm.content" placeholder="请输入消息内容" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| </a-form> | |||
| </a-modal> | |||
| </template> | |||
| <script setup lang="ts"> | |||
| import { ref, onMounted, computed, defineProps, watch, defineEmits } from 'vue'; | |||
| import { PostFeedbackAdd, PostFeedbackUpdate } from '@/apis/models'; | |||
| import he from 'he'; | |||
| import { dataForm, otherDataForm, reset } from '@/views/feedback/list/add/data.js'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| let { store, openAddModel, hideModal, message, richOption } = useCommon(); | |||
| const emit = defineEmits(); | |||
| let props = defineProps(['edit_record']); | |||
| let title = ref<String>('新增消息'); | |||
| let showMap = ref<Boolean>(false); | |||
| let createForm = ref<FeedbackListType.addFormType>(dataForm) | |||
| const sumbitForm = () => { | |||
| if (!createForm.value.id) { | |||
| PostFeedbackAdd(createForm.value).then(res => { | |||
| message.success('创建消息成功'); | |||
| hideModal(); | |||
| resetForm(); | |||
| emit('successAdd'); | |||
| }).catch(err => { | |||
| }) | |||
| } else { | |||
| PostFeedbackUpdate(createForm.value).then(res => { | |||
| message.success('修改消息成功'); | |||
| hideModal(); | |||
| resetForm(); | |||
| emit('successAdd'); | |||
| }).catch(err => { | |||
| }) | |||
| } | |||
| } | |||
| const resetForm = () => { | |||
| createForm.value = reset().dataForm; | |||
| } | |||
| const cancelModal = () => { | |||
| emit('closeAdd'); | |||
| resetForm(); | |||
| hideModal(); | |||
| showMap.value = false; | |||
| } | |||
| openAddModel = computed(() => { | |||
| return store.state.openAddModel; | |||
| }) | |||
| watch(() => props.edit_record, (newVal) => { | |||
| if (newVal) { | |||
| title.value = '新增消息'; | |||
| createForm.value = { | |||
| id: newVal.id, | |||
| name: newVal.name, | |||
| address: newVal.address, | |||
| telephone:newVal.telephone, | |||
| fax: newVal.fax, | |||
| postal: newVal.postal, | |||
| email: newVal.email, | |||
| content: newVal.content, | |||
| } | |||
| } else { | |||
| title.value = '新增消息'; | |||
| } | |||
| }) | |||
| </script> | |||
| <style> | |||
| </style> | |||
| @@ -0,0 +1,29 @@ | |||
| export let dataForm = { | |||
| name: '', | |||
| address: '', | |||
| telephone: '', | |||
| fax: '', | |||
| postal: '', | |||
| email: '', | |||
| content: '', | |||
| } | |||
| export let otherDataForm = { | |||
| } | |||
| export const reset = () => { | |||
| dataForm = { | |||
| name: '', | |||
| address: '', | |||
| telephone: '', | |||
| fax: '', | |||
| postal: '', | |||
| email: '', | |||
| content: '', | |||
| }; | |||
| otherDataForm = { | |||
| } | |||
| return { dataForm, otherDataForm } | |||
| } | |||
| @@ -0,0 +1,21 @@ | |||
| export const cols = <ColType.type[]>[ | |||
| { | |||
| title: '用户', | |||
| dataIndex: 'name' | |||
| }, | |||
| { | |||
| title: '邮箱', | |||
| dataIndex: 'email' | |||
| }, | |||
| { | |||
| title: '消息内容', | |||
| dataIndex: 'content' | |||
| }, | |||
| { | |||
| title: '操作', | |||
| dataIndex: 'operation', | |||
| slots: { | |||
| customRender: 'operation' | |||
| } | |||
| } | |||
| ]; | |||
| @@ -0,0 +1,108 @@ | |||
| <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"> | |||
| <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="del(record.id)"> | |||
| <a-col><a-button type="primary" size="small" danger>删除</a-button></a-col> | |||
| </a-popconfirm> | |||
| </a-row> | |||
| </template> | |||
| </a-c-table> | |||
| <list-add :edit_record="edit_record" @successAdd="successAdd" @closeAdd="closeAdd"></list-add> | |||
| </template> | |||
| <script lang="ts" setup> | |||
| import { ref, onMounted, watch, computed } from 'vue'; | |||
| import ListSearch from '@/views/feedback/list/search/index.vue'; | |||
| import ListAdd from '@/views/feedback/list/add/add.vue'; | |||
| import { GetFeedbackList, GetFeedbackDetail, PostFeedbackDel } from '@/apis/models'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| import { cols } from '@/views/feedback/list/columns'; | |||
| let { store, commomParams, showModal, showOtherModal1, message } = useCommon(); | |||
| let loading = ref<Boolean>(true); | |||
| onMounted(() => { | |||
| getData(commomParams.value.search); | |||
| }) | |||
| const searchData = (data : object) => { | |||
| commomParams.value.search = data | |||
| getData(); | |||
| } | |||
| const clearData = (data : object) => { | |||
| if (data) { | |||
| commomParams.value.search = data | |||
| } else { | |||
| commomParams.value.search = { | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| keyword: '' | |||
| } | |||
| } | |||
| getData(); | |||
| } | |||
| const getPage = (data : object) => { | |||
| commomParams.value.search.page = data.current; | |||
| commomParams.value.search.pagesize = data.pageSize; | |||
| getData(); | |||
| } | |||
| const getData = async () => { | |||
| try { | |||
| loading.value = true; | |||
| let res = await GetFeedbackList(commomParams.value.search); | |||
| loading.value = false; | |||
| commomParams.value.table.data = res.data.feedbacks; | |||
| commomParams.value.table.columns = cols; | |||
| commomParams.value.page = { | |||
| current: commomParams.value.search.page, | |||
| pageSize: commomParams.value.search.pagesize, | |||
| total: res.data.total, | |||
| pageSizeOptions: ['10', '20', '30', '40'], | |||
| hideOnSinglePage: false, | |||
| showSizeChanger: true | |||
| }; | |||
| } catch { | |||
| loading.value = false; | |||
| } | |||
| } | |||
| // 编辑 | |||
| let edit_record = ref<Object>(null) | |||
| const edit = (record : object) => { | |||
| edit_record.value = record; | |||
| showModal() | |||
| } | |||
| const successAdd = () => { | |||
| getData(); | |||
| } | |||
| const closeAdd = () => { | |||
| edit_record.value = null; | |||
| } | |||
| // 删除 | |||
| const del = (id : number) => { | |||
| commomParams.value.delRecord = { id: id }; | |||
| PostFeedbackDel(commomParams.value.delRecord).then(res => { | |||
| message.success('删除成功'); | |||
| getData(); | |||
| }) | |||
| } | |||
| </script> | |||
| <style lang="less" scoped> | |||
| </style> | |||
| @@ -0,0 +1,60 @@ | |||
| <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-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 { store, commomParams, openSearchModel, hideSearch } = useCommon(); | |||
| let props = defineProps(['search_params']); | |||
| const emit = defineEmits(); | |||
| openSearchModel = computed(() => { | |||
| return store.state.openSearchModel; | |||
| }) | |||
| watch(() => props.search_params, (newVal) => { | |||
| emit('searchData', commomParams.value.search) | |||
| }) | |||
| const getData = () => { | |||
| emit('searchData', commomParams.value.search); | |||
| hideSearch() | |||
| } | |||
| // 清空搜索 | |||
| const clearSearch = () => { | |||
| commomParams.value.search = { | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| keyword: '' | |||
| } | |||
| } | |||
| const onClose = () => { | |||
| clearSearch() | |||
| hideSearch() | |||
| } | |||
| </script> | |||
| <style> | |||
| </style> | |||
| @@ -47,8 +47,9 @@ | |||
| <script setup lang="ts"> | |||
| import { ref, onMounted, computed, defineProps, watch, defineEmits } from 'vue'; | |||
| import { PostRecruitmentUpdate, PostRecruitmentAdd, GetCompanyInfo } from '@/apis/models'; | |||
| import { PostRecruitmentUpdate, PostRecruitmentAdd, GetCompanyInfo, GetRecruitmentDetail } from '@/apis/models'; | |||
| import { dataForm, otherDataForm, reset } from '@/views/jobFair/list/add/data.js'; | |||
| import he from 'he'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| let { store, openAddModel, hideModal, dayjs, disabledDate, richOption, message, imageprefix } = useCommon(); | |||
| const dayjsRef = ref(dayjs); | |||
| @@ -78,6 +79,7 @@ | |||
| } | |||
| const sumbitForm = () => { | |||
| console.log(addOtherForm.value.open_date) | |||
| createForm.value.open_date = dayjsRef.value(addOtherForm.value.open_date).format('YYYY-MM-DD') + ' ' + addOtherForm.value.time | |||
| @@ -122,11 +124,11 @@ | |||
| return store.state.openAddModel; | |||
| }) | |||
| watch(() => props.edit_record, (newVal) => { | |||
| watch(() => props.edit_record, async (newVal) => { | |||
| if (newVal) { | |||
| title.value = '编辑招聘会'; | |||
| addOtherForm.value = { | |||
| content: newVal.content, | |||
| content: he.decode(newVal.content), | |||
| open_date: dayjsRef.value(newVal.open_date.substring(0, 10)), | |||
| time: newVal.open_date.substring(11, 19) | |||
| } | |||
| @@ -4,9 +4,7 @@ | |||
| <a-typography-title :level="3">{{detailData.title}}</a-typography-title> | |||
| <a-typography-paragraph>发布时间:{{detailData.created_at}}</a-typography-paragraph> | |||
| <a-typography-text> | |||
| <div class="ql-container ql-snow"> | |||
| <div class="ql-editor" v-html="detailData.content"> | |||
| </div> | |||
| <div v-html="detailData.content"> | |||
| </div> | |||
| </a-typography-text> | |||
| </a-typography> | |||
| @@ -15,6 +13,7 @@ | |||
| <script setup lang="ts"> | |||
| import { ref, onMounted, computed, defineProps, watch, defineEmits } from 'vue'; | |||
| import he from 'he'; | |||
| import { GetRecruitmentDetail } from '@/apis/models'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| import { cols } from '@/views/company/department/columns'; | |||
| @@ -36,9 +35,8 @@ | |||
| const getData = async (val) => { | |||
| try { | |||
| let res = await GetRecruitmentDetail({ id: detail_record.value.id }); | |||
| console.log(res) | |||
| detailData.value = res.data | |||
| detailData.value.content = he.decode(detailData.value.content) | |||
| } catch { | |||
| } | |||
| } | |||
| @@ -16,6 +16,6 @@ export const cols = <ColType.type[]>[ | |||
| title: '操作', | |||
| dataIndex: 'operation', | |||
| slots: { customRender: 'operation' }, | |||
| width: 300 | |||
| width: 400 | |||
| } | |||
| ]; | |||
| @@ -1,12 +1,21 @@ | |||
| <template> | |||
| <!-- <a-c-operation @refresh="clearData"></a-c-operation> --> | |||
| <!-- <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 #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-col><a-button type="primary" size="small" primary @click="audit(record)">审核</a-button></a-col> | |||
| <a-popconfirm title="该简历通过审核?" @confirm="pass(record.customer_id)"> | |||
| <a-col><a-button type="primary" size="small" primary>通过</a-button></a-col> | |||
| </a-popconfirm> | |||
| <a-popconfirm title="该简历不通过审核?" @confirm="unpass(record.customer_id)"> | |||
| <a-col><a-button type="primary" size="small" primary>不通过</a-button></a-col> | |||
| </a-popconfirm> | |||
| <a-popconfirm title="是否要推送该简历到ES?" @confirm="pushEs(record.customer_id)"> | |||
| <a-col><a-button type="primary" size="small" primary>推送该简历到ES</a-button></a-col> | |||
| </a-popconfirm> | |||
| </a-row> | |||
| </template> | |||
| </a-c-table> | |||
| @@ -15,14 +24,13 @@ | |||
| </template> | |||
| <script lang="ts" setup> | |||
| import { ref, onMounted, watch, computed , createVNode} from 'vue'; | |||
| import { ref, onMounted, watch, computed, createVNode } from 'vue'; | |||
| import ResumeSearch from '@/views/jobSeeker/resume/search/index.vue'; | |||
| // import ResumeAdd from '@/views/jobSeeker/resume/add/add.vue'; | |||
| import ResumeDetail from '@/views/jobSeeker/resume/detail/detail.vue'; | |||
| import { PostJobseekerList } from '@/apis/models'; | |||
| import { PostJobseekerList, PostJobapplicantUpdate, PostEsJobseeker } from '@/apis/models'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| import { cols } from '@/views/jobSeeker/resume/columns'; | |||
| import { message } from 'ant-design-vue'; | |||
| let { store, commomParams, showModal, showOtherModal1, message, ExclamationCircleOutlined, Modal } = useCommon(); | |||
| let loading = ref<Boolean>(true); | |||
| onMounted(() => { | |||
| @@ -90,28 +98,34 @@ | |||
| } | |||
| // 删除 | |||
| const delOneRole = (id : number) => { | |||
| commomParams.value.delRecord = { id: id }; | |||
| PostRoleDel(commomParams.value.delRecord).then(res => { | |||
| message.success('删除成功'); | |||
| getData(); | |||
| // const delOneRole = (id : number) => { | |||
| // commomParams.value.delRecord = { id: id }; | |||
| // PostRoleDel(commomParams.value.delRecord).then(res => { | |||
| // message.success('删除成功'); | |||
| // getData(); | |||
| // }) | |||
| // } | |||
| // 审核 | |||
| const pass = (customer_id) => { | |||
| PostJobapplicantUpdate({ id: customer_id, status: 2 }).then(res => { | |||
| message.success('审核通过'); | |||
| }) | |||
| } | |||
| // 审核 | |||
| const audit = (id) => { | |||
| Modal.confirm({ | |||
| title: '是否要放入回收站', | |||
| icon: createVNode(ExclamationCircleOutlined), | |||
| onOk() { | |||
| }, | |||
| onCancel() { | |||
| }, | |||
| }); | |||
| const unpass = (customer_id) => { | |||
| PostJobapplicantUpdate({ id: customer_id, status: 3 }).then(res => { | |||
| message.success('审核不通过'); | |||
| }) | |||
| } | |||
| const pushEs = (customer_id) => { | |||
| PostEsJobseeker({ customer_ids: [customer_id] }).then(res => { | |||
| message.success('推送成功'); | |||
| }) | |||
| } | |||
| let detail_record = ref<Object>(null) | |||
| const detail = (record) => { | |||
| @@ -0,0 +1,9 @@ | |||
| <template> | |||
| <router-view></router-view> | |||
| </template> | |||
| <script> | |||
| </script> | |||
| <style> | |||
| </style> | |||
| @@ -0,0 +1,12 @@ | |||
| declare namespace SettingListType { | |||
| type addrFormType = { | |||
| name?: String, | |||
| value?: String, | |||
| remark?: String, | |||
| } | |||
| type addOtherFormType = { | |||
| value?: String, | |||
| } | |||
| } | |||
| @@ -0,0 +1,133 @@ | |||
| <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-row gutter="20"> | |||
| <a-col span="24"> | |||
| <a-form-item required label="配置名" name="name"> | |||
| <a-input v-model:value="createForm.name" placeholder="请输入配置名" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="请选择文本格式"> | |||
| <a-radio-group v-model:value="txt_mode" button-style="solid" @change="txtModeChange"> | |||
| <a-radio-button :value="1">普通文本</a-radio-button> | |||
| <a-radio-button :value="2">带有格式的文本</a-radio-button> | |||
| </a-radio-group> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24" v-if="txt_mode == 1"> | |||
| <a-form-item required label="配置内容" name="value"> | |||
| <a-input v-model:value="createForm.value" placeholder="请输入配置内容" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24" v-if="txt_mode == 2"> | |||
| <a-form-item required label="配置内容" name="value"> | |||
| <QuillEditor theme="snow" :options="options" toolbar="full" | |||
| v-model:content="addOtherForm.value" @update:content="onEditorUpdate($event)" | |||
| contentType="html" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="备注" name="mobile"> | |||
| <a-input v-model:value="createForm.remark" placeholder="请输入备注" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| </a-form> | |||
| </a-modal> | |||
| </template> | |||
| <script setup lang="ts"> | |||
| import { ref, onMounted, computed, defineProps, watch, defineEmits } from 'vue'; | |||
| import { PostSysconfigAdd, PostSysconfigUpdate } from '@/apis/models'; | |||
| import he from 'he'; | |||
| import { dataForm, otherDataForm, reset } from '@/views/company/department/add/data.js'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| let { store, openAddModel, hideModal, message, richOption } = useCommon(); | |||
| const emit = defineEmits(); | |||
| let props = defineProps(['edit_record']); | |||
| let title = ref<String>('新增配置项'); | |||
| let showMap = ref<Boolean>(false); | |||
| let txt_mode = ref<Number>(1); | |||
| const options = ref(richOption) | |||
| let createForm = ref<SettingListType.addFormType>(dataForm) | |||
| let addOtherForm = ref<SettingListType.addOtherFormType>(otherDataForm) | |||
| const txtModeChange = (data) => { | |||
| createForm.value.value = '' | |||
| addOtherForm.value.value = '' | |||
| } | |||
| // 富文本 | |||
| const onEditorUpdate = (data) => { | |||
| createForm.value.value = data | |||
| } | |||
| const sumbitForm = () => { | |||
| if (createForm.value.name && createForm.value.value) { | |||
| if (!createForm.value.id) { | |||
| PostSysconfigAdd(createForm.value).then(res => { | |||
| message.success('创建配置项成功'); | |||
| hideModal(); | |||
| resetForm(); | |||
| emit('successAdd'); | |||
| }).catch(err => { | |||
| }) | |||
| } else { | |||
| PostSysconfigUpdate(createForm.value).then(res => { | |||
| message.success('修改配置项成功'); | |||
| hideModal(); | |||
| resetForm(); | |||
| emit('successAdd'); | |||
| }).catch(err => { | |||
| }) | |||
| } | |||
| } else { | |||
| message.warning('请补充完整信息'); | |||
| } | |||
| } | |||
| const resetForm = () => { | |||
| createForm.value = reset().dataForm; | |||
| } | |||
| const cancelModal = () => { | |||
| emit('closeAdd'); | |||
| resetForm(); | |||
| hideModal(); | |||
| showMap.value = false; | |||
| } | |||
| openAddModel = computed(() => { | |||
| return store.state.openAddModel; | |||
| }) | |||
| watch(() => props.edit_record, (newVal) => { | |||
| if (newVal) { | |||
| title.value = '编辑配置项'; | |||
| if(newVal.value.length > 100) { | |||
| txt_mode.value = 2 | |||
| addOtherForm.value = { | |||
| value: he.decode(newVal.value), | |||
| } | |||
| } | |||
| createForm.value = { | |||
| id: newVal.id, | |||
| name: newVal.name, | |||
| value: newVal.value, | |||
| remark: newVal.remark | |||
| } | |||
| } else { | |||
| title.value = '新增配置项'; | |||
| } | |||
| }) | |||
| </script> | |||
| <style> | |||
| </style> | |||
| @@ -0,0 +1,23 @@ | |||
| export let dataForm = { | |||
| name: '', | |||
| value: '', | |||
| remark: '', | |||
| } | |||
| export let otherDataForm = { | |||
| cate: '', | |||
| } | |||
| export const reset = () => { | |||
| dataForm = { | |||
| name: '', | |||
| value: '', | |||
| remark: '', | |||
| }; | |||
| otherDataForm = { | |||
| value: '', | |||
| } | |||
| return { dataForm, otherDataForm } | |||
| } | |||
| @@ -0,0 +1,21 @@ | |||
| export const cols = <ColType.type[]>[ | |||
| { | |||
| title: 'CI ', | |||
| dataIndex: 'name' | |||
| }, | |||
| { | |||
| title: '配置内容', | |||
| dataIndex: 'value' | |||
| }, | |||
| { | |||
| title: '备注', | |||
| dataIndex: 'remark' | |||
| }, | |||
| { | |||
| title: '操作', | |||
| dataIndex: 'operation', | |||
| slots: { | |||
| customRender: 'operation' | |||
| } | |||
| } | |||
| ]; | |||
| @@ -0,0 +1,52 @@ | |||
| <template> | |||
| <a-typography-paragraph v-if="editMode == false">{{text}} | |||
| <HighlightOutlined @click="() => {editMode = true}" color="rgb(25, 190, 107" /> | |||
| </a-typography-paragraph> | |||
| <div v-else style="width: 100%;"> | |||
| <a-space direction="vertical" style="width: 100%;"> | |||
| <a-textarea v-model:value="text" /> | |||
| <a-flex justify="flex-end"> | |||
| <a-space> | |||
| <a-button @click="() => {editMode = false}">取消</a-button> | |||
| <a-button type="primary" @click="saveTxt">保存</a-button> | |||
| </a-space> | |||
| </a-flex> | |||
| </a-space> | |||
| </div> | |||
| </template> | |||
| <script lang="ts" setup> | |||
| import { ref, onMounted, watch, computed } from 'vue'; | |||
| import { GetTokenizerGet, PostTokenizerModify } from '@/apis/models'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| import { | |||
| HighlightOutlined | |||
| } from '@ant-design/icons-vue'; | |||
| let { store, commomParams, showModal, showOtherModal1, message } = useCommon(); | |||
| let text = ref<String>('') | |||
| let editMode = ref<Boolean>(false) | |||
| onMounted(() => { | |||
| getData(); | |||
| }) | |||
| const getData = async () => { | |||
| try { | |||
| let res = await GetTokenizerGet(); | |||
| text.value = res.data.text; | |||
| } catch { | |||
| } | |||
| } | |||
| const saveTxt = () => { | |||
| PostTokenizerModify({ text: text.value }).then(res => { | |||
| message.success('分词器更新成功'); | |||
| editMode.value = false; | |||
| }) | |||
| } | |||
| </script> | |||
| <style lang="less" scoped> | |||
| </style> | |||
| @@ -0,0 +1,9 @@ | |||
| <template> | |||
| <router-view></router-view> | |||
| </template> | |||
| <script> | |||
| </script> | |||
| <style> | |||
| </style> | |||
| @@ -0,0 +1,12 @@ | |||
| declare namespace SettingListType { | |||
| type addrFormType = { | |||
| name?: String, | |||
| value?: String, | |||
| remark?: String, | |||
| } | |||
| type addOtherFormType = { | |||
| value?: String, | |||
| } | |||
| } | |||
| @@ -0,0 +1,133 @@ | |||
| <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-row gutter="20"> | |||
| <a-col span="24"> | |||
| <a-form-item required label="配置名" name="name"> | |||
| <a-input v-model:value="createForm.name" placeholder="请输入配置名" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="请选择文本格式"> | |||
| <a-radio-group v-model:value="txt_mode" button-style="solid" @change="txtModeChange"> | |||
| <a-radio-button :value="1">普通文本</a-radio-button> | |||
| <a-radio-button :value="2">带有格式的文本</a-radio-button> | |||
| </a-radio-group> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24" v-if="txt_mode == 1"> | |||
| <a-form-item required label="配置内容" name="value"> | |||
| <a-input v-model:value="createForm.value" placeholder="请输入配置内容" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24" v-if="txt_mode == 2"> | |||
| <a-form-item required label="配置内容" name="value"> | |||
| <QuillEditor theme="snow" :options="options" toolbar="full" | |||
| v-model:content="addOtherForm.value" @update:content="onEditorUpdate($event)" | |||
| contentType="html" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="备注" name="mobile"> | |||
| <a-input v-model:value="createForm.remark" placeholder="请输入备注" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| </a-form> | |||
| </a-modal> | |||
| </template> | |||
| <script setup lang="ts"> | |||
| import { ref, onMounted, computed, defineProps, watch, defineEmits } from 'vue'; | |||
| import { PostSysconfigAdd, PostSysconfigUpdate } from '@/apis/models'; | |||
| import he from 'he'; | |||
| import { dataForm, otherDataForm, reset } from '@/views/setting/item/add/data.js'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| let { store, openAddModel, hideModal, message, richOption } = useCommon(); | |||
| const emit = defineEmits(); | |||
| let props = defineProps(['edit_record']); | |||
| let title = ref<String>('新增配置项'); | |||
| let showMap = ref<Boolean>(false); | |||
| let txt_mode = ref<Number>(1); | |||
| const options = ref(richOption) | |||
| let createForm = ref<SettingListType.addFormType>(dataForm) | |||
| let addOtherForm = ref<SettingListType.addOtherFormType>(otherDataForm) | |||
| const txtModeChange = (data) => { | |||
| createForm.value.value = '' | |||
| addOtherForm.value.value = '' | |||
| } | |||
| // 富文本 | |||
| const onEditorUpdate = (data) => { | |||
| createForm.value.value = data | |||
| } | |||
| const sumbitForm = () => { | |||
| if (createForm.value.name && createForm.value.value) { | |||
| if (!createForm.value.id) { | |||
| PostSysconfigAdd(createForm.value).then(res => { | |||
| message.success('创建配置项成功'); | |||
| hideModal(); | |||
| resetForm(); | |||
| emit('successAdd'); | |||
| }).catch(err => { | |||
| }) | |||
| } else { | |||
| PostSysconfigUpdate(createForm.value).then(res => { | |||
| message.success('修改配置项成功'); | |||
| hideModal(); | |||
| resetForm(); | |||
| emit('successAdd'); | |||
| }).catch(err => { | |||
| }) | |||
| } | |||
| } else { | |||
| message.warning('请补充完整信息'); | |||
| } | |||
| } | |||
| const resetForm = () => { | |||
| createForm.value = reset().dataForm; | |||
| } | |||
| const cancelModal = () => { | |||
| emit('closeAdd'); | |||
| resetForm(); | |||
| hideModal(); | |||
| showMap.value = false; | |||
| } | |||
| openAddModel = computed(() => { | |||
| return store.state.openAddModel; | |||
| }) | |||
| watch(() => props.edit_record, (newVal) => { | |||
| if (newVal) { | |||
| title.value = '编辑配置项'; | |||
| if(newVal.value.length > 100) { | |||
| txt_mode.value = 2 | |||
| addOtherForm.value = { | |||
| value: he.decode(newVal.value), | |||
| } | |||
| } | |||
| createForm.value = { | |||
| id: newVal.id, | |||
| name: newVal.name, | |||
| value: newVal.value, | |||
| remark: newVal.remark | |||
| } | |||
| } else { | |||
| title.value = '新增配置项'; | |||
| } | |||
| }) | |||
| </script> | |||
| <style> | |||
| </style> | |||
| @@ -0,0 +1,23 @@ | |||
| export let dataForm = { | |||
| name: '', | |||
| value: '', | |||
| remark: '', | |||
| } | |||
| export let otherDataForm = { | |||
| cate: '', | |||
| } | |||
| export const reset = () => { | |||
| dataForm = { | |||
| name: '', | |||
| value: '', | |||
| remark: '', | |||
| }; | |||
| otherDataForm = { | |||
| value: '', | |||
| } | |||
| return { dataForm, otherDataForm } | |||
| } | |||
| @@ -0,0 +1,21 @@ | |||
| export const cols = <ColType.type[]>[ | |||
| { | |||
| title: '配置名', | |||
| dataIndex: 'name' | |||
| }, | |||
| { | |||
| title: '配置内容', | |||
| dataIndex: 'value' | |||
| }, | |||
| { | |||
| title: '备注', | |||
| dataIndex: 'remark' | |||
| }, | |||
| { | |||
| title: '操作', | |||
| dataIndex: 'operation', | |||
| slots: { | |||
| customRender: 'operation' | |||
| } | |||
| } | |||
| ]; | |||
| @@ -0,0 +1,109 @@ | |||
| <template> | |||
| <setting-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></setting-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"> | |||
| <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="del(record.id)"> | |||
| <a-col><a-button type="primary" size="small" danger>删除</a-button></a-col> | |||
| </a-popconfirm> | |||
| </a-row> | |||
| </template> | |||
| </a-c-table> | |||
| <setting-add :edit_record="edit_record" @successAdd="successAdd" @closeAdd="closeAdd"></setting-add> | |||
| </template> | |||
| <script lang="ts" setup> | |||
| import { ref, onMounted, watch, computed } from 'vue'; | |||
| import SettingSearch from '@/views/setting/item/search/index.vue'; | |||
| import SettingAdd from '@/views/setting/item/add/add.vue'; | |||
| import { GetSysconfigList, PostSysconfigDel } from '@/apis/models'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| import { cols } from '@/views/setting/item/columns'; | |||
| import { message } from 'ant-design-vue'; | |||
| let { store, commomParams, showModal, showOtherModal1 } = useCommon(); | |||
| let loading = ref<Boolean>(true); | |||
| onMounted(() => { | |||
| getData(commomParams.value.search); | |||
| }) | |||
| const searchData = (data : object) => { | |||
| commomParams.value.search = data | |||
| getData(); | |||
| } | |||
| const clearData = (data : object) => { | |||
| if (data) { | |||
| commomParams.value.search = data | |||
| } else { | |||
| commomParams.value.search = { | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| keyword: '' | |||
| } | |||
| } | |||
| getData(); | |||
| } | |||
| const getPage = (data : object) => { | |||
| commomParams.value.search.page = data.current; | |||
| commomParams.value.search.pagesize = data.pageSize; | |||
| getData(); | |||
| } | |||
| const getData = async () => { | |||
| try { | |||
| loading.value = true; | |||
| let res = await GetSysconfigList(commomParams.value.search); | |||
| loading.value = false; | |||
| commomParams.value.table.data = res.data.sysconfigs; | |||
| commomParams.value.table.columns = cols; | |||
| commomParams.value.page = { | |||
| current: commomParams.value.search.page, | |||
| pageSize: commomParams.value.search.pagesize, | |||
| total: res.data.total, | |||
| pageSizeOptions: ['10', '20', '30', '40'], | |||
| hideOnSinglePage: false, | |||
| showSizeChanger: true | |||
| }; | |||
| } catch { | |||
| loading.value = false; | |||
| } | |||
| } | |||
| // 编辑 | |||
| let edit_record = ref<Object>(null) | |||
| const edit = (record : object) => { | |||
| edit_record.value = record; | |||
| showModal() | |||
| } | |||
| const successAdd = () => { | |||
| getData(); | |||
| } | |||
| const closeAdd = () => { | |||
| edit_record.value = null; | |||
| } | |||
| // 删除 | |||
| const del = (id : number) => { | |||
| commomParams.value.delRecord = { id: id }; | |||
| PostSysconfigDel(commomParams.value.delRecord).then(res => { | |||
| message.success('删除成功'); | |||
| getData(); | |||
| }) | |||
| } | |||
| </script> | |||
| <style lang="less" scoped> | |||
| </style> | |||
| @@ -0,0 +1,60 @@ | |||
| <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-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 { store, commomParams, openSearchModel, hideSearch } = useCommon(); | |||
| let props = defineProps(['search_params']); | |||
| const emit = defineEmits(); | |||
| openSearchModel = computed(() => { | |||
| return store.state.openSearchModel; | |||
| }) | |||
| watch(() => props.search_params, (newVal) => { | |||
| emit('searchData', commomParams.value.search) | |||
| }) | |||
| const getData = () => { | |||
| emit('searchData', commomParams.value.search); | |||
| hideSearch() | |||
| } | |||
| // 清空搜索 | |||
| const clearSearch = () => { | |||
| commomParams.value.search = { | |||
| page: 1, | |||
| pagesize: 10, | |||
| sort: 'id', | |||
| sortby: 'asc', | |||
| keyword: '' | |||
| } | |||
| } | |||
| const onClose = () => { | |||
| clearSearch() | |||
| hideSearch() | |||
| } | |||
| </script> | |||
| <style> | |||
| </style> | |||