| <link rel="icon" type="image/svg+xml" href="/logo_1.jpg" /> | <link rel="icon" type="image/svg+xml" href="/logo_1.jpg" /> | ||||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||||
| <title>菊城人才市场后台管理</title> | <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"> | <link rel="stylesheet" crossorigin href="/assets/index-7KXeZgtg.css"> | ||||
| </head> | </head> | ||||
| <body> | <body> |
| "axios": "^1.6.2", | "axios": "^1.6.2", | ||||
| "dayjs": "^1.11.10", | "dayjs": "^1.11.10", | ||||
| "echarts": "^5.4.3", | "echarts": "^5.4.3", | ||||
| "he": "^1.2.0", | |||||
| "moment": "^2.30.1", | "moment": "^2.30.1", | ||||
| "vue": "^3.2.36", | "vue": "^3.2.36", | ||||
| "vue-router": "^4.2.5", | "vue-router": "^4.2.5", | ||||
| }, | }, | ||||
| "node_modules/he": { | "node_modules/he": { | ||||
| "version": "1.2.0", | "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==", | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", | ||||
| "dev": true, | |||||
| "bin": { | "bin": { | ||||
| "he": "bin/he" | "he": "bin/he" | ||||
| } | } | ||||
| }, | }, | ||||
| "he": { | "he": { | ||||
| "version": "1.2.0", | "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": { | "iconv-lite": { | ||||
| "version": "0.6.3", | "version": "0.6.3", |
| "axios": "^1.6.2", | "axios": "^1.6.2", | ||||
| "dayjs": "^1.11.10", | "dayjs": "^1.11.10", | ||||
| "echarts": "^5.4.3", | "echarts": "^5.4.3", | ||||
| "he": "^1.2.0", | |||||
| "moment": "^2.30.1", | "moment": "^2.30.1", | ||||
| "vue": "^3.2.36", | "vue": "^3.2.36", | ||||
| "vue-router": "^4.2.5", | "vue-router": "^4.2.5", |
| export const GetStatsPosition = getModel(url.StatsPosition); | export const GetStatsPosition = getModel(url.StatsPosition); | ||||
| export const GetStatsTitleAndSkill = getModel(url.StatsTitleAndSkill); | export const GetStatsTitleAndSkill = getModel(url.StatsTitleAndSkill); | ||||
| export const GetStatsJobMajor = getModel(url.StatsJobMajor); | 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); |
| StatsPosition : String, | StatsPosition : String, | ||||
| StatsTitleAndSkill : String, | StatsTitleAndSkill : String, | ||||
| StatsJobMajor : 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, | |||||
| } | } | ||||
| } | } |
| // 字典 | // 字典 | ||||
| dictTree: common + '/dict/tree', | dictTree: common + '/dict/tree', | ||||
| ImageUpload: common + '/image/upload?imgtype=1', | ImageUpload: common + '/image/upload?imgtype=1', | ||||
| DocUpload: common + '/doc/upload?doctype=1', | |||||
| EsJobseeker: common + '/es/jobseeker', | |||||
| TokenizerModify: admin + '/tokenizer/modify', | |||||
| TokenizerGet: admin + '/tokenizer/get', | |||||
| // 广告 | // 广告 | ||||
| // 广告列表 | // 广告列表 | ||||
| StatsTitleAndSkill: admin + '/stats/titleandskill', // 求职者职称与技能统计 | StatsTitleAndSkill: admin + '/stats/titleandskill', // 求职者职称与技能统计 | ||||
| StatsJobMajor: admin + '/stats/job_major', // 企业职位统计 | 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', // 详情 | |||||
| } | } |
| openSearchModel: true | openSearchModel: true | ||||
| }) | }) | ||||
| }; | }; | ||||
| const hideSearch = () => { | const hideSearch = () => { | ||||
| store.commit('getSearchModel', { | store.commit('getSearchModel', { | ||||
| openSearchModel: false | openSearchModel: false | ||||
| let richOption = ref<Object>({ | let richOption = ref<Object>({ | ||||
| debug: 'info', | debug: 'info', | ||||
| modules: { | 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: '请输入文字' | 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/' | const imageprefix : string = 'https://rcsc-test.jcjob.cn/img/' | ||||
| return { | return { |
| }; | }; | ||||
| 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]; |
| import StatisticsCompany from '@/views/statistics/company/index.vue'; | import StatisticsCompany from '@/views/statistics/company/index.vue'; | ||||
| import StatisticsCompanyJob from '@/views/statistics/company/job/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 = { | export const routerList = { | ||||
| Permission, | Permission, | ||||
| ROLE, | ROLE, | ||||
| StatisticsResumeTitleSkill, | StatisticsResumeTitleSkill, | ||||
| StatisticsResumeWorkExperience, | StatisticsResumeWorkExperience, | ||||
| StatisticsCompany, | StatisticsCompany, | ||||
| StatisticsCompanyJob | |||||
| StatisticsCompanyJob, | |||||
| Setting, | |||||
| SettingItem, | |||||
| Other, | |||||
| Tokenizer, | |||||
| Feedback, | |||||
| FeedbackList | |||||
| } | } |
| </div> | </div> | ||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </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-col span="24"> | ||||
| <a-form-item required label="门店名" name="store_name"> | <a-form-item required label="门店名" name="store_name"> | ||||
| <a-input v-model:value="createForm.store_name" placeholder="请输入门店名" /> | <a-input v-model:value="createForm.store_name" placeholder="请输入门店名" /> | ||||
| const getLoc = (mapData : Object) => { | const getLoc = (mapData : Object) => { | ||||
| console.log(mapData) | console.log(mapData) | ||||
| createForm.value.address = mapData.poiaddress; | 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; | showMap.value = false; | ||||
| } | } | ||||
| <template> | <template> | ||||
| <address-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></address-search> | <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" | <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page" | ||||
| @page="getPage" :loading="loading"> | @page="getPage" :loading="loading"> | ||||
| <template #default="{ record }"> | <template #default="{ record }"> | ||||
| import { ref, onMounted, watch, computed } from 'vue'; | import { ref, onMounted, watch, computed } from 'vue'; | ||||
| import AddressSearch from '@/views/activity/address/search/index.vue'; | import AddressSearch from '@/views/activity/address/search/index.vue'; | ||||
| import AddressAdd from '@/views/activity/address/add/add.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 { useCommon } from '@/hooks/useCommon'; | ||||
| import { cols } from '@/views/activity/address/columns'; | import { cols } from '@/views/activity/address/columns'; | ||||
| import { message } from 'ant-design-vue'; | import { message } from 'ant-design-vue'; | ||||
| getData(); | getData(); | ||||
| }) | }) | ||||
| } | } | ||||
| const download = () => { | |||||
| PostActivityExportUsers().then(res => { | |||||
| let url = 'https://rcsc-test.jcjob.cn/img' + res.data.excel_url; | |||||
| window.open(url); | |||||
| }) | |||||
| } | |||||
| </script> | </script> | ||||
| <style lang="less" scoped> | <style lang="less" scoped> |
| <template> | <template> | ||||
| <list-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></list-search> | <list-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></list-search> | ||||
| <a-c-operation @refresh="clearData"> | <a-c-operation @refresh="clearData"> | ||||
| <a-col> | |||||
| <a-button type="primary" @click="download">导出参与活动用户</a-button> | |||||
| </a-col> | |||||
| </a-c-operation> | </a-c-operation> | ||||
| <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page" | <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page" | ||||
| @page="getPage" :loading="loading"> | @page="getPage" :loading="loading"> | ||||
| import { ref, onMounted, watch, computed } from 'vue'; | import { ref, onMounted, watch, computed } from 'vue'; | ||||
| import ListSearch from '@/views/advertisement/putin/search/index.vue'; | import ListSearch from '@/views/advertisement/putin/search/index.vue'; | ||||
| import ListAdd from '@/views/advertisement/putin/add/add.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 { useCommon } from '@/hooks/useCommon'; | ||||
| import { cols } from '@/views/advertisement/putin/columns'; | import { cols } from '@/views/advertisement/putin/columns'; | ||||
| import { message } from 'ant-design-vue'; | import { message } from 'ant-design-vue'; | ||||
| }) | }) | ||||
| } | } | ||||
| const download = () => { | |||||
| PostActivityExportUsers().then(res => { | |||||
| let url = 'https://rcsc-test.jcjob.cn/img' + res.data.excel_url; | |||||
| window.open(url); | |||||
| }) | |||||
| } | |||||
| </script> | </script> | ||||
| <style lang="less" scoped> | <style lang="less" scoped> |
| <template> | |||||
| <router-view></router-view> | |||||
| </template> | |||||
| <script> | |||||
| </script> | |||||
| <style> | |||||
| </style> |
| declare namespace FeedbackListType { | |||||
| type addrFormType = { | |||||
| name?: String, | |||||
| address?: String, | |||||
| telephone?: String, | |||||
| fax?: String, | |||||
| postal?: String, | |||||
| email?: String, | |||||
| content?: String, | |||||
| } | |||||
| type addOtherFormType = { | |||||
| } | |||||
| } | |||||
| <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> |
| 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 } | |||||
| } |
| export const cols = <ColType.type[]>[ | |||||
| { | |||||
| title: '用户', | |||||
| dataIndex: 'name' | |||||
| }, | |||||
| { | |||||
| title: '邮箱', | |||||
| dataIndex: 'email' | |||||
| }, | |||||
| { | |||||
| title: '消息内容', | |||||
| dataIndex: 'content' | |||||
| }, | |||||
| { | |||||
| title: '操作', | |||||
| dataIndex: 'operation', | |||||
| slots: { | |||||
| customRender: 'operation' | |||||
| } | |||||
| } | |||||
| ]; |
| <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> |
| <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> |
| <script setup lang="ts"> | <script setup lang="ts"> | ||||
| import { ref, onMounted, computed, defineProps, watch, defineEmits } from 'vue'; | 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 { dataForm, otherDataForm, reset } from '@/views/jobFair/list/add/data.js'; | ||||
| import he from 'he'; | |||||
| import { useCommon } from '@/hooks/useCommon'; | import { useCommon } from '@/hooks/useCommon'; | ||||
| let { store, openAddModel, hideModal, dayjs, disabledDate, richOption, message, imageprefix } = useCommon(); | let { store, openAddModel, hideModal, dayjs, disabledDate, richOption, message, imageprefix } = useCommon(); | ||||
| const dayjsRef = ref(dayjs); | const dayjsRef = ref(dayjs); | ||||
| } | } | ||||
| const sumbitForm = () => { | const sumbitForm = () => { | ||||
| console.log(addOtherForm.value.open_date) | console.log(addOtherForm.value.open_date) | ||||
| createForm.value.open_date = dayjsRef.value(addOtherForm.value.open_date).format('YYYY-MM-DD') + ' ' + addOtherForm.value.time | createForm.value.open_date = dayjsRef.value(addOtherForm.value.open_date).format('YYYY-MM-DD') + ' ' + addOtherForm.value.time | ||||
| return store.state.openAddModel; | return store.state.openAddModel; | ||||
| }) | }) | ||||
| watch(() => props.edit_record, (newVal) => { | |||||
| watch(() => props.edit_record, async (newVal) => { | |||||
| if (newVal) { | if (newVal) { | ||||
| title.value = '编辑招聘会'; | title.value = '编辑招聘会'; | ||||
| addOtherForm.value = { | addOtherForm.value = { | ||||
| content: newVal.content, | |||||
| content: he.decode(newVal.content), | |||||
| open_date: dayjsRef.value(newVal.open_date.substring(0, 10)), | open_date: dayjsRef.value(newVal.open_date.substring(0, 10)), | ||||
| time: newVal.open_date.substring(11, 19) | time: newVal.open_date.substring(11, 19) | ||||
| } | } |
| <a-typography-title :level="3">{{detailData.title}}</a-typography-title> | <a-typography-title :level="3">{{detailData.title}}</a-typography-title> | ||||
| <a-typography-paragraph>发布时间:{{detailData.created_at}}</a-typography-paragraph> | <a-typography-paragraph>发布时间:{{detailData.created_at}}</a-typography-paragraph> | ||||
| <a-typography-text> | <a-typography-text> | ||||
| <div class="ql-container ql-snow"> | |||||
| <div class="ql-editor" v-html="detailData.content"> | |||||
| </div> | |||||
| <div v-html="detailData.content"> | |||||
| </div> | </div> | ||||
| </a-typography-text> | </a-typography-text> | ||||
| </a-typography> | </a-typography> | ||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||
| import { ref, onMounted, computed, defineProps, watch, defineEmits } from 'vue'; | import { ref, onMounted, computed, defineProps, watch, defineEmits } from 'vue'; | ||||
| import he from 'he'; | |||||
| import { GetRecruitmentDetail } from '@/apis/models'; | import { GetRecruitmentDetail } from '@/apis/models'; | ||||
| import { useCommon } from '@/hooks/useCommon'; | import { useCommon } from '@/hooks/useCommon'; | ||||
| import { cols } from '@/views/company/department/columns'; | import { cols } from '@/views/company/department/columns'; | ||||
| const getData = async (val) => { | const getData = async (val) => { | ||||
| try { | try { | ||||
| let res = await GetRecruitmentDetail({ id: detail_record.value.id }); | let res = await GetRecruitmentDetail({ id: detail_record.value.id }); | ||||
| console.log(res) | |||||
| detailData.value = res.data | detailData.value = res.data | ||||
| detailData.value.content = he.decode(detailData.value.content) | |||||
| } catch { | } catch { | ||||
| } | } | ||||
| } | } |
| title: '操作', | title: '操作', | ||||
| dataIndex: 'operation', | dataIndex: 'operation', | ||||
| slots: { customRender: 'operation' }, | slots: { customRender: 'operation' }, | ||||
| width: 300 | |||||
| width: 400 | |||||
| } | } | ||||
| ]; | ]; |
| <template> | <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" | <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page" | ||||
| @page="getPage" :loading="loading"> | @page="getPage" :loading="loading"> | ||||
| <template #default="{ record }"> | <template #default="{ record }"> | ||||
| <a-row :gutter="10"> | <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="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="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> | </a-row> | ||||
| </template> | </template> | ||||
| </a-c-table> | </a-c-table> | ||||
| </template> | </template> | ||||
| <script lang="ts" setup> | <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 ResumeSearch from '@/views/jobSeeker/resume/search/index.vue'; | ||||
| // import ResumeAdd from '@/views/jobSeeker/resume/add/add.vue'; | // import ResumeAdd from '@/views/jobSeeker/resume/add/add.vue'; | ||||
| import ResumeDetail from '@/views/jobSeeker/resume/detail/detail.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 { useCommon } from '@/hooks/useCommon'; | ||||
| import { cols } from '@/views/jobSeeker/resume/columns'; | import { cols } from '@/views/jobSeeker/resume/columns'; | ||||
| import { message } from 'ant-design-vue'; | |||||
| let { store, commomParams, showModal, showOtherModal1, message, ExclamationCircleOutlined, Modal } = useCommon(); | let { store, commomParams, showModal, showOtherModal1, message, ExclamationCircleOutlined, Modal } = useCommon(); | ||||
| let loading = ref<Boolean>(true); | let loading = ref<Boolean>(true); | ||||
| onMounted(() => { | onMounted(() => { | ||||
| } | } | ||||
| // 删除 | // 删除 | ||||
| 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) | let detail_record = ref<Object>(null) | ||||
| const detail = (record) => { | const detail = (record) => { |
| <template> | |||||
| <router-view></router-view> | |||||
| </template> | |||||
| <script> | |||||
| </script> | |||||
| <style> | |||||
| </style> |
| declare namespace SettingListType { | |||||
| type addrFormType = { | |||||
| name?: String, | |||||
| value?: String, | |||||
| remark?: String, | |||||
| } | |||||
| type addOtherFormType = { | |||||
| value?: String, | |||||
| } | |||||
| } | |||||
| <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> |
| export let dataForm = { | |||||
| name: '', | |||||
| value: '', | |||||
| remark: '', | |||||
| } | |||||
| export let otherDataForm = { | |||||
| cate: '', | |||||
| } | |||||
| export const reset = () => { | |||||
| dataForm = { | |||||
| name: '', | |||||
| value: '', | |||||
| remark: '', | |||||
| }; | |||||
| otherDataForm = { | |||||
| value: '', | |||||
| } | |||||
| return { dataForm, otherDataForm } | |||||
| } |
| export const cols = <ColType.type[]>[ | |||||
| { | |||||
| title: 'CI ', | |||||
| dataIndex: 'name' | |||||
| }, | |||||
| { | |||||
| title: '配置内容', | |||||
| dataIndex: 'value' | |||||
| }, | |||||
| { | |||||
| title: '备注', | |||||
| dataIndex: 'remark' | |||||
| }, | |||||
| { | |||||
| title: '操作', | |||||
| dataIndex: 'operation', | |||||
| slots: { | |||||
| customRender: 'operation' | |||||
| } | |||||
| } | |||||
| ]; |
| <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> |
| <template> | |||||
| <router-view></router-view> | |||||
| </template> | |||||
| <script> | |||||
| </script> | |||||
| <style> | |||||
| </style> |
| declare namespace SettingListType { | |||||
| type addrFormType = { | |||||
| name?: String, | |||||
| value?: String, | |||||
| remark?: String, | |||||
| } | |||||
| type addOtherFormType = { | |||||
| value?: String, | |||||
| } | |||||
| } | |||||
| <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> |
| export let dataForm = { | |||||
| name: '', | |||||
| value: '', | |||||
| remark: '', | |||||
| } | |||||
| export let otherDataForm = { | |||||
| cate: '', | |||||
| } | |||||
| export const reset = () => { | |||||
| dataForm = { | |||||
| name: '', | |||||
| value: '', | |||||
| remark: '', | |||||
| }; | |||||
| otherDataForm = { | |||||
| value: '', | |||||
| } | |||||
| return { dataForm, otherDataForm } | |||||
| } |
| export const cols = <ColType.type[]>[ | |||||
| { | |||||
| title: '配置名', | |||||
| dataIndex: 'name' | |||||
| }, | |||||
| { | |||||
| title: '配置内容', | |||||
| dataIndex: 'value' | |||||
| }, | |||||
| { | |||||
| title: '备注', | |||||
| dataIndex: 'remark' | |||||
| }, | |||||
| { | |||||
| title: '操作', | |||||
| dataIndex: 'operation', | |||||
| slots: { | |||||
| customRender: 'operation' | |||||
| } | |||||
| } | |||||
| ]; |
| <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> |
| <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> |