添加请求接口

master
yujialong 3 years ago
parent 86308ff643
commit b50840c6fe
  1. 87
      src/views/List.vue

@ -10,7 +10,7 @@
<div class="footer">
<div class="flex-end">
<div>
<el-input placeholder="请输入判分点名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
<el-input placeholder="请输入判分点名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div>
</div>
<div class="flex footer_h">
@ -24,11 +24,11 @@
<el-col :span="24">
<el-card shadow="hover">
<el-table
:data="tableData"
:cell-style="rowClass"
:header-cell-style="headClass"
:stripe="true"
header-align="center"
:data="tableData"
:cell-style="rowClass"
:header-cell-style="headClass"
:stripe="true"
header-align="center"
>
<el-table-column type="index" label="序号" align="center">
<template slot-scope="scope">{{scope.$index + (pageNo - 1) * pageSize + 1}}</template>
@ -54,12 +54,12 @@
<!-- 分页 -->
<div class="block">
<el-pagination
background
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-size="10"
layout="total,prev, pager, next, jumper"
:total="dataTotal"
background
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-size="10"
layout="total,prev, pager, next, jumper"
:total="dataTotal"
></el-pagination>
</div>
</div>
@ -91,10 +91,10 @@ export default {
components: {quill},
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.handleCurrentChange(this.pageNo)
},500)
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.handleCurrentChange(this.pageNo)
},500)
},
},
mounted() {
@ -128,13 +128,13 @@ export default {
userIdList: res.message.retvalue.join()
}
this.$get(this.api.queryListTrading,data)
.then(res => {
this.tableData = res.message.rows
this.dataTotal = res.message.total
})
.catch(err => {
console.log(err);
});
.then(res => {
this.tableData = res.message.rows
this.dataTotal = res.message.total
})
.catch(err => {
console.log(err);
});
}).catch(res => {})
},
// setCookie(name, value) {
@ -198,33 +198,30 @@ export default {
type: "warning",
center: true
})
.then(() => {
let data = [row.id]
this.$post(`${this.api.deleteTrading}`,data)
.then(res => {
this.handleCurrentChange(this.pageNo);
})
.catch(err => {
console.log(err);
.then(() => {
let data = [row.id]
this.$post(`${this.api.deleteTrading}`,data)
.then(res => {
this.handleCurrentChange(this.pageNo);
})
.catch(err => {
console.log(err);
});
this.$message({
type: "success",
message: "删除成功!"
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
});
this.$message({
type: "success",
message: "删除成功!"
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
});
});
},
//
handleClick(res) {
if (this.systemId == 11) {
//
this.$router.push(`transaction?systemId=${this.systemId}&userId=${this.userId}&id=${res.id}`);
} else if(this.systemId == 2){
if(this.systemId == 2){
this.$router.push(`programOption?systemId=${this.systemId}&userId=${this.userId}&id=${res.id}`);
}else{
this.$router.push(`programOptions?systemId=${this.systemId}&userId=${this.userId}&id=${res.id}&pattern=${this.pattern}`);

Loading…
Cancel
Save