diff --git a/src/api/oafile/index.js b/src/api/oafile/index.js index 5550d6e..c3f358e 100644 --- a/src/api/oafile/index.js +++ b/src/api/oafile/index.js @@ -14,4 +14,12 @@ export function changeFiles(params) { method: 'get', params:params }) -} \ No newline at end of file +} + +export function delFiles(params) { + return request({ + url: '/api/admin/other/accept_file_delete', + method: 'get', + params:params + }) +} diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 541332c..e549f4c 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -468,7 +468,7 @@ export default { created() { // this.initLoad(); this.getLeads() - this.updateMissionPlan() + // this.updateMissionPlan() this.getUserId() this.getUnitTypeList() // this.getQuestion() diff --git a/src/views/lawsfile/index/article.vue b/src/views/lawsfile/index/article.vue index ff32727..020f7bc 100644 --- a/src/views/lawsfile/index/article.vue +++ b/src/views/lawsfile/index/article.vue @@ -156,7 +156,8 @@ }, uploadOther: { token: "" - }, + }, + menu_children:[], dialogViewVisible: false, dialogFormVisible: false, formLabelWidth: "120px", @@ -206,9 +207,33 @@ }, methods: { menuClick(data) { - let that = this; - that.searchFields.menu_id = data.id; + let that = this; + this.menu_children = [] + this.menu_children.push(data) + if(data.children.length>0){ + this.hasChildren(data) + } + let menuids = '' + if(this.menu_children.length>0){ + this.menu_children.map(item=>{ + menuids+=item.id+',' + }) + menuids = menuids.slice(0,-1) + } + that.searchFields.menu_id = menuids; that.load(); + }, + hasChildren(arr){ + if(arr.children.length>0){ + arr.children.map(item=>{ + this.menu_children.push(item) + if(item.children.length>0){ + this.hasChildren(item) + } + }) + }else{ + this.menu_children.push(arr) + } }, filterNode(value, data) { if (!value) return true; @@ -229,8 +254,17 @@ }, loadregulation() { var that = this; - // let type = parseInt(this.$route.path.split("_")[1]); - let type = '2,1,3,12' + let type = parseInt(this.$route.path.split("_")[1]); + let type1 = parseInt(this.$route.path.split("_")[2]); + if(type1){ + type = type1 + }else{ + // if(type==10){ + // type = 10 + // }else{ + type = '2,1,3,12' + // } + } listregulation(1, type).then(response => { that.options = response; }).catch(error => { @@ -240,9 +274,18 @@ }, load() { var that = this; - // let type = parseInt(this.$route.path.split("_")[1]); - // let type="" - let type = '' + let type = parseInt(this.$route.path.split("_")[1]); + let type1 = parseInt(this.$route.path.split("_")[2]); + if(type1){ + type = type1 + }else{ + // if(type==10){ + // type = 10 + // }else{ + type = '2,1,3,12' + // } + } + listarticle(that.pagination.page, that.searchFields.menu_id, that.searchFields.KeyWord, that.pagination .page_size, type).then(response => { that.tableData = response.data; diff --git a/src/views/lawsfile/index/articleview.vue b/src/views/lawsfile/index/articleview.vue index e9c0211..8b95a99 100644 --- a/src/views/lawsfile/index/articleview.vue +++ b/src/views/lawsfile/index/articleview.vue @@ -113,7 +113,8 @@ fileUrl: "", uploadOther: { token: "" - }, + }, + menu_children:[], dialogViewVisible: false, dialogFormVisible: false, formLabelWidth: "120px", @@ -164,9 +165,33 @@ menuClick(data) { - let that = this; - that.searchFields.menu_id = data.id; + let that = this; + this.menu_children = [] + this.menu_children.push(data) + if(data.children.length>0){ + this.hasChildren(data) + } + let menuids = '' + if(this.menu_children.length>0){ + this.menu_children.map(item=>{ + menuids+=item.id+',' + }) + menuids = menuids.slice(0,-1) + } + that.searchFields.menu_id = menuids; that.load(); + }, + hasChildren(arr){ + if(arr.children.length>0){ + arr.children.map(item=>{ + this.menu_children.push(item) + if(item.children.length>0){ + this.hasChildren(item) + } + }) + }else{ + this.menu_children.push(arr) + } }, filterNode(value, data) { if (!value) return true; @@ -187,7 +212,19 @@ }, loadregulation() { var that = this; - let type = parseInt(this.$route.path.split("_")[1]); + // let type = parseInt(this.$route.path.split("_")[1]); + // let type = '2,1,3,12' + let type = parseInt(this.$route.path.split("_")[1]); + let type1 = parseInt(this.$route.path.split("_")[2]); + if(type1){ + type = type1 + }else{ + // if(type==10){ + // type = 10 + // }else{ + type = '2,1,3,12' + // } + } listregulation(1, type).then(response => { that.options = response; }).catch(error => { @@ -195,9 +232,19 @@ //reject(error) }) }, - load() { + load(istrue) { let type = parseInt(this.$route.path.split("_")[1]); - var that = this; + var that = this; + let type1 = parseInt(this.$route.path.split("_")[2]); + if(type1){ + type = type1 + }else{ + // if(type==10){ + // type = 10 + // }else{ + type = '2,1,3,12' + // } + } listarticle(that.pagination.page, that.searchFields.menu_id, that.searchFields.KeyWord, that.pagination .page_size, type).then(response => { that.tableData = response.data; @@ -210,7 +257,7 @@ show(obj) { this.$refs.viewInfo.dialogViewVisible = true; this.$refs.viewInfo.getinfo(obj.id); - + }, info(obj) { var that = this; diff --git a/src/views/lawsfile/index/regulation.vue b/src/views/lawsfile/index/regulation.vue index 7449558..7e03d2d 100644 --- a/src/views/lawsfile/index/regulation.vue +++ b/src/views/lawsfile/index/regulation.vue @@ -118,8 +118,20 @@ }, load() { // let type = parseInt(this.$route.path.split("_")[1]); - let type = '2,1,3,12' - var that = this; + // let type = '2,1,3,12' + var that = this; + let type = parseInt(this.$route.path.split("_")[1]); + let type1 = parseInt(this.$route.path.split("_")[2]); + if(type1){ + type = type1 + }else{ + // if(type==10){ + // type = 10 + // }else{ + type = '2,1,3,12' + // } + } + listregulation(1, type).then(response => { that.tableData = response; }).catch(error => { diff --git a/src/views/oafile/index.vue b/src/views/oafile/index.vue index dfe6eb2..71cf6d4 100644 --- a/src/views/oafile/index.vue +++ b/src/views/oafile/index.vue @@ -20,13 +20,15 @@ :table-item="table">