From db2b1f3fd015968ddc67fc6d543b730f0dc48bfd Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Tue, 28 Mar 2023 15:47:33 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=20=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/bd/bddetail.vue | 127 +++++++++++++++++++++++---------------
pages/index/login.vue | 2 +-
pages/visit/addrecord.vue | 17 ++---
pages/visit/testStudy.vue | 2 +-
4 files changed, 88 insertions(+), 60 deletions(-)
diff --git a/pages/bd/bddetail.vue b/pages/bd/bddetail.vue
index 11e9a74..d3b5b2c 100644
--- a/pages/bd/bddetail.vue
+++ b/pages/bd/bddetail.vue
@@ -94,20 +94,22 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ 审核
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{checkText}}
@@ -123,7 +125,18 @@
data() {
return {
id: "",
- info: {},
+ info: {},
+ checkText:'',
+ checkLevel:[{
+ id:1,
+ value:'请等待一级审核完成'
+ },{
+ id:2,
+ value:'请等待二级审核完成'
+ },{
+ id:3,
+ value:'请等待三级审核完成'
+ }],
checkForm: {
level: "",
status: "",
@@ -139,10 +152,7 @@
}]
}
},
- statusList: [{
- value: 0,
- text: "待审核"
- },
+ statusList: [
{
value: 1,
text: "通过"
@@ -170,31 +180,35 @@
checkSubmit() {
let that = this
console.log(that.checkForm)
- // return
- this.util.request({
- api: '/api/admin/visit_audit/save',
- method: "POST",
- requestType:'bd',
- data: that.checkForm,
- utilSuccess: function(res) {
- uni.showToast({
- title: res.msg,
- duration: 2000,
- icon: 'none'
- })
- // uni.removeStorageSync('formData')
- uni.navigateTo({
- url:'/pages/bd/record?type=mycheck'
- })
- },
- utilFail: function(res) {
- uni.showToast({
- title: res.errmsg,
- duration: 2000,
- icon: 'none'
- })
- }
- })
+ this.$refs['formdata'].validate().then(res => {
+ this.util.request({
+ api: '/api/admin/visit_audit/save',
+ method: "POST",
+ requestType:'bd',
+ data: that.checkForm,
+ utilSuccess: function(res) {
+ uni.showToast({
+ title: res.msg,
+ duration: 2000,
+ icon: 'none'
+ })
+ // uni.removeStorageSync('formData')
+ uni.navigateTo({
+ url:'/pages/bd/record?type=mycheck'
+ })
+ },
+ utilFail: function(res) {
+ uni.showToast({
+ title: res.errmsg,
+ duration: 2000,
+ icon: 'none'
+ })
+ }
+ })
+ }).catch(err => {
+ console.log('err', err);
+ })
+
},
loadDetail() {
let that = this
@@ -208,13 +222,26 @@
utilSuccess: function(res) {
that.info = res
for (let item of res.audit) {
- if(that.userId==item.audit_admin_id){
- that.checkForm.level = item.level
- that.checkForm.id = item.id
- that.checkForm.audit_admin_id = item.audit_admin_id
- that.isCheck = true
- return
+ if(item.status==0){
+ if(that.userId==item.audit_admin_id){
+ that.checkForm.level = item.level
+ that.checkForm.id = item.id
+ that.checkForm.audit_admin_id = item.audit_admin_id
+ that.isCheck = true
+ return
+ }else{
+ that.checkLevel.map(item1=>{
+ if(item.level==item1.id){
+ that.checkText = item1.value
+ }
+ })
+ that.isCheck = false
+ return
+ }
+ }else{
+ that.isCheck = false
}
+
}
},
utilFail: function(res) {
diff --git a/pages/index/login.vue b/pages/index/login.vue
index 82063a8..81f0c54 100644
--- a/pages/index/login.vue
+++ b/pages/index/login.vue
@@ -93,7 +93,7 @@
uni.showToast({
title:"登录成功",
success() {
- uni.navigateTo({
+ uni.redirectTo({
url:"/pages/bd/mine"
})
}
diff --git a/pages/visit/addrecord.vue b/pages/visit/addrecord.vue
index 3c0a5ad..3389b55 100644
--- a/pages/visit/addrecord.vue
+++ b/pages/visit/addrecord.vue
@@ -22,10 +22,10 @@
-
+
-
+
@@ -98,10 +98,10 @@
-
+
-
+
被访人信息
@@ -110,7 +110,7 @@
-->
@@ -345,20 +345,21 @@
this.getVisitArea()
this.getVisitTime()
this.getReason()
- this.getAdminList()
+ // this.getAdminList()
},
onReady() {},
methods: {
adminListShowOpen(type) {
this.acceptType = type
this.adminKeyword = ""
- this.getAdminList()
+ // this.getAdminList()
this.adminListShow = true
},
cancelAccept() {
console.log('123')
- this.adminKeyword = ""
+ this.adminKeyword = ""
+ this.adminList = []
this.adminListShow = false
},
selectSearch(e) {
diff --git a/pages/visit/testStudy.vue b/pages/visit/testStudy.vue
index 0aa8561..780f545 100644
--- a/pages/visit/testStudy.vue
+++ b/pages/visit/testStudy.vue
@@ -5,7 +5,7 @@
- {{index}}{{item.title}}({{item.type==1?'单选':'多选'}})
+ {{index+1}}、{{item.title}}({{item.type==1?'单选':'多选'}})
radioAnswer(e,index)"
:localdata="item.answer" :wrap='true' :map="{text:'content',value:'content'}" />