首页预览

dev_2022-04-07
yujialong 3 years ago
parent 57535214c7
commit 6065ddfb59
  1. 2
      src/pages/data/list/index.vue
  2. 8
      src/pages/index/list/index.vue
  3. 1
      src/pages/role/list/index.vue

@ -240,6 +240,7 @@ export default {
this.$post(`${this.api.getIdQueryTable}?categoryId=${this.defaultType}&showName=${this.keyword}&pageNum=${this.page}&pageSize=${this.pageSize}&updateTime=`).then(res => {
const list = res.pageList.records
list.map(e => {
//
const startTime = e.startTime ? e.startTime.slice(0, 10) : ''
const endTime = e.endTime ? e.endTime.slice(0, 10) : ''
if (startTime && endTime) {
@ -252,6 +253,7 @@ export default {
})
this.listData = list
this.total = res.pageList.total
//
if (this.$route.query.preview) {
this.preview({
id: this.$route.query.id,

@ -256,6 +256,8 @@ export default {
this.getData()
},
preview(row) {
//
if(this.token){
this.$get(`${this.api.previewData}?tableName=${row.name}&tableId=${row.id}`).then(res => {
// +1
this.$post(this.api.saveRecord, {
@ -281,6 +283,12 @@ export default {
this.previewData = data
this.previewVisible = true
}).catch(res => { })
}else{
let route = this.$router.resolve({
path: '/login'
})
window.open(route.href)
}
},
download(row){
// ,

@ -178,6 +178,7 @@ export default {
setTimeout(() => {
this.$get(`${this.api.getRole}?id=${row.id}`).then(res => {
this.form = res.role
//
this.checkedIds = this.handleRolePer(res.permissionList,this.permissions)
this.$refs.per.setCheckedNodes(this.checkedIds)
}).catch(res => {})

Loading…
Cancel
Save