Эх сурвалжийг харах

添加oa审批,修改样式,完善bom审批form显示

ZhaoJun 1 жил өмнө
parent
commit
8178c5ff50

+ 3 - 1
App.vue

@@ -29,7 +29,9 @@ export default {
   display: flex;
   flex-direction: column;
   background: url("./static/index/bg.png") no-repeat center;
-  background-size: 100% 100%;
+  background-size: cover;
+	background-attachment: fixed;
+	
   .content {
     flex: 1 1 auto;
     margin: 0 30rpx;

+ 1 - 0
components/search-drawer/search-drawer.vue

@@ -55,6 +55,7 @@ export default {
   z-index: 999;
   background: url("@/static/drawer-bar.png") no-repeat center;
   background-size: cover;
+	background-attachment: fixed;
 }
 .drawer {
   .title {

+ 33 - 17
pages.json

@@ -1,42 +1,58 @@
 {
 	"pages": [{
 			"path": "pages/index/index"
-		}, {
-			"path": "pages/audit/list"
 		},
 		{
 			"path": "pages/login/login",
 			"style": {
 				"navigationBarBackgroundColor": "#7399DB"
 			}
-		}, {
+		},
+		{
+			"path": "pages/audit/list"
+		},
+		{
 			"path": "pages/audit/detail",
 			"style": {
 				"navigationBarTitleText": "",
 				"enablePullDownRefresh": false
 			}
-
-		}, {
+		},
+		{
 			"path": "pages/audit/excelDetail",
 			"style": {
 				"navigationBarTitleText": "",
 				"enablePullDownRefresh": false
 			}
-
+		},
+		{
+			"path": "pages/audit/OA/list"
+		},
+		{
+			"path": "pages/audit/OA/detail",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/audit/OA/excelDetail",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/preview/preview",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
 		}
-	    ,{
-            "path" : "pages/preview/preview",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-    ],
+	],
 	"globalStyle": {
 		"app-plus": {
 			"titleNView": false
 		}
 	}
-}
+}

+ 232 - 0
pages/audit/OA/detail.vue

@@ -0,0 +1,232 @@
+<template>
+	<view class="page-detail">
+		<view class="page-center">
+			<uni-section title="清单名称" type="line" style="margin-top: 0;" />
+			<text style="padding-left: 20rpx;">{{detail.name}}</text>
+
+			<!-- 表单数据 -->
+			<template v-if="formList.length > 0">
+				<uni-section title="表单数据" type="line"></uni-section>
+				<uni-forms class="form" label-align="right" :labelWidth="100">
+					<uni-forms-item v-for="item in formList" :label="item.name" name="email">
+						<view class="content">{{item.value.join(",")}}</view>
+					</uni-forms-item>
+				</uni-forms>
+			</template>
+
+			<!-- 附件信息 -->
+			<template v-if="excelFileList.length > 0">
+				<uni-section title="附件信息" type="line"></uni-section>
+				<view class="attachment" v-for="item in excelFileList" :key="item.id">
+					<!-- {{item.name}} -->
+					<previewFile :src="item.url" :name="item.name" />
+				</view>
+			</template>
+
+			<!-- 审批信息 -->
+			<uni-section title="审批信息" type="line"></uni-section>
+			<uni-steps :options="auditList" :active="currentStep" direction="column" />
+
+			<!-- 清单详情 -->
+			<uni-section title="清单详情" type="line"></uni-section>
+			<view class="excel-detail" @click="toExcelDetail">查看详情</view>
+			<!-- 审批按钮 -->
+			<view class="btns" v-if="isAuditor">
+				<button type="primary" @click="showAuditModal">通过</button>
+				<button type="warn" @click="showRejectModal">拒绝</button>
+			</view>
+		</view>
+
+
+		<!-- 审核通过弹窗 -->
+		<uni-popup ref="popup" type="dialog">
+			<uni-popup-dialog mode="input" placeholder="请输入审批意见" :duration="2000" :before-close="true" @close="auditClose"
+				@confirm="auditConfirm" />
+		</uni-popup>
+
+		<!-- 审批拒绝弹窗 -->
+		<uni-popup ref="rejectPopup" type="dialog">
+			<uni-popup-dialog mode="input" placeholder="请输入拒绝原因" :duration="2000" :before-close="true" @close="rejectClose"
+				@confirm="rejectConfirm"></uni-popup-dialog>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import {
+		gerCurrentUser
+	} from "@/services/user.js"
+
+	import previewFile from "@/components/preview-file/preview-file.vue"
+	import {
+		audit,
+		getOAAuditDetail
+	} from "../../../services/oa";
+
+	export default {
+		components: {
+			previewFile
+		},
+		data() {
+			return {
+				id: "",
+				detail: {},
+				auditList: [],
+				currentStep: 0,
+				isAuditor: true,
+				query: {},
+				excelFileList: []
+			};
+		},
+		onLoad(query) {
+			if (!uni.getStorageSync('token')) {
+				uni.setStorageSync("token", query['JWT-TOKEN']);
+			}
+			this.id = query.id
+			this.query = query
+			this.init()
+		},
+		methods: {
+			async init() {
+				var currentUser = await gerCurrentUser();
+				if (!currentUser) {
+					return
+				}
+				uni.setStorageSync("user", currentUser);
+				const detail = await getOAAuditDetail(this.id)
+				this.detail = detail
+
+				this.getAuditList(detail.OaAuditList, detail.AuditorInfo)
+
+
+			},
+
+			getAuditList(list, currentAuditor) {
+				// 填充审核人列表
+				if (list && list.length) {
+					this.auditList = list.map((item, index) => {
+						if (currentAuditor.ID === item.auditor) {
+							this.currentStep = index
+						}
+						return {
+							title: item.seq_name,
+							desc: `审核人:${item.AuditorUser.CName || '-'}`
+						}
+					})
+				}
+			},
+
+			// 显示通过审批弹窗
+			async showAuditModal() {
+				this.$refs.popup.open();
+			},
+
+			// 通过审批
+			async auditConfirm(audit_comment) {
+				await audit({
+					id: this.id,
+					status: 1,
+					desc: audit_comment
+				})
+				uni.showToast({
+					title: "操作成功"
+				})
+				this.auditClose()
+			},
+
+			auditClose() {
+				this.$refs.popup.close();
+			},
+
+			// 显示拒绝审批弹窗
+			showRejectModal() {
+				this.$refs.rejectPopup.open()
+			},
+
+			async rejectConfirm(audit_comment) {
+				await audit({
+					id: this.id,
+					status: 2,
+					desc: audit_comment
+				})
+				uni.showToast({
+					title: "操作成功"
+				})
+
+				this.rejectClose()
+			},
+
+			rejectClose() {
+				this.$refs.rejectPopup.close();
+			},
+
+			toExcelDetail() {
+				uni.navigateTo({
+					url: `./excelDetail?templateNodeId=${this.templateNodeId}&versionId=${this.versionId}`
+				})
+			}
+		},
+		computed: {
+			formList() {
+				const form = this.detail?.form
+				if (!form) {
+					return []
+				}
+				console.log(form);
+				try {
+					const formDatas = JSON.parse(form)
+					console.log(formDatas);
+					if (formDatas && formDatas.length) {
+						return formDatas
+					}
+					return []
+				} catch {
+					return []
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	.page-detail {
+		min-height: 100vh;
+		padding: 20rpx 30rpx 40rpx;
+		background: url("~@/static/index/bg.png") no-repeat center;
+		background-size: cover;
+		background-attachment: fixed;
+
+		.page-center {
+			padding: 30rpx;
+			padding-top: 0;
+			background-color: #fff;
+		}
+	}
+
+	.btns {
+		display: flex;
+		margin-top: 40rpx;
+	}
+
+	.excel-detail {
+		color: #2f42ca;
+		text-decoration: underline;
+		padding-left: 20rpx;
+	}
+
+	.form {
+		width: 90%;
+		margin: 0 auto;
+
+		.content {
+			line-height: 44rpx;
+			padding: 14rpx;
+			word-break: break-all;
+		}
+	}
+
+	.attachment {
+		padding-left: 20rpx;
+		margin-bottom: 20rpx;
+	}
+</style>

+ 24 - 0
pages/audit/OA/excelDetail.vue

@@ -0,0 +1,24 @@
+<template>
+	<web-view :src="url"></web-view>
+</template>
+
+<script>
+	import {
+		host
+	} from "@/services/constants.js"
+
+	const token = uni.getStorageSync('token')
+	export default {
+		data() {
+			return {
+				url: '',
+			}
+		},
+		onLoad(options) {
+			this.url = `http://120.55.44.4:8896/#/mobile/detail/${options.templateNodeId}/${options.versionId}?JWT-TOKEN=${token}`
+		},
+	}
+</script>
+
+<style>
+</style>

+ 133 - 0
pages/audit/OA/list.vue

@@ -0,0 +1,133 @@
+<template>
+	<view class="page-detail">
+		<view class="page-center">
+			<uni-section title="待审批列表" type="line" style="margin-top: 0;" />
+			<uni-card v-for="item in list" :title="item.name || '无标题'" @click="toDetail(item)" >
+				<view class="item">
+					<view class="label">发起时间</view>
+					<view class="value">{{formateDate(item.create_time)}}</view>
+				</view>
+				<view class="item">
+					<view class="label">发起人</view>
+					<view class="value">{{item.AuthorInfo && item.AuthorInfo.CName}}</view>
+				</view>
+				<button size="mini" type="default" class="detailBtn" @click="toDetail(item)">查看详情</button>
+				<!-- <view class="row">
+					<view class="item">
+						<view class="label">分类</view>
+						<view class="value">{{'classify[item.classify_id]' || '未知分类'}}</view>
+					</view>
+					<view class="item">
+						<view class="label">提交人</view>
+						<view class="value">{{'item.AuthorInfo && item.AuthorInfo.CName'}}</view>
+					</view>
+				</view> -->
+			</uni-card>
+			<view style="text-align: center;" v-if="list.length == 0">暂无审批项</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getOAAuditList
+	} from "@/services/oa.js"
+
+	export default {
+		data() {
+			return {
+				list: [],
+				pagination: {
+					current: 1,
+					pageSize: 10,
+					total: 0,
+				}
+			}
+		},
+		onLoad(query) {
+
+		},
+		mounted() {
+			this.init()
+		},
+		onShow() {
+			this.queryList()
+		},
+		methods: {
+			async init() {},
+			async queryList() {
+				var {
+					list,
+					pagination
+				} = await getOAAuditList()
+				this.list = list;
+				this.pagination = pagination;
+			},
+			formateDate(date) {
+				const origin = new Date(date);
+				const datePart = origin.getFullYear() + "-" + (origin.getMonth() + 1) + "-" + origin.getDate();
+				const timePart = origin.getHours() + ":" + origin.getMinutes() + ":" + origin.getSeconds();
+				return datePart + " " + timePart;
+			},
+			toDetail(item) {
+				uni.navigateTo({
+					url: `./detail?id=${item.id}`
+				})
+			}
+		},
+	}
+</script>
+
+<style lang="less" scoped>
+	.page-detail {
+		min-height: 100vh;
+		padding: 15px;
+		background: url("~@/static/index/bg.png") no-repeat center;
+		background-size: cover;
+		background-attachment: fixed;
+
+		.page-center {
+			padding: 20rpx;
+			padding-top: 0;
+			border-radius: 5px;
+			background-color: #fff;
+		}
+	}
+
+	.item {
+		margin-bottom: 14px;
+
+		.label {
+			font-weight: bold;
+			font-size: 16px;
+			margin-bottom: 5px;
+		}
+
+		.value {
+			font-size: 14;
+		}
+	}
+
+	.row {
+		display: flex;
+
+		.item {
+			width: 50%;
+			display: flex;
+			align-items: center;
+
+			.label {
+				margin-right: 12px;
+				margin-bottom: 0;
+			}
+		}
+	}
+
+	.detailBtn {
+		position: absolute;
+		bottom: 20px;
+		right: 20px;
+		background-color: #2979ff;
+		color: #fff;
+	}
+</style>

+ 15 - 0
pages/audit/README.md

@@ -0,0 +1,15 @@
+# 2023-08 因为需要向前兼容做如下变更
+
+## audit目录
+
+- detail.vue
+- excelDetail.vue
+- list.vue
+这三个文件是BOM的审批相关页面
+
+### OA文件夹
+
+- detail.vue
+- excelDetail.vue
+- list.vue
+  这三个文件是OA的审批相关页面

+ 45 - 19
pages/audit/detail.vue

@@ -7,12 +7,11 @@
 			<!-- 表单数据 -->
 			<template v-if="formList.length > 0">
 				<uni-section title="表单数据" type="line"></uni-section>
-				<uni-forms class="form" label-align="right" :labelWidth="100">
+				<uni-forms class="form" label-align="right" :labelWidth="100" >
 					<uni-forms-item v-for="item in formList" :label="item.name" name="email">
 						<view class="content">{{item.value.join(",")}}</view>
 					</uni-forms-item>
 				</uni-forms>
-
 			</template>
 
 			<!-- 附件信息 -->
@@ -88,6 +87,7 @@
 					},
 				},
 				isAuditor: false,
+				isMobile: true,
 				options: {}
 			};
 		},
@@ -102,22 +102,30 @@
 			this.init()
 		},
 		methods: {
+			checkDeviceType() {
+				const userAgent = navigator.userAgent.toLowerCase();
+				const mobileKeywords = ['android', 'iphone', 'ipad', 'ipod', 'mobile'];
+				this.isMobile = mobileKeywords.some(keyword => userAgent.includes(keyword));
+				return this.isMobile
+			},
+
 			async init() {
 				var currentUser = await gerCurrentUser();
-				console.log(currentUser);
-				if(!currentUser){
+				if (!currentUser) {
 					return
 				}
 				uni.setStorageSync("user", currentUser);
-				// var {
-				// 	data: {
-				// 		excel_version_tree: versionList
-				// 	}
-				// } = await queryVersionsList({
-				// 	template_node_id: this.templateNodeId
-				// });
-				// var version = versionList.find(v => v.id == this.versionId);
-				var version = await queryVersionDetail({userID: currentUser.ID, versionID: this.versionId})
+
+				var version = await queryVersionDetail({
+					userID: currentUser.ID,
+					versionID: this.versionId
+				})
+				if (!this.checkDeviceType()) {
+					// 如果是在电脑上打开,转到PC端的页面去
+					window.location.href =
+						`http://120.55.44.4:8896/#/bom/home/detail/${version.project_id}/${version.template_id}?version_id=${this.versionId}`
+				}
+
 				if (version.flow_id) {
 					this.getFlow(version)
 				}
@@ -139,13 +147,15 @@
 							name,
 						};
 					})
-					console.log(this.excelFileList)
+					// console.log(this.excelFileList)
 				}
 			},
+			
 			// 显示通过审批弹窗
 			async showAuditModal() {
 				this.$refs.popup.open();
 			},
+			
 			// 通过审批
 			async auditConfirm() {
 				let flow = this.flow;
@@ -169,16 +179,20 @@
 				})
 				this.$refs.popup.close();
 			},
+			
 			// 显示拒绝审批弹窗
 			showRejectModal() {
 				this.$refs.rejectPopup.open()
 			},
+			
 			auditClose() {
 				this.$refs.popup.close();
 			},
+			
 			rejectClose() {
 				this.$refs.rejectPopup.close();
 			},
+			
 			async rejectConfirm(audit_comment) {
 				const flow = this.flow
 				const flowNode = flow.currentNode;
@@ -218,7 +232,6 @@
 					let item = auditList.find(item => item.list.id == version.flow_id);
 					if (!item) return;
 					// 查询当前节点
-					debugger
 					let current = item.list.FlowNodes.findIndex(node => node.seq == item.active);
 					item.current = current == -1 ? 0 : current;
 					// 保存当前所处节点
@@ -240,6 +253,7 @@
 					}
 				}
 			},
+			
 			toExcelDetail() {
 				uni.navigateTo({
 					url: `./excelDetail?templateNodeId=${this.templateNodeId}&versionId=${this.versionId}`
@@ -248,10 +262,19 @@
 		},
 		computed: {
 			formList() {
-				if (!this.version.ding_schema) return []
+				if (!this.version.formStr) {
+					return []
+				}
 				try {
-					const ding_schema = JSON.parse(this.version.ding_schema);
-					return JSON.parse(ding_schema).formComponentValues || [];
+					const formStrArray = JSON.parse(this.version.formStr);
+					const formComponents = []
+					if(formStrArray && formStrArray.length){
+						formStrArray.forEach(item=>{
+							formComponents.push(JSON.parse(item))
+						})
+					}
+					const formComponent = formComponents.filter(item=> item.template_node_id === this.version.template_node_id)
+					return formComponent[0].formComponentValues || [];
 				} catch (e) {
 					return []
 				}
@@ -265,6 +288,8 @@
 		min-height: 100vh;
 		padding: 20rpx 30rpx 40rpx;
 		background: url("~@/static/index/bg.png") no-repeat center;
+		background-size: cover;
+		background-attachment: fixed;
 
 		.page-center {
 			padding: 30rpx;
@@ -286,7 +311,8 @@
 
 	.form {
 		width: 90%;
-		margin: 0 auto;
+		margin: 0;
+		box-shadow: 0 0 1 3 rgba(0, 0, 0, 0.1);
 
 		.content {
 			line-height: 44rpx;

+ 18 - 4
pages/audit/list.vue

@@ -12,7 +12,6 @@
 					<view class="label">清单名称</view>
 					<view class="value">{{item.version_name}}.{{item.version_no}}</view>
 				</view>
-
 				<view class="row">
 					<view class="item">
 						<view class="label">分类</view>
@@ -41,9 +40,19 @@
 			return {
 				list: [],
 				classify: {},
-				project: {}
+				project: {},
+				plateform: 'bom',
+				pagination: {
+					current: 1,
+					pageSize: 10,
+					total: 0,
+				}
 			}
 		},
+		onLoad(query) {
+			this.plateform = query.type
+
+		},
 		mounted() {
 			this.init()
 		},
@@ -72,13 +81,16 @@
 				this.classify = classify;
 
 			},
+
 			async queryList() {
 				let user = uni.getStorageSync("user");
 				var {
 					data: list
 				} = await queryAuthList(user.ID)
+				// console.log(list);
 				this.list = list;
 			},
+
 			toDetail(item) {
 				uni.navigateTo({
 					url: `./detail?templateNodeId=${item.TemplateNodeInfo.Id}&versionId=${item.version_id}&projectId=${item.project_id}`
@@ -93,11 +105,13 @@
 		min-height: 100vh;
 		padding: 20rpx 20rpx 40rpx;
 		background: url("~@/static/index/bg.png") no-repeat center;
-		background-size: 100% 100%;
+		background-size: cover;
+		background-attachment: fixed;
 
 		.page-center {
 			padding: 20rpx;
 			padding-top: 0;
+			border-radius: 5px;
 			background-color: #fff;
 		}
 	}
@@ -130,4 +144,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 36 - 0
pages/index/buttonConfig.js

@@ -0,0 +1,36 @@
+export const buttons = [{
+		name: 'BOM审批',
+		show: true,
+		icon: 'list',
+		size: 40,
+		url: '../audit/list',
+	},
+	{
+		name: 'OA审批',
+		show: true,
+		icon: 'calendar-filled',
+		size: 40,
+		url: '../audit/OA/list'
+	},
+	{
+		name: '项目审核',
+		show: false,
+		icon: 'calendar-filled',
+		size: 40,
+		url: '../audit/list'
+	},
+	{
+		name: '工时上报',
+		show: false,
+		icon: 'calendar-filled',
+		size: 40,
+		url: '../audit/list'
+	},
+	{
+		name: '工时审批',
+		show: false,
+		icon: 'calendar-filled',
+		size: 40,
+		url: '../audit/list'
+	},
+]

+ 92 - 93
pages/index/index.vue

@@ -1,101 +1,100 @@
 <template>
-<view class="page">
-  <view class="content">
-    <view class="group">
-      <button class="button" v-if="true" @click="onHandleClick(0)">
-        <uni-icons type="list" size="35" />
-        <view>审批列表</view>
-      </button>
-      <!-- <button class="button" v-if="true" @click="onHandleClick(1)">
-        <uni-icons type="checkmarkempty" size="35" />
-        <view>项目审核</view>
-      </button>
-      <button class="button" v-if="true" @click="onHandleClick(2)">
-        <uni-icons type="calendar" size="35" />
-        <view>工时上报</view>
-      </button>
-      <button class="button" v-if="true" @click="onHandleClick(3)">
-        <uni-icons type="auth" size="35" />
-        <view>工时审批</view>
-      </button> -->
-    </view>
-  </view></view>
+	<view class="page">
+		<view class="content">
+			<view class="group">
+					<button v-for="(button, index) in buttons" class="button" @click="onHandleClick(button)">
+						<uni-icons :type="button.icon" :size="button.size" />
+						<view>{{button.name}}</view>
+					</button>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
-import { queryUser } from "@/services/index";
+	import {
+		queryUser
+	} from "@/services/index";
+	
+	import {buttons} from './buttonConfig.js'
 
-export default {
-  data() {
-    return { user: {} };
-  },
-  onShow() {
-    this.getCurrentUser();
-  },
-  computed: {
-    permission() {
-      let permission = {};
-      this.user?.Permissions.forEach((item) => {
-        permission = {
-          ...permission,
-          ...item.Menus,
-        };
-      });
-      return permission;
-    },
-  },
-  methods: {
-    onHandleClick(index) {
-      switch (index) {
-        case 0:
-          uni.navigateTo({
-            url: "../audit/list",
-          });
-          break;
-        // case 1:
-        //   uni.navigateTo({
-        //     url: "../Project/list?auth=true",
-        //   });
-        //   break;
-        // case 2:
-        //   uni.navigateTo({
-        //     url: "../WorkingHours/index",
-        //   });
-        //   break;
-        // case 3:
-        //   uni.navigateTo({
-        //     url: "../WorkingHours/audit",
-        //   });
-        //   break;
-      }
-    },
-    async getCurrentUser() {
-      let res = {};
-      res = await queryUser();
-      this.user = res.data;
-    },
-  },
-};
+	export default {
+		data() {
+			return {
+				user: {},
+				buttons: buttons.filter(item=>item.show)
+			};
+		},
+		onShow() {
+			this.getCurrentUser();
+		},
+		computed: {
+			permission() {
+				let permission = {};
+				this.user?.Permissions.forEach((item) => {
+					permission = {
+						...permission,
+						...item.Menus,
+					};
+				});
+				return permission;
+			},
+		},
+		methods: {
+			onHandleClick(button) {
+				uni.navigateTo({
+					url: button.url,
+				})
+			},
+			async getCurrentUser() {
+				let res = {};
+				res = await queryUser();
+				this.user = res.data;
+			},
+		},
+	};
 </script>
 
 <style lang="less" scoped>
-.content {
-  display: flex;
-  justify-content: center;
-}
-.group {
-  width: 90%;
-  padding: 5%;
-  display: flex;
-  justify-content: center;
-  flex-wrap: wrap;
-  background-color: #ffffff;
-  height: 800rpx;
-}
-.button {
-  width: 40%;
-  margin: 5%;
-  height: 280rpx;
-  font-size: 32rpx;
-}
-</style>
+	.content {
+		height: 100vh;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		margin: 0;
+		background: none;
+		
+	}
+
+	.group {
+		width: calc(100% - 30px);
+		height: calc(100% - 30px);
+		padding: 20px 10px;
+		border-radius: 5px;
+		background-color: #ffffff;
+		overflow-y: scroll;
+		// 每行两个,三行
+		display: grid;
+		grid-template-columns: repeat(2, 45%);
+		// grid-template-columns: 1fr 1fr;
+		grid-template-rows: repeat(4, 300rpx);
+		grid-row-gap: 10px;
+		grid-column-gap: 10px;
+		justify-content: space-evenly;
+		justify-items: center;
+		align-content: flex-start;
+		align-items: center;
+		
+	}
+
+	.button {
+		width: 100%;
+		margin: 5px;
+		height: 300rpx;
+		font-size: 32rpx;
+		background-color: #edf1f7;
+		box-shadow: 0px 0px 3px 3px rgba(0, 0, 0, 0.1) ;
+	}
+
+	
+</style>

+ 3 - 2
pages/login/login.vue

@@ -83,7 +83,7 @@ export default {
       uni.setStorageSync("token", data.token);
       uni.setStorageSync("user", data.user);
       uni.reLaunch({
-        url: "../audit/list",
+        url: "../index/index",
       });
     },
     forget() {
@@ -129,7 +129,8 @@ export default {
   display: flex;
   flex-direction: column;
   background: url("~@/static/bg.png") no-repeat center;
-  background-size: 100% 100%;
+  background-size: cover;
+	background-attachment: fixed;
 }
 .logo {
   height: 220rpx;

+ 16 - 0
services/oa.js

@@ -0,0 +1,16 @@
+import request from "./request"
+
+export async function getOAAuditList() {
+	const res = await request('v1/oa/audit/list?pageSize=99999', 'GET');
+	return res.data
+}
+
+export async function getOAAuditDetail(id) {
+	const res = await request(`v1/oa/audit/detail?id=${id}`, 'GET')
+	return res.data
+}
+
+export async function audit(data) {
+	return await request('v1/oa/audit/status', 'GET', data)
+
+}