This commit is contained in:
MeSHard
2025-11-14 17:23:25 +08:00
commit 0dbbf978d3
507 changed files with 43048 additions and 0 deletions

51
pages/index/details.vue Normal file
View File

@@ -0,0 +1,51 @@
<template>
<view class="container">
<view style="text-align: center;margin: 10px 0;">
<h3>{{info.title}}</h3>
</view>
<view style="padding: 5px 20px;">
<rich-text :nodes="info.content"></rich-text>
</view>
</view>
</template>
<script>
import {
get,
post
} from '@/common/request.js'
export default {
data() {
return {
scrollTop: 0,
info: null,
}
},
onLoad(options) {
if (options.id) {
this.articleInfo(options.id)
}
},
methods: {
articleInfo(id) {
get('/myapi/api/yq_driver/articleInfo', {
id
}).then(res => {
this.info = res.data
})
}
}
}
</script>
<style scoped lang="less">
.container {
padding-top: 2px;
background-color: #f4f4f4;
height: calc(100vh - 46px);
}
</style>

98
pages/index/index.vue Normal file
View File

@@ -0,0 +1,98 @@
<template>
<view class="content">
<view class="u-page">
<u-subsection :list="list1" :current="curNow" @change="sectionChange"></u-subsection>
<view class="list">
<text>司机姓名</text>
<text>危化物名称</text>
<text>提交时间</text>
<text>审核状态</text>
</view>
<u-list @scrolltolower="scrolltolower">
<u-list-item v-for="(item, index) in indexList" :key="index">
<view class="list">
<u-avatar slot="icon" shape="square" size="35" :src="item.url"
customStyle="margin: -3px 5px -3px 0"></u-avatar>
<text>{{item.name}}</text>
<text>{{item.huowu}}</text>
<text class="time">{{item.time}}</text>
<u-tag text="待审核" class="tag" size="mini" type="warning" v-if="item.status == 1"></u-tag>
<u-tag text="通过" class="tag" size="mini" type="success" v-if="item.status == 2"></u-tag>
<u-tag text="拒绝" class="tag" size="mini" type="error" v-if="item.status == 3"></u-tag>
</view>
</u-list-item>
</u-list>
</view>
</view>
</template>
<!--
登录注册
绑定车牌 - 车辆码 -违章信息
上传运单
-->
<script>
export default {
data() {
return {
indexList: [],
list1: ['全部', '待审核', '通过', '拒绝'],
curNow: 0
}
},
onLoad() {
this.loadmore();
},
methods: {
scrolltolower() {
this.loadmore();
},
loadmore() {
for (let i = 0; i < 30; i++) {
this.indexList.push({
name: '司机姓名' + (i + 1),
status: Math.floor(Math.random() * 3) + 1,
huowu: '危化物名称',
time: '2025-07-11 8:00'
});
}
},
sectionChange(index) {
this.curNow = index;
}
}
}
</script>
<style>
.list {
border-bottom: 1px solid #6666661a;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 10px;
}
.time {
font-size: 12px;
}
.tag {
width: 50px;
}
.u-tabs__wrapper__nav {
display: flex;
flex-direction: row;
position: relative;
justify-content: space-between;
}
</style>

127
pages/index/message.vue Normal file
View File

@@ -0,0 +1,127 @@
<template>
<view class="container">
<u-subsection :list="top_list" :current="current" keyName="name" activeColor="#f56c6c" mode="subsection"
@change="sectionChange"></u-subsection>
<view class="list">
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
@scrolltolower="lower" @scroll="scroll">
<view class="card" v-for="(item,index) in list" @click="toNotice(item.id)">
<view class="title">品类库与应急预案关联书本名称 <u-icon name="arrow-right" size="12"></u-icon></view>
<view class="name_1 flex"><u-icon name="car-fill" class="icon-right" color="#2979ff"
size="12"></u-icon>应急类别应急预案库</view>
<view class="name_2 flex"><u-icon name="car-fill" class="icon-right" color="#ddbb0b"
size="12"></u-icon>预案名称{{item.car ? item.car.name : ''}}</view>
</view>
</scroll-view>
</view>
</view>
</template>
<script>
import {
get,
post
} from '@/common/request.js'
export default {
data() {
return {
top_list: [{
name: '应急预案库'
}, {
name: '重大事故'
}],
current: 0,
scrollTop: 0,
list:[],
}
},
onLoad(){
this.getList()
},
methods: {
onPullDownRefresh() {
setTimeout(() => {
this.getList()
uni.stopPullDownRefresh();
}, 500);
},
async getList(){
await get('/myapi/api/yq_driver/alarmList',{cate_id:this.current}).then(res => {
this.list = res.data
})
},
sectionChange(current) {
this.current = current
this.getList()
},
toNotice(id){
uni.navigateTo({
url:'/pages/index/messageDetails?id='+id
})
},
upper: function(e) {
console.log(e)
},
lower: function(e) {
console.log(e)
},
scroll: function(e) {
console.log(e)
this.old.scrollTop = e.detail.scrollTop
},
}
}
</script>
<style scoped lang="less">
.container {
padding-top: 2px;
background-color: #f4f4f4;
height: calc(100vh - 46px);
.list {
padding: 5px 20px;
.scroll-Y {
height: calc(100vh - 86px);
.card {
background-color: #fff;
padding: 10px;
margin-bottom: 10px;
font-size: 14px;
border-radius: 10px;
.title {
font-size: 16px;
height: 40px;
line-height: 40px;
border-bottom: 1px solid #f4f4f4;
display: flex;
justify-content: space-between;
align-items: center;
}
.flex {
display: flex;
.icon-right {
margin-right: 5px;
}
}
.name_1 {
margin: 10px 0;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,54 @@
<template>
<view class="container">
<view style="text-align: center;margin: 10px 0;">
<h2>{{info.name}}</h2>
<h4>{{info.label_name}}--{{info.sds_name}}</h4>
<image :src="info.label_url"></image>
<image :src="info.sds_url"></image>
</view>
</view>
</template>
<script>
import {
get,
post
} from '@/common/request.js'
export default {
data() {
return {
info: {},
}
},
onLoad(options) {
if (options.id) {
this.alarmInfo(options.id)
}
},
methods: {
alarmInfo(id) {
get('/myapi/api/yq_driver/alarmInfo', {
id
}).then(res => {
this.info = res.data.car
console.log(this.info)
})
}
}
}
</script>
<style scoped lang="less">
.container {
padding-top: 2px;
background-color: #f4f4f4;
height: calc(100vh - 46px);
}
</style>

86
pages/index/notice.vue Normal file
View File

@@ -0,0 +1,86 @@
<template>
<view class="container">
<view class="list">
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
@scrolltolower="lower" @scroll="scroll">
<view class="card" v-for="(item,index) in list" @click="toNotice(item.id)">
<view class="title">{{index + 1}}.{{item.title}}</view>
</view>
</scroll-view>
</view>
</view>
</template>
<script>
import {
get,
post
} from '@/common/request.js'
export default {
data() {
return {
scrollTop: 0,
list: [],
}
},
onLoad() {
this.getList()
},
methods: {
sectionChange(current) {
this.current = current
},
toNotice(id) {
uni.navigateTo({
url: '/pages/index/details?id='+id
})
},
getList() {
get('/myapi/api/yq_driver/articleList').then(res => {
this.list = res.data
})
},
upper: function(e) {
console.log(e)
},
lower: function(e) {
console.log(e)
},
scroll: function(e) {
console.log(e)
this.old.scrollTop = e.detail.scrollTop
},
}
}
</script>
<style scoped lang="less">
.container {
padding-top: 2px;
background-color: #f4f4f4;
height: calc(100vh - 46px);
.list {
padding: 5px 20px;
.scroll-Y {
height: calc(100vh - 86px);
.card {
background-color: #fff;
padding: 10px;
margin-bottom: 10px;
font-size: 14px;
border-radius: 10px;
.title {
font-size: 16px;
}
}
}
}
}
</style>