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
|
||||
})
|
||||
}
|
After Width: | Height: | Size: 983 B |
After Width: | Height: | Size: 739 B |
After Width: | Height: | Size: 648 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 906 B |
After Width: | Height: | Size: 489 B |
@ -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>
|
Loading…
Reference in new issue