|
|
@@ -6,12 +6,18 @@
|
|
|
<div class="menu-content">
|
|
|
<div>
|
|
|
<el-form :inline="true" :model="qo" class="demo-form-inline">
|
|
|
- <el-form-item label="Fid:">
|
|
|
- <el-input v-model="qo.LIKES_fid" placeholder="请输入Fid" clearable style="width: 300px"></el-input>
|
|
|
+ <el-form-item label="唯一标识:">
|
|
|
+ <el-input v-model="qo.LIKES_fid" placeholder="请输入唯一标识" clearable style="width: 300px"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" @click="qo.pageNo=1;queryData()">搜 索</el-button>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="queryData(-1)">上一页</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="queryData(1)">下一页</el-button>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div style="margin: 0px 0 20px 0">
|
|
|
@@ -20,16 +26,16 @@
|
|
|
<el-button type="primary" @click="showImportUserPage()" icon="el-icon-upload2">导入用户</el-button>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-table :data="result.records" style="width: 100%">
|
|
|
+ <el-table :data="result.records" style="width: 100%" v-loading="loading">
|
|
|
<el-table-column type="index" label="行号" width="60"></el-table-column>
|
|
|
- <el-table-column prop="fid" label="fid"></el-table-column>
|
|
|
+ <el-table-column prop="fid" label="唯一标识"></el-table-column>
|
|
|
<el-table-column prop="realname" label="姓名"></el-table-column>
|
|
|
<el-table-column prop="labels" label="标签">
|
|
|
<div slot-scope="scope">
|
|
|
- <template v-for="(tag,index) in scope.row.labelsArr">
|
|
|
+ <template v-for="(tag,index) in scope.row.labelArr">
|
|
|
<el-tag :key="index" v-if="index < 5">{{ tag }}</el-tag>
|
|
|
</template>
|
|
|
- <el-tag v-if="scope.row.labelsArr.length > 5">...</el-tag>
|
|
|
+ <el-tag v-if="scope.row.labelArr.length > 5">...</el-tag>
|
|
|
</div>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="240">
|
|
|
@@ -53,15 +59,15 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
- <div class="page-box">
|
|
|
- <el-pagination background
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="qo.pageNo"
|
|
|
- :page-size="qo.pageSize"
|
|
|
- layout="total, prev, pager, next"
|
|
|
- :total="result.total">
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
+ <!-- <div class="page-box">-->
|
|
|
+ <!-- <el-pagination background-->
|
|
|
+ <!-- @current-change="handleCurrentChange"-->
|
|
|
+ <!-- :current-page="qo.pageNo"-->
|
|
|
+ <!-- :page-size="qo.pageSize"-->
|
|
|
+ <!-- layout="total, prev, pager, next"-->
|
|
|
+ <!-- :total="result.total">-->
|
|
|
+ <!-- </el-pagination>-->
|
|
|
+ <!-- </div>-->
|
|
|
</div>
|
|
|
<el-dialog
|
|
|
:title="dialogName"
|
|
|
@@ -84,6 +90,7 @@
|
|
|
import request, {getBaseUrl} from '@/utils/request';
|
|
|
|
|
|
var _this;
|
|
|
+var _index = 0;
|
|
|
export default {
|
|
|
name: "userManage",
|
|
|
data() {
|
|
|
@@ -97,6 +104,8 @@ export default {
|
|
|
records: [],
|
|
|
total: 0
|
|
|
},
|
|
|
+ loading: false,
|
|
|
+ cursorArr: [''], // 分页游标
|
|
|
dialogName: '编辑',
|
|
|
cmdDialogVisible: false,
|
|
|
cmd: {},
|
|
|
@@ -116,17 +125,22 @@ export default {
|
|
|
_this.queryData();
|
|
|
},
|
|
|
methods: {
|
|
|
- queryData() {
|
|
|
+ queryData(index) {
|
|
|
+ this.loading = true;
|
|
|
+ if (index < 0 && this.cursorArr.length >= 2) {
|
|
|
+ this.cursorArr = this.cursorArr.slice(0, this.cursorArr.length - 2);
|
|
|
+ this.cursorArr = this.cursorArr.length === 0 ? [''] : this.cursorArr;
|
|
|
+ }
|
|
|
request({
|
|
|
- url: '/risk-user/query_pages',
|
|
|
- method: 'post',
|
|
|
- data: _this.qo
|
|
|
+ url: '/gorse/query_users?cursor=' + this.cursorArr[this.cursorArr.length - 1],
|
|
|
+ method: 'get',
|
|
|
}).then(res => {
|
|
|
- res.data.records.forEach(row => {
|
|
|
- row.labelsArr = row.labels ? row.labels.split(',') : [];
|
|
|
+ this.cursorArr.push(res.data.cursor);
|
|
|
+ res.data.users.forEach(row => {
|
|
|
+ row.labelArr = row.labels ? row.labels.split(',') : [];
|
|
|
});
|
|
|
- _this.result.records = res.data.records;
|
|
|
- _this.result.total = res.data.total;
|
|
|
+ _this.result.records = res.data.users;
|
|
|
+ this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
handleCurrentChange(val) {
|