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

@ -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;

File diff suppressed because it is too large Load Diff

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,353 +82,383 @@
</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>
// 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',
num: 0, num: 0,
}, },
{ {
title: '通知', title: '通知',
key: 'notice', key: 'notice',
num: 0, num: 0,
}, },
{ {
title: '评论', title: '评论',
key: 'comment', key: 'comment',
num: 0, num: 0,
}, },
{ {
title: '其它', title: '其它',
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
} else { } else {
obj.from = nav.title obj.from = nav.title
}
value.value = '全部消息'
delete obj.readStatus
init()
} }
const changeCheckBox = (item) => { value.value = '全部消息'
item.checked = !item.checked delete obj.readStatus
if (item.checked) { init()
selectData.value.push(item.id) }
} else { const changeCheckBox = (item) => {
selectData.value = selectData.value.filter((val) => val !== item.id) item.checked = !item.checked
} if (item.checked) {
selectData.value.push(item.id)
} else {
selectData.value = selectData.value.filter((val) => val !== item.id)
} }
const changeCheckAll = () => { }
if (selectData.value.length == data.value.length) { const changeCheckAll = () => {
selectData.value = [] if (selectData.value.length == data.value.length) {
data.value.forEach((val) => { selectData.value = []
val.checked = false data.value.forEach((val) => {
}) val.checked = false
} else { })
selectData.value = [] } else {
data.value.forEach((val) => { selectData.value = []
val.checked = true data.value.forEach((val) => {
selectData.value.push(val.id) val.checked = true
}) selectData.value.push(val.id)
}
}
const changePageNum = (page) => {
pageNum.value = page
obj.page = pageNum.value
init()
}
const handleChange = () => {
pageNum.value = 1
obj.page = pageNum.value
switch (value.value) {
case '全部消息':
delete obj.readStatus
break
case '已读消息':
obj.readStatus = 1
break
case '未读消息':
obj.readStatus = 0
break
default:
delete obj.readStatus
break
}
init()
}
const goBack = (url) => {
router.push({
path: url,
}) })
} }
const read = (item) => { }
// console.log(item) const changePageNum = (page) => {
if (selectData.value.length === 0 && !item) { pageNum.value = page
message.error('未选择消息!') obj.page = pageNum.value
init()
}
const handleChange = () => {
pageNum.value = 1
obj.page = pageNum.value
switch (value.value) {
case '全部消息':
delete obj.readStatus
break
case '已读消息':
obj.readStatus = 1
break
case '未读消息':
obj.readStatus = 0
break
default:
delete obj.readStatus
break
}
init()
}
const goBack = (url) => {
router.push({
path: url,
})
}
const read = (item) => {
// console.log(item)
if (selectData.value.length === 0 && !item) {
message.error('未选择消息!')
return
}
console.log(selectData.value)
if (item) {
//
if (item.readStatus === 1) {
return return
} }
console.log(selectData.value)
// let str = '' mynoticeRead(item.id).then((res) => {
// selectData.value.forEach((val, index) => { if (res.data.code == 0) {
// str += val message.success('通知已读!')
// if (index < selectData.value.length - 1) { mybus.emit('getMynotice')
// str += ';' init()
// } } else {
// }) message.error('操作失败!')
if (item) { }
mynoticeRead(item.id).then((res) => { })
if (res.data.code == 0 ) { } else {
message.success('通知已读!') console.log('提交')
// if(item.readStatus == 1){ selectData.value.map((val) => {
// message.success('') mynoticeRead(val).then((res) => {
// } if(item.readStatus == 0){ if (res.data.code == 0) {
// message.success('') // message.success('')
// }
mybus.emit('getMynotice') mybus.emit('getMynotice')
init() init()
} else { } else {
message.error('操作失败!') message.error('操作失败!')
} }
}) })
} else {
console.log('提交')
selectData.value.map((val) => {
mynoticeRead(val).then((res) => {
if (res.data.code == 0) {
// message.success('')
mybus.emit('getMynotice')
init()
} else {
message.error('操作失败!')
}
})
})
}
}
const init = () => {
// from readStatus 0 1
mynotice(obj).then((res) => {
console.log('消息=============>', res.data.data)
res.data.data.list.forEach((val) => {
if (val.from === '通知') {
val.src = require('@/assets/mynoticeView/notice.png')
} else if (val.from === '评论') {
val.src = require('@/assets/mynoticeView/comment.png')
} else if (val.from === '其它') {
val.src = require('@/assets/mynoticeView/other.png')
}
val.checked = false
})
data.value = res.data.data.list
total.value = res.data.data.total
selectData.value = []
}) })
} }
navList.forEach((val) => { }
if (val.title === '全部') { const init = () => {
mynotice({ page: pageNum.value, limit: pageSize.value }).then((res) => { // from readStatus 0 1
val.num = res.data.data.total mynotice(obj).then((res) => {
}) console.log('消息=============>', res.data.data)
} else { res.data.data.list.forEach((val) => {
mynotice({ if (val.from === '通知') {
page: pageNum.value, val.src = require('@/assets/mynoticeView/notice.png')
limit: pageSize.value, } else if (val.from === '评论') {
from: val.title, val.src = require('@/assets/mynoticeView/comment.png')
}).then((res) => { } else if (val.from === '其它') {
val.num = res.data.data.total val.src = require('@/assets/mynoticeView/other.png')
}) }
} val.checked = false
})
data.value = res.data.data.list
total.value = res.data.data.total
selectData.value = []
}) })
}
navList.forEach((val) => {
if (val.title === '全部') {
mynotice({ page: pageNum.value, limit: pageSize.value }).then((res) => {
val.num = res.data.data.total
})
} else {
mynotice({
page: pageNum.value,
limit: pageSize.value,
from: val.title,
}).then((res) => {
val.num = res.data.data.total
})
}
})
init()
mybus.on('noticeListInit', () => {
init() init()
mybus.on('noticeListInit', () => { })
init() onBeforeUnmount(() => {
}) mybus.off('noticeListInit')
onBeforeUnmount(() => { })
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 {
padding: 0.1rem 3.1rem; .ant-breadcrumb {
} padding: 0.1rem 3.1rem;
.top { }
background: #fff;
padding: 0.18rem 3.1rem 0; .top {
background: #fff;
padding: 0.18rem 3.1rem 0;
display: flex;
justify-content: space-between;
align-items: center;
.left {
display: flex; display: flex;
justify-content: space-between;
align-items: center; .item {
.left {
display: flex;
.item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-left: 1.28rem;
margin-bottom: 0.16rem;
border-bottom: 3px solid #fff;
i {
display: inline-block;
width: 0.48rem;
height: 0.48rem;
margin-bottom: 0.15rem;
cursor: pointer;
}
.all {
background: url('~@/assets/mynoticeView/all.png') no-repeat;
background-size: 100%;
}
.notice {
background: url('~@/assets/mynoticeView/notice.png') no-repeat;
background-size: 100%;
}
.comment {
background: url('~@/assets/mynoticeView/comment.png') no-repeat;
background-size: 100%;
}
.other {
background: url('~@/assets/mynoticeView/other.png') no-repeat;
background-size: 100%;
}
}
.item:nth-of-type(1) {
margin-left: 0;
}
.select {
border-bottom: 3px solid #0058e1;
color: #0058e1;
}
}
.right {
display: flex; display: flex;
flex-direction: column;
justify-content: center;
align-items: center; align-items: center;
height: 0.32rem; margin-left: 1.28rem;
div { margin-bottom: 0.16rem;
width: 0.5rem; border-bottom: 3px solid #fff;
}
.reset { i {
color: #0058e1; display: inline-block;
width: 0.48rem;
height: 0.48rem;
margin-bottom: 0.15rem;
cursor: pointer; cursor: pointer;
} }
}
}
.btn {
background: #fff;
margin-top: 0.16rem;
padding: 0.14rem 3.1rem 0;
display: flex;
justify-content: space-between;
.left {
display: flex;
align-items: center;
.ant-select {
margin-right: 0.24rem;
}
.check {
display: flex;
align-items: center;
div {
margin-left: 0.24rem;
span {
font-size: 18px;
color: #0058e1;
}
}
div:nth-of-type(1) {
margin-left: 0.12rem;
}
}
}
.right {
display: flex;
justify-content: space-around;
align-items: center;
div {
margin: 0 0.1rem;
}
span {
cursor: pointer;
color: #0058e1;
text-align: center;
align-self: center;
padding: 0.05rem 0.1rem;
}
span:hover { .all {
background: rgba(0, 88, 225, 0.1); background: url('~@/assets/mynoticeView/all.png') no-repeat;
background-size: 100%;
}
.notice {
background: url('~@/assets/mynoticeView/notice.png') no-repeat;
background-size: 100%;
}
.comment {
background: url('~@/assets/mynoticeView/comment.png') no-repeat;
background-size: 100%;
}
.other {
background: url('~@/assets/mynoticeView/other.png') no-repeat;
background-size: 100%;
} }
} }
.item:nth-of-type(1) {
margin-left: 0;
}
.select {
border-bottom: 3px solid #0058e1;
color: #0058e1;
}
} }
.main {
background: #fff; .right {
padding: 0 3.1rem; display: flex;
height: 4.75rem; align-items: center;
overflow-y: scroll; height: 0.32rem;
:deep(.ant-list-item-meta) {
div {
width: 0.5rem;
}
.reset {
color: #0058e1;
cursor: pointer;
}
}
}
.btn {
background: #fff;
margin-top: 0.16rem;
padding: 0.14rem 3.1rem 0;
display: flex;
justify-content: space-between;
.left {
display: flex;
align-items: center;
.ant-select {
margin-right: 0.24rem;
}
.check {
display: flex; display: flex;
align-items: center; align-items: center;
.ant-checkbox-wrapper {
margin-right: 0.3rem; div {
} margin-left: 0.24rem;
.ant-list-item-meta-title {
display: flex; span {
justify-content: space-between; font-size: 18px;
align-items: center;
.left {
cursor: pointer;
width: 9.2rem;
max-height: 0.43rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
}
.left:hover {
color: #0058e1; color: #0058e1;
} }
} }
div:nth-of-type(1) {
margin-left: 0.12rem;
}
} }
} }
.ant-pagination {
background: #fff; .right {
margin-top: 0; display: flex;
padding: 0.2rem 0 0.2rem; justify-content: space-around;
align-items: center;
div {
margin: 0 0.1rem;
}
span {
cursor: pointer;
color: #0058e1;
text-align: center;
align-self: center;
padding: 0.05rem 0.1rem;
}
span:hover {
background: rgba(0, 88, 225, 0.1);
}
} }
} }
.main {
background: #fff;
padding: 0 3.1rem;
height: 4.75rem;
overflow-y: scroll;
:deep(.ant-list-item-meta) {
display: flex;
align-items: center;
.ant-checkbox-wrapper {
margin-right: 0.3rem;
}
.ant-list-item-meta-title {
display: flex;
justify-content: space-between;
align-items: center;
.bold-text {
font-weight: bold;
cursor: pointer;
}
.left {
width: 9.2rem;
max-height: 0.43rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
}
.ant-badge-dot {
width: 8px;
height: 8px;
}
.left:hover {
color: #0058e1;
}
}
}
}
.ant-pagination {
background: #fff;
margin-top: 0;
padding: 0.2rem 0 0.2rem;
}
}
</style> </style>