main
parent
ef69e7c282
commit
881a986408
|
@ -6,11 +6,11 @@
|
|||
<div class="one-card-content">
|
||||
<div>
|
||||
<p>节水量</p>
|
||||
<font><span class="font26">4.00</span>m³</font>
|
||||
<font><span class="font26">{{ baseData && baseData.vd2716.toFixed(2) }}</span>m³</font>
|
||||
</div>
|
||||
<div>
|
||||
<p>节碳量</p>
|
||||
<font><span class="font26">0.67</span>kg</font>
|
||||
<font><span class="font26">{{ baseData && (baseData.vd2716 * 0.168).toFixed(2) }}</span>kg</font>
|
||||
</div>
|
||||
<div>
|
||||
<p>原水箱液位:<span class="font26">{{ baseData && baseData.vd500.toFixed(2) }}</span>m</p>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { onMounted, reactive, ref, toRefs, nextTick } from "vue";
|
||||
import { onMounted, reactive, ref, toRefs, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import {useStore} from 'vuex';
|
||||
export default {
|
||||
|
@ -106,7 +106,13 @@ export default {
|
|||
}]
|
||||
}]
|
||||
})
|
||||
|
||||
watch(() => store.state.pclData, val => {
|
||||
if (val) {
|
||||
console.log('主页', val);
|
||||
state.menus[0].parms[0].value = val.vd2716.toFixed(2);
|
||||
state.menus[0].parms[1].value = (val.vd2716 * 0.168).toFixed(2);
|
||||
}
|
||||
}, { deep: true, immediate: true });
|
||||
onMounted(() => {
|
||||
store.commit("setModelName", '');
|
||||
})
|
||||
|
|
|
@ -33,13 +33,14 @@ import md5 from "js-md5";
|
|||
import { reactive, ref, toRefs, onMounted } from "vue";
|
||||
import myApi from "@/api/myApi.js";
|
||||
import { localSet, localGet } from "@/utils";
|
||||
import bgImg from '@/assets/bg2.png'
|
||||
export default {
|
||||
name: "Login",
|
||||
setup() {
|
||||
const loginForm = ref(null);
|
||||
const state = reactive({
|
||||
projectName: "",
|
||||
loginImg: "",
|
||||
loginImg: bgImg,
|
||||
ruleForm: {
|
||||
username: "",
|
||||
password: "",
|
||||
|
@ -57,8 +58,8 @@ export default {
|
|||
|
||||
onMounted(async () => {
|
||||
const res = await myApi.getInfo();
|
||||
state.projectName = res.data.title || '世博浦西区活水公园';
|
||||
state.loginImg = res.data.loginImg;
|
||||
state.projectName = res.data && res.data.title || '世博浦西区活水公园';
|
||||
state.loginImg = res.data && res.data.loginImg || bgImg;
|
||||
|
||||
});
|
||||
const submitForm = async () => {
|
||||
|
|
Loading…
Reference in New Issue