能力上架 新增转办功能

This commit is contained in:
a0049873 2022-10-27 10:50:09 +08:00
parent 46ad5e747d
commit 4930027d67
2 changed files with 483 additions and 408 deletions

View File

@ -36,6 +36,7 @@
<div class="agreeOr" v-if="taskId"> <div class="agreeOr" v-if="taskId">
<h3>审批</h3> <h3>审批</h3>
<div> <div>
<el-button type="info" @click="entrustTask()" v-if='taskEntrustFlag && taskEntrustFlag2'>转办</el-button>
<el-button type="primary" @click="showDialog('同意')">同意</el-button> <el-button type="primary" @click="showDialog('同意')">同意</el-button>
<el-button type="danger" plain @click="showDialog('驳回')" <el-button type="danger" plain @click="showDialog('驳回')"
>驳回</el-button >驳回</el-button
@ -61,6 +62,7 @@
> --> > -->
</div> </div>
</div> </div>
<ren-task-entrust v-if="renTaskEntrustVisible" ref="renTaskEntrust"></ren-task-entrust>
<!-- 流程详情 --> <!-- 流程详情 -->
<ren-process-detail></ren-process-detail> <ren-process-detail></ren-process-detail>
<el-dialog <el-dialog
@ -84,6 +86,7 @@
</template> </template>
<script> <script>
import RenTaskEntrust from '@/components/ren-process-running/src/ren-task-entrust'
import bus from '@/views/bus.js' import bus from '@/views/bus.js'
import ResourcesAndServices from './ResourcesAndServices.vue' import ResourcesAndServices from './ResourcesAndServices.vue'
import debounce from 'lodash/debounce' import debounce from 'lodash/debounce'
@ -93,7 +96,8 @@ export default {
// //
// mixins: [processModule], // mixins: [processModule],
components: { components: {
ResourcesAndServices ResourcesAndServices,
RenTaskEntrust
}, },
props: { props: {
// fromList: { // fromList: {
@ -105,6 +109,9 @@ export default {
}, },
data () { data () {
return { return {
taskEntrustFlag: false,
taskEntrustFlag2: false,
renTaskEntrustVisible: false,
dialogVisible: false, dialogVisible: false,
dialogType: '', dialogType: '',
input: '', input: '',
@ -132,6 +139,35 @@ export default {
console.log('params=================>', this.$route, this.$route.params) console.log('params=================>', this.$route, this.$route.params)
this.taskId = this.$route.params.taskId this.taskId = this.$route.params.taskId
this.dataForm.taskId = this.$route.params.taskId this.dataForm.taskId = this.$route.params.taskId
this.$http.get('/sys/user/info').then(({ data: res }) => {
res.data.roleIdList.map(val => {
this.$http.get('/sys/role/' + val).then(role => {
if (role.data.data.name === '流程管理员') {
this.taskEntrustFlag = true
this.$http
.get(
'/act/task/getTaskVariables?taskId=' + this.$route.params.taskId + '&variableName=allowEntrust'
).then(entrust => {
console.log('11111111111111', entrust, this.dataForm)
if (entrust.data.data.allowEntrust === true) {
this.taskEntrustFlag2 = true
if (this.taskEntrustFlag && this.taskEntrustFlag2) {
this.$alert('当前审核部门为' + this.dataForm.deptName + ',该部门未配置审核人,请联系运维工程师配置完成后进行流程转办!', '流程提醒', {
confirmButtonText: '确定',
callback: action => {
// this.$message({
// type: 'info',
// message: `action: ${action}`
// })
}
})
}
}
})
}
})
})
})
this.init() this.init()
console.log('fromList', this.$router.currentRoute.params.businessKey) console.log('fromList', this.$router.currentRoute.params.businessKey)
// this.dataForm = this.$router.currentRoute.params.params.params.resourceDTO // this.dataForm = this.$router.currentRoute.params.params.params.resourceDTO
@ -154,6 +190,15 @@ export default {
}, },
computed: {}, computed: {},
methods: { methods: {
entrustTask () {
this.renTaskEntrustVisible = true
this.$nextTick(() => {
this.$refs.renTaskEntrust.dataForm.taskId = this.dataForm.taskId
this.$refs.renTaskEntrust.callbacks = this.callbacks
this.$refs.renTaskEntrust.init()
})
},
getInfo (id) { getInfo (id) {
this.$http.get('/resourceMountApply/' + id).then(({ data: res }) => { this.$http.get('/resourceMountApply/' + id).then(({ data: res }) => {
this.dataForm = res.data.resourceDTO this.dataForm = res.data.resourceDTO

View File

@ -8,40 +8,74 @@
<div class="bottom"> <div class="bottom">
<div class="item"> <div class="item">
<div class="zj">组件服务</div> <div class="zj">组件服务</div>
<div class="name" v-for="(item, index) in zjList.slice(0, 5)" :key="item.name" <div
:class="index == 4 ? 'name-last' : ''" @click="selectOne1(item.name)"> class="name"
v-for="(item, index) in zjList.slice(0, 5)"
:key="item.name"
:class="index == 4 ? 'name-last' : ''"
@click="selectOne1(item.name)"
>
{{ item.name + '-' + item.num + '项' }} {{ item.name + '-' + item.num + '项' }}
</div> </div>
<div class="btn" @click="jumpPage('组件服务')">查看更多</div> <div class="btn" @click="jumpPage('组件服务')">查看更多</div>
</div> </div>
<div class="item"> <div class="item">
<div class="yy">应用资源</div> <div class="yy">应用资源</div>
<div class="name" v-for="(item, index) in yyList.slice(0, 5)" :key="item.name" <div
:class="index == 4 ? 'name-last' : ''" @click="selectOne11(item.name)"> class="name"
v-for="(item, index) in yyList.slice(0, 5)"
:key="item.name"
:class="index == 4 ? 'name-last' : ''"
@click="selectOne11(item.name)"
>
{{ item.name + '-' + item.num + '项' }} {{ item.name + '-' + item.num + '项' }}
</div> </div>
<div class="btn" @click="jumpPage('应用资源')">查看更多</div> <div class="btn" @click="jumpPage('应用资源')">查看更多</div>
</div> </div>
<div class="item"> <div class="item">
<div class="jc">基础设施</div> <div class="jc">基础设施</div>
<div class="name" v-for="(item, index) in jcList.slice(0, 5)" :key="item.name" <div
:class="index == 2 ? 'name-last' : ''" @click="selectOne2(item.name)"> class="name"
{{ item.name + '-' + item.num + '项' }} v-for="(item, index) in jcList.slice(0, 5)"
:key="item.name"
:class="index == 2 ? 'name-last' : ''"
@click="selectOne2(item.name)"
>
{{
item.name +
'-' +
item.num +
(item.name == '会客厅'
? '间'
: item.name == '视频会议'
? '个'
: '项')
}}
</div> </div>
<div class="btn" @click="jumpPage('基础设施')">查看更多</div> <div class="btn" @click="jumpPage('基础设施')">查看更多</div>
</div> </div>
<div class="item"> <div class="item">
<div class="sj">数据资源</div> <div class="sj">数据资源</div>
<div class="name" v-for="(item, index) in sjList" :key="item.id" :class="index == 4 ? 'name-last' : ''" <div
@click="selectOne3(item.name)"> class="name"
v-for="(item, index) in sjList"
:key="item.id"
:class="index == 4 ? 'name-last' : ''"
@click="selectOne3(item.name)"
>
{{ index + 1 }}-{{ item.name }} {{ index + 1 }}-{{ item.name }}
</div> </div>
<div class="btn" @click="jumpPage('数据资源')">查看更多</div> <div class="btn" @click="jumpPage('数据资源')">查看更多</div>
</div> </div>
<div class="item"> <div class="item">
<div class="zs">知识库</div> <div class="zs">知识库</div>
<div class="name" v-for="(item, index) in zsList" :key="item.id" :class="index == 4 ? 'name-last' : ''" <div
@click="openHref(item)"> class="name"
v-for="(item, index) in zsList"
:key="item.id"
:class="index == 4 ? 'name-last' : ''"
@click="openHref(item)"
>
{{ index + 1 }}-{{ item.name }} {{ index + 1 }}-{{ item.name }}
</div> </div>
<div class="btn" @click="jumpPage('知识库')">查看更多</div> <div class="btn" @click="jumpPage('知识库')">查看更多</div>
@ -51,29 +85,29 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { import {
pageWithAttrs, pageWithAttrs,
getDataResource, getDataResource,
selectInfrastructureList, selectInfrastructureList,
selectCollectComponentList, selectCollectComponentList,
selectCollectResourceList selectCollectResourceList,
} from '@/api/home.js' } from '@/api/home.js'
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useStore } from 'vuex' import { useStore } from 'vuex'
import { updateVisits, browsingInsert, getSoldierList } from '@/api/home' import { updateVisits, browsingInsert, getSoldierList } from '@/api/home'
import { message, Upload } from 'ant-design-vue' import { message, Upload } from 'ant-design-vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const store = useStore() const store = useStore()
const router = useRouter() const router = useRouter()
const zjList = ref([]) const zjList = ref([])
const jcList = ref([]) const jcList = ref([])
const sjList = ref([]) const sjList = ref([])
const yyList = ref([]) const yyList = ref([])
// //
const zsList = ref([]) const zsList = ref([])
// const jcList = ref([]) // const jcList = ref([])
const paramsGetResources = { const paramsGetResources = {
districtId: '', districtId: '',
pageNum: 1, pageNum: 1,
pageSize: 5, pageSize: 5,
@ -82,19 +116,19 @@ const paramsGetResources = {
infoList: [], infoList: [],
orderField: 'total', // total visits 访 applyCount score collectCount orderField: 'total', // total visits 访 applyCount score collectCount
orderType: 'DESC', // ASC DESC orderType: 'DESC', // ASC DESC
} }
console.log('dataShowdev==========================>', whoShow) console.log('dataShowdev==========================>', whoShow)
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
const whoShow1 = ref(whoShow) const whoShow1 = ref(whoShow)
const interfaceSuccess = ref(0) const interfaceSuccess = ref(0)
const object = reactive({ const object = reactive({
yyNum: '', yyNum: '',
zjNum: '', zjNum: '',
jcNum: '', jcNum: '',
sjNum: '', sjNum: '',
zsNum: '', zsNum: '',
}) })
const getAppResources = (type, obj) => { const getAppResources = (type, obj) => {
paramsGetResources.type = type paramsGetResources.type = type
if (type === '数据资源' && !whoShow1.value.itShowBaoTou) { if (type === '数据资源' && !whoShow1.value.itShowBaoTou) {
getDataResource({ getDataResource({
@ -137,7 +171,7 @@ const getAppResources = (type, obj) => {
if (type == '基础设施') { if (type == '基础设施') {
jcList.value = [] jcList.value = []
selectInfrastructureList().then((res) => { selectInfrastructureList().then((res) => {
console.log('基础设施------res------>', res); console.log('基础设施------res------>', res)
for (const key in res.data.data) { for (const key in res.data.data) {
if (whoShow1.value.itShowXiHaiAn) { if (whoShow1.value.itShowXiHaiAn) {
if (key === '视频资源') { if (key === '视频资源') {
@ -146,8 +180,7 @@ const getAppResources = (type, obj) => {
num: res.data.data[key], num: res.data.data[key],
}) })
} }
} } else {
else {
jcList.value.push({ jcList.value.push({
name: key, name: key,
num: res.data.data[key], num: res.data.data[key],
@ -184,25 +217,23 @@ const getAppResources = (type, obj) => {
}) })
} }
}) })
} } else if (type == '组件服务') {
else if (type == '组件服务') {
zjList.value = [] zjList.value = []
selectCollectComponentList().then((res) => { selectCollectComponentList().then((res) => {
console.log('组件服务----res-------->', res); console.log('组件服务----res-------->', res)
for (const key in res.data.data) { for (const key in res.data.data) {
console.log('key------------>', key); console.log('key------------>', key)
zjList.value.push({ zjList.value.push({
name: key, name: key,
num: res.data.data[key], num: res.data.data[key],
}) })
} }
console.log('zjList------------>', zjList); console.log('zjList------------>', zjList)
}) })
} } else if (type == '应用资源') {
else if (type == '应用资源') {
yyList.value = [] yyList.value = []
selectCollectResourceList().then((res) => { selectCollectResourceList().then((res) => {
console.log('应用资源---res--------->', res); console.log('应用资源---res--------->', res)
for (const key in res.data.data) { for (const key in res.data.data) {
yyList.value.push({ yyList.value.push({
name: key, name: key,
@ -210,8 +241,7 @@ const getAppResources = (type, obj) => {
}) })
} }
}) })
} } else {
else {
pageWithAttrs(paramsGetResources).then((res) => { pageWithAttrs(paramsGetResources).then((res) => {
console.log('object个数======>', type) console.log('object个数======>', type)
obj.value = res.data.data.records obj.value = res.data.data.records
@ -232,10 +262,10 @@ const getAppResources = (type, obj) => {
}) })
} }
} }
} }
// todo // todo
const getSoldierData = (name) => { const getSoldierData = (name) => {
let _params = { let _params = {
type: name, type: name,
page: 1, page: 1,
@ -254,9 +284,9 @@ const getSoldierData = (name) => {
reject(err) reject(err)
}) })
}) })
} }
const openHref = (item) => { const openHref = (item) => {
console.log(item.id, 'wowowo') console.log(item.id, 'wowowo')
console.log(item.visits, 'wowowo') console.log(item.visits, 'wowowo')
browsingInsert({ resourceId: item.id }).then((res) => { browsingInsert({ resourceId: item.id }).then((res) => {
@ -274,17 +304,17 @@ const openHref = (item) => {
}) })
} }
window.open(item.link) window.open(item.link)
} }
const assignmentMethod = (type, res) => { const assignmentMethod = (type, res) => {
object[type] = res.data.data.total object[type] = res.data.data.total
} }
getAppResources('组件服务', zjList) getAppResources('组件服务', zjList)
getAppResources('应用资源', yyList) getAppResources('应用资源', yyList)
getAppResources('基础设施', jcList) getAppResources('基础设施', jcList)
getAppResources('数据资源', sjList) getAppResources('数据资源', sjList)
getAppResources('知识库', zsList) getAppResources('知识库', zsList)
function jumpPage(type) { function jumpPage(type) {
// store // store
store.commit('home/selectCardsData', { store.commit('home/selectCardsData', {
selectCardsnum: type, selectCardsnum: type,
@ -300,8 +330,8 @@ function jumpPage(type) {
select: type, select: type,
}, },
}) })
} }
const selectOne = (id) => { const selectOne = (id) => {
console.log('点击===============》', id) console.log('点击===============》', id)
router.push({ router.push({
path: '/details', path: '/details',
@ -309,8 +339,8 @@ const selectOne = (id) => {
id: id, id: id,
}, },
}) })
} }
const selectOne1 = (name) => { const selectOne1 = (name) => {
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
query: { query: {
@ -318,8 +348,8 @@ const selectOne1 = (name) => {
select: '组件服务', select: '组件服务',
}, },
}) })
} }
const selectOne11 = (name) => { const selectOne11 = (name) => {
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
query: { query: {
@ -327,15 +357,15 @@ const selectOne11 = (name) => {
select: '应用资源', select: '应用资源',
}, },
}) })
} }
const selectOne2 = (name) => { const selectOne2 = (name) => {
let names='' let names = ''
if(name ==='云资源'){ if (name === '云资源') {
names='政务云资源' names = '政务云资源'
} else if(name ==='会客厅'){ } else if (name === '会客厅') {
names='城市云脑会客厅' names = '城市云脑会客厅'
}else{ } else {
names=name names = name
} }
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
@ -344,8 +374,8 @@ const selectOne2 = (name) => {
select: '基础设施', select: '基础设施',
}, },
}) })
} }
const selectOne3 = (name) => { const selectOne3 = (name) => {
console.log('点击===============》', name) console.log('点击===============》', name)
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
@ -354,10 +384,10 @@ const selectOne3 = (name) => {
select: '数据资源', select: '数据资源',
}, },
}) })
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.capability-convergence { .capability-convergence {
height: 7.2rem; height: 7.2rem;
background: url('~@/assets/newHome/Convergence-bg.png') no-repeat; background: url('~@/assets/newHome/Convergence-bg.png') no-repeat;
background-size: 100%; background-size: 100%;
@ -482,5 +512,5 @@ const selectOne3 = (name) => {
} }
} }
} }
} }
</style> </style>