Commit b277aaba authored by 刘怀志's avatar 刘怀志

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

parent 53da51cb
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
</template> </template>
<script> <script>
import {queryInstanceListAeByPage} from '../api/system/approve' import {queryInstanceListAeByPage} from '../../api/system/approve'
import { parseTime } from '../api/utils/ruoyi' import { parseTime } from '../../api/utils/ruoyi'
export default { export default {
data() { data() {
......
...@@ -6,14 +6,50 @@ ...@@ -6,14 +6,50 @@
:scroll-with-animation="true"> :scroll-with-animation="true">
<view v-for="(item,key) in noticeList" :key="key" style="display: flex;background-color: #ffffff"> <view v-for="(item,key) in noticeList" :key="key" style="display: flex;background-color: #ffffff">
<!-- 原消息卡片模板 --> <!-- 原消息卡片模板 -->
<view class="noticeCard"> <view class="noticeCard" @click="goDetail">
<view class="noticeTop"> <view class="noticeTop">
<view class="titleClass">基础数据审批</view> <view class="titleClass">
<view class="timeClass"> <img :src="leftIconOne" />
{{ parseTimeA(item.createDate,'{m}-{d} {h}:{i}:{s}') }} {{getLabelByValue(tableUserFormList, item.processType)}}
</view>
<view class="statusText" :style="{color: statusMap[item.status].color}">
{{statusMap[item.status].text}}
</view>
</view>
<view class="subTitleClass">
<view class="subRow">
<view class="subTitle">
发起时间
</view>
<view class="subContent">
{{ parseTimeA(item.createDate,'YYYY/MM/DD {h}:{i}:{s}') }}
</view>
</view>
<view class="subRow">
<view class="subTitle">
发起人
</view>
<view class="subContent">
{{ item.initiateUserName || '-' }}{{ item.initiateDeptName ? '·' + item.initiateDeptName : '' }}
</view>
</view>
<view class="subRow">
<view class="subTitle">
审批人
</view>
<view class="subContent">
{{ item.configApproveUserName || '-' }}
</view>
</view>
<view class="subRow">
<view class="subTitle">
结束时间
</view>
<view class="subContent">
{{ parseTimeA(item.endDate,'YYYY/MM/DD {h}:{i}:{s}') }}
</view>
</view> </view>
</view> </view>
<view class="subTitleClass">{{ item.message }}</view>
</view> </view>
</view> </view>
<!--底部加载--> <!--底部加载-->
...@@ -32,12 +68,47 @@ ...@@ -32,12 +68,47 @@
</template> </template>
<script> <script>
import {queryInstanceListAeByPage} from '../api/system/approve' import {queryInstanceListAeByPage} from '../../api/system/approve'
import { parseTime } from '../api/utils/ruoyi' import { parseTime } from '../../api/utils/ruoyi'
import leftIconOne from '../../static/images/leftIconOne.png'
import leftIconTwo from '../../static/images/leftIconTwo.png'
import {getDicts} from "../../api/system/baseConfig";
export default { export default {
data() { data() {
return { return {
statusMap: {
'2': {
text: '已通过',
color: '#2B9603',
},
'0': {
text: '草稿',
color: 'grey',
},
'6': {
text: '异常结束',
color: '#FF5F5F',
},
'7': {
text: '已失效',
color: '#FF5F5F',
},
'10': {
text: '待审批',
color: '#333399',
},
'5': {
text: '已驳回',
color: '#FF5F5F',
},
'3': {
text: '已驳回',
color: '#FF5F5F',
},
},
leftIconOne,
leftIconTwo,
queryNotice: { queryNotice: {
page: 1, page: 1,
rows: 10, rows: 10,
...@@ -53,10 +124,14 @@ export default { ...@@ -53,10 +124,14 @@ export default {
nomore: '没有更多了' nomore: '没有更多了'
}, },
noticeList: [], noticeList: [],
tableUserFormList: [],
loading: true, loading: true,
total: 0, total: 0,
} }
}, },
created() {
this.getList()
},
mounted() { mounted() {
this.loadData() this.loadData()
}, },
...@@ -69,6 +144,32 @@ export default { ...@@ -69,6 +144,32 @@ export default {
}, },
}, },
methods: { methods: {
goDetail () {
uni.navigateTo({
url: '/pages/approval_detail/baseDetail?id=1'
})
},
/**
* 指定列表,根据值,取label
*/
getLabelByValue (list, value, key = 'value', label = 'label') {
const item = list.find(item => item[key] === value)
return item ? item[label] : '-'
},
/** 查询字典数据列表 */
getList() {
getDicts('table_user_from').then(response => {
// console.log("查询数据字段狗",response)
const tableUserForm = response.data
for (const item of tableUserForm) {
const result = {
value: item.dictValue,
label: item.dictLabel
}
this.tableUserFormList.push(result)
}
})
},
async loadData() { async loadData() {
this.loading = true this.loading = true
const res = await queryInstanceListAeByPage({ const res = await queryInstanceListAeByPage({
...@@ -166,16 +267,29 @@ export default { ...@@ -166,16 +267,29 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
border-bottom: 2rpx solid #F2F2F2; border-bottom: 2rpx solid #F2F2F2;
padding: 22rpx 34rpx 24rpx 32rpx; padding: 22rpx 34rpx 24rpx 0;
} }
.titleClass { .titleClass {
display: flex;
align-items: center;
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 500; font-weight: 500;
font-size: 30rpx; font-size: 30rpx;
color: #333399; color: #111111;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
img{
margin-right: 22rpx;
}
}
.statusText{
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 28rpx;
text-align: right;
font-style: normal;
text-transform: none;
} }
.subTitleClass { .subTitleClass {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
...@@ -187,6 +301,29 @@ export default { ...@@ -187,6 +301,29 @@ export default {
text-transform: none; text-transform: none;
padding: 28rpx 32rpx 0 32rpx; padding: 28rpx 32rpx 0 32rpx;
} }
.subRow{
display: flex;
justify-content: space-between;
margin-bottom: 12rpx;
.subTitle {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #9A9A9A;
text-align: left;
font-style: normal;
text-transform: none;
}
.subContent {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #222222;
text-align: center;
font-style: normal;
text-transform: none;
}
}
.timeClass { .timeClass {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
......
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
</template> </template>
<script> <script>
import { queryInstanceByPage } from '../api/system/approve' import { queryInstanceByPage } from '../../api/system/approve'
import { parseTime } from '../api/utils/ruoyi' import { parseTime } from '../../api/utils/ruoyi'
export default { export default {
props: ['queryParams'], props: ['queryParams'],
......
...@@ -14,6 +14,13 @@ ...@@ -14,6 +14,13 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "pages/approval_detail/baseDetail",
"style": {
"navigationBarTitleText": "DHEC QMS",
"navigationStyle": "custom"
}
},
{ {
"path": "pages/mine/setting/aboutUs", "path": "pages/mine/setting/aboutUs",
"style": { "style": {
......
<template>
<view>详情</view>
</template>
<script>
export default {
name: "baseDetail",
onLoad: function (option) { //option为object类型,会序列化上个页面传递的参数
console.log('id',option.id); //打印出上个页面传递的参数。
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
<script> <script>
// 新增子组件导入 // 新增子组件导入
import BaseDataApproval from '../components/base-data-approval' import BaseDataApproval from '../components/home-approval/base-data-approval'
import BaseDataStart from '../components/base-data-start' import BaseDataStart from '../components/home-approval/base-data-start'
import ProductionApproval from '../components/production-approval' import ProductionApproval from '../components/home-approval/production-approval'
import MineNavbar from "../components/mine-navbar/mineNavbar"; import MineNavbar from "../components/mine-navbar/mineNavbar";
export default { export default {
name: 'Index', name: 'Index',
...@@ -42,8 +42,8 @@ export default { ...@@ -42,8 +42,8 @@ export default {
data() { data() {
return { return {
mesTypeMap: { mesTypeMap: {
'1': 'BaseDataApproval', '1': 'BaseDataStart',
'2': 'BaseDataStart', '2': 'BaseDataApproval',
'3': 'ProductionApproval' '3': 'ProductionApproval'
}, },
list1: [{ list1: [{
......
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