|
|
@@ -10,33 +10,20 @@
|
|
|
@click="onClickTabs"
|
|
|
v-if="isGZorJZ">
|
|
|
<van-tab title="提示类" name="-1" v-if="isGZorJZ == 'false'">
|
|
|
- <hintTabPage :tabVal="tabVal" ref="hintTabPage"></hintTabPage
|
|
|
- ></van-tab>
|
|
|
- <van-tab title="A类指标" name="0"
|
|
|
- ><ABtarget :tabVal="tabVal" ref="Atarget"></ABtarget
|
|
|
- ></van-tab>
|
|
|
- <van-tab title="B类指标" name="1"
|
|
|
- ><ABtarget :tabVal="tabVal" ref="Btarget"></ABtarget
|
|
|
- ></van-tab>
|
|
|
+ <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
|
|
+ <hintTabPage :tabVal="tabVal" ref="hintTabPage"></hintTabPage>
|
|
|
+ </van-pull-refresh>
|
|
|
+ </van-tab>
|
|
|
+ <van-tab title="A类指标" name="0">
|
|
|
+ <ABtarget :tabVal="tabVal" ref="Atarget"></ABtarget>
|
|
|
+ </van-tab>
|
|
|
+ <van-tab title="B类指标" name="1">
|
|
|
+ <ABtarget :tabVal="tabVal" ref="Btarget"></ABtarget>
|
|
|
+ </van-tab>
|
|
|
</van-tabs>
|
|
|
<div class="bottomBtn">
|
|
|
- <bottomBtn :tabVal="tabVal"></bottomBtn>
|
|
|
+ <bottomBtn :tabVal="tabVal" ref="bottomBtn"></bottomBtn>
|
|
|
</div>
|
|
|
- <!-- <van-dialog v-model="shows" @confirm="titleconfirm">
|
|
|
- <div class="tipTitleBox" style="padding: 10px">
|
|
|
- <p class="p">系统提示</p>
|
|
|
- <p>各位好,因五一假期,汇报提交时间有调整。</p>
|
|
|
- <div style="font-size: 14px">
|
|
|
- <p style="margin-bottom: 6px; line-height: 20px">1、5月1-3日,销售员无需提交日报。</p>
|
|
|
- <p style="margin-bottom: 6px; line-height: 20px">
|
|
|
- 2、销售部主管周报提交时间改为4月27日-30日。
|
|
|
- </p>
|
|
|
- <p>3、大区主管半月报提交时间改为5月4日-7日。</p>
|
|
|
- </div>
|
|
|
- <br />
|
|
|
- <p style="text-align: right">祝大家假期愉快!</p>
|
|
|
- </div>
|
|
|
- </van-dialog> -->
|
|
|
</div>
|
|
|
<tab-bar></tab-bar>
|
|
|
</div>
|
|
|
@@ -62,6 +49,7 @@ export default {
|
|
|
tabVal: '-1',
|
|
|
hintTabPageIndex: 0,
|
|
|
isGZorJZ: null,
|
|
|
+ isLoading: false,
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -79,21 +67,27 @@ export default {
|
|
|
activated() {
|
|
|
if (this.tabVal == '-1') {
|
|
|
// 从其他页面跳转过来如果;要重新获取对应tab数据
|
|
|
- if (this.$refs.hintTabPage) this.$refs.hintTabPage.initData();
|
|
|
+ // if (this.$refs.hintTabPage) this.$refs.hintTabPage.initData();
|
|
|
} else if (this.tabVal == '0') {
|
|
|
- if (this.$refs.Atarget) this.$refs.Atarget.initData();
|
|
|
+ // if (this.$refs.Atarget) this.$refs.Atarget.initData();
|
|
|
} else if (this.tabVal == '1') {
|
|
|
- if (this.$refs.Btarget) this.$refs.Btarget.initData();
|
|
|
+ // if (this.$refs.Btarget) this.$refs.Btarget.initData();
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
this.getDict();
|
|
|
},
|
|
|
+ mounted() {},
|
|
|
methods: {
|
|
|
- async getDict() {
|
|
|
- this.isGZorJZ = null;
|
|
|
+ onRefresh() {
|
|
|
+ this.getDict(true);
|
|
|
+ this.isLoading = false;
|
|
|
+ },
|
|
|
+ async getDict(isRefresh) {
|
|
|
+ this.toastLoading(0, '加载中...', true);
|
|
|
let gz_Option = await getDictOption({}, 'gz_customer_post'); //公装业务员岗位
|
|
|
let jz_Option = await getDictOption({}, 'jz_post_name'); //家装业务员岗位
|
|
|
+ this.toastLoading().clear();
|
|
|
let postName = this.userInfo.postName;
|
|
|
let is_gz = gz_Option.data.find((res) => res.dictLabel == postName);
|
|
|
let is_jz = jz_Option.data.find((res) => res.dictLabel == postName);
|
|
|
@@ -106,11 +100,22 @@ export default {
|
|
|
}
|
|
|
// 家装或工装不显示提示类tab
|
|
|
this.$nextTick(() => {
|
|
|
- if (this.isGZorJZ == 'true') {
|
|
|
- this.tabVal = '0';
|
|
|
- } else {
|
|
|
- this.tabVal = '-1';
|
|
|
+ // 刷新状态
|
|
|
+ if (!isRefresh) {
|
|
|
+ if (this.isGZorJZ == 'true') {
|
|
|
+ this.tabVal = '0';
|
|
|
+ } else {
|
|
|
+ this.tabVal = '-1';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.tabVal == '-1') {
|
|
|
+ if (this.$refs.hintTabPage) this.$refs.hintTabPage.initData();
|
|
|
+ } else if (this.tabVal == '0') {
|
|
|
+ if (this.$refs.Atarget) this.$refs.Atarget.initData();
|
|
|
+ } else if (this.tabVal == '1') {
|
|
|
+ if (this.$refs.Btarget) this.$refs.Btarget.initData();
|
|
|
}
|
|
|
+ if (this.$refs.bottomBtn) this.$refs.bottomBtn.getReportInfo();
|
|
|
});
|
|
|
},
|
|
|
onClickTabs(val) {
|