| | |
| | | <view class="head_wrap">
|
| | | <view class="search_wrap">
|
| | | <image class="mr12 search" src="@/static/home/ic_search@2x.png" mode="widthFix"></image>
|
| | | <input v-model="param.keyword" @confirm="getList()" type="text" placeholder="搜索设备名称/编号" placeholder-class="placeholder9" />
|
| | | <input v-model="param.keyword" @confirm="getList()" type="text" placeholder="搜索设备名称/编号"
|
| | | placeholder-class="placeholder9" />
|
| | | </view>
|
| | | <view class="name_wrap" @click="showModal = true">
|
| | | <view class="name">运维人</view>
|
| | | <view class="name_wrap" @click="handleMem">
|
| | | <view class="name">{{ param.realname ? param.realname : '运维人' }}</view>
|
| | | <u-icon :name="showModal ? 'arrow-right' : 'arrow-down'" color="#999999" size="12"></u-icon>
|
| | | </view>
|
| | | </view>
|
| | | <!-- -->
|
| | | <view class="list">
|
| | | <view class="item" v-for="item in 10" @click="itemClick(item)">
|
| | | <view class="item" v-for="item in list" @click="itemClick(item)">
|
| | | <image src="@/static/side/ic_shuiyu@2x.png" class="icon"></image>
|
| | | <view class="content">
|
| | | <view class="name_wrap">
|
| | | <view class="name">
|
| | | <text class="device">xx设备</text>
|
| | | <text>D20231</text>
|
| | | <text class="device">{{item.deviceName}}</text>
|
| | | <text>{{item.deviceCode}}</text>
|
| | | </view>
|
| | | <view class="status red">正常</view>
|
| | | <view class="status" v-if="item.status == 0">正常</view>
|
| | | <view class="status red" v-if="item.status == 1">损坏</view>
|
| | | <view class="status red" v-if="item.status == 2">报废</view>
|
| | | </view>
|
| | | <view class="line">运维人:xxx</view>
|
| | | <view class="line">运维时间:121212</view>
|
| | | <view class="line">运维人:{{item.realName}}</view>
|
| | | <view class="line">运维时间:{{item.dealDate}}</view>
|
| | | </view>
|
| | |
|
| | | </view>
|
| | | </view>
|
| | | <!-- -->
|
| | | <u-picker :show="showModal" keyName="name" @cancel="showModal = false" @confirm='confirm'
|
| | | <u-picker :show="showModal" keyName="realname" @cancel="showModal = false" @confirm='confirm'
|
| | | :columns="columns"></u-picker>
|
| | | </view>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | import {
|
| | | ywDeviceRecord,
|
| | | findInternalList
|
| | | } from '@/api'
|
| | | export default {
|
| | | data() {
|
| | | return {
|
| | | param: {},
|
| | | columns: [],
|
| | | showModal: false
|
| | | showModal: false,
|
| | | list: [],
|
| | | total: 0,
|
| | | page: 1,
|
| | | };
|
| | | },
|
| | | methods: { |
| | | getList() {},
|
| | | onLoad() {
|
| | | this.getpeo()
|
| | | this.getList()
|
| | |
|
| | | },
|
| | | mounted() {
|
| | | this.$eventBus.$on('memberSel', (option) => {
|
| | | this.$set(this.param, 'realname', option.realname)
|
| | | this.$set(this.param, 'memberId', option.id) |
| | | this.getList()
|
| | | }) |
| | | |
| | | },
|
| | | methods: {
|
| | | getList() {
|
| | | const {
|
| | | page,
|
| | | total,
|
| | | list, |
| | | param
|
| | | } = this
|
| | | ywDeviceRecord({
|
| | | page,
|
| | | capacity: 10,
|
| | | model: param
|
| | | }).then(res => {
|
| | | this.list = res.data.records || []
|
| | | this.total = res.data.total
|
| | | })
|
| | | }, |
| | | handleMem() { |
| | | uni.navigateTo({ |
| | | url: '/pages/common/memberSel' |
| | | }) |
| | | },
|
| | | getpeo() {
|
| | | findInternalList().then(res => {
|
| | | this.columns = [res.data]
|
| | | })
|
| | | },
|
| | | confirm() {
|
| | | this.showModal = false
|
| | | }, |
| | | itemClick() { |
| | | uni.navigateTo({ |
| | | url: '/pages/operation/detail' |
| | | }) |
| | | },
|
| | | itemClick(item) {
|
| | | uni.navigateTo({
|
| | | url: '/pages/operation/detail?id='+ item.id
|
| | | })
|
| | | }
|
| | | }
|
| | | }
|
| | | </script>
|
| | |
|
| | | <style lang="scss" scoped> |
| | | .main_app{ |
| | | padding: 0 30rpx; |
| | | <style lang="scss" scoped>
|
| | | .main_app {
|
| | | padding: 0 30rpx;
|
| | | }
|
| | |
|
| | | .head_wrap {
|
| | | display: flex;
|
| | | align-items: center;
|
| | |
| | | background: #F7F7F7;
|
| | | border-radius: 38rpx;
|
| | | padding-left: 30rpx;
|
| | | input{ |
| | | flex: 1; |
| | |
|
| | | input {
|
| | | flex: 1;
|
| | | }
|
| | |
|
| | | .search {
|
| | | width: 28rpx;
|
| | | height: 28rpx;
|
| | |
| | | .list {
|
| | | .item {
|
| | | display: flex;
|
| | | height: 228rpx; |
| | | padding: 30rpx 0; |
| | | height: 228rpx;
|
| | | padding: 30rpx 0;
|
| | | border-bottom: 2rpx solid #E5E5E5;
|
| | |
|
| | | .icon {
|
| | | width: 80rpx;
|
| | | height: 80rpx; |
| | | height: 80rpx;
|
| | | margin-right: 24rpx;
|
| | | }
|
| | |
|
| | | .content {
|
| | | flex: 1; |
| | | color: #666666; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | .name_wrap{ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .name{ |
| | | display: flex; |
| | | align-items: flex-end; |
| | | font-size: 26rpx; |
| | | .device{ |
| | | font-weight: 600; |
| | | font-size: 34rpx; |
| | | color: #222222; |
| | | margin-right: 6rpx; |
| | | } |
| | | } |
| | | .status{ |
| | | color: $primaryColor; |
| | | } |
| | | flex: 1;
|
| | | color: #666666;
|
| | | display: flex;
|
| | | flex-direction: column;
|
| | | justify-content: space-between;
|
| | |
|
| | | .name_wrap {
|
| | | display: flex;
|
| | | justify-content: space-between;
|
| | | align-items: center;
|
| | |
|
| | | .name {
|
| | | display: flex;
|
| | | align-items: flex-end;
|
| | | font-size: 26rpx;
|
| | |
|
| | | .device {
|
| | | font-weight: 600;
|
| | | font-size: 34rpx;
|
| | | color: #222222;
|
| | | margin-right: 6rpx;
|
| | | }
|
| | | }
|
| | |
|
| | | .status {
|
| | | color: $primaryColor;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|