From 9b0cd3594bfa7d8986d7beee49bdd873ea41d2cd Mon Sep 17 00:00:00 2001
From: yuyu <1981343953@qq.com>
Date: 星期四, 24 八月 2023 13:55:20 +0800
Subject: [PATCH] modified: src/views/inspectionManagement/commissionInspection/index.vue
---
src/views/laboratory/personnel/index.vue | 151 +++++++++++++++++--------------------------------
1 files changed, 53 insertions(+), 98 deletions(-)
diff --git a/src/views/laboratory/personnel/index.vue b/src/views/laboratory/personnel/index.vue
index 3312928..26998b3 100644
--- a/src/views/laboratory/personnel/index.vue
+++ b/src/views/laboratory/personnel/index.vue
@@ -2,17 +2,14 @@
<div class="personnel-main ">
<div class="page-header-search">
<div class="search-bar">
- <el-form ref="form" inline="true" :model="searchData">
+ <el-form ref="form" :inline="true">
<el-form-item>
- <el-input
- v-model="keyword"
- placeholder="璇疯緭鍏ヤ汉鍛樺悕绉�"
- >
+ <el-input v-model="keyword" placeholder="璇疯緭鍏ヤ汉鍛樺悕绉�">
<i slot="prefix" class="el-input__icon el-icon-search" />
</el-input>
</el-form-item>
<el-form-item>
- <el-button type="primary" @click="searchData()">鏌ヨ</el-button>
+ <el-button type="primary" @click="getData()">鏌ヨ</el-button>
<el-button type="primary" plain @click="resetData()">閲嶇疆</el-button>
<!-- <el-button type="text">楂樼骇鎼滅储<i class="el-icon-arrow-down el-icon--right" /></el-button> -->
</el-form-item>
@@ -52,64 +49,24 @@
</div>
<div class="content-main">
<div class="personner-table">
- <el-table
- ref="personnerlTable"
- :height="700"
- :max-height="700"
- :cell-style="{textAlign: 'center'}"
- :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
- :data="personnerlTable"
- style="width: 100%"
- >
- <el-table-column
- prop="username"
- label="瑙掕壊鍚嶇О"
- min-width="120"
- />
- <el-table-column
- prop="roleName"
- label="瑙掕壊鏉冮檺"
- min-width="120"
- />
- <el-table-column
- prop="age"
- label="骞撮緞"
- min-width="150"
- />
- <el-table-column
- prop="createTime"
- label="鍒涘缓鏃堕棿"
- min-width="180"
- />
- <el-table-column
- prop="phone"
- label="鐢佃瘽"
- min-width="200"
- />
- <el-table-column
- prop="email"
- label="閭"
- min-width="200"
- />
- <el-table-column
- prop="jobState"
- label="鍦ㄨ亴鐘舵��"
- min-width="120"
- :filters="[{ text: 0, value: 0 }, { text: 1, value: 1 }]"
- :filter-method="filterTag"
- filter-placement="bottom-end"
- >
+ <el-table ref="personnerlTable" :max-height="700" :cell-style="{ textAlign: 'center' }"
+ :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }"
+ :data="personnerlTable" style="width: 100%">
+ <el-table-column prop="username" label="瑙掕壊鍚嶇О" min-width="120" />
+ <el-table-column prop="roleName" label="瑙掕壊鏉冮檺" min-width="120" />
+ <el-table-column prop="age" label="骞撮緞" min-width="150" />
+ <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" min-width="180" />
+ <el-table-column prop="phone" label="鐢佃瘽" min-width="200" />
+ <el-table-column prop="email" label="閭" min-width="200" />
+ <el-table-column prop="jobState" label="鍦ㄨ亴鐘舵��" min-width="120"
+ :filters="[{ text: 0, value: 0 }, { text: 1, value: 1 }]" :filter-method="filterTag"
+ filter-placement="bottom-end">
<template slot-scope="scope">
- <el-tag
- :type="scope.row.businessStatus === 0 ? 'primary' : 'success'"
- disable-transitions
- >{{ scope.row.businessStatus === 0 ? '鏈悓鎰�' : '宸插悓鎰�' }}</el-tag>
+ <el-tag :type="scope.row.jobState === 0 ? 'danger' : 'success'" disable-transitions>{{
+ scope.row.jobState === 0 ? '绂诲矖' : '鍦ㄨ亴' }}</el-tag>
</template>
</el-table-column>
- <el-table-column
- label="鎿嶄綔"
- min-width="120"
- >
+ <el-table-column label="鎿嶄綔" min-width="120">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleClick(scope.row)">缂栬緫</el-button>
<!-- <el-button type="text" size="small">缂栬緫</el-button> -->
@@ -118,15 +75,9 @@
</el-table>
<div>
<!-- 鍒嗛〉鍣� -->
- <el-pagination
- :current-page="currentPage"
- :page-sizes="[100, 200, 300, 400]"
- :page-size="pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="this.personnerlTable.length"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- />
+ <el-pagination :current-page="currentPage" :page-sizes="[100, 200, 300, 400]" :page-size="pageSize"
+ layout="total, sizes, prev, pager, next, jumper" :total="this.personnerlTable.length"
+ @size-change="handleSizeChange" @current-change="handleCurrentChange" />
</div>
</div>
</div>
@@ -134,8 +85,8 @@
</template>
<script>
-import axios from 'axios'
-axios.defaults.baseURL = 'http://192.168.110.167:1234'
+import { get, post } from '@/api/util/requestUtil';
+import urlInfo from '../../../api/urlEnum/personnel.js'
export default {
data() {
return {
@@ -146,7 +97,7 @@
filteredpersonnerlTable: [],
currentindex: 1,
currentPage: 1, // 褰撳墠椤电爜
- total: 20, // 鎬绘潯鏁�
+ total: 0, // 鎬绘潯鏁�
pageSize: 100, // 姣忛〉鐨勬暟鎹潯鏁�
personData: [], // 鐢ㄦ潵瀛樻斁鎺ュ彛浼犺繃鏉ョ殑浜哄憳鍒楄〃鏁版嵁
dialogFormVisible: false,
@@ -193,24 +144,23 @@
this.currentPage = 1
this.pageSize = val
},
+ filterTag() {
+ console.log(11);
+ },
// 褰撳墠椤垫敼鍙樻椂瑙﹀彂 璺宠浆鍏朵粬椤�
handleCurrentChange(val) {
console.log(`褰撳墠椤�: ${val}`)
this.currentPage = val
},
- getData() {
- axios.get('/user/list_new_personnel', {
- params: {
- pageNo: 0,
- pageSize: 20
- }
- }).then(res => {
- // console.log(res)
- this.personData = res.data.data.row
- this.personnerlTable = this.personData
- }).catch(res => {
- console.log('error')
- })
+ async getData() {
+ let data = {
+ pageNo: 0,
+ pageSize: 20,
+ name: this.keyword
+ }
+ let res = await get(urlInfo.url.list_new_personnel, data);
+ this.personnerlTable=res.data.row
+ this.total=res.data.total
},
searchData() {
this.filteredpersonnerlTable = this.personnerlTable.filter((item) => {
@@ -245,36 +195,41 @@
return false
}
})
- }
+ },
}
}
</script>
<style lang="scss" scoped>
-.personnel-main{
+.personnel-main {
+
// width: 100%;
// height: 100%;
- .page-header-search{
+ .page-header-search {
background: #fff;
display: flex;
justify-content: space-between;
padding: 0 24px 12px 24px;
- .search-bar{
- .el-form{
- .el-form-item{
- margin-bottom: 0px !important;
- .el-input{
- width: 360px;
- }
+
+ .search-bar {
+ .el-form {
+ .el-form-item {
+ margin-bottom: 0px !important;
+
+ .el-input {
+ width: 360px;
+ }
}
}
}
}
- .personner-table{
+
+ .personner-table {
background: #fff;
padding: 20px 20px 10px 20px;
- >div:nth-child(2){
+
+ >div:nth-child(2) {
display: flex;
justify-content: end;
margin: 10px 0;
--
Gitblit v1.9.3