优化首次进入ui
parent
0860028c87
commit
a6b8858927
|
|
@ -64,14 +64,10 @@
|
||||||
{
|
{
|
||||||
"path": "control/index",
|
"path": "control/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "控制中心",
|
"navigationBarTitleText": "控制中心"
|
||||||
"usingComponents": {
|
|
||||||
"auto-page": "/pages/home/control/automatic",
|
|
||||||
"manual-page": "/pages/home/control/manual"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// ,
|
|
||||||
// {
|
// {
|
||||||
// "path": "control/automatic",
|
// "path": "control/automatic",
|
||||||
// "style": {
|
// "style": {
|
||||||
|
|
|
||||||
|
|
@ -566,9 +566,6 @@ export default {
|
||||||
refresh() {
|
refresh() {
|
||||||
this.getAgriTerm();
|
this.getAgriTerm();
|
||||||
this.showFlag = !((store.getters && store.getters.name !== 'admin') && this.$auth.hasRole("test"))
|
this.showFlag = !((store.getters && store.getters.name !== 'admin') && this.$auth.hasRole("test"))
|
||||||
this.$nextTick(() => {
|
|
||||||
this.getSwiperHeight(); // 页面初始化时也计算一次
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
getAgriTerm() {
|
getAgriTerm() {
|
||||||
getAgriTerm(this.imei).then(response => {
|
getAgriTerm(this.imei).then(response => {
|
||||||
|
|
@ -595,7 +592,9 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.getSwiperHeight(); // 页面初始化时也计算一次
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// --------------------共同逻辑------------------------------
|
// --------------------共同逻辑------------------------------
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import ManualPage from "./manual.vue"
|
||||||
|
import AutoPage from "./automatic.vue"
|
||||||
// 优化:抽离魔法值常量
|
// 优化:抽离魔法值常量
|
||||||
const SENSOR_MAP = {
|
const SENSOR_MAP = {
|
||||||
temp1: "201", temp2: "202", temp3: "203", temp4: "204",
|
temp1: "201", temp2: "202", temp3: "203", temp4: "204",
|
||||||
|
|
@ -87,6 +89,8 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
ZPaging,
|
ZPaging,
|
||||||
CustomRefresher,
|
CustomRefresher,
|
||||||
|
ManualPage,
|
||||||
|
AutoPage,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue