cyl/dev
wangxia 4 years ago
parent 9a097a3985
commit 4433f87a5e

@ -123,17 +123,43 @@
<div class="maincontent w"> <div class="maincontent w">
<div class="maincontentleft"> <div class="maincontentleft">
<div class="subset"> <div class="subset">
<a-skeleton avatar active class="skeleton1" v-show="skeletonshow" :paragraph="{ rows: 4 }" /> <a-skeleton
avatar
active
class="skeleton1"
v-show="skeletonshow"
:paragraph="{ rows: 4 }"
/>
<div class="subsetleft" v-show="!skeletonshow"> <div class="subsetleft" v-show="!skeletonshow">
<div class="imgbox"> <div class="imgbox">
<a-carousel arrows :autoplay="true" effect="fade" :dots="true" ref="scrollimg" v-if="storeImage.length !== 0"> <a-carousel
<div slot="prevArrow" class="custom-slick-arrow" style="left: 5px; z-index: 99"> arrows
:autoplay="true"
effect="fade"
:dots="true"
ref="scrollimg"
v-if="storeImage.length !== 0"
>
<div
slot="prevArrow"
class="custom-slick-arrow"
style="left: 5px; z-index: 99"
>
<a-icon type="left-circle" /> <a-icon type="left-circle" />
</div> </div>
<div slot="nextArrow" class="custom-slick-arrow" style="right: 5px; z-index: 99"> <div
slot="nextArrow"
class="custom-slick-arrow"
style="right: 5px; z-index: 99"
>
<a-icon type="right-circle" /> <a-icon type="right-circle" />
</div> </div>
<img v-for="(item, index) in storeImage" :key="index" :src="item" alt="" /> <img
v-for="(item, index) in storeImage"
:key="index"
:src="item"
alt=""
/>
</a-carousel> </a-carousel>
<img v-else src="../../../static/img/nopicture.png" alt="" /> <img v-else src="../../../static/img/nopicture.png" alt="" />
</div> </div>
@ -146,30 +172,52 @@
</div> </div>
<div class="jobtag"> <div class="jobtag">
<!-- <span>返费</span> --> <!-- <span>返费</span> -->
<a-tag :color="labelColor[index % labelColor.length]" v-for="(item, index) in jobDetail.jobRequestLabelNames" :key="index">{{ item }}</a-tag> <a-tag
:color="labelColor[index % labelColor.length]"
v-for="(item, index) in jobDetail.jobRequestLabelNames"
:key="index"
>{{ item }}</a-tag
>
</div> </div>
<div style="height: 27px" v-if="!jobDetail.jobRequestLabelNames" class="jobtag"> <div
style="height: 27px"
v-if="!jobDetail.jobRequestLabelNames"
class="jobtag"
>
<a-tag :color="labelColor[1]">暂无要求</a-tag> <a-tag :color="labelColor[1]">暂无要求</a-tag>
</div> </div>
<div class="jobtag1"> <div class="jobtag1">
<!-- <span>返费</span> --> <!-- <span>返费</span> -->
<a-tag v-for="(item, index) in jobDetail.jobSpecialLabelNames" :key="index">{{ item }}</a-tag> <a-tag
v-for="(item, index) in jobDetail.jobSpecialLabelNames"
:key="index"
>{{ item }}</a-tag
>
</div> </div>
<div style="height: 27px" v-if="!jobDetail.jobSpecialLabelNames" class="jobtag"> <div
style="height: 27px"
v-if="!jobDetail.jobSpecialLabelNames"
class="jobtag"
>
<a-tag style="backgroundcolor: #f5f5f5">暂无特色</a-tag> <a-tag style="backgroundcolor: #f5f5f5">暂无特色</a-tag>
</div> </div>
<div style=" <div
style="
display: flex; display: flex;
align-items: center; align-items: center;
height: 26px; height: 26px;
margin-top: 16px; margin-top: 16px;
"> "
<div class="jobpricehour" v-html=" >
<div
class="jobpricehour"
v-html="
getSalaryClassifyValue( getSalaryClassifyValue(
jobDetail.salaryClassify, jobDetail.salaryClassify,
jobDetail.salaryClassifyValue jobDetail.salaryClassifyValue
) )
"> "
>
<!-- <template v-if="jobDetail.hourlyPay" <!-- <template v-if="jobDetail.hourlyPay"
><span>{{ jobDetail.hourlyPay }}</span ><span>{{ jobDetail.hourlyPay }}</span
>/小时</template >/小时</template
@ -181,7 +229,9 @@
</div> </div>
<span style="font-size: 16px">&nbsp;&nbsp;|&nbsp;&nbsp;</span> <span style="font-size: 16px">&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<div class="jobpricemonth"> <div class="jobpricemonth">
<span>{{ jobDetail.minMonthlyPay }}</span>-<span>{{ jobDetail.maxMonthlyPay }}</span>/ <span>{{ jobDetail.minMonthlyPay }}</span
>-<span>{{ jobDetail.maxMonthlyPay }}</span
>/
</div> </div>
</div> </div>
@ -214,12 +264,14 @@
<a-button type="primary" class="jobDesp">职位详单</a-button> <a-button type="primary" class="jobDesp">职位详单</a-button>
</a-popover> --> </a-popover> -->
<button class="dropdown bottombox1" @click="torecord()" v-if="jobDetail.recruitment == '1'"> <button
class="dropdown bottombox1"
@click="torecord()"
v-if="jobDetail.recruitment == '1'"
>
报名 报名
</button> </button>
<button class="norecruitment bottombox1" v-else> <button class="norecruitment bottombox1" v-else></button>
暂时停招
</button>
</div> </div>
</div> </div>
</div> </div>
@ -230,16 +282,31 @@
<div class="jobinformationbox"> <div class="jobinformationbox">
<h1> <h1>
<div class="infotitle"> <div class="infotitle">
<span @click="tabchange = 1" :class="tabchange === 1 ? 'active' : ''">基本信息</span> <span
<span @click="tabchange = 0" :class="tabchange !== 1 ? 'active' : ''">财务结算</span> @click="tabchange = 1"
:class="tabchange === 1 ? 'active' : ''"
>基本信息</span
>
<span
@click="tabchange = 0"
:class="tabchange !== 1 ? 'active' : ''"
>财务结算</span
>
</div> </div>
<!-- <div class="copy" @click="xiangdanVisible = true">通告</div> --> <!-- <div class="copy" @click="xiangdanVisible = true">通告</div> -->
<a-modal v-model="xiangdanVisible" title="通告" class="xiangdan" :footer="null" @ok="handleOk"> <a-modal
v-model="xiangdanVisible"
title="通告"
class="xiangdan"
:footer="null"
@ok="handleOk"
>
<!-- <template slot="content" class="jobDesp_content"> --> <!-- <template slot="content" class="jobDesp_content"> -->
<div class="copy" @click="copyText($event)"></div> <div class="copy" @click="copyText($event)"></div>
<span v-if="jobDetail.jobDesp" class="copyInfo">{{ <span v-if="jobDetail.jobDesp" class="copyInfo">{{
jobDetail.jobDesp jobDetail.jobDesp
}}</span><span v-else></span> }}</span
><span v-else></span>
<!-- </template> --> <!-- </template> -->
</a-modal> </a-modal>
</h1> </h1>
@ -254,7 +321,12 @@
<div class="baseInfoContent" v-if="tabchange === 1"> <div class="baseInfoContent" v-if="tabchange === 1">
<div class="pay" id="pay"> <div class="pay" id="pay">
<div class="mb12 mt20">薪资待遇</div> <div class="mb12 mt20">薪资待遇</div>
<a-descriptions bordered size="small" :column="1" class="leftDesc boubleLevel"> <a-descriptions
bordered
size="small"
:column="1"
class="leftDesc boubleLevel"
>
<!-- <a-descriptions-item class="test1"> <!-- <a-descriptions-item class="test1">
<span slot="label" class="fw500">工价</span> <span slot="label" class="fw500">工价</span>
<span>{{ jobDetail.calculationUnit }}</span> <span>{{ jobDetail.calculationUnit }}</span>
@ -317,16 +389,26 @@
<!-- 岗位要求 --> <!-- 岗位要求 -->
<div class="required" id="required"> <div class="required" id="required">
<div class="mb12 mt20">面试要求</div> <div class="mb12 mt20">面试要求</div>
<a-descriptions bordered size="small" :column="1" class="leftDesc"> <a-descriptions
bordered
size="small"
:column="1"
class="leftDesc"
>
<a-descriptions-item class="test1"> <a-descriptions-item class="test1">
<span slot="label" class="fw500">性别年龄</span> <span slot="label" class="fw500">性别年龄</span>
<span> <span>
<span class="man" v-if="jobDetail.minAgeMan"> {{ jobDetail.minAgeMan }} <span class="man" v-if="jobDetail.minAgeMan"
> {{ jobDetail.minAgeMan }}
<span v-if="jobDetail.maxAgeMan">{{ <span v-if="jobDetail.maxAgeMan">{{
"- " + jobDetail.maxAgeMan "- " + jobDetail.maxAgeMan
}}</span> </span><span class="woman" v-if="jobDetail.minAgeWoman"> }}</span
> </span
><span class="woman" v-if="jobDetail.minAgeWoman">
{{ jobDetail.minAgeWoman }} {{ jobDetail.minAgeWoman }}
<span> {{ "- " + jobDetail.maxAgeWoman }}</span></span> <span> {{ "- " + jobDetail.maxAgeWoman }}</span
></span
>
</span> </span>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item> <a-descriptions-item>
@ -360,7 +442,12 @@
<!-- 基本信息 --> <!-- 基本信息 -->
<div class=" " id="contentspecial"> <div class=" " id="contentspecial">
<div class="mb12 mt20">岗位说明</div> <div class="mb12 mt20">岗位说明</div>
<a-descriptions bordered size="small" :column="1" class="leftDesc"> <a-descriptions
bordered
size="small"
:column="1"
class="leftDesc"
>
<a-descriptions-item class="test1"> <a-descriptions-item class="test1">
<span slot="label" class="fw500">工作内容</span> <span slot="label" class="fw500">工作内容</span>
<span>{{ jobDetail.workContent || "-" }}</span> <span>{{ jobDetail.workContent || "-" }}</span>
@ -405,7 +492,8 @@
<div>吃饭</div> <div>吃饭</div>
<ul> <ul>
<li> <li>
<span>吃饭</span><span>{{ jobDetail.workingLunch || "-" }}</span> <span>吃饭</span
><span>{{ jobDetail.workingLunch || "-" }}</span>
</li> </li>
<!-- <li> <!-- <li>
<span>餐补</span <span>餐补</span
@ -423,7 +511,8 @@
<span>民族窗口</span><span>{{ jobDetail.muslim }}</span> <span>民族窗口</span><span>{{ jobDetail.muslim }}</span>
</li> --> </li> -->
<li> <li>
<span>补充说明</span><span style="white-space: break-spaces">{{ <span>补充说明</span
><span style="white-space: break-spaces">{{
jobDetail.workingLunchDesp || "-" jobDetail.workingLunchDesp || "-"
}}</span> }}</span>
</li> </li>
@ -433,10 +522,12 @@
<div>住宿</div> <div>住宿</div>
<ul> <ul>
<li> <li>
<span>住宿</span><span>{{ jobDetail.dormitory || "-" }}</span> <span>住宿</span
><span>{{ jobDetail.dormitory || "-" }}</span>
</li> </li>
<li> <li>
<span>宿舍设施</span><span>{{ jobDetail.dormitoryFacilities || "-" }}</span> <span>宿舍设施</span
><span>{{ jobDetail.dormitoryFacilities || "-" }}</span>
</li> </li>
<!-- <li> <!-- <li>
<span>宿舍距离</span <span>宿舍距离</span
@ -457,13 +548,15 @@
><span>{{ jobDetail.dormitoryFacilities }}</span> ><span>{{ jobDetail.dormitoryFacilities }}</span>
</li> --> </li> -->
<li> <li>
<span>水电费</span><span>{{ jobDetail.waterAndElec || "-" }}</span> <span>水电费</span
><span>{{ jobDetail.waterAndElec || "-" }}</span>
</li> </li>
<!-- <li> <!-- <li>
<span>班车</span><span>{{ jobDetail.regularBus }}</span> <span>班车</span><span>{{ jobDetail.regularBus }}</span>
</li> --> </li> -->
<li> <li>
<span>补充说明</span><span style="white-space: break-spaces">{{ <span>补充说明</span
><span style="white-space: break-spaces">{{
jobDetail.dormitoryDesp || "-" jobDetail.dormitoryDesp || "-"
}}</span> }}</span>
</li> </li>
@ -535,7 +628,13 @@
{{ jobDetail.agencyStatement || "-" }} {{ jobDetail.agencyStatement || "-" }}
</div> </div>
</div> </div>
<a-descriptions bordered size="small" :column="1" class="leftDesc mt20" style="width: 900px"> <a-descriptions
bordered
size="small"
:column="1"
class="leftDesc mt20"
style="width: 900px"
>
<a-descriptions-item class="test1"> <a-descriptions-item class="test1">
<span slot="label" class="fw500">代理利润</span> <span slot="label" class="fw500">代理利润</span>
<span>{{ jobDetail.agencyProfit || "-" }}</span> <span>{{ jobDetail.agencyProfit || "-" }}</span>
@ -607,9 +706,7 @@
</div> </div>
</div> --> </div> -->
<div class="mask" v-if="!(jobDetail.recruitment == '1')"></div> <div class="mask" v-if="!(jobDetail.recruitment == '1')"></div>
</div> </div>
</template> </template>
<script> <script>
import { getJobDetailApi } from "../../api/job"; import { getJobDetailApi } from "../../api/job";

@ -23,16 +23,35 @@
> >
</a-modal> --> </a-modal> -->
<!-- 城市的弹出框 --> <!-- 城市的弹出框 -->
<a-modal class="cityModal" transitionName="" v-model="visible" width="680px" @cancel="cityModalClose" title="请选择城市" :footer="null"> <a-modal
class="cityModal"
transitionName=""
v-model="visible"
width="680px"
@cancel="cityModalClose"
title="请选择城市"
:footer="null"
>
<div class="inputBox"> <div class="inputBox">
<a-input placeholder="请输入城市名称" allow-clear width="300px" v-model="cityValue" @keyup.enter="searchCity" @input="resetCityList"></a-input> <a-input
placeholder="请输入城市名称"
allow-clear
width="300px"
v-model="cityValue"
@keyup.enter="searchCity"
@input="resetCityList"
></a-input>
<a-button @click="searchCity"></a-button> <a-button @click="searchCity"></a-button>
</div> </div>
<ul class="firstList"> <ul class="firstList">
<li @click="[(currentCityList = hotCityList), (activeInd = -1)]"> <li @click="[(currentCityList = hotCityList), (activeInd = -1)]">
<div :class="activeInd == -1 ? 'active' : ''">热门地区</div> <div :class="activeInd == -1 ? 'active' : ''">热门地区</div>
</li> </li>
<li v-for="(item, index) in hasJobCityList.firstList" :key="index" @click="[changeCurrentCity(index), (activeInd = index)]"> <li
v-for="(item, index) in hasJobCityList.firstList"
:key="index"
@click="[changeCurrentCity(index), (activeInd = index)]"
>
<div :class="activeInd == index ? 'active' : ''"> <div :class="activeInd == index ? 'active' : ''">
<span v-for="i in item" :key="i">{{ i }}</span> <span v-for="i in item" :key="i">{{ i }}</span>
</div> </div>
@ -49,9 +68,10 @@
<div class="w" id="navigation"> <div class="w" id="navigation">
<span> <span>
<!-- <i class="iconfont icon-yigezhuanmenfuwudailidepingtai"></i> --> <!-- <i class="iconfont icon-yigezhuanmenfuwudailidepingtai"></i> -->
<router-link to="/main"><svg class="icon" aria-hidden="true"> <router-link to="/main"
<use xlink:href="#icon-yishoudanlogo"></use> ><svg class="icon" aria-hidden="true">
</svg></router-link> <use xlink:href="#icon-yishoudanlogo"></use></svg
></router-link>
</span> </span>
<!-- 特色筛选的列表盒子 --> <!-- 特色筛选的列表盒子 -->
<!-- <div v-if="isspecialboxshow" class="specialbox" @click.stop=""> <!-- <div v-if="isspecialboxshow" class="specialbox" @click.stop="">
@ -186,10 +206,39 @@
</div> </div>
</li> </li>
</ul> --> </ul> -->
<div class="searchBox" @blur="hidedownHotStore" @focus="showHotStore" tabindex="0" outline="0" hidefocus="true"> <div
<a-input placeholder="搜索职位、企业名称、年龄要求" @keyup.enter="onSearch" @input="resetsearch" @blur="hidedownHotStore" @focus="showHotStore" tabindex="0" v-model="searchValue" class="searchinput" style="" allow-clear> class="searchBox"
<div slot="prefix" @focus.stop="" tabindex="0" @click.stop="visible = true"> @blur="hidedownHotStore"
<span>{{ currentCity }}</span><i class="iconfont icon-sousuoxiala"></i><i class="iconfont icon-guanbishixin" v-show="currentCity != '全国'" @click.stop="resetCity"></i> @focus="showHotStore"
tabindex="0"
outline="0"
hidefocus="true"
>
<a-input
placeholder="搜索职位、企业名称、年龄要求"
@keyup.enter="onSearch"
@input="resetsearch"
@blur="hidedownHotStore"
@focus="showHotStore"
tabindex="0"
v-model="searchValue"
class="searchinput"
style=""
allow-clear
>
<div
slot="prefix"
@focus.stop=""
tabindex="0"
@click.stop="visible = true"
>
<span>{{ currentCity }}</span
><i class="iconfont icon-sousuoxiala"></i
><i
class="iconfont icon-guanbishixin"
v-show="currentCity != '全国'"
@click.stop="resetCity"
></i>
</div> </div>
<button slot="suffix" @click="onSearch" style="">搜索</button> <button slot="suffix" @click="onSearch" style="">搜索</button>
</a-input> </a-input>
@ -203,7 +252,11 @@
<div class="hotStore"> <div class="hotStore">
<!-- <span>热门企业</span> --> <!-- <span>热门企业</span> -->
<ul> <ul>
<li v-for="(item, index) in hotStoreList" :key="index" @click="getHotStoreList(item)"> <li
v-for="(item, index) in hotStoreList"
:key="index"
@click="getHotStoreList(item)"
>
{{ item.storeName }} {{ item.storeName }}
</li> </li>
<!-- <li @click="resetResult" style="color: #aaa">重置</li> --> <!-- <li @click="resetResult" style="color: #aaa">重置</li> -->
@ -212,9 +265,14 @@
</div> </div>
<ul class="hotTag" style="display: none"> <ul class="hotTag" style="display: none">
<div>热门</div> <div>热门</div>
<li v-for="(item, index) in specialHotTag" :key="index" @click="specialclick(index, item)" :class="{ <li
v-for="(item, index) in specialHotTag"
:key="index"
@click="specialclick(index, item)"
:class="{
active: filterObj.specialactive.indexOf(item) > -1, active: filterObj.specialactive.indexOf(item) > -1,
}"> }"
>
{{ item.name }} {{ item.name }}
</li> </li>
</ul> </ul>
@ -233,33 +291,73 @@
<div class="w" id="maincontent"> <div class="w" id="maincontent">
<div class="maincontentleft" style="padding-top: 50px"> <div class="maincontentleft" style="padding-top: 50px">
<div class="tabBar" @click="changeTab($event)"> <div class="tabBar" @click="changeTab($event)">
<div class="tabSubset" :class="{ active: signType == '' }" data-type="0"> <div
class="tabSubset"
:class="{ active: signType == '' }"
data-type="0"
>
全部 全部
</div> </div>
<div class="tabSubset" :class="{ active: signType == 1 }" data-type="1"> <div
class="tabSubset"
:class="{ active: signType == 1 }"
data-type="1"
>
自营 自营
</div> </div>
<div class="tabSubset" :class="{ active: signType == 2 }" data-type="2"> <div
class="tabSubset"
:class="{ active: signType == 2 }"
data-type="2"
>
三方 三方
</div> </div>
</div> </div>
<div class="filter" :class="[filterStatus == 0 ? '' : 'nobd']" style=""> <div class="filter" :class="[filterStatus == 0 ? '' : 'nobd']" style="">
<div class="filter-title" :style="{ top: filterStatus == 0 ? '-32px' : '-21px' }"> <div
<span><span>所有筛选<i class="iconfont icon-youjiantou"></i></span> class="filter-title"
:style="{ top: filterStatus == 0 ? '-32px' : '-21px' }"
>
<span
><span>所有筛选<i class="iconfont icon-youjiantou"></i></span>
<span class="filter-show"> <span class="filter-show">
<span @click="delFilter($event, 'price')" v-show="filterObj.price">{{ filterObj.price <span
}}<i class="iconfont icon-guanbi2" v-show="filterObj.price"></i></span> @click="delFilter($event, 'price')"
<span @click="delFilter($event, 'gender')" v-show="filterObj.gender">{{ filterObj.gender v-show="filterObj.price"
}}<i class="iconfont icon-guanbi2" v-show="filterObj.gender"></i></span> >{{ filterObj.price
<span @click="delFilter($event, 'special', item)" v-for="(item, index) in filterObj.specialactive" :key="index">{{ item.name }}<i class="iconfont icon-guanbi2"></i></span> }}<i
class="iconfont icon-guanbi2"
v-show="filterObj.price"
></i
></span>
<span
@click="delFilter($event, 'gender')"
v-show="filterObj.gender"
>{{ filterObj.gender
}}<i
class="iconfont icon-guanbi2"
v-show="filterObj.gender"
></i
></span>
<span
@click="delFilter($event, 'special', item)"
v-for="(item, index) in filterObj.specialactive"
:key="index"
>{{ item.name }}<i class="iconfont icon-guanbi2"></i
></span>
<i v-show="showDotted" style="line-height: 24px">...</i> <i v-show="showDotted" style="line-height: 24px">...</i>
</span> </span>
</span> </span>
<span @click="hideFilterContent">{{ filterStatus == 0 ? "" : "" <span @click="hideFilterContent"
}}<i class="iconfont icon-sousuoxiala" :style="{ >{{ filterStatus == 0 ? "收起筛选" : "展开筛选"
}}<i
class="iconfont icon-sousuoxiala"
:style="{
transform: transform:
filterStatus == 0 ? 'rotate(180deg) scale(.6)' : '', filterStatus == 0 ? 'rotate(180deg) scale(.6)' : '',
}"></i></span> }"
></i
></span>
</div> </div>
<div class="filter-content" style="transition: height 0.2s"> <div class="filter-content" style="transition: height 0.2s">
<dl class="price"> <dl class="price">
@ -267,86 +365,156 @@
<dd> <dd>
<div class="ageinputbox"> <div class="ageinputbox">
<!-- <div> --> <!-- <div> -->
<a-input class="ageinput" v-model="minMonthlyPay" type="text" allow-clear prefix="¥" @input="resetAgeSearch" @click.stop=" <a-input
class="ageinput"
v-model="minMonthlyPay"
type="text"
allow-clear
prefix="¥"
@input="resetAgeSearch"
@click.stop="
() => { () => {
return false; return false;
} }
"></a-input><span class="middle-line"> - </span> "
<a-input class="ageinput" v-model="maxMonthlyPay" type="text" allow-clear prefix="¥" @input="resetAgeSearch" @click.stop=" ></a-input
><span class="middle-line"> - </span>
<a-input
class="ageinput"
v-model="maxMonthlyPay"
type="text"
allow-clear
prefix="¥"
@input="resetAgeSearch"
@click.stop="
() => { () => {
return false; return false;
} }
"></a-input> "
></a-input>
<div class="confirm"> <div class="confirm">
<button @click="searchPrice"></button> <button @click="searchPrice"></button>
</div> </div>
<!-- </div> --> <!-- </div> -->
</div> </div>
<i @click="searchPrice"><span :style="{ <i @click="searchPrice"
><span
:style="{
color: filterObj.price == '3000-4000' ? '#ff4400' : '', color: filterObj.price == '3000-4000' ? '#ff4400' : '',
}">3000-4000</span> }"
<span :style="{ >3000-4000</span
>
<span
:style="{
color: filterObj.price == '4000-5000' ? '#ff4400' : '', color: filterObj.price == '4000-5000' ? '#ff4400' : '',
}">4000-5000</span> }"
<span :style="{ >4000-5000</span
>
<span
:style="{
color: filterObj.price == '5000-6000' ? '#ff4400' : '', color: filterObj.price == '5000-6000' ? '#ff4400' : '',
}">5000-6000</span> }"
<span :style="{ >5000-6000</span
>
<span
:style="{
color: filterObj.price == '6000-7000' ? '#ff4400' : '', color: filterObj.price == '6000-7000' ? '#ff4400' : '',
}">6000-7000</span></i> }"
>6000-7000</span
></i
>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt>性别</dt> <dt>性别</dt>
<dd @click="searchGender"> <dd @click="searchGender">
<span :style="{ color: filterObj.gender == '男' ? '#ff4400' : '' }"></span><span :style="{ color: filterObj.gender == '女' ? '#ff4400' : '' }"></span><span :style="{ <span
:style="{ color: filterObj.gender == '男' ? '#ff4400' : '' }"
></span
><span
:style="{ color: filterObj.gender == '女' ? '#ff4400' : '' }"
></span
><span
:style="{
color: filterObj.gender == '男女不限' ? '#ff4400' : '', color: filterObj.gender == '男女不限' ? '#ff4400' : '',
}">男女不限</span> }"
>男女不限</span
>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt>薪资福利</dt> <dt>薪资福利</dt>
<dd> <dd>
<span v-for="(item, index) in tagArray1" :key="index" :class="{ <span
v-for="(item, index) in tagArray1"
:key="index"
:class="{
'special-active': 'special-active':
filterObj.specialactive.indexOf(item) > -1, filterObj.specialactive.indexOf(item) > -1,
}" @click.stop="specialclick(index, item)">{{ item.name }}</span> }"
@click.stop="specialclick(index, item)"
>{{ item.name }}</span
>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt>宿舍保障</dt> <dt>宿舍保障</dt>
<dd> <dd>
<span v-for="(item, index) in tagArray3" :key="index" :class="{ <span
v-for="(item, index) in tagArray3"
:key="index"
:class="{
'special-active': 'special-active':
filterObj.specialactive.indexOf(item) > -1, filterObj.specialactive.indexOf(item) > -1,
}" @click.stop="specialclick(index, item)">{{ item.name }}</span> }"
@click.stop="specialclick(index, item)"
>{{ item.name }}</span
>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt>班制休息</dt> <dt>班制休息</dt>
<dd> <dd>
<span v-for="(item, index) in tagArray0" :key="index" :class="{ <span
v-for="(item, index) in tagArray0"
:key="index"
:class="{
'special-active': 'special-active':
filterObj.specialactive.indexOf(item) > -1, filterObj.specialactive.indexOf(item) > -1,
}" @click.stop="specialclick(index, item)">{{ item.name }}</span> }"
@click.stop="specialclick(index, item)"
>{{ item.name }}</span
>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt>面试特色</dt> <dt>面试特色</dt>
<dd> <dd>
<span v-for="(item, index) in tagArray4" :key="index" :class="{ <span
v-for="(item, index) in tagArray4"
:key="index"
:class="{
'special-active': 'special-active':
filterObj.specialactive.indexOf(item) > -1, filterObj.specialactive.indexOf(item) > -1,
}" @click.stop="specialclick(index, item)">{{ item.name }}</span> }"
@click.stop="specialclick(index, item)"
>{{ item.name }}</span
>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt>其他特色</dt> <dt>其他特色</dt>
<dd> <dd>
<span v-for="(item, index) in tagArray2" :key="index" :class="{ <span
v-for="(item, index) in tagArray2"
:key="index"
:class="{
'special-active': 'special-active':
filterObj.specialactive.indexOf(item) > -1, filterObj.specialactive.indexOf(item) > -1,
}" @click.stop="specialclick(index, item)">{{ item.name }}</span> }"
@click.stop="specialclick(index, item)"
>{{ item.name }}</span
>
</dd> </dd>
</dl> </dl>
</div> </div>
@ -364,10 +532,21 @@
<!-- </div> --> <!-- </div> -->
<div v-if="!isspinning"> <div v-if="!isspinning">
<div class="subset" v-for="(item, index) in jobMainList" :key="index" :style="{background:item.recruitment == '1'?'#fff':'#f5f5f5'}"> <div
<router-link target="_blank" :to=" class="subset"
v-for="(item, index) in jobMainList"
:key="index"
:style="{
background: item.recruitment == '1' ? '#fff' : '#f5f5f5',
}"
>
<router-link
target="_blank"
:to="
'/detail?' + 'id=' + item.id + '&' + 'page=' + formvalue.pageNum '/detail?' + 'id=' + item.id + '&' + 'page=' + formvalue.pageNum
" rel="opener"> "
rel="opener"
>
<div class="subsetleft" @click="totop"> <div class="subsetleft" @click="totop">
<div class="imgbox"> <div class="imgbox">
<img v-if="item.logo.length !== 0" :src="item.logo" /> <img v-if="item.logo.length !== 0" :src="item.logo" />
@ -388,24 +567,39 @@
</div> </div>
<div class="jobtag"> <div class="jobtag">
<!-- <span>返费</span> --> <!-- <span>返费</span> -->
<i class="iconfont icon-ziying" v-if="item.signType == 1" style=""></i> <i
<span v-for="(item1, index) in item.jobSpecialLabelNames" :key="index">{{ item1 }}</span><span v-if="item.jobSpecialLabelNames.length == 0"></span> class="iconfont icon-ziying"
v-if="item.signType == 1"
style=""
></i>
<span
v-for="(item1, index) in item.jobSpecialLabelNames"
:key="index"
>{{ item1 }}</span
><span v-if="item.jobSpecialLabelNames.length == 0"
>暂无特色</span
>
</div> </div>
<div class="jobpricemonth"> <div class="jobpricemonth">
<!-- :style="{ opacity: item.minMonthlyPay ? '1' : '0' }" --> <!-- :style="{ opacity: item.minMonthlyPay ? '1' : '0' }" -->
<span>{{ <span>{{
item.minMonthlyPay ? item.minMonthlyPay : "" item.minMonthlyPay ? item.minMonthlyPay : ""
}}</span>-<span>{{ }}</span
>-<span>{{
item.maxMonthlyPay ? item.maxMonthlyPay : "" item.maxMonthlyPay ? item.maxMonthlyPay : ""
}}</span>/ }}</span
>/
</div> </div>
<div class="jobpricehour" v-html=" <div
class="jobpricehour"
v-html="
getSalaryClassifyValue( getSalaryClassifyValue(
item.salaryClassify, item.salaryClassify,
item.salaryClassifyValue item.salaryClassifyValue
) )
"> "
>
<!-- <template v-if="item.hourlyPay" <!-- <template v-if="item.hourlyPay"
><span>{{ item.hourlyPay }}</span ><span>{{ item.hourlyPay }}</span
>/小时</template >/小时</template
@ -421,7 +615,8 @@
<div class="subsetright"> <div class="subsetright">
<div class="topContainer"> <div class="topContainer">
<div class="updateTime" style="display: none"> <div class="updateTime" style="display: none">
<span>更新时间{{ item.updateTime || "--" }} ( <span
>更新时间{{ item.updateTime || "--" }} (
{{ item.diffTime || "--" }} ) {{ item.diffTime || "--" }} )
</span> </span>
</div> </div>
@ -437,13 +632,36 @@
<span v-if="item.jobDesp" :class="'copyInfo' + index">{{ item.jobDesp }}</span <span v-if="item.jobDesp" :class="'copyInfo' + index">{{ item.jobDesp }}</span
><span v-else></span> ><span v-else></span>
</template> --> </template> -->
<router-link target="_blank" :to="'/detail?' +'id=' + item.id + '&' + 'page=' + formvalue.pageNum" rel="opener"> <router-link
<button type="primary" class="jobDesp" :style="{background:item.recruitment == '1'?'#fff':'#f5f5f5'}"> target="_blank"
:to="
'/detail?' +
'id=' +
item.id +
'&' +
'page=' +
formvalue.pageNum
"
rel="opener"
>
<button
type="primary"
class="jobDesp"
:style="{
background: item.recruitment == '1' ? '#fff' : '#f5f5f5',
}"
>
更多 更多
</button> </button>
</router-link> </router-link>
<!-- </a-popover> --> <!-- </a-popover> -->
<button class="apply" @click="torecord(item)" v-if="item.recruitment == '1'"></button> <button
class="apply"
@click="torecord(item)"
v-if="item.recruitment == '1'"
>
报名
</button>
<button class="norecruitment" v-else></button> <button class="norecruitment" v-else></button>
<!-- <button @click="showmodal(item)" @click="">报名</button> --> <!-- <button @click="showmodal(item)" @click="">报名</button> -->
@ -452,21 +670,35 @@
</div> </div>
</div> </div>
<div class="pagecontainer"> <div class="pagecontainer">
<a-pagination :current="+formvalue.pageNum" :default-current="1" :defaultPageSize="8" :total="formvalue.total" @change="pageChange" /> <a-pagination
:current="+formvalue.pageNum"
:default-current="1"
:defaultPageSize="8"
:total="formvalue.total"
@change="pageChange"
/>
<div class="ant-pagination-options-quick-jumper"> <div class="ant-pagination-options-quick-jumper">
跳至<input ref="pageinput" type="text" @keyup.enter="inputpageChange" @blur="inputpageChange" /> 跳至<input
ref="pageinput"
type="text"
@keyup.enter="inputpageChange"
@blur="inputpageChange"
/>
</div> </div>
</div> </div>
</div> </div>
<div class="maincontentright"> <div class="maincontentright">
<div class="dateinfo"> <div class="dateinfo">
<h1 class="bottombox"><i>我的日历</i></h1> <h1 class="bottombox"><i>我的日历</i></h1>
<p class="day" :style="{ <p
class="day"
:style="{
'font-size': '60px', 'font-size': '60px',
color: '#ff4400', color: '#ff4400',
'line-height': '80px', 'line-height': '80px',
'margin-top': '8px', 'margin-top': '8px',
}"> }"
>
{{ dateinfo.day }} {{ dateinfo.day }}
</p> </p>
<p class="week" :style="{ 'font-size': '16px', color: '#ff4400' }"> <p class="week" :style="{ 'font-size': '16px', color: '#ff4400' }">

@ -1326,7 +1326,7 @@ export function disposeJobListData(jobList) {
item.servetype = `${item.returnFee || "--"}元/公斤`; item.servetype = `${item.returnFee || "--"}元/公斤`;
} else if (item.returnFeeType === 5) { } else if (item.returnFeeType === 5) {
item.servetype = `工人收入${item.returnFee || "--"}%`; item.servetype = `工人收入${item.returnFee || "--"}%`;
} else if (item.returnFeeType === 6) { } else if (item.returnFeeType === 6) {
item.servetype = `${item.returnFee || "--"}`; item.servetype = `${item.returnFee || "--"}`;
} }
// console.log(item); // console.log(item);
@ -1513,7 +1513,7 @@ export function disposeJobListData(jobList) {
jobList.servetype = `${jobList.returnFee || "--"}元/公斤`; jobList.servetype = `${jobList.returnFee || "--"}元/公斤`;
} else if (jobList.returnFeeType === 5) { } else if (jobList.returnFeeType === 5) {
jobList.servetype = `工人收入${jobList.returnFee || "--"}%`; jobList.servetype = `工人收入${jobList.returnFee || "--"}%`;
} else if (jobList.returnFeeType === 6) { } else if (jobList.returnFeeType === 6) {
jobList.servetype = `${jobList.returnFee || "--"}`; jobList.servetype = `${jobList.returnFee || "--"}`;
} }
} else { } else {

@ -7,18 +7,36 @@
<span> <span>
<ul> <ul>
<li> <li>
<router-link to="/" :class="routertitleindex == 0 ? 'titleactive' : ''" rel="opener"> <router-link
一手单首页</router-link> to="/"
:class="routertitleindex == 0 ? 'titleactive' : ''"
rel="opener"
>
一手单首页</router-link
>
</li> </li>
<li> <li>
<router-link to="/list" @click.native="toList" :class="routertitleindex == 1 ? 'titleactive' : ''" rel="opener">一手职位</router-link> <router-link
to="/list"
@click.native="toList"
:class="routertitleindex == 1 ? 'titleactive' : ''"
rel="opener"
>一手职位</router-link
>
</li> </li>
<li> <li>
<router-link to="/mybill" :class="routertitleindex == 5 ? 'titleactive' : ''" rel="opener">我的报名 <router-link
to="/mybill"
:class="routertitleindex == 5 ? 'titleactive' : ''"
rel="opener"
>我的报名
</router-link> </router-link>
</li> </li>
<li> <li>
<router-link to="/mytownsman" :class="routertitleindex == 4 ? 'titleactive' : ''">我的老乡 <router-link
to="/mytownsman"
:class="routertitleindex == 4 ? 'titleactive' : ''"
>我的老乡
</router-link> </router-link>
</li> </li>
<!-- <li> <!-- <li>
@ -50,19 +68,30 @@
<span>个人中心</span> <span>个人中心</span>
<div class="loginbox" slot="overlay"> <div class="loginbox" slot="overlay">
<div> <div>
<img :src="loginValue.imgSrc" alt="" v-if="loginValue.imgSrc !== ''" style="border-radius: 50%" /> <img
<span v-else class="iconfont icon-morentouxiang avatar"></span><span class="username">{{ :src="loginValue.imgSrc"
alt=""
v-if="loginValue.imgSrc !== ''"
style="border-radius: 50%"
/>
<span v-else class="iconfont icon-morentouxiang avatar"></span
><span class="username">{{
loginValue.userName || loginValue.nickName || loginValue.tel loginValue.userName || loginValue.nickName || loginValue.tel
}}</span> }}</span>
</div> </div>
<router-link to="/accountsetting"> <router-link to="/accountsetting">
<div> <div>
<span><i class="iconfont icon-gerenzhongxin"></i>个人中心</span><i class="iconfont icon-youjiantou"></i> <span
><i class="iconfont icon-gerenzhongxin"></i>个人中心</span
><i class="iconfont icon-youjiantou"></i>
</div> </div>
</router-link> </router-link>
<router-link to="/memberInfo"> <router-link to="/memberInfo">
<div> <div>
<span><i class="iconfont icon-zhanghaoshezhi"></i>成员管理</span><i class="iconfont icon-youjiantou"></i> <span
><i class="iconfont icon-zhanghaoshezhi"></i
>成员管理</span
><i class="iconfont icon-youjiantou"></i>
</div> </div>
</router-link> </router-link>
<!-- <router-link to="/accountsetting" <!-- <router-link to="/accountsetting"
@ -79,7 +108,9 @@
</span> </span>
<span class="loginbtn" v-else> <span class="loginbtn" v-else>
<!-- <router-link to="/register">注册</router-link>/ --> <!-- <router-link to="/register">注册</router-link>/ -->
<router-link to="/login"><button style="cursor: pointer">登录</button></router-link> <router-link to="/login"
><button style="cursor: pointer">登录</button></router-link
>
</span> </span>
</span> </span>
<!-- <span class="navigationright"> <!-- <span class="navigationright">
@ -104,7 +135,12 @@
</div> </div>
<!-- 搜索栏 --> <!-- 搜索栏 -->
<router-view :isspecialboxshow.sync="isspecialboxshow" :formvalue="formvalue" :jobMainList="jobMainList" :isspinning="isspinning"></router-view> <router-view
:isspecialboxshow.sync="isspecialboxshow"
:formvalue="formvalue"
:jobMainList="jobMainList"
:isspinning="isspinning"
></router-view>
<!-- 老乡广告 --> <!-- 老乡广告 -->
<!-- <div class="fellowtownsman" v-if="laoxiangshow"> <!-- <div class="fellowtownsman" v-if="laoxiangshow">
<div class="w"> <div class="w">
@ -177,7 +213,9 @@
</ul> --> </ul> -->
<div> <div>
Copyright © 2015 - 2022 Bocai. All Rights Reserved. <i></i> Copyright © 2015 - 2022 Bocai. All Rights Reserved. <i></i>
<a target="_blank" href="https://beian.miit.gov.cn/#/Integrated/index">京ICP备16043923号-9</a> <a target="_blank" href="https://beian.miit.gov.cn/#/Integrated/index"
>京ICP备16043923号-9</a
>
</div> </div>
</div> </div>
</footer> </footer>

@ -5,7 +5,7 @@ const webpack = require("webpack");
const CompressionPlugin = require("compression-webpack-plugin"); const CompressionPlugin = require("compression-webpack-plugin");
// const zlib = require("zlib"); // const zlib = require("zlib");
function resolve(dir) { function resolve(dir) {
return path.join(__dirname, dir); return path.join(__dirname, dir);
} }
const name = defaultSettings.title || "vue Admin Template"; // page title const name = defaultSettings.title || "vue Admin Template"; // page title
@ -13,205 +13,206 @@ const name = defaultSettings.title || "vue Admin Template"; // page title
const port = 8888 || process.env.port || process.env.npm_config_port; // dev port const port = 8888 || process.env.port || process.env.npm_config_port; // dev port
module.exports = { module.exports = {
publicPath: "./", publicPath: "./",
outputDir: "dist", outputDir: "dist",
assetsDir: "static", assetsDir: "static",
lintOnSave: process.env.NODE_ENV === "development", lintOnSave: process.env.NODE_ENV === "development",
// lintOnSave: false, // lintOnSave: false,
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
// 配置反向代理 // 配置反向代理
compress: true, // 配置webpack的压缩,但是在package.json中需要配置 --compress compress: true, // 配置webpack的压缩,但是在package.json中需要配置 --compress
port: port, port: port,
open: true, open: true,
overlay: { overlay: {
warnings: false, warnings: false,
errors: true, errors: true,
}, },
proxy: { proxy: {
// 地址中有 /api 的时候会触发代理 // 地址中有 /api 的时候会触发代理
"/api_prod": { "/api_prod": {
// target: "http://localhost:8001/", // target: "http://localhost:8001/",
target: "http://bl7.matripe.com.cn:8001", target: "http://bl7.matripe.com.cn:8001",
// target: "http://1shoudan.renminshitang.com.cn", // target: "http://1shoudan.renminshitang.com.cn",
// target: "https://d.matripe.com.cn", // target: "https://d.matripe.com.cn",
ws: true, // proxy websockets ws: true, // proxy websockets
changeOrigin: true, // 确定是否跨域 changeOrigin: true, // 确定是否跨域
pathRewrite: { pathRewrite: {
"^/api_prod": "", "^/api_prod": "",
}, },
}, },
// '/api_prod': { // '/api_prod': {
// target: 'http://a.matripe.com.cn', // target: 'http://a.matripe.com.cn',
// ws: true, // proxy websockets // ws: true, // proxy websockets
// changeOrigin: true, // needed for virtual hosted sites // changeOrigin: true, // needed for virtual hosted sites
// pathRewrite: { // pathRewrite: {
// '^/api_prod': '' // rewrite path // '^/api_prod': '' // rewrite path
// } // }
// }, // },
// '/api_dev': { // '/api_dev': {
// target: 'http://nb.renminshitang.com.cn:8001', // target: 'http://nb.renminshitang.com.cn:8001',
// ws: true, // proxy websockets // ws: true, // proxy websockets
// changeOrigin: true, // needed for virtual hosted sites // changeOrigin: true, // needed for virtual hosted sites
// pathRewrite: { // pathRewrite: {
// '^/api_dev': '/' // rewrite path // '^/api_dev': '/' // rewrite path
// } // }
// } // }
// ,'/api_test': { // ,'/api_test': {
// target: 'http://localhost:8003', // target: 'http://localhost:8003',
// ws: true, // proxy websockets // ws: true, // proxy websockets
// changeOrigin: true, // needed for virtual hosted sites // changeOrigin: true, // needed for virtual hosted sites
// pathRewrite: { // pathRewrite: {
// '^/api_test': '' // rewrite path // '^/api_test': '' // rewrite path
// } // }
// } // }
}, },
// before: require('./mock/mock-server.js') // before: require('./mock/mock-server.js')
}, },
chainWebpack: (config) => { chainWebpack: (config) => {
// 开发环境的webpack配置 // 开发环境的webpack配置
config.when(process.env.NODE_ENV === "development", (config) => { config.when(process.env.NODE_ENV === "development", (config) => {
config.entry("app").clear().add("./src/main-dev.js"); config.entry("app").clear().add("./src/main-dev.js");
config.set("externals", {}); config.set("externals", {});
}); });
// 生产环境的webpack配置 // 生产环境的webpack配置
config.when(process.env.NODE_ENV === "production", (config) => { config.when(process.env.NODE_ENV === "production", (config) => {
config.entry("app").clear().add("./src/main-prod.js"); config.entry("app").clear().add("./src/main-prod.js");
}); });
config.plugins.delete("fork-ts-checker"), // 禁用fork-ts-checker config.plugins.delete("fork-ts-checker"), // 禁用fork-ts-checker
config.plugins.delete("prefetch"); config.plugins.delete("prefetch");
}, },
configureWebpack: { configureWebpack: {
// provide the app's title in webpack's name field, so that // provide the app's title in webpack's name field, so that
// it can be accessed in index.html to inject the correct title. // it can be accessed in index.html to inject the correct title.
name: name, name: name,
resolve: { resolve: {
alias: { alias: {
"@": resolve("src"), "@": resolve("src"),
"@ant-design/icons/lib/dist.$": resolve("src/icons.js"), "@ant-design/icons/lib/dist.$": resolve("src/icons.js"),
}, },
}, },
plugins: [ plugins: [
// new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), // new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
// // 下面两项配置才是 compression-webpack-plugin 压缩配置 // // 下面两项配置才是 compression-webpack-plugin 压缩配置
// // 压缩成 .gz 文件 // // 压缩成 .gz 文件
// new CompressionPlugin({ // new CompressionPlugin({
// algorithm: "gzip", // algorithm: "gzip",
// test: /\.js$|\.html$|\.css/, //匹配文件名 // test: /\.js$|\.html$|\.css/, //匹配文件名
// threshold: 10240, // threshold: 10240,
// minRatio: 0.8, // minRatio: 0.8,
// deleteOriginalAssets: false, // 是否删除源文件 // deleteOriginalAssets: false, // 是否删除源文件
// }), // }),
// 压缩成 .br 文件,如果 zlib 报错无法解决,可以注释这段使用代码,一般本地没问题,需要注意线上服务器会可能发生找不到 zlib 的情况。 // 压缩成 .br 文件,如果 zlib 报错无法解决,可以注释这段使用代码,一般本地没问题,需要注意线上服务器会可能发生找不到 zlib 的情况。
// new CompressionPlugin({ // new CompressionPlugin({
// filename: '[path].br', // filename: '[path].br',
// algorithm: 'brotliCompress', // algorithm: 'brotliCompress',
// test: /\.(js|css|html|svg)$/, // test: /\.(js|css|html|svg)$/,
// compressionOptions: { // compressionOptions: {
// params: { // params: {
// [zlib.constants.BROTLI_PARAM_QUALITY]: 11 // [zlib.constants.BROTLI_PARAM_QUALITY]: 11
// } // }
// }, // },
// threshold: 10240, // threshold: 10240,
// minRatio: 0.8, // minRatio: 0.8,
// deleteOriginalAssets: true //是否删除原文件 // deleteOriginalAssets: true //是否删除原文件
// })
],
// },
optimization: {
runtimeChunk: "single",
splitChunks: {
chunks: "all",
maxInitialRequests: Infinity,
minSize: 20000,
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name(module) {
// get the name. E.g. node_modules/packageName/not/this/part.js
// or node_modules/packageName
const packageName = module.context.match(
/[\\/]node_modules[\\/](.*?)([\\/]|$)/
)[1];
// npm package names are URL-safe, but some servers don't like @ symbols
return `npm.${packageName.replace("@", "")}`;
},
},
},
},
},
// chainWebpack (config) {
// // it can improve the speed of the first screen, it is recommended to turn on preload
// config.plugin('preload').tap(() => [
// {
// rel: 'preload',
// // to ignore runtime.js
// // https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171
// fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/],
// include: 'initial'
// }
// ])
// }) // // when there are many pages, it will cause too many meaningless requests
], // config.plugins.delete('prefetch')
// },
optimization: {
runtimeChunk: "single",
splitChunks: {
chunks: "all",
maxInitialRequests: Infinity,
minSize: 20000,
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name(module) {
// get the name. E.g. node_modules/packageName/not/this/part.js
// or node_modules/packageName
const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
// npm package names are URL-safe, but some servers don't like @ symbols
return `npm.${packageName.replace("@", "")}`;
},
},
},
},
},
// chainWebpack (config) {
// // it can improve the speed of the first screen, it is recommended to turn on preload
// config.plugin('preload').tap(() => [
// {
// rel: 'preload',
// // to ignore runtime.js
// // https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171
// fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/],
// include: 'initial'
// }
// ])
// // when there are many pages, it will cause too many meaningless requests // // set svg-sprite-loader
// config.plugins.delete('prefetch') // config.module
// .rule('svg')
// .exclude.add(resolve('src/icons'))
// .end()
// config.module
// .rule('icons')
// .test(/\.svg$/)
// .include.add(resolve('src/icons'))
// .end()
// .use('svg-sprite-loader')
// .loader('svg-sprite-loader')
// .options({
// symbolId: 'icon-[name]'
// })
// .end()
// // set svg-sprite-loader // config
// config.module // .when(process.env.NODE_ENV !== 'development',
// .rule('svg') // config => {
// .exclude.add(resolve('src/icons')) // config
// .end() // .plugin('ScriptExtHtmlWebpackPlugin')
// config.module // .after('html')
// .rule('icons') // .use('script-ext-html-webpack-plugin', [{
// .test(/\.svg$/) // // `runtime` must same as runtimeChunk name. default is `runtime`
// .include.add(resolve('src/icons')) // inline: /runtime\..*\.js$/
// .end() // }])
// .use('svg-sprite-loader') // .end()
// .loader('svg-sprite-loader') // config
// .options({ // .optimization.splitChunks({
// symbolId: 'icon-[name]' // chunks: 'all',
// }) // cacheGroups: {
// .end() // libs: {
// name: 'chunk-libs',
// config // test: /[\\/]node_modules[\\/]/,
// .when(process.env.NODE_ENV !== 'development', // priority: 10,
// config => { // chunks: 'initial' // only package third parties that are initially dependent
// config // },
// .plugin('ScriptExtHtmlWebpackPlugin') // elementUI: {
// .after('html') // name: 'chunk-elementUI', // split elementUI into a single package
// .use('script-ext-html-webpack-plugin', [{ // priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
// // `runtime` must same as runtimeChunk name. default is `runtime` // test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
// inline: /runtime\..*\.js$/ // },
// }]) // commons: {
// .end() // name: 'chunk-commons',
// config // test: resolve('src/components'), // can customize your rules
// .optimization.splitChunks({ // minChunks: 3, // minimum common number
// chunks: 'all', // priority: 5,
// cacheGroups: { // reuseExistingChunk: true
// libs: { // }
// name: 'chunk-libs', // }
// test: /[\\/]node_modules[\\/]/, // })
// priority: 10, // // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
// chunks: 'initial' // only package third parties that are initially dependent // config.optimization.runtimeChunk('single')
// }, // }
// elementUI: { // )
// name: 'chunk-elementUI', // split elementUI into a single package // }
// priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app },
// test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
// },
// commons: {
// name: 'chunk-commons',
// test: resolve('src/components'), // can customize your rules
// minChunks: 3, // minimum common number
// priority: 5,
// reuseExistingChunk: true
// }
// }
// })
// // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
// config.optimization.runtimeChunk('single')
// }
// )
// }
},
}; };

Loading…
Cancel
Save