update
This commit is contained in:
parent
813bc0d2e4
commit
28f9b06b3d
Binary file not shown.
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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: {
|
||||
|
||||
insertRankInfo(){
|
||||
|
||||
|
||||
},
|
||||
|
||||
getAllRankInfo(){
|
||||
this.$api.getAllRankInfo().then((res)=>{
|
||||
if (res.status === 0) {
|
||||
this.rankList = res.data
|
||||
}else {
|
||||
Message.warning("服务错误")
|
||||
}
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
console.log('submit!');
|
||||
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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue