Commit d49db806 by zhuxiaomei

附件

parent f6aca89b
NODE_ENV=production NODE_ENV=production
VUE_APP_BASE_URL=http://api.patzn.com VUE_APP_BASE_URL=http://api.dev.patzn.com:7000
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
}, },
"globals": { "globals": {
"BMap": true, "BMap": true,
"AMap": true,
"plus": true "plus": true
}, },
"rules": {} "rules": {}
......
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
* 加载 * 加载
*/ */
import Vue from 'vue' import Vue from 'vue'
import { Toast } from 'vant';
Vue.use(Toast);
function toasts(message) { function toasts(message) {
/*todo 请求接口之后的反馈*/ Toast(message);
console.log(message, Vue)
} }
var toast = { var toast = {
......
...@@ -221,8 +221,22 @@ ...@@ -221,8 +221,22 @@
this.$router.push({path: '/sampling_list/sampling_list_add', query: {id: item.id}}) this.$router.push({path: '/sampling_list/sampling_list_add', query: {id: item.id}})
} }
}, },
_print() { _print(item) {
/*todo 蓝牙打印*/ //调用第三放程序打开指定文件(必须是本地路径)
this.$toast.loading({
message: '加载中...',
forbidClick: true,
});
var dtask = plus.downloader.createDownload(
this.$global.baseURL + '/drs/v1/sampling_summary/export_sampling?id=' + item.id, {}, (d, status) => {
if (status == 200) {
plus.runtime.openFile(d.filename);//cn.wps.moffice_eng-----wps的包名
}
this.$toast.clear();
});
dtask.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
dtask.setRequestHeader('accessToken', localStorage.getItem('accessToken'));
dtask.start();
}, },
_del(ids) { _del(ids) {
if (ids.length === 0) { if (ids.length === 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment