ソースを参照

移除多余文件

xiaohaizhao 2 年 前
コミット
64f3fe5aa9
3 ファイル変更0 行追加253 行削除
  1. 0 29
      packageA/facility/detail.vue
  2. 0 75
      packageA/facility/index.vue
  3. 0 149
      packageA/facility/modules/list.vue

+ 0 - 29
packageA/facility/detail.vue

@@ -1,29 +0,0 @@
-<template>
-    <view class="container">
-        <cu-custom id="custom"
-            bgImage="https://yostest175549.obs.cn-east-2.myhuaweicloud.com:443/202306151686796745663B52544232.png"
-            :isBack="true">
-            <block slot="backText">返回</block>
-            <block slot="content">
-                设备详情
-            </block>
-        </cu-custom>
-    </view>
-</template>
-
-<script>
-export default {
-    components: {},
-    name: "facilityD",
-    data() {
-        return {
-        }
-    },
-    onLoad(options) {
-        console.log(options)
-    },
-    methods: {}
-}
-</script>
-
-<style lang="scss" scoped></style>

+ 0 - 75
packageA/facility/index.vue

@@ -1,75 +0,0 @@
-<template>
-    <view class="container">
-        <cu-custom id="custom"
-            bgImage="https://yostest175549.obs.cn-east-2.myhuaweicloud.com:443/202306151686796745663B52544232.png"
-            :isBack="true">
-            <block slot="backText">返回</block>
-            <block slot="content">
-                设备中心
-            </block>
-        </cu-custom>
-        <list ref="设备列表" v-show="PageCur == '设备列表'" :istabbar="true" />
-		<my-map ref="设备地图" v-show="PageCur == '设备地图'" />
-
-
-        <view v-if="istabbar" class="cu-bar tabbar bg-white foot" style="z-index: 100000;">
-            <view v-for="item in pageList" :key="item.label"
-                :class="PageCur == item.label ? 'action pitch-on-color' : 'action text-gray'">
-                <view class="iconfont" :class="item.icon" @click="changePage(item.label)" />
-                {{ item.label }}
-            </view>
-        </view>
-    </view>
-</template>
-
-<script>
-import list from "./modules/list"
-import myMap from "../../pages/facility/my-map.vue";
-
-
-export default {
-    components: { list, myMap },
-    name: "facility",
-    data() {
-        return {
-            istabbar: false,
-            PageCur: "",
-            pageList: []
-        }
-    },
-    mounted() {
-        let authList = uni.getStorageSync('authList')['设备中心'],
-            pageList = [{
-                label: "设备列表",
-                icon: "icon-xunjianzhongxin"
-            }, {
-                label: "设备地图",
-                icon: "icon-ditu-xuanzhong"
-            }].filter(v => authList[v.label] && authList[v.label].option.some(s => s == 'read'));
-        if (pageList.length) {
-            this.pageList = pageList;
-            this.PageCur = pageList[0].label;
-            this.istabbar = pageList.length > 1;
-            this.loadElement();
-        } else {
-            uni.showToast({
-                title: '未查询到可用应用',
-                icon: "none",
-                mask: true,
-            });
-        }
-    },
-    methods: {
-        changePage(page) {
-            this.PageCur = page;
-            this.loadElement()
-        },
-        loadElement(forcedUpdating) {
-            let page = this.$refs[this.PageCur];
-            if (page.uninitialized || forcedUpdating) page.init();
-        }
-    }
-}
-</script>
-
-<style lang="scss" scoped></style>

+ 0 - 149
packageA/facility/modules/list.vue

@@ -1,149 +0,0 @@
-<template>
-    <view>
-        <My_search @onFilter="onFilter" @startSearch="startSearch" />
-        <My_listbox ref="List" @getlist="getlist" :empty='empty'>
-            <navigator v-for="item in list" :key="item.w_deviceid" class="item"
-                :url="'/packageA/facility/detail?id=' + item.w_deviceid">
-                <view class="name u-line-1">设备:{{ item.devicename || ' --' }}</view>
-                <view class="row u-line-1">设备编号:<text>{{ item.serialnumber || ' --' }}</text></view>
-                <view class="row u-line-1">设备地址:<text>{{ (item.province + item.city + item.county + item.address) || ' --'
-                }}</text>
-                </view>
-                <view class="status" :style="{ background: item.bgColor }">{{ item.status }}</view>
-            </navigator>
-            <view v-if="istabbar" class="cu-bar tabbar" />
-        </My_listbox>
-    </view>
-</template>
-<script>
-export default {
-    props: {
-        istabbar: Boolean
-    },
-    name: "list",
-    data() {
-        return {
-            empty: false,
-            list: [],
-            uninitialized: true,
-            "content": {
-                "pageNumber": 1,
-                "pageTotal": 1,
-                "pageSize": 20,
-                "where": {
-                    "condition": "",
-                    "status": ""
-                }
-            },
-        }
-    },
-    methods: {
-        init(forcedUpdating = true) {
-            this.uninitialized = false;
-            this.getlist(forcedUpdating);
-
-
-        },
-        getlist(init) {
-            let content = this.content;
-            if (init) {
-                content.pageNumber = 1;
-                content.pageTotal = 1;
-            }
-            if (content.pageNumber > content.pageTotal) return;
-            this.$Http.basic({
-                "id": 20230711144102,
-                content
-            }).then(res => {
-                console.log("设备列表", res)
-                if (this.cutoff(res.msg)) return;
-                this.$refs.List.RefreshToComplete();
-                this.$refs.List.setHeight();
-                this.empty = !res.data.length;
-                content.pageNumber = res.pageNumber + 1;
-                content.pageTotal = res.pageTotal;
-                res.data = res.data.map(v => {
-                    switch (v.status) {
-                        case '在线':
-                            v.bgColor = "#3874F6";
-                            break;
-                        case '禁用':
-                            v.bgColor = "#EB4B5C";
-                            break;
-                        default:
-                            v.bgColor = "#BBBBBB";
-                            break;
-                    }
-                    return v
-                })
-
-
-
-
-
-                this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data)
-                this.content = content;
-            })
-        },
-        startSearch(condition) {
-            if (condition == this.content.where.condition) return;
-            this.content.where.condition = condition;
-            this.getlist(true)
-        },
-        onFilter(e) {
-            console.log("开始筛选", e)
-        },
-    }
-}
-</script>
-
-<style lang="scss" scoped>
-.item {
-    position: relative;
-    width: 355px;
-    background: #FFFFFF;
-    border-radius: 4px;
-    margin: 5px auto;
-    margin-bottom: 10px;
-    padding: 10px;
-    box-sizing: border-box;
-    overflow: hidden;
-
-    .name {
-        width: 300px;
-        line-height: 21px;
-        font-size: 15px;
-        font-family: PingFang SC-Medium, PingFang SC;
-        font-weight: bold;
-        color: #333333;
-        margin-bottom: 10px;
-    }
-
-    .row {
-        line-height: 17px;
-        font-size: 12px;
-        color: #666666;
-        margin-bottom: 5px;
-
-        text {
-            line-height: 17px;
-            font-size: 12px;
-            color: #0A3971;
-        }
-    }
-
-    .status {
-        position: absolute;
-        right: 0;
-        top: 0;
-        border-radius: 0px 4px 0px 4px;
-        background: red;
-        text-align: center;
-        line-height: 24px;
-        padding: 0 10px;
-        font-size: 12px;
-        font-family: PingFang SC-Regular, PingFang SC;
-        color: #FFFFFF;
-    }
-}
-</style>