|
@@ -20,10 +20,10 @@
|
|
|
</div>
|
|
</div>
|
|
|
<el-button v-if="tool.checkAuth($route.name,'delete') && delApiId" :type="checkDisabled()?'':'primary'" class="inline-16" size="mini" :disabled="checkDisabled()" @click="deleteData">删 除</el-button>
|
|
<el-button v-if="tool.checkAuth($route.name,'delete') && delApiId" :type="checkDisabled()?'':'primary'" class="inline-16" size="mini" :disabled="checkDisabled()" @click="deleteData">删 除</el-button>
|
|
|
|
|
|
|
|
- <!-- <div v-if="!pageChange">
|
|
|
|
|
- <el-button :disabled="rowindex === 1" size="mini" icon="el-icon-arrow-left" @click="previous()"></el-button>
|
|
|
|
|
- <el-button :disabled="rowindex === total" size="mini" @click="next()"><i class="el-icon-arrow-right"></i></el-button>
|
|
|
|
|
- </div> -->
|
|
|
|
|
|
|
+ <div v-if="!pageChange">
|
|
|
|
|
+ <el-button size="mini" icon="el-icon-arrow-left" @click="previous()"></el-button>
|
|
|
|
|
+ <el-button size="mini" @click="next()"><i class="el-icon-arrow-right"></i></el-button>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
@@ -104,6 +104,7 @@ export default {
|
|
|
refreshPage:true,
|
|
refreshPage:true,
|
|
|
reportCenterLsit:[],
|
|
reportCenterLsit:[],
|
|
|
systemappid:JSON.parse(sessionStorage.getItem('activeApp')).systemappid,
|
|
systemappid:JSON.parse(sessionStorage.getItem('activeApp')).systemappid,
|
|
|
|
|
+ idx:0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed:{
|
|
computed:{
|
|
@@ -134,7 +135,8 @@ export default {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
...mapGetters({
|
|
...mapGetters({
|
|
|
- activeApp:"activeApp"
|
|
|
|
|
|
|
+ activeApp:"activeApp",
|
|
|
|
|
+ listData:'listData'
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
components:{
|
|
components:{
|
|
@@ -155,7 +157,7 @@ export default {
|
|
|
this.param.content.pageNumber = pageNumber
|
|
this.param.content.pageNumber = pageNumber
|
|
|
const res = await this.$api.requested(this.param)
|
|
const res = await this.$api.requested(this.param)
|
|
|
this.total = res.total
|
|
this.total = res.total
|
|
|
- this.$emit('pageChange',res.data[0][this.idname],res.data[0].rowindex)
|
|
|
|
|
|
|
+ // this.$emit('pageChange',res.data[0][this.idname],res.data[0].rowindex)
|
|
|
this.$refs['tag']?this.$refs['tag'].queryTag():''
|
|
this.$refs['tag']?this.$refs['tag'].queryTag():''
|
|
|
this.refresh()
|
|
this.refresh()
|
|
|
},
|
|
},
|
|
@@ -169,7 +171,6 @@ export default {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
this.reportCenterLsit = res.data
|
|
this.reportCenterLsit = res.data
|
|
|
- console.log(res,'报表数据');
|
|
|
|
|
},
|
|
},
|
|
|
async printBtn (data,data2) {
|
|
async printBtn (data,data2) {
|
|
|
let res = await this.$api.requested({
|
|
let res = await this.$api.requested({
|
|
@@ -185,13 +186,38 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
next () {
|
|
next () {
|
|
|
- this.rowindex += 1
|
|
|
|
|
- this.queryData(this.rowindex)
|
|
|
|
|
|
|
+ let nowId = this.$route.query.id
|
|
|
|
|
+ let changeId = ''
|
|
|
|
|
+ if ((this.idx + 1) == this.listData.length) return this.$message({
|
|
|
|
|
+ message:"已经是当前页最后一条了!",
|
|
|
|
|
+ type:'warning'
|
|
|
|
|
+ })
|
|
|
|
|
+ this.listData.forEach((e,index)=>{
|
|
|
|
|
+ if (e[this.idname] == nowId) {
|
|
|
|
|
+ changeId = this.listData[index + 1][this.idname]
|
|
|
|
|
+ this.idx = index + 1
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
|
|
+ this.$emit('pageChange',changeId,this.idx)
|
|
|
|
|
+ this.refresh()
|
|
|
},
|
|
},
|
|
|
previous () {
|
|
previous () {
|
|
|
- this.rowindex -= 1
|
|
|
|
|
- this.queryData(this.rowindex)
|
|
|
|
|
|
|
+ let nowId = this.$route.query.id
|
|
|
|
|
+ let changeId = ''
|
|
|
|
|
+ if ((this.idx - 1) < 0) return this.$message({
|
|
|
|
|
+ message:"当前是第一条",
|
|
|
|
|
+ type:'warning'
|
|
|
|
|
+ })
|
|
|
|
|
+ this.listData.forEach((e,index)=>{
|
|
|
|
|
+ if (e[this.idname] == nowId) {
|
|
|
|
|
+ changeId = this.listData[index - 1][this.idname]
|
|
|
|
|
+ this.idx = index - 1
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ this.$emit('pageChange',changeId,this.idx)
|
|
|
|
|
+ this.refresh()
|
|
|
},
|
|
},
|
|
|
onSuccess () {
|
|
onSuccess () {
|
|
|
this.$emit('onEditSuccess')
|
|
this.$emit('onEditSuccess')
|
|
@@ -259,6 +285,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted () {
|
|
mounted () {
|
|
|
|
|
+ this.idx = this.$route.query.rowindex
|
|
|
},
|
|
},
|
|
|
created () {
|
|
created () {
|
|
|
this.$emit('detailCreate',this.param)
|
|
this.$emit('detailCreate',this.param)
|