This commit is contained in:
p71924506 2023-03-15 15:51:55 +08:00
parent 813bc0d2e4
commit 28f9b06b3d
5 changed files with 216 additions and 9 deletions

BIN
dist (2).zip Normal file

Binary file not shown.

BIN
dist.zip

Binary file not shown.

View File

@ -159,8 +159,58 @@ export const getAllPlatformData = () =>{
method: 'post'
})
}
export const getAllExpertInfo = () =>{
return axios({
headers:{
"Authorization": localStorage.getItem("systemToken")
},
url: '/expert/getAllExpertInfo',
method: 'post'
})
}
export const getExpertInfoByName = data =>{
return axios({
headers:{
"Authorization": localStorage.getItem("systemToken")
},
url: '/expert/getExpertInfoByName',
method: 'post',
data
})
}
export const getAllRankInfo = () =>{
return axios({
headers:{
"Authorization": localStorage.getItem("systemToken")
},
url: '/rank/getAllRankInfo',
method: 'post'
})
}
export const insertRankInfo = data =>{
return axios({
headers:{
"Authorization": localStorage.getItem("systemToken")
},
url: '/rank/insertRankInfo',
method: 'post',
data
})
}
export const insertExpertInfo = data =>{
return axios({
headers:{
"Authorization": localStorage.getItem("systemToken")
},
url: '/expert/insertExpertInfo',
method: 'post',
data
})
}
// 默认全部倒出
// 根据需要进行
@ -179,5 +229,10 @@ export default {
getAllUser,
getFileTypeById,
updatePassword,
getAllPlatformData
getAllPlatformData,
getAllExpertInfo,
getExpertInfoByName,
getAllRankInfo,
insertRankInfo,
insertExpertInfo
}

View File

@ -15,9 +15,11 @@
</el-col>
<el-col :span="12">
<el-form-item label="专家职称:" >
<el-select v-model="form.expertRank" placeholder="请选择职称" style="width: 300px">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
<el-select ref="optionRef" v-model="form.expertRankId" placeholder="请选择职称" style="width: 300px">
<el-option v-for="item in rankList"
:key="item.rankId"
:label="item.rankName"
:value="String(item.rankId)"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -64,6 +66,9 @@
</template>
<script>
import { Message } from 'element-ui'
import { insertExpertInfo } from '@/utils/http/interface'
export default {
name: 'AddExpert',
data(){
@ -71,19 +76,54 @@ export default {
form: {
expertId:'',
expertName:'',
expertRank:'',
expertRankId:'',
expertRankName:'',
expertUnit:'',
expertCardNum:'',
expertBankName:'',
expertIdCard:'',
expertStandard:'',
}
},
//
rankList:null
}
},
methods: {
onSubmit() {
console.log('submit!');
insertRankInfo(){
},
getAllRankInfo(){
this.$api.getAllRankInfo().then((res)=>{
if (res.status === 0) {
this.rankList = res.data
}else {
Message.warning("服务错误")
}
})
},
onSubmit() {
console.log(this.form);
console.log(this.$refs.optionRef.selected.label)
this.form.expertRankName = this.$refs.optionRef.selected.label
this.$api.insertExpertInfo(this.form).then((res)=>{
if (res.status === 0) {
Message.success("添加成功")
//
}else {
Message.warning("服务错误")
}
})
}
},
mounted() {
this.getAllRankInfo()
}
}
</script>

View File

@ -1,13 +1,125 @@
<template>
<div class="app-container">
<!--搜索框-->
<div class="manageList-header-input">
<!-- 输入框 双向绑定数据 自带清空 -->
<el-input v-model="searchInfo.keyWords" suffix-icon="el-icon-edit" clearable placeholder="请输入专家姓名">
<el-button slot="append" icon="el-icon-search" @click="nameSearch"></el-button>
</el-input>
</div>
<el-table
:data="tableData"
stripe
style="width: 100%">
<el-table-column
prop="expertId"
label="ID"
width="100">
</el-table-column>
<el-table-column
prop="expertName"
label="专家姓名"
width="100">
</el-table-column>
<el-table-column
prop="expertRankName"
label="专家职称"
width="130">
</el-table-column>
<el-table-column
prop="expertUnit"
label="专家单位">
</el-table-column>
<el-table-column
prop="expertCardNum"
label="银行卡号">
</el-table-column>
<el-table-column
prop="expertBankName"
label="开户行">
</el-table-column>
<el-table-column
prop="expertIdCard"
label="身份证">
</el-table-column>
<el-table-column
prop="expertStandard"
label="开支标准">
</el-table-column>
</el-table>
</div>
</template>
<script>
import { Message } from 'element-ui'
import { getExpertInfoByName } from '@/utils/http/interface'
export default {
name: 'expertForm'
name: 'expertForm',
data() {
return {
//
searchInfo:{
keyWords: "",
division: "",
type:'',
kind: "",
},
tableData: [
]
}
},
methods:{
nameSearch(){
if (this.searchInfo.keyWords != null && this.searchInfo.keyWords != '' && this.searchInfo.keyWords != undefined){
//have search content
let expertInfo = {
expertName : this.searchInfo.keyWords
}
this.$api.getExpertInfoByName(expertInfo).then((res)=>{
if (res.status == 0) {
this.tableData = res.data
}else {
Message.warning("服务错误")
}
})
}else {
// no content
this.getAllExpertInfo()
}
},
//
getAllExpertInfo(){
this.$api.getAllExpertInfo().then((res)=>{
if (res.status == 0) {
this.tableData = res.data
}
})
}
},
mounted() {
this.getAllExpertInfo()
}
}
</script>
<style scoped>
.manageList-header-input {
float: left;
margin-bottom: 20px;
}
.manageList-header-input .el-input {
width: 17rem;
}
.manageList-header-input .el-select {
width: 8rem;
}
</style>