Commit cb9f5427 authored by xinzhedeai's avatar xinzhedeai

feature: 导出功能数据字段调整。用于客户演示。node-sass兼容性调整

parent da787828
const BASEURL = 'http://192.168.2.14:8088'; // const BASEURL = 'http://192.168.2.14:8088';
// const BASEURL = 'https://ltpk.kuangshanzhixing.cn:8088'; const BASEURL = 'https://ltpk.kuangshanzhixing.cn:8088';
const REQUESTIMEOUT = 30000; const REQUESTIMEOUT = 30000;
export { export {
BASEURL, BASEURL,
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
"sassImplementationName": "node-sass",
"app-plus" : { "app-plus" : {
"usingComponents" : true, "usingComponents" : true,
"nvueCompiler" : "uni-app", "nvueCompiler" : "uni-app",
......
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
} }
}); });
}, },
async exportExcel() { // 导出excel async exportExcelOld() { // 导出excel 该版本为原来的正式功能版本
let res = await getExportData({ let res = await getExportData({
}) })
if (res) { if (res) {
...@@ -197,6 +197,51 @@ ...@@ -197,6 +197,51 @@
}) })
} }
}, },
async exportExcel() { // 导出excel 检查专用版本
let res = await getExportData({
})
if (res) {
console.log('export', res)
const ExcelData = res.map((item)=>{
delete item.userPhone;
delete item.productId;
return item
}); //列表数据
this.loading = false
const fileName='炮孔测量数据导出'
const header = ['productName', 'artilleryAreaName', 'cannonHoleArrayNum',
'cannonHoleNum', 'expectedDepth',
'relDepth', 'waterDepth',
'chargeDepth', 'chargeWaterDepth','relTemperature',
'remark',
];
const headerName = {
productName: '工程名称',
artilleryAreaName: '爆区名称',
cannonHoleArrayNum: '炮孔排号',
cannonHoleNum: '炮孔孔号',
expectedDepth: '设计孔深',
relDepth: '实测孔深',
waterDepth: '实测水深',
chargeDepth: '装药后孔深',
chargeWaterDepth: '装药后水深',
relTemperature: '实测温度',
remark: '备注'
};
showCustomToast({
title: "导出中,请稍后...",
duration: 3000,
})
XLSX.excel_exprot(ExcelData, header, headerName, fileName)
}else{
showCustomToast({
title: '暂无数据'
})
}
},
navTo(flag) { navTo(flag) {
if (flag === 'export') { if (flag === 'export') {
this.exportData2Excel() this.exportData2Excel()
......
{ {
"appid": "wx41f6d06aca0687c3", "appid": "wx41f6d06aca0687c3",
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "3.7.3", "libVersion": "3.9.0",
"packOptions": { "packOptions": {
"ignore": [], "ignore": [],
"include": [] "include": []
...@@ -24,5 +24,6 @@ ...@@ -24,5 +24,6 @@
"editorSetting": { "editorSetting": {
"tabIndent": "insertSpaces", "tabIndent": "insertSpaces",
"tabSize": 2 "tabSize": 2
} },
"isGameTourist": false
} }
\ No newline at end of file
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