chenhaozhe
2025-07-07 62d38b5b572540f89d0a286795454dcde3ea35e0
设备运行状态 模具运行状态添加下拉刷新
4个文件已修改
77 ■■■■■ 已修改文件
manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mujvzhuangtai/mujvzhuangtai.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -1,6 +1,6 @@
{
    "name" : "智云LMES",
    "appid" : "__UNI__B002F49",
    "appid" : "__UNI__E5BAC6D",
    "description" : "",
    "versionName" : "1.0.12",
    "versionCode" : 112,
pages.json
@@ -268,7 +268,8 @@
        {
            "path" : "pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai",
            "style": {
                "navigationBarTitleText": "设备运行状态"
                "navigationBarTitleText": "设备运行状态",
                "enablePullDownRefresh": true
            }
        },
        {
@@ -281,7 +282,8 @@
            "path" : "pages/mujvzhuangtai/mujvzhuangtai",
            "style" : 
            {
                "navigationBarTitleText" : "模具状态分布"
                "navigationBarTitleText" : "模具状态分布",
                "enablePullDownRefresh": true
            }
        },
        {
pages/mujvzhuangtai/mujvzhuangtai.vue
@@ -196,7 +196,6 @@
                )
            },
            ToDetail(item) {
                console.log(item)
                uni.navigateTo({
                    url:  `./detail?HMouldID=${item["HInterID"] || 0}&HMouldCode=${item['模具编号']}`
                })
@@ -204,6 +203,40 @@
        },
        async onLoad() {
            await this.initWHSelector()
        },
        onPullDownRefresh() {
            let whIndex = this.warehouseRange.indexOf(this.warehouseSelected);
            if(whIndex != -1){
                let id = this.warehouseIDRange[whIndex]
                this.moulds = []
                this.doRequest(
                    "/Web/Get_Sc_MouldStatusAnalysisList", {
                        sWhere: ` and HWHID = ${id}`,
                        user: this.userInfo.HEmpName,
                        Organization: this.organInfo.name
                    },
                    function(res) {
                        console.log(res)
                        let res1 = res.data
                        let {
                            data,
                            count
                        } = res1
                        if (count > 0) {
                            console.log(data)
                            this.moulds = data.map(item => {
                                return Object.assign(item, {
                                    imgSrc: "../../static/sb.png"
                                })
                            })
                        }
                    },
                    function(err) {
                        console.error(err)
                    }
                )
            }
            uni.stopPullDownRefresh()
        }
    }
</script>
pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai.vue
@@ -157,7 +157,6 @@
                uni.hideLoading()
            },
            ToDetail(item) {
                console.log(item)
                uni.navigateTo({
                    url: "./detail?HDeptID=" + (item['设备id'] || 0) + "&HSourceID=" + (item['HSourceID'] || 0)
                })
@@ -195,6 +194,39 @@
        },
        async onLoad() {
            await this.initDepartment()
        },
        onPullDownRefresh() {
            let departIndex = this.departmentsTitles.indexOf(this.selectedDepartment)
            if(departIndex != -1){
                let departId = this.departmentsIdArray[departIndex]
                // 合并稼动率和OEE => Sc_HEquipStateDistribution/Sc_HEquipStateDistribution_Souce_MergeOEEReport
                this.doRequest(
                    "/Sc_HEquipStateDistribution/Sc_HEquipStateDistribution_Souce", {
                        HDeptID: departId,
                        user: this.userInfo.HEmpName,
                        OrganizationID: this.organInfo.id
                    },
                    function(res) {
                        let res1 = res.data
                        let {
                            count,
                            data
                        } = res1
                        if (count > 0) {
                            this.devices = data["h_p_sc_HDeptSouceMOList"].map(item => {
                                return Object.assign(item, {
                                    imgSrc: "../../static/sb.png"
                                })
                            })
                        }
                    },
                    function(err) {
                        console.error(err)
                    }
                )
            }
            uni.stopPullDownRefresh()
        }
    }
</script>