perf(index): 减少请求,加速访问

duizhaopin_ui
duan 2 years ago
parent cdfda2769c
commit b94bdf30ba

@ -2,5 +2,5 @@
ENV = 'development'
# base api
VUE_APP_BASE_API = 'http://111.231.67.55:9001'
VUE_APP_BASE_API = 'http://127.0.0.1:9001'
VUE_APP_FACE_API = 'http://127.0.0.1:5000'

@ -2,6 +2,6 @@
ENV = 'production'
# base api
VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_API = 'http://127.0.0.1:9001'
VUE_APP_FACE_API ='http://127.0.0.1:5000'

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

@ -2,7 +2,7 @@
<div class="navbar" :style="{...obj,'height': this.$store.getters.isMain ? '22vh' : '8vh'}">
<div class="header-top">
<div class="header-top-item"><img src="@/assets/login/logo-white.png" alt=""> </div>
<div v-if="!$store.getters.isMain"><img class="log-img" src="@/assets/rms/主概览-白-60px.png" alt=""></div>
<div v-if="!$store.getters.isMain"><img class="log-img" src="@/assets/rms/mainoverview_white.png" alt=""></div>
<div class="header-top-item">
<el-badge :value="39">
<img style="height: 23px" src="@/assets/0-常用/预警管理-白.png" alt="">
@ -19,7 +19,7 @@
</div>
</div>
<div v-if="$store.getters.isMain" class="header-title">
<img src="@/assets/rms/主概览-白-60px.png" alt="">
<img src="@/assets/rms/mainoverview_white.png" alt="">
</div>
<div v-if="$store.getters.isMain" class="header-desc">
为您提供基于物联网的智慧实验室物资管理解决方案
@ -46,7 +46,7 @@ export default {
data() {
return {
obj: {
'background-image': 'url(' + require('@/assets/3-主概览/主概览背景.png') + ')',
'background-image': 'url(' + require('@/assets/3-主概览/main_bg.png') + ')',
'background-size': '100%'
}
}

@ -1,6 +1,6 @@
const getters = {
sidebar: state => state.app.sidebar,
device: state => state.app.device,
// sidebar: state => state.app.sidebar,
// device: state => state.app.device,
token: state => state.user.token,
avatar: state => state.user.avatar,
name: state => state.user.name,
@ -9,6 +9,7 @@ const getters = {
classification: state => state.user.classification,
isMain: state => state.settings.isMain,
roleData: state => state.permission.roleData,
opts: state => state.permission.opts
opts: state => state.permission.opts,
clientOptions: state => state.app.clientOptions
}
export default getters

@ -4,7 +4,8 @@ const state = {
sidebar: {
// opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
opened: true,
withoutAnimation: false
withoutAnimation: false,
clientOptions: []
},
device: 'desktop'
}
@ -26,6 +27,9 @@ const mutations = {
},
TOGGLE_DEVICE: (state, device) => {
state.device = device
},
SET_COPTS: (state, opt) => {
state.clientOptions = opt
}
}
@ -47,3 +51,4 @@ export default {
mutations,
actions
}

@ -2,15 +2,15 @@
<div>
<div class="home-top">
<div class="home-top-left"> <img src="@/assets/2-主界面/logo.png" alt=""> </div>
<div class="home-top-mid"><img src="@/assets/rms/主界面-黑-80px.png" alt=""></div>
<div class="home-top-mid"><img src="@/assets/rms/mianoverview.png" alt=""></div>
<div class="home-top-right"><img class="home-top-right-img" src="@/assets/2-主界面/关闭.png" alt=""></div>
</div>
<div class="home-content">
<div class="home-pic">
<div class="home-pic-item" @click="picClick('reagent')"><img src="@/assets/2-主界面/试剂管理.png" alt=""></div>
<div key="2" class="home-pic-item"><img src="@/assets/2-主界面/标准品管理.png" alt=""></div>
<div key="2" class="home-pic-item"><img src="@/assets/2-主界面/standard.png" alt=""></div>
<div key="3" class="home-pic-item"><img src="@/assets/2-主界面/耗材管理.png" alt=""></div>
<div key="4" class="home-pic-item"><img src="@/assets/2-主界面/仪器管理.png" alt=""></div>
<div key="4" class="home-pic-item"><img src="@/assets/2-主界面/instrument.png" alt=""></div>
<div key="5" class="home-pic-item" @click="picClick('user')"><img src="@/assets/2-主界面/用户管理.png" alt=""></div>
</div>
<div class="home-menu">

@ -6,13 +6,20 @@
<div class="login-title">一站式智慧实验室管理服务</div>
</div>
<div class="login-container-mid">
<div class="login-container-mid-top"><img src="@/assets/rms/登录-白-100px.png" alt=""></div>
<div class="login-container-mid-top"><img src="@/assets/rms/login_white.png" alt=""></div>
<img class="login-container-mid-mid" src="@/assets/login/分隔条.png" alt="">
<div class="login-container-mid-bottom">为您提供基于物联网的智慧实验室物资管理解决方案</div>
</div>
<div>
<el-card class="login-form-container">
<el-form ref="loginForm" label-position="top" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on">
<el-form
ref="loginForm"
label-position="top"
:model="loginForm"
:rules="loginRules"
class="login-form"
auto-complete="on"
>
<div class="title-container">
<h3 class="title">欢迎登录</h3>
@ -57,7 +64,13 @@
</div>
</el-form-item>
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">登录</el-button>
<el-button
:loading="loading"
type="primary"
style="width:100%;margin-bottom:30px;"
@click.native.prevent="handleLogin"
>登录
</el-button>
</el-form>
<div class="forget-pwd"><a>忘记密码</a></div>
@ -71,6 +84,7 @@
// import { validUsername } from '@/utils/validate'
import stringify from '@/utils/stringify'
import { login } from '@/api/user/user'
import { client_list } from '@/api/common'
export default {
name: 'Login',
@ -133,6 +147,12 @@ export default {
this.$store.commit('user/SET_TOKEN', res.data.token)
this.$store.dispatch('permission/generateRoutes')
this.$router.replace('/home')
// client使
client_list().then(
res => {
this.$store.commit('app/SET_COPTS', res.data.data_list)
}
)
}).finally(
() => {
this.loading = false
@ -162,12 +182,14 @@ export default {
bottom: 1rem;
position: absolute;
}
.login-title {
padding-left: 1rem;
font-size: 1.25rem;
font-weight: 400;
color: #FFFFFF;
}
.login-form-container {
color: #C0C4CC;
width: 27.5rem;
@ -177,15 +199,18 @@ export default {
top: 50%;
margin-top: -16.87rem;
}
.login-container-header-img {
height: 4.6875rem;
}
.forget-pwd {
width: 100%;
text-align: center;
color: #409EFF;
margin-left: 1rem;
}
>>> .el-input__inner {
border: none;
}
@ -210,25 +235,30 @@ $cursor: #fff;
background: linear-gradient(135deg, rgba(69, 63, 244, 0.7700) 0%, #3F47F4 100%) no-repeat;
background-size: 100% 100%;
opacity: 1;
.login-container-header {
margin-left: 7.5rem;
margin-top: 5rem;
display: flex;
align-items: center;
}
.login-container-mid {
margin-left: 7.5rem;
margin-top: 16rem;
.login-container-mid-mid {
height: 0.75rem;
margin-top: 1.25rem;
margin-bottom: 1.25rem;
}
.login-container-mid-top {
img {
width: 49.3125rem;
}
}
.login-container-mid-bottom {
font-size: 28px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei, serif;
@ -236,6 +266,7 @@ $cursor: #fff;
color: #FFFFFF;
}
}
.el-input {
display: inline-block;
height: 47px;

@ -7,7 +7,7 @@
<div class="header-sub">
<el-select v-model="client_id" placeholder="请选择柜体" @change="(val) => valueChange('id',val)">
<el-option
v-for="item in clientOptions"
v-for="item in $store.getters.clientOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
@ -41,7 +41,7 @@
<div class="header-sub">
<el-select v-model="daily_client_id" placeholder="请选择柜体">
<el-option
v-for="item in clientOptions"
v-for="item in $store.getters.clientOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
@ -72,9 +72,24 @@
<el-table-column align="center" property="client_name" label="柜体名称" />
<el-table-column align="center" property="place" label="所处位置" />
<el-table-column align="center" property="day_date" label="日期" />
<el-table-column align="center" property="avg_wd" label="温度(取平均值)" :formatter="(row, column) => row.avg_wd + ' °C'" />
<el-table-column align="center" property="avg_sd" label="湿度(取平均值)" :formatter="(row, column) => row.avg_sd + ' RH%'" />
<el-table-column align="center" property="avg_voc" label="VOC含量取平均值" :formatter="(row, column) => row.avg_voc + ' ppm'" />
<el-table-column
align="center"
property="avg_wd"
label="温度(取平均值)"
:formatter="(row, column) => row.avg_wd + ' °C'"
/>
<el-table-column
align="center"
property="avg_sd"
label="湿度(取平均值)"
:formatter="(row, column) => row.avg_sd + ' RH%'"
/>
<el-table-column
align="center"
property="avg_voc"
label="VOC含量取平均值"
:formatter="(row, column) => row.avg_voc + ' ppm'"
/>
<el-table-column align="center" property="client_id" label="操作">
<template slot-scope="scope">
<el-button @click="handleOpt(scope.row)"></el-button>
@ -116,9 +131,24 @@
>
<el-table-column align="center" type="index" width="50" label="序号" />
<el-table-column align="center" property="day_date" label="时间" />
<el-table-column align="center" property="wd" label="温度(取平均值)" :formatter="(row, column) => row.wd + ' °C'" />
<el-table-column align="center" property="sd" label="湿度(取平均值)" :formatter="(row, column) => row.sd + ' RH%'" />
<el-table-column align="center" property="voc" label="VOC含量取平均值" :formatter="(row, column) => row.voc + ' ppm'" />
<el-table-column
align="center"
property="wd"
label="温度(取平均值)"
:formatter="(row, column) => row.wd + ' °C'"
/>
<el-table-column
align="center"
property="sd"
label="湿度(取平均值)"
:formatter="(row, column) => row.sd + ' RH%'"
/>
<el-table-column
align="center"
property="voc"
label="VOC含量取平均值"
:formatter="(row, column) => row.voc + ' ppm'"
/>
</el-table>
<div class="my-pagination" style="text-align: center">
<el-pagination
@ -138,9 +168,9 @@
<script>
import { get_monitoring_info } from '@/api/reagent/overView'
import stringify from '@/utils/stringify'
import { client_list } from '@/api/common'
import { day_monitor, day_monitor_info } from '@/api/reagent/envrecord'
import { parseTime } from '@/utils'
export default {
name: 'EnvRecord',
data() {
@ -153,7 +183,6 @@ export default {
client_date: 1,
options: ['近24小时', '近七天', '近一个月'],
myChart2: undefined,
clientOptions: [],
linechartData: [],
headerStyle: { 'background': '#E6E6E6' },
//
@ -177,16 +206,11 @@ export default {
}
},
created() {
client_list().then(
res => {
this.clientOptions = res.data.data_list
this.client_id = this.clientOptions[0].client_id
this.client_id = this.$store.getters.clientOptions[0].client_id
this.daily_client_id = this.client_id
this.getMonitoringData()
this.getDailyData()
this.initCharts()
}
)
},
beforeDestroy() {
window.removeEventListener('resize', () => {
@ -210,7 +234,9 @@ export default {
day_monitor(stringify(data)).then(res => {
this.tableData = res.data.data_list
this.total = res.data.total_count
}).finally(() => { this.loading = false })
}).finally(() => {
this.loading = false
})
},
getMonitoringData() {
const data = {
@ -223,7 +249,9 @@ export default {
res => {
this.linechartData = res.data
}
).finally(() => { this.loadingLine = false })
).finally(() => {
this.loadingLine = false
})
},
initCharts() {
this.lineCharts()
@ -270,7 +298,7 @@ export default {
},
series: [
{
name: this.clientOptions.find(item => item.client_id === this.client_id).client_name,
name: this.$store.getters.clientOptions.find(item => item.client_id === this.client_id).client_name,
type: 'line',
smooth: true,
data: this.linechartData.map(item => item.data_value),
@ -319,7 +347,9 @@ export default {
this.recordData = res.data.data_list
this.record_total = res.data.total_count
}
).finally(() => { this.recordLoading = false })
).finally(() => {
this.recordLoading = false
})
},
handleOpt(row) {
this.record_client_id = row.client_id
@ -356,35 +386,43 @@ export default {
text-align: center;
margin-top: 2rem;
}
.line-charts {
margin: 1rem;
background: white;
padding: 1rem;
.header {
display: flex;
justify-content: space-between;
align-items: center;
.header-sub {
.el-select {
margin-right: 1rem;
}
.el-date-editor {
margin-right: 1rem;
}
}
}
.header-title {
font-size: 1.25rem;
font-weight: bold;
color: #303133;
}
#line {
height: 30vh;
}
.el-table {
margin-top: 1rem;
}
}
.env-header {
margin-bottom: 1rem;
}

@ -4,7 +4,7 @@
<div class="header">
<el-select v-model="client_id" placeholder="请选择柜体">
<el-option
v-for="item in clientOptions"
v-for="item in $store.getters.clientOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
@ -83,7 +83,13 @@
@current-change="pageChange"
/>
</div>
<el-dialog :close-on-click-modal="false" :visible.sync="dialogVisible" width="30%" title="录入库存" @close="onClose">
<el-dialog
:close-on-click-modal="false"
:visible.sync="dialogVisible"
width="30%"
title="录入库存"
@close="onClose"
>
<div v-for="item in multipleSelection" :key="item.id" class="add-item">
<div>{{ `${item.name} ${item.purity}` }}</div>
<el-input v-model.number="item.num" placement="请输入校验在库数量" />
@ -118,7 +124,7 @@
/>
<el-select v-model="history_client_id" class="header-select" placeholder="请选择柜体">
<el-option
v-for="item in clientOptions"
v-for="item in $store.getters.clientOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
@ -160,10 +166,8 @@
</template>
<script>
import { getClients } from '@/views/reagent/mixin/getClients'
export default {
name: 'Inventory',
mixins: [getClients],
data() {
return {
page: 1,
@ -252,25 +256,31 @@ export default {
padding: 1rem;
margin: 1rem;
background: white;
.title {
font-size: 20px;
font-weight: bold;
color: #000000;
}
.header {
margin: 1rem 0 1rem 0;
.el-input {
width: 9.375rem;
margin-right: 1rem;
}
.el-select {
margin-right: 1rem;
}
.header-right {
float: right;
}
}
}
.add-item {
margin-bottom: 1rem;
}

@ -16,7 +16,7 @@
<div>
<el-select v-model="client_id" placeholder="请选择柜体" @change="(val) => valueChange('id',val)">
<el-option
v-for="item in clientOptions"
v-for="item in $store.getters.clientOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
@ -71,9 +71,15 @@
<!-- :value="item.value"-->
<!-- />-->
<!-- </el-select>-->
<el-select v-model="rclient_id" :disabled="rloading" style="margin-right: 0" placeholder="请选择柜体" @change="remainingPageChange(1)">
<el-select
v-model="rclient_id"
:disabled="rloading"
style="margin-right: 0"
placeholder="请选择柜体"
@change="remainingPageChange(1)"
>
<el-option
v-for="item in clientOptions"
v-for="item in $store.getters.clientOptions"
:key="item.client_id"
:label="item.client_name"
:value="item.client_id"
@ -305,7 +311,9 @@
<!-- <el-descriptions-item label="过期日期">{{ this.rowData.object_name }}</el-descriptions-item>-->
<!-- <el-descriptions-item label="试剂余量">{{ this.rowData.object_name }}</el-descriptions-item>-->
<!-- <el-descriptions-item label="所属终端">{{ this.rowData.object_name }}</el-descriptions-item>-->
<el-descriptions-item label="最后使用人"><el-tag>{{ rowData.warning_user_name }}</el-tag></el-descriptions-item>
<el-descriptions-item label="最后使用人">
<el-tag>{{ rowData.warning_user_name }}</el-tag>
</el-descriptions-item>
<el-descriptions-item label="受理情况">
<el-tag :type="rowData.is_solve === 0?'warning':'success' ">
{{ rowData.is_solve === 0 ? '未受理' : '已受理' }}
@ -324,7 +332,6 @@
<script>
import Detail from '@/components/Detail/index'
import { home_info, home_warning_list, home_drug_remaining, get_monitoring_info } from '@/api/reagent/overView'
import { client_list } from '@/api/common'
import stringify from '@/utils/stringify'
export default {
@ -344,26 +351,25 @@ export default {
{
count: 0,
desc: '今日入库',
img: require('@/assets/3-主概览/今日入库.png')
img: require('@/assets/3-主概览/today_store.png')
},
{
count: 0,
desc: '今日领用',
img: require('@/assets/3-主概览/今日领用.png')
img: require('@/assets/3-主概览/today_get.png')
},
{
count: 0,
desc: '今日归还',
img: require('@/assets/3-主概览/今日归还.png')
img: require('@/assets/3-主概览/today_return.png')
},
{
count: 0,
desc: '今日未归还',
img: require('@/assets/3-主概览/今日未归还.png')
img: require('@/assets/3-主概览/today_noreturn.png')
}
],
tableData: [],
clientOptions: [],
options: ['近24小时', '近七天', '近一个月'],
value: '',
radio1: 1,
@ -389,9 +395,10 @@ export default {
loadingLineData: true
}
},
async created() {
created() {
this.loading = true
await this.initClientData()
this.client_id = this.$store.getters.clientOptions[0].client_id
this.rclient_id = this.client_id
this.getMonitoringData()
home_info().then(res => {
this.initDataFunc(res.data)
@ -406,18 +413,6 @@ export default {
})
},
methods: {
initClientData() {
return new Promise((resolve, reject) => {
client_list().then(
res => {
this.clientOptions = res.data.data_list
this.client_id = this.clientOptions[0].client_id
this.rclient_id = this.client_id
resolve()
}
)
})
},
valueChange(t, value) {
this.getMonitoringData()
this.lineCharts(t)
@ -433,7 +428,9 @@ export default {
res => {
this.linechartData = res.data
}
).finally(() => { this.loadingLineData = false })
).finally(() => {
this.loadingLineData = false
})
},
remainingPageChange(page) {
this.rpage = page
@ -581,7 +578,7 @@ export default {
},
series: [
{
name: this.clientOptions.find(item => item.client_id === this.client_id).client_name,
name: this.$store.getters.clientOptions.find(item => item.client_id === this.client_id).client_name,
type: 'line',
areaStyle: {},
smooth: true,
@ -622,11 +619,13 @@ export default {
justify-content: space-between;
}
}
.view-container-tr {
width: 33%;
background-color: white;
}
}
.view-container-bottom {
display: flex;
@ -647,67 +646,82 @@ export default {
height: 14rem;
width: 33.75rem;
}
.header {
display: flex;
margin-bottom: 0.5rem;
justify-content: space-between;
align-items: center;
.el-input {
width: 150px;
}
.el-select {
margin-right: 1rem;
}
.title {
font-size: 20px;
font-weight: bold;
color: #303133;
}
}
.data-progress {
margin-top: 1rem;
width: 93%;
.data-progress-header {
display: flex;
justify-content: space-between;
}
}
.header-warn {
.title {
font-size: 20px;
font-weight: bold;
color: #303133;
}
.count {
font-size: 36px;
font-weight: bold;
color: #303133;
margin-top: 3rem;
}
.desc {
font-size: 14px;
font-weight: 400;
color: #606266;
}
}
.view-content {
padding: 1rem;
background-color: white;
}
#pie {
width: 30rem;
height: 18rem;
}
#line {
width: 65rem;
height: 15.25rem;
}
.header-custom {
margin-bottom: 1rem;
.el-input {
width: 12.5rem;
margin-right: 1rem;
}
.el-select {
margin-right: 1rem;
}

@ -4,7 +4,7 @@
<div class="header">
<el-select v-model="client_id" clearable placeholder="请选择柜体">
<el-option
v-for="item in clientOptions"
v-for="item in $store.getters.clientOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
@ -116,8 +116,8 @@
align="center"
>
<template slot-scope="scope">
<div v-if="clientOptions.find(item => item.client_id === scope.row.client_id)">
{{ clientOptions.find(item => item.client_id === scope.row.client_id).client_name }}
<div v-if="$store.getters.clientOptions.find(item => item.client_id === scope.row.client_id)">
{{ $store.getters.clientOptions.find(item => item.client_id === scope.row.client_id).client_name }}
</div>
<div v-else>
{{ scope.row.client_id }}
@ -175,8 +175,8 @@
<el-table-column align="center" property="purity" label="纯度" width="100" show-overflow-tooltip />
<el-table-column align="center" property="client_id" label="所属终端">
<template slot-scope="scope">
<div v-if="clientOptions.find(item => item.client_id === scope.row.client_id)">
{{ clientOptions.find(item => item.client_id === scope.row.client_id).client_name }}
<div v-if="$store.getters.clientOptions.find(item => item.client_id === scope.row.client_id)">
{{ $store.getters.clientOptions.find(item => item.client_id === scope.row.client_id).client_name }}
</div>
<div v-else>
{{ scope.row.client_id }}
@ -373,7 +373,6 @@
</template>
<script>
import { getClients } from '@/views/reagent/mixin/getClients'
import {
del,
drug_list,
@ -388,7 +387,6 @@ import stringify from '@/utils/stringify'
import { get_use } from '@/api/reagent/customform'
export default {
name: 'Management',
mixins: [getClients],
data() {
return {
page: 1,

@ -8,8 +8,8 @@
<div class="info">
<div class="info-text title text">库存信息统计</div>
<div class="info-item">
<div @click="$router.push('/reagent/report/storeinfo')"><img src="@/assets/4-报表统计/库存信息总览.png" alt=""></div>
<div @click="$router.push('/reagent/report/warehousinginfo')"><img src="@/assets/4-报表统计/入库信息查询.png" alt=""></div>
<div @click="$router.push('/reagent/report/storeinfo')"><img src="@/assets/4-报表统计/store_info_overview.png" alt=""></div>
<div @click="$router.push('/reagent/report/warehousinginfo')"><img src="@/assets/4-报表统计/store_info_search.png" alt=""></div>
<div @click="$router.push('/reagent/report/reagentinfo')"><img src="@/assets/4-报表统计/试剂信息详情.png" alt=""></div>
</div>
</div>

@ -6,7 +6,7 @@
<el-button @click="$router.push('/reagent/report/index')"></el-button>
<el-select v-model="client_id" clearable placeholder="请选择柜体">
<el-option
v-for="item in clientOptions"
v-for="item in $store.getters.clientOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
@ -64,11 +64,9 @@
<script>
import { drug_details_info } from '@/api/reagent/report'
import stringify from '@/utils/stringify'
import { getClients } from '@/views/reagent/mixin/getClients'
export default {
name: 'ReagentInfo',
mixins: [getClients],
data() {
return {
selectReagentValue: '',
@ -108,7 +106,9 @@ export default {
})).then(res => {
this.reagentData = res.data.data
this.total = res.data.total_count
}).finally(() => { this.loadingReagent = false })
}).finally(() => {
this.loadingReagent = false
})
}
}
}
@ -120,20 +120,24 @@ export default {
background: white;
//min-height: calc(100vh - 12rem);
padding: 1rem;
.title {
font-size: 1.25rem;
font-weight: bold;
color: #000000;
margin-bottom: 1rem;
}
.header {
display: flex;
justify-content: space-between;
margin-bottom: 1rem;
.header-left {
.el-select {
margin-left: 1rem;
}
.el-input {
width: 200px;
margin-right: 1rem;

@ -6,7 +6,7 @@
<el-button @click="$router.push('/reagent/report/index')"></el-button>
<el-select v-model="client_id" clearable placeholder="请选择柜体">
<el-option
v-for="item in clientOptions"
v-for="item in $store.getters.clientOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
@ -69,8 +69,8 @@
<el-table-column align="center" property="create_user_name" label="操作人员" />
<el-table-column align="center" property="client_id" label="所属终端">
<template slot-scope="scope">
<div v-if="clientOptions.find(item => item.client_id === scope.row.client_id)">
{{ clientOptions.find(item => item.client_id === scope.row.client_id).client_name }}
<div v-if="$store.getters.clientOptions.find(item => item.client_id === scope.row.client_id)">
{{ $store.getters.clientOptions.find(item => item.client_id === scope.row.client_id).client_name }}
</div>
<div v-else>
{{ scope.row.client_id }}
@ -94,11 +94,9 @@
<script>
import { drug_log_type_info } from '@/api/reagent/report'
import stringify from '@/utils/stringify'
import { getClients } from '@/views/reagent/mixin/getClients'
export default {
name: 'Record',
mixins: [getClients],
data() {
return {
titleMap: {

@ -28,8 +28,8 @@
<el-table-column align="center" property="sum_remain" label="在库剩余总质量(g)" />
<el-table-column align="center" property="client_id" label="所属终端" show-overflow-tooltip>
<template slot-scope="scope">
<div v-if="clientOptions.find(item => item.client_id === scope.row.client_id)">
{{ clientOptions.find(item => item.client_id === scope.row.client_id).client_name }}
<div v-if="$store.getters.clientOptions.find(item => item.client_id === scope.row.client_id)">
{{ $store.getters.clientOptions.find(item => item.client_id === scope.row.client_id).client_name }}
</div>
<div v-else>
{{ scope.row.client_id }}
@ -53,10 +53,8 @@
<script>
import { stock_data_info } from '@/api/reagent/report'
import stringify from '@/utils/stringify'
import { getClients } from '@/views/reagent/mixin/getClients'
export default {
name: 'StoreInfo',
mixins: [getClients],
data() {
return {
selectReagentValue: '',

@ -6,7 +6,7 @@
<el-button @click="$router.push('/reagent/report/index')"></el-button>
<el-select v-model="client_id" clearable placeholder="请选择柜体">
<el-option
v-for="item in clientOptions"
v-for="item in $store.getters.clientOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
@ -54,8 +54,8 @@
<el-table-column align="center" property="sum_tp3" label="归还次数" />
<el-table-column align="center" property="client_id" label="所属终端">
<template slot-scope="scope">
<div v-if="clientOptions.find(item => item.client_id === scope.row.client_id)">
{{ clientOptions.find(item => item.client_id === scope.row.client_id).client_name }}
<div v-if="$store.getters.clientOptions.find(item => item.client_id === scope.row.client_id)">
{{ $store.getters.clientOptions.find(item => item.client_id === scope.row.client_id).client_name }}
</div>
<div v-else>
{{ scope.row.client_id }}
@ -79,11 +79,9 @@
<script>
import { use_frequency } from '@/api/reagent/report'
import stringify from '@/utils/stringify'
import { getClients } from '@/views/reagent/mixin/getClients'
export default {
name: 'Usefrequency',
mixins: [getClients],
data() {
return {
selectReagentValue: '',
@ -128,7 +126,9 @@ export default {
})).then(res => {
this.reagentData = res.data.data
this.total = res.data.total_count
}).finally(() => { this.loadingReagent = false })
}).finally(() => {
this.loadingReagent = false
})
}
}
}
@ -140,21 +140,25 @@ export default {
background: white;
//min-height: calc(100vh - 110px);
padding: 1rem;
.title {
font-size: 1.25rem;
font-weight: bold;
color: #000000;
margin-bottom: 1rem;
}
.header {
display: flex;
justify-content: space-between;
margin-bottom: 1rem;
.header-left {
.el-select {
width: 12.5rem;
margin-left: 1rem;
}
.el-input {
width: 12.5rem;
margin-right: 1rem;

@ -6,7 +6,7 @@
<!-- <el-button>返回上一级</el-button>-->
<el-select v-model="client_id" clearable placeholder="请选择柜体" @change="getTmpList">
<el-option
v-for="item in clientOptions"
v-for="item in $store.getters.clientOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
@ -151,7 +151,7 @@
<el-input v-model="reagentAddTmpName" placeholder="请输入模板名称" />
<el-select v-model="reagentAddClient" placeholder="请选择柜体">
<el-option
v-for="item in clientOptions"
v-for="item in $store.getters.clientOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
@ -206,7 +206,7 @@
<div>
<el-select v-model="client_id_input" placeholder="请选择柜体">
<el-option
v-for="item in clientOptions"
v-for="item in $store.getters.clientOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
@ -248,12 +248,10 @@ import ReagentForm from '@/components/ReagentForm/index'
import Scanner from '@/components/Scannner/index'
import { show_tmp, select_drug, bind_tmp_enter_warehouse, add_tmp, del_tmp } from '@/api/reagent/warehousing'
import stringify from '@/utils/stringify'
import { getClients } from '@/views/reagent/mixin/getClients'
import { throttle } from '@/utils'
export default {
name: 'Warehousing',
components: { ReagentForm, Scanner },
mixins: [getClients],
data() {
return {
dialogTableVisible: false,
@ -329,11 +327,11 @@ export default {
}
})
}
}
},
clientOptions: function(newVal, oldVal) {
this.client_id = newVal[0].client_id
created() {
this.client_id = this.$store.getters.clientOptions[0].client_id
this.getTmpList()
}
},
methods: {
handleCloseToDB() {

@ -83,17 +83,10 @@ export default {
// `barCode`
//
barCode: function(newCode, oldCode) {
if (this.$route.name === 'Receiving') {
get_drug_info(stringify({ 'bar_code': newCode })).then(res => {
this.infoData = res.data
this.$message.success(res.data.name + ' 试剂领扫描成功!')
})
} else {
this.dialogVisible = true
// drug_return(stringify({ 'bar_code': newCode, 'place': '' })).then(res => {
// this.tableData.push(res.data)
// })
}
}
},
methods: {

@ -2,7 +2,7 @@
<div>
<div class="home-top">
<div class="home-top-left"> <img src="@/assets/2-主界面/logo.png" alt=""> </div>
<div class="home-top-mid"><img src="@/assets/rms/主界面-黑-80px.png" alt=""></div>
<div class="home-top-mid"><img src="@/assets/rms/mianoverview.png" alt=""></div>
<div class="home-top-right"><img class="home-top-right-img" src="@/assets/2-主界面/关闭.png" alt=""></div>
</div>
<div class="content-container-text">

Loading…
Cancel
Save