diff --git a/back/src/views/modules/abilityStatistics/index.vue b/back/src/views/modules/abilityStatistics/index.vue index c915ad33..5ba4e2af 100644 --- a/back/src/views/modules/abilityStatistics/index.vue +++ b/back/src/views/modules/abilityStatistics/index.vue @@ -12,12 +12,19 @@ - - 上架部门: - 申请部门: + + 上架部门: - + + + + 申请部门: + + + @@ -269,6 +276,8 @@ export default { checked: false, provideSelects: [], departmentSelects: [], + departmentSelects1: [], + provideSelects1:[], exportExcel: CONFIGITEM.configData[CONFIGITEM.version].apiURL + '/census/center/export', exportExcelCondition: '', exportExcelType: '', @@ -408,6 +417,8 @@ export default { this.provideSelects = [] res.data.data.map(val => { this.departmentSelects.push({ label: val.name, value: val.name }) + this.departmentSelects1.push({ label: val.name, value: val.id }) + this.provideSelects1.push({ label: val.name, value: val.name }) this.provideSelects.push({ label: val.name, value: val.name }) }) }) @@ -457,7 +468,7 @@ export default { this.detailsVisible = false }, handleCurrentChange (val) { - console.log('val------------>', val) + this.currentPage = val // todo if (this.departmentId === 3) { @@ -467,41 +478,9 @@ export default { this.getTwoDetail(val) } - // if (this.choseId === 0) { - // this.getFirstTree(val) - // } else if (this.choseId === 1) { - // this.getReleaseTree(val) - // } }, - getTreeName (data) { - this.$http - .get('/census/center/v3/treeList/', { - params: { - keywords: data.name, - deptId: '1067246875800000066' - // pageNo: pageNo || 1, - // pageSize: 20 - } - }) - .then((res) => { - this.tableData = res.data.data - }) - }, - // // 获取部门列表 - // getALLTree () { - // this.$http.get('/census/center/v3/treeList/' ,{ - // params : { - // keywords:this.inputTxt, - // deptId:'1067246875800000066', - // // pageNo: pageNo || 1, - // // pageSize: 20 - // } - // }).then(res => { - // this.treeData =res.data.data - // // this.tableData =res.data.data - // }) - // }, + // 组件服务部门发布情况--改为能力上架统计 getFirstTree (page) { if (this.examineStatus == '-1') { @@ -529,6 +508,14 @@ export default { } }) .then((res) => { + + if (res.data.code !== 0) { + this.tableData =[] + this.tableDataClone = [] + this.total = 0 + return this.$message.error("服务器内部异常") + + }else{ const result = res.data.data for (let i = 0; i < result.length; i++) { if (!result[i].hasOwnProperty('yyzy')) { @@ -567,7 +554,9 @@ export default { endDate: this.endDate, resourceName: this.resourceName }) + } }) + }, // 组件服务部门使用情况列表-改为能力使用统计 getSecondTree (page) { @@ -596,6 +585,13 @@ export default { } }) .then((res) => { + if (res.data.code !== 0) { + this.tableData =[] + this.tableDataClone = [] + this.total = 0 + return this.$message.error("服务器内部异常") + + }else{ const result = res.data.data for (let i = 0; i < result.length; i++) { if (!result[i].hasOwnProperty('yyzy')) { @@ -635,6 +631,7 @@ export default { resourceName: this.resourceName }) + } }) }, // 点击查看详情 @@ -707,7 +704,13 @@ export default { } }) .then((res) => { - console.log('111111', this.tableData, res.data.data) + if (res.data.code !== 0) { + this.tableData =[] + this.tableDataClone = [] + this.total = 0 + return this.$message.error("服务器内部异常") + + }else{ this.tableData = res.data.data.list this.tableDataClone = res.data.data.list this.total = res.data.data.total @@ -718,10 +721,12 @@ export default { endDate: this.endDate, resourceName: this.resourceName }) + } }) }, // 能力使用明细 getTwoDetail (page) { + var passAndReview = '' // 转变"通过"字段为通过 if (this.examineStatus == '-1') { this.status = '' @@ -751,6 +756,14 @@ export default { } }) .then((res) => { + + if (res.data.code !== 0) { + this.tableData =[] + this.tableDataClone = [] + this.total = 0 + return this.$message.error("服务器内部异常") + + }else{ this.tableData = res.data.data.list this.tableDataClone = res.data.data.list this.total = res.data.data.total @@ -762,69 +775,12 @@ export default { resourceName: this.resourceName, provideDept: this.provideDepartment }) + } + }) }, - getReleaseTree (page) { - this.$http - .get('/census/center/selectApplyDeptDetailTypeCountList/', { - params: { - limit: 5, - // page: page || 1, - approveStatus: '', - type: '', - deptId: '', - params: '', - startDate: '' - } - }) - .then((res) => { - const result = res.data.data - for (let i = 0; i < result.length; i++) { - if (!result[i].hasOwnProperty('yyzy')) { - result[i].yyzy = 0 - } - if (!result[i].hasOwnProperty('kfzj')) { - result[i].kfzj = 0 - } - if (!result[i].hasOwnProperty('znsf')) { - result[i].znsf = 0 - } - if (!result[i].hasOwnProperty('tcfw')) { - result[i].tcfw = 0 - } - if (!result[i].hasOwnProperty('ywzj')) { - result[i].ywzj = 0 - } - if (!result[i].hasOwnProperty('hys')) { - result[i].hys = 0 - } - result[i].zj = - parseInt(result[i].yyzy) + - parseInt(result[i].kfzj) + - parseInt(result[i].znsf) + - parseInt(result[i].ywzj) + - parseInt(result[i].tcfw) + - parseInt(result[i].hys) - } - this.tableData = res.data.data - this.total = res.data.data.total - }) - }, - // 应用资源部门使用情况列表 - getUsedTree () { - this.$http - .get('/census/center/v3/resourceReleaseDetails/', { - params: { - limit: 5, - page: 1, - // id:'1067246875800000066', - resourceType: '应用资源' - } - }) - .then((res) => { - this.tableData = res.data.data.list - }) - }, + + handleClick (row) { if (this.choseId === 0) { if (this.departmentId === 1) { @@ -853,6 +809,8 @@ export default { // 根据不同的type查询不同的表格数据 handleChose (index) { + + this.checked = false this.departmentId = index this.currentPage = 1 @@ -920,6 +878,9 @@ export default { }, // 明细按钮函数//明细按钮函数//明细按钮函数//明细按钮函数//明细按钮函数//明细按钮函数 goToDetail () { + this.abilityDepartment='' + this.provideDepartment='' + this.currentPage = 1 this.pageSize = 10 this.detailFlag = !this.detailFlag @@ -934,6 +895,9 @@ export default { }, // 返回按钮 goToBack () { + this.abilityDepartment='' + this.provideDepartment='' + this.checked = false this.currentPage = 1, this.pageSize = 10,