Commit 5c07ec66 authored by 吴冠's avatar 吴冠

处理数据缓存

parent f5025f75
......@@ -29,7 +29,7 @@
<ul v-if="isshow">
<li v-for="item in priceList" :key="item.id">
<nuxt-link :to="{name:'index-notice-abortivedetails',query:{id:(item.noticeId)}}">
<div @click="handleChageUrl(item.noticeId)">
<div class="time">{{getTimer(item.createTime)}}</div>
<div class="price-item">
<div class="t1" style="font-weight: bold;">
......@@ -45,7 +45,7 @@
<div>招标状态: <span class="state-red">{{item.projectStatus}}</span> </div>
</div>
</div>
</nuxt-link>
</div>
</li>
</ul>
<div class="pagination flex-center">
......@@ -60,6 +60,7 @@
import {industryList} from '@/api/common/list.js'
import citySelect from '@/components/citySelect.vue'
import {getErrorList} from '@/common/list.js'
import Cookies from 'js-cookie'
export default {
components:{
citySelect
......@@ -78,6 +79,13 @@ import {getErrorList} from '@/common/list.js'
size:10,
noticeType:"ABORTIVE"
}
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList();
const {data,total} = await getErrorList(mes)
console.log(data+'------------')
......@@ -183,6 +191,7 @@ import {getErrorList} from '@/common/list.js'
let mess = {}
mess.noticeType = "ABORTIVE"
mess.currentPage = val
Cookies.set("currentPage",val)
this.getErrorList(mess);
//获取当前页
},
......@@ -192,6 +201,11 @@ import {getErrorList} from '@/common/list.js'
let day = 12 * 30 * 24 * 3600 * 1000;
let dateRegion = curDate - day;
return time.getTime() > Date.now() || time.getTime() < dateRegion;
},
handleChageUrl(id){
console.log(this.cacheCurrentPage+'1111111111111111112222')
Cookies.set("details",true)
return this.$router.push(`cadidatedetails?id=${id}`)
}
}
}
......
......@@ -46,6 +46,11 @@
</div>
</div>
</div>
<div class="flex-center">
<el-button @click="prev"
>返回</el-button
>
</div>
</div>
</template>
<script>
......@@ -74,6 +79,9 @@ export default {
},
methods:{
prev() {
window.history.go(-1)
},
async getErrorDetails(id){
console.log(id+"-----------------")
const {data} = await getErrorDetails(id)
......
......@@ -85,6 +85,13 @@ import Cookies from 'js-cookie'
/* if(inputContent!=''){
mes.title = inputContent
} */
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList();
const {data,total} = await getAllList(mes)
console.log(data+'------------')
......@@ -160,6 +167,7 @@ import Cookies from 'js-cookie'
if(noticeType=='WIN'){
url= `/notice/windetails?id=${noticeId}`
}
Cookies.set("details",true)
this.$router.push(url)
},
async queryStr() {
......@@ -228,6 +236,7 @@ import Cookies from 'js-cookie'
handleCurrentChange(val) {
let mess = {}
mess.currentPage = val
Cookies.set("currentPage",val)
this.getAllList(mess);
//获取当前页
},
......
......@@ -28,7 +28,7 @@
</div>
<ul v-if ="isshow">
<li v-for="item in priceList" :key="item.id">
<nuxt-link :to="{name:'index-notice-biddingdetails',query:{id:(item.noticeId)}}">
<div @click="handleChageUrl(item.noticeId)">
<div class="time">{{getTimer(item.createTime)}}</div>
<div class="price-item">
<div class="t1" style="font-weight: bold;">
......@@ -44,7 +44,7 @@
<div>招标状态: <span class="state-red">{{item.projectStatus}}</span> </div>
</div>
</div>
</nuxt-link>
</div>
</li>
</ul>
<div class="pagination flex-center">
......@@ -59,6 +59,7 @@
import {getBidingList} from '@/common/list.js'
import {industryList} from '@/api/common/list.js'
import citySelect from "@/components/citySelect.vue";
import Cookies from 'js-cookie'
export default {
components:{
citySelect,
......@@ -69,6 +70,13 @@ import citySelect from "@/components/citySelect.vue";
size:10,
noticeType:"BIDDING"
}
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList();
const {data,total} = await getBidingList(mes)
console.log(data+'------------')
......@@ -188,6 +196,7 @@ import citySelect from "@/components/citySelect.vue";
let mess = {}
mess.currentPage = val
mess.noticeType = "BIDDING"
Cookies.set("currentPage",val)
this.getBidingList(mess)
//获取当前页
},
......@@ -197,6 +206,11 @@ import citySelect from "@/components/citySelect.vue";
let day = 12 * 30 * 24 * 3600 * 1000;
let dateRegion = curDate - day;
return time.getTime() > Date.now() || time.getTime() < dateRegion;
},
handleChageUrl(id){
console.log(this.cacheCurrentPage+'1111111111111111112222')
Cookies.set("details",true)
return this.$router.push(`biddingdetails?id=${id}`)
}
}
}
......
......@@ -133,6 +133,9 @@
</a>
</div>
<el-row>
<el-button @click="prev"
>返回</el-button
>
<el-button type="primary" @click="signUp" v-if="isshow">我要报名</el-button>
</el-row>
</div>
......@@ -167,6 +170,9 @@ export default {
}
},
methods:{
prev() {
window.history.go(-1)
},
signUp(){
let tokenStr = Cookies.get("token")
if(!tokenStr){
......
......@@ -42,7 +42,7 @@
<ul v-if="isshow">
<li v-for="item in priceList" :key="item.id">
<!-- 绑定中标详情页 -->
<nuxt-link :to="{name:'index-notice-windetails',query:{id:(item.noticeId)}}">
<div @click="handleChageUrl(item.noticeId)">
<div class="time">{{getTimer(item.createTime)}}</div>
<div class="price-item">
<div class="t1" style="font-weight: bold;">
......@@ -61,7 +61,7 @@
</div>
</div>
</div>
</nuxt-link>
</div>
</li>
</ul>
<div class="pagination flex-center">
......@@ -82,6 +82,7 @@
import { getWinList } from "@/common/list.js";
import { industryList } from "@/api/common/list.js";
import citySelect from "@/components/citySelect.vue";
import Cookies from 'js-cookie'
export default {
components: {
citySelect,
......@@ -92,6 +93,13 @@ export default {
size:10,
noticeType:"WIN"
}
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList();
const {data,total} = await getWinList(mes)
console.log(data+'------------')
......@@ -242,6 +250,7 @@ export default {
let mess = {}
mess.noticeType = "WIN"
mess.currentPage = val
Cookies.set("currentPage",val)
this.getWinList(mess);
//获取当前页
},
......@@ -252,6 +261,11 @@ export default {
let dateRegion = curDate - day;
return time.getTime() > Date.now() || time.getTime() < dateRegion;
},
handleChageUrl(id){
console.log(this.cacheCurrentPage+'1111111111111111112222')
Cookies.set("details",true)
return this.$router.push(`windetails?id=${id}`)
}
},
};
</script>
......
......@@ -29,7 +29,7 @@
<ul v-if="isshow">
<li v-for="item in priceList" :key="item.id">
<nuxt-link :to="{name:'index-notice-cadidatedetails',query:{id:(item.noticeId)}}">
<div @click="handleChageUrl(item.noticeId)">
<div class="time">{{getTimer(item.createTime)}}</div>
<div class="price-item">
<div class="t1" style="font-weight: bold;">
......@@ -45,7 +45,7 @@
<div>招标状态: <span class="state-red">{{item.projectStatus}}</span> </div>
</div>
</div>
</nuxt-link>
</div>
</li>
</ul>
<div class="pagination flex-center">
......@@ -60,6 +60,7 @@
import {industryList} from '@/api/common/list.js'
import citySelect from '@/components/citySelect.vue'
import {getCadidateList} from '@/common/list.js'
import Cookies from 'js-cookie'
export default {
components:{
citySelect
......@@ -78,6 +79,13 @@ import {getCadidateList} from '@/common/list.js'
size:10,
noticeType:"CADIDATE"
}
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList();
const {data,total} = await getCadidateList(mes)
console.log(data+'------------')
......@@ -185,6 +193,7 @@ import {getCadidateList} from '@/common/list.js'
let mess = {}
mess.noticeType = "CADIDATE"
mess.currentPage = val
Cookies.set("currentPage",val)
this.getCadidateList(mess);
//获取当前页
},
......@@ -194,6 +203,11 @@ import {getCadidateList} from '@/common/list.js'
let day = 12 * 30 * 24 * 3600 * 1000;
let dateRegion = curDate - day;
return time.getTime() > Date.now() || time.getTime() < dateRegion;
},
handleChageUrl(id){
console.log(this.cacheCurrentPage+'1111111111111111112222')
Cookies.set("details",true)
return this.$router.push(`cadidatedetails?id=${id}`)
}
}
}
......
......@@ -46,6 +46,11 @@
</div>
</div>
</div>
<div class="flex-center">
<el-button @click="prev"
>返回</el-button
>
</div>
</div>
</template>
<script>
......@@ -72,6 +77,9 @@ export default {
this.getCadidateDetails(id)
},
methods:{
prev() {
window.history.go(-1)
},
async getCadidateDetails(id){
const {data} = await getCadidateDetails(id)
this.itemTitle = data.title
......
......@@ -29,7 +29,7 @@
<ul v-if="isshow">
<li v-for="item in priceList" :key="item.id">
<nuxt-link :to="{name:'index-notice-changedetails',query:{id:(item.noticeId)}}">
<div @click="handleChageUrl(item.noticeId)">
<div class="time">{{getTimer(item.createTime)}}</div>
<div class="price-item">
<div class="t1" style="font-weight: bold;">
......@@ -45,7 +45,7 @@
<div>招标状态: <span class="state-red">{{item.projectStatus}}</span> </div>
</div>
</div>
</nuxt-link>
</div>
</li>
</ul>
<div class="pagination flex-center">
......@@ -60,6 +60,7 @@
import {industryList} from '@/api/common/list.js'
import citySelect from '@/components/citySelect.vue'
import {getChangeList} from '@/common/list.js'
import Cookies from 'js-cookie'
export default {
components:{
citySelect
......@@ -78,6 +79,13 @@ import {getChangeList} from '@/common/list.js'
size:10,
noticeType:"CHANGE"
}
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList();
const {data,total} = await getChangeList(mes)
console.log(data+'------------')
......@@ -178,6 +186,7 @@ import {getChangeList} from '@/common/list.js'
let mess = {}
mess.size = val
mess.noticeType = "CHANGE"
Cookies.set("currentPage",val)
this.getChangeList(mess)
},
handleCurrentChange(val) {
......@@ -194,6 +203,11 @@ import {getChangeList} from '@/common/list.js'
let day = 12 * 30 * 24 * 3600 * 1000;
let dateRegion = curDate - day;
return time.getTime() > Date.now() || time.getTime() < dateRegion;
},
handleChageUrl(id){
console.log(this.cacheCurrentPage+'1111111111111111112222')
Cookies.set("details",true)
return this.$router.push(`changedetails?id=${id}`)
}
}
}
......
......@@ -22,6 +22,11 @@
<h3>三、其他补充事宜</h3>
<h3>四、凡对本次公告内容提出询问,请按以下方式联系</h3>
</div>
<div class="flex-center">
<el-button @click="prev"
>返回</el-button
>
</div>
</div>
</div>
</template>
......@@ -44,6 +49,9 @@ export default {
this.getChangeDetails(id)
},
methods:{
prev() {
window.history.go(-1)
},
async getChangeDetails(id){
const {data} = await getChangeDetails(id)
this.itemTitle = data.title
......
......@@ -29,7 +29,7 @@
<ul v-if="isshow">
<li v-for="item in priceList" :key="item.id">
<nuxt-link :to="{name:'index-notice-clarifiesdetails',query:{id:(item.noticeId)}}">
<div @click="handleChageUrl(item.noticeId)">
<div class="time">{{getTimer(item.createTime)}}</div>
<div class="price-item">
<div class="t1" style="font-weight: bold;">
......@@ -45,7 +45,7 @@
<div>招标状态: <span class="state-red">{{item.projectStatus}}</span> </div>
</div>
</div>
</nuxt-link>
</div>
</li>
</ul>
<div class="pagination flex-center">
......@@ -60,6 +60,7 @@
import {industryList} from '@/api/common/list.js'
import citySelect from '@/components/citySelect.vue'
import {getClerList} from '@/common/list.js'
import Cookies from 'js-cookie'
export default {
components:{
citySelect
......@@ -78,6 +79,13 @@ import {getClerList} from '@/common/list.js'
size:10,
noticeType:"CLARIFIES"
}
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList();
const {data,total} = await getClerList(mes)
console.log(data+'------------')
......@@ -176,14 +184,15 @@ import {getClerList} from '@/common/list.js'
let mess = {}
mess.size = val
mess.noticeType = "CLARIFIES"
this.getErrorList(mess)
this.getClerList(mess)
},
handleCurrentChange(val) {
/* this.getData.currentPage = val */
let mess = {}
mess.noticeType = "CLARIFIES"
mess.currentPage = val
this.getErrorList(mess);
Cookies.set("currentPage",val)
this.getClerList(mess);
//获取当前页
},
dealDisabledDate(time) {
......@@ -192,6 +201,11 @@ import {getClerList} from '@/common/list.js'
let day = 12 * 30 * 24 * 3600 * 1000;
let dateRegion = curDate - day;
return time.getTime() > Date.now() || time.getTime() < dateRegion;
},
handleChageUrl(id){
console.log(this.cacheCurrentPage+'1111111111111111112222')
Cookies.set("details",true)
return this.$router.push(`clarifiesdetails?id=${id}`)
}
}
}
......
......@@ -46,6 +46,11 @@
</div>
</div>
</div>
<div class="flex-center">
<el-button @click="prev"
>返回</el-button
>
</div>
</div>
</template>
<script>
......@@ -74,6 +79,9 @@ export default {
},
methods:{
prev() {
window.history.go(-1)
},
async getClerDetailsList(id){
console.log(id+"-----------------")
const {data} = await getClerDetailsList(id)
......
......@@ -99,7 +99,10 @@
<p>只有报价后才能参与投标报名</p>
</div>
<div class="Tips">图使馆招标公告(2020-07-30)</div>
<div class="button">
<div class="button flex">
<el-button @click="prev"
>返回</el-button
>
<el-button
type="primary"
@click="putPrice"
......@@ -293,8 +296,8 @@ export default {
}
}
},
Prev() {
this.$router.push("/notice/inquiry");
prev() {
window.history.go(-1)
},
async getenquirydetails(params) {
const { data } = await getenquirydetails(params);
......
......@@ -45,7 +45,7 @@
<ul v-if="isshow1">
<li v-if = "!isshow1">暂无数据</li>
<li v-for="item in priceList" :key="item.id">
<nuxt-link :to="{name:'index-notice-enquirydetails',query:{id:(item.noticeId)}}" >
<div @click="handleChageUrl(item.noticeId)">
<div class="time">{{getTimer(item.createTime)}}</div>
<div class="price-item">
<div class="t1" style="font-weight: bold;">
......@@ -65,7 +65,7 @@
</div>
</div>
</div>
</nuxt-link>
</div>
</li>
</ul>
<div v-show="isshow">
......@@ -90,6 +90,7 @@ import dataTable from "@/components/dataTable.vue";
import { getInquiryList} from "@/common/list.js";
import { industryList} from "@/api/common/list.js";
import citySelect from "@/components/citySelect.vue"
import Cookies from 'js-cookie'
export default {
components: {
citySelect,
......@@ -101,6 +102,13 @@ export default {
size:10,
noticeType:'ENQUIRY'
}
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList();
console.log(res,"----------------------")
const {data,total} = await getInquiryList(mes)
......@@ -112,6 +120,7 @@ export default {
},
data() {
return {
cacheCurrentPage:'',
noticeT:'[询价公告]',
isshow1:true,
isshow: false,
......@@ -173,7 +182,9 @@ export default {
value: "",
};
},
/* destroyed(){
Cookies.remove("details");
}, */
methods: {
//年月日
getTimer(dateStr){
......@@ -243,6 +254,7 @@ export default {
mess.noticeType = "ENQUIRY"
/* mess.size = this.getData.size */
mess.currentPage = val
Cookies.set("currentPage",val)
this.getInquiryList(mess);
/* this.getInquiryList(this.getData.size,val) */
},
......@@ -253,6 +265,11 @@ export default {
let dateRegion = curDate - day;
return time.getTime() > Date.now() || time.getTime() < dateRegion;
},
handleChageUrl(id){
console.log(this.cacheCurrentPage+'1111111111111111112222')
Cookies.set("details",true)
return this.$router.push(`enquirydetails?id=${id}`)
}
},
};
</script>
......
......@@ -46,6 +46,11 @@
</div>
</div>
</div>
<div class="flex-center">
<el-button @click="prev"
>返回</el-button
>
</div>
</div>
</template>
......@@ -74,6 +79,9 @@ export default {
this.getWindetails(id)
},
methods:{
prev() {
window.history.go(-1)
},
//年月日
getTimer(dateStr){
var date = new Date(dateStr);
......
......@@ -18,7 +18,7 @@ service.interceptors.request.use(config => {
/* let token=Cookies.get("token")
if(token||token!=="undefined"){
config.headers['token']=token;
}*/
} */
// if (store.getters.token) {
// let test = config.data;
// if(test){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment