cyl/dev
wangxia 4 years ago
parent c83a61d491
commit 9a097a3985

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

@ -3,8 +3,8 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve --compress",
"build": "vue-cli-service build --report", "build": "vue-cli-service build",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {

@ -3,6 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-type" content="application/javascript; charset=UTF-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<!-- <title><%= htmlWebpackPlugin.options.title %></title> --> <!-- <title><%= htmlWebpackPlugin.options.title %></title> -->

@ -106,7 +106,9 @@
<!-- 面包屑 --> <!-- 面包屑 -->
<a-breadcrumb class="w"> <a-breadcrumb class="w">
<a-breadcrumb-item href=""> <a-breadcrumb-item href="">
<router-link to="/main"><a-icon type="home" /></router-link> <router-link to="/main">
<a-icon type="home" />
</router-link>
</a-breadcrumb-item> </a-breadcrumb-item>
<a-breadcrumb-item href=""> <a-breadcrumb-item href="">
<a @click="toList"> <a @click="toList">
@ -121,43 +123,17 @@
<div class="maincontent w"> <div class="maincontent w">
<div class="maincontentleft"> <div class="maincontentleft">
<div class="subset"> <div class="subset">
<a-skeleton <a-skeleton avatar active class="skeleton1" v-show="skeletonshow" :paragraph="{ rows: 4 }" />
avatar <div class="subsetleft" v-show="!skeletonshow">
:loading="skeletonshow"
v-if="skeletonshow"
:paragraph="{ rows: 4 }"
/>
<div class="subsetleft" v-else>
<div class="imgbox"> <div class="imgbox">
<a-carousel <a-carousel arrows :autoplay="true" effect="fade" :dots="true" ref="scrollimg" v-if="storeImage.length !== 0">
arrows <div slot="prevArrow" class="custom-slick-arrow" style="left: 5px; z-index: 99">
: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 <div slot="nextArrow" class="custom-slick-arrow" style="right: 5px; z-index: 99">
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 <img v-for="(item, index) in storeImage" :key="index" :src="item" alt="" />
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>
@ -170,52 +146,30 @@
</div> </div>
<div class="jobtag"> <div class="jobtag">
<!-- <span>返费</span> --> <!-- <span>返费</span> -->
<a-tag <a-tag :color="labelColor[index % labelColor.length]" v-for="(item, index) in jobDetail.jobRequestLabelNames" :key="index">{{ item }}</a-tag>
:color="labelColor[index % labelColor.length]"
v-for="(item, index) in jobDetail.jobRequestLabelNames"
:key="index"
>{{ item }}</a-tag
>
</div> </div>
<div <div style="height: 27px" v-if="!jobDetail.jobRequestLabelNames" class="jobtag">
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 <a-tag v-for="(item, index) in jobDetail.jobSpecialLabelNames" :key="index">{{ item }}</a-tag>
v-for="(item, index) in jobDetail.jobSpecialLabelNames"
:key="index"
>{{ item }}</a-tag
>
</div> </div>
<div <div style="height: 27px" v-if="!jobDetail.jobSpecialLabelNames" class="jobtag">
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 <div style="
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
@ -227,9 +181,7 @@
</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.minMonthlyPay }}</span>-<span>{{ jobDetail.maxMonthlyPay }}</span>/
>-<span>{{ jobDetail.maxMonthlyPay }}</span
>/
</div> </div>
</div> </div>
@ -262,9 +214,12 @@
<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()"> <button class="dropdown bottombox1" @click="torecord()" v-if="jobDetail.recruitment == '1'">
报名 报名
</button> </button>
<button class="norecruitment bottombox1" v-else>
暂时停招
</button>
</div> </div>
</div> </div>
</div> </div>
@ -275,31 +230,16 @@
<div class="jobinformationbox"> <div class="jobinformationbox">
<h1> <h1>
<div class="infotitle"> <div class="infotitle">
<span <span @click="tabchange = 1" :class="tabchange === 1 ? 'active' : ''">基本信息</span>
@click="tabchange = 1" <span @click="tabchange = 0" :class="tabchange !== 1 ? 'active' : ''">财务结算</span>
: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 <a-modal v-model="xiangdanVisible" title="通告" class="xiangdan" :footer="null" @ok="handleOk">
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><span v-else></span>
><span v-else></span>
<!-- </template> --> <!-- </template> -->
</a-modal> </a-modal>
</h1> </h1>
@ -314,12 +254,7 @@
<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 <a-descriptions bordered size="small" :column="1" class="leftDesc boubleLevel">
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>
@ -382,26 +317,16 @@
<!-- 岗位要求 --> <!-- 岗位要求 -->
<div class="required" id="required"> <div class="required" id="required">
<div class="mb12 mt20">面试要求</div> <div class="mb12 mt20">面试要求</div>
<a-descriptions <a-descriptions bordered size="small" :column="1" class="leftDesc">
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" <span class="man" v-if="jobDetail.minAgeMan"> {{ jobDetail.minAgeMan }}
> {{ jobDetail.minAgeMan }}
<span v-if="jobDetail.maxAgeMan">{{ <span v-if="jobDetail.maxAgeMan">{{
"- " + jobDetail.maxAgeMan "- " + jobDetail.maxAgeMan
}}</span }}</span> </span><span class="woman" v-if="jobDetail.minAgeWoman">
> </span
><span class="woman" v-if="jobDetail.minAgeWoman">
{{ jobDetail.minAgeWoman }} {{ jobDetail.minAgeWoman }}
<span> {{ "- " + jobDetail.maxAgeWoman }}</span <span> {{ "- " + jobDetail.maxAgeWoman }}</span></span>
></span
>
</span> </span>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item> <a-descriptions-item>
@ -435,12 +360,7 @@
<!-- 基本信息 --> <!-- 基本信息 -->
<div class=" " id="contentspecial"> <div class=" " id="contentspecial">
<div class="mb12 mt20">岗位说明</div> <div class="mb12 mt20">岗位说明</div>
<a-descriptions <a-descriptions bordered size="small" :column="1" class="leftDesc">
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>
@ -485,8 +405,7 @@
<div>吃饭</div> <div>吃饭</div>
<ul> <ul>
<li> <li>
<span>吃饭</span <span>吃饭</span><span>{{ jobDetail.workingLunch || "-" }}</span>
><span>{{ jobDetail.workingLunch || "-" }}</span>
</li> </li>
<!-- <li> <!-- <li>
<span>餐补</span <span>餐补</span
@ -504,8 +423,7 @@
<span>民族窗口</span><span>{{ jobDetail.muslim }}</span> <span>民族窗口</span><span>{{ jobDetail.muslim }}</span>
</li> --> </li> -->
<li> <li>
<span>补充说明</span <span>补充说明</span><span style="white-space: break-spaces">{{
><span style="white-space: break-spaces">{{
jobDetail.workingLunchDesp || "-" jobDetail.workingLunchDesp || "-"
}}</span> }}</span>
</li> </li>
@ -515,12 +433,10 @@
<div>住宿</div> <div>住宿</div>
<ul> <ul>
<li> <li>
<span>住宿</span <span>住宿</span><span>{{ jobDetail.dormitory || "-" }}</span>
><span>{{ jobDetail.dormitory || "-" }}</span>
</li> </li>
<li> <li>
<span>宿舍设施</span <span>宿舍设施</span><span>{{ jobDetail.dormitoryFacilities || "-" }}</span>
><span>{{ jobDetail.dormitoryFacilities || "-" }}</span>
</li> </li>
<!-- <li> <!-- <li>
<span>宿舍距离</span <span>宿舍距离</span
@ -541,15 +457,13 @@
><span>{{ jobDetail.dormitoryFacilities }}</span> ><span>{{ jobDetail.dormitoryFacilities }}</span>
</li> --> </li> -->
<li> <li>
<span>水电费</span <span>水电费</span><span>{{ jobDetail.waterAndElec || "-" }}</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>补充说明</span><span style="white-space: break-spaces">{{
><span style="white-space: break-spaces">{{
jobDetail.dormitoryDesp || "-" jobDetail.dormitoryDesp || "-"
}}</span> }}</span>
</li> </li>
@ -621,13 +535,7 @@
{{ jobDetail.agencyStatement || "-" }} {{ jobDetail.agencyStatement || "-" }}
</div> </div>
</div> </div>
<a-descriptions <a-descriptions bordered size="small" :column="1" class="leftDesc mt20" style="width: 900px">
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>
@ -698,7 +606,10 @@
<p>0371-6611 3723</p> <p>0371-6611 3723</p>
</div> </div>
</div> --> </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";
@ -1305,6 +1216,17 @@ export default {
// background-color: #ff791a; // background-color: #ff791a;
// } // }
// } // }
.norecruitment {
border: 1px solid #ccc;
margin-left: 16px;
color: #ccc;
cursor: default;
&:hover {
border: 1px solid #ccc;
background-color: #fff;
color: #ccc;
}
}
} }
} }
} }
@ -1692,4 +1614,14 @@ export default {
} }
} }
} }
.mask {
position: fixed;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.06);
top: 0;
left: 0;
z-index: 999;
pointer-events: none;
}
</style> </style>

@ -23,35 +23,16 @@
> >
</a-modal> --> </a-modal> -->
<!-- 城市的弹出框 --> <!-- 城市的弹出框 -->
<a-modal <a-modal class="cityModal" transitionName="" v-model="visible" width="680px" @cancel="cityModalClose" title="请选择城市" :footer="null">
class="cityModal"
transitionName=""
v-model="visible"
width="680px"
@cancel="cityModalClose"
title="请选择城市"
:footer="null"
>
<div class="inputBox"> <div class="inputBox">
<a-input <a-input placeholder="请输入城市名称" allow-clear width="300px" v-model="cityValue" @keyup.enter="searchCity" @input="resetCityList"></a-input>
placeholder="请输入城市名称" <a-button @click="searchCity"></a-button>
allow-clear
width="300px"
v-model="cityValue"
@keyup.enter="searchCity"
@input="resetCityList"
></a-input
><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 <li v-for="(item, index) in hasJobCityList.firstList" :key="index" @click="[changeCurrentCity(index), (activeInd = index)]">
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>
@ -68,10 +49,9 @@
<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" <router-link to="/main"><svg class="icon" aria-hidden="true">
><svg class="icon" aria-hidden="true"> <use xlink:href="#icon-yishoudanlogo"></use>
<use xlink:href="#icon-yishoudanlogo"></use></svg </svg></router-link>
></router-link>
</span> </span>
<!-- 特色筛选的列表盒子 --> <!-- 特色筛选的列表盒子 -->
<!-- <div v-if="isspecialboxshow" class="specialbox" @click.stop=""> <!-- <div v-if="isspecialboxshow" class="specialbox" @click.stop="">
@ -206,39 +186,10 @@
</div> </div>
</li> </li>
</ul> --> </ul> -->
<div <div class="searchBox" @blur="hidedownHotStore" @focus="showHotStore" tabindex="0" outline="0" hidefocus="true">
class="searchBox" <a-input placeholder="搜索职位、企业名称、年龄要求" @keyup.enter="onSearch" @input="resetsearch" @blur="hidedownHotStore" @focus="showHotStore" tabindex="0" v-model="searchValue" class="searchinput" style="" allow-clear>
@blur="hidedownHotStore" <div slot="prefix" @focus.stop="" tabindex="0" @click.stop="visible = true">
@focus="showHotStore" <span>{{ currentCity }}</span><i class="iconfont icon-sousuoxiala"></i><i class="iconfont icon-guanbishixin" v-show="currentCity != '全国'" @click.stop="resetCity"></i>
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>
@ -252,11 +203,7 @@
<div class="hotStore"> <div class="hotStore">
<!-- <span>热门企业</span> --> <!-- <span>热门企业</span> -->
<ul> <ul>
<li <li v-for="(item, index) in hotStoreList" :key="index" @click="getHotStoreList(item)">
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> -->
@ -265,14 +212,9 @@
</div> </div>
<ul class="hotTag" style="display: none"> <ul class="hotTag" style="display: none">
<div>热门</div> <div>热门</div>
<li <li v-for="(item, index) in specialHotTag" :key="index" @click="specialclick(index, item)" :class="{
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>
@ -291,73 +233,33 @@
<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 <div class="tabSubset" :class="{ active: signType == '' }" data-type="0">
class="tabSubset"
:class="{ active: signType == '' }"
data-type="0"
>
全部 全部
</div> </div>
<div <div class="tabSubset" :class="{ active: signType == 1 }" data-type="1">
class="tabSubset"
:class="{ active: signType == 1 }"
data-type="1"
>
自营 自营
</div> </div>
<div <div class="tabSubset" :class="{ active: signType == 2 }" data-type="2">
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 <div class="filter-title" :style="{ top: filterStatus == 0 ? '-32px' : '-21px' }">
class="filter-title" <span><span>所有筛选<i class="iconfont icon-youjiantou"></i></span>
:style="{ top: filterStatus == 0 ? '-32px' : '-21px' }"
>
<span
><span>所有筛选<i class="iconfont icon-youjiantou"></i></span>
<span class="filter-show"> <span class="filter-show">
<span <span @click="delFilter($event, 'price')" v-show="filterObj.price">{{ filterObj.price
@click="delFilter($event, 'price')" }}<i class="iconfont icon-guanbi2" v-show="filterObj.price"></i></span>
v-show="filterObj.price" <span @click="delFilter($event, 'gender')" v-show="filterObj.gender">{{ filterObj.gender
>{{ filterObj.price }}<i class="iconfont icon-guanbi2" v-show="filterObj.gender"></i></span>
}}<i <span @click="delFilter($event, 'special', item)" v-for="(item, index) in filterObj.specialactive" :key="index">{{ item.name }}<i class="iconfont icon-guanbi2"></i></span>
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" <span @click="hideFilterContent">{{ filterStatus == 0 ? "" : ""
>{{ filterStatus == 0 ? "收起筛选" : "展开筛选" }}<i class="iconfont icon-sousuoxiala" :style="{
}}<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">
@ -365,156 +267,86 @@
<dd> <dd>
<div class="ageinputbox"> <div class="ageinputbox">
<!-- <div> --> <!-- <div> -->
<a-input <a-input class="ageinput" v-model="minMonthlyPay" type="text" allow-clear prefix="¥" @input="resetAgeSearch" @click.stop="
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 <a-input class="ageinput" v-model="maxMonthlyPay" type="text" allow-clear prefix="¥" @input="resetAgeSearch" @click.stop="
><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" <i @click="searchPrice"><span :style="{
><span
:style="{
color: filterObj.price == '3000-4000' ? '#ff4400' : '', color: filterObj.price == '3000-4000' ? '#ff4400' : '',
}" }">3000-4000</span>
>3000-4000</span <span :style="{
>
<span
:style="{
color: filterObj.price == '4000-5000' ? '#ff4400' : '', color: filterObj.price == '4000-5000' ? '#ff4400' : '',
}" }">4000-5000</span>
>4000-5000</span <span :style="{
>
<span
:style="{
color: filterObj.price == '5000-6000' ? '#ff4400' : '', color: filterObj.price == '5000-6000' ? '#ff4400' : '',
}" }">5000-6000</span>
>5000-6000</span <span :style="{
>
<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 <span :style="{ color: filterObj.gender == '男' ? '#ff4400' : '' }"></span><span :style="{ color: filterObj.gender == '女' ? '#ff4400' : '' }"></span><span :style="{
: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 <span v-for="(item, index) in tagArray1" :key="index" :class="{
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 <span v-for="(item, index) in tagArray3" :key="index" :class="{
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 <span v-for="(item, index) in tagArray0" :key="index" :class="{
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 <span v-for="(item, index) in tagArray4" :key="index" :class="{
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 <span v-for="(item, index) in tagArray2" :key="index" :class="{
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>
@ -532,14 +364,10 @@
<!-- </div> --> <!-- </div> -->
<div v-if="!isspinning"> <div v-if="!isspinning">
<div class="subset" v-for="(item, index) in jobMainList" :key="index"> <div class="subset" v-for="(item, index) in jobMainList" :key="index" :style="{background:item.recruitment == '1'?'#fff':'#f5f5f5'}">
<router-link <router-link target="_blank" :to="
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" />
@ -560,39 +388,24 @@
</div> </div>
<div class="jobtag"> <div class="jobtag">
<!-- <span>返费</span> --> <!-- <span>返费</span> -->
<i <i class="iconfont icon-ziying" v-if="item.signType == 1" style=""></i>
class="iconfont icon-ziying" <span v-for="(item1, index) in item.jobSpecialLabelNames" :key="index">{{ item1 }}</span><span v-if="item.jobSpecialLabelNames.length == 0"></span>
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 <div class="jobpricehour" v-html="
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
@ -608,8 +421,7 @@
<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 <span>更新时间{{ item.updateTime || "--" }} (
>更新时间{{ item.updateTime || "--" }} (
{{ item.diffTime || "--" }} ) {{ item.diffTime || "--" }} )
</span> </span>
</div> </div>
@ -625,24 +437,14 @@
<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 <router-link target="_blank" :to="'/detail?' +'id=' + item.id + '&' + 'page=' + formvalue.pageNum" rel="opener">
target="_blank" <button type="primary" class="jobDesp" :style="{background:item.recruitment == '1'?'#fff':'#f5f5f5'}">
:to="
'/detail?' +
'id=' +
item.id +
'&' +
'page=' +
formvalue.pageNum
"
rel="opener"
>
<button type="primary" class="jobDesp">
更多 更多
</button></router-link </button>
> </router-link>
<!-- </a-popover> --> <!-- </a-popover> -->
<button @click="torecord(item)"></button> <button class="apply" @click="torecord(item)" v-if="item.recruitment == '1'"></button>
<button class="norecruitment" v-else></button>
<!-- <button @click="showmodal(item)" @click="">报名</button> --> <!-- <button @click="showmodal(item)" @click="">报名</button> -->
</div> </div>
@ -650,35 +452,21 @@
</div> </div>
</div> </div>
<div class="pagecontainer"> <div class="pagecontainer">
<a-pagination <a-pagination :current="+formvalue.pageNum" :default-current="1" :defaultPageSize="8" :total="formvalue.total" @change="pageChange" />
: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 跳至<input ref="pageinput" type="text" @keyup.enter="inputpageChange" @blur="inputpageChange" />
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 <p class="day" :style="{
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' }">
@ -2783,7 +2571,7 @@ export default {
} }
} }
> button:last-child { .apply {
margin-left: 16px; margin-left: 16px;
border: 1px solid #ff4400; border: 1px solid #ff4400;
background-color: #fff; background-color: #fff;
@ -2797,6 +2585,13 @@ export default {
} }
} }
} }
.norecruitment {
background-color: #f5f5f5;
border: 1px solid #ccc;
margin-left: 16px;
color: #ccc;
}
} }
// .pagecontainer { // .pagecontainer {
// display: flex; // display: flex;

@ -169,9 +169,9 @@ export default {
return { return {
isshow: false, isshow: false,
imglist: [ imglist: [
"http://matripe.oss-cn-beijing.aliyuncs.com/yishoudan/newBanner/banner1.png", "http://matripe.oss-cn-beijing.aliyuncs.com/yishoudan/newBanner/banner1.webp",
"http://matripe.oss-cn-beijing.aliyuncs.com/yishoudan/newBanner/banner2.png", "http://matripe.oss-cn-beijing.aliyuncs.com/yishoudan/newBanner/banner2.webp",
"http://matripe.oss-cn-beijing.aliyuncs.com/yishoudan/newBanner/banner3.png", "http://matripe.oss-cn-beijing.aliyuncs.com/yishoudan/newBanner/banner3.webp",
], ],
cooperativeImg: [], cooperativeImg: [],
isLogin: false, isLogin: false,
@ -391,7 +391,7 @@ export default {
padding-top: 100px; padding-top: 100px;
// padding-bottom: 96px; // padding-bottom: 96px;
height: 740px; height: 740px;
background: url("http://matripe.oss-cn-beijing.aliyuncs.com/yishoudan/cooperativeBrandBg.png") background: url("http://matripe.oss-cn-beijing.aliyuncs.com/yishoudan/cooperativeBrandBg.webp")
no-repeat 100%; no-repeat 100%;
.content { .content {
ul { ul {
@ -448,7 +448,7 @@ export default {
justify-content: center; justify-content: center;
padding: unset; padding: unset;
height: 445px; height: 445px;
background: url("http://matripe.oss-cn-beijing.aliyuncs.com/yishoudan/relationUsBg.png") background: url("http://matripe.oss-cn-beijing.aliyuncs.com/yishoudan/relationUsBg.webp")
no-repeat 100% 100%; no-repeat 100% 100%;
// padding-bottom: 126px; // padding-bottom: 126px;

@ -14,7 +14,7 @@ import AMap from "vue-amap";
Vue.use(AMap); Vue.use(AMap);
console.log("development"); console.log("development");
AMap.initAMapApiLoader({ AMap.initAMapApiLoader({
// 高德key // 高德key
key: "44f4591aabba558514366f6e55f8d20e", // 自己到官网申请,我随便写的 key: "44f4591aabba558514366f6e55f8d20e", // 自己到官网申请,我随便写的
// 插件集合 (插件按需引入) // 插件集合 (插件按需引入)
plugin: [ plugin: [

@ -1326,6 +1326,8 @@ 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) {
item.servetype = `${item.returnFee || "--"}`;
} }
// console.log(item); // console.log(item);
// item["returnFee"] = item.returnFee / 100; // item["returnFee"] = item.returnFee / 100;
@ -1511,6 +1513,8 @@ 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) {
jobList.servetype = `${jobList.returnFee || "--"}`;
} }
} else { } else {
jobList.servetype = `${jobList.returnFee || "--"}元/小时`; jobList.servetype = `${jobList.returnFee || "--"}元/小时`;
@ -1786,7 +1790,7 @@ export function agencyPermissionArray() {
* 根据代理权限ID获取名称 * 根据代理权限ID获取名称
*/ */
export function getAgencyPermissionNameById(permissionStr) { export function getAgencyPermissionNameById(permissionStr) {
let str = ""; // let str = "";
let array = agencyPermissionArray(); let array = agencyPermissionArray();
let names = []; let names = [];
let permissions = permissionStr.split(","); let permissions = permissionStr.split(",");

@ -7,36 +7,18 @@
<span> <span>
<ul> <ul>
<li> <li>
<router-link <router-link to="/" :class="routertitleindex == 0 ? 'titleactive' : ''" rel="opener">
to="/" 一手单首页</router-link>
:class="routertitleindex == 0 ? 'titleactive' : ''"
rel="opener"
>
一手单首页</router-link
>
</li> </li>
<li> <li>
<router-link <router-link to="/list" @click.native="toList" :class="routertitleindex == 1 ? 'titleactive' : ''" rel="opener">一手职位</router-link>
to="/list"
@click.native="toList"
:class="routertitleindex == 1 ? 'titleactive' : ''"
rel="opener"
>一手职位</router-link
>
</li> </li>
<li> <li>
<router-link <router-link to="/mybill" :class="routertitleindex == 5 ? 'titleactive' : ''" rel="opener">我的报名
to="/mybill"
:class="routertitleindex == 5 ? 'titleactive' : ''"
rel="opener"
>我的报名
</router-link> </router-link>
</li> </li>
<li> <li>
<router-link <router-link to="/mytownsman" :class="routertitleindex == 4 ? 'titleactive' : ''">我的老乡
to="/mytownsman"
:class="routertitleindex == 4 ? 'titleactive' : ''"
>我的老乡
</router-link> </router-link>
</li> </li>
<!-- <li> <!-- <li>
@ -68,29 +50,19 @@
<span>个人中心</span> <span>个人中心</span>
<div class="loginbox" slot="overlay"> <div class="loginbox" slot="overlay">
<div> <div>
<img <img :src="loginValue.imgSrc" alt="" v-if="loginValue.imgSrc !== ''" style="border-radius: 50%" />
:src="loginValue.imgSrc" <span v-else class="iconfont icon-morentouxiang avatar"></span><span class="username">{{
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 <span><i class="iconfont icon-gerenzhongxin"></i>个人中心</span><i class="iconfont icon-youjiantou"></i>
><i class="iconfont icon-gerenzhongxin"></i>个人中心</span </div>
><i class="iconfont icon-youjiantou"></i></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"
@ -107,10 +79,8 @@
</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" <router-link to="/login"><button style="cursor: pointer">登录</button></router-link>
><button style="cursor: pointer">登录</button></router-link </span>
></span
>
</span> </span>
<!-- <span class="navigationright"> <!-- <span class="navigationright">
<ul> <ul>
@ -134,12 +104,7 @@
</div> </div>
<!-- 搜索栏 --> <!-- 搜索栏 -->
<router-view <router-view :isspecialboxshow.sync="isspecialboxshow" :formvalue="formvalue" :jobMainList="jobMainList" :isspinning="isspinning"></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">
@ -212,9 +177,7 @@
</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" <a target="_blank" href="https://beian.miit.gov.cn/#/Integrated/index">京ICP备16043923号-9</a>
>京ICP备16043923号-9</a
>
</div> </div>
</div> </div>
</footer> </footer>

@ -1,11 +1,11 @@
"use strict"; "use strict";
const path = require("path"); const path = require("path");
const defaultSettings = require("./src/settings.js"); const defaultSettings = require("./src/settings.js");
// const webpack = require("webpack"); 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,204 +13,205 @@ 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: {
// 配置反向代理 // 配置反向代理
port: port, compress: true, // 配置webpack的压缩,但是在package.json中需要配置 --compress
open: true, port: port,
overlay: { open: true,
warnings: false, overlay: {
errors: true, warnings: false,
}, errors: true,
proxy: { },
// 地址中有 /api 的时候会触发代理 proxy: {
"/api_prod": { // 地址中有 /api 的时候会触发代理
// target: "http://localhost:8001/", "/api_prod": {
target: "http://bl7.matripe.com.cn:8001", // target: "http://localhost:8001/",
// target: "http://1shoudan.renminshitang.com.cn", target: "http://bl7.matripe.com.cn:8001",
// target: "https://d.matripe.com.cn", // target: "http://1shoudan.renminshitang.com.cn",
ws: true, // proxy websockets // target: "https://d.matripe.com.cn",
changeOrigin: true, // 确定是否跨域 ws: true, // proxy websockets
pathRewrite: { changeOrigin: true, // 确定是否跨域
"^/api_prod": "", pathRewrite: {
}, "^/api_prod": "",
}, },
// '/api_prod': { },
// target: 'http://a.matripe.com.cn', // '/api_prod': {
// ws: true, // proxy websockets // target: 'http://a.matripe.com.cn',
// changeOrigin: true, // needed for virtual hosted sites // ws: true, // proxy websockets
// pathRewrite: { // changeOrigin: true, // needed for virtual hosted sites
// '^/api_prod': '' // rewrite path // pathRewrite: {
// } // '^/api_prod': '' // rewrite path
// }, // }
// '/api_dev': { // },
// target: 'http://nb.renminshitang.com.cn:8001', // '/api_dev': {
// ws: true, // proxy websockets // target: 'http://nb.renminshitang.com.cn:8001',
// changeOrigin: true, // needed for virtual hosted sites // ws: true, // proxy websockets
// pathRewrite: { // changeOrigin: true, // needed for virtual hosted sites
// '^/api_dev': '/' // rewrite path // pathRewrite: {
// } // '^/api_dev': '/' // rewrite path
// } // }
// ,'/api_test': { // }
// target: 'http://localhost:8003', // ,'/api_test': {
// ws: true, // proxy websockets // target: 'http://localhost:8003',
// changeOrigin: true, // needed for virtual hosted sites // ws: true, // proxy websockets
// pathRewrite: { // changeOrigin: true, // needed for virtual hosted sites
// '^/api_test': '' // rewrite path // pathRewrite: {
// } // '^/api_test': '' // rewrite path
// } // }
}, // }
// before: require('./mock/mock-server.js') },
}, // before: require('./mock/mock-server.js')
chainWebpack: (config) => { },
// 开发环境的webpack配置 chainWebpack: (config) => {
config.when(process.env.NODE_ENV === "development", (config) => { // 开发环境的webpack配置
config.entry("app").clear().add("./src/main-dev.js"); config.when(process.env.NODE_ENV === "development", (config) => {
config.set("externals", {}); config.entry("app").clear().add("./src/main-dev.js");
}); config.set("externals", {});
// 生产环境的webpack配置 });
config.when(process.env.NODE_ENV === "production", (config) => { // 生产环境的webpack配置
config.entry("app").clear().add("./src/main-prod.js"); config.when(process.env.NODE_ENV === "production", (config) => {
}); config.entry("app").clear().add("./src/main-prod.js");
config.plugins.delete("fork-ts-checker"), // 禁用fork-ts-checker });
config.plugins.delete("prefetch"); config.plugins.delete("fork-ts-checker"), // 禁用fork-ts-checker
}, 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({
// filename: '[path][base].gz', // algorithm: "gzip",
// algorithm: 'gzip', // test: /\.js$|\.html$|\.css/, //匹配文件名
// test: /\.js$|\.css$|\.html$/, // threshold: 10240,
// threshold: 10240, // minRatio: 0.8,
// minRatio: 0.8 // deleteOriginalAssets: false, // 是否删除源文件
// }), // }),
// // 压缩成 .br 文件,如果 zlib 报错无法解决,可以注释这段使用代码,一般本地没问题,需要注意线上服务器会可能发生找不到 zlib 的情况。 // 压缩成 .br 文件,如果 zlib 报错无法解决,可以注释这段使用代码,一般本地没问题,需要注意线上服务器会可能发生找不到 zlib 的情况。
// new CompressionPlugin({ // new CompressionPlugin({
// filename: '[path][base].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 //是否删除原文件
// ],
// },
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'
// }
// ])
// // set svg-sprite-loader // // when there are many pages, it will cause too many meaningless requests
// config.module // config.plugins.delete('prefetch')
// .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()
// config // // set svg-sprite-loader
// .when(process.env.NODE_ENV !== 'development', // config.module
// config => { // .rule('svg')
// config // .exclude.add(resolve('src/icons'))
// .plugin('ScriptExtHtmlWebpackPlugin') // .end()
// .after('html') // config.module
// .use('script-ext-html-webpack-plugin', [{ // .rule('icons')
// // `runtime` must same as runtimeChunk name. default is `runtime` // .test(/\.svg$/)
// inline: /runtime\..*\.js$/ // .include.add(resolve('src/icons'))
// }]) // .end()
// .end() // .use('svg-sprite-loader')
// config // .loader('svg-sprite-loader')
// .optimization.splitChunks({ // .options({
// chunks: 'all', // symbolId: 'icon-[name]'
// cacheGroups: { // })
// libs: { // .end()
// name: 'chunk-libs',
// test: /[\\/]node_modules[\\/]/, // config
// priority: 10, // .when(process.env.NODE_ENV !== 'development',
// chunks: 'initial' // only package third parties that are initially dependent // config => {
// }, // config
// elementUI: { // .plugin('ScriptExtHtmlWebpackPlugin')
// name: 'chunk-elementUI', // split elementUI into a single package // .after('html')
// priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app // .use('script-ext-html-webpack-plugin', [{
// test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm // // `runtime` must same as runtimeChunk name. default is `runtime`
// }, // inline: /runtime\..*\.js$/
// commons: { // }])
// name: 'chunk-commons', // .end()
// test: resolve('src/components'), // can customize your rules // config
// minChunks: 3, // minimum common number // .optimization.splitChunks({
// priority: 5, // chunks: 'all',
// reuseExistingChunk: true // cacheGroups: {
// } // libs: {
// } // name: 'chunk-libs',
// }) // test: /[\\/]node_modules[\\/]/,
// // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk // priority: 10,
// config.optimization.runtimeChunk('single') // chunks: 'initial' // only package third parties that are initially dependent
// } // },
// ) // 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