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

This commit is contained in:
gongjiale 2022-10-04 13:19:02 +08:00
commit ca9244ed80
10 changed files with 1662 additions and 1674 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,13 +1,12 @@
/* /*
* @Author: hisense.liangjunhua * @Author: hisense.guoyue
* @Date: 2022-08-23 10:30:11 * @Date: 2022-08-23 10:30:11
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.guoyue
* @LastEditTime: 2022-09-01 16:06:05 * @LastEditTime: 2022-10-02 14:47:05
* @Description: 告诉大家这是什么 * @Description: 判断当前环境是西海岸还是青岛市局
*/ */
const returnLocationStr = () => { const returnLocationStr = () => {
// return 'qingdao' return CONFIGITEM.version
return 'xihaian'
} }
export default returnLocationStr export default returnLocationStr

View File

@ -55,7 +55,8 @@ 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: {
@ -67,7 +68,8 @@ 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,7 +39,9 @@
///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) {
@ -55,7 +57,8 @@
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,12 +11,9 @@
<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 <span class="name-photo" :style="{
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">
@ -103,52 +100,71 @@
// 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) => {
switch (val.type) { let _obj = {
case '组件服务':
dataList.value.dataList.push({
organization: '个', organization: '个',
type: '组件服务', type: val.type,
photo: require('../../../assets/abilityStatistics/banner-zj.png'), photo: val.type && imgObj[val.type],
amount: val.count, amount: val.count,
}) }
break if (val.type == '基础设施') {
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) {
val.count = val.count - 0 + uavAndIndividualSoldier.num _obj.amount = 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) => {
@ -294,28 +310,44 @@
} }
// //
const funnelPlot = (dataList) => { const funnelPlot = (dataList) => {
// let arr = ['0-5', '5-10', '10-15', '15-20', '20'] //
// dataList.sort((a, b) => { let arrCopy = ['0-5', '5-10', '10-15', '15-20', '20以上']
// console.log(arr.indexOf(a.fanwei), arr.indexOf(b.fanwei)) //
// return arr.indexOf(b.fanwei) - arr.indexOf(a.fanwei) 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,
}
})
let newArr = [];
dataList.map(v => {
if (v.value && Number(v.value > 0)) {
newArr.push({
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 (name) { formatter: function (info) {
let _obj = dataList.find(v => v.fanwei == info.data.name) || {}
let dom = ref() let dom = ref()
dom.value = dom.value =
'部门数<br/>' + name.data.fanwei + ' : ' + name.data.value + '个' '部门数<br/>' + (_obj.fanwei || '--') + ' : ' + (_obj.value || _obj.value === 0 ? _obj.value : '--') + '个'
console.log('name', name.data) console.log('name', info.data)
return dom.value return dom.value
}, },
}, },
@ -340,26 +372,34 @@
{ {
name: '部门数', name: '部门数',
type: 'funnel', type: 'funnel',
left: '20%', left: '28%',
top: '10%', right: '35%',
width: '60%', top: '15%',
height: '80%', bottom: '10%',
min: 0,
max: 100,
minSize: '0%', minSize: '0%',
maxSize: '100%', maxSize: '100%',
sort: 'ascending', sort: 'ascending',
gap: 2,
label: { label: {
show: true, show: true,
position: 'inside', formatter: function (info) {
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: 10, length: 40,
lineStyle: { lineStyle: {
width: 1, width: 1,
type: 'solid', type: 'solid'
}, }
}, },
itemStyle: { itemStyle: {
borderColor: '#fff', borderColor: '#fff',
@ -370,12 +410,8 @@
fontSize: 20, fontSize: 20,
}, },
}, },
data: dataList, data: chartData,
}, }
{
data: [],
type: 'bar',
},
], ],
} }
@ -407,16 +443,19 @@
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;
@ -424,6 +463,7 @@
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;
@ -432,6 +472,7 @@
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;
@ -442,12 +483,14 @@
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 {
@ -459,10 +502,12 @@
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;
@ -471,11 +516,14 @@
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;
} }
@ -484,6 +532,7 @@
} }
} }
} }
.resource-aggregation-right { .resource-aggregation-right {
background: #fff; background: #fff;
border: 1px solid #e6e9ed; border: 1px solid #e6e9ed;
@ -497,6 +546,7 @@
position: relative; position: relative;
display: flex; display: flex;
padding-left: 120px; padding-left: 120px;
.title { .title {
position: absolute; position: absolute;
top: 20px; top: 20px;
@ -504,6 +554,7 @@
font-size: 18px; font-size: 18px;
color: #212121; color: #212121;
} }
.bumensnum { .bumensnum {
width: 100px; width: 100px;
position: absolute; position: absolute;
@ -516,49 +567,58 @@
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') background: url('~@/assets/abilityStatistics/bumenzongshu.png') no-repeat;
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;

View File

@ -203,6 +203,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-else> <template v-else>
<div class="bottom"> <div class="bottom">
<div <div
@ -301,6 +302,16 @@
: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: 100px; width: 120px;
border: 1px solid #bbd3ef; border: 1px solid #bbd3ef;
border-radius: 6px; border-radius: 6px;
background: #edf4fc; background: #edf4fc;

View File

@ -8,159 +8,69 @@
</div> </div>
<div class="form-container"> <div class="form-container">
<div v-if="applySuccess"> <div v-if="applySuccess">
<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 flex-row-start"> <div class="base-info flex-row-start">
<a-form-item <a-form-item label="申请标题" name="title" :rules="[{ required: true, message: '请输入申请标题' }]">
label="申请标题" <a-input placeholder="请输入能力申请标题" v-model:value="formName.title" />
name="title"
:rules="[{ required: true, message: '请输入申请标题' }]"
>
<a-input
placeholder="请输入能力申请标题"
v-model:value="formName.title"
/>
</a-form-item> </a-form-item>
<!-- 西海岸-摄像头-增加过期时间 --> <!-- 西海岸-摄像头-增加过期时间 -->
<a-form-item <a-form-item v-if="isCamera && isXiHaiAn" label="过期时间" name="expireDate"
v-if="isCamera && isXiHaiAn" :rules="[{ required: true, message: '请选择过期时间' }]" style="margin-left: 22px">
label="过期时间" <a-select v-model:value="formName.expireDate" placeholder="请选择过期时间" style="width: 200px"
name="expireDate" :options="expireDateOptions"></a-select>
: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 <a-form-item label="申请人信息" name="user" :rules="[{ required: true, message: '请输入申请人' }]">
label="申请人信息" <a-input placeholder="请输入申请人" v-model:value="formName.user" disabled />
name="user"
:rules="[{ required: true, message: '请输入申请人' }]"
>
<a-input
placeholder="请输入申请人"
v-model:value="formName.user"
disabled
/>
</a-form-item> </a-form-item>
<a-form-item <a-form-item style="margin: 0 22px" label="电话" name="phone" :rules="[
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 <a-form-item label="单位" name="unit" :rules="[{ required: true, message: '请输入单位' }]">
label="单位" <a-input placeholder="请输入单位" v-model:value="formName.unit" disabled v-if="deptFlage" />
name="unit" <a-select v-else placeholder="请选择归属部门" v-model:value="formName.unit" @change="deptIdChangeFunction">
:rules="[{ required: true, message: '请输入单位' }]" <a-select-option v-for="(item, index) in deptNameAll" :key="`${index}-${item}`" :value="item.name">
>
<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">
<a-form-item <div style="margin-bottom: 24px">
label="应用系统" <a-form-item style="margin-bottom:0" label="应用系统" name="applicationSystem"
name="applicationSystem" :rules="[{ required: true, message: '请选择应用系统' }]">
:rules="[{ required: true, message: '请选择应用系统' }]" <a-select v-model:value="formName.applicationSystem" show-search placeholder="请选择应用系统"
> style="width: 230px" :options="systemOptions" @focus="handleFocus" @blur="handleBlur"
<a-tooltip> @change="systemHandleChange" @search="systemHandleSearch"></a-select>
<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>
<a-form-item <span style="font-size:12px;color:#666;padding-left:106px"> 请输入关键字如选项没有系统请新增</span>
class="applicationScene" </div>
label="应用领域" <a-form-item class="applicationScene" label="应用领域" name="applicationScene"
name="applicationScene" :rules="[{ required: true, message: '请选择应用领域' }]" style="width: 6.93rem">
:rules="[{ required: true, message: '请选择应用领域' }]" <a-select v-model:value="formName.applicationScene" :options="applicationSceneOpthion" mode="tags"
style="width: 6.93rem" :size="size" placeholder="请选择应用领域" :filterOption="false" :searchValue="false"
> 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 <a-form-item label="需求依据" name="applicationBackground" :rules="[
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 <a-button style="
style="
width: 80px; width: 80px;
height: 38px; height: 38px;
margin-right: 20px; margin-right: 20px;
@ -171,15 +81,10 @@
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 <a-button style="
style="
width: 80px; width: 80px;
height: 38px; height: 38px;
background: #0087ff; background: #0087ff;
@ -189,11 +94,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>
</div> </div>

View File

@ -330,11 +330,11 @@
<a-input v-model:value="formState.name" style="width: 72%" /> <a-input v-model:value="formState.name" style="width: 72%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- v-bind="validateInfos.phone" -->
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-item
name="phone" name="phone"
label="联系电话" label="联系电话"
v-bind="validateInfos.phone"
> >
<a-input v-model:value="formState.phone" style="width: 72%" /> <a-input v-model:value="formState.phone" style="width: 72%" />
</a-form-item> </a-form-item>
@ -852,13 +852,13 @@
}, },
], ],
matter: [{ min: 1, max: 500, required: true, message: '可输入500字内容' }], matter: [{ min: 1, max: 500, required: true, message: '可输入500字内容' }],
phone: [ // phone: [
{ // {
required: true, // required: true,
pattern: /^1[3|4|5|7|8|9][0-9]\d{8}$/, // pattern: /^1[3|4|5|7|8|9][0-9]\d{8}$/,
message: '请输入正确的手机号', // message: '',
}, // },
], // ],
dept: [ dept: [
{ {
required: true, required: true,

View File

@ -15,12 +15,7 @@
</a-breadcrumb> </a-breadcrumb>
<div class="top"> <div class="top">
<div class="left"> <div class="left">
<div <div class="item" :class="{ select: selectNav == nav.key }" v-for="nav in navList" :key="nav.key">
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>
@ -42,13 +37,7 @@
</div> </div>
<div class="btn"> <div class="btn">
<div class="left"> <div class="left">
<a-select <a-select ref="select" v-model:value="value" style="width: 120px" @focus="focus" @change="handleChange">
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>
@ -62,33 +51,26 @@
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<a-checkbox <a-checkbox :checked="
: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 }"> <template #renderItem="{ item }" @click="goNoticePage(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)"> <div class="left" @click="read(item)" :class="item.readStatus === 0 ? 'bold-text' : ''">
{{ 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 <a-checkbox :checked="item.checked" @change="changeCheckBox(item)"></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>
@ -100,14 +82,8 @@
</template> </template>
</a-list> </a-list>
</div> </div>
<a-pagination <a-pagination v-model:current="pageNum" v-model:pageSize="pageSize" :total="total" show-less-items
v-model:current="pageNum" :show-size-changer="false" @change="changePageNum" />
v-model:pageSize="pageSize"
:total="total"
show-less-items
:show-size-changer="false"
@change="changePageNum"
/>
</div> </div>
</template> </template>
<script setup> <script setup>
@ -217,22 +193,15 @@
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 {
@ -300,17 +269,23 @@
.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;
@ -319,6 +294,7 @@
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;
@ -326,78 +302,98 @@
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;
@ -411,23 +407,32 @@
} }
} }
} }
.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;
.left {
.bold-text {
font-weight: bold;
cursor: pointer; cursor: pointer;
}
.left {
width: 9.2rem; width: 9.2rem;
max-height: 0.43rem; max-height: 0.43rem;
overflow: hidden; overflow: hidden;
@ -437,12 +442,19 @@
-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;