Merge branch 'hi-ucs-dev' of http://124.222.94.39:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
guoyue 2022-10-18 15:52:16 +08:00
commit 3f22be0d8d
10 changed files with 1066 additions and 826 deletions

View File

@ -107,7 +107,6 @@ export default {
} else { } else {
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0 this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
} }
console.log('数据列表', this.dataList, this.mixinViewModuleOptions.getDataListURL) console.log('数据列表', this.dataList, this.mixinViewModuleOptions.getDataListURL)
if (this.dataList[0].type === '组件服务') { if (this.dataList[0].type === '组件服务') {
this.dataList.map(val => { this.dataList.map(val => {

View File

@ -104,7 +104,7 @@ router.beforeEach((to, from, next) => {
Vue.prototype.$message.error(res.msg) Vue.prototype.$message.error(res.msg)
return next({ name: 'login' }) return next({ name: 'login' })
} }
window.SITE_CONFIG.menuList = res.data window.SITE_CONFIG.menuList = res.data.filter(item => item.site === 0)
fnAddDynamicMenuRoutes(window.SITE_CONFIG.menuList) fnAddDynamicMenuRoutes(window.SITE_CONFIG.menuList)
next({ ...to, replace: true }) next({ ...to, replace: true })
}).catch(() => { }).catch(() => {

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: kongjun qdkongjun@gmail.com * @Author: kongjun qdkongjun@gmail.com
* @Date: 2022-06-20 09:29:59 * @Date: 2022-06-20 09:29:59
* @LastEditors: kongjun qdkongjun@gmail.com * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-22 10:04:56 * @LastEditTime: 2022-10-18 15:46:51
* @FilePath: \back\src\views\main-sidebar.vue * @FilePath: \back\src\views\main-sidebar.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
@ -25,7 +25,7 @@
:menu="menu" :menu="menu"
> >
<span>sdddd</span> <span>sdddd</span>
</sub-menu> </sub-menu>
</div> </div>
</el-menu> </el-menu>
@ -35,63 +35,72 @@
<script> <script>
import http from '@/utils/request' import http from '@/utils/request'
import SubMenu from "./main-sidebar-sub-menu"; import SubMenu from './main-sidebar-sub-menu'
import returnLocationStr from '@/utils/location'; import returnLocationStr from '@/utils/location'
import bus from '@/views/bus.js'
export default { export default {
data() { data () {
return { return {
numObject:{} numObject: {}
}; }
}, },
components: { components: {
SubMenu, SubMenu
}, },
created() { created () {
this.getNum() this.getNum()
//this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"]; // this.$store.state.sidebarMenuList = window.SITE_CONFIG.menuList
//
bus.$off('updateTaskNum')
bus.$on('updateTaskNum', () => {
this.getNum()
})
}, },
methods: { methods: {
getNum(){ getNum () {
http.get('/act/task/myToDoTaskNum').then(({ data: res }) => { http.get('/act/task/myToDoTaskNum').then(({ data: res }) => {
this.numObject=res.data this.numObject = res.data
let menuList= window.SITE_CONFIG["menuList"]; const menuList = window.SITE_CONFIG.menuList
for(var i=0;i<menuList.length;i++){ console.log('menuList====>', menuList)
let menu=menuList[i]; console.log('this.numObject====>', this.numObject)
if(menu.id=='1541261628388888578'){// for (var i = 0; i < menuList.length; i++) {
let daibanNum=0 const menu = menuList[i]
for(let j=0;j<menu.children.length;j++){ if (menu.id == '1541261628388888578') { //
let children=menu.children[j] let daibanNum = 0
if(children.id=="1541261780432408577"){// v2 for (let j = 0; j < menu.children.length; j++) {
//西 v2 v3 const children = menu.children[j]
children.total= returnLocationStr() == 'qingdao' ? Number(this.numObject.abilityprocess_v3) : Number(this.numObject.abilityprocess_v2) if (children.id == '1541261780432408577') { // v2
daibanNum=Number(daibanNum)+Number(children.total) // 西 v2 v3
} if(children.id=="1559376285703081986"){// children.total = returnLocationStr() == 'qingdao' ? Number(this.numObject.abilityprocess_v3) : Number(this.numObject.abilityprocess_v2)
children.total=Number(this.numObject.meetingroom_book) daibanNum = Number(daibanNum) + Number(children.total)
daibanNum=Number(daibanNum)+Number(children.total) } if (children.id == '1559376285703081986') { //
}if(children.id=="1545292602084827138"){// children.total = Number(this.numObject.meetingroom_book)
children.total=Number(this.numObject.resourcemountapply) daibanNum = Number(daibanNum) + Number(children.total)
daibanNum=Number(daibanNum)+Number(children.total) } if (children.id == '1545292602084827138') { //
}if(children.id=="1545312045695377410"){// children.total = Number(this.numObject.resourcemountapply)
children.total=Number(this.numObject.abilitydemandapply) daibanNum = Number(daibanNum) + Number(children.total)
daibanNum=Number(daibanNum)+Number(children.total) } if (children.id == '1545312045695377410') { //
}if(children.id=="1545313018614521857"){// children.total = Number(this.numObject.abilitydemandapply)
children.total=Number(this.numObject.resourcundercarriageapply) daibanNum = Number(daibanNum) + Number(children.total)
daibanNum=Number(daibanNum)+Number(children.total) } if (children.id == '1545313018614521857') { //
}if(children.id=="1545313754106699777"){// children.total = Number(this.numObject.resourcundercarriageapply)
children.total=Number(this.numObject.comment_review) daibanNum = Number(daibanNum) + Number(children.total)
daibanNum=Number(daibanNum)+Number(children.total) } if (children.id == '1545313754106699777') { //
}if(children.id=="1554294862931562498"){// children.total = Number(this.numObject.comment_review)
children.total=0 daibanNum = Number(daibanNum) + Number(children.total)
daibanNum=Number(daibanNum)+Number(children.total) } if (children.id == '1554294862931562498') { //
} children.total = 0
} daibanNum = Number(daibanNum) + Number(children.total)
menu.total=daibanNum }
}
menu.total = daibanNum
}
}
this.$store.state.sidebarMenuList = menuList
})
} }
} }
this.$store.state.sidebarMenuList=menuList }
})
}
}};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.aui-sidebar { .aui-sidebar {

View File

@ -94,6 +94,11 @@
$t('reset') $t('reset')
}}</el-button> }}</el-button>
</el-form-item> </el-form-item>
<!-- 导出 -->
<a class='export' :href="exportExcel+exportExcelType+'?'+exportExcelCondition+'&token='+token">导出</a>
<!-- <el-form-item>
<el-button type="primary" @click="exportExcel()">导出</el-button>
</el-form-item> -->
</el-form> </el-form>
<el-card shadow="never" class="aui-card--fill" v-if="homeIsShow"> <el-card shadow="never" class="aui-card--fill" v-if="homeIsShow">
<div class="mod-demand__bsdemand"> <div class="mod-demand__bsdemand">
@ -273,11 +278,12 @@
</template> </template>
<script> <script>
import Cookies from 'js-cookie'
import componentServices from './componentServices.vue' import componentServices from './componentServices.vue'
import AbilityDetail from './components/abilityDetails' import AbilityDetail from './components/abilityDetails'
import applicationResources from './applicationResources.vue' import applicationResources from './applicationResources.vue'
import ComponentUsed from './componentUsed.vue' import ComponentUsed from './componentUsed.vue'
import qs from 'qs'
import { mapState } from 'vuex' import { mapState } from 'vuex'
// const props = defineProps({ // const props = defineProps({
// processDefinitionName: { type: String, default: null }, // processDefinitionName: { type: String, default: null },
@ -291,6 +297,10 @@ export default {
components: { componentServices, applicationResources, ComponentUsed, AbilityDetail }, components: { componentServices, applicationResources, ComponentUsed, AbilityDetail },
data () { data () {
return { return {
exportExcel: CONFIGITEM.configData[CONFIGITEM.version].apiURL + '/census/center/export',
exportExcelCondition: '',
exportExcelType: '',
token: Cookies.get('ucsToken'),
detailType: '', detailType: '',
detailParamss: {}, detailParamss: {},
isBack: true, isBack: true,
@ -374,7 +384,7 @@ export default {
{ name: '基础设施', key: 3 }, { name: '基础设施', key: 3 },
{ name: '数据资源', key: 4 }, { name: '数据资源', key: 4 },
{ name: '知识库', key: 5 }, { name: '知识库', key: 5 },
{ name: '会议室', value: 6} { name: '会议室', value: 6 }
], ],
tableData: [], tableData: [],
tableData2: [ tableData2: [
@ -399,7 +409,7 @@ export default {
{ name: '通用开发组件', value: 3 }, { name: '通用开发组件', value: 3 },
{ name: '页面开发组件', value: 4 }, { name: '页面开发组件', value: 4 },
{ name: '应用资源', value: 5 }, { name: '应用资源', value: 5 },
{ name: '会议室', value: 6} { name: '会议室', value: 6 }
], // ], //
detailFlag: false, // detailFlag: false, //
startDate: '', // startDate: '', //
@ -482,7 +492,7 @@ export default {
this.status = '审核中' this.status = '审核中'
} else if (this.examineStatus == '1') { } else if (this.examineStatus == '1') {
this.status = '通过' this.status = '通过'
}else if (this.examineStatus == '2') { } else if (this.examineStatus == '2') {
this.status = '不通过' this.status = '不通过'
} else { } else {
this.status = this.examineStatus this.status = this.examineStatus
@ -530,6 +540,12 @@ export default {
} }
this.tableData = res.data.data this.tableData = res.data.data
this.total = res.data.data.total this.total = res.data.data.total
this.exportExcelCondition = qs.stringify({
approveStatus: this.status,
deptId: this.abilityDepartment,
startDate: this.startDate,
endDate: this.endDate
})
}) })
}, },
// 使-使 // 使-使
@ -588,6 +604,12 @@ export default {
} }
this.tableData = res.data.data this.tableData = res.data.data
this.total = res.data.data.total this.total = res.data.data.total
this.exportExcelCondition = qs.stringify({
approveStatus: this.status,
deptId: this.abilityDepartment,
startDate: this.startDate,
endDate: this.endDate
})
}) })
}, },
// //
@ -641,7 +663,7 @@ export default {
this.status = '审核中' this.status = '审核中'
} else if (this.examineStatus == '1') { } else if (this.examineStatus == '1') {
this.status = '通过' this.status = '通过'
} else if (this.examineStatus == '2') { } else if (this.examineStatus == '2') {
this.status = '不通过' this.status = '不通过'
} else { } else {
this.status = this.examineStatus this.status = this.examineStatus
@ -662,6 +684,12 @@ export default {
console.log('111111', this.tableData, res.data.data) console.log('111111', this.tableData, res.data.data)
this.tableData = res.data.data this.tableData = res.data.data
this.total = res.data.data.total this.total = res.data.data.total
this.exportExcelCondition = qs.stringify({
approveStatus: this.status,
deptId: this.abilityDepartment,
startDate: this.startDate,
endDate: this.endDate
})
}) })
}, },
// 使 // 使
@ -693,6 +721,12 @@ export default {
.then((res) => { .then((res) => {
this.tableData = res.data.data this.tableData = res.data.data
this.total = res.data.data.total this.total = res.data.data.total
this.exportExcelCondition = qs.stringify({
approveStatus: this.status,
deptId: this.abilityDepartment,
startDate: this.startDate,
endDate: this.endDate
})
}) })
}, },
getReleaseTree (page) { getReleaseTree (page) {
@ -799,6 +833,7 @@ export default {
if (!this.detailFlag) { if (!this.detailFlag) {
this.detailFlag = !this.detailFlag this.detailFlag = !this.detailFlag
} }
this.exportExcelType = 'SelectDeptDetailTypeCountList'
this.getFirstTree() this.getFirstTree()
} else if (this.choseId === 1) { } else if (this.choseId === 1) {
// this.getReleaseTree() // this.getReleaseTree()
@ -808,6 +843,7 @@ export default {
if (!this.detailFlag) { if (!this.detailFlag) {
this.detailFlag = !this.detailFlag this.detailFlag = !this.detailFlag
} }
this.exportExcelType = 'SelectApplyDeptDetailTypeCountList'
this.getSecondTree() this.getSecondTree()
} else { } else {
// this.getUsedTree() // this.getUsedTree()
@ -815,6 +851,7 @@ export default {
} else if (index === 3) { } else if (index === 3) {
this.detailFlag = false this.detailFlag = false
if (this.choseId === 0) { if (this.choseId === 0) {
this.exportExcelType = 'SelectCensusResourceTable'
this.getOneDetail() this.getOneDetail()
} else { } else {
// this.getUsedTree() // this.getUsedTree()
@ -822,6 +859,7 @@ export default {
} else if (index === 4) { } else if (index === 4) {
this.detailFlag = false this.detailFlag = false
if (this.choseId === 0) { if (this.choseId === 0) {
this.exportExcelType = 'SelectCensusApplyTable'
this.getTwoDetail() this.getTwoDetail()
} else { } else {
// this.getUsedTree() // this.getUsedTree()
@ -911,6 +949,13 @@ export default {
this.examineStatus = '' this.examineStatus = ''
this.abilityDepartment = '' this.abilityDepartment = ''
this.abilityType = '' this.abilityType = ''
this.approveStatus = ''
this.exportExcelCondition = qs.stringify({
approveStatus: this.status,
deptId: this.abilityDepartment,
startDate: this.startDate,
endDate: this.endDate
})
if (this.departmentId === 1) { if (this.departmentId === 1) {
// if (this.detailFlag) { // if (this.detailFlag) {
// this.handleChose(3) // this.handleChose(3)
@ -1100,4 +1145,31 @@ input::placeholder {
text-overflow: ellipsis; text-overflow: ellipsis;
word-break: break-all; word-break: break-all;
} }
.export {
display: inline-block;
width: 70px;
height: 40px;
line-height: 40px;
text-align: center;
border-radius: 5px;
background: #fff;
border: 1px solid #dcdfe6;
color: #000;
}
.export:hover {
border-color: #c5ddfd;
background-color: #ecf4fe;
color: #0058e1;
text-decoration: none;
}
.export:active {
border-color: #c5ddfd;
background-color: #ecf4fe;
color: #0058e1;
text-decoration: none;
}
.export:visited {
color: #fff;
text-decoration: none;
}
</style> </style>

View File

@ -81,7 +81,7 @@ export default {
init () { init () {
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs.dataForm.resetFields()
this.iconList = getIconList() this.iconList = getIconList()
this.dataForm.parentName = this.$t('menu.parentNameDefault') this.dataForm.parentName = this.$t('menu.parentNameDefault')
this.getMenuList() this.getMenuList()
@ -89,11 +89,12 @@ export default {
}, },
// //
getMenuList () { getMenuList () {
console.log('获取菜单位置1')
return this.$http.get('/sys/menu/list?type=0').then(({ data: res }) => { return this.$http.get('/sys/menu/list?type=0').then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
this.menuList = res.data this.menuList = res.data.filter(item => item.site === 0)
}).catch(() => {}) }).catch(() => {})
}, },
// , // ,
@ -114,11 +115,11 @@ export default {
}, },
// //
dataFormSubmitHandle: debounce(function () { dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => { this.$refs.dataForm.validate((valid) => {
if (!valid) { if (!valid) {
return false return false
} }
this.$http['post']('/devtools/menu', this.dataForm).then(({ data: res }) => { this.$http.post('/devtools/menu', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
@ -133,7 +134,7 @@ export default {
}) })
}).catch(() => {}) }).catch(() => {})
}) })
}, 1000, { 'leading': true, 'trailing': false }) }, 1000, { leading: true, trailing: false })
} }
} }
</script> </script>
@ -174,4 +175,4 @@ export default {
} }
} }
} }
</style> </style>

View File

@ -47,6 +47,13 @@
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="申请人所属部门" header-align="center" align="center">
<template slot-scope="scope">
<span>{{
(scope.row.params && scope.row.params.tAbilityApplicationDTOList[0].unit)
}}</span>
</template>
</el-table-column>
<el-table-column <el-table-column
:label="$t('process.system')" :label="$t('process.system')"
header-align="center" header-align="center"
@ -161,7 +168,8 @@ export default {
created () { created () {
bus.$off('competencyApplicationInit') bus.$off('competencyApplicationInit')
bus.$on('competencyApplicationInit', () => { bus.$on('competencyApplicationInit', () => {
this.getDataList() this.getDataList();
bus.$emit('updateTaskNum')
}) })
} }
} }

View File

@ -123,11 +123,12 @@ export default {
}, },
// //
getMenuList () { getMenuList () {
console.log('获取菜单位置2')
return this.$http.get('/sys/menu/list?type=0').then(({ data: res }) => { return this.$http.get('/sys/menu/list?type=0').then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
this.menuList = res.data this.menuList = res.data.filter(item => item.site === 0)
}).catch(() => {}) }).catch(() => {})
}, },
// //

View File

@ -1,3 +1,10 @@
<!--
* @Author: hisense.wuhongjian
* @Date: 2022-06-14 09:30:23
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-10-17 14:54:26
* @Description: 告诉大家这是什么
-->
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__menu"> <div class="mod-sys__menu">

View File

@ -15,6 +15,7 @@ const state = () => ({
accessToken: getAccessToken(), accessToken: getAccessToken(),
username: '', username: '',
realName: '', realName: '',
deptName: '',
userId: '', userId: '',
avatar: '', avatar: '',
role: 0, // role: 0, //
@ -26,6 +27,7 @@ const getters = {
avatar: (state) => state.avatar, avatar: (state) => state.avatar,
role: (state) => state.role, role: (state) => state.role,
userId: (state) => state.userId, userId: (state) => state.userId,
deptName: (state) => state.deptName,
} }
const mutations = { const mutations = {
/** /**
@ -64,6 +66,10 @@ const mutations = {
setUserId(state, id) { setUserId(state, id) {
state.userId = id state.userId = id
}, },
//
setDeptName(state, name) {
state.deptName = name
},
/** /**
* @author chuzhixin 1204505056@qq.com * @author chuzhixin 1204505056@qq.com
* @description 设置头像 * @description 设置头像
@ -136,6 +142,7 @@ const actions = {
commit('setRealname', res.data.data.realName) commit('setRealname', res.data.data.realName)
commit('setRole', res.data.data.roleIdList.length) commit('setRole', res.data.data.roleIdList.length)
commit('setUserId', res.data.data.id) commit('setUserId', res.data.data.id)
commit('setDeptName', res.data.data.deptName)
// TODO // TODO
// let { username, avatar, roles, ability } = data // let { username, avatar, roles, ability } = data
// if (username && roles && Array.isArray(roles)) { // if (username && roles && Array.isArray(roles)) {

File diff suppressed because it is too large Load Diff