App-Android(使用App+htnl5框架,解决消息推送兼容SignalR问题)
loulijun2021
2022-09-21 32383daed1b498577da8c37145e66e2a93e28b2d
1.日常点检提交功能开发完成
已修改1个文件
65 ■■■■ 文件已修改
pages/sbgl/rcdj.html 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/sbgl/rcdj.html
@@ -54,17 +54,17 @@
            ]
            let radioValue = ''
            let radioValue = '' //单选框选中的项
            let resultValue = ''
            let resultValue = '' //点检结果
            let bwcode = ''
            let bwcode = '' //点击部位的扫描框 点检项目code
            let number = []
            let number = [] //点检项目内容 假数组   做扫码回来视图更新用
            // 扫描点检工位返回时执行方法
            function scaned(r) {
                let flag = false
                topContent.forEach((item, index) => {
                    if (item.code === r) {
@@ -98,7 +98,7 @@
            }
            // 扫描点检项目内容返回时执行方法
            function scaned2(r) {
                if (bwcode === r) {
                    centerContent.forEach(item => {
@@ -131,7 +131,6 @@
                }
            }
            function topContentClcik(code) {
                radioValue = code
@@ -246,8 +245,8 @@
                        </div>
                        <div class="flex_between ">
                            <div class='flex_between' style="width: 90%;">
                                <van-field class="vanFieldInput" :disabled="item.isDisabled" v-model="item.inputValue"
                                    placeholder="请输入" />
                                <van-field class="vanFieldInput" @blur="vanFieldBlur()" :disabled="item.isDisabled"
                                    v-model="item.inputValue" placeholder="请输入" />
                            </div>
@@ -377,7 +376,53 @@
            mounted() {},
            methods: {
                submit() {
                    vant.Toast('xxx1')
                    let children = []
                    centerContent.forEach(item => {
                        children.push({
                            seq: item.seq,
                            itemcode: item.code,
                            cycle: item.cycle,
                            value: item.inputValue,
                            result: item.isOK
                        })
                    })
                    const data = {
                        code: radioValue,
                        name: topContent.find(r => r.code === radioValue).name,
                        standcode: topContent.find(r => r.code === radioValue).eqpchkmain_code,
                        result: resultValue,
                        children: children
                    }
                    console.log(data, 1)
                    post('AppDeviceManage/AppDeviceCheckSave?username=' + localStorage.getItem('username'), data)
                        .then(res => {
                            if (res.code === '200') {
                                vant.Notify({
                                    type: 'primary',
                                    message: '提交成功!'
                                })
                                topContent.forEach((r, i) => {
                                    if (r.code === radioValue) {
                                        topContent.splice(i, 1)
                                    }
                                })
                                if (topContent.length >= 1) {
                                    radioValue = topContent[0].code
                                    this.topContentClcik(radioValue)
                                } else {
                                    centerContent = []
                                }
                                resultValue = ''
                                this.$forceUpdate()
                            }
                        })
                },
                // 输入框失焦触发事件
                vanFieldBlur() {
                    this.$forceUpdate()
                },
                topContentClcik(code) {
                    radioValue = code