|
@@ -21,7 +21,7 @@
|
|
|
|
|
|
<el-main>
|
|
|
<div class = "filter-container">
|
|
|
- <el-input v-model="input" placeholder="字段名称" style="width: 30%" size="small" clearable/>
|
|
|
+ <el-input v-model="input" placeholder="基础字段名称" style="width: 30%" size="small" clearable/>
|
|
|
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px" @click="filterTable">查询</el-button>
|
|
|
</div>
|
|
|
<el-divider></el-divider>
|
|
@@ -88,81 +88,11 @@
|
|
|
:page-sizes="[5,10,15]"
|
|
|
|
|
|
layout="total,jumper,prev, pager, next,sizes"
|
|
|
- :total=baseTotal >
|
|
|
+ :total=showBaseTotal >
|
|
|
</el-pagination>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="衍生字段" name="second">
|
|
|
- <el-table :data="fieldDeriveShow" style="width: 100%;" stripe>
|
|
|
- <el-table-column align="center" label="编号" >
|
|
|
- <template v-slot="{row}">
|
|
|
- <span>{{ row.fieldNo}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
-
|
|
|
- <el-table-column align="center" label="字段名称(中文)">
|
|
|
- <template v-slot="{row}">
|
|
|
- <span>{{ row.nameZh}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column align="center" label="字段名称(英文)" >
|
|
|
- <template v-slot="{row}">
|
|
|
- <span>{{ row.name}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column align="center" label="提取逻辑" >
|
|
|
- <template v-slot="{row}">
|
|
|
- <span>{{ row.fetchLogic}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column align="center" label="类型" >
|
|
|
- <template v-slot="{row}">
|
|
|
- <span>{{ row.type}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column align="center" label="字段状态" >
|
|
|
- <template v-slot="{row}">
|
|
|
- <span>{{ row.status}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column align="center" label="创建者" >
|
|
|
- <template v-slot="{row}">
|
|
|
- <span>{{ row.createBy}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
|
|
|
- <el-table-column align="center" label="创建时间">
|
|
|
- <template v-slot="{row}">
|
|
|
- <span>{{ row.createTime}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column align="center" label="操作" >
|
|
|
- <template v-slot="{row}">
|
|
|
- <el-button size="mini" type="primary" @click="edit(row)">编辑</el-button>
|
|
|
- <el-button size="mini" type="danger" @click="delete(row.id)">删除</el-button>
|
|
|
-
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- </el-table>
|
|
|
- <el-pagination background
|
|
|
- @size-change="handleSizeChange2"
|
|
|
- @current-change="handleCurrentChange2"
|
|
|
- :current-page="currentPage2"
|
|
|
- :page-sizes="[5,10,15]"
|
|
|
-
|
|
|
- :page-size="pagesize2"
|
|
|
- layout="total,jumper,prev, pager, next,sizes"
|
|
|
- :total=deriveTotal >
|
|
|
- </el-pagination>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
|
|
@@ -179,7 +109,7 @@
|
|
|
|
|
|
import {
|
|
|
getList,
|
|
|
- userInfo, partnerList, fieldDel, fieldTemplateList
|
|
|
+ userInfo, partnerList, fieldDel, fieldTemplateList, selectFieldListBase
|
|
|
} from '@/api/index.js'
|
|
|
import store from "@/store";
|
|
|
import request from '@/utils/request.js'
|
|
@@ -206,13 +136,11 @@ export default {
|
|
|
pagesize3:5,
|
|
|
fieldList : [],
|
|
|
fieldBase:[],
|
|
|
+ selectFieldBase:[],
|
|
|
+
|
|
|
fieldBaseShow:[],
|
|
|
- fieldDerive:[],
|
|
|
baseTotal:'',
|
|
|
- deriveTotal:'',
|
|
|
-
|
|
|
- fieldDeriveShow:[],
|
|
|
-
|
|
|
+ showBaseTotal:'',
|
|
|
fieldExtra:[],
|
|
|
selected3: false,
|
|
|
selected4: true,
|
|
@@ -231,7 +159,6 @@ export default {
|
|
|
mounted()
|
|
|
{
|
|
|
//待修改
|
|
|
-
|
|
|
fieldListBase(this.currentPage1,this.pagesize1).then(
|
|
|
res=>
|
|
|
{
|
|
@@ -239,6 +166,7 @@ export default {
|
|
|
this.fieldBaseShow = this.fieldBase
|
|
|
var j = parseInt(res.data.fieldListBase.total)
|
|
|
this.baseTotal = j
|
|
|
+ this.showBaseTotal = this.baseTotal
|
|
|
console.log(this.fieldBase)
|
|
|
}
|
|
|
)
|
|
@@ -355,28 +283,44 @@ export default {
|
|
|
|
|
|
handleCurrentChange1:function(currentPage){
|
|
|
this.currentPage1=currentPage;
|
|
|
-
|
|
|
+ if(!this.input){
|
|
|
fieldListBase(this.currentPage1,this.pagesize1).then(
|
|
|
res=>
|
|
|
{
|
|
|
this.fieldBase=res.data.fieldListBase.list;
|
|
|
this.fieldBaseShow = this.fieldBase
|
|
|
|
|
|
- console.log(this.fieldBase)
|
|
|
}
|
|
|
- )
|
|
|
+ )}
|
|
|
+ else {
|
|
|
+ selectFieldListBase(this.currentPage1,this.pagesize1,this.input).then(
|
|
|
+ res=>
|
|
|
+ {
|
|
|
+ this.selectFieldBase=res.data.selectFieldListBase.list;
|
|
|
+ this.fieldBaseShow = this.selectFieldBase
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
},
|
|
|
handleSizeChange1:function(size){
|
|
|
this.pagesize1=size;
|
|
|
- fieldListBase(this.currentPage1,this.pagesize1).then(
|
|
|
- res=>
|
|
|
- {
|
|
|
- this.fieldBase=res.data.fieldListBase.list;
|
|
|
- this.fieldBaseShow = this.fieldBase
|
|
|
-
|
|
|
- console.log(this.fieldBase)
|
|
|
- }
|
|
|
- )
|
|
|
+ if(!this.input){
|
|
|
+ fieldListBase(this.currentPage1,this.pagesize1).then(
|
|
|
+ res=>
|
|
|
+ {
|
|
|
+ this.fieldBase=res.data.fieldListBase.list;
|
|
|
+ this.fieldBaseShow = this.fieldBase
|
|
|
+ }
|
|
|
+ )}
|
|
|
+ else {
|
|
|
+ selectFieldListBase(this.currentPage1,this.pagesize1,this.input).then(
|
|
|
+ res=>
|
|
|
+ {
|
|
|
+ this.selectFieldBase=res.data.selectFieldListBase.list;
|
|
|
+ this.fieldBaseShow = this.selectFieldBase
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
},
|
|
|
handleCurrentChange2:function(currentPage){
|
|
|
this.currentPage2=currentPage;
|
|
@@ -432,15 +376,26 @@ export default {
|
|
|
filterTable(){
|
|
|
if (this.input.trim() === '') {
|
|
|
// 如果输入框为空,显示所有数据
|
|
|
- this.fieldBaseShow = this.fieldBase;
|
|
|
+ fieldListBase(this.currentPage1,this.pagesize1).then(
|
|
|
+ res=>
|
|
|
+ {
|
|
|
+ this.fieldBase=res.data.fieldListBase.list;
|
|
|
+ this.fieldBaseShow = this.fieldBase
|
|
|
+ }
|
|
|
+ )
|
|
|
+ this.showBaseTotal = this.baseTotal;
|
|
|
} else {
|
|
|
// 否则,只显示与输入文本匹配的数据
|
|
|
- this.fieldBaseShow = this.fieldBase.filter(item =>
|
|
|
- {
|
|
|
- const values = Object.values(item);
|
|
|
- const str = values.join(' ').toLowerCase();
|
|
|
- return str.includes(this.input.toLowerCase());
|
|
|
- });
|
|
|
+ selectFieldListBase(this.currentPage1,this.pagesize1,this.input).then(
|
|
|
+ res=>
|
|
|
+ {
|
|
|
+ this.selectFieldBase=res.data.selectFieldListBase.list;
|
|
|
+ this.fieldBaseShow = this.selectFieldBase
|
|
|
+ var j = parseInt(res.data.selectFieldListBase.total)
|
|
|
+ this.showBaseTotal = j
|
|
|
+ console.log(this.selectFieldBase)
|
|
|
+ }
|
|
|
+ )
|
|
|
}
|
|
|
},
|
|
|
|