提交代码
This commit is contained in:
@ -1,23 +1,248 @@
|
||||
<template>
|
||||
<!-- 设备状态 -->
|
||||
<view>
|
||||
|
||||
<view class="pagepaddings">
|
||||
<view class=".padd_bot12">
|
||||
<text>硬件设备状态</text>
|
||||
</view>
|
||||
<view class="body-view contentboxsty">
|
||||
<view class="content-top">
|
||||
<view class="content-left">
|
||||
<text class="iconfont icon-gengduo more_icon"></text>
|
||||
</view>
|
||||
<view class="content-scroll">
|
||||
<view class="center-cut-menu">
|
||||
<scroll-view scroll-x="true" scroll-with-animation="true" class="scroll-view" :scroll-left="scrollLeft">
|
||||
<view class="scroll-item" v-for="(item, index) in list" :key="index" @click="changeMenu(index)">
|
||||
<text class="item-text" :class="curIndex == index? 'active' : ''">{{item.name}}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-right">
|
||||
<text class="iconfont icon-gengduo"></text>
|
||||
</view>
|
||||
</view>
|
||||
<swiper class="swiper-box-list" circular="true" :current="curIndex" @change="swiperChange">
|
||||
<swiper-item class="swiper-topic-list" v-for="item in swiperDateList" :key="item.id">
|
||||
<view class="swiper-item" v-if="item.id==1">
|
||||
<view class="" style="width: 100%;">
|
||||
<image style="width: 100%;" src="http://dm-auto.oss-cn-shanghai.aliyuncs.com/mes_wechat/background.png" mode=""></image>
|
||||
</view>
|
||||
<view class="font14">
|
||||
<view class="device_row">
|
||||
<text class="name font_bold">设备名称</text>
|
||||
<text>双头立锯</text>
|
||||
</view>
|
||||
<view class="device_row">
|
||||
<text class="name font_bold">开机时间</text>
|
||||
<text>2024-02-11 08:00:45</text>
|
||||
</view>
|
||||
<view class="device_row">
|
||||
<text class="name font_bold">保养到期日</text>
|
||||
<text>2024-02-11 08:00:45</text>
|
||||
</view>
|
||||
<view class="device_row">
|
||||
<text class="name font_bold">今日停机</text>
|
||||
<text>5次</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [{
|
||||
id: 1,
|
||||
name: '多片锯'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '立式带锯'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '视觉'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '卧锯'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '多片锯'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: '卧锯测试A'
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: '卧锯B'
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: '卧锯测试3'
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
name: '卧锯4'
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
name: '卧锯5'
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
name: '卧锯6'
|
||||
},
|
||||
],
|
||||
// Tab切换内容
|
||||
swiperDateList: [
|
||||
{
|
||||
id: 1,
|
||||
content: '1'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
content: '2'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
content: '3'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
content: '4'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
content: '5'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
content: '6'
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
content: '7'
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
content: '8'
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
content: '9'
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
content: '10'
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
content: '11'
|
||||
},
|
||||
],
|
||||
contentScrollW: 0, // 导航区宽度
|
||||
curIndex: 0, // 当前选中
|
||||
scrollLeft: 0, // 横向滚动条位置
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 获取标题区域宽度,和每个子元素节点的宽度
|
||||
this.getScrollW()
|
||||
},
|
||||
methods: {
|
||||
// 获取标题区域宽度,和每个子元素节点的宽度以及元素距离左边栏的距离
|
||||
getScrollW() {
|
||||
let query = uni.createSelectorQuery().in(this);
|
||||
query.select('.scroll-view').boundingClientRect(data => {
|
||||
// 拿到 scroll-view 组件宽度
|
||||
this.contentScrollW = data.width
|
||||
}).exec();
|
||||
|
||||
query.selectAll('.scroll-item').boundingClientRect(data => {
|
||||
let dataLen = data.length;
|
||||
for (let i = 0; i < dataLen; i++) {
|
||||
// scroll-view 子元素组件距离左边栏的距离
|
||||
this.list[i].left = data[i].left;
|
||||
// scroll-view 子元素组件宽度
|
||||
this.list[i].width = data[i].width
|
||||
}
|
||||
}).exec()
|
||||
},
|
||||
|
||||
// 选择标题
|
||||
changeMenu(index) {
|
||||
this.curIndex = index;
|
||||
// console.log(index,111)
|
||||
// 效果一(当前点击子元素靠左展示) 局限性:子元素宽度相同
|
||||
// this.scrollLeft = index * this.list[index].width
|
||||
|
||||
// 效果一(当前点击子元素靠左展示) 子元素宽度不相同也可实现
|
||||
// this.scrollLeft = 0;
|
||||
// for (let i = 0; i < index; i++) {
|
||||
// this.scrollLeft += this.list[i].width
|
||||
// };
|
||||
|
||||
|
||||
// 效果二(当前点击子元素靠左留一展示) 局限性:子元素宽度相同
|
||||
// this.scrollLeft = (index - 1) * this.list[index].width
|
||||
|
||||
// 效果二(当前点击子元素靠左留一展示) 子元素宽度不相同也可实现
|
||||
this.scrollLeft = 0;
|
||||
for (let i = 0; i < index - 1; i++) {
|
||||
this.scrollLeft += this.list[i].width
|
||||
};
|
||||
|
||||
|
||||
// 效果三(当前点击子元素居中展示) 不受子元素宽度影响
|
||||
// this.scrollLeft = this.list[index].left - this.contentScrollW / 2 + this.list[index].width / 2;
|
||||
},
|
||||
//
|
||||
swiperChange(e) {
|
||||
// console.log(22,e)
|
||||
let index = e.detail.current
|
||||
this.changeMenu(index)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.body-view{
|
||||
height: 450px;
|
||||
.content-top{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.content-left{flex-basis: 30px;text-align: center;
|
||||
.more_icon{display: inline-block;transform: scaleX(-1);}
|
||||
}
|
||||
.content-scroll{flex: 1;overflow: auto;}
|
||||
.center-cut-menu {width: 100%;height: 100rpx;box-sizing: border-box;
|
||||
.scroll-view {height: 100rpx;white-space: nowrap;
|
||||
.scroll-item {height: 100rpx;padding: 0 20rpx;display: inline-block;text-align: center;
|
||||
.item-text {font-size: 14px;line-height: 100rpx;
|
||||
&.active {
|
||||
// color: #1468FF;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.content-right{flex-basis: 30px;text-align: center;}
|
||||
}
|
||||
.swiper-box-list{height: 400px;padding:0 12px;
|
||||
.device_row{padding: 6px 0;display: flex;
|
||||
.name{width: 82px;}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
69
pages/equipmentManage/deviceDetail.vue
Normal file
69
pages/equipmentManage/deviceDetail.vue
Normal file
@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<view class="pagepaddings">
|
||||
<view class="contentboxsty page_content ">
|
||||
|
||||
<view class="content_row">
|
||||
<view class="name">设备</view>
|
||||
<view class="data">{{form.name}}</view>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<view class="name">设备名称</view>
|
||||
<view class="data">双头立锯</view>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<view class="name">设备功率</view>
|
||||
<view class="data">双头立锯</view>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<view class="name">设备IP</view>
|
||||
<view class="data">双头立锯</view>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<view class="name">端口</view>
|
||||
<view class="data">双头立锯</view>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<view class="name">状态</view>
|
||||
<view class="data">{{form.active_status==true?'启用':'禁用'}}</view>
|
||||
</view>
|
||||
<view class="textarea_row">
|
||||
<view class="name font13">设置备注</view>
|
||||
<view class="">
|
||||
{{form.remark}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form:{}
|
||||
}
|
||||
},
|
||||
onLoad(options){
|
||||
this.getDetail(options.id);
|
||||
},
|
||||
methods: {
|
||||
getDetail(id){
|
||||
this.$api.postFuncLoading('/device.info',{id:id}).then(res=>{
|
||||
console.log(res)
|
||||
this.form = res.data
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content_row{display: flex;height: 44px;align-items: center;
|
||||
.name{width: 30%;font-size: 13px;}
|
||||
.data{font-size: 14px;}
|
||||
}
|
||||
.textarea_row{
|
||||
.name{padding: 12px 0;}
|
||||
// textarea{border-radius: 4px;background: rgba(255, 255, 255, 0.50);width: 100%;}
|
||||
}
|
||||
</style>
|
@ -3,9 +3,9 @@
|
||||
<navigation-bar title="添加设备" color="white"></navigation-bar>
|
||||
</page-meta>
|
||||
<view class="pagepaddings">
|
||||
<view class="page_name font14">
|
||||
<!-- <view class="page_name font14">
|
||||
添加/编辑设备
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="page_content contentboxsty font13">
|
||||
<view class="content_row">
|
||||
<view class="name">选择设备</view>
|
||||
@ -47,22 +47,29 @@
|
||||
<view class="content_row">
|
||||
<view class="name">状态</view>
|
||||
<view class="flex_layout">
|
||||
<!-- <image src="/static/enable.png" mode=""></image><text class="text">启用</text>
|
||||
<image src="/static/disable.png" mode=""></image><text class="text">禁用</text> -->
|
||||
<view class="t-icon t-icon-qiyong1 contenticon"></view><text class="text">启用</text>
|
||||
<view class="t-icon t-icon-jinyong2 contenticon"></view><text class="text">禁用</text>
|
||||
<!-- <label class="radio"><radio value="r1" checked="true" />启用</label>
|
||||
<label class="radio"><radio value="r2" />禁用</label> -->
|
||||
<view class="switch" @click="switchSta(1)">
|
||||
<view v-if="selectSta==1" class="t-icon t-icon-qiyong1 contenticon"></view>
|
||||
<view v-else class="t-icon t-icon-jinyong2 contenticon"></view>
|
||||
<text class="text">启用</text>
|
||||
</view>
|
||||
<view class="switch" @click="switchSta(2)">
|
||||
<view v-if="selectSta==2" class="t-icon t-icon-qiyong1 contenticon"></view>
|
||||
<view v-else class="t-icon t-icon-jinyong2 contenticon"></view>
|
||||
<text class="text">禁用</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="textarea_row">
|
||||
<view class="name">设置备注</view>
|
||||
<view class="textarea">
|
||||
|
||||
<textarea />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom_but flex_layout">
|
||||
<view class="font13">保存</view>
|
||||
<view class="font13 but_color">保存</view>
|
||||
<view class="font13">取消</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -73,10 +80,14 @@
|
||||
data() {
|
||||
return {
|
||||
array: ['中国', '美国', '巴西', '日本'],
|
||||
selectSta:1,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
switchSta(type){
|
||||
console.log(type)
|
||||
this.selectSta = type;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -86,13 +97,15 @@
|
||||
.page_content{padding: 0 12px 10px;}
|
||||
.content_row{display: flex;border-bottom: 1px solid #2D3A6F;height: 44px;align-items: center;
|
||||
.name{width: 30%;}
|
||||
.flex_layout{
|
||||
.switch{display: flex;align-items: center;
|
||||
.contenticon{width: 20px;height: 20px;}
|
||||
.text{padding: 0 20px 0 5px;}
|
||||
}
|
||||
}
|
||||
.textarea_row{
|
||||
.name{padding: 12px 0;}
|
||||
textarea{border-radius: 4px;background: rgba(255, 255, 255, 0.50);width: 100%;}
|
||||
.textarea{border-radius: 4px;background: rgba(255, 255, 255, 0.50);padding:5px 10px;
|
||||
textarea{width: 100%;}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!-- 设备管理 -->
|
||||
<view class="pagepaddings bot_padding">
|
||||
<view class="" v-for="(item,index) in list" :key="index" >
|
||||
<view class="page_list contentboxsty font13">
|
||||
<view class="page_list contentboxsty font13" @click="toDeviceDetail(item.id)">
|
||||
<view class="list_row">
|
||||
<view class="row_name">
|
||||
设备名称
|
||||
@ -10,7 +10,7 @@
|
||||
<view class="row_data">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="iconfont icon-bianji font20"></view>
|
||||
<view class="iconfont icon-bianji font20" @click="toAddDevice()"></view>
|
||||
</view>
|
||||
<view class="list_row">
|
||||
设备IP/端口
|
||||
@ -43,19 +43,26 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list:[{name:"双头立锯"},
|
||||
{name:"双头立锯"},
|
||||
{name:"双头立锯"},
|
||||
{name:"双头立锯"},
|
||||
{name:"双头立锯"},
|
||||
{name:"双头立锯"},
|
||||
{name:"双头立锯"},
|
||||
{name:"双头立锯"},
|
||||
{name:"双头立锯"},
|
||||
]
|
||||
list:[]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
// this.$api.postFuncLoading('/equipment.mag',{}).then(res=>{
|
||||
// console.log(res)
|
||||
// this.list = res.data.rows;
|
||||
// })
|
||||
},
|
||||
//详情
|
||||
toDeviceDetail(id){
|
||||
console.log(id)
|
||||
uni.navigateTo({
|
||||
url:'/pages/equipmentManage/deviceDetail?id='+id
|
||||
})
|
||||
},
|
||||
toAddDevice(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/equipmentManage/editDevice'
|
||||
|
@ -3,8 +3,8 @@
|
||||
<view class="container home">
|
||||
<view class="home_head">
|
||||
<view class="iconfont icon-chaojiguanliyuan accounticon"></view>
|
||||
<view class="name" @click="toLogin()">未登录</view>
|
||||
<!-- <view class="name">Ykxiao 超级管理员</view> -->
|
||||
<view class="name" v-if="userName==''" @click="toLogin()">未登录</view>
|
||||
<view class="name" v-else>{{userName}} </view>
|
||||
<view class="iconfont icon-xiaoxitongzhi notifyicon" @click="toMessage()"></view>
|
||||
<view class="iconfont icon-shezhi setupicon"></view>
|
||||
</view>
|
||||
@ -199,7 +199,7 @@
|
||||
<view class="content_data">
|
||||
<view class="content_module" @click="toEquipmentManage()">
|
||||
<view class="t-icon t-icon-shebeiguanli contenticon"></view>
|
||||
<view class="contentname">设备设置</view>
|
||||
<view class="contentname">设备管理</view>
|
||||
</view>
|
||||
<view class="content_module" @click="toDeviceStatus()">
|
||||
<view class="t-icon t-icon-shebeizhuangtai contenticon"></view>
|
||||
@ -225,9 +225,21 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
userName: '',
|
||||
}
|
||||
},
|
||||
// onLoad() {
|
||||
// this.userName = uni.getStorageSync('demu_mes_user_name')
|
||||
// },
|
||||
onShow(){
|
||||
this.userName = uni.getStorageSync('demu_mes_user_name')
|
||||
},
|
||||
// created() {
|
||||
// },
|
||||
mounted() {
|
||||
this.userName = uni.getStorageSync('demu_mes_user_name')
|
||||
|
||||
},
|
||||
methods: {
|
||||
//
|
||||
toLogin(){
|
||||
@ -283,7 +295,7 @@
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.home {height: 100vh;padding: 0 10px;font-size: 14px;
|
||||
.home {padding: 0 10px;font-size: 14px;
|
||||
.home_head{height: 40px;display: flex;position: relative;align-items: center;padding-bottom: 5px;
|
||||
.name{flex:1;}
|
||||
.accounticon{
|
||||
@ -323,6 +335,7 @@
|
||||
.energy_number{color: #FA3758;}
|
||||
}
|
||||
.content_data{
|
||||
// view{display: inline-block;width: 25%;}
|
||||
padding: 10px 0;display: flex;position: relative;align-items: center;text-align: center;height: 98px;
|
||||
.content_module{
|
||||
width: 25%;margin: 10px 1%;height: 98px;display: flex;align-items: center;justify-content: center;flex-direction: column;background-color: #009688;border-radius: 8px;
|
||||
|
@ -7,35 +7,44 @@
|
||||
工单号:{{item.name}}
|
||||
</view>
|
||||
<view class="top_right">
|
||||
工单详情
|
||||
工单详情 <text class="iconfont icon-gengduo"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list_content">
|
||||
<view class="list_content font13">
|
||||
<view class="list_centre">
|
||||
<view class="centre_left">
|
||||
加工规格:{{item.specs}}
|
||||
<view class="list_row">
|
||||
<view class="centre_left">
|
||||
<text>加工规格</text>
|
||||
<text>{{item.specs}}</text>
|
||||
</view>
|
||||
<view class="centre_right">
|
||||
生产中
|
||||
</view>
|
||||
</view>
|
||||
<view class="centre_right">
|
||||
生产中
|
||||
<view class="list_row">
|
||||
<view class="centre_left">
|
||||
<text>算法出材率</text>
|
||||
<text>{{item.algorithm}}%</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list_below">
|
||||
<view class="below_left">
|
||||
<view class="">
|
||||
算法出材率
|
||||
出材率
|
||||
</view>
|
||||
<view class="percentage font24">
|
||||
{{item.algorithm}}%
|
||||
</view>
|
||||
</view>
|
||||
<view class="below_left">
|
||||
<!-- <view class="below_left">
|
||||
<view class="">
|
||||
算法出材率
|
||||
</view>
|
||||
<view class="percentage font24">
|
||||
{{item.reality}}%
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -96,8 +105,13 @@
|
||||
// .list_top{display: flex;padding: 12px 0;border-bottom: 1px solid #2D3A6F;margin-bottom: 8px;
|
||||
// .top_left{flex: 1;}
|
||||
// }
|
||||
.list_centre{display: flex;
|
||||
.centre_left{flex: 1;}
|
||||
.list_centre{
|
||||
.list_row{display: flex;padding-bottom: 12px;
|
||||
.centre_left{flex: 1;display: flex;
|
||||
text:first-child{width:80px;}
|
||||
}
|
||||
.centre_right{background: rgba(230,162,60,0.2);border-radius: 4px 4px 4px 4px;height: 20px;padding: 0 6px;color: #E6A23C;}
|
||||
}
|
||||
}
|
||||
.list_below{display: flex;text-align: center;padding: 20px 0;
|
||||
view{flex: 1;}
|
||||
|
@ -24,7 +24,7 @@
|
||||
</view>
|
||||
<view class="con_but">
|
||||
<view class="but_rat"><view class="t-icon t-icon-shenpizhida icon22"></view>审批</view>
|
||||
<view class="but_del"><view class="t-icon t-icon-shezhi icon22 paddrigth5"></view>删除</view>
|
||||
<view class="but_del"><view class="t-icon t-icon-shezhi icon22 padd_rigth5"></view>删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<!-- 工单进度管理 -->
|
||||
<view class="pagepaddings">
|
||||
<view class="detail_list contentboxsty">
|
||||
<view class="detail_list contentboxsty font13">
|
||||
<view class="list_top">
|
||||
<view class="top_left">
|
||||
工单号:
|
||||
@ -14,7 +14,7 @@
|
||||
<view class="list_row">
|
||||
<view class="row_left">
|
||||
<view class="">开始时间:</view>
|
||||
<view class=""></view>
|
||||
<view class="">24-01-12 08:00</view>
|
||||
</view>
|
||||
<view class="row_right">
|
||||
生产中
|
||||
@ -22,13 +22,13 @@
|
||||
</view>
|
||||
<view class="list_row padd_top12">
|
||||
<view class="">计划完成:</view>
|
||||
<view class=""></view>
|
||||
<view class="">24-01-12 08:00</view>
|
||||
</view>
|
||||
<view class="padd_top12">
|
||||
<progressBar :total="100" :val="20" title="" />
|
||||
</view>
|
||||
</view>
|
||||
<annularProgressBar :progress_txt="20" :width="84" :height="69" title="出材率"/>
|
||||
<!-- <annularProgressBar :progress_txt="20" :width="84" :height="69" title="出材率"/> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -55,7 +55,9 @@
|
||||
<style lang="scss">
|
||||
.detail_list{
|
||||
.list_content{
|
||||
.list_row{display: flex;}
|
||||
.list_row{display: flex;
|
||||
.row_left{display: flex;}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="login_page ">
|
||||
<view class="iconfont icon-shouye" @click="toIndex()" style="height: 25px;position: absolute;top: 60px;width: 30px;"></view>
|
||||
<view class="login_top">
|
||||
<view class="login_logo">
|
||||
<image src="https://dm-auto.oss-cn-shanghai.aliyuncs.com/mes_wechat/meslogo.png" class="logopng"></image>
|
||||
@ -20,10 +21,10 @@
|
||||
</view>
|
||||
<view class="font12 text_color_black" v-if="tab==1">
|
||||
<view class="login_input">
|
||||
<input placeholder="请输入账号" />
|
||||
<input placeholder="请输入账号" v-model="accountValue"/>
|
||||
</view>
|
||||
<view class="login_input">
|
||||
<input password type="text" placeholder="请输入密码" />
|
||||
<input password type="text" v-model="passValue" placeholder="请输入密码" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="font12 text_color_black" v-if="tab==2">
|
||||
@ -38,12 +39,19 @@
|
||||
<view class="" v-if="tab==1" style="color: #C4C4C4;font-size: 11px; padding-top: 14px;">
|
||||
记住密码
|
||||
</view>
|
||||
<view class="loginbut">
|
||||
<view class="loginbut" @click="login()">
|
||||
登录
|
||||
</view>
|
||||
<view class="" style="color: #009688;text-align: center;font-size: 13px;">
|
||||
手机号一键登录
|
||||
</view>
|
||||
<button class="persontc " type="default" open-type="getPhoneNumber" @getphonenumber="getPhone">
|
||||
<view class="" style="color: #009688;text-align: center;font-size: 13px;">
|
||||
手机号快捷登录
|
||||
</view>
|
||||
</button>
|
||||
<!-- <button class="persontc" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
||||
<view class="" style="color: #009688;text-align: center;font-size: 13px;">
|
||||
手机号快捷登录
|
||||
</view>
|
||||
</button> -->
|
||||
</view>
|
||||
<view class="login_below">
|
||||
<view class="">
|
||||
@ -62,6 +70,8 @@
|
||||
return {
|
||||
codename:'获取验证码',
|
||||
tab:1,
|
||||
accountValue:'long',
|
||||
passValue:'123456',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -69,6 +79,24 @@
|
||||
changeTab(tab){
|
||||
this.$set(this,"tab",tab);
|
||||
},
|
||||
toIndex(){
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
});
|
||||
},
|
||||
login(){
|
||||
this.$api.postFuncLoading('/user.login',{login_name:this.accountValue,password:this.passValue}).then(res=>{
|
||||
console.log(res)
|
||||
let obj = new Object();
|
||||
obj.mes_user_name=res.data.user.name;
|
||||
obj.mes_token=res.data.token;
|
||||
this.$wf.setLoginData(obj)
|
||||
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -87,10 +115,43 @@
|
||||
.demupng{width: 60px;height: 36px;}
|
||||
.login_centre{border-radius: 16px;background: #FFF;padding: 20px 24px 40px;}
|
||||
.login_switch{display: flex;}
|
||||
.login_name{flex: 1;text-align: center;}
|
||||
.login_name{flex: 1;text-align: center;
|
||||
padding-bottom: 5px;
|
||||
/* border-bottom: 1px solid #000; */
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.login_name:focus {
|
||||
outline: none; /* 去除默认的外边框效果 */
|
||||
border-width: 3px; /* 当元素被点击或者获得焦点时,将边框宽度修改为3像素 */
|
||||
}
|
||||
.font_bold{
|
||||
position: relative;
|
||||
}
|
||||
.font_bold::after{
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: calc(50% - 15px);
|
||||
bottom: -4px;
|
||||
z-index: 10;
|
||||
width: 30px;
|
||||
border-bottom: 3px solid #009688 ;
|
||||
}
|
||||
.login_input{border-radius: 21.5px;background: #F3F5F9;margin-top: 12px;padding: 5px 15px;}
|
||||
.getCaptcha{border-radius: 21.5px;background: #009688;height: auto;color: white;display: flex;align-items: center;width: 40%;justify-content: center;}
|
||||
.flex_layout{display: flex;margin-top: 12px;}
|
||||
.login_code{margin-top: unset;width:60%;margin-right: 12px;}
|
||||
.loginbut{background: #009688;text-align: center;margin-top: 60px;margin-bottom: 18px;padding: 9px;border-radius: 66rpx;}
|
||||
.persontc{
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
border-radius: 0;
|
||||
background: none!important;
|
||||
line-height: normal;
|
||||
}
|
||||
.persontc::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -35,7 +35,9 @@
|
||||
<view class="person_dataC contentboxsty">
|
||||
<view class="content_box">
|
||||
<view class="data_name">设备故障通知</view>
|
||||
<view class=""></view>
|
||||
<view class="">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_box">
|
||||
<view class="data_name">出材率预警通知</view>
|
||||
@ -75,9 +77,9 @@
|
||||
},
|
||||
//跳转更改手机号页面
|
||||
toChangPhone(){
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/person/changePhone'
|
||||
// })
|
||||
uni.navigateTo({
|
||||
url: '/pages/person/changePhone'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -100,5 +102,7 @@
|
||||
.person_logo{width: 40px;height: 40px;}
|
||||
}
|
||||
.data_name{flex: 1;}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
62
pages/person/alarm.vue
Normal file
62
pages/person/alarm.vue
Normal file
@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<!-- 设备报警 -->
|
||||
<view class="pagepaddings">
|
||||
<view class="content_layout" @click="cancelLongpress">
|
||||
<view class="item_layout" v-for="(item, index) in list" :key="index">
|
||||
<view :class="islongpress?'longpress_style':''" @longpress="longpress" @click="deleteAlarm">
|
||||
<image :src="item.url" class="img_style" mode=""></image>
|
||||
</view>
|
||||
<view class="font13 flex_layout">
|
||||
<text class="flex1">{{item.name}}</text>
|
||||
<text>{{item.time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
islongpress:false,
|
||||
list:[
|
||||
{name:'周边侵入警报',time:'2023-09-01',url:'../../static/logo.png'},
|
||||
{name:'周边侵入警报',time:'2023-09-01',url:'../../static/logo.png'},
|
||||
{name:'周边侵入警报',time:'2023-09-01',url:'../../static/logo.png'},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
longpress(){
|
||||
console.log('长按事件')
|
||||
this.islongpress = true
|
||||
},
|
||||
//取消
|
||||
cancelLongpress(){
|
||||
this.islongpress = false
|
||||
},
|
||||
//删除警告
|
||||
deleteAlarm(){
|
||||
if(this.islongpress){
|
||||
console.log('删除')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* .content_layout{display: flex;flex-flow: wrap;}
|
||||
.item_layout{width: 50%;} */
|
||||
.content_layout{
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;/* 每一列占一行的一半 */
|
||||
grid-gap: 10px; /* 可选的间距 */
|
||||
}
|
||||
.img_style{height: 110px;width: 100%;}
|
||||
.longpress_style{background-color: #000;
|
||||
opacity: 0.2;}
|
||||
</style>
|
@ -1,6 +1,14 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<view class="pagepaddings font13">
|
||||
<view class="phone_page contentboxsty">
|
||||
<view class="content_row">
|
||||
<input placeholder="请输入要更换的手机号码" />
|
||||
</view>
|
||||
<view class="content_row noborbot">
|
||||
<input placeholder="请输入短信验证码" />
|
||||
<view class="theme_color">获取验证码</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -17,6 +25,8 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
<style>
|
||||
.phone_page{padding: 0 12px;}
|
||||
.content_row{display: flex;height: 49px;align-items: center;border-bottom: 1px solid #2D3A6F;}
|
||||
.content_row input{flex: 1;}
|
||||
</style>
|
||||
|
464
pages/person/faceAuthentication.vue
Normal file
464
pages/person/faceAuthentication.vue
Normal file
@ -0,0 +1,464 @@
|
||||
<template>
|
||||
<view v-if="step==1">
|
||||
<view class="scan_box">
|
||||
<image class="avatar_frame" src="http://dm-auto.oss-cn-shanghai.aliyuncs.com/mes_wechat/morentouxiang.png" mode=""></image>
|
||||
<image class="scan_img" src="http://dm-auto.oss-cn-shanghai.aliyuncs.com/mes_wechat/saomiao.png"></image>
|
||||
|
||||
</view>
|
||||
<view class="start_view" @click="startAttestation(2)">
|
||||
<view class="start_but">
|
||||
开始认证
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-content" v-else-if="step==2">
|
||||
<view class="containerV">
|
||||
<view class="headerV">
|
||||
<view class="top-tips1 font15">
|
||||
<view>请把脸移入圈内保持不动</view>
|
||||
</view>
|
||||
<!-- <view class="top-tips2">
|
||||
为了便于识别认证,请拍摄本人头像
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="contentV">
|
||||
<view class="mark"></view>
|
||||
<image v-if="tempImg" mode="widthFix" :src="tempImg" />
|
||||
<camera v-if='isAuthCamera' :device-position="devicePosition ?'front': 'back'" class="camera"
|
||||
flash="off" resolution='high' />
|
||||
<view v-show="!tempImg && tipsText" class="tipV">{{ tipsText }}</view>
|
||||
</view>
|
||||
<view class="footerV">
|
||||
<view style="width: 100%;">
|
||||
<view v-if="!tempImg" style="width: 100%;">
|
||||
<!-- <view class="privacyV">
|
||||
<view class="icon"></view>
|
||||
<view class="text">
|
||||
照片隐私<text @click="handleJumpSecurityClick">安全保障</text>中…
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-tips-2">该照片仅作为你认证的凭证</view> -->
|
||||
<view class="take-photo-bgV">
|
||||
<!-- 图片上传 -->
|
||||
<!-- <view v-show="true" class="btn-change-upload" @click="handleChooseImage" ></view> -->
|
||||
<!--拍照-->
|
||||
<view class="btn-take-photo" @click="handleTakePhotoClick" ></view>
|
||||
<!-- 切换镜头 -->
|
||||
<view class="btn-change-camera" @click="handleChangeCameraClick" ></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="confirmV" v-else>
|
||||
<view class="btn-cancel" @click="handleCancelClick">
|
||||
取消
|
||||
</view>
|
||||
<view class="btn-ok" @click="handleOkClick">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'index',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
step:1,
|
||||
tipsText: '', // 错误文案提示
|
||||
tempImg: '', // 本地图片路径
|
||||
// BASE_API,
|
||||
cameraEngine: null, // 相机引擎
|
||||
devicePosition: false, // 摄像头朝向
|
||||
isAuthCamera: true, // 是否拥有相机权限
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
this.initData()
|
||||
},
|
||||
mounted(){
|
||||
},
|
||||
methods: {
|
||||
//
|
||||
startAttestation(type){
|
||||
this.step=type;
|
||||
},
|
||||
// 初始化相机引擎
|
||||
initData() {
|
||||
this.handleChangeCameraClick();
|
||||
// console.log(1111)
|
||||
// const session = wx.createVKSession({
|
||||
// track: {
|
||||
// face: { mode: 1 } // mode: 1 - 使用摄像头;2 - 手动传入图像
|
||||
// },
|
||||
// })
|
||||
// console.log(222)
|
||||
// // 摄像头实时检测模式下,监测到人脸时,updateAnchors 事件会连续触发 (每帧触发一次)
|
||||
// session.on('updateAnchors', anchors => {
|
||||
// anchors.forEach(anchor => {
|
||||
// console.log('anchor.points', anchor.points)
|
||||
// console.log('anchor.origin', anchor.origin)
|
||||
// console.log('anchor.size', anchor.size)
|
||||
// console.log('anchor.angle', anchor.angle)
|
||||
// })
|
||||
// })
|
||||
// console.log(333)
|
||||
// // 当人脸从相机中离开时,会触发 removeAnchors 事件
|
||||
// session.on('removeAnchors', () => {
|
||||
// console.log('removeAnchors')
|
||||
// })
|
||||
|
||||
// // 需要调用一次 start 以启动
|
||||
// session.start(errno => {
|
||||
// if (errno) {
|
||||
// // 如果失败,将返回 errno
|
||||
// } else {
|
||||
// // 否则,返回null,表示成功
|
||||
// }
|
||||
// })
|
||||
// console.log(444)
|
||||
|
||||
|
||||
this.cameraEngine = wx.createCameraContext()
|
||||
const listener = this.cameraEngine.onCameraFrame((frame) => {
|
||||
if (this.tempImg) {
|
||||
return;
|
||||
}
|
||||
wx.createVKSession({
|
||||
track: {
|
||||
plane: {mode: 3},
|
||||
},
|
||||
version: 'v2',
|
||||
// gl, // WebGLRenderingContext
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
// // #ifdef MP-WEIXIN
|
||||
// // 1、初始化人脸识别
|
||||
// wx.initFaceDetect()
|
||||
// // 2、创建 camera 上下文 CameraContext 对象
|
||||
// this.cameraEngine = wx.createCameraContext()
|
||||
// // 3、获取 Camera 实时帧数据
|
||||
// const listener = this.cameraEngine.onCameraFrame((frame) => {
|
||||
// if (this.tempImg) {
|
||||
// return;
|
||||
// }
|
||||
// // 4、人脸识别,使用前需要通过 wx.initFaceDetect 进行一次初始化,推荐使用相机接口返回的帧数据
|
||||
// wx.faceDetect({
|
||||
// frameBuffer: frame.data,
|
||||
// width: frame.width,
|
||||
// height: frame.height,
|
||||
// enablePoint: true,
|
||||
// enableConf: true,
|
||||
// enableAngle: true,
|
||||
// enableMultiFace: true,
|
||||
// success: (faceData) => {
|
||||
// let face = faceData.faceInfo[0]
|
||||
// if (faceData.x == -1 || faceData.y == -1) {
|
||||
// this.tipsText = '检测不到人'
|
||||
// }
|
||||
// if (faceData.faceInfo.length > 1) {
|
||||
// this.tipsText = '请保证只有一个人'
|
||||
// } else {
|
||||
// const {
|
||||
// pitch,
|
||||
// roll,
|
||||
// yaw
|
||||
// } = face.angleArray;
|
||||
// const standard = 0.5
|
||||
// if (Math.abs(pitch) >= standard || Math.abs(roll) >= standard ||
|
||||
// Math.abs(yaw) >= standard) {
|
||||
// this.tipsText = '请平视摄像头'
|
||||
// } else if (face.confArray.global <= 0.8 || face.confArray.leftEye <=
|
||||
// 0.8 || face.confArray.mouth <= 0.8 || face.confArray.nose <= 0.8 ||
|
||||
// face.confArray.rightEye <= 0.8) {
|
||||
// this.tipsText = '请勿遮挡五官'
|
||||
// } else {
|
||||
// this.tipsText = '请拍照'
|
||||
// // 这里可以写自己的逻辑了
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// if (err.x == -1 || err.y == -1) {
|
||||
// this.tipsText = '检测不到人'
|
||||
// } else {
|
||||
// this.tipsText = err.errMsg || '网络错误,请退出页面重试'
|
||||
// }
|
||||
// },
|
||||
// })
|
||||
// })
|
||||
// 5、开始监听帧数据
|
||||
// listener.start()
|
||||
// #endif
|
||||
},
|
||||
// 切换设备镜头
|
||||
handleChangeCameraClick() {
|
||||
this.devicePosition = !this.devicePosition;
|
||||
},
|
||||
// 图片上传
|
||||
handleChooseImage() {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['original', 'compressed'],
|
||||
sourceType: ['album','camera'],
|
||||
success: (res) => {
|
||||
console.log(res,'打印res,哈哈哈哈哈')
|
||||
if (res.errMsg === 'chooseImage:ok') {
|
||||
uni.showLoading({
|
||||
title: '照片上传中...'
|
||||
})
|
||||
const tempFilePaths = res.tempFilePaths[0]
|
||||
this.upLoad(res.tempFilePaths);
|
||||
}
|
||||
},
|
||||
fail: (res) => {
|
||||
},
|
||||
});
|
||||
},
|
||||
// 拍照点击
|
||||
handleTakePhotoClick() {
|
||||
if (this.tipsText != "" && this.tipsText != "请拍照") {
|
||||
return;
|
||||
}
|
||||
uni.getSetting({
|
||||
success: (res) => {
|
||||
if (!res.authSetting['scope.camera']) {
|
||||
this.isAuthCamera = false
|
||||
uni.openSetting({
|
||||
success: (res) => {
|
||||
if (res.authSetting['scope.camera']) {
|
||||
this.isAuthCamera = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
this.cameraEngine.takePhoto({
|
||||
quality: "high",
|
||||
success: ({
|
||||
tempImagePath
|
||||
}) => {
|
||||
this.tempImg = tempImagePath
|
||||
}
|
||||
})
|
||||
console.log(this.tempImg,2121)
|
||||
},
|
||||
// 点击确定上传
|
||||
handleOkClick() {
|
||||
// 这里的 this.tempImg 是经过人脸检测后 拍照拿到的路径
|
||||
this.upLoadOne(this.tempImg)
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
},
|
||||
upLoad(tempFilePaths) {
|
||||
// # 注意 这里上传图片拿到的tempFilePaths是一个数组啊
|
||||
// 图片上传
|
||||
uni.showLoading({
|
||||
title: "上传中,请稍后...",
|
||||
});
|
||||
let proAll = [];
|
||||
tempFilePaths.forEach((item) => {
|
||||
console.log(item,'打印item')
|
||||
proAll.push(this.upLoadOne(item));
|
||||
});
|
||||
Promise.all(proAll).then((res) => {
|
||||
// 上传完成
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
upLoadOne(imgPath) {
|
||||
// 然后这里imgPath 传过来的是 要上传的临时本地图片的路径
|
||||
// 具体上传方法根据自己的请求方式 请求自己的接口
|
||||
},
|
||||
// 点击 - 取消上传
|
||||
handleCancelClick() {
|
||||
this.tempImg = ''
|
||||
},
|
||||
// 点击 - 人脸安全保障按钮
|
||||
handleJumpSecurityClick() {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "假装跳转人脸安全保障",
|
||||
duration: 2000,
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.scan_box{width: 200px;height: 200px;margin: 70px auto;border: 3px solid #009688;border-radius: 50%;background-color: #EEEEEE;
|
||||
display: flex;justify-content: center;
|
||||
}
|
||||
.avatar_frame{width: 100%;height: 100%;}
|
||||
.scan_img{height: 98px;padding-top: 14px; position: absolute;width: 200px;}
|
||||
.start_view{display: flex;justify-content: center;padding-top: 20px;}
|
||||
.start_but{width: 116px;height: 34px;border-radius: 29px;background: #009688;align-items: center;justify-content: center;display: flex;}
|
||||
|
||||
.page-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.containerV {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.headerV {
|
||||
.top-tips1 {
|
||||
margin-top: 60rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 36rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.top-tips2 {
|
||||
margin-top: 20rpx;
|
||||
color: #00AAFF;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.contentV {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 400rpx;
|
||||
margin-top: 30rpx;
|
||||
.tipV {
|
||||
bottom: 30rpx;
|
||||
position: absolute;
|
||||
line-height: 90rpx;
|
||||
padding-left: 24rpx;
|
||||
padding-right: 24rpx;
|
||||
max-width: calc(100vw - 50rpx * 2);
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
background: #000000;
|
||||
opacity: 0.75;
|
||||
color: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
z-index: 5;
|
||||
}
|
||||
.camera {
|
||||
width: 400upx;
|
||||
height: 400upx;
|
||||
border-radius: 50%;
|
||||
border: 3px solid #009688;
|
||||
}
|
||||
.mark {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
width: 750rpx;
|
||||
height: 100%;
|
||||
// background:deeppink;
|
||||
background-size: 750rpx 661rpx;
|
||||
}
|
||||
image {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 3;
|
||||
}
|
||||
}
|
||||
|
||||
.footerV {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.privacyV {
|
||||
padding-top: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.text {
|
||||
font-size: 30rpx;
|
||||
color: #1C1C1C;
|
||||
text-align: center;
|
||||
line-height: 42rpx;
|
||||
margin-left: 15rpx;
|
||||
text {
|
||||
font-size: 30rpx;
|
||||
color: #00AAFF;
|
||||
text-align: center;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
}
|
||||
.icon {
|
||||
width: 40rpx;
|
||||
height: 47rpx;
|
||||
background:green;
|
||||
background-size: 100% auto;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-tips-2 {
|
||||
margin-top: 20rpx;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.take-photo-bgV {
|
||||
width: 100%;
|
||||
margin-top: 300rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.btn-take-photo {
|
||||
margin: 0rpx 80rpx 0rpx 80rpx;
|
||||
width: 196rpx;
|
||||
height: 196rpx;
|
||||
background: yellow;
|
||||
background-size: 100% auto;
|
||||
}
|
||||
.btn-change-upload {
|
||||
left: 130rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
background: blue;
|
||||
background-size: 100% auto;
|
||||
}
|
||||
.btn-change-camera {
|
||||
right: 130rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
background:red;
|
||||
background-size: 100% auto;
|
||||
}
|
||||
}
|
||||
.confirmV {
|
||||
margin: 200rpx 100rpx 0rpx 100rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.btn-cancel {
|
||||
font-size: 32rpx;
|
||||
color: #1C1C1C;
|
||||
}
|
||||
.btn-ok {
|
||||
font-size: 32rpx;
|
||||
color: #00AAFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
158
pages/person/myAuthority.vue
Normal file
158
pages/person/myAuthority.vue
Normal file
@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<view class="pagepaddings">
|
||||
<!-- <checkbox-group @change="checkboxChange">
|
||||
<label class="uni-list-cell uni-list-cell-pd" v-for="item in items" :key="item.value">
|
||||
<view>
|
||||
<checkbox :value="item.value" :checked="item.checked" />
|
||||
</view>
|
||||
<view>{{item.name}}</view>
|
||||
</label>
|
||||
</checkbox-group> -->
|
||||
<view class="contentboxsty" v-for="(item, index) in list" :key="index.id">
|
||||
<view class="list_name">
|
||||
<checkbox-group @change="changeCheckbox">
|
||||
<checkbox value="cb" class="checkbox-backgroun-yellow" :value="item.id" :checked="item.checked" style="transform:scale(0.7)" />
|
||||
</checkbox-group>
|
||||
<!-- <checkbox-group @change="selectPath(e,item)">
|
||||
<checkbox value="cb" class="checkbox-backgroun-yellow" :value="item.id" :checked="item.checked" style="transform:scale(0.7)" />
|
||||
</checkbox-group> -->
|
||||
<!-- <text class="t-icon t-icon-xuanzhong padd_rigth12" @click="selectPath($event.target,item)"></text> -->
|
||||
{{item.name}}{{item.checked}}
|
||||
</view>
|
||||
<view class="list_content" v-for="(i, ind) in item.child" :key="ind">
|
||||
<view class="content_name">
|
||||
<checkbox-group @change="selectPath(e,i)">
|
||||
<checkbox value="cb" class="checkbox-backgroun-yellow" :value="i.id" :checked="i.checked" style="transform:scale(0.7)" />
|
||||
</checkbox-group>
|
||||
<!-- <text class="t-icon t-icon-xuanzhong padd_rigth5"></text> -->
|
||||
<text class="">{{i.name}}</text>
|
||||
</view>
|
||||
<view class="content_item">
|
||||
<view class="content_data" v-for="(btn, inx) in i.child" :key="inx">
|
||||
<checkbox-group @change="selectPath(e,i)">
|
||||
<checkbox value="cb" class="checkbox-backgroun-yellow" :value="btn.id" :checked="btn.checked" style="transform:scale(0.7)" />
|
||||
</checkbox-group>
|
||||
<!-- <text class="t-icon t-icon-xuanzhong padd_rigth5"></text> -->
|
||||
<text class="">{{btn.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
items: [{
|
||||
value: 'USA',
|
||||
name: '美国'
|
||||
},
|
||||
{
|
||||
value: 'CHN',
|
||||
name: '中国',
|
||||
checked: 'true'
|
||||
},
|
||||
{
|
||||
value: 'BRA',
|
||||
name: '巴西'
|
||||
},
|
||||
{
|
||||
value: 'JPN',
|
||||
name: '日本'
|
||||
},
|
||||
{
|
||||
value: 'ENG',
|
||||
name: '英国'
|
||||
},
|
||||
{
|
||||
value: 'FRA',
|
||||
name: '法国'
|
||||
}
|
||||
],
|
||||
list:[
|
||||
{name:'首页',checked:true,id:1,child:[{
|
||||
id: 2,
|
||||
name:'控制台',
|
||||
checked:true,
|
||||
child:[
|
||||
{id:121,name:'设备信息',},
|
||||
{id:122,name:'生产加工信息',},
|
||||
{id:123,name:'生产加工信息',},
|
||||
{id:124,name:'账号信息',},
|
||||
{id:125,name:'通知设置',},
|
||||
{id:126,name:'升级角色'},],
|
||||
},
|
||||
],
|
||||
},
|
||||
// {name:'生产工单',id:11,child:[{
|
||||
// id: 3,
|
||||
// name:'待生产工单',
|
||||
// child:[{name:'添加工单'},
|
||||
// {name:'审核工单'},
|
||||
// {name:'删除工单'},
|
||||
// ],
|
||||
// },
|
||||
// {name:'已排产工单',
|
||||
// child:[],
|
||||
// },
|
||||
// ],
|
||||
// }
|
||||
],
|
||||
arr:[]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkboxChange: function (e) {
|
||||
var items = this.items,
|
||||
values = e.detail.value;
|
||||
for (var i = 0, lenI = items.length; i < lenI; ++i) {
|
||||
const item = items[i]
|
||||
if(values.includes(item.value)){
|
||||
this.$set(item,'checked',true)
|
||||
}else{
|
||||
this.$set(item,'checked',false)
|
||||
}
|
||||
}
|
||||
console.log(items)
|
||||
},
|
||||
changeCheckbox(e){
|
||||
console.log(e)
|
||||
// var items = this.list,
|
||||
// values = e.detail.value;
|
||||
// for (var i = 0, lenI = items.length; i < lenI; ++i) {
|
||||
// const item = items[i]
|
||||
// if(values.includes(item.value)){
|
||||
// this.$set(item,'checked',true)
|
||||
// }else{
|
||||
// this.$set(item,'checked',false)
|
||||
// }
|
||||
// }
|
||||
// console.log(items)
|
||||
},
|
||||
selectPath(e,item){
|
||||
console.log(e,item,222)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.contentboxsty{padding: 14px 12px;margin-bottom: 12px;}
|
||||
.list_name{display: flex;align-items: center;padding-bottom: 7px;border-bottom: 1px solid #2D3A6F;}
|
||||
.content_name{padding:8px 0 ;display: flex;align-items: center;}
|
||||
.content_item{display: flex;align-items: center;flex-wrap: wrap;}
|
||||
.content_data{padding: 4px 15px 4px 0;display: flex;align-items: center;}
|
||||
|
||||
/* 复选框-背景颜色 */
|
||||
checkbox.checkbox-backgroun-yellow[checked] .wx-checkbox-input,
|
||||
checkbox.checkbox-backgroun-yellow.checked .uni-checkbox-input{
|
||||
background-color: #009688 !important;
|
||||
border-color: #009688 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
<view class="t-icon t-icon-shengchangongdan backlogicon"></view>
|
||||
<view class="backlogname">流程审批</view>
|
||||
</view>
|
||||
<view class="backlog_module">
|
||||
<view class="backlog_module" @click="toAlarm">
|
||||
<view class="t-icon t-icon-shengchangongdan backlogicon"></view>
|
||||
<view class="backlogname">设备报警</view>
|
||||
</view>
|
||||
@ -40,7 +40,7 @@
|
||||
<view class="t-icon t-icon-shengchangongdan backlogicon"></view>
|
||||
<view class="backlogname">权限审批</view>
|
||||
</view>
|
||||
<view class="backlog_module">
|
||||
<view class="backlog_module" @click="toSafetyAccidents()">
|
||||
<view class="t-icon t-icon-shengchangongdan backlogicon"></view>
|
||||
<view class="backlogname">安全事故</view>
|
||||
</view>
|
||||
@ -51,7 +51,7 @@
|
||||
<view class="font14">账户中心</view>
|
||||
</view>
|
||||
<view class="con_data">
|
||||
<view class="con_module">
|
||||
<view class="con_module" @click="toMessage">
|
||||
<view class="t-icon t-icon-xiaoxitongzhi-gerenzhongxin personicon"></view>
|
||||
<view class="font13">消息管理</view>
|
||||
<view class=""></view>
|
||||
@ -61,11 +61,16 @@
|
||||
<view class="font13">审批直达</view>
|
||||
<view class=""></view>
|
||||
</view> -->
|
||||
<view class="con_module noborbot">
|
||||
<view class="con_module" @click="toMyAuthority()">
|
||||
<view class="t-icon t-icon-wodequanxian personicon"></view>
|
||||
<view class="font13">我的权限</view>
|
||||
<view class=""></view>
|
||||
</view>
|
||||
<view class="con_module noborbot" @click="toFaceAuthentication()">
|
||||
<view class="t-icon t-icon-renlianrenzheng personicon"></view>
|
||||
<view class="font13">人脸认证</view>
|
||||
<view class=""></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="con_set">
|
||||
<view class="t-icon t-icon-xitongshezhi-gerenzhongxin personicon"></view>
|
||||
@ -90,12 +95,40 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//跳转设备报警
|
||||
toAlarm(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/person/alarm'
|
||||
})
|
||||
},
|
||||
toSafetyAccidents(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/person/safetyAccidents'
|
||||
})
|
||||
},
|
||||
//跳转账户中心页
|
||||
toAccountCenter(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/person/accountCenter'
|
||||
})
|
||||
},
|
||||
//跳转人脸认证页
|
||||
toFaceAuthentication(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/person/faceAuthentication'
|
||||
})
|
||||
},
|
||||
toMyAuthority(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/person/myAuthority'
|
||||
})
|
||||
},
|
||||
//跳转消息页
|
||||
toMessage(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/message'
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
43
pages/person/safetyAccidents.vue
Normal file
43
pages/person/safetyAccidents.vue
Normal file
@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<!-- 安全事故 -->
|
||||
<view class="pagepaddings">
|
||||
<view class="contentboxsty font13" v-for="(item, index) in list" :key="index">
|
||||
<view class="name font_bold font14">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="img_style">
|
||||
<image :src="item.url"></image>
|
||||
</view>
|
||||
<view class="flex_layout padd_bot6">
|
||||
<view class="flex1">员工安全行为</view>
|
||||
<view class="">2023-09-01</view>
|
||||
</view>
|
||||
<view class="">
|
||||
事件描述事件描述事件描述事件描述事件描述事件描述
|
||||
事件描述事件描述事件描述事件描述事件描述事件描述
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list:[
|
||||
{name:'设备一',url:'../../static/logo.png'},
|
||||
{name:'设备一',url:'../../static/logo.png'},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.contentboxsty{padding: 14px 12px;margin-bottom: 12px;}
|
||||
.img_style{padding: 12px 0 14px 0;}
|
||||
|
||||
</style>
|
@ -1,6 +1,58 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<view class="pagepaddings">
|
||||
<view class="detail_list contentboxsty ">
|
||||
<view class="list_top">
|
||||
<view class="top_left">
|
||||
工单号 <text class="padd_left12">{{form.order_sn}}</text>
|
||||
</view>
|
||||
<view class="top_right font13">
|
||||
{{form.review_status_label}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="list_content">
|
||||
<view class="content_left font13">
|
||||
<view class="content_row">
|
||||
<text class="name">生产开始时间</text>
|
||||
<text class="data">{{form.created_at}}</text>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<text class="name">生产结束时间</text>
|
||||
<text class="data">{{form.updated_at}}</text>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<text class="name">工单耗时</text>
|
||||
<text class="data">10h</text>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<text class="name">加工规格</text>
|
||||
<text class="data">{{form.order_spec}}</text>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<text class="name">规格料</text>
|
||||
<text class="data">13.01m³</text>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<text class="name">生产负责</text>
|
||||
<text class="data">张三</text>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<text class="name">加工等级</text>
|
||||
<text class="data">全齐边</text>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<text class="name">辅料</text>
|
||||
<text class="data">0.61m³</text>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<text class="name">电话</text>
|
||||
<text class="data">13712279001</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_right">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -8,15 +60,34 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
form:{}
|
||||
}
|
||||
},
|
||||
onLoad(option){
|
||||
console.log(option)
|
||||
this.detailData(option.id)
|
||||
},
|
||||
onShow(){
|
||||
// this.detailData()
|
||||
},
|
||||
methods: {
|
||||
|
||||
detailData(id){
|
||||
this.$api.postFuncLoading('/order.info',{id:id}).then(res=>{
|
||||
console.log(res.data)
|
||||
this.form = res.data
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
<style lang="scss">
|
||||
.list_top{
|
||||
.top_right{background: #243168;border-radius: 4px 4px 4px 4px;width: 46px;height: 20px;text-align: center;}
|
||||
}
|
||||
.list_content{
|
||||
.content_row{display: flex;padding:6px 0;
|
||||
.name{width: 90px;}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,60 +1,61 @@
|
||||
<template>
|
||||
<!-- 生产工单 -->
|
||||
<view class="pagepaddings">
|
||||
<view v-for="(item,index) in list" :key="index" class="page_list contentboxsty font13">
|
||||
<view @click="toDetail()">
|
||||
<view v-for="(item,index) in list" :key="index" class="detail_list contentboxsty font13">
|
||||
<view @click="toDetail(item.id)">
|
||||
<view class="list_top">
|
||||
<view class="top_left">
|
||||
工单号:{{item.name}}
|
||||
工单号:{{item.order_sn}}
|
||||
</view>
|
||||
<view class="top_right">
|
||||
工单详情
|
||||
</view>
|
||||
<view class="iconfont icon-gengduo-1"></view>
|
||||
</view>
|
||||
<view class="list_centre">
|
||||
<view class="centre_left">
|
||||
<view class="">
|
||||
算法出材率
|
||||
</view>
|
||||
<view class="percentage font24">
|
||||
{{item.algorithm}}%
|
||||
</view>
|
||||
</view>
|
||||
<view class="centre_left">
|
||||
<view class="">
|
||||
算法出材率
|
||||
</view>
|
||||
<view class="percentage font24">
|
||||
{{item.reality}}%
|
||||
</view>
|
||||
工单详情 <text class="iconfont icon-gengduo"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list_below">
|
||||
<view class="row">
|
||||
<view class="row_left">
|
||||
<text>状态:</text>
|
||||
<text>{{item.state}}</text>
|
||||
<view class="list_content font13">
|
||||
<view class="list_centre">
|
||||
<view class="centre_left">
|
||||
<view class="">
|
||||
算法出材率
|
||||
</view>
|
||||
<view class="percentage font24">
|
||||
{{item.algorithm}}%
|
||||
</view>
|
||||
</view>
|
||||
<view class="row_right">
|
||||
<text>加工规格:</text>
|
||||
<text>{{item.specs}}</text>
|
||||
<view class="centre_left">
|
||||
<view class="">
|
||||
实际出材率
|
||||
</view>
|
||||
<view class="percentage font24">
|
||||
{{item.reality}}%
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="row_left">
|
||||
<text>生产开始:</text>
|
||||
<text>{{item.time}}</text>
|
||||
<view class="list_below">
|
||||
<view class="row">
|
||||
<view class="row_left">
|
||||
<text>状态:</text>
|
||||
<text>{{item.review_status_label}}</text>
|
||||
</view>
|
||||
<view class="row_right">
|
||||
<text>加工规格:</text>
|
||||
<text>{{item.order_spec}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row_right">
|
||||
<text>工单耗时:</text>
|
||||
<text>{{item.timeConsuming}}</text>
|
||||
<view class="row">
|
||||
<view class="row_left">
|
||||
<text>生产开始:</text>
|
||||
<text>{{item.plan_date}}</text>
|
||||
</view>
|
||||
<view class="row_right">
|
||||
<text>工单耗时:</text>
|
||||
<text>{{item.timeConsuming}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="row_left">
|
||||
<text>工单数量:</text>
|
||||
<text>{{item.number}}</text>
|
||||
<view class="row">
|
||||
<view class="row_left">
|
||||
<text>工单数量:</text>
|
||||
<text>{{item.order_number}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -67,50 +68,25 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list:[{
|
||||
name:'SO202401111004',
|
||||
algorithm:'81.5',
|
||||
reality:'81.4',
|
||||
state:'生产中',
|
||||
specs:'4*9*3.66',
|
||||
time:'jan-11 10:05',
|
||||
timeConsuming:'3.5H',
|
||||
number:'12.66m³'
|
||||
},{
|
||||
name:'SO202401111004',
|
||||
algorithm:'81.5',
|
||||
reality:'81.4',
|
||||
state:'生产中',
|
||||
specs:'4*9*3.66',
|
||||
time:'jan-11 10:05',
|
||||
timeConsuming:'3.5H',
|
||||
number:'12.66m³'
|
||||
},{
|
||||
name:'SO202401111004',
|
||||
algorithm:'81.5',
|
||||
reality:'81.4',
|
||||
state:'生产中',
|
||||
specs:'4*9*3.66',
|
||||
time:'jan-11 10:05',
|
||||
timeConsuming:'3.5H',
|
||||
number:'12.66m³'
|
||||
},{
|
||||
name:'SO202401111004',
|
||||
algorithm:'81.5',
|
||||
reality:'81.4',
|
||||
state:'生产中',
|
||||
specs:'4*9*3.66',
|
||||
time:'jan-11 10:05',
|
||||
timeConsuming:'3.5H',
|
||||
number:'12.66m³'
|
||||
}]
|
||||
list:[]
|
||||
}
|
||||
},
|
||||
onShow(){
|
||||
this.listData();
|
||||
},
|
||||
methods: {
|
||||
methods: {
|
||||
listData(){
|
||||
this.$api.postFuncLoading('/order.list',{page: 1,pageSize: 15}).then(res=>{
|
||||
this.list = res.data.rows
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
//跳转工单详情
|
||||
toDetail(){
|
||||
toDetail(id){
|
||||
console.log(id)
|
||||
uni.navigateTo({
|
||||
url:'/pages/production/productionDetail'
|
||||
url:'/pages/production/productionDetail?id='+id
|
||||
})
|
||||
},
|
||||
}
|
||||
@ -118,10 +94,7 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page_list{
|
||||
.list_top{display: flex;padding: 12px 0;border-bottom: 1px solid #2D3A6F;margin-bottom: 8px;
|
||||
.top_left{flex: 1;}
|
||||
}
|
||||
.detail_list{
|
||||
.list_centre{display: flex;text-align: center;padding-bottom: 10px;
|
||||
view{flex: 1;}
|
||||
.percentage{color: #00B68D;}
|
||||
@ -131,5 +104,6 @@
|
||||
view{flex: 1;}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user