// 自执行函数结构体 // !触发执行,同时对函数的返回值取反 //this通常指向全局对象window //代码首先检查当前环境是否支持commonjs模块系统,如果支持就通过module.exports=t(e)将函数t执行结果导出为模块的输出 //接着检查是否支持amd模块系统,如果支持就调用define(t,e)来定义模块 // !(function(e,t){ // })(this,function(){ // }) !(function (e, t) { //判断条件开始 "object" == typeof exports && "undefined" != typeof module ? (module.exports = t(e)) : "function" == typeof define && define.amd ? define(t, e) : ((e = "undefined" != typeof globalThis ? globalThis : e || self).apis = t(e)); //判断条件结束 })(this, function (scope) { if (!scope.http) scope.require("/scripts/http_stream.js"); { return { // 数据传输速速 getDataSpeed() { return http.request({ url: "/data_speed", method: "get" }); }, //获取文件下载速度 GetDownloadSpeed() { return http.request({ url: "/download_speed", method: "get" }); }, // 创建存储,设置是否覆盖存储模式 createStorage(data) { return http.request({ url: "/set_savesataparam", method: "post", data }); }, // 存储进度 storageProgress(params) { return http.request({ url: "/storage_progress", method: "get", params }); }, // 取消存储 abortStorage(data) { return http.request({ url: "/abort_storage", method: "post", data }); }, abortDowload(data) { return http.request({ url: "/abort_download", method: "post", data }); }, // 下载存储文件 downloadStorage(params = {}) { let { fileId, fileName, validFileSize } = params.row; fileName = vm.getFileName(params); http.download({ url: "/download_storage", fileName, validFileSize, params: { fileId: fileId, fileName, validFileSize },row:params.row}); return Promise.resolve({}); // return http.request({url:"/download_storage",method:"get",params}); }, // 获取文件列表 storageFileList(data) { return http.request({ url: "/storage_file_list", method: "post", data }); }, // 设置参考类型 setReferClock(data) { return http.request({ url: "/refer_clock", method: "post", data }); }, // 获取参考类型 getReferClock(params = {}) { return http.request({ url: "/refer_clock", method: "get", params }); }, // 设置信号衰减 setSignalAtten(data) { return http.request({ url: "/signal_atten", method: "post", data }); }, // 获取信号衰减 getSignalAtten(params = {}) { return http.request({ url: "/signal_atten", method: "get", params }); }, // 设置 工作模式 setWorkMode(data) { return http.request({ url: "/work_mode", method: "post", data }); }, // 获取 工作模式 getWorkMode() { return http.request({ url: "/work_mode", method: "get" }); }, // 设置宽带FFT参数 setKDFFTParams(data) { return http.request({ url: "/kd_fft_params", method: "post", data }); }, // 获取宽带FFT参数 getKDFFTParams() { return http.request({ url: "/kd_fft_params", method: "get" }); }, // 设置 扫频参数 setRfModeParams(data) { return http.request({ url: "/rf_mode_params", method: "post", data }); }, // 获取 扫频参数 getRfModeParams() { return http.request({ url: "/rf_mode_params", method: "get" }); }, // 设置 定频参数 setIfModeParams(data) { return http.request({ url: "/if_mode_params", method: "post", data }); }, // 获取 定频参数 getIfModeParams() { return http.request({ url: "/if_mode_params", method: "get" }); }, // 设置 窄带参数 setNarrowBandParams(data) { return http.request({ url: "/narrow_band_params", method: "post", data }); }, // 获取 窄带参数 getNarrowBandParams() { return http.request({ url: "/narrow_band_params", method: "get" }); }, // 获取 设备状态 getDeviceState() { return http.request({ url: "/device_state", method: "get" }); }, // 筛选文件列表 queryFileList(data) { return http.request({ url: "/storage_file_list", method: "post", data }); }, //获取sata剩余存储空间 getSataUsefull() { return http.request({ url: "/sata_useful", method: "get" }); }, //设置扫频模式下像素抽取参数 setFFTPixEtracteParam(data) { return http.request({ url: "/fftpix_extract", method: "post", data }); }, //获取扫频模式下像素抽取参数 getFFTPixEtracteParam() { return http.request({ url: "/fftpix_extract", method: "get" }); }, //设置是否停止显示扫频与定频 setDataSwitch(data) { return http.request({ url: "/data_switch", method: "post", data }); }, //设置文件的备注信息 SetFileRemark(data) { return http.request({ url: "/file_remark", method: "post", data }); }, //获取扫频与定频是否工作的开关 getDataSwitch() { return http.request({ url: "/data_switch", method: "get" }); }, //获取文件信息 getFileInfo(params = {}) { return http.request({ url: "/file_info", method: "get", params }); }, //设置系统时间 SetSysTime(data) { return http.request({ url: "/set_systime", method: "post", data }); }, //设置寄存器 SetAddr(data) { return http.request({ url: "/set_addr_val", method: "post", data }); }, //获取寄存器 GetAddr(data) { return http.request({ url: "/get_addr_val", method: "get", data }); }, //设置板载中频 SetIFFreq(data) { return http.request({ url: "/set_if_freq", method: "post", data }); }, //获取板载中频 GetIFFreq(data) { return http.request({ url: "/get_if_freq", method: "get", data }); }, createStorageTemp() { return http.request({ url: "/temp_storage", method: "get" }); }, socket() { return http.socket({ url: "/ws" }); } } } } );