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

This commit is contained in:
wuhongjian 2022-10-27 15:48:26 +08:00
commit 9a2c2c07d1
9 changed files with 1086 additions and 1083 deletions

View File

@ -71,7 +71,7 @@
<!--操作按钮查询--> <!--操作按钮查询-->
<el-form-item> <el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button> <el-button type="primary" @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item> </el-form-item>
<!--操作按钮重置--> <!--操作按钮重置-->
<el-form-item> <el-form-item>

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

@ -9,7 +9,7 @@
> >
<div class="content"> <div class="content">
<img class="img" :src="dataInfo.imgSrc" /> <img class="img" :src="dataInfo.imgSrc" />
<div class="title">{{ title }}</div> <div class="title">{{ '我的'+title }}</div>
<div class="flex-row-bottom"> <div class="flex-row-bottom">
<span class="num" :style="{ color: dataInfo.textColor }">{{ <span class="num" :style="{ color: dataInfo.textColor }">{{
formatNum(dataInfo.num) formatNum(dataInfo.num)
@ -90,7 +90,7 @@
</div> </div>
<div class="more" @click="goPage(dataInfo.url)">查看更多 ></div> <div class="more" @click="goPage(dataInfo.url)">查看更多 ></div>
</div> </div>
<div class="list-box flex-row-center no-data" v-else>暂无数据</div> <div class="list-box flex-row-center no-data" v-else>暂无{{title}}任务</div>
</div> </div>
</template> </template>
<script> <script>

View File

@ -3,8 +3,8 @@
<!-- --> <!-- -->
<div class="flex-row-start top"> <div class="flex-row-start top">
<div class="flex-row-start dept-left"> <div class="flex-row-start dept-left">
<dept-todo-view title="部门待办" v-loading="loadingToDo" :dataInfo="toToData"></dept-todo-view> <dept-todo-view title="待办" v-loading="loadingToDo" :dataInfo="toToData"></dept-todo-view>
<dept-todo-view title="部门已办" v-loading="loadingHasToDo" :dataInfo="hasToDodoData" <dept-todo-view title="已办" v-loading="loadingHasToDo" :dataInfo="hasToDodoData"
style="margin-left: 0"></dept-todo-view> style="margin-left: 0"></dept-todo-view>
</div> </div>
<div class="flex-row-start dept-chart-box"> <div class="flex-row-start dept-chart-box">
@ -56,7 +56,7 @@ export default {
list: [], list: [],
type: 'todo', type: 'todo',
// url: 'activiti-my-todo-task', // url: 'activiti-my-todo-task',
url: 'myAgent-CompetencyApplication', url: 'myAgent-CompetencyApplication'
}, },
// //
hasToDodoData: { hasToDodoData: {
@ -69,7 +69,7 @@ export default {
num: 0, num: 0,
list: [], list: [],
// url: 'activiti-my-join-task', // url: 'activiti-my-join-task',
url: 'hasToDoTasks-CompetencyApplication', url: 'hasToDoTasks-CompetencyApplication'
}, },
// //
resourceData: [], resourceData: [],
@ -103,43 +103,53 @@ export default {
// //
getToDo () { getToDo () {
this.loadingToDo = true this.loadingToDo = true
const data = { // const data = {
limit: 5, // limit: 5,
page: 1 // page: 1
} // }
Apis.getToDoTask(data, res => { this.$http.get('/act/task/myToDoTaskPage?page=1&limit=5').then(res => {
this.loadingToDo = false this.loadingToDo = false
if (res.data.code !== 0) { this.toToData.list = res.data.data.list || []
return this.$message.error(res.data.msg)
}
console.log('res----待办-------->', res.data)
this.toToData.list = res.data.data.records || []
this.toToData.num = res.data.data.total || 0 this.toToData.num = res.data.data.total || 0
}, err => {
this.$message.error(err)
this.loadingToDo = false
}) })
// Apis.getToDoTask(data, res => {
// this.loadingToDo = false
// if (res.data.code !== 0) {
// return this.$message.error(res.data.msg)
// }
// console.log('res------------>', res.data)
// this.toToData.list = res.data.data.records || []
// this.toToData.num = res.data.data.total || 0
// }, err => {
// this.$message.error(err)
// this.loadingToDo = false
// })
}, },
// //
getHasToDo () { getHasToDo () {
const data = { // const data = {
limit: 5, // limit: 5,
page: 1 // page: 1
} // }
this.loadingHasToDo = true this.loadingHasToDo = true
Apis.getHasToDoTask(data, res => { this.$http.get('/act/his/getMyHandledInstancePage?page=1&limit=5').then(res => {
this.loadingHasToDo = false this.loadingHasToDo = false
if (res.data.code !== 0) { this.hasToDodoData.list = res.data.data.list || []
return this.$message.error(res.data.msg)
}
console.log('res----已办-------->', res.data)
this.hasToDodoData.list = res.data.data.records || []
this.hasToDodoData.num = res.data.data.total || 0 this.hasToDodoData.num = res.data.data.total || 0
}, err => {
this.$message.error(err)
this.loadingHasToDo = false
console.log('err-----已办------->', err)
}) })
// Apis.getHasToDoTask(data, res => {
// this.loadingHasToDo = false
// if (res.data.code !== 0) {
// return this.$message.error(res.data.msg)
// }
// console.log('res------------>', res.data)
// this.hasToDodoData.list = res.data.data.records || []
// this.hasToDodoData.num = res.data.data.total || 0
// }, err => {
// this.$message.error(err)
// this.loadingHasToDo = false
// console.log('err------------>', err)
// })
}, },
// //
getShelvesTotal () { getShelvesTotal () {

View File

@ -79,6 +79,7 @@ const params = {
// //
const changeAreaFunction = (val) => { const changeAreaFunction = (val) => {
params.pageNum = 1;
typeName2.value = val typeName2.value = val
params.area = typeName2.value == '全部' ? '' : typeName2.value; params.area = typeName2.value == '全部' ? '' : typeName2.value;
selectFlag2.value = false selectFlag2.value = false
@ -105,7 +106,8 @@ const algorithmCardPhoto = (item) => {
if(item.pic && typeof item.pic == 'string') { if(item.pic && typeof item.pic == 'string') {
_arr = JSON.parse(item.pic) _arr = JSON.parse(item.pic)
} }
let _img = _arr[0] && _arr[0].img || '' let _img = _arr[0] && _arr[0].img || imgSrc.value;
console.log('_img------------>', _img);
return _img return _img
} }
// //
@ -160,7 +162,13 @@ const changeDeptType = (str) => {
break break
} }
params.pageNum = 1; params.pageNum = 1;
params.deptType = deptType.value; if(deptType.value !== null && deptType.value !== undefined) {
params.deptType = deptType.value;
}else {
if(Object.keys(params).includes('deptType')) {
delete params.deptType
}
}
} }
selectFlag.value = false selectFlag.value = false
getData(str) getData(str)
@ -169,7 +177,7 @@ const changeDeptType = (str) => {
const getData = (str) => { const getData = (str) => {
getGisByArea(params).then((res) => { getGisByArea(params).then((res) => {
const resData = res.data.data || {} const resData = res.data.data || {}
if (resData.list.length > 0 && resData.list.length < 9) { if (resData.list.length > 0 && resData.list.length < 9 && algorithmclassDom) {
algorithmclassDom.removeEventListener('scroll', algorithmFunction, true) algorithmclassDom.removeEventListener('scroll', algorithmFunction, true)
} }
dataList.value = resData.list || [] dataList.value = resData.list || []

View File

@ -22,17 +22,29 @@
</div> </div>
<div class="bottom" v-show="selectFlag2"> <div class="bottom" v-show="selectFlag2">
<span class="light"></span> <span class="light"></span>
<div v-for="val in dictList" :key="val" @click="changeAreaFunction(val)"> <div
v-for="val in dictList"
:key="val"
@click="changeAreaFunction(val)"
>
{{ val }} {{ val }}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="algorithm-class"> <div class="algorithm-class">
<div v-for="(item, index) in dataList" :key="`algorithm-${index}`" class="algorithm-card"> <div
<a-image :src="item.pic" :width="525" :height="275" :fallback="imgSrc" v-for="(item, index) in dataList"
:preview="false"></a-image> :key="`algorithm-${index}`"
class="algorithm-card"
>
<a-image
:src="item.pic || imgSrc"
:width="525"
:height="275"
:fallback="imgSrc"
:preview="false"
></a-image>
<a-tooltip> <a-tooltip>
<template #title>{{ item.name }}</template> <template #title>{{ item.name }}</template>
<div class="algorithm-card-title" @click="detailFunction(item.id)"> <div class="algorithm-card-title" @click="detailFunction(item.id)">
@ -45,289 +57,284 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { getCategoryTreePage } from '@/api/personalCenter' import { getCategoryTreePage } from '@/api/personalCenter'
import { getGisByArea } from '@/api/home' import { getGisByArea } from '@/api/home'
import { ref, onMounted, onBeforeUnmount, nextTick } from 'vue' import { ref, onMounted, onBeforeUnmount, nextTick } from 'vue'
const deptType = ref(null)
const deptType = ref(null) const typeName = ref('全市')
const typeName = ref('全市') const typeName2 = ref('全部')
const typeName2 = ref('全部') const dictList = ref([])
const dictList = ref([]) const dataList = ref([])
const dataList = ref([]) const selectFlag2 = ref(false)
const selectFlag2 = ref(false) const selectFlag = ref(false)
const selectFlag = ref(false) getCategoryTreePage({
getCategoryTreePage({ page: 1,
page: 1, limit: 99,
limit: 99, dictTypeId: '1513712507692818433',
dictTypeId: '1513712507692818433', }).then((res) => {
}).then((res) => { dictList.value = ['全部']
dictList.value = ['全部'] res.data.data.list.map((val) => {
res.data.data.list.map((val) => { // if (val.dictLabel !== '') {
// if (val.dictLabel !== '') { dictList.value.push(val.dictLabel)
dictList.value.push(val.dictLabel) // }
// }
})
})
const params = {
pageNum: 1,
type: '图层服务',
area: typeName2.value == '全部' ? '' : typeName2.value,
pageSize: 9 // 9
}
//
const changeAreaFunction = (val) => {
typeName2.value = val
params.area = typeName2.value == '全部' ? '' : typeName2.value;
selectFlag2.value = false
pageWithAttrsFunction()
}
let algorithmclassDom = null
const imgSrc = ref(require('@/assets/capacitySquare/algorithm-photo2.jpg'))
const dataLength = ref(true)
const isNoMore = ref(false)
const pageWithAttrsFunction = () => {
getGisByArea(params).then((res) => {
dataList.value = res.data.data.list
if (res.data.data.list.length < 9) {
dataLength.value = false
}
})
}
pageWithAttrsFunction()
//
const detailFunction = (id) => {
window.open(window.SITE_CONFIG.previewUrl + `#/details?id=${id}`)
}
const changeDeptType = (str) => {
if (str) {
if(algorithmclassDom) {
algorithmclassDom.scrollTop = 0
}
switch (str) {
case '全市':
deptType.value = null
typeName.value = '全 市'
break
case '市级':
deptType.value = 2
typeName.value = '市 级'
break
case '区级':
deptType.value = 3
typeName.value = '区 级'
break
case '企业':
deptType.value = 4
typeName.value = '企 业'
break
}
params.pageNum = 1;
params.deptType = deptType.value;
}
selectFlag.value = false
getData(str)
}
const getData = (str) => {
getGisByArea(params).then((res) => {
const resData = res.data.data || {}
if (resData.list.length > 0 && resData.list.length < 9) {
algorithmclassDom.removeEventListener('scroll', algorithmFunction, true)
}
dataList.value = resData.list || []
nextTick(() => {
algorithmclassDom = document.querySelector('.algorithm-box')
if (str && algorithmclassDom) {
algorithmclassDom.removeEventListener('scroll', algorithmFunction, true)
algorithmclassDom.addEventListener('scroll', algorithmFunction, true)
}
}) })
}) })
} const params = {
pageNum: 1,
const layerFunction = (e) => { type: '图层服务',
var scrollTop = e.currentTarget.scrollTop area: typeName2.value == '全部' ? '' : typeName2.value,
var windowHeight = e.currentTarget.clientHeight pageSize: 9, // 9
var scrollHeight = e.currentTarget.scrollHeight }
console.log(scrollTop, windowHeight, scrollHeight, '123') //
if ( const changeAreaFunction = (val) => {
scrollTop + windowHeight <= scrollHeight + 1 && params.pageNum = 1
scrollTop + windowHeight >= scrollHeight - 1 typeName2.value = val
) { params.area = typeName2.value == '全部' ? '' : typeName2.value
// selectFlag2.value = false
isNoMore.value = true pageWithAttrsFunction()
params.pageNum++ }
let algorithmclassDom = null
const imgSrc = ref(require('@/assets/capacitySquare/algorithm-photo2.jpg'))
const dataLength = ref(true)
const isNoMore = ref(false)
const pageWithAttrsFunction = () => {
getGisByArea(params).then((res) => { getGisByArea(params).then((res) => {
dataList.value.push(...res.data.data.list) dataList.value = res.data.data.list
if (res.data.data.list.length < 9) { if (res.data.data.list.length < 9) {
dataLength.value = false dataLength.value = false
} }
}) })
} else {
isNoMore.value = false
} }
} pageWithAttrsFunction()
onMounted(() => { //
algorithmclassDom = document.querySelector('.algorithm-class') const detailFunction = (id) => {
if (dataLength.value) { window.open(window.SITE_CONFIG.previewUrl + `#/details?id=${id}`)
//
algorithmclassDom.addEventListener('scroll', layerFunction, true)
} }
}) const changeDeptType = (str) => {
onBeforeUnmount(() => { if (str) {
algorithmclassDom.removeEventListener('scroll', layerFunction, true) if (algorithmclassDom) {
}) algorithmclassDom.scrollTop = 0
}
switch (str) {
case '全市':
deptType.value = null
typeName.value = '全 市'
break
case '市级':
deptType.value = 2
typeName.value = '市 级'
break
case '区级':
deptType.value = 3
typeName.value = '区 级'
break
case '企业':
deptType.value = 4
typeName.value = '企 业'
break
}
params.pageNum = 1
if (deptType.value !== null && deptType.value !== undefined) {
params.deptType = deptType.value
} else {
if (Object.keys(params).includes('deptType')) {
delete params.deptType
}
}
}
selectFlag.value = false
getData(str)
}
const getData = (str) => {
getGisByArea(params).then((res) => {
const resData = res.data.data || {}
if (
resData.list.length > 0 &&
resData.list.length < 9 &&
algorithmclassDom
) {
algorithmclassDom.removeEventListener('scroll', algorithmFunction, true)
}
dataList.value = resData.list || []
nextTick(() => {
algorithmclassDom = document.querySelector('.algorithm-box')
if (str && algorithmclassDom) {
algorithmclassDom.removeEventListener(
'scroll',
algorithmFunction,
true
)
algorithmclassDom.addEventListener('scroll', algorithmFunction, true)
}
})
})
}
const layerFunction = (e) => {
var scrollTop = e.currentTarget.scrollTop
var windowHeight = e.currentTarget.clientHeight
var scrollHeight = e.currentTarget.scrollHeight
console.log(scrollTop, windowHeight, scrollHeight, '123')
if (
scrollTop + windowHeight <= scrollHeight + 1 &&
scrollTop + windowHeight >= scrollHeight - 1
) {
//
isNoMore.value = true
params.pageNum++
getGisByArea(params).then((res) => {
dataList.value.push(...res.data.data.list)
if (res.data.data.list.length < 9) {
dataLength.value = false
}
})
} else {
isNoMore.value = false
}
}
onMounted(() => {
algorithmclassDom = document.querySelector('.algorithm-class')
if (dataLength.value) {
//
algorithmclassDom.addEventListener('scroll', layerFunction, true)
}
})
onBeforeUnmount(() => {
algorithmclassDom.removeEventListener('scroll', layerFunction, true)
})
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.algorithm { .algorithm {
.select { .select {
margin: 0.1rem 0 0.1rem 0.2rem; margin: 0.1rem 0 0.1rem 0.2rem;
color: #fff; color: #fff;
font-size: 0.2rem; font-size: 0.2rem;
font-family: webfont; font-family: webfont;
position: relative;
.top {
cursor: pointer;
width: 3.61rem;
height: 0.85rem;
font-weight: 600;
text-align: center;
padding-top: 0.1rem;
background: url('~@/assets/capacitySquare/select-bg.png') no-repeat;
background-size: 100%;
position: relative; position: relative;
.top {
.light { cursor: pointer;
width: 0.56rem; width: 3.61rem;
height: 3px; height: 0.85rem;
position: absolute; font-weight: 600;
top: 0.4rem;
left: 1.52rem;
background: url('~@/assets/capacitySquare/select-light1.png') no-repeat;
background-size: 100%;
}
}
.bottom {
cursor: pointer;
position: absolute;
top: 0.5rem;
left: 0.9rem;
z-index: 1000;
background: rgba(57, 134, 239, 0.68);
border: 1px solid #aed5ff;
.light {
display: inline-block;
width: 2.39rem;
height: 5px;
position: absolute;
top: -0.08rem;
left: -0.3rem;
background: url('~@/assets/capacitySquare/select-light2.png') no-repeat;
background-size: 100%;
}
&>div {
width: 1.8rem;
height: 0.4rem;
line-height: 0.4rem;
text-align: center; text-align: center;
border-top: 1px solid #aed5ff; padding-top: 0.1rem;
} background: url('~@/assets/capacitySquare/select-bg.png') no-repeat;
background-size: 100%;
&>div:nth-of-type(1) { position: relative;
border: none; .light {
} width: 0.56rem;
} height: 3px;
} position: absolute;
top: 0.4rem;
.algorithm-class { left: 1.52rem;
// margin-top: 0.6rem; background: url('~@/assets/capacitySquare/select-light1.png')
margin-bottom: 0.18rem; no-repeat;
display: grid; background-size: 100%;
grid-template-columns: repeat(3, 33%);
height: 8.8rem;
overflow: auto;
margin-left: 1.15rem;
margin-right: 0.15rem;
.algorithm-card {
height: 2.75rem;
width: 5.23rem;
background: url('~@/assets/capacitySquare/algorithm-bg.png') no-repeat;
background-size: 100% 100%;
margin-bottom: 0.4rem;
margin-right: 0.65rem;
position: relative;
:deep(.ant-image) {
img {
margin-top: 0.15rem;
height: 2.45rem;
width: 5.05rem;
margin-left: 0.1rem;
} }
} }
.bottom {
.algorithm-card-photo { cursor: pointer;
height: 100%;
width: 100%;
background: url('~@/assets/capacitySquare/algorithm-photo.jpg') no-repeat;
background-size: 100%;
}
.algorithm-card-title {
position: absolute; position: absolute;
height: 0.6rem; top: 0.5rem;
margin-left: 0.08rem; left: 0.9rem;
width: 97%; z-index: 1000;
color: #ffffff; background: rgba(57, 134, 239, 0.68);
font-size: 0.22rem; border: 1px solid #aed5ff;
font-family: alibaba; .light {
bottom: 0.15rem; display: inline-block;
padding-left: 0.22rem; width: 2.39rem;
background: url('~@/assets/capacitySquare/algorithm-title-bg.png') no-repeat; height: 5px;
background-size: 100%; position: absolute;
display: flex; top: -0.08rem;
flex-direction: column; left: -0.3rem;
justify-content: center; background: url('~@/assets/capacitySquare/select-light2.png')
no-repeat;
span { background-size: 100%;
line-height: 0.24rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
} }
& > div {
span:last-child { width: 1.8rem;
font-size: 0.14rem; height: 0.4rem;
line-height: 0.4rem;
text-align: center;
border-top: 1px solid #aed5ff;
}
& > div:nth-of-type(1) {
border: none;
} }
} }
} }
.algorithm-class {
// margin-top: 0.6rem;
margin-bottom: 0.18rem;
display: grid;
grid-template-columns: repeat(3, 33%);
height: 8.8rem;
overflow: auto;
margin-left: 1.15rem;
margin-right: 0.15rem;
.algorithm-card {
height: 2.75rem;
width: 5.23rem;
background: url('~@/assets/capacitySquare/algorithm-bg.png') no-repeat;
background-size: 100% 100%;
margin-bottom: 0.4rem;
margin-right: 0.65rem;
position: relative;
:deep(.ant-image) {
img {
margin-top: 0.15rem;
height: 2.45rem;
width: 5.05rem;
margin-left: 0.1rem;
}
}
.algorithm-card-photo {
height: 100%;
width: 100%;
background: url('~@/assets/capacitySquare/algorithm-photo.jpg')
no-repeat;
background-size: 100%;
}
.algorithm-card-title {
position: absolute;
height: 0.6rem;
margin-left: 0.08rem;
width: 97%;
color: #ffffff;
font-size: 0.22rem;
font-family: alibaba;
bottom: 0.15rem;
padding-left: 0.22rem;
background: url('~@/assets/capacitySquare/algorithm-title-bg.png')
no-repeat;
background-size: 100%;
display: flex;
flex-direction: column;
justify-content: center;
span {
line-height: 0.24rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
}
span:last-child {
font-size: 0.14rem;
}
}
}
}
.algorithm-class::-webkit-scrollbar-track-piece {
background: #a5bcdb;
border-radius: 0.08rem;
}
.algorithm-class::-webkit-scrollbar-thumb {
height: 3.2rem;
background: linear-gradient(to bottom, #47d7f5, #3dc6e3);
}
.algorithm-class::-webkit-scrollbar {
height: 8.8rem;
width: 0.08rem;
border-radius: 0.08rem;
}
} }
</style>
.algorithm-class::-webkit-scrollbar-track-piece {
background: #a5bcdb;
border-radius: 0.08rem;
}
.algorithm-class::-webkit-scrollbar-thumb {
height: 3.2rem;
background: linear-gradient(to bottom, #47d7f5, #3dc6e3);
}
.algorithm-class::-webkit-scrollbar {
height: 8.8rem;
width: 0.08rem;
border-radius: 0.08rem;
}
}
</style>

View File

@ -513,7 +513,7 @@
<!-- 离线 --> <!-- 离线 -->
<a v-if="record.status != 1" class="disabled-text">预览</a> <a v-if="record.status != 1" class="disabled-text">预览</a>
<a-tooltip v-else placement="top"> <a-tooltip v-else placement="top">
<template #title>请申请后在我的申请中预览视频!</template> <template #title>请申请后在我的申请中观看视频!</template>
<a <a
@click=" @click="
openVideo( openVideo(
@ -591,7 +591,7 @@
<template #title> <template #title>
<span>视频预览</span> <span>视频预览</span>
<span style="color: #ff4d4f; margin-left: 10px"> <span style="color: #ff4d4f; margin-left: 10px">
{{ `(请申请后在我的申请中预览视频)` }} {{ `(请申请后在我的申请中观看视频)` }}
</span> </span>
</template> </template>
<template #footer></template> <template #footer></template>
@ -2263,14 +2263,14 @@
if (index) { if (index) {
itemData = selectedList.value[index] itemData = selectedList.value[index]
} }
let msg = '请申请后在我的申请中预览视频!' let msg = '请申请后在我的申请中观看视频!'
if ( if (
(itemData && itemData.status != 1) || (itemData && itemData.status != 1) ||
(rowClickData.value && rowClickData.value.status != 1) (rowClickData.value && rowClickData.value.status != 1)
) { ) {
msg = '当前视频离线不可预览!' msg = '当前视频离线不可预览!'
} else { } else {
msg = '请申请后在我的申请中预览视频!' msg = '请申请后在我的申请中观看视频!'
} }
message.warning(msg) message.warning(msg)
} }

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,436 +85,432 @@
</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,
type: '', type: '',
name: '', name: '',
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({
serviceName: paramsGetResources.name || '', // serviceName: paramsGetResources.name || '', //
orderField: whoShow1.value.itShowQingDao ? 'fbrq' : 'createTime', // orderField: whoShow1.value.itShowQingDao ? 'fbrq' : 'createTime', //
orderType: paramsGetResources.orderType.toLowerCase(), //descasc orderType: paramsGetResources.orderType.toLowerCase(), //descasc
pageNum: paramsGetResources.pageNum, // pageNum: paramsGetResources.pageNum, //
pageSize: paramsGetResources.pageSize, // pageSize: paramsGetResources.pageSize, //
}).then((res) => { }).then((res) => {
console.log('数据资源==================>', res.data.data) console.log('数据资源==================>', res.data.data)
if (whoShow1.value.itShowQingDao) { if (whoShow1.value.itShowQingDao) {
res.data.data.data.forEach((val) => { res.data.data.data.forEach((val) => {
val.id = val.guid // id val.id = val.guid // id
val.name = val.zyname // val.name = val.zyname //
val.sjlCount = val.sjcczl // val.sjlCount = val.sjcczl //
val.applyCount = val.syqk // val.applyCount = val.syqk //
val.deptName = val.TGBM // val.deptName = val.TGBM //
val.createDate = val.fbrq // val.createDate = val.fbrq //
val.description = val.xgxt // val.description = val.xgxt //
}) })
obj.value = res.data.data.data || [] obj.value = res.data.data.data || []
object.sjNum = res.data.data.rows object.sjNum = res.data.data.rows
} else if (whoShow1.value.itShowXiHaiAn) { } else if (whoShow1.value.itShowXiHaiAn) {
res.data.data.list.forEach((val) => { res.data.data.list.forEach((val) => {
val.id = val.serviceId // id val.id = val.serviceId // id
val.name = val.serviceName // val.name = val.serviceName //
val.sjlCount = val.requestQuantity // val.sjlCount = val.requestQuantity //
val.applyCount = val.requestCount // val.applyCount = val.requestCount //
val.deptName = val.departmentName // val.deptName = val.departmentName //
val.createTime = val.createTime.split('.')[0] val.createTime = val.createTime.split('.')[0]
val.createDate = val.createTime // val.createDate = val.createTime //
}) })
obj.value = res.data.data.list || [] obj.value = res.data.data.list || []
object.sjNum = res.data.data.total object.sjNum = res.data.data.total
} }
}) })
} else { } else {
let type = paramsGetResources.type let type = paramsGetResources.type
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 === '视频资源') {
jcList.value.push({
name: key,
num: res.data.data[key],
})
}
} else {
jcList.value.push({ jcList.value.push({
name: key, name: key,
num: res.data.data[key], num: res.data.data[key],
}) })
} }
} }
else { // jcList.value.push({
jcList.value.push({ // name: '',
// num: 4,
// })
// 西-
if (whoShow1.value.itShowXiHaiAn) {
getSoldierData('无人机')
.then((res) => {
let { total = 0 } = res.data.data
jcList.value.push({
name: '无人机',
num: total,
})
})
.catch((err) => {
console.log('err--无人机---------->', err)
})
getSoldierData('单兵设备')
.then((res) => {
let { total = 0 } = res.data.data
jcList.value.push({
name: '单兵设备',
num: total,
})
})
.catch((err) => {
console.log('err--单兵设备---------->', err)
})
}
})
} else if (type == '组件服务') {
zjList.value = []
selectCollectComponentList().then((res) => {
console.log('组件服务----res-------->', res)
for (const key in res.data.data) {
console.log('key------------>', key)
zjList.value.push({
name: key, name: key,
num: res.data.data[key], num: res.data.data[key],
}) })
} }
} console.log('zjList------------>', zjList)
// jcList.value.push({ })
// name: '', } else if (type == '应用资源') {
// num: 4, yyList.value = []
// }) selectCollectResourceList().then((res) => {
// 西- console.log('应用资源---res--------->', res)
if (whoShow1.value.itShowXiHaiAn) { for (const key in res.data.data) {
getSoldierData('无人机') yyList.value.push({
.then((res) => { name: key,
let { total = 0 } = res.data.data num: res.data.data[key],
jcList.value.push({
name: '无人机',
num: total,
})
}) })
.catch((err) => { }
console.log('err--无人机---------->', err) })
}) } else {
getSoldierData('单兵设备') pageWithAttrs(paramsGetResources).then((res) => {
.then((res) => { console.log('object个数======>', type)
let { total = 0 } = res.data.data obj.value = res.data.data.records
jcList.value.push({ switch (type) {
name: '单兵设备', case '组件服务':
num: total, assignmentMethod('zjNum', res)
}) break
}) case '应用资源':
.catch((err) => { assignmentMethod('yyNum', res)
console.log('err--单兵设备---------->', err) break
}) case '基础设施':
} assignmentMethod('jcNum', res)
}) break
} case '知识库':
else if (type == '组件服务') { assignmentMethod('zsNum', res)
zjList.value = [] break
selectCollectComponentList().then((res) => { }
console.log('组件服务----res-------->', res); })
for (const key in res.data.data) { }
console.log('key------------>', key);
zjList.value.push({
name: key,
num: res.data.data[key],
})
}
console.log('zjList------------>', zjList);
})
}
else if (type == '应用资源') {
yyList.value = []
selectCollectResourceList().then((res) => {
console.log('应用资源---res--------->', res);
for (const key in res.data.data) {
yyList.value.push({
name: key,
num: res.data.data[key],
})
}
})
}
else {
pageWithAttrs(paramsGetResources).then((res) => {
console.log('object个数======>', type)
obj.value = res.data.data.records
switch (type) {
case '组件服务':
assignmentMethod('zjNum', res)
break
case '应用资源':
assignmentMethod('yyNum', res)
break
case '基础设施':
assignmentMethod('jcNum', res)
break
case '知识库':
assignmentMethod('zsNum', res)
break
}
})
} }
} }
}
// todo // todo
const getSoldierData = (name) => { const getSoldierData = (name) => {
let _params = { let _params = {
type: name, type: name,
page: 1, page: 1,
limit: 10, limit: 10,
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getSoldierList(_params) getSoldierList(_params)
.then((res) => { .then((res) => {
resolve(res) resolve(res)
console.log('res---获取无人机、单兵设备--------->', res) console.log('res---获取无人机、单兵设备--------->', res)
if (res.data.code !== 0) { if (res.data.code !== 0) {
return message.error(res.data.msg) return message.error(res.data.msg)
} }
}) })
.catch((err) => { .catch((err) => {
reject(err) reject(err)
}) })
})
}
const openHref = (item) => {
console.log(item.id, 'wowowo')
console.log(item.visits, 'wowowo')
browsingInsert({ resourceId: item.id }).then((res) => {
// console.log(res)
})
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value.indexOf(item.id) === -1) {
arrList.value.push(item.id)
updateVisits({
id: item.id,
visits: item.visits || '0',
}).then(() => {
window.sessionStorage.setItem('visits', JSON.stringify(arrList.value))
}) })
} }
window.open(item.link)
}
const assignmentMethod = (type, res) => {
object[type] = res.data.data.total
}
getAppResources('组件服务', zjList)
getAppResources('应用资源', yyList)
getAppResources('基础设施', jcList)
getAppResources('数据资源', sjList)
getAppResources('知识库', zsList)
function jumpPage(type) { const openHref = (item) => {
// store console.log(item.id, 'wowowo')
store.commit('home/selectCardsData', { console.log(item.visits, 'wowowo')
selectCardsnum: type, browsingInsert({ resourceId: item.id }).then((res) => {
}) // console.log(res)
console.log( })
'选中===================>', const arrList = ref([])
store.getters['home/selectCardsnum'] arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
) if (arrList.value.indexOf(item.id) === -1) {
// router.push({ path: '/DetailsPageconetent' }) arrList.value.push(item.id)
router.push({ updateVisits({
path: '/DetailsPageconetent', id: item.id,
query: { visits: item.visits || '0',
select: type, }).then(() => {
}, window.sessionStorage.setItem('visits', JSON.stringify(arrList.value))
}) })
} }
const selectOne = (id) => { window.open(item.link)
console.log('点击===============》', id) }
router.push({ const assignmentMethod = (type, res) => {
path: '/details', object[type] = res.data.data.total
query: { }
id: id, getAppResources('组件服务', zjList)
}, getAppResources('应用资源', yyList)
}) getAppResources('基础设施', jcList)
} getAppResources('数据资源', sjList)
const selectOne1 = (name) => { getAppResources('知识库', zsList)
router.push({
path: '/DetailsPageconetent', function jumpPage(type) {
query: { // store
type: name, store.commit('home/selectCardsData', {
select: '组件服务', selectCardsnum: type,
}, })
}) console.log(
} '选中===================>',
const selectOne11 = (name) => { store.getters['home/selectCardsnum']
router.push({ )
path: '/DetailsPageconetent', // router.push({ path: '/DetailsPageconetent' })
query: { router.push({
type: name, path: '/DetailsPageconetent',
select: '应用资源', query: {
}, select: type,
}) },
} })
const selectOne2 = (name) => { }
let names='' const selectOne = (id) => {
if(name ==='云资源'){ console.log('点击===============》', id)
names='政务云资源' router.push({
} else if(name ==='会客厅'){ path: '/details',
names='城市云脑会客厅' query: {
}else{ id: id,
names=name },
})
}
const selectOne1 = (name) => {
router.push({
path: '/DetailsPageconetent',
query: {
type: name,
select: '组件服务',
},
})
}
const selectOne11 = (name) => {
router.push({
path: '/DetailsPageconetent',
query: {
type: name,
select: '应用资源',
},
})
}
const selectOne2 = (name) => {
let names = ''
if (name === '云资源') {
names = '政务云资源'
} else if (name === '会客厅') {
names = '城市云脑会客厅'
} else {
names = name
}
router.push({
path: '/DetailsPageconetent',
query: {
type: names,
select: '基础设施',
},
})
}
const selectOne3 = (name) => {
console.log('点击===============》', name)
router.push({
path: '/DetailsPageconetent',
query: {
str: name,
select: '数据资源',
},
})
} }
router.push({
path: '/DetailsPageconetent',
query: {
type: names,
select: '基础设施',
},
})
}
const selectOne3 = (name) => {
console.log('点击===============》', name)
router.push({
path: '/DetailsPageconetent',
query: {
str: name,
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%;
display: flex;
justify-content: center;
.main {
width: 13rem;
margin-top: 1.8rem;
display: flex; display: flex;
flex-direction: column; justify-content: center;
flex-wrap: wrap;
.top { .main {
font-size: 0.3rem; width: 13rem;
color: #212121; margin-top: 1.8rem;
text-align: center;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center;
align-items: center;
.line { .top {
width: 0.34rem; font-size: 0.3rem;
height: 0.03rem; color: #212121;
background-color: #0058e1; text-align: center;
margin-top: 0.08rem; display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
.line {
width: 0.34rem;
height: 0.03rem;
background-color: #0058e1;
margin-top: 0.08rem;
}
} }
}
.bottom { .bottom {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 0.4rem; margin-top: 0.4rem;
.item { .item {
width: 2.44rem; width: 2.44rem;
height: 3.91rem; height: 3.91rem;
font-size: 0.16rem; font-size: 0.16rem;
background-color: #fff; background-color: #fff;
border-radius: 0.02rem;
box-shadow: 0 0.05rem 0.2rem #ccc;
position: relative;
div:nth-of-type(1) {
height: 1.02rem;
line-height: 1.02rem;
font-size: 0.2rem;
color: #fff;
padding-left: 0.15rem;
background-size: 100%;
}
.jc {
background: url('~@/assets/newHome/Convergence-jc.png') no-repeat;
}
.sj {
background: url('~@/assets/newHome/Convergence-sj.png') no-repeat;
}
.zj {
background: url('~@/assets/newHome/Convergence-zj.png') no-repeat;
}
.yy {
background: url('~@/assets/newHome/Convergence-yy.png') no-repeat;
}
.zs {
background: url('~@/assets/newHome/Convergence-zs.png') no-repeat;
}
.name {
height: 0.47rem;
line-height: 0.47rem;
margin: 0 0.16rem;
border-bottom: 0.01rem solid #e9e9e9;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
.name:hover {
color: #0058e1;
cursor: pointer;
}
.name-last {
border-bottom: none;
}
.btn {
cursor: pointer;
width: 0.8rem;
height: 0.24rem;
border: 0.01rem solid #0058e1;
font-size: 0.14rem;
color: #0058e1;
border-radius: 0.02rem; border-radius: 0.02rem;
text-align: center; box-shadow: 0 0.05rem 0.2rem #ccc;
margin-top: 0.1rem; position: relative;
margin-left: 0.85rem;
position: absolute; div:nth-of-type(1) {
bottom: 0.2rem; height: 1.02rem;
line-height: 1.02rem;
font-size: 0.2rem;
color: #fff;
padding-left: 0.15rem;
background-size: 100%;
}
.jc {
background: url('~@/assets/newHome/Convergence-jc.png') no-repeat;
}
.sj {
background: url('~@/assets/newHome/Convergence-sj.png') no-repeat;
}
.zj {
background: url('~@/assets/newHome/Convergence-zj.png') no-repeat;
}
.yy {
background: url('~@/assets/newHome/Convergence-yy.png') no-repeat;
}
.zs {
background: url('~@/assets/newHome/Convergence-zs.png') no-repeat;
}
.name {
height: 0.47rem;
line-height: 0.47rem;
margin: 0 0.16rem;
border-bottom: 0.01rem solid #e9e9e9;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
.name:hover {
color: #0058e1;
cursor: pointer;
}
.name-last {
border-bottom: none;
}
.btn {
cursor: pointer;
width: 0.8rem;
height: 0.24rem;
border: 0.01rem solid #0058e1;
font-size: 0.14rem;
color: #0058e1;
border-radius: 0.02rem;
text-align: center;
margin-top: 0.1rem;
margin-left: 0.85rem;
position: absolute;
bottom: 0.2rem;
}
.btn:hover {
background: rgba(0, 88, 225, 0.3);
color: #000;
}
} }
.btn:hover { .item:hover {
background: rgba(0, 88, 225, 0.3); border-radius: 0.02rem;
color: #000; border: 0.01rem solid #0058e1;
box-shadow: 0rem 0.08rem 0.2rem rgba(0, 88, 225, 0.3);
} }
} }
.item:hover {
border-radius: 0.02rem;
border: 0.01rem solid #0058e1;
box-shadow: 0rem 0.08rem 0.2rem rgba(0, 88, 225, 0.3);
}
} }
} }
}
</style> </style>

View File

@ -9,83 +9,38 @@
<div class="form-container"> <div class="form-container">
<div v-if="applySuccess"> <div v-if="applySuccess">
<div class="title">申请人信息</div> <div class="title">申请人信息</div>
<a-form <a-form ref="formRef" :model="formName" name="basic" :label-col="{ style: { width: '106px' } }"
ref="formRef" :wrapper-col="{ style: { width: '230px' } }" labelAlign="left" autocomplete="off">
:model="formName"
name="basic"
:label-col="{ style: { width: '106px' } }"
:wrapper-col="{ style: { width: '230px' } }"
labelAlign="left"
autocomplete="off"
>
<div class="base-info"> <div class="base-info">
<a-form-item <a-form-item label="申请人" name="applyUserName" :rules="[{ required: true, message: '请输入申请人' }]">
label="申请人" <a-input placeholder="请输入申请人" v-model:value="formName.applyUserName" />
name="applyUserName"
:rules="[{ required: true, message: '请输入申请人' }]"
>
<a-input
placeholder="请输入申请人"
v-model:value="formName.applyUserName"
/>
</a-form-item> </a-form-item>
<a-form-item <a-form-item style="margin: 0 22px" label="申请人电话" name="applyUserPhone" :rules="[
style="margin: 0 22px" {
label="申请人电话" required: true,
name="applyUserPhone" pattern: /^1[3456789]\d{9}$/,
:rules="[ message: '请输入正确的电话号码',
{ },
required: true, ]">
pattern: /^1[3456789]\d{9}$/, <a-input placeholder="请输入申请人电话" v-model:value="formName.applyUserPhone" />
message: '请输入正确的电话号码',
},
]"
>
<a-input
placeholder="请输入申请人电话"
v-model:value="formName.applyUserPhone"
/>
</a-form-item> </a-form-item>
<a-form-item <a-form-item label="申请单位" name="applyUserDeptName" :rules="[{ required: true, message: '请输入申请单位' }]">
label="申请单位" <a-input placeholder="请输入申请单位" v-model:value="formName.applyUserDeptName" />
name="applyUserDeptName"
:rules="[{ required: true, message: '请输入申请单位' }]"
>
<a-input
placeholder="请输入申请单位"
v-model:value="formName.applyUserDeptName"
/>
</a-form-item> </a-form-item>
</div> </div>
<div class="title">需求信息</div> <div class="title">需求信息</div>
<a-form-item <a-form-item style="margin-bottom: 10px" label="需求标题" name="demandSubject"
style="margin-bottom: 10px" :rules="[{ required: true, message: '请输入需求标题' }]">
label="需求标题" <a-input style="width: 350px" v-model:value="formName.demandSubject" />
name="demandSubject"
:rules="[{ required: true, message: '请输入需求标题' }]"
>
<a-input
style="width: 350px"
v-model:value="formName.demandSubject"
/>
</a-form-item> </a-form-item>
<a-form-item <a-form-item style="margin-bottom: 10px" label="需求类型" name="detailsType"
style="margin-bottom: 10px" :rules="[{ required: true, message: '请选择需求类型' }]">
label="需求类型" <a-select ref="select" v-model:value="formName.detailsType" @focus="focus" style="width: 200px">
name="detailsType"
:rules="[{ required: true, message: '请选择需求类型' }]"
>
<a-select
ref="select"
v-model:value="formName.detailsType"
@focus="focus"
style="width: 200px"
>
<a-select-option value="基础设施">基础设施</a-select-option> <a-select-option value="基础设施">基础设施</a-select-option>
<a-select-option value="数据资源">数据资源</a-select-option> <a-select-option value="数据资源">数据资源</a-select-option>
<a-select-option value="组件服务">组件服务</a-select-option> <a-select-option value="组件服务">组件服务</a-select-option>
@ -94,50 +49,24 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item <a-form-item label="应用领域" v-if="formName.detailsType === '应用资源' ||
label="应用领域" formName.detailsType === '组件服务'" name="detailsField" style="width: 6.93rem" :rules="[
name="detailsField" {
style="width: 6.93rem" required: true,
:rules="[ message: '请选择应用领域',
{ },
required: ]">
formName.detailsType === '应用资源' || <a-select v-model:value="formName.detailsField" :options="applicationSceneOpthion" mode="tags"
formName.detailsType === '组件服务' :size="size" placeholder="请选择应用领域" :filterOption="false" :searchValue="false" style="width: 5.87rem">
? true </a-select>
: false,
message: '请选择应用领域',
},
]"
>
<a-select
:disabled="
formName.detailsType === '应用资源' ||
formName.detailsType === '组件服务'
? false
: true
"
v-model:value="formName.detailsField"
:options="applicationSceneOpthion"
mode="tags"
:size="size"
placeholder="请选择应用领域"
:filterOption="false"
:searchValue="false"
style="width: 5.87rem"
></a-select>
</a-form-item> </a-form-item>
<!-- <a-form-item label="应用领域" name="detailsField" style="width: 350px" <!-- <a-form-item label="应用领域" name="detailsField" style="width: 350px"
:rules="[{ required: true, message: '请输入应用领域' }]"> :rules="[{ required: true, message: '请输入应用领域' }]">
<a-input placeholder="请输入应用领域" v-model:value="formName.detailsField" /> <a-input placeholder="请输入应用领域" v-model:value="formName.detailsField" />
</a-form-item> --> </a-form-item> -->
<a-form-item <a-form-item style="margin-bottom: 10px" label="需求描述" name="demandDetails"
style="margin-bottom: 10px" :rules="[{ required: true, message: '请输入需求描述' }]">
label="需求描述" <a-textarea style="
name="demandDetails"
:rules="[{ required: true, message: '请输入需求描述' }]"
>
<a-textarea
style="
width: 500px; width: 500px;
height: 150px; height: 150px;
font-size: 16px; font-size: 16px;
@ -147,25 +76,12 @@
border-radius: 6px; border-radius: 6px;
padding: 10px; padding: 10px;
resize: none; resize: none;
" " v-model:value="formName.demandDetails" />
v-model:value="formName.demandDetails"
/>
</a-form-item> </a-form-item>
<a-form-item <a-form-item style="color: #666; font-size: 16px" label="附件上传" name="applyDoc">
style="color: #666; font-size: 16px" <a-upload v-model:file-list="fileList" name="file" :action="upLoadUrl" :headers="headers"
label="附件上传" @change="handleChange" :maxCount="1">
name="applyDoc" <a-button style="
>
<a-upload
v-model:file-list="fileList"
name="file"
:action="upLoadUrl"
:headers="headers"
@change="handleChange"
:maxCount="1"
>
<a-button
style="
width: 100px; width: 100px;
height: 30px; height: 30px;
margin-right: 10px; margin-right: 10px;
@ -176,8 +92,7 @@
border: 1px solid #bbd3ef; border: 1px solid #bbd3ef;
padding: 0; padding: 0;
text-align: center; text-align: center;
" ">
>
<upload-outlined></upload-outlined> <upload-outlined></upload-outlined>
文件上传 文件上传
</a-button> </a-button>
@ -188,8 +103,7 @@
</a-form-item> </a-form-item>
<a-form-item :wrapper-col="{ offset: 8, span: 16 }"> <a-form-item :wrapper-col="{ offset: 8, span: 16 }">
<a-button <a-button style="
style="
width: 80px; width: 80px;
height: 38px; height: 38px;
margin-right: 20px; margin-right: 20px;
@ -200,15 +114,10 @@
border: none; border: none;
padding: 0; padding: 0;
text-align: center; text-align: center;
" " type="primary" html-type="cancle" @click="signOut">
type="primary"
html-type="cancle"
@click="signOut"
>
退出申请 退出申请
</a-button> </a-button>
<a-button <a-button style="
style="
width: 80px; width: 80px;
height: 38px; height: 38px;
background: #0087ff; background: #0087ff;
@ -218,11 +127,7 @@
border: none; border: none;
padding: 0; padding: 0;
text-align: center; text-align: center;
" " type="primary" html-type="submit" @click="processStartHandle()">
type="primary"
html-type="submit"
@click="processStartHandle()"
>
提交申请 提交申请
</a-button> </a-button>
</a-form-item> </a-form-item>
@ -234,7 +139,7 @@
</div> </div>
<p> <p>
您已成功申请{{ 您已成功申请{{
formName.demandSubject || '' formName.demandSubject || ''
}},请耐心等待审批结果结果会第一时间通知您 }},请耐心等待审批结果结果会第一时间通知您
</p> </p>
</div> </div>
@ -245,250 +150,248 @@
</template> </template>
<script> <script>
import HomeHeader from '@/views/home/components/header' import HomeHeader from '@/views/home/components/header'
import { reactive, ref } from 'vue' import { reactive, ref } from 'vue'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
// import { UploadOutlined } from '@ant-design/icons-vue' // import { UploadOutlined } from '@ant-design/icons-vue'
import { getUser, getUserInfo, relaunch } from '@/api/home' import { getUser, getUserInfo, relaunch } from '@/api/home'
import { import {
demandApply, demandApply,
getDemandForm, getDemandForm,
updateDemandForm, updateDemandForm,
getCategoryTreePage, getCategoryTreePage,
} from '@/api/personalCenter' } from '@/api/personalCenter'
// import { baseURL } from '@/config' // import { baseURL } from '@/config'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
export default { export default {
name: '', name: '',
props: {}, props: {},
components: { components: {
HomeHeader, HomeHeader,
// UploadOutlined, // UploadOutlined,
}, },
setup() { setup() {
const disabled = ref(false) const disabled = ref(false)
const upLoadUrl = ref(window.SITE_CONFIG.apiURL + '/upload') const upLoadUrl = ref(window.SITE_CONFIG.apiURL + '/upload')
const formName = reactive({ const formName = reactive({
applyUserDeptId: '', applyUserDeptId: '',
applyUserDeptName: '', applyUserDeptName: '',
applyUserId: '', applyUserId: '',
applyUserName: '', applyUserName: '',
applyUserPhone: '', applyUserPhone: '',
demandDetails: '', demandDetails: '',
demandSubject: '', demandSubject: '',
detailsField: [], detailsField: [],
detailsType: '', detailsType: '',
enclosure: '', enclosure: '',
})
// console.log(formName.demandSubject)
const router = useRouter()
const id = ref(router.currentRoute.value.query.id)
const taskId = ref(router.currentRoute.value.query.taskId)
if (id.value) {
getDemandForm(id.value).then((res) => {
console.log('回填数据===============>', res)
formName.applyUserPhone = res.data.data.applyUserPhone
formName.demandSubject = res.data.data.demandSubject
formName.detailsType = res.data.data.detailsType
formName.detailsField = res.data.data.detailsField
formName.demandDetails = res.data.data.demandDetails
formName.enclosure = res.data.data.enclosure
}) })
// console.log(formName.demandSubject) }
const applicationSceneOpthion = ref([])
getCategoryTreePage({
page: 1,
limit: 20,
dictTypeId: '1513712507692818433',
deFlage: 0,
}).then((res) => {
res.data.data.list.map((val) => {
applicationSceneOpthion.value.push({
value: val.dictLabel,
label: val.dictLabel,
})
})
// console.log('========>', applicationSceneOpthion.value)
})
getUser().then((res) => {
formName.applyUserName = res.data.data.realName
formName.applyUserId = res.data.data.id
getUserInfo(formName.applyUserId).then((res) => {
if (res.data.data.mobile) {
formName.applyUserPhone = res.data.data.mobile
}
formName.applyUserDeptName = res.data.data.deptName
formName.applyUserDeptId = res.data.data.deptId
})
})
const formRef = ref()
const applySuccess = ref(true)
// 退
const signOut = () => {
window.close()
}
const handleChange = (info) => {
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList)
}
if (info.file.status === 'done') {
message.success(`${info.file.name} 文件上传成功`)
formName.enclosure = info.file.response.data
} else if (info.file.status === 'error') {
message.error(`${info.file.name} 文件上传失败`)
}
}
const fileList = ref([])
const processStartHandle = () => {
let detailsField = '';
if (formName.detailsField.length > 0) {
formName.detailsField.map((item) => {
detailsField += item + ';'
})
}
// copy
let _postData = JSON.parse(JSON.stringify(formName))
_postData.detailsField = detailsField;
const router = useRouter()
const id = ref(router.currentRoute.value.query.id)
const taskId = ref(router.currentRoute.value.query.taskId)
if (id.value) { if (id.value) {
getDemandForm(id.value).then((res) => { updateDemandForm(_postData).then((upres) => {
console.log('回填数据===============>', res) if (upres.data.code == 0) {
formName.applyUserPhone = res.data.data.applyUserPhone relaunch({ data: _postData, taskId: taskId.value }).then((res) => {
formName.demandSubject = res.data.data.demandSubject console.log('驳回================>', res)
formName.detailsType = res.data.data.detailsType if (res.data.code == 0) {
formName.detailsField = res.data.data.detailsField message.success('重新发起流程成功!')
formName.demandDetails = res.data.data.demandDetails window.setTimeout(() => {
formName.enclosure = res.data.data.enclosure window.close()
}) }, 1000)
} } else {
const applicationSceneOpthion = ref([]) message.error('重新发起流程失败!')
getCategoryTreePage({ }
page: 1,
limit: 20,
dictTypeId: '1513712507692818433',
deFlage: 0,
}).then((res) => {
res.data.data.list.map((val) => {
applicationSceneOpthion.value.push({
value: val.dictLabel,
label: val.dictLabel,
})
})
// console.log('========>', applicationSceneOpthion.value)
})
getUser().then((res) => {
formName.applyUserName = res.data.data.realName
formName.applyUserId = res.data.data.id
getUserInfo(formName.applyUserId).then((res) => {
if (res.data.data.mobile) {
formName.applyUserPhone = res.data.data.mobile
}
formName.applyUserDeptName = res.data.data.deptName
formName.applyUserDeptId = res.data.data.deptId
})
})
const formRef = ref()
const applySuccess = ref(true)
// 退
const signOut = () => {
window.close()
}
const handleChange = (info) => {
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList)
}
if (info.file.status === 'done') {
message.success(`${info.file.name} 文件上传成功`)
formName.enclosure = info.file.response.data
} else if (info.file.status === 'error') {
message.error(`${info.file.name} 文件上传失败`)
}
}
const fileList = ref([])
const subimtFlag = ref(true)
const processStartHandle = () => {
if (formName.detailsField.length > 0) {
let detailsField = ''
formName.detailsField.map((item) => {
detailsField += item + ';'
})
formName.detailsField = detailsField
}
if (id.value) {
updateDemandForm(formName).then((upres) => {
if (upres.data.code == 0) {
relaunch({ data: formName, taskId: taskId.value }).then((res) => {
console.log('驳回================>', res)
if (res.data.code == 0) {
message.success('重新发起流程成功!')
window.setTimeout(() => {
window.close()
}, 1000)
} else {
message.error('重新发起流程失败!')
}
})
} else {
message.error('数据更新失败!')
}
})
} else {
if (subimtFlag.value) {
subimtFlag.value = false
formRef.value.validate().then(() => {
const detString = String(formName.detailsField)
formName.detailsField = detString
console.log(detString, formName.detailsField, 'detString')
demandApply(formName).then((res) => {
applySuccess.value = false
message.success('操作成功!')
console.log('能力申请================>', res)
subimtFlag.value = true
})
}) })
} else {
message.error('数据更新失败!')
} }
} })
} else {
formRef.value.validate().then((valid) => {
const detString = String(_postData.detailsField)
_postData.detailsField = detString
console.log(detString, _postData.detailsField, 'detString')
demandApply(_postData).then((res) => {
applySuccess.value = false
message.success('操作成功!')
console.log('能力申请================>', res)
})
})
} }
}
return { return {
formRef, formRef,
formName, formName,
fileList, fileList,
headers: { headers: {
authorization: 'authorization-text', authorization: 'authorization-text',
}, },
handleChange, handleChange,
applySuccess, applySuccess,
disabled, disabled,
signOut, signOut,
processStartHandle, processStartHandle,
upLoadUrl, upLoadUrl,
// baseURL, // baseURL,
applicationSceneOpthion, applicationSceneOpthion,
} }
}, },
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
#apply-container { #apply-container {
background-color: #f5f8fc; background-color: #f5f8fc;
height: 100%; height: 100%;
width: 100%; width: 100%;
margin: 90px auto 0; margin: 90px auto 0;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
aside { aside {
width: 282px; width: 282px;
height: 96%; height: 96%;
overflow-y: auto; overflow-y: auto;
background-color: #fff; background-color: #fff;
margin: 1% 0 3%; margin: 1% 0 3%;
} }
article { article {
width: 1090px; width: 1090px;
height: 99%; height: 99%;
overflow-y: auto; overflow-y: auto;
background-color: #fff; background-color: #fff;
margin: 5% auto; margin: 5% auto;
} }
.form-container { .form-container {
padding: 20px 20px 30px 20px; padding: 20px 20px 30px 20px;
.title { .title {
font-size: 20px;
color: #000;
font-weight: bold;
margin-bottom: 20px;
}
}
.base-info {
display: flex;
}
:deep(.ant-form-item-label) {
label {
color: #666;
font-size: 16px;
&::after {
content: '';
}
}
}
:deep(.ant-form-item-required) {
&::before {
font-size: 8px;
margin-right: 10px;
}
}
:deep(.ant-input) {
border: 1px solid #e0e0e0;
border-radius: 6px;
}
.success {
div {
width: 100px;
margin: 80px auto 40px;
}
text-align: center;
font-size: 20px; font-size: 20px;
font-weight: bold;
color: #000; color: #000;
font-weight: bold;
margin-bottom: 20px;
} }
} }
.base-info {
display: flex;
}
:deep(.ant-form-item-label) {
label {
color: #666;
font-size: 16px;
&::after {
content: '';
}
}
}
:deep(.ant-form-item-required) {
&::before {
font-size: 8px;
margin-right: 10px;
}
}
:deep(.ant-input) {
border: 1px solid #e0e0e0;
border-radius: 6px;
}
.success {
div {
width: 100px;
margin: 80px auto 40px;
}
text-align: center;
font-size: 20px;
font-weight: bold;
color: #000;
}
}
</style> </style>
<style> <style>
body, body,
html { html {
height: unset; height: unset;
} }
</style> </style>