瀏覽代碼

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

Xiao_123 3 月之前
父節點
當前提交
2d982927bb

+ 0 - 8
components.d.ts

@@ -31,10 +31,7 @@ declare module 'vue' {
     CtTextField: typeof import('./src/components/CtVuetify/CtTextField/index.vue')['default']
     DatePicker: typeof import('./src/components/DatePicker/index.vue')['default']
     Echarts: typeof import('./src/components/Echarts/index.vue')['default']
-    ElCascader: typeof import('element-plus/es')['ElCascader']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
-    Ellipsis: typeof import('./src/components/Ellipsis/index.vue')['default']
-    ElTree: typeof import('element-plus/es')['ElTree']
     Empty: typeof import('./src/components/Empty/index.vue')['default']
     File: typeof import('./src/components/Upload/file.vue')['default']
     HeadSearch: typeof import('./src/components/headSearch/index.vue')['default']
@@ -72,15 +69,10 @@ declare module 'vue' {
     TextInput: typeof import('./src/components/FormUI/TextInput/index.vue')['default']
     TipDialog: typeof import('./src/components/CtDialog/tipDialog.vue')['default']
     ToolBar: typeof import('./src/components/PreviewImg/toolBar.vue')['default']
-    Tooltip: typeof import('./src/components/Tooltip/index.vue')['default']
-    ToolTip: typeof import('./src/components/CtTooltip/ToolTip.vue')['default']
     VerificationCode: typeof import('./src/components/VerificationCode/index.vue')['default']
     Verifition: typeof import('./src/components/Verifition/index.vue')['default']
     VerifyPoints: typeof import('./src/components/Verifition/Verify/VerifyPoints.vue')['default']
     VerifySlide: typeof import('./src/components/Verifition/Verify/VerifySlide.vue')['default']
     WangEditor: typeof import('./src/components/FormUI/wangEditor/index.vue')['default']
   }
-  export interface ComponentCustomProperties {
-    vLoading: typeof import('element-plus/es')['ElLoadingDirective']
-  }
 }

+ 1 - 1
src/layout/company/navBar.vue

@@ -35,7 +35,7 @@
                   <v-avatar>
                     <v-img alt="" :src="getUserAvatar(baseInfo?.avatar, baseInfo?.sex)"></v-img>
                   </v-avatar>
-                  <div class="ml-2 commonHover">{{ baseInfo?.name ?? baseInfo?.phone }}</div>
+                  <div class="ml-2 commonHover">{{ formatName(baseInfo?.name ?? baseInfo?.phone) }}</div>
                 </div>
               </template>
 

+ 2 - 1
src/layout/personal/navBar.vue

@@ -113,7 +113,7 @@
 
     <CtDialog :visible="show" title="请选择要切换的公司账号" :footer="true" widthType="2" @close="show = false" @submit="switchSubmit">
       <v-radio-group v-model="radios" :hide-details="true">
-        <v-radio v-for="item in enterpriseList" :key="item.enterpriseId" color="primary" :label="item.enterpriseName" :value="item.enterpriseId"></v-radio>
+        <v-radio v-for="item in enterpriseList" :key="item.enterpriseId" color="primary" :label="formatName(item.enterpriseName)" :value="item.enterpriseId"></v-radio>
       </v-radio-group>
       <div class="text-end pr-5 pt-5">
         <span class="color-error cursor-pointer border-bottom-error" @click="newRegistering">{{ btnType ? '都不是我要的?去注册新企业' : '查看申请进度' }}</span>
@@ -136,6 +136,7 @@ import MessageNotification from '../message.vue'
 import { getUserAvatar } from '@/utils/avatar'
 import defineListPage from '@/views/entrances/navBar/components/defineListPage'
 import { update } from 'lodash'
+import { formatName } from '@/utils/getText'
 
 defineOptions({ name: 'personal-navbar' })
 

+ 15 - 3
src/views/recruit/personal/company/index.vue

@@ -39,6 +39,7 @@ import companyItem from './components/companyItem'
 import MPagination from '@/components/CtPagination'
 import cityCascadeSelect from '@/views/recruit/personal/position/components/conditionFilter/cityCascadeSelect.vue'
 // F:\work\menduner\src\views\recruit\personal\position\components\conditionFilter\cityCascadeSelect.vue
+import Snackbar from '@/plugins/snackbar'
 
 const route = useRoute()
 const router = useRouter()
@@ -53,6 +54,7 @@ const pages = ref({
 const query = ref({})
 
 const dealRouteQuery = (data) => {
+  data.date = new Date().getTime() // 用于前端刷新路由参数
   const arr = Object.keys(data).map(e => {
     if (data[e]) {
       return Array.isArray(data[e]) ? `${e}=${data[e].join('_')}` : `${e}=${data[e]}`
@@ -63,11 +65,14 @@ const dealRouteQuery = (data) => {
   if (str) router.push(`${route.path}?${str}`)
 }
 
-const content = ref(route.query.name || '')
+const content = ref(route?.query?.name ? route.query?.name.includes('&') ? decodeURIComponent(route.query.name) : route.query.name : '')
+
 // 搜索
 const handleSearch = async (val, key) => {
   if (!val && key !== 'name') return
+  if (key === 'name' && val === '&') return Snackbar.warning('请输入要查询的公司名称!')
   if (key === 'name') content.value = val
+  if (val?.includes('&')) val = encodeURIComponent(val)
   pages.value.pageNo = 1
   query.value[key] = val
   dealRouteQuery(query.value)
@@ -89,6 +94,7 @@ const inputChange = async({ idName: key, values }) => { // areaIds
 const noParams = ref(true)
 const getCompanyData = async () => {
   noParams.value = true
+  if (query.value?.date) delete query.value.date
   Object.keys(query.value).forEach(key => {
     // 没有筛选条件不请求数据
     if (query.value[key]) noParams.value = false
@@ -98,7 +104,9 @@ const getCompanyData = async () => {
     total.value = 0
     return
   }
-  const { list, total: number } = await getEnterpriseSearch({ ...query.value, ...pages.value })
+  const params = { ...query.value, ...pages.value }
+  if (params?.name) params.name = decodeURIComponent(params.name)
+  const { list, total: number } = await getEnterpriseSearch(params)
   if (!list.length) {
     items.value = []
     total.value = 0
@@ -115,7 +123,10 @@ const getCompanyData = async () => {
 const handleClear = () => {
   clear.value = true
   if (query.value.name || query.value.areaIds?.length) {
-    dealRouteQuery(query.value)
+    dealRouteQuery({
+      ...(query.value.name && { name: query.value.name }),
+      ...(query.value.areaIds?.length && { areaIds: query.value.areaIds })
+    })
     // getCompanyData()
   } else {
     router.push(route.path)
@@ -129,6 +140,7 @@ if (Object.keys(route.query).length) {
   const objData = {}
   Object.keys(route.query).map(e => {
     if (e === 'areaIds') return objData[e] = route.query[e].split('_')
+    if (e === 'name') return objData[e] = route.query[e].includes('&') ? encodeURIComponent(route.query[e]) : route.query[e]
     else objData[e] = route.query[e]
   })
   if (Object.keys(objData).length) {

+ 1 - 0
src/views/recruit/personal/home/index.vue

@@ -107,6 +107,7 @@ const handleLeftClick = (val) => {
 
 const router = useRouter()
 const handleSearch = (val) => {
+  val = val?.includes('&') ? encodeURIComponent(val) : val
   window.open(val ? `/recruit/personal/position?content=${val}` : `/recruit/personal/position`)
 }