南骏 池
2025-04-14 b8e49f7a79a880726e459d59c4044d1dc6c159e6
H5/Js/LLJ/Add.js
@@ -299,13 +299,13 @@
            var that = this;
            that.ttrre = true;
            that.AxiosHttp("post", 'MesQaItemsDetect01Manager/EditModelSubmit', {
                id13: that.formData.guid
                guid: that.formData.guid
            }, true, 1).then(function (res1) {
                if (res1.rtnCode == 1) {
                if (res1.rtnData.outSum == 1) {
                    that.$notify({ type: 'success', message: '提交成功' });
                    that.init();
                } else {
                    that.$toast.fail(res1.rtnMsg);
                    that.$toast.fail(res1.rtnData.outMsg);
                }
                that.ttrre = false
            }).catch(function (error) {
@@ -316,13 +316,13 @@
        },
        removeXJ() {
            const that = this;
            that.isLoading = true;
            // 添加确认弹窗
            that.$dialog.confirm({
                message: '确认要重新加载检验项目吗?',
                confirmButtonText: '确认',
                cancelButtonText: '取消'
            }).then(() => {  // 确认回调
                that.isLoading = true;
                that.AxiosHttp("post", 'MesQaItemsDetect01Manager/ReloadModel5', {
                    guid: that.formData.guid
                }, true, 1).then(res1 => {
@@ -340,7 +340,6 @@
            }).catch(() => {  // 取消回调
                that.$toast('已取消操作');
                that.isLoading = false;
            });
        },
        GetBack1() {
@@ -461,9 +460,8 @@
        //获取图片信息
        GetImageFileByGid() {
            const that = this;
            that.AxiosHttp("post", 'Llj/getImage', {
                gid: that.formData.guid,
                Remarks: that.remarks
            that.AxiosHttp("post", 'MesImage/getImage', {
                parentId: that.formData.guid,
            }, true, 0).then(res1 => {
                if (res1.status === 0) {
                    // 关键转换:将后端数据转换为 van-uploader 需要的格式
@@ -482,5 +480,30 @@
                that.$toast.fail("网络错误,请重试!");
            });
        },
        handleDelete(file, { index }) {
            var that = this;
            that.$dialog.confirm({
                title: '确认删除',
                message: '确定要删除这张图片吗?'
            }).then(() => {
                // 确认删除逻辑
                console.log(file);
                that.AxiosHttp("post", 'MesImage/deleteImage', {
                    id: file.id,
                }, true, 0).then(res1 => {
                    if (res1.status === 0) {
                        that.$notify({ type: 'success', message: '删除成功' });
                        that.init();//刷新检验项目
                    } else {
                        that.$toast.fail(res1.rtnMsg);
                    }
                }).catch(error => {
                    that.$toast.fail("网络错误,请重试!");
                });
            }).catch(() => {
                // 取消操作
            })
        },
    }
})