|
@ -49,7 +49,7 @@
|
|
|
<div class="pt10">
|
|
|
<div class="pb20">
|
|
|
<van-row>
|
|
|
<van-col @click="gotoDevice()" class="col col-tl" span="12">
|
|
|
<van-col @click="gotoDevice(0)" 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>
|
|
@ -61,7 +61,7 @@
|
|
|
<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">
|
|
|
<van-col @click="toOrderPage()" 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>
|
|
@ -147,7 +147,7 @@ import { findOneUser} from "@/api/login";
|
|
|
import * as echarts from 'echarts';
|
|
|
import medicineAbinetApi from '@/api/api-medicineAbinet'
|
|
|
export default {
|
|
|
name: "index",
|
|
|
name: "homeIndex",
|
|
|
components: {
|
|
|
|
|
|
},
|
|
@ -218,10 +218,11 @@ export default {
|
|
|
defaultOption: [
|
|
|
{ townName: '全部', town: "", children: [{hospital: '', hospitalName: '全部'}] },
|
|
|
],
|
|
|
|
|
|
first: false
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
|
this.first = true
|
|
|
this.refreshData()
|
|
|
this.getOrgList()
|
|
|
console.log('this.$store.user.state',this.$store.state.user.curRoleCode)
|
|
@ -230,6 +231,13 @@ export default {
|
|
|
this.sales = false;
|
|
|
}
|
|
|
},
|
|
|
activated(){
|
|
|
if(this.first){
|
|
|
this.first = false
|
|
|
} else {
|
|
|
this.refreshData()
|
|
|
}
|
|
|
},
|
|
|
mounted(){
|
|
|
this.echartsData();
|
|
|
},
|
|
@ -249,9 +257,13 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
//跳转
|
|
|
gotoDevice(){
|
|
|
this.$router.push('/device/index')
|
|
|
this.$store.commit('getDeviceActive' ,0);
|
|
|
gotoDevice(active){
|
|
|
var p = this.getTownUrlParams()
|
|
|
p.active = active
|
|
|
this.$router.push({
|
|
|
path: '/device/index',
|
|
|
query: p
|
|
|
})
|
|
|
},
|
|
|
// 取药次数
|
|
|
medicine(){
|
|
@ -484,12 +496,41 @@ export default {
|
|
|
this.communityList = item.children
|
|
|
},
|
|
|
onSelect(item){
|
|
|
console.log('this.selcommunity', item)
|
|
|
this.selcommunity = item;
|
|
|
this.drowMenuShow = false;
|
|
|
this.refreshData()
|
|
|
},
|
|
|
gotoDeviceList(networkStatus){
|
|
|
this.gotoUrl('/device/index', {networkStatus})
|
|
|
var p = this.getTownUrlParams()
|
|
|
p.networkStatus = networkStatus
|
|
|
this.gotoUrl('/device/index', p)
|
|
|
},
|
|
|
toOrderPage(){
|
|
|
var p = this.getTownUrlParams()
|
|
|
p.sellState = 0
|
|
|
this.gotoUrl('/order/list', p)
|
|
|
},
|
|
|
getTownUrlParams(){
|
|
|
var p = {}
|
|
|
if(this.selcommunity){
|
|
|
if(this.selcommunity.hospital===''){
|
|
|
var item = this.townList[this.activeKey]
|
|
|
if(item.town === ''){
|
|
|
|
|
|
} else {
|
|
|
p.town = item.town;
|
|
|
p.townName = item.townName;
|
|
|
}
|
|
|
} else {
|
|
|
var item = this.townList[this.activeKey]
|
|
|
p.town = item.town;
|
|
|
p.townName = item.townName;
|
|
|
p.hospital = this.selcommunity.hospital
|
|
|
p.hospitalName = this.selcommunity.hospitalName
|
|
|
}
|
|
|
}
|
|
|
return p
|
|
|
}
|
|
|
},
|
|
|
}
|