Compare commits

..

2 Commits

1 changed files with 64 additions and 100 deletions

View File

@ -12,12 +12,19 @@
</el-form-item> </el-form-item>
<!--上架部门--> <!--上架部门-->
<el-form-item> <el-form-item v-if="this.departmentId === 1 ">
<span v-if="this.departmentId === 1 ">上架部门</span> <span>上架部门:</span>
<span v-else>申请部门</span>
<el-select v-model="abilityDepartment" placeholder="请选择部门" filterable clearable> <el-select v-model="abilityDepartment" placeholder="请选择部门" filterable clearable>
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option v-for="item in departmentSelects" :key="item.label" :label="item.label" :value="item.value" <el-option v-for="item in departmentSelects1" :key="item.label" :label="item.label" :value="item.value"
v-bind="item"></el-option>
</el-select>
</el-form-item>
<el-form-item v-else>
<span >申请部门</span>
<el-select v-model="abilityDepartment" placeholder="请选择部门" filterable clearable>
<el-option label="全部" value=""></el-option>
<el-option v-for="item in provideSelects1" :key="item.label" :label="item.label" :value="item.value"
v-bind="item"></el-option> v-bind="item"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -269,6 +276,8 @@ export default {
checked: false, checked: false,
provideSelects: [], provideSelects: [],
departmentSelects: [], departmentSelects: [],
departmentSelects1: [],
provideSelects1:[],
exportExcel: CONFIGITEM.configData[CONFIGITEM.version].apiURL + '/census/center/export', exportExcel: CONFIGITEM.configData[CONFIGITEM.version].apiURL + '/census/center/export',
exportExcelCondition: '', exportExcelCondition: '',
exportExcelType: '', exportExcelType: '',
@ -408,6 +417,8 @@ export default {
this.provideSelects = [] this.provideSelects = []
res.data.data.map(val => { res.data.data.map(val => {
this.departmentSelects.push({ label: val.name, value: val.name }) 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 }) this.provideSelects.push({ label: val.name, value: val.name })
}) })
}) })
@ -457,7 +468,7 @@ export default {
this.detailsVisible = false this.detailsVisible = false
}, },
handleCurrentChange (val) { handleCurrentChange (val) {
console.log('val------------>', val)
this.currentPage = val this.currentPage = val
// todo // todo
if (this.departmentId === 3) { if (this.departmentId === 3) {
@ -467,40 +478,8 @@ export default {
this.getTwoDetail(val) 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) { getFirstTree (page) {
@ -529,6 +508,14 @@ export default {
} }
}) })
.then((res) => { .then((res) => {
if (res.data.code !== 0) {
this.tableData =[]
this.tableDataClone = []
this.total = 0
return this.$message.error("服务器内部异常")
}else{
const result = res.data.data const result = res.data.data
for (let i = 0; i < result.length; i++) { for (let i = 0; i < result.length; i++) {
if (!result[i].hasOwnProperty('yyzy')) { if (!result[i].hasOwnProperty('yyzy')) {
@ -567,7 +554,9 @@ export default {
endDate: this.endDate, endDate: this.endDate,
resourceName: this.resourceName resourceName: this.resourceName
}) })
}
}) })
}, },
// 使-使 // 使-使
getSecondTree (page) { getSecondTree (page) {
@ -596,6 +585,13 @@ export default {
} }
}) })
.then((res) => { .then((res) => {
if (res.data.code !== 0) {
this.tableData =[]
this.tableDataClone = []
this.total = 0
return this.$message.error("服务器内部异常")
}else{
const result = res.data.data const result = res.data.data
for (let i = 0; i < result.length; i++) { for (let i = 0; i < result.length; i++) {
if (!result[i].hasOwnProperty('yyzy')) { if (!result[i].hasOwnProperty('yyzy')) {
@ -635,6 +631,7 @@ export default {
resourceName: this.resourceName resourceName: this.resourceName
}) })
}
}) })
}, },
// //
@ -707,7 +704,13 @@ export default {
} }
}) })
.then((res) => { .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.tableData = res.data.data.list
this.tableDataClone = res.data.data.list this.tableDataClone = res.data.data.list
this.total = res.data.data.total this.total = res.data.data.total
@ -718,10 +721,12 @@ export default {
endDate: this.endDate, endDate: this.endDate,
resourceName: this.resourceName resourceName: this.resourceName
}) })
}
}) })
}, },
// 使 // 使
getTwoDetail (page) { getTwoDetail (page) {
var passAndReview = '' // "" var passAndReview = '' // ""
if (this.examineStatus == '-1') { if (this.examineStatus == '-1') {
this.status = '' this.status = ''
@ -751,6 +756,14 @@ export default {
} }
}) })
.then((res) => { .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.tableData = res.data.data.list
this.tableDataClone = res.data.data.list this.tableDataClone = res.data.data.list
this.total = res.data.data.total this.total = res.data.data.total
@ -762,69 +775,12 @@ export default {
resourceName: this.resourceName, resourceName: this.resourceName,
provideDept: this.provideDepartment 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) { handleClick (row) {
if (this.choseId === 0) { if (this.choseId === 0) {
if (this.departmentId === 1) { if (this.departmentId === 1) {
@ -853,6 +809,8 @@ export default {
// type // type
handleChose (index) { handleChose (index) {
this.checked = false this.checked = false
this.departmentId = index this.departmentId = index
this.currentPage = 1 this.currentPage = 1
@ -920,6 +878,9 @@ export default {
}, },
// ////////// // //////////
goToDetail () { goToDetail () {
this.abilityDepartment=''
this.provideDepartment=''
this.currentPage = 1 this.currentPage = 1
this.pageSize = 10 this.pageSize = 10
this.detailFlag = !this.detailFlag this.detailFlag = !this.detailFlag
@ -934,6 +895,9 @@ export default {
}, },
// //
goToBack () { goToBack () {
this.abilityDepartment=''
this.provideDepartment=''
this.checked = false this.checked = false
this.currentPage = 1, this.currentPage = 1,
this.pageSize = 10, this.pageSize = 10,