|
@@ -11,6 +11,14 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</crumbs>
|
|
|
+ <div class="tab">
|
|
|
+ <span v-for="it in typeList"
|
|
|
+ :key="it.key"
|
|
|
+ :class="{'curr':it.key==filter.type}"
|
|
|
+ @click="toggTab(it)">
|
|
|
+ {{it.name}}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
<div class="contents">
|
|
|
<el-table
|
|
|
:data="list"
|
|
@@ -89,14 +97,19 @@ export default {
|
|
|
list: [],
|
|
|
searched: false,
|
|
|
filter:{
|
|
|
- conceptName:''
|
|
|
+ conceptName:'',
|
|
|
+ type:''
|
|
|
},
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
|
total: 0,
|
|
|
+ typeList:[]
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ let typeList = JSON.parse(localStorage.getItem("knowledgeEnumsData"));
|
|
|
+ this.typeList = typeList.relationModelTypeEnum;
|
|
|
+ this.filter.type = this.typeList[0].key;//默认展示科室,请置于第一位
|
|
|
const that = this;
|
|
|
//返回时避免参数未赋值就获取列表
|
|
|
setTimeout(function(){
|
|
@@ -118,6 +131,11 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ toggTab(item){
|
|
|
+ this.filter.type = item.key;
|
|
|
+ this.currentPage = 1;
|
|
|
+ this.getDataList();
|
|
|
+ },
|
|
|
getDataList(isTurnPage) {
|
|
|
const param = this.getFilterItems(isTurnPage);
|
|
|
this.searched = true;
|
|
@@ -136,7 +154,7 @@ export default {
|
|
|
const pam = this.searched ? {
|
|
|
currentPage: this.currentPage,
|
|
|
filter: this.filter
|
|
|
- } : {currentPage: this.currentPage};
|
|
|
+ } : {currentPage: this.currentPage,filter:Object.assign(this.filter,{conceptName:''})};
|
|
|
this.$router.push({name:'AddConceptRelation',params:pam})
|
|
|
},
|
|
|
modifyRelation(row) {
|
|
@@ -147,7 +165,7 @@ export default {
|
|
|
const pam = this.searched ? {
|
|
|
currentPage: this.currentPage,
|
|
|
filter: this.filter
|
|
|
- } : {currentPage: this.currentPage};
|
|
|
+ } : {currentPage: this.currentPage,filter:Object.assign(this.filter,{conceptName:''})};
|
|
|
api.getConceptRelationDet(param).then((res) => {
|
|
|
if(res.data.code=='0'){
|
|
|
const { data } = res.data;
|
|
@@ -174,7 +192,9 @@ export default {
|
|
|
const param = {
|
|
|
current: this.currentPage,
|
|
|
size: this.pageSize,
|
|
|
- name:this.filter.conceptName
|
|
|
+ name:this.filter.conceptName,
|
|
|
+ relationId:17,
|
|
|
+ relationModelTypeCode:this.filter.type
|
|
|
};
|
|
|
return param;
|
|
|
},
|
|
@@ -235,6 +255,34 @@ export default {
|
|
|
|
|
|
<style lang="less">
|
|
|
@import "../../less/admin.less";
|
|
|
+ .tab{
|
|
|
+ background:#fff;
|
|
|
+ padding: 5px 0;
|
|
|
+ position: relative;
|
|
|
+ top:40px;
|
|
|
+ span{
|
|
|
+ display: inline-block;
|
|
|
+ // width:145px;
|
|
|
+ padding: 0 20px;
|
|
|
+ height: 45px;
|
|
|
+ line-height: 45px;
|
|
|
+ text-align: center;
|
|
|
+ // border: 1px solid #ccc;
|
|
|
+ margin-right: 5px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .curr{
|
|
|
+ color: #48C5D7;
|
|
|
+ &:after{
|
|
|
+ content: '';
|
|
|
+ width:50px;
|
|
|
+ height: 2px;
|
|
|
+ background:#48C5D7;
|
|
|
+ display: block;
|
|
|
+ margin: 0 auto;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
.delete{
|
|
|
color: red;
|
|
|
}
|