feat(src/views/reagent/client): 新增柜体管理模块

duizhaopin_ui
duan 2 years ago
parent ef69974a7c
commit 4e004fc38e

@ -0,0 +1,10 @@
import request from '@/utils/request'
// /api/client/get_list
export function get_list(data) {
return request({
url: '/api/client/get_list',
method: 'post',
data
})
}

@ -0,0 +1,15 @@
<svg id="仪器数据" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<defs>
<style>
.cls-1 {
fill: none;
}
.cls-2 {
fill: #409eff;
}
</style>
</defs>
<path id="路径_363" data-name="路径 363" class="cls-1" d="M0,0H20V20H0Z"/>
<path id="路径_364" data-name="路径 364" class="cls-2" d="M11.5,2.1,14.2,6.793a.833.833,0,0,1-.3,1.137l-1.083.625L13.651,10l-1.443.833-.833-1.444-1.083.626a.834.834,0,0,1-1.138-.3L7.622,7.057a4.173,4.173,0,0,0-2.685,5.468,4.168,4.168,0,0,1,5.63,1.111l6.407-3.7.833,1.443L11.242,15.17a4.2,4.2,0,0,1,.092.874,4.157,4.157,0,0,1-.083.833H18v1.667H3.833a4.17,4.17,0,0,1-.158-4.776,5.836,5.836,0,0,1,3.1-8.183l-.328-.568a1.666,1.666,0,0,1,.61-2.277L9.22,1.491A1.666,1.666,0,0,1,11.5,2.1ZM7.167,13.545a2.5,2.5,0,0,0-2.358,3.333H9.525a2.5,2.5,0,0,0-2.358-3.333Zm2.887-10.61L7.888,4.185,10.18,8.154,12.345,6.9,10.053,2.935Z" transform="translate(-0.5 -0.211)"/>
</svg>

After

Width:  |  Height:  |  Size: 983 B

@ -0,0 +1,15 @@
<svg id="分配禁用用户" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<defs>
<style>
.cls-1 {
fill: none;
}
.cls-2 {
fill: #909399;
}
</style>
</defs>
<path id="路径_216" data-name="路径 216" class="cls-1" d="M0,0H16V16H0Z"/>
<path id="路径_217" data-name="路径 217" class="cls-2" d="M10.667,9.835v1.393A4,4,0,0,0,5.333,15H4a5.333,5.333,0,0,1,6.667-5.165ZM9.333,9a4,4,0,1,1,4-4A4,4,0,0,1,9.333,9Zm0-1.333A2.667,2.667,0,1,0,6.667,5,2.666,2.666,0,0,0,9.333,7.667ZM14,12.057l1.414-1.415.943.943L14.943,13l1.415,1.414-.943.943L14,13.943l-1.414,1.415-.943-.943L13.057,13l-1.415-1.414.943-.943Z" transform="translate(-1.333 -0.333)"/>
</svg>

After

Width:  |  Height:  |  Size: 739 B

@ -0,0 +1,15 @@
<svg id="柜体管理" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<defs>
<style>
.cls-1 {
fill: none;
}
.cls-2 {
fill: #409eff;
}
</style>
</defs>
<path id="路径_361" data-name="路径 361" class="cls-1" d="M0,0H20V20H0Z"/>
<path id="路径_362" data-name="路径 362" class="cls-2" d="M16.5,1a.834.834,0,0,1,.833.833V18.5a.834.834,0,0,1-.833.833H4.833A.834.834,0,0,1,4,18.5V1.833A.834.834,0,0,1,4.833,1Zm-.833,9.167h-10v7.5h10ZM9,11.833v3.333H7.333V11.833Zm6.667-9.167h-10V8.5h10ZM9,4.333v2.5H7.333v-2.5Z" transform="translate(-0.667 -0.167)"/>
</svg>

After

Width:  |  Height:  |  Size: 648 B

@ -0,0 +1,15 @@
<svg id="用户信息" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<defs>
<style>
.cls-1 {
fill: none;
}
.cls-2 {
fill: #409eff;
}
</style>
</defs>
<path id="路径_372" data-name="路径 372" class="cls-1" d="M0,0H20V20H0Z"/>
<path id="路径_373" data-name="路径 373" class="cls-2" d="M10.333,9.5A4.167,4.167,0,0,1,14.5,13.667v5H12.833v-5a2.5,2.5,0,0,0-2.353-2.5l-.147,0a2.5,2.5,0,0,0-2.5,2.353l0,.147v5H6.167v-5A4.167,4.167,0,0,1,10.333,9.5ZM4.917,12a2.951,2.951,0,0,1,.675.078,4.956,4.956,0,0,0-.251,1.312l-.007.276v.072a1.243,1.243,0,0,0-.3-.067l-.12-.005A1.25,1.25,0,0,0,3.673,14.8l-.006.12v3.75H2v-3.75A2.917,2.917,0,0,1,4.917,12ZM15.75,12a2.917,2.917,0,0,1,2.917,2.917v3.75H17v-3.75a1.25,1.25,0,0,0-1.13-1.244l-.12-.006a1.257,1.257,0,0,0-.417.071v-.071a4.97,4.97,0,0,0-.257-1.587A2.85,2.85,0,0,1,15.75,12ZM4.917,7A2.083,2.083,0,1,1,2.833,9.083,2.083,2.083,0,0,1,4.917,7ZM15.75,7a2.083,2.083,0,1,1-2.083,2.083A2.083,2.083,0,0,1,15.75,7ZM4.917,8.667a.417.417,0,1,0,.417.417A.417.417,0,0,0,4.917,8.667Zm10.833,0a.417.417,0,1,0,.417.417A.417.417,0,0,0,15.75,8.667ZM10.333,2A3.333,3.333,0,1,1,7,5.333,3.333,3.333,0,0,1,10.333,2Zm0,1.667A1.667,1.667,0,1,0,12,5.333,1.667,1.667,0,0,0,10.333,3.667Z" transform="translate(-0.333 -0.333)"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,15 @@
<svg id="角色信息" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<defs>
<style>
.cls-1 {
fill: none;
}
.cls-2 {
fill: #409eff;
}
</style>
</defs>
<path id="路径_374" data-name="路径 374" class="cls-1" d="M0,0H20V20H0Z"/>
<path id="路径_375" data-name="路径 375" class="cls-2" d="M12.167,18,10.5,19.667,8.833,18H4.662A1.663,1.663,0,0,1,3,16.337V4.662A1.662,1.662,0,0,1,4.662,3H16.338A1.662,1.662,0,0,1,18,4.662V16.338A1.663,1.663,0,0,1,16.338,18Zm4.167-1.667V4.667H4.667V16.333H9.523l.977.977.977-.977Zm-9.19-.683a8.319,8.319,0,0,1-1.459-.815,5.835,5.835,0,0,1,9.716-.129,8.329,8.329,0,0,1-1.437.854,4.168,4.168,0,0,0-6.82.09ZM10.5,11.333a2.917,2.917,0,1,1,2.917-2.917A2.917,2.917,0,0,1,10.5,11.333Zm0-1.667a1.25,1.25,0,1,0-1.25-1.25A1.25,1.25,0,0,0,10.5,9.667Z" transform="translate(-0.5 -0.5)"/>
</svg>

After

Width:  |  Height:  |  Size: 906 B

@ -0,0 +1,15 @@
<svg id="返回主界面" xmlns="http://www.w3.org/2000/svg" width="24" height="25" viewBox="0 0 24 25">
<defs>
<style>
.cls-1 {
fill: none;
}
.cls-2 {
fill: #c0c4cc;
}
</style>
</defs>
<path id="路径_238" data-name="路径 238" class="cls-1" d="M0,0H24V25H0Z"/>
<path id="路径_239" data-name="路径 239" class="cls-2" d="M10.828,12.5l4.95,5.339-1.414,1.525L8,12.5l6.364-6.864,1.414,1.525Z" transform="translate(0 0)"/>
</svg>

After

Width:  |  Height:  |  Size: 489 B

@ -187,6 +187,19 @@ const reagentRouter = [
}
]
},
{
path: '/reagent/client',
component: Layout,
meta: { classification: 'reagent' },
children: [
{
path: 'index',
name: 'Client',
component: () => import('@/views/reagent/client/index'),
meta: { title: '柜体管理', icon: '柜体管理', classification: 'reagent' }
}
]
},
{
path: '/reagent/buy',
component: Layout,

@ -18,7 +18,7 @@ const userRouter = [
path: 'index',
component: () => import('@/views/user/index'),
name: 'UserInfo',
meta: { title: '用户信息', icon: 'lock', classification: 'user' }
meta: { title: '用户信息', icon: '用户信息', classification: 'user' }
}
]
},
@ -31,7 +31,7 @@ const userRouter = [
path: 'index',
component: () => import('@/views/user/role/index'),
name: 'Role',
meta: { title: '角色信息', icon: 'lock', classification: 'user' }
meta: { title: '角色信息', icon: '角色信息', classification: 'user' }
}
]
},

@ -0,0 +1,169 @@
<template>
<div class="main-container-text">
<div class="title">柜体管理</div>
<div class="header">
<el-input v-model="name" placeholder="请输入试剂名称" />
<el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
<el-button type="primary" plain icon="el-icon-plus">新增自定义柜体</el-button>
<el-button icon="el-icon-unlock">柜体锁定/解锁</el-button>
<el-button><svg-icon icon-class="" /> 分配抽屉权限</el-button>
<el-button><svg-icon icon-class="" /> 分配禁用用户</el-button>
<el-button type="danger" plain icon="el-icon-close">清空数据</el-button>
</div>
<el-table
v-loading="loading"
:data="tableData"
element-loading-text="拼命加载中"
:header-cell-style="headerStyle"
height="71vh"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
align="center"
/>
<el-table-column
type="index"
width="50"
/>
<el-table-column
prop="client_name"
show-overflow-tooltip
label="柜体名称"
align="center"
/>
<el-table-column
prop="client_title"
show-overflow-tooltip
label="柜体标题"
align="center"
/>
<el-table-column
prop="place"
label="所处位置"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="contact_people_name"
label="联系人"
align="center"
/>
<el-table-column
prop="contact_phone"
label="联系电话"
align="center"
/>
<el-table-column
prop="is_enabled"
label="状态"
align="center"
>
<template slot-scope="scope">
<el-tag
:type="scope.row.is_enabled=== 0 ? 'danger' : 'success'"
disable-transitions
>{{ scope.row.is_enabled === 0 ?'异常':'正常' }}</el-tag>
</template>
</el-table-column>
<el-table-column
prop="description"
label="说明"
align="center"
/>
</el-table>
<div style="text-align: center">
<el-pagination
background
layout="prev, pager, next"
:current-page.sync="page"
:total="total"
:page-size.sync="page_size"
hide-on-single-page
:disabled="loading"
@current-change="pageChange"
/>
</div>
</div>
</template>
<script>
import stringify from '@/utils/stringify'
import { get_list } from '@/api/reagent/client'
export default {
name: 'Client',
data() {
return {
page: 1,
page_size: 15,
total: 0,
name: '',
loading: false,
multipleSelection: [],
tableData: [],
headerStyle: { 'background': '#E6E6E6' }
}
},
created() {
this.getList()
},
methods: {
//
handleSelectionChange(val) {
this.multipleSelection = val
},
pageChange(page) {
},
getList() {
this.loading = true
const data = {
page: this.page,
page_size: this.page_size,
seach_word: this.name
}
get_list(stringify(data)).then(res => {
this.tableData = res.data.data_list
this.total = res.data.total_count
}).finally(() => { this.loading = false })
}
}
}
</script>
<style lang="scss" scoped>
.main-container-text{
min-height:calc(100vh - 110px) ;
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;
}
}
}
.user-header {
margin-bottom: 1rem;
.el-input{
width: 150px;
margin-right: 1rem;
}
}
</style>

@ -15,7 +15,7 @@
<el-button type="primary" @click="handleReagentToDatabase"></el-button>
<el-button type="primary" @click="handleBindToDB"></el-button>
<el-button type="primary" plain @click="handleAddTmp('add')">+ </el-button>
<el-button @click="handleAddTmp('modify')"><i class="el-icon-edit" />试剂模板</el-button>
<el-button @click="handleAddTmp('modify')"><i class="el-icon-edit" />编辑试剂模板</el-button>
<el-button><i class="el-icon-printer" /> 打印模板条码</el-button>
<el-button><i class="el-icon-folder-add" /> 导入入库模板</el-button>
<div class="right">

Loading…
Cancel
Save