Compare commits

..

No commits in common. "58e045e862494a8a70fb3a03f5600298fd62d248" and "aa6022f5990f43f050c55bc59cfbb8705ce6c89f" have entirely different histories.

9 changed files with 1672 additions and 1660 deletions

View File

@ -7,8 +7,8 @@
*/ */
var _global = {} var _global = {}
var CONFIGITEM = { var CONFIGITEM = {
version: 'qingdao', // 青岛 // version: 'qingdao', // 青岛
// version: 'xihaian', // 西海岸 version: 'xihaian', // 西海岸
// version: 'test', // 测试 // version: 'test', // 测试
// version: 'frp', // 内网穿透 // version: 'frp', // 内网穿透
// version: 'dev', // 开发 // version: 'dev', // 开发

View File

@ -1,12 +1,13 @@
/* /*
* @Author: hisense.guoyue * @Author: hisense.liangjunhua
* @Date: 2022-08-23 10:30:11 * @Date: 2022-08-23 10:30:11
* @LastEditors: hisense.guoyue * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-10-02 14:47:05 * @LastEditTime: 2022-09-01 16:06:05
* @Description: 判断当前环境是西海岸还是青岛市局 * @Description: 告诉大家这是什么
*/ */
const returnLocationStr = () => { const returnLocationStr = () => {
return CONFIGITEM.version // return 'qingdao'
return 'xihaian'
} }
export default returnLocationStr export default returnLocationStr

View File

@ -55,8 +55,7 @@ export default {
num: 0, num: 0,
list: [], list: [],
type: 'todo', type: 'todo',
// url: 'activiti-my-todo-task', url: 'activiti-my-todo-task'
url: 'myAgent-CompetencyApplication',
}, },
// //
hasToDodoData: { hasToDodoData: {
@ -68,8 +67,7 @@ export default {
textColor: '#21b107', textColor: '#21b107',
num: 0, num: 0,
list: [], list: [],
// url: 'activiti-my-join-task', url: 'activiti-my-join-task'
url: 'hasToDoTasks-CompetencyApplication',
}, },
// //
resourceData: [], resourceData: [],

View File

@ -39,9 +39,7 @@
///whole_amount ///whole_amount
function snum() { function snum() {
totalResourceAggregation().then((res) => { totalResourceAggregation().then((res) => {
dataList.value = res.data.data; dataList.value = res.data.data
console.log('res.data.data------------>', res.data.data);
res.data.data.map((item, index) => { res.data.data.map((item, index) => {
console.log('dataList', dataList.value) console.log('dataList', dataList.value)
switch (item.type) { switch (item.type) {
@ -57,8 +55,7 @@
case '用户量': case '用户量':
dataList.value[index].organization = '人' dataList.value[index].organization = '人'
break break
// case '': case '覆盖部门量':
case '资源汇聚部门量':
dataList.value[index].organization = '个' dataList.value[index].organization = '个'
break break
} }

View File

@ -11,9 +11,12 @@
<div v-for="item in dataList.dataList" :key="item.name"> <div v-for="item in dataList.dataList" :key="item.name">
<div v-if="item.type !== '资源汇聚总量'" class="content-left"> <div v-if="item.type !== '资源汇聚总量'" class="content-left">
<div class="name"> <div class="name">
<span class="name-photo" :style="{ <span
class="name-photo"
:style="{
backgroundImage: `url(${item.photo}) `, backgroundImage: `url(${item.photo}) `,
}"></span> }"
></span>
<span class="name-text">{{ item.type }}</span> <span class="name-text">{{ item.type }}</span>
</div> </div>
<div class="organization-value"> <div class="organization-value">
@ -52,132 +55,113 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, onMounted, watch } from 'vue' import { ref, onMounted, watch } from 'vue'
import { selectTotal } from '@/api/home' import { selectTotal } from '@/api/home'
import { import {
// numberOfResourcesByCategory, // numberOfResourcesByCategory,
sourceDepartmentStatistics, sourceDepartmentStatistics,
} from '@/api/abilityStatistics.js' } from '@/api/abilityStatistics.js'
// import { zywMessage } from '@/api/home' // import { zywMessage } from '@/api/home'
import * as echarts from 'echarts' import * as echarts from 'echarts'
// //
let dataList = ref({ let dataList = ref({
title: '各类资源汇聚量', title: '各类资源汇聚量',
dataList: [], dataList: [],
}) })
// let photo = ref([ // let photo = ref([
// require('../../../assets/abilityStatistics/banner-jc.png'), // require('../../../assets/abilityStatistics/banner-jc.png'),
// require('../../../assets/abilityStatistics/banner-sj.png'), // require('../../../assets/abilityStatistics/banner-sj.png'),
// require('../../../assets/abilityStatistics/banner-zj.png'), // require('../../../assets/abilityStatistics/banner-zj.png'),
// require('../../../assets/abilityStatistics/banner-yy.png'), // require('../../../assets/abilityStatistics/banner-yy.png'),
// require('../../../assets/abilityStatistics/banner-zs.png'), // require('../../../assets/abilityStatistics/banner-zs.png'),
// ]) // ])
// let name = ref([]) // let name = ref([])
// //
// const findZywMessage = () => { // const findZywMessage = () => {
// zywMessage().then((res) => { // zywMessage().then((res) => {
// const { data } = res.data // const { data } = res.data
// dataSourceNum.value = data.sxmlcount || 0 // dataSourceNum.value = data.sxmlcount || 0
// snum() // snum()
// }) // })
// } // }
// //
// function snum() { // function snum() {
// numberOfResourcesByCategory().then((res) => { // numberOfResourcesByCategory().then((res) => {
// dataList.value.dataList = res.data.data // dataList.value.dataList = res.data.data
// res.data.data.map((item, index) => { // res.data.data.map((item, index) => {
// // if (dataList.value.dataList[index].type === '') { // // if (dataList.value.dataList[index].type === '') {
// // dataList.value.dataList[index].amount = dataSourceNum.value || 0 // // dataList.value.dataList[index].amount = dataSourceNum.value || 0
// // } // // }
// dataList.value.dataList[index].organization = '' // dataList.value.dataList[index].organization = ''
// dataList.value.dataList[index].photo = photo.value[index] // dataList.value.dataList[index].photo = photo.value[index]
// }) // })
// }) // })
// } // }
selectTotal().then((res) => { selectTotal().then((res) => {
console.log('selectTotal===============>', res.data.data) console.log('selectTotal===============>', res.data.data)
// res.data.data.map((item, index) => { // res.data.data.map((item, index) => {
// dataList.value.dataList[index].organization = '' // dataList.value.dataList[index].organization = ''
// dataList.value.dataList[index].photo = photo.value[index] // dataList.value.dataList[index].photo = photo.value[index]
// }) // })
let imgObj = {
'组件服务': require('../../../assets/abilityStatistics/banner-zj.png'),
'应用资源': require('../../../assets/abilityStatistics/banner-yy.png'),
'基础设施': require('../../../assets/abilityStatistics/banner-jc.png'),
'数据资源': require('../../../assets/abilityStatistics/banner-sj.png'),
'知识库': require('../../../assets/abilityStatistics/banner-zs.png'),
}
res.data.data.total.forEach((val) => { res.data.data.total.forEach((val) => {
let _obj = { switch (val.type) {
case '组件服务':
dataList.value.dataList.push({
organization: '个', organization: '个',
type: val.type, type: '组件服务',
photo: val.type && imgObj[val.type], photo: require('../../../assets/abilityStatistics/banner-zj.png'),
amount: val.count, amount: val.count,
} })
if (val.type == '基础设施') { break
case '应用资源':
dataList.value.dataList.push({
organization: '个',
type: '应用资源',
photo: require('../../../assets/abilityStatistics/banner-yy.png'),
amount: val.count,
})
break
case '基础设施':
if (uavAndIndividualSoldier.num) { if (uavAndIndividualSoldier.num) {
_obj.amount = val.count - 0 + uavAndIndividualSoldier.num val.count = val.count - 0 + uavAndIndividualSoldier.num
} }
dataList.value.dataList.push({
organization: '个',
type: '基础设施',
photo: require('../../../assets/abilityStatistics/banner-jc.png'),
amount: val.count,
})
break
case '数据资源':
dataList.value.dataList.push({
organization: '个',
type: '数据资源',
photo: require('../../../assets/abilityStatistics/banner-sj.png'),
amount: val.count,
})
break
case '知识库':
dataList.value.dataList.push({
organization: '个',
type: '知识库',
photo: require('../../../assets/abilityStatistics/banner-zs.png'),
amount: val.count,
})
break
} }
dataList.value.dataList.push(_obj)
// switch (val.type) {
// case '':
// dataList.value.dataList.push({
// organization: '',
// type: '',
// photo: require('../../../assets/abilityStatistics/banner-zj.png'),
// amount: val.count,
// })
// break
// case '':
// dataList.value.dataList.push({
// organization: '',
// type: '',
// photo: require('../../../assets/abilityStatistics/banner-yy.png'),
// amount: val.count,
// })
// break
// case '':
// if (uavAndIndividualSoldier.num) {
// val.count = val.count - 0 + uavAndIndividualSoldier.num
// }
// dataList.value.dataList.push({
// organization: '',
// type: '',
// photo: require('../../../assets/abilityStatistics/banner-jc.png'),
// amount: val.count,
// })
// break
// case '':
// dataList.value.dataList.push({
// organization: '',
// type: '',
// photo: require('../../../assets/abilityStatistics/banner-sj.png'),
// amount: val.count,
// })
// break
// case '':
// dataList.value.dataList.push({
// organization: '',
// type: '',
// photo: require('../../../assets/abilityStatistics/banner-zs.png'),
// amount: val.count,
// })
// break
// }
}) })
let arr = ['组件服务', '应用资源', '基础设施', '数据资源', '知识库'] let arr = ['组件服务', '应用资源', '基础设施', '数据资源', '知识库']
dataList.value.dataList.sort((a, b) => { dataList.value.dataList.sort((a, b) => {
return arr.indexOf(a.type) - arr.indexOf(b.type) return arr.indexOf(a.type) - arr.indexOf(b.type)
}) })
}) })
let datas = ref([]) let datas = ref([])
let laiyuanDataList = ref([]) let laiyuanDataList = ref([])
// let dataSourceNum = ref(0) // let dataSourceNum = ref(0)
let bumenSum = ref([]) let bumenSum = ref([])
//- //-
const sourceDepartment = () => { const sourceDepartment = () => {
sourceDepartmentStatistics().then((res) => { sourceDepartmentStatistics().then((res) => {
// datas.value = res.data.data.deptTypeCount // datas.value = res.data.data.deptTypeCount
bumenSum.value = res.data.data.deptCount bumenSum.value = res.data.data.deptCount
@ -206,10 +190,10 @@ const sourceDepartment = () => {
} }
console.log('laiyuanDataList.value', laiyuanDataList.value) console.log('laiyuanDataList.value', laiyuanDataList.value)
}) })
} }
// //
let leftDom = ref(0) let leftDom = ref(0)
const pieCharti = (dataLists) => { const pieCharti = (dataLists) => {
leftDom.value += 'a' leftDom.value += 'a'
echarts.init(document.getElementById('left')).dispose() echarts.init(document.getElementById('left')).dispose()
let chartDom = document.getElementById('left') let chartDom = document.getElementById('left')
@ -307,47 +291,31 @@ const pieCharti = (dataLists) => {
} }
option && myChart.setOption(option) option && myChart.setOption(option)
}
//
const funnelPlot = (dataList) => {
//
let arrCopy = ['0-5', '5-10', '10-15', '15-20', '20以上']
//
dataList.sort((a, b) => {
console.log(arrCopy.indexOf(a.fanwei), arrCopy.indexOf(b.fanwei))
return arrCopy.indexOf(b.fanwei) - arrCopy.indexOf(a.fanwei)
})
let _arr = dataList.map(v => v.fanwei) || arrCopy;
//
let chartData = _arr.map((v, i) => {
return {
name: v,
value: 10 + 10 * i,
} }
}) //
const funnelPlot = (dataList) => {
let newArr = []; // let arr = ['0-5', '5-10', '10-15', '15-20', '20']
dataList.map(v => { // dataList.sort((a, b) => {
if (v.value && Number(v.value > 0)) { // console.log(arr.indexOf(a.fanwei), arr.indexOf(b.fanwei))
newArr.push({ // return arr.indexOf(b.fanwei) - arr.indexOf(a.fanwei)
name: v.fanwei, // })
value: v.value
})
}
})
console.log('============》', dataList) console.log('============》', dataList)
echarts.init(document.getElementById('right')).dispose() echarts.init(document.getElementById('right')).dispose()
let chartDom = document.getElementById('right') let chartDom = document.getElementById('right')
let myChart = echarts.init(chartDom) let myChart = echarts.init(chartDom)
let option = { let option
option = {
// title: {
// text: '',
// },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: function (info) { formatter: function (name) {
let _obj = dataList.find(v => v.fanwei == info.data.name) || {}
let dom = ref() let dom = ref()
dom.value = dom.value =
'部门数<br/>' + (_obj.fanwei || '--') + ' : ' + (_obj.value || _obj.value === 0 ? _obj.value : '--') + '个' '部门数<br/>' + name.data.fanwei + ' : ' + name.data.value + '个'
console.log('name', info.data) console.log('name', name.data)
return dom.value return dom.value
}, },
}, },
@ -372,34 +340,26 @@ const funnelPlot = (dataList) => {
{ {
name: '部门数', name: '部门数',
type: 'funnel', type: 'funnel',
left: '28%', left: '20%',
right: '35%', top: '10%',
top: '15%', width: '60%',
bottom: '10%', height: '80%',
min: 0,
max: 100,
minSize: '0%', minSize: '0%',
maxSize: '100%', maxSize: '100%',
sort: 'ascending', sort: 'ascending',
gap: 2,
label: { label: {
show: true, show: true,
formatter: function (info) { position: 'inside',
let _obj = dataList.find(v => v.fanwei == info.data.name) || {}
let dom = ref()
dom.value = (_obj.fanwei || '--') + ' : ' + (_obj.value || _obj.value === 0 ? _obj.value : '--') + '个';
console.log('name', info.data)
return dom.value
},
rich: {
b: {
fontSize: 14
}
}
}, },
labelLine: { labelLine: {
length: 40, length: 10,
lineStyle: { lineStyle: {
width: 1, width: 1,
type: 'solid' type: 'solid',
} },
}, },
itemStyle: { itemStyle: {
borderColor: '#fff', borderColor: '#fff',
@ -410,61 +370,61 @@ const funnelPlot = (dataList) => {
fontSize: 20, fontSize: 20,
}, },
}, },
data: chartData, data: dataList,
} },
{
data: [],
type: 'bar',
},
], ],
} }
option && myChart.setOption(option) option && myChart.setOption(option)
} }
onMounted(() => { onMounted(() => {
// findZywMessage() // findZywMessage()
// snum() // snum()
sourceDepartment() sourceDepartment()
}) })
watch( watch(
datas, datas,
(value) => { (value) => {
pieCharti(value) pieCharti(value)
}, },
{ deep: true } { deep: true }
) )
watch( watch(
laiyuanDataList, laiyuanDataList,
(value) => { (value) => {
funnelPlot(value) funnelPlot(value)
console.log(value, ' laiyuanDataList') console.log(value, ' laiyuanDataList')
}, },
{ deep: true } { deep: true }
) )
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@font-face { @font-face {
font-family: 'num-typeface'; font-family: 'num-typeface';
src: url('~@/assets/newHome/font/num-typeface.otf'); src: url('~@/assets/newHome/font/num-typeface.otf');
} }
@font-face {
@font-face {
font-family: 'text-typeface'; font-family: 'text-typeface';
src: url('~@/assets/newHome/font/text-typeface.otf'); src: url('~@/assets/newHome/font/text-typeface.otf');
} }
.num {
.num {
font-family: num-typeface; font-family: num-typeface;
font-size: 32px; font-size: 32px;
font-weight: 600; font-weight: 600;
margin-right: 5px; margin-right: 5px;
} }
.hengxian {
.hengxian {
height: 3px; height: 3px;
width: 30px; width: 30px;
border-radius: 1px; border-radius: 1px;
margin-top: 6px; margin-top: 6px;
background: #0058e1; background: #0058e1;
} }
.resource-aggregation {
.resource-aggregation {
font-size: 18px; font-size: 18px;
font-family: text-typeface; font-family: text-typeface;
width: 100%; width: 100%;
@ -472,7 +432,6 @@ watch(
justify-content: center; justify-content: center;
background: #f3f5f9; background: #f3f5f9;
padding-bottom: 60px; padding-bottom: 60px;
.resource-aggregation-left { .resource-aggregation-left {
background: #fff; background: #fff;
border: 1px solid #e6e9ed; border: 1px solid #e6e9ed;
@ -483,14 +442,12 @@ watch(
padding: 20px; padding: 20px;
padding-top: 64px; padding-top: 64px;
position: relative; position: relative;
.title { .title {
position: absolute; position: absolute;
top: 20px; top: 20px;
font-size: 18px; font-size: 18px;
color: #212121; color: #212121;
} }
.content { .content {
.content-son { .content-son {
.content-left { .content-left {
@ -502,12 +459,10 @@ watch(
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
border-radius: 1px; border-radius: 1px;
.name { .name {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.name-photo { .name-photo {
margin-left: 10px; margin-left: 10px;
display: inline-block; display: inline-block;
@ -516,14 +471,11 @@ watch(
margin-right: 11px; margin-right: 11px;
} }
} }
.organization-value { .organization-value {
margin-right: 16px; margin-right: 16px;
.num { .num {
font-size: 26px; font-size: 26px;
} }
span:nth-child(2) { span:nth-child(2) {
font-size: 16px; font-size: 16px;
} }
@ -532,7 +484,6 @@ watch(
} }
} }
} }
.resource-aggregation-right { .resource-aggregation-right {
background: #fff; background: #fff;
border: 1px solid #e6e9ed; border: 1px solid #e6e9ed;
@ -546,7 +497,6 @@ watch(
position: relative; position: relative;
display: flex; display: flex;
padding-left: 120px; padding-left: 120px;
.title { .title {
position: absolute; position: absolute;
top: 20px; top: 20px;
@ -554,7 +504,6 @@ watch(
font-size: 18px; font-size: 18px;
color: #212121; color: #212121;
} }
.bumensnum { .bumensnum {
width: 100px; width: 100px;
position: absolute; position: absolute;
@ -567,58 +516,49 @@ watch(
background: rgba(0, 88, 225, 0.1); background: rgba(0, 88, 225, 0.1);
border-right: 1px solid rgba(0, 88, 225, 0.5); border-right: 1px solid rgba(0, 88, 225, 0.5);
border-radius: 2px; border-radius: 2px;
.bumensnum-photo { .bumensnum-photo {
height: 50px; height: 50px;
width: 50px; width: 50px;
background: url('~@/assets/abilityStatistics/bumenzongshu.png') no-repeat; background: url('~@/assets/abilityStatistics/bumenzongshu.png')
no-repeat;
margin-bottom: 30px; margin-bottom: 30px;
} }
p { p {
margin-top: 18px; margin-top: 18px;
color: #0058e1; color: #0058e1;
.num { .num {
font-size: 30px; font-size: 30px;
} }
span:last-child { span:last-child {
font-size: 16px; font-size: 16px;
} }
} }
} }
.content { .content {
width: 779px; width: 779px;
height: 313px; height: 313px;
display: flex; display: flex;
position: relative; position: relative;
background: #f1f4fb; background: #f1f4fb;
.left { .left {
width: 373px; width: 373px;
height: 313px; height: 313px;
} }
.center { .center {
height: 240px; height: 240px;
width: 1px; width: 1px;
margin-top: 31px; margin-top: 31px;
background: #d0d4de; background: #d0d4de;
} }
.right { .right {
width: 406px; width: 406px;
height: 313px; height: 313px;
} }
.right-son1 { .right-son1 {
position: absolute; position: absolute;
top: 10px; top: 10px;
left: 52.5%; left: 52.5%;
} }
.right-son2 { .right-son2 {
position: absolute; position: absolute;
top: 10px; top: 10px;
@ -626,5 +566,5 @@ watch(
} }
} }
} }
} }
</style> </style>

View File

@ -203,7 +203,6 @@
</div> </div>
</div> </div>
</template> </template>
<template v-else> <template v-else>
<div class="bottom"> <div class="bottom">
<div <div
@ -302,16 +301,6 @@
:list="props.fileList2" :list="props.fileList2"
tip="支持文件类型大小不超过100M" tip="支持文件类型大小不超过100M"
></upload> ></upload>
<upload
v-else-if="item.type == 'richText' && item.name == '技术文档'"
type="附件"
btnName="上传技术文档"
:maxCount="1"
:data="item"
:busType="2"
:list="props.fileList2"
tip="支持.doc,.docx,.zip,.ppt,.pdf类型大小不超过100M"
></upload>
<upload <upload
v-else-if="item.type == 'package' && item.name == '上传附件'" v-else-if="item.type == 'package' && item.name == '上传附件'"
type="附件" type="附件"

View File

@ -159,7 +159,7 @@
width: unset; width: unset;
button { button {
height: 30px; height: 30px;
width: 120px; width: 100px;
border: 1px solid #bbd3ef; border: 1px solid #bbd3ef;
border-radius: 6px; border-radius: 6px;
background: #edf4fc; background: #edf4fc;

View File

@ -8,69 +8,159 @@
</div> </div>
<div class="form-container"> <div class="form-container">
<div v-if="applySuccess"> <div v-if="applySuccess">
<a-form ref="formRef" :model="formName" name="basic" :label-col="{ style: { width: '106px' } }" <a-form
:wrapper-col="{ style: { width: '230px' } }" labelAlign="left" autocomplete="off"> ref="formRef"
:model="formName"
name="basic"
:label-col="{ style: { width: '106px' } }"
:wrapper-col="{ style: { width: '230px' } }"
labelAlign="left"
autocomplete="off"
>
<div class="base-info flex-row-start"> <div class="base-info flex-row-start">
<a-form-item label="申请标题" name="title" :rules="[{ required: true, message: '请输入申请标题' }]"> <a-form-item
<a-input placeholder="请输入能力申请标题" v-model:value="formName.title" /> label="申请标题"
name="title"
:rules="[{ required: true, message: '请输入申请标题' }]"
>
<a-input
placeholder="请输入能力申请标题"
v-model:value="formName.title"
/>
</a-form-item> </a-form-item>
<!-- 西海岸-摄像头-增加过期时间 --> <!-- 西海岸-摄像头-增加过期时间 -->
<a-form-item v-if="isCamera && isXiHaiAn" label="过期时间" name="expireDate" <a-form-item
:rules="[{ required: true, message: '请选择过期时间' }]" style="margin-left: 22px"> v-if="isCamera && isXiHaiAn"
<a-select v-model:value="formName.expireDate" placeholder="请选择过期时间" style="width: 200px" label="过期时间"
:options="expireDateOptions"></a-select> name="expireDate"
:rules="[{ required: true, message: '请选择过期时间' }]"
style="margin-left: 22px"
>
<a-select
v-model:value="formName.expireDate"
placeholder="请选择过期时间"
style="width: 200px"
:options="expireDateOptions"
></a-select>
</a-form-item> </a-form-item>
</div> </div>
<div class="base-info"> <div class="base-info">
<a-form-item label="申请人信息" name="user" :rules="[{ required: true, message: '请输入申请人' }]"> <a-form-item
<a-input placeholder="请输入申请人" v-model:value="formName.user" disabled /> label="申请人信息"
name="user"
:rules="[{ required: true, message: '请输入申请人' }]"
>
<a-input
placeholder="请输入申请人"
v-model:value="formName.user"
disabled
/>
</a-form-item> </a-form-item>
<a-form-item style="margin: 0 22px" label="电话" name="phone" :rules="[ <a-form-item
style="margin: 0 22px"
label="电话"
name="phone"
:rules="[
{ {
required: true, required: true,
pattern: /^1[3456789]\d{9}$/, pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的电话号码', message: '请输入正确的电话号码',
}, },
]"> ]"
<a-input placeholder="请输入申请人电话" v-model:value="formName.phone" /> >
<a-input
placeholder="请输入申请人电话"
v-model:value="formName.phone"
/>
</a-form-item> </a-form-item>
<a-form-item label="单位" name="unit" :rules="[{ required: true, message: '请输入单位' }]"> <a-form-item
<a-input placeholder="请输入单位" v-model:value="formName.unit" disabled v-if="deptFlage" /> label="单位"
<a-select v-else placeholder="请选择归属部门" v-model:value="formName.unit" @change="deptIdChangeFunction"> name="unit"
<a-select-option v-for="(item, index) in deptNameAll" :key="`${index}-${item}`" :value="item.name"> :rules="[{ required: true, message: '请输入单位' }]"
>
<a-input
placeholder="请输入单位"
v-model:value="formName.unit"
disabled
v-if="deptFlage"
/>
<a-select
v-else
placeholder="请选择归属部门"
v-model:value="formName.unit"
@change="deptIdChangeFunction"
>
<a-select-option
v-for="(item, index) in deptNameAll"
:key="`${index}-${item}`"
:value="item.name"
>
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</div> </div>
<div class="base-info" v-if="flag"> <div class="base-info" v-if="flag">
<div style="margin-bottom: 24px"> <a-form-item
<a-form-item style="margin-bottom:0" label="应用系统" name="applicationSystem" label="应用系统"
:rules="[{ required: true, message: '请选择应用系统' }]"> name="applicationSystem"
<a-select v-model:value="formName.applicationSystem" show-search placeholder="请选择应用系统" :rules="[{ required: true, message: '请选择应用系统' }]"
style="width: 230px" :options="systemOptions" @focus="handleFocus" @blur="handleBlur" >
@change="systemHandleChange" @search="systemHandleSearch"></a-select> <a-tooltip>
<template #title>
请输入关键字如选项没有系统请新增
</template>
<a-select
v-model:value="formName.applicationSystem"
show-search
placeholder="请输入关键字(如选项没有系统请新增)"
style="width: 230px"
:options="systemOptions"
@focus="handleFocus"
@blur="handleBlur"
@change="systemHandleChange"
@search="systemHandleSearch"
></a-select>
</a-tooltip>
</a-form-item> </a-form-item>
<span style="font-size:12px;color:#666;padding-left:106px"> 请输入关键字如选项没有系统请新增</span> <a-form-item
</div> class="applicationScene"
<a-form-item class="applicationScene" label="应用领域" name="applicationScene" label="应用领域"
:rules="[{ required: true, message: '请选择应用领域' }]" style="width: 6.93rem"> name="applicationScene"
<a-select v-model:value="formName.applicationScene" :options="applicationSceneOpthion" mode="tags" :rules="[{ required: true, message: '请选择应用领域' }]"
:size="size" placeholder="请选择应用领域" :filterOption="false" :searchValue="false" style="width: 6.93rem"
style="width: 5.87rem"></a-select> >
<a-select
v-model:value="formName.applicationScene"
:options="applicationSceneOpthion"
mode="tags"
:size="size"
placeholder="请选择应用领域"
:filterOption="false"
:searchValue="false"
style="width: 5.87rem"
></a-select>
</a-form-item> </a-form-item>
</div> </div>
<div> <div>
<a-form-item label="需求依据" name="applicationBackground" :rules="[ <a-form-item
label="需求依据"
name="applicationBackground"
:rules="[
{ required: true, message: '请输入需求依据' }, { required: true, message: '请输入需求依据' },
{ min: 50, message: '需求依据最少为50个字' }, { min: 50, message: '需求依据最少为50个字' },
]"> ]"
<a-textarea placeholder="请输入需求依据" v-model:value="formName.applicationBackground" :rows="4" /> >
<a-textarea
placeholder="请输入需求依据"
v-model:value="formName.applicationBackground"
:rows="4"
/>
</a-form-item> </a-form-item>
</div> </div>
<div class="bottom-btn"> <div class="bottom-btn">
<a-button style=" <a-button
style="
width: 80px; width: 80px;
height: 38px; height: 38px;
margin-right: 20px; margin-right: 20px;
@ -81,10 +171,15 @@
border: none; border: none;
padding: 0; padding: 0;
text-align: center; text-align: center;
" type="primary" html-type="cancle" @click="resetFields()"> "
type="primary"
html-type="cancle"
@click="resetFields()"
>
退出申请 退出申请
</a-button> </a-button>
<a-button style=" <a-button
style="
width: 80px; width: 80px;
height: 38px; height: 38px;
background: #0087ff; background: #0087ff;
@ -94,7 +189,11 @@
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>
</div> </div>
@ -112,14 +211,14 @@
</div> </div>
</template> </template>
<script> <script>
import AbilityToApplyFor from './AbilityToApplyFor.vue' import AbilityToApplyFor from './AbilityToApplyFor.vue'
import HomeHeader from '@/views/home/components/header' import HomeHeader from '@/views/home/components/header'
import { reactive, ref, watch, onBeforeUnmount } from 'vue' import { reactive, ref, watch, onBeforeUnmount } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import qs from 'qs' import qs from 'qs'
import { Upload } from 'ant-design-vue' import { Upload } from 'ant-design-vue'
import { import {
lastestPage, lastestPage,
tabilityapplication, tabilityapplication,
startOfBusinessKey, startOfBusinessKey,
@ -130,17 +229,17 @@ import {
getUserInfo, getUserInfo,
relaunch, relaunch,
selectOne, selectOne,
} from '@/api/home' } from '@/api/home'
import { getDeptAll } from '@/api/user' import { getDeptAll } from '@/api/user'
import { getCategoryTreePage, endProcess } from '@/api/personalCenter' import { getCategoryTreePage, endProcess } from '@/api/personalCenter'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { sgcDel, getApplyForm } from '@/api/personalCenter' import { sgcDel, getApplyForm } from '@/api/personalCenter'
import { pageWithAttrs, updateIntegrationServices } from '@/api/home' import { pageWithAttrs, updateIntegrationServices } from '@/api/home'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js' import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
import { getIntegrationDetail, soldierApply } from '@/api/home' import { getIntegrationDetail, soldierApply } from '@/api/home'
import * as moment from 'moment' import * as moment from 'moment'
export default { export default {
name: '', name: '',
props: {}, props: {},
components: { components: {
@ -579,10 +678,10 @@ export default {
processDefinitionKey: processDefinitionKey, processDefinitionKey: processDefinitionKey,
businessKey: businessKey, businessKey: businessKey,
}) })
updateInstanceId(params).then(() => { }) updateInstanceId(params).then(() => {})
} }
}) })
.catch(() => { }) .catch(() => {})
} }
const options = ref([ const options = ref([
{ {
@ -803,10 +902,10 @@ export default {
expireDateOptions, expireDateOptions,
} }
}, },
} }
</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%;
@ -885,9 +984,9 @@ export default {
font-weight: bold; font-weight: bold;
color: #000; color: #000;
} }
} }
.applicationScene { .applicationScene {
:deep(.ant-select-selector) { :deep(.ant-select-selector) {
overflow-x: scroll; overflow-x: scroll;
} }
@ -895,16 +994,16 @@ export default {
:deep(.ant-select-selection-overflow) { :deep(.ant-select-selection-overflow) {
flex-wrap: nowrap; flex-wrap: nowrap;
} }
} }
textarea { textarea {
resize: none; resize: none;
font-size: 14px; font-size: 14px;
} }
.bottom-btn { .bottom-btn {
display: flex; display: flex;
justify-content: center; justify-content: center;
// position: fixed; // position: fixed;
} }
</style> </style>

View File

@ -15,7 +15,12 @@
</a-breadcrumb> </a-breadcrumb>
<div class="top"> <div class="top">
<div class="left"> <div class="left">
<div class="item" :class="{ select: selectNav == nav.key }" v-for="nav in navList" :key="nav.key"> <div
class="item"
:class="{ select: selectNav == nav.key }"
v-for="nav in navList"
:key="nav.key"
>
<i :class="nav.key" @click="changeNav(nav)"></i> <i :class="nav.key" @click="changeNav(nav)"></i>
<div>{{ nav.title + '(' + nav.num + ')' }}</div> <div>{{ nav.title + '(' + nav.num + ')' }}</div>
</div> </div>
@ -37,7 +42,13 @@
</div> </div>
<div class="btn"> <div class="btn">
<div class="left"> <div class="left">
<a-select ref="select" v-model:value="value" style="width: 120px" @focus="focus" @change="handleChange"> <a-select
ref="select"
v-model:value="value"
style="width: 120px"
@focus="focus"
@change="handleChange"
>
<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>
@ -51,26 +62,33 @@
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<a-checkbox :checked=" <a-checkbox
:checked="
selectData.length !== 0 && selectData.length === data.length selectData.length !== 0 && selectData.length === data.length
" stlye="margin-right:0.3rem;" @change="changeCheckAll()"></a-checkbox> "
stlye="margin-right:0.3rem;"
@change="changeCheckAll()"
></a-checkbox>
<div>全选当前页</div> <div>全选当前页</div>
<span @click="read()">标记为已读</span> <span @click="read()">标记为已读</span>
</div> </div>
</div> </div>
<div class="main"> <div class="main">
<a-list item-layout="horizontal" :data-source="data"> <a-list item-layout="horizontal" :data-source="data">
<template #renderItem="{ item }" @click="goNoticePage(item)"> <template #renderItem="{ item }">
<a-list-item> <a-list-item>
<a-list-item-meta description=""> <a-list-item-meta description="">
<template #title> <template #title>
<div class="left" @click="read(item)" :class="item.readStatus === 0 ? 'bold-text' : ''"> <div class="left" @click="read(item)">
{{ item.content }} {{ item.content }}
</div> </div>
<div class="right">{{ '发布时间:' + item.senderDate }}</div> <div class="right">{{ '发布时间:' + item.senderDate }}</div>
</template> </template>
<template #avatar> <template #avatar>
<a-checkbox :checked="item.checked" @change="changeCheckBox(item)"></a-checkbox> <a-checkbox
:checked="item.checked"
@change="changeCheckBox(item)"
></a-checkbox>
<a-badge dot :offset="[-30, 5]" v-show="item.readStatus == 0"> <a-badge dot :offset="[-30, 5]" v-show="item.readStatus == 0">
<a-avatar :src="item.src" /> <a-avatar :src="item.src" />
</a-badge> </a-badge>
@ -82,24 +100,30 @@
</template> </template>
</a-list> </a-list>
</div> </div>
<a-pagination v-model:current="pageNum" v-model:pageSize="pageSize" :total="total" show-less-items <a-pagination
:show-size-changer="false" @change="changePageNum" /> v-model:current="pageNum"
v-model:pageSize="pageSize"
:total="total"
show-less-items
:show-size-changer="false"
@change="changePageNum"
/>
</div> </div>
</template> </template>
<script setup> <script setup>
// import { SearchOutlined } from '@ant-design/icons-vue' // import { SearchOutlined } from '@ant-design/icons-vue'
import { ref, reactive, onBeforeUnmount } from 'vue' import { ref, reactive, onBeforeUnmount } from 'vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { mynotice, mynoticeRead } from '@/api/home' import { mynotice, mynoticeRead } from '@/api/home'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
const router = useRouter() const router = useRouter()
const total = ref(0) const total = ref(0)
const pageSize = ref(8) const pageSize = ref(8)
const pageNum = ref(1) const pageNum = ref(1)
const value = ref('全部消息') const value = ref('全部消息')
const obj = reactive({ page: pageNum.value, limit: pageSize.value }) const obj = reactive({ page: pageNum.value, limit: pageSize.value })
const navList = reactive([ const navList = reactive([
{ {
title: '全部', title: '全部',
key: 'all', key: 'all',
@ -120,11 +144,11 @@ const navList = reactive([
key: 'other', key: 'other',
num: 0, num: 0,
}, },
]) ])
const selectNav = ref('all') const selectNav = ref('all')
const selectData = ref([]) const selectData = ref([])
const data = ref([]) const data = ref([])
const changeNav = (nav) => { const changeNav = (nav) => {
selectNav.value = nav.key selectNav.value = nav.key
if (nav.key === 'all') { if (nav.key === 'all') {
delete obj.from delete obj.from
@ -134,16 +158,16 @@ const changeNav = (nav) => {
value.value = '全部消息' value.value = '全部消息'
delete obj.readStatus delete obj.readStatus
init() init()
} }
const changeCheckBox = (item) => { const changeCheckBox = (item) => {
item.checked = !item.checked item.checked = !item.checked
if (item.checked) { if (item.checked) {
selectData.value.push(item.id) selectData.value.push(item.id)
} else { } else {
selectData.value = selectData.value.filter((val) => val !== item.id) selectData.value = selectData.value.filter((val) => val !== item.id)
} }
} }
const changeCheckAll = () => { const changeCheckAll = () => {
if (selectData.value.length == data.value.length) { if (selectData.value.length == data.value.length) {
selectData.value = [] selectData.value = []
data.value.forEach((val) => { data.value.forEach((val) => {
@ -156,13 +180,13 @@ const changeCheckAll = () => {
selectData.value.push(val.id) selectData.value.push(val.id)
}) })
} }
} }
const changePageNum = (page) => { const changePageNum = (page) => {
pageNum.value = page pageNum.value = page
obj.page = pageNum.value obj.page = pageNum.value
init() init()
} }
const handleChange = () => { const handleChange = () => {
pageNum.value = 1 pageNum.value = 1
obj.page = pageNum.value obj.page = pageNum.value
switch (value.value) { switch (value.value) {
@ -180,28 +204,35 @@ const handleChange = () => {
break break
} }
init() init()
} }
const goBack = (url) => { const goBack = (url) => {
router.push({ router.push({
path: url, path: url,
}) })
} }
const read = (item) => { const read = (item) => {
// console.log(item) // console.log(item)
if (selectData.value.length === 0 && !item) { if (selectData.value.length === 0 && !item) {
message.error('未选择消息!') message.error('未选择消息!')
return return
} }
console.log(selectData.value) console.log(selectData.value)
// let str = ''
// selectData.value.forEach((val, index) => {
// str += val
// if (index < selectData.value.length - 1) {
// str += ';'
// }
// })
if (item) { if (item) {
//
if (item.readStatus === 1) {
return
}
mynoticeRead(item.id).then((res) => { mynoticeRead(item.id).then((res) => {
if (res.data.code == 0) { if (res.data.code == 0 ) {
message.success('通知已读!') message.success('通知已读!')
// if(item.readStatus == 1){
// message.success('')
// } if(item.readStatus == 0){
// message.success('')
// }
mybus.emit('getMynotice') mybus.emit('getMynotice')
init() init()
} else { } else {
@ -222,8 +253,8 @@ const read = (item) => {
}) })
}) })
} }
} }
const init = () => { const init = () => {
// from readStatus 0 1 // from readStatus 0 1
mynotice(obj).then((res) => { mynotice(obj).then((res) => {
console.log('消息=============>', res.data.data) console.log('消息=============>', res.data.data)
@ -241,8 +272,8 @@ const init = () => {
total.value = res.data.data.total total.value = res.data.data.total
selectData.value = [] selectData.value = []
}) })
} }
navList.forEach((val) => { navList.forEach((val) => {
if (val.title === '全部') { if (val.title === '全部') {
mynotice({ page: pageNum.value, limit: pageSize.value }).then((res) => { mynotice({ page: pageNum.value, limit: pageSize.value }).then((res) => {
val.num = res.data.data.total val.num = res.data.data.total
@ -256,36 +287,30 @@ navList.forEach((val) => {
val.num = res.data.data.total val.num = res.data.data.total
}) })
} }
}) })
init()
mybus.on('noticeListInit', () => {
init() init()
}) mybus.on('noticeListInit', () => {
onBeforeUnmount(() => { init()
})
onBeforeUnmount(() => {
mybus.off('noticeListInit') mybus.off('noticeListInit')
}) })
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.notice-list { .notice-list {
padding: 0.64rem 0 0; padding: 0.64rem 0 0;
background: #f4f5f8; background: #f4f5f8;
.ant-breadcrumb { .ant-breadcrumb {
padding: 0.1rem 3.1rem; padding: 0.1rem 3.1rem;
} }
.top { .top {
background: #fff; background: #fff;
padding: 0.18rem 3.1rem 0; padding: 0.18rem 3.1rem 0;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.left { .left {
display: flex; display: flex;
.item { .item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -294,7 +319,6 @@ onBeforeUnmount(() => {
margin-left: 1.28rem; margin-left: 1.28rem;
margin-bottom: 0.16rem; margin-bottom: 0.16rem;
border-bottom: 3px solid #fff; border-bottom: 3px solid #fff;
i { i {
display: inline-block; display: inline-block;
width: 0.48rem; width: 0.48rem;
@ -302,98 +326,78 @@ onBeforeUnmount(() => {
margin-bottom: 0.15rem; margin-bottom: 0.15rem;
cursor: pointer; cursor: pointer;
} }
.all { .all {
background: url('~@/assets/mynoticeView/all.png') no-repeat; background: url('~@/assets/mynoticeView/all.png') no-repeat;
background-size: 100%; background-size: 100%;
} }
.notice { .notice {
background: url('~@/assets/mynoticeView/notice.png') no-repeat; background: url('~@/assets/mynoticeView/notice.png') no-repeat;
background-size: 100%; background-size: 100%;
} }
.comment { .comment {
background: url('~@/assets/mynoticeView/comment.png') no-repeat; background: url('~@/assets/mynoticeView/comment.png') no-repeat;
background-size: 100%; background-size: 100%;
} }
.other { .other {
background: url('~@/assets/mynoticeView/other.png') no-repeat; background: url('~@/assets/mynoticeView/other.png') no-repeat;
background-size: 100%; background-size: 100%;
} }
} }
.item:nth-of-type(1) { .item:nth-of-type(1) {
margin-left: 0; margin-left: 0;
} }
.select { .select {
border-bottom: 3px solid #0058e1; border-bottom: 3px solid #0058e1;
color: #0058e1; color: #0058e1;
} }
} }
.right { .right {
display: flex; display: flex;
align-items: center; align-items: center;
height: 0.32rem; height: 0.32rem;
div { div {
width: 0.5rem; width: 0.5rem;
} }
.reset { .reset {
color: #0058e1; color: #0058e1;
cursor: pointer; cursor: pointer;
} }
} }
} }
.btn { .btn {
background: #fff; background: #fff;
margin-top: 0.16rem; margin-top: 0.16rem;
padding: 0.14rem 3.1rem 0; padding: 0.14rem 3.1rem 0;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.left { .left {
display: flex; display: flex;
align-items: center; align-items: center;
.ant-select { .ant-select {
margin-right: 0.24rem; margin-right: 0.24rem;
} }
.check { .check {
display: flex; display: flex;
align-items: center; align-items: center;
div { div {
margin-left: 0.24rem; margin-left: 0.24rem;
span { span {
font-size: 18px; font-size: 18px;
color: #0058e1; color: #0058e1;
} }
} }
div:nth-of-type(1) { div:nth-of-type(1) {
margin-left: 0.12rem; margin-left: 0.12rem;
} }
} }
} }
.right { .right {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
div { div {
margin: 0 0.1rem; margin: 0 0.1rem;
} }
span { span {
cursor: pointer; cursor: pointer;
color: #0058e1; color: #0058e1;
@ -407,32 +411,23 @@ onBeforeUnmount(() => {
} }
} }
} }
.main { .main {
background: #fff; background: #fff;
padding: 0 3.1rem; padding: 0 3.1rem;
height: 4.75rem; height: 4.75rem;
overflow-y: scroll; overflow-y: scroll;
:deep(.ant-list-item-meta) { :deep(.ant-list-item-meta) {
display: flex; display: flex;
align-items: center; align-items: center;
.ant-checkbox-wrapper { .ant-checkbox-wrapper {
margin-right: 0.3rem; margin-right: 0.3rem;
} }
.ant-list-item-meta-title { .ant-list-item-meta-title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.bold-text {
font-weight: bold;
cursor: pointer;
}
.left { .left {
cursor: pointer;
width: 9.2rem; width: 9.2rem;
max-height: 0.43rem; max-height: 0.43rem;
overflow: hidden; overflow: hidden;
@ -442,23 +437,16 @@ onBeforeUnmount(() => {
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
word-break: break-all; word-break: break-all;
} }
.ant-badge-dot {
width: 8px;
height: 8px;
}
.left:hover { .left:hover {
color: #0058e1; color: #0058e1;
} }
} }
} }
} }
.ant-pagination { .ant-pagination {
background: #fff; background: #fff;
margin-top: 0; margin-top: 0;
padding: 0.2rem 0 0.2rem; padding: 0.2rem 0 0.2rem;
} }
} }
</style> </style>