Data tracking / Revision by 0207 ppt

This commit is contained in:
Vion
2022-02-07 18:12:29 +08:00
parent 28c2614ca3
commit 02b361680b
10 changed files with 340 additions and 203 deletions

View File

@@ -78,7 +78,7 @@
</ol>
</div>
<div class="ts-scrollable-container">
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>年龄:</h2>
<ol class="ts-scrollable">
<li
@@ -92,6 +92,21 @@
</li>
</ol>
</div>
<div class="ts-scrollable-container" v-if="inRxGoods">
<h2>功能:</h2>
<ol class="ts-scrollable">
<li
v-for="(item, index) in rxFilters"
:key="index"
@click="selectFilter(item, index)"
:class="item.checked ? 'active' : 'unactive'"
>
{{ item.tagName }}
</li>
</ol>
</div>
</div>
</div>
</div>
@@ -177,7 +192,7 @@
</ol>
</div>
<div class="ts-scrollable-container">
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>年龄:</h2>
<ol class="ts-scrollable">
<li
@@ -191,7 +206,7 @@
</li>
</ol>
</div>
<div class="ts-scrollable-container">
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>功能:</h2>
<ol class="ts-scrollable">
<li
@@ -205,7 +220,7 @@
</li>
</ol>
</div>
<div class="ts-scrollable-container">
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>品种:</h2>
<ol class="ts-scrollable">
<li
@@ -220,6 +235,20 @@
</ol>
</div>
<div class="ts-scrollable-container" v-if="inRxGoods">
<h2>功能:</h2>
<ol class="ts-scrollable">
<li
v-for="(item, index) in rxFilters"
:key="index"
@click="selectFilter(item, index)"
:class="item.checked ? 'active' : 'unactive'"
>
{{ item.tagName }}
</li>
</ol>
</div>
</div>
</div>
@@ -263,7 +292,7 @@
</ol>
</div>
<div class="ts-scrollable-container">
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>年龄:</h2>
<ol class="ts-scrollable">
<li
@@ -277,7 +306,7 @@
</li>
</ol>
</div>
<div class="ts-scrollable-container">
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>功能:</h2>
<ol class="ts-scrollable">
<li
@@ -291,7 +320,7 @@
</li>
</ol>
</div>
<div class="ts-scrollable-container">
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>品种:</h2>
<ol class="ts-scrollable">
<li
@@ -305,6 +334,19 @@
</li>
</ol>
</div>
<div class="ts-scrollable-container" v-if="inRxGoods">
<h2>功能:</h2>
<ol class="ts-scrollable">
<li
v-for="(item, index) in rxFilters"
:key="index"
@click="selectFilter(item, index)"
:class="item.checked ? 'active' : 'unactive'"
>
{{ item.tagName }}
</li>
</ol>
</div>
</div>
</div>
<!--
@@ -331,16 +373,19 @@ import Myheader from "~/components/header.vue";
import MyFooter from '~/components/rc-footer.vue'
import FixRight from "~/components/fixed-right.vue";
import tabs from "~/components/tabs.vue";
import { biaome, userstype, searchchanpin, userquery } from "../../ajax/getData";
import { biaome, userstype, searchchanpin, userquery, userque } from "../../ajax/getData";
import envData from "~/config/env-data.js";
export default {
data() {
return {
value: "",
envData,
crumbs:[
{
path:'/usersearch/search/',
}
],
rxFilters:[],
isLoading: true,
userserachlist: [
{
@@ -528,6 +573,10 @@ export default {
mounted() {
this.usetmessage();
this.userst();
//Handling RxGoods filter
let curEnv = process.env.NODE_ENV;
this.rxFilters = envData[curEnv].rxGoodsFilter;
//Handling RxGoods filter end
},
methods: {
//换一批
@@ -605,6 +654,15 @@ export default {
this.isLoading=false;
}
},
async getRxGoodsByFunc(functionName) {
this.isLoading = true;
let petType = this.activeIndex1;
let data = await userque(functionName, petType, 1, 20);
if (data) {
this.rccontair = data;
this.isLoading = false;
}
},
async userst() {
this.isLoading = true;
let pinzhong = [];
@@ -721,6 +779,19 @@ export default {
this.inRxGoods=false;
}
},
selectFilter(item) {
for(let tmp of this.rxFilters) {
if(item.tagValue == tmp.tagValue) {
item.checked = !item.checked;
} else {
tmp.checked = false;
}
}
if(item.checked)
this.getRxGoodsByFunc(item.tagValue);
else
this.getRxGoodsByFunc();
},
resetAllOptions(){
let _self = this;
let categoriesSelectionEles=this.prefecture;
@@ -731,6 +802,7 @@ export default {
allSelectionEles.forEach(function(tmp,index){
tmp.checked=false;
});
this.checkRxGoods(false);
this.userserachlist = [
{
categoryName: [], //专区