import httpRequest from '@/utils/request.js'

// 保存脚本
export function save(param, data) {
    return httpRequest({
        baseURL: process.env.VUE_APP_REPORT_URL,
        url: 'script/save',
        method: 'post',
        params: param,
        data: data
    })
}
// 读取脚本
export function read() {
    return httpRequest({
        baseURL: process.env.VUE_APP_REPORT_URL,
        url: 'script/read',
        method: 'get'
    })
}
// 运行脚本
export function run(data) {
    return httpRequest({
        baseURL: 'http://127.0.0.1:9001',
        url: 'script/run',
        method: 'post',
        data: data
    })
}