Commit 2f56db0a authored by 刘怀志's avatar 刘怀志

feat(审批): 审批列表接口对接1

parent 78bb047e
import request from '@/utils/request'
/**
* Ae流程实例 - 分页查询
* @param query
* @returns {*}
*/
export function queryInstanceListAeByPage(query) {
return request({
url: '/sysprocessinstance/page/ae',
method: 'get',
params: query
})
}
/**
* 查询流程列表
* @param params
* @returns {AxiosPromise}
*/
export function queryInstanceByPage(params) {
return request({
url: `/process/instance/list`,
method: 'get',
params
})
}
\ No newline at end of file
<template>
<scroll-view
class="scroll-view"
scroll-y="true"
@scrolltolower="scrolltolower"
:scroll-with-animation="true">
<view v-for="(item,key) in noticeList" :key="key" style="display: flex;background-color: #ffffff">
<!-- 原消息卡片模板 -->
<view class="noticeCard">
<view class="noticeTop">
<view class="titleClass">基础数据审批</view>
<view class="timeClass">
{{ parseTimeA(item.createDate,'{m}-{d} {h}:{i}:{s}') }}
</view>
</view>
<view class="subTitleClass">{{ item.message }}</view>
</view>
</view>
<!--底部加载-->
<view v-show="total > 0 && loadStatus !== 'loading'" style="text-align: center;padding-bottom: 5rpx;">
<u-loadmore
:status="loadStatus"
:loadmore-text="loadText.loadmore"
:loading-text="loadText.loading"
:nomore-text="loadText.nomore"
/>
</view>
<view v-show="loadStatus === 'loading'" style="text-align: center">
<!-- <image src="../../static/images/home/loading.gif" style="width: 50rpx;height: 60rpx;" /> -->
</view>
</scroll-view>
</template>
<script>
import {queryInstanceListAeByPage} from '../api/system/approve'
import { parseTime } from '../api/utils/ruoyi'
export default {
props: ['queryParams'],
data() {
return {
queryNotice: {
page: 1,
rows: 10,
mesType: '1',
processGroup: '1',
running: true,
completeStatus: false
},
defaultPageSize: 10,
// 底部加载
loadStatus: 'loadmore',
loadText: {
loadmore: '上滑加载更多',
loading: '努力加载中',
nomore: '没有更多了'
},
noticeList: [],
loading: true,
total: 0,
}
},
mounted() {
this.loadData()
},
computed: {
// 计算属性
parseTimeA() {
return (time) => {
return parseTime(time, '{m}-{d} {h}:{i}:{s}')
}
},
},
methods: {
async loadData() {
this.loading = true
const res = await queryInstanceListAeByPage({
...this.queryNotice,
})
this.noticeList = [...res.data.records]
this.total = res.data.total
if (this.queryNotice.rows * this.queryNotice.page >= this.total) {
this.loadStatus = 'nomore'
}
this.loading = false
},
// 处理滚动加载
scrolltolower() {
this.loadStatus = 'loading'
if (this.queryNotice.rows * this.queryNotice.page >= this.total) {
this.loadStatus = 'nomore'
} else {
this.queryNotice.rows += this.defaultPageSize
this.loadData()
this.loadStatus = 'loadmore'
}
}
},
}
</script>
<style scoped lang="scss">
.scroll-view{
height: 960rpx;
}
.no-message{
text-align: center;
height: calc(100vh - 350rpx);
display: flex;
justify-content: center;
align-items: center;
}
.topTips {
width: 100%;
height: 80rpx;
background-color: #ff9900;
font-size: 26rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
text-align: center;
padding-top: 20rpx;
}
.notice-container {
width: 100%;
margin-top: 542rpx;
background-color: #fff;
overflow-y: hidden;
}
.topContent {
display: flex;
padding-top: 32rpx;
padding-bottom: 32rpx;
padding-left: 32rpx;
background-color: #f0f0f0;
.topSelect {
width: 588rpx;
height: 88rpx;
}
.topButton {
margin-left: 32rpx;
margin-top: 22rpx;
font-size: 34rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #343744;
}
}
.topContent_read {
display: flex;
padding: 34rpx 32rpx;
background-color: #f0f0f0;
font-size: 34rpx;
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
font-weight: bold;
line-height: 40rpx;
.fontColor {
background-image: -webkit-linear-gradient(top, #02A7BA,#62AE79);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
}
}
.noticeCard {
width: 100%;
background-color: #F9F9F9;
margin: 20rpx 22rpx 0 20rpx;
padding-bottom: 32rpx;
border-radius: 15rpx;
.noticeTop{
display: flex;
justify-content: space-between;
border-bottom: 2rpx solid #F2F2F2;
padding: 22rpx 34rpx 24rpx 32rpx;
}
.titleClass {
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 30rpx;
color: #333399;
text-align: left;
font-style: normal;
text-transform: none;
}
.subTitleClass {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #9A9A9A;
text-align: left;
font-style: normal;
text-transform: none;
padding: 28rpx 32rpx 0 32rpx;
}
.timeClass {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #666666;
text-align: right;
font-style: normal;
text-transform: none;
}
}
// 有导航栏后 防止滑到最上面
.scroll-y {
height: calc(100vh - 88px)
}
::v-deep .u-line {
border-bottom-width: 3px !important;
}
::v-deep .u-subsection {
background-color: #fff
}
.checkView {
width: 76rpx;
align-content: center;
margin-bottom: 32rpx;
//border-radius: 10rpx;
//margin-top: 20rpx;
//position: absolute;
}
::v-deep .u-checkbox-group {
//background-color: red;
//padding-left: 16rpx;
height: 80rpx;
position: relative;
top: 50%; /*偏移*/
transform: translateY(-50%);
}
::v-deep .u-checkbox {
margin: auto;
width: 64rpx;
height: 64rpx;
}
::v-deep .u-checkbox__icon-wrap {
margin-left: 25rpx;
margin-right: 0 !important;
}
// 顶部选择样式
::v-deep .u-subsection__bar {
background: linear-gradient(180deg, #02A7BA 0%, #62AE79 100%);
}
::v-deep .u-subsection__item {
border: none !important;
//border-color: none;
}
::v-deep .u-subsection {
height: 88rpx !important;
border-radius: 16rpx 16rpx 16rpx 16rpx;
}
::v-deep .u-subsection__item__text {
font-size: 34rpx !important;
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
font-weight: 400;
}
// 卡片前单选
::v-deep .u-checkbox {
margin-right: 0 !important;
}
::v-deep .u-loading-page__warpper__loading-icon__img{
width: 90rpx !important;
height: 90rpx !important;
}
::v-deep .u-tabs__wrapper__nav__item__text{
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 28rpx;
}
.top-tabs{
display: flex;
justify-content: center;
align-items: center;
margin-top: 20rpx;
border-bottom: 2rpx solid #F2F2F2;
::v-deep .u-tabs{
width: 60%;
}
}
//::v-deep .u-subsection {
// background: black;
//}
</style>
\ No newline at end of file
<template>
<!--自定义头部-->
<view class="mine-navbar" :class="{'u-fixed': fixed}">
<view class="mine-navbar">
<u-navbar
:title="title"
:title-width="titleWidth"
......@@ -242,10 +242,6 @@ export default {
background-clip: border-box;
height: 440rpx;
background: url("/static/images/top-background.png") center/cover no-repeat;
position: fixed;
left: 0;
right: 0;
top: 0;
z-index: 11;
.bar-detail{
margin-top: 78rpx;
......
<template>
<scroll-view
class="scroll-view"
scroll-y="true"
@scrolltolower="scrolltolower"
:scroll-with-animation="true">
<view v-for="(item,key) in noticeList" :key="key" style="display: flex;background-color: #ffffff">
<!-- 原消息卡片模板 -->
<view class="noticeCard">
<view class="noticeTop">
<view class="titleClass">生产信息审批</view>
<view class="timeClass">
{{ parseTimeA(item.updateDate,'{m}-{d} {h}:{i}:{s}') }}
</view>
</view>
<view class="subTitleClass">{{ item.message }}</view>
</view>
</view>
<view v-if="noticeList.length === 0" class="no-message">
<view>
<view style="font-size: 26rpx;font-weight: 400;color: #666666;line-height: 30rpx;margin-top: 36rpx">
<text>
{{ '暂无消息' }}
</text>
</view>
</view>
</view>
<!--底部加载-->
<view v-show="total > 0 && loadStatus !== 'loading'" style="text-align: center;padding-bottom: 5rpx;">
<u-loadmore
:status="loadStatus"
:loadmore-text="loadText.loadmore"
:loading-text="loadText.loading"
:nomore-text="loadText.nomore"
/>
</view>
<view v-show="loadStatus === 'loading'" style="text-align: center">
<!-- <image src="../../static/images/home/loading.gif" style="width: 50rpx;height: 60rpx;" /> -->
</view>
</scroll-view>
</template>
<script>
import { queryInstanceByPage } from '../api/system/approve'
import { parseTime } from '../api/utils/ruoyi'
export default {
props: ['queryParams'],
data() {
return {
queryNotice: {
page: 1,
rows: 10,
mesType: '1',
processGroup: '1',
running: true,
completeStatus: false
},
defaultPageSize: 10,
// 底部加载
loadStatus: 'loadmore',
loadText: {
loadmore: '上滑加载更多',
loading: '努力加载中',
nomore: '没有更多了'
},
noticeList: [],
loading: true,
total: 0,
}
},
mounted() {
this.loadData()
},
computed: {
// 计算属性
parseTimeA() {
return (time) => {
return parseTime(time, '{m}-{d} {h}:{i}:{s}')
}
},
},
methods: {
async loadData() {
this.loading = true
const res = await queryInstanceByPage({
...this.queryNotice,
})
this.noticeList = [...res.data.records]
this.total = res.data.total
if (this.queryNotice.rows * this.queryNotice.page >= this.total) {
this.loadStatus = 'nomore'
}
this.loading = false
},
// 处理滚动加载
scrolltolower() {
this.loadStatus = 'loading'
if (this.queryNotice.rows * this.queryNotice.page >= this.total) {
this.loadStatus = 'nomore'
} else {
this.queryNotice.rows += this.defaultPageSize
this.loadData()
this.loadStatus = 'loadmore'
}
}
},
}
</script>
<style scoped lang="scss">
.scroll-view{
height: 960rpx;
overflow: auto;
}
.no-message{
text-align: center;
height: calc(100vh - 350rpx);
display: flex;
justify-content: center;
align-items: center;
}
.topTips {
width: 100%;
height: 80rpx;
background-color: #ff9900;
font-size: 26rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
text-align: center;
padding-top: 20rpx;
}
.notice-container {
width: 100%;
margin-top: 542rpx;
background-color: #fff;
overflow-y: hidden;
}
.topContent {
display: flex;
padding-top: 32rpx;
padding-bottom: 32rpx;
padding-left: 32rpx;
background-color: #f0f0f0;
.topSelect {
width: 588rpx;
height: 88rpx;
}
.topButton {
margin-left: 32rpx;
margin-top: 22rpx;
font-size: 34rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #343744;
}
}
.topContent_read {
display: flex;
padding: 34rpx 32rpx;
background-color: #f0f0f0;
font-size: 34rpx;
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
font-weight: bold;
line-height: 40rpx;
.fontColor {
background-image: -webkit-linear-gradient(top, #02A7BA,#62AE79);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
}
}
.noticeCard {
width: 100%;
background-color: #F9F9F9;
margin: 20rpx 22rpx 0 20rpx;
padding-bottom: 32rpx;
border-radius: 15rpx;
.noticeTop{
display: flex;
justify-content: space-between;
border-bottom: 2rpx solid #F2F2F2;
padding: 22rpx 34rpx 24rpx 32rpx;
}
.titleClass {
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 30rpx;
color: #333399;
text-align: left;
font-style: normal;
text-transform: none;
}
.subTitleClass {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #9A9A9A;
text-align: left;
font-style: normal;
text-transform: none;
padding: 28rpx 32rpx 0 32rpx;
}
.timeClass {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #666666;
text-align: right;
font-style: normal;
text-transform: none;
}
}
// 有导航栏后 防止滑到最上面
.scroll-y {
height: calc(100vh - 88px)
}
::v-deep .u-line {
border-bottom-width: 3px !important;
}
::v-deep .u-subsection {
background-color: #fff
}
.checkView {
width: 76rpx;
align-content: center;
margin-bottom: 32rpx;
//border-radius: 10rpx;
//margin-top: 20rpx;
//position: absolute;
}
::v-deep .u-checkbox-group {
//background-color: red;
//padding-left: 16rpx;
height: 80rpx;
position: relative;
top: 50%; /*偏移*/
transform: translateY(-50%);
}
::v-deep .u-checkbox {
margin: auto;
width: 64rpx;
height: 64rpx;
}
::v-deep .u-checkbox__icon-wrap {
margin-left: 25rpx;
margin-right: 0 !important;
}
// 顶部选择样式
::v-deep .u-subsection__bar {
background: linear-gradient(180deg, #02A7BA 0%, #62AE79 100%);
}
::v-deep .u-subsection__item {
border: none !important;
//border-color: none;
}
::v-deep .u-subsection {
height: 88rpx !important;
border-radius: 16rpx 16rpx 16rpx 16rpx;
}
::v-deep .u-subsection__item__text {
font-size: 34rpx !important;
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
font-weight: 400;
}
// 卡片前单选
::v-deep .u-checkbox {
margin-right: 0 !important;
}
::v-deep .u-loading-page__warpper__loading-icon__img{
width: 90rpx !important;
height: 90rpx !important;
}
::v-deep .u-tabs__wrapper__nav__item__text{
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 28rpx;
}
.top-tabs{
display: flex;
justify-content: center;
align-items: center;
margin-top: 20rpx;
border-bottom: 2rpx solid #F2F2F2;
::v-deep .u-tabs{
width: 60%;
}
}
//::v-deep .u-subsection {
// background: black;
//}
</style>
\ No newline at end of file
This diff is collapsed.
......@@ -20,7 +20,7 @@
<view v-for="(item,key) in noticeList" :key="key" style="display: flex;background-color: #ffffff">
<view class="noticeCard">
<view class="noticeTop">
<view class="titleClass">{{ queryNotice.mesType === '1' ? '生产信息审批' : '基础数据审批' }}</view>
<view class="titleClass">{{ queryNotice.mesType === '1' ? '基础数据审批' : '生产信息审批' }}</view>
<view class="timeClass">
{{ item.updateDate !== undefined && item.updateDate !== null ? parseTime(item.updateDate, '{m}-{d} {h}:{i}:{s}') : '暂无数据' }}
</view>
......@@ -102,6 +102,7 @@ export default {
page: 1,
rows: 10,
receiverId: undefined,
mesType: '1'
},
noticeList: [],
total: 0,
......@@ -123,7 +124,9 @@ export default {
},
methods: {
clickTabs(item) {
this.queryNotice.mesType = item === '基础数据审批' ? '1' : '2'
this.queryNotice.mesType = item.name === '基础数据审批' ? '1' : '2'
this.queryNotice.page = 1
this.queryNotice.rows = 10
this.getPetmNoticeList()
},
parseTime,
......@@ -335,7 +338,7 @@ export default {
}
.notice-container {
width: 100%;
margin-top: 542rpx;
margin-top: 42rpx;
background-color: #fff;
overflow-y: hidden;
}
......
......@@ -2,7 +2,7 @@
<view class="mine-container">
<mine-navbar title="DHEC QMS" />
<scroll-view class="scroll-y" scroll-y style="margin: 542rpx 0 0 0;">
<scroll-view class="scroll-y" scroll-y style="margin: 42rpx 0 0 0;">
<view style="height: 40rpx;background: #F9F9F9;" />
<view class="header-section" @click="goMyAccount">
<view class="section-detail">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment