| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <template>
- <view>
- <view class="status_bar"></view>
- <view class="" style="position: relative;top: 44px;">
- <view style="position: fixed;z-index: 100;">
- <uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="修改名称"></uni-nav-bar>
- </view>
- <view class="mod">
- <view class="mod_name">
- <p>设备名称</p>
- <input type="text" v-model="moddata.device_name" style="background-color: #FAFAFA;" />
- </view>
- <view class="mod_id">
- <p>设备ID</p>
- <input type="text" :value="moddata.imei" disabled />
- </view>
- <view class="mod_user">
- <p>适配用户</p>
- <input type="text" :value="moddata.real_name==''?'无':moddata.real_name" disabled />
- </view>
- <view class="mod_time">
- <p>设备添加时间</p>
- <input type="text" :value="moddata.addtime|timeFormat()" disabled />
- </view>
- <view class="sub" @click="btn">
- 提 交
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- moddata: []
- }
- },
- methods: {
- async eqlist() { //设备列表
- const res = await this.$myRequest({
- url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
- data: {
- device_id: this.moddata.device_id,
- device_name: this.moddata.device_name
- }
- })
- },
- btn() {
- this.eqlist()
- },
- clickLeft() {
- uni.switchTab({
- url: "./index"
- })
- }
- },
- onLoad(option) {
- this.moddata = JSON.parse(option.data)
- console.log(this.moddata)
- }
- }
- </script>
- <style lang="scss">
- .mod {
- width: 100%;
- position: absolute;
- top: 44px;
- height: 92vh;
- background-color: #FAFAFA;
- .mod_name,
- .mod_id,
- .mod_user,
- .mod_time {
- width: 90%;
- margin: 30rpx auto;
- display: flex;
- justify-content: space-between;
- background-color: #FFFFFF;
- padding: 20rpx 10rpx;
- color: #57C77A;
- line-height: 50rpx;
- input {
- text-align: right;
- font-size: 28rpx;
- padding: 10rpx;
- }
- }
- }
- .sub {
- width: 90%;
- margin: 30rpx auto;
- text-align: center;
- height: 70rpx;
- line-height: 70rpx;
- background-color: #57C77A;
- border-radius: 35rpx;
- color: #FFFFFF;
- }
- </style>
|