diff --git a/back/src/views/modules/abilityStatistics/index.vue b/back/src/views/modules/abilityStatistics/index.vue index 5ba4e2af..119c6abe 100644 --- a/back/src/views/modules/abilityStatistics/index.vue +++ b/back/src/views/modules/abilityStatistics/index.vue @@ -180,7 +180,7 @@ - + - + @@ -277,7 +277,7 @@ export default { provideSelects: [], departmentSelects: [], departmentSelects1: [], - provideSelects1:[], + provideSelects1: [], exportExcel: CONFIGITEM.configData[CONFIGITEM.version].apiURL + '/census/center/export', exportExcelCondition: '', exportExcelType: '', @@ -468,7 +468,6 @@ export default { this.detailsVisible = false }, handleCurrentChange (val) { - this.currentPage = val // todo if (this.departmentId === 3) { @@ -477,10 +476,8 @@ export default { if (this.departmentId === 4) { this.getTwoDetail(val) } - }, - // 组件服务部门发布情况--改为能力上架统计 getFirstTree (page) { if (this.examineStatus == '-1') { @@ -508,55 +505,52 @@ 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')) { - result[i].yyzy = 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')) { + 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) } - 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.tableDataClone = res.data.data + this.total = res.data.data.total + this.exportExcelCondition = qs.stringify({ + approveStatus: this.status, + deptId: this.abilityDepartment, + startDate: this.startDate, + endDate: this.endDate, + resourceName: this.resourceName + }) } - this.tableData = res.data.data - this.tableDataClone = res.data.data - this.total = res.data.data.total - this.exportExcelCondition = qs.stringify({ - approveStatus: this.status, - deptId: this.abilityDepartment, - startDate: this.startDate, - endDate: this.endDate, - resourceName: this.resourceName - }) - } }) - }, // 组件服务部门使用情况列表-改为能力使用统计 getSecondTree (page) { @@ -586,52 +580,57 @@ 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')) { - result[i].yyzy = 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')) { + 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 + } + if (!result[i].hasOwnProperty('yzy')) { + result[i].yzy = 0 + } + if (!result[i].hasOwnProperty('ysp')) { + result[i].ysp = 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) } - 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.tableDataClone = res.data.data - this.total = res.data.data.total - this.exportExcelCondition = qs.stringify({ - approveStatus: this.status, - deptId: this.abilityDepartment, - startDate: this.startDate, - endDate: this.endDate, - resourceName: this.resourceName + this.tableData = res.data.data + this.tableDataClone = res.data.data + this.total = res.data.data.total + this.exportExcelCondition = qs.stringify({ + approveStatus: this.status, + deptId: this.abilityDepartment, + startDate: this.startDate, + endDate: this.endDate, + resourceName: this.resourceName - }) - } + }) + } }) }, // 点击查看详情 @@ -705,28 +704,26 @@ 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 - this.exportExcelCondition = qs.stringify({ - approveStatus: this.status, - deptId: this.abilityDepartment, - startDate: this.startDate, - endDate: this.endDate, - resourceName: this.resourceName - }) - } + 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 + this.exportExcelCondition = qs.stringify({ + approveStatus: this.status, + deptId: this.abilityDepartment, + startDate: this.startDate, + endDate: this.endDate, + resourceName: this.resourceName + }) + } }) }, // 能力使用明细 getTwoDetail (page) { - var passAndReview = '' // 转变"通过"字段为通过 if (this.examineStatus == '-1') { this.status = '' @@ -756,31 +753,27 @@ 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 - this.exportExcelCondition = qs.stringify({ - approveStatus: this.status, - deptId: this.abilityDepartment, - startDate: this.startDate, - endDate: this.endDate, - resourceName: this.resourceName, - provideDept: this.provideDepartment - }) - } - + 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 + this.exportExcelCondition = qs.stringify({ + approveStatus: this.status, + deptId: this.abilityDepartment, + startDate: this.startDate, + endDate: this.endDate, + resourceName: this.resourceName, + provideDept: this.provideDepartment + }) + } }) }, - - + handleClick (row) { if (this.choseId === 0) { if (this.departmentId === 1) { @@ -809,8 +802,6 @@ export default { // 根据不同的type查询不同的表格数据 handleChose (index) { - - this.checked = false this.departmentId = index this.currentPage = 1 @@ -878,8 +869,8 @@ export default { }, // 明细按钮函数//明细按钮函数//明细按钮函数//明细按钮函数//明细按钮函数//明细按钮函数 goToDetail () { - this.abilityDepartment='' - this.provideDepartment='' + this.abilityDepartment = '' + this.provideDepartment = '' this.currentPage = 1 this.pageSize = 10 @@ -895,8 +886,8 @@ export default { }, // 返回按钮 goToBack () { - this.abilityDepartment='' - this.provideDepartment='' + this.abilityDepartment = '' + this.provideDepartment = '' this.checked = false this.currentPage = 1,