flat: 过期状态

This commit is contained in:
Apcallover
2025-11-27 21:45:15 +08:00
parent 4563fa90af
commit dfd79646d6
5 changed files with 108 additions and 67 deletions

View File

@@ -465,3 +465,7 @@ html {
text-overflow: ellipsis; text-overflow: ellipsis;
/* 使用省略号 */ /* 使用省略号 */
} }
.grayscale {
filter: grayscale(100%) opacity(0.6);
}

View File

@@ -1,36 +1,18 @@
<template> <template>
<view v-for="company in listData" :key="company.id"> <view v-for="company in listData" :key="company.id">
<view v-if="company.dataType==2" class="cards" @click="nextDetail(company)"> <view
<view class="card-company"> v-if="company.dataType == 2"
<text class="company line_1">{{ company.name }}</text> :class="{ grayscale: company.isPublish }"
</view> class="cards"
<view class="card-bottom "> @click="nextDetail(company)"
<view class="fl_box fs_14"> >
<view class="mar_ri10">{{company.industry}}</view>
<view>{{company.scale }}</view>
</view>
<view class="ris">
<text class="fs_14">
在招职位·
<text class="color_256BFA">{{ company.totalRecruitment || '-' }}</text>
</text>
</view>
</view>
<view class="card-tags">
<view class="tag" v-if="company.nature">
{{company.nature}}
</view>
</view>
</view>
<view v-else class="cards" @click="nextDetail(company)">
<view class="card-company"> <view class="card-company">
<text class="company line_1">{{ company.name }}</text> <text class="company line_1">{{ company.name }}</text>
</view> </view>
<view class="card-bottom"> <view class="card-bottom">
<view class="fl_box fs_14"> <view class="fl_box fs_14">
<view class="mar_ri10">{{company.industry}}</view> <view class="mar_ri10">{{ company.industry }}</view>
<view>{{company.scale }}</view> <view>{{ company.scale }}</view>
</view> </view>
<view class="ris"> <view class="ris">
<text class="fs_14"> <text class="fs_14">
@@ -42,7 +24,30 @@
</view> </view>
<view class="card-tags"> <view class="card-tags">
<view class="tag" v-if="company.nature"> <view class="tag" v-if="company.nature">
{{company.nature}} {{ company.nature }}
</view>
</view>
</view>
<view v-else class="cards" :class="{ grayscale: company.isPublish }" @click="nextDetail(company)">
<view class="card-company">
<text class="company line_1">{{ company.name }}</text>
</view>
<view class="card-bottom">
<view class="fl_box fs_14">
<view class="mar_ri10">{{ company.industry }}</view>
<view>{{ company.scale }}</view>
</view>
<view class="ris">
<text class="fs_14">
在招职位·
<text class="color_256BFA">{{ company.totalRecruitment || '-' }}</text>
</text>
</view>
</view>
<view class="card-tags">
<view class="tag" v-if="company.nature">
{{ company.nature }}
</view> </view>
</view> </view>
</view> </view>
@@ -51,7 +56,7 @@
<script setup> <script setup>
import { inject, computed, toRaw } from 'vue'; import { inject, computed, toRaw } from 'vue';
const { insertSortData, navTo, vacanciesTo } = inject('globalFunction'); const { $api, insertSortData, navTo, vacanciesTo } = inject('globalFunction');
import { useRecommedIndexedDBStore } from '@/stores/useRecommedIndexedDBStore.js'; import { useRecommedIndexedDBStore } from '@/stores/useRecommedIndexedDBStore.js';
const recommedIndexDb = useRecommedIndexedDBStore(); const recommedIndexDb = useRecommedIndexedDBStore();
const props = defineProps({ const props = defineProps({
@@ -78,9 +83,14 @@ const listData = computed(() => {
}); });
function nextDetail(company) { function nextDetail(company) {
if(company.dataType == 2){ if (company.isPublish) {
navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${company.gsID}&companyName=${company.name}&zphId=${company.zphID}&dataType=2`); return $api.msg('已过期');
}else{ }
if (company.dataType == 2) {
navTo(
`/packageA/pages/UnitDetails/UnitDetails?companyId=${company.gsID}&companyName=${company.name}&zphId=${company.zphID}&dataType=2`
);
} else {
navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${company.companyId}`); navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${company.companyId}`);
} }
} }

View File

@@ -3,22 +3,25 @@
<view v-if="!job.isTitle" class="cards" @click="nextDetail(job)"> <view v-if="!job.isTitle" class="cards" @click="nextDetail(job)">
<!-- 数据类型2的完整模块 --> <!-- 数据类型2的完整模块 -->
<view v-if="job.dataType == 2"> <view v-if="job.dataType == 2">
<view class="card-company"> <view class="card-company" :class="{ grayscale: job.isPublish }">
<text class="company">{{ job.jobTitle }}</text> <text class="company">{{ job.jobTitle }}</text>
<view class="salary"> <view class="salary">
<Salary-Expectation :max-salary="job.maxSalary" :min-salary="job.minSalary"></Salary-Expectation> <Salary-Expectation
:max-salary="job.maxSalary"
:min-salary="job.minSalary"
></Salary-Expectation>
</view> </view>
</view> </view>
<view class="card-companyName">{{ job.companyName }}</view> <view class="card-companyName">{{ job.companyName }}</view>
<view class="card-tags"> <view class="card-tags">
<view class="tag"> <view class="tag">
{{job.education == '不限' ? '学历不限' : job.education}} {{ job.education == '不限' ? '学历不限' : job.education }}
</view> </view>
<view class="tag"> <view class="tag">
{{job.experience == '不限' ? '经验不限' : job.experience}} {{ job.experience == '不限' ? '经验不限' : job.experience }}
</view> </view>
<view class="tag"> <view class="tag">
{{ vacanciesTo(job.vacancies) }} {{ vacanciesTo(job.vacancies) }}
</view> </view>
</view> </view>
<view class="card-bottom"> <view class="card-bottom">
@@ -37,19 +40,22 @@
<!-- 数据类型1的完整模块 --> <!-- 数据类型1的完整模块 -->
<view v-else> <view v-else>
<view class="card-company"> <view class="card-company" :class="{ grayscale: job.isPublish }">
<text class="company">{{ job.jobTitle }}</text> <text class="company">{{ job.jobTitle }}</text>
<view class="salary"> <view class="salary">
<Salary-Expectation :max-salary="job.maxSalary" :min-salary="job.minSalary"></Salary-Expectation> <Salary-Expectation
:max-salary="job.maxSalary"
:min-salary="job.minSalary"
></Salary-Expectation>
</view> </view>
</view> </view>
<view class="card-companyName">{{ job.companyName }}</view> <view class="card-companyName">{{ job.companyName }}</view>
<view class="card-tags"> <view class="card-tags">
<view class="tag"> <view class="tag">
{{job.education == '不限' ? '学历不限' : job.education}} {{ job.education == '不限' ? '学历不限' : job.education }}
</view> </view>
<view class="tag"> <view class="tag">
{{job.experience == '不限' ? '经验不限' : job.experience}} {{ job.experience == '不限' ? '经验不限' : job.experience }}
</view> </view>
<view class="tag"> <view class="tag">
{{ vacanciesTo(job.vacancies) }} {{ vacanciesTo(job.vacancies) }}
@@ -77,7 +83,7 @@
<script setup> <script setup>
import { inject, computed, toRaw } from 'vue'; import { inject, computed, toRaw } from 'vue';
const { insertSortData, navTo, vacanciesTo } = inject('globalFunction'); const { $api, insertSortData, navTo, vacanciesTo } = inject('globalFunction');
import { useRecommedIndexedDBStore } from '@/stores/useRecommedIndexedDBStore.js'; import { useRecommedIndexedDBStore } from '@/stores/useRecommedIndexedDBStore.js';
const recommedIndexDb = useRecommedIndexedDBStore(); const recommedIndexDb = useRecommedIndexedDBStore();
const props = defineProps({ const props = defineProps({
@@ -129,6 +135,9 @@ function parseDateTime(datetimeStr) {
} }
function nextDetail(job) { function nextDetail(job) {
if (job.isPublish) {
return $api.msg('已过期');
}
navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}&dataType=${job.dataType}`); navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}&dataType=${job.dataType}`);
} }
</script> </script>

View File

@@ -3,19 +3,22 @@
<view v-if="!job.isTitle" class="cards" @click="nextDetail(job)"> <view v-if="!job.isTitle" class="cards" @click="nextDetail(job)">
<!-- 数据类型2的完整模块 --> <!-- 数据类型2的完整模块 -->
<view v-if="job.dataType == 2"> <view v-if="job.dataType == 2">
<view class="card-company"> <view class="card-company" :class="{ grayscale: job.isPublish }">
<text class="company">{{ job.jobTitle }}</text> <text class="company">{{ job.jobTitle }}</text>
<view class="salary"> <view class="salary">
<Salary-Expectation :max-salary="job.maxSalary" :min-salary="job.minSalary"></Salary-Expectation> <Salary-Expectation
:max-salary="job.maxSalary"
:min-salary="job.minSalary"
></Salary-Expectation>
</view> </view>
</view> </view>
<view class="card-companyName">{{ job.companyName }}</view> <view class="card-companyName">{{ job.companyName }}</view>
<view class="card-tags"> <view class="card-tags">
<view class="tag"> <view class="tag">
{{job.education == '不限' ? '学历不限' : job.education}} {{ job.education == '不限' ? '学历不限' : job.education }}
</view> </view>
<view class="tag"> <view class="tag">
{{job.experience == '不限' ? '经验不限' : job.experience}} {{ job.experience == '不限' ? '经验不限' : job.experience }}
</view> </view>
<view class="tag"> <view class="tag">
{{ vacanciesTo(job.vacancies) }} {{ vacanciesTo(job.vacancies) }}
@@ -37,19 +40,22 @@
<!-- 数据类型1的完整模块 --> <!-- 数据类型1的完整模块 -->
<view v-else> <view v-else>
<view class="card-company"> <view class="card-company" :class="{ grayscale: job.isPublish }">
<text class="company">{{ job.jobTitle }}</text> <text class="company">{{ job.jobTitle }}</text>
<view class="salary"> <view class="salary">
<Salary-Expectation :max-salary="job.maxSalary" :min-salary="job.minSalary"></Salary-Expectation> <Salary-Expectation
:max-salary="job.maxSalary"
:min-salary="job.minSalary"
></Salary-Expectation>
</view> </view>
</view> </view>
<view class="card-companyName">{{ job.companyName }}</view> <view class="card-companyName">{{ job.companyName }}</view>
<view class="card-tags"> <view class="card-tags">
<view class="tag"> <view class="tag">
{{job.education == '不限' ? '学历不限' : job.education}} {{ job.education == '不限' ? '学历不限' : job.education }}
</view> </view>
<view class="tag"> <view class="tag">
{{job.experience == '不限' ? '经验不限' : job.experience}} {{ job.experience == '不限' ? '经验不限' : job.experience }}
</view> </view>
<view class="tag"> <view class="tag">
{{ vacanciesTo(job.vacancies) }} {{ vacanciesTo(job.vacancies) }}
@@ -77,7 +83,7 @@
<script setup> <script setup>
import { inject, computed, toRaw } from 'vue'; import { inject, computed, toRaw } from 'vue';
const { insertSortData, navTo, vacanciesTo } = inject('globalFunction'); const { $api, insertSortData, navTo, vacanciesTo } = inject('globalFunction');
import { useRecommedIndexedDBStore } from '@/stores/useRecommedIndexedDBStore.js'; import { useRecommedIndexedDBStore } from '@/stores/useRecommedIndexedDBStore.js';
const recommedIndexDb = useRecommedIndexedDBStore(); const recommedIndexDb = useRecommedIndexedDBStore();
const props = defineProps({ const props = defineProps({
@@ -129,6 +135,9 @@ function parseDateTime(datetimeStr) {
} }
function nextDetail(job) { function nextDetail(job) {
if (job.isPublish) {
return $api.msg('已过期');
}
// 根据数据类型跳转到不同的详情页 // 根据数据类型跳转到不同的详情页
navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}&dataType=${job.dataType}`); navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}&dataType=${job.dataType}`);
} }

View File

@@ -3,22 +3,25 @@
<view v-if="!job.isTitle" class="cards" @click="nextDetail(job)"> <view v-if="!job.isTitle" class="cards" @click="nextDetail(job)">
<!-- 数据类型2的完整模块 --> <!-- 数据类型2的完整模块 -->
<view v-if="job.dataType == 2"> <view v-if="job.dataType == 2">
<view class="card-company"> <view class="card-company" :class="{ grayscale: job.isPublish }">
<text class="company">{{ job.jobTitle }}</text> <text class="company">{{ job.jobTitle }}</text>
<view class="salary"> <view class="salary">
<Salary-Expectation :max-salary="job.maxSalary" :min-salary="job.minSalary"></Salary-Expectation> <Salary-Expectation
:max-salary="job.maxSalary"
:min-salary="job.minSalary"
></Salary-Expectation>
</view> </view>
</view> </view>
<view class="card-companyName">{{ job.companyName }}</view> <view class="card-companyName">{{ job.companyName }}</view>
<view class="card-tags"> <view class="card-tags">
<view class="tag"> <view class="tag">
{{job.education == '不限' ? '学历不限' : job.education}} {{ job.education == '不限' ? '学历不限' : job.education }}
</view> </view>
<view class="tag"> <view class="tag">
{{job.experience == '不限' ? '经验不限' : job.experience}} {{ job.experience == '不限' ? '经验不限' : job.experience }}
</view> </view>
<view class="tag"> <view class="tag">
{{ vacanciesTo(job.vacancies) }} {{ vacanciesTo(job.vacancies) }}
</view> </view>
</view> </view>
<view class="card-bottom"> <view class="card-bottom">
@@ -37,19 +40,22 @@
<!-- 数据类型1的完整模块 --> <!-- 数据类型1的完整模块 -->
<view v-else> <view v-else>
<view class="card-company"> <view class="card-company" :class="{ grayscale: job.isPublish }">
<text class="company">{{ job.jobTitle }}</text> <text class="company">{{ job.jobTitle }}</text>
<view class="salary"> <view class="salary">
<Salary-Expectation :max-salary="job.maxSalary" :min-salary="job.minSalary"></Salary-Expectation> <Salary-Expectation
:max-salary="job.maxSalary"
:min-salary="job.minSalary"
></Salary-Expectation>
</view> </view>
</view> </view>
<view class="card-companyName">{{ job.companyName }}</view> <view class="card-companyName">{{ job.companyName }}</view>
<view class="card-tags"> <view class="card-tags">
<view class="tag"> <view class="tag">
{{job.education == '不限' ? '学历不限' : job.education}} {{ job.education == '不限' ? '学历不限' : job.education }}
</view> </view>
<view class="tag"> <view class="tag">
{{job.experience == '不限' ? '经验不限' : job.experience}} {{ job.experience == '不限' ? '经验不限' : job.experience }}
</view> </view>
<view class="tag"> <view class="tag">
{{ vacanciesTo(job.vacancies) }} {{ vacanciesTo(job.vacancies) }}
@@ -77,7 +83,7 @@
<script setup> <script setup>
import { inject, computed, toRaw } from 'vue'; import { inject, computed, toRaw } from 'vue';
const { insertSortData, navTo, vacanciesTo } = inject('globalFunction'); const { $api, insertSortData, navTo, vacanciesTo } = inject('globalFunction');
import { useRecommedIndexedDBStore } from '@/stores/useRecommedIndexedDBStore.js'; import { useRecommedIndexedDBStore } from '@/stores/useRecommedIndexedDBStore.js';
const recommedIndexDb = useRecommedIndexedDBStore(); const recommedIndexDb = useRecommedIndexedDBStore();
const props = defineProps({ const props = defineProps({
@@ -129,6 +135,9 @@ function parseDateTime(datetimeStr) {
} }
function nextDetail(job) { function nextDetail(job) {
if (job.isPublish) {
return $api.msg('已过期');
}
navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}&dataType=${job.dataType}`); navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}&dataType=${job.dataType}`);
} }
</script> </script>