提交代码
This commit is contained in:
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'
|
||||
|
Reference in New Issue
Block a user