chenyue 3 gadi atpakaļ
vecāks
revīzija
3ef6eceb80

+ 5 - 2
mini-pro-web/src/store/index.js

@ -7,10 +7,13 @@ Vue.use(Vuex)
export default new Vuex.Store({
	state: {
		loading: true
        loading: true,
        deviceActive:1,
	},
	mutations: {
        getDeviceActive(state,payload){
            state.deviceActive = payload
        }
	},
	actions: {
		

+ 6 - 3
mini-pro-web/src/views/device/index.vue

@ -1,7 +1,7 @@
<template>
<div class='deviceIndex'>
    <van-sticky :offset-top="offsetTop">
        <van-tabs v-model="active">
        <van-tabs v-model="active" @click="onClick">
            <van-tab :name="1" title="全部设备"></van-tab>
            <van-tab :name="0" title="缺药设备"></van-tab>
        </van-tabs>
@ -56,7 +56,7 @@ export default{
        return {
            list: [],
            result: [],
            active: 1
            active: this.$store.state.deviceActive
        }
    },
    watch:{
@ -65,12 +65,15 @@ export default{
        }
    },
    created() {
        
        // console.log('this.$store.deviceActive',this.$store.state.deviceActive)
    },
    methods:{
        $refreshData(){
            this.$refs.customList.refresh(true)
        },
        onClick(name,title){
            this.$store.commit('getDeviceActive' ,name);
        },
        onLoad({page, pageSize, searchText}){
            var p = {
                content: searchText,

+ 24 - 19
mini-pro-web/src/views/index/Index.vue

@ -33,23 +33,23 @@
			<div class="pt10">
				<div class="pb20">
                    <van-row>
                    <van-col class="col col-tl" span="12">
                        <div class="operations-num">{{ maintain.addTotal }}</div>
                        <div class="operations-text"><span><img class="img" src="../../assets/images/waiting-equipment.png" alt=""></span>待入库设备数</div>
                    </van-col>
                    <van-col class="col" span="12">
                        <div class="operations-num">{{ maintain.hcWaringTotalNum }}</div>
                        <div class="operations-text"><span><img class="img" src="../../assets/images/thermometer.png" alt=""></span>温湿度预警数</div>
                    </van-col>
                    <van-col class="col col-t col-bl" span="12">
                        <div class="operations-num">{{ maintain.noOnlineTotal1WithUserId }}</div>
                        <div class="operations-text"><span><img class="img" src="../../assets/images/waiting-equipment.png" alt=""></span>离线设备数</div>
                    </van-col>
                    <van-col class="col col-t" span="12">
                        <div class="operations-num">{{ maintain.noGetDrugNum }}</div>
                        <div class="operations-text"><span><img class="img" src="../../assets/images/offline-medicine.png" alt=""></span>待取药订单数</div>
                    </van-col>
                </van-row>
                        <van-col @click="gotoDevice()" class="col col-tl" span="12">
                            <div class="operations-num">{{ maintain.addTotal }}</div>
                            <div class="operations-text"><span><img class="img" src="../../assets/images/waiting-equipment.png" alt=""></span>待入库设备数</div>
                        </van-col>
                        <van-col @click="gotoDevice()" class="col" span="12">
                            <div class="operations-num">{{ maintain.hcWaringTotalNum }}</div>
                            <div class="operations-text"><span><img class="img" src="../../assets/images/thermometer.png" alt=""></span>温湿度预警数</div>
                        </van-col>
                        <van-col @click="gotoDevice()" class="col col-t col-bl" span="12">
                            <div class="operations-num">{{ maintain.noOnlineTotal1WithUserId }}</div>
                            <div class="operations-text"><span><img class="img" src="../../assets/images/waiting-equipment.png" alt=""></span>离线设备数</div>
                        </van-col>
                        <van-col @click="gotoUrl('/order/list')" class="col col-t" span="12">
                            <div class="operations-num">{{ maintain.noGetDrugNum }}</div>
                            <div class="operations-text"><span><img class="img" src="../../assets/images/offline-medicine.png" alt=""></span>待取药订单数</div>
                        </van-col>
                    </van-row>
                </div>
			</div>
		</div>
@ -173,8 +173,8 @@ export default {
		this.countall();
		this.medicine();
        this.prescriptions();
        console.log('this.$store.user.state',this.$store.state.user.curRoleName)
        if(this.$store.state.user.curRoleName =='设备管理员'){
        console.log('this.$store.user.state',this.$store.state.user.curRoleCode)
        if(this.$store.state.user.curRoleCode =='replenisher'){
            this.medicineShow = false;
            this.sales = false;
        }
@ -198,6 +198,11 @@ export default {
					console.error(err)
				})
        },
        //跳转
        gotoDevice(){
            this.$router.push('/device/index')
            this.$store.commit('getDeviceActive' ,0);
        },
        // 取药次数
        medicine(){
            medicineAbinetApi

+ 1 - 1
mini-pro-web/src/views/login/Login.vue

@ -330,7 +330,7 @@ export default {
                            console.error(err)
                            this.$toast.clear()
                        })
                        console.log('userinfo',userInfo)
                        // console.log('userinfo',userInfo)
                } else {
                    this.$toast.clear()
                    this.$toast(result.status==1300? "验证码错误" : result.message);