From d405d7cfefd8ac846e7ae4afd293198d6de6a9e6 Mon Sep 17 00:00:00 2001
From: 346149741 <346149741@qq.com>
Date: 星期六, 22 六月 2024 17:12:54 +0800
Subject: [PATCH] 企业首页,我的,执法记录,接口
---
qiye/qiyeIndex/qiyeIndex.vue | 56 +++++++++++--
static/i07.jpg | 0
api/qiye.js | 16 ++++
qiye/components/bottom.vue | 18 ++++
qiye/my/my.vue | 12 +-
qiye/record/record.vue | 96 +++++++++++++++++++----
static/qiye/q05.png | 0
7 files changed, 165 insertions(+), 33 deletions(-)
diff --git a/api/qiye.js b/api/qiye.js
new file mode 100644
index 0000000..f77b380
--- /dev/null
+++ b/api/qiye.js
@@ -0,0 +1,16 @@
+import Vue from 'vue';
+import { config } from '@/common/config.js'
+const http = uni.$u.http
+
+// 浼佷笟璇︽儏
+export function company(id){
+ return http.get('/system/company/'+id, { custom: { loading: true }});
+}
+// 鎵ф硶璁板綍鍒楄〃
+export function companyList(data){
+ return http.get('/enforce/order/companyList', {params: data}, { custom: { loading: true }});
+}
+// 鎵ф硶璁板綍璇︽儏
+export function order(id){
+ return http.get('/enforce/order/'+id, { custom: { loading: true }});
+}
\ No newline at end of file
diff --git a/qiye/components/bottom.vue b/qiye/components/bottom.vue
index c1fcaa5..0ee7317 100644
--- a/qiye/components/bottom.vue
+++ b/qiye/components/bottom.vue
@@ -33,7 +33,25 @@
methods: {
activeClick(number) {
+ if(this.active == number){
+ return
+ }
this.active = number
+ if(number==0){
+ uni.navigateTo({
+ url: `/qiye/qiyeIndex/qiyeIndex`
+ })
+ }
+ if(number==1){
+ uni.navigateTo({
+ url: `/qiye/record/record`
+ })
+ }
+ if(number==2){
+ uni.navigateTo({
+ url: `/qiye/my/my`
+ })
+ }
this.$emit('update:activeNumber', number)
}
}
diff --git a/qiye/my/my.vue b/qiye/my/my.vue
index 79abcff..63d3551 100644
--- a/qiye/my/my.vue
+++ b/qiye/my/my.vue
@@ -8,16 +8,16 @@
<image src="/static/policy/header.png" mode="widthFix"></image>
<view class="user-info">
<view class="user-name">
- <view class="inckname">鍒樺皬闆�</view>
+ <view class="inckname">{{msg.companyUser}}</view>
</view>
<view class="dept-name">
- 鐜繚灞�--绗竴閮ㄩ棬
+ {{msg.companyName}}
</view>
</view>
</view>
<view class="show-phone-number">
<text class="label">鑱旂郴鐢佃瘽</text>
- <text>168****4164</text>
+ <text>{{msg.companyPhone}}</text>
</view>
<view class="wbox">
<view class="item">
@@ -27,7 +27,7 @@
</view>
<u-icon name="arrow-right"></u-icon>
</view>
- <view class="item">
+ <view class="item" @click="goChangePhone()">
<view class="set-flex">
<image src="/static/policy/phone.png" mode="widthFix"></image>
<text class="change">淇敼鎵嬫満鍙�</text>
@@ -68,14 +68,14 @@
data() {
return {
activeNumber: 2,
-
+ msg:uni.getStorageSync("qiyedata"),
src: '/static/policy/header.png'
}
},
methods: {
goChangePhone() {
uni.navigateTo({
- url: '/policy/changePhone/changePhone'
+ url: '/policy/changePhone/changePhone?code=02'
})
}
}
diff --git a/qiye/qiyeIndex/qiyeIndex.vue b/qiye/qiyeIndex/qiyeIndex.vue
index ba6ef5c..4b462b9 100644
--- a/qiye/qiyeIndex/qiyeIndex.vue
+++ b/qiye/qiyeIndex/qiyeIndex.vue
@@ -5,21 +5,18 @@
<img src="/static/hqzc.png" class="img" alt="" />
<view class="line"></view>
<view class="font">
- <p>娴峰叧鎬荤讲璐告槗鎸佺画鍙戝睍2024骞寸珛娉�...</p>
- <p>鍥藉鍖荤枟淇濋殰灞�鍔炲叕瀹ゅ叧浜庡彂甯冪鐞�... </p>
+ <p v-for="(item,index) in list1" :key="index">{{item.docTitle}}</p>
</view>
- <img src="/static/i06.png" class="more" alt="" />
+ <img src="/static/i06.png" class="more" @click="more1()" alt="" />
</view>
<view class="wbox">
<view class="name">
- 鐟為煹杈捐锤鏄撴湁闄愬叕鍙�
+ {{msg.companyUser}}
</view>
<view class="imgbox">
<image :src="uqrcodeImage" mode="widthFix" class="qrcode-1"></image>
</view>
- <!-- <view class="">
-
- </view> -->
+
<img src="/static/qiye/q05.png" style="width: 100%;height: 201rpx;" alt="" />
</view>
@@ -32,16 +29,24 @@
<script>
import tabsCom from '@/qiye/components/bottom.vue'
+ import { docList } from '@/api/index.js'
+ import { company } from '@/api/qiye.js'
export default {
components: {
tabsCom
},
+ onShow() {
+ this.getInfo()
+ },
data() {
return {
activeNumber: 0,
companyCode: 'code===',
- uqrcodeImage: ''
+ uqrcodeImage: '',
+ list1:[],
+ companyId:33,//todo
+ msg:{}
}
},
onReady() {
@@ -52,7 +57,37 @@
});
},
methods: {
-
+ more1(){
+ uni.navigateTo({
+ url: `/pages/hqzc/list`
+ })
+ },
+ getInfo() {
+ docList({pageNum:1,pageSize:2}).then(val =>{
+ let data = val.data.rows
+ for(let i = 0;i<data.length;i++){
+ if(data[i].docTitle.length>17){
+ data[i].docTitle = data[i].docTitle.slice(0, 17) + '...'
+ }
+ }
+ this.list1 = data
+ })
+ company(this.companyId).then(val => {
+ this.msg = val.data.data
+ console.log(this.msg)
+ this.companyCode = this.msg.companyCode
+ uni.setStorageSync('qiyedata', this.msg)
+ // this.msg.createTime = this.msg.createTime.slice(0, 10)
+ // this.msg.docContent = decodeURIComponent(this.msg.docContent)
+ // console.log(this.msg.docContent)
+ // getDicts('doc_type').then(val => {
+ // console.log(this.msg.docType)
+
+ // const value = val.data.data.find(item => item.dictValue == this.msg.docType)
+ // this.type = value.dictLabel
+ // })
+ })
+ },
}
}
</script>
@@ -97,7 +132,8 @@
font-size: 26rpx;
color: #4A4E60;
margin-right: 50rpx;
-
+ width: 450rpx;
+ text-align: center;
}
}
.hide-canvas{
diff --git a/qiye/record/record.vue b/qiye/record/record.vue
index 96e7e96..56199e5 100644
--- a/qiye/record/record.vue
+++ b/qiye/record/record.vue
@@ -1,31 +1,43 @@
<template>
<view>
<u-sticky bgColor="white">
- <u-tabs :list="list1" @click="click" :scrollable="false" bgColor="white"></u-tabs>
+ <u-tabs :list="list" @change="click" :current="current" :scrollable="false" bgColor="white"></u-tabs>
</u-sticky>
- <view class="item">
+ <view class="item" v-for="(item,index) in list1">
<img src="/static/i05.png" class="img" alt="" />
<view class="right">
<view class="name">
<view class="l">
- 鍖椾含灏氱瓥浜掑姩绉戞妧鏈夐檺鍏徃鍖椾含灏氱瓥浜掑姩绉戞妧鏈夐檺鍏徃鍖椾含灏氱瓥浜掑姩绉戞妧鏈夐檺鍏徃鍖椾含灏氱瓥浜掑姩绉戞妧鏈夐檺鍏徃鍖椾含灏氱瓥浜掑姩绉戞妧鏈夐檺鍏徃
+ {{item.companyName}}
</view>
- <view class="r color1">
- 寰呰瘎浠�
- </view>
+ <template v-if="item.orderStatus==2">
+ <view class="r color2">
+ 鏈墽娉�
+ </view>
+ </template>
+ <template v-if="item.isEva==0">
+ <view class="r color2">
+ 寰呰瘎浠�
+ </view>
+ </template>
+ <template v-if="item.isEva==1">
+ <view class="r color1">
+ 宸茶瘎浠�
+ </view>
+ </template>
</view>
<view class="box">
<view class="l">
- <p>鎵ф硶鍗曚綅锛氬啘涓氬啘鏉戝眬</p>
- <p>鎵ф硶鏃堕棿锛�2024-06-03 12:30:67</p>
+ <p>鎵ф硶鍗曚綅锛歿{item.executeDeptName}}</p>
+ <p>鎵ф硶鏃堕棿锛歿{item.executeTime}}</p>
</view>
- <view class="r">
+ <view class="r" @click="chakan(item.orderId)">
鍘绘煡鐪�
</view>
</view>
</view>
</view>
- <view class="item">
+ <!-- <view class="item">
<img src="/static/i05.png" class="img" alt="" />
<view class="right">
<view class="name">
@@ -68,7 +80,7 @@
</view>
</view>
</view>
- </view>
+ </view> -->
<view style="height: 150rpx;"></view>
<tabsCom :activeNumber.sync="activeNumber"></tabsCom>
@@ -77,6 +89,7 @@
<script>
import tabsCom from '@/qiye/components/bottom.vue'
+ import { companyList } from '@/api/qiye.js'
export default {
components: {
@@ -85,7 +98,7 @@
data() {
return {
activeNumber: 1,
- list1: [{
+ list: [{
name: '鍏ㄩ儴',
}, {
name: '寰呰瘎浠�',
@@ -93,12 +106,59 @@
name: '鏈墽娉�',
}, {
name: '宸茶瘎浠�',
- }]
+ }],
+ current: 0,
+ list1:[],
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ companyId:'',
+ },
+ total: 1,
}
+ },
+ onShow() {
+ this.getList()
+ },
+ onReachBottom() {
+ if(this.list1.length == this.total) {
+ return
+ }
+ this.queryParams.pageNum++
+ this.getList()
},
- methods: {
- click() {
-
+ methods: {
+ chakan(id){
+ uni.navigateTo({
+ url: `/qiye/record/details?id=${id}`
+ })
+ },
+ getList() {
+ let data = uni.getStorageSync("qiyedata")
+ this.queryParams.companyId = data.companyId
+ companyList({...this.queryParams}).then(val => {
+ // console.log(val.data)
+ this.total = val.data.total
+ this.list1 = [...this.list1,...val.data.rows]
+ })
+ },
+ click(i) {
+ this.list1 = []
+ this.queryParams.pageNum = 1
+ console.log(i.index)
+ // if(i.index==0){
+
+ // }
+ if(i.index==1){
+ this.queryParams.isEva = 0
+ }
+ if(i.index==2){
+ this.queryParams.orderStatus = 2
+ }
+ if(i.index==3){
+ this.queryParams.isEva = 1
+ }
+ this.getList()
}
}
}
@@ -164,13 +224,15 @@
}
.color1{
color: #FE7B32;
+ //cheng
}
.color2{
color: #EB4746;
+ //hong
}
.color3{
color: #3EB47A;
-
+ //lv
}
</style>
\ No newline at end of file
diff --git a/static/i07.jpg b/static/i07.jpg
new file mode 100644
index 0000000..f7abb7e
--- /dev/null
+++ b/static/i07.jpg
Binary files differ
diff --git a/static/qiye/q05.png b/static/qiye/q05.png
new file mode 100644
index 0000000..09dcb16
--- /dev/null
+++ b/static/qiye/q05.png
Binary files differ
--
Gitblit v1.9.1