const _Http = getApp().globalData.http,
    {
        formatTime
    } = require("../../../../utils/getTime");

Component({
    data: {
        sa_projectid: 0,
        content: {
            total: null
        }
    },
    methods: {
        /* 获取产品列表 */
        getList(id) {
            if (id == 0) return;
            let content = {
                nocache: true,
                sa_projectid: id
            };
            _Http.basic({
                "id": "20230628155502",
                content
            }).then(res => {
                console.log("报备进度", res)
                if (res.msg != '成功') return wx.showToast({
                    title: res.data,
                    icon: "none"
                });
                this.setData({
                    list: res.data.map(v => {
                        v.time = formatTime(new Date(v.createDate), '-')
                        return v
                    }),
                    sa_projectid: id
                })
            })
        }
    }
})