LAPTOP-FO2T5SIU\35838 6 月之前
父节点
当前提交
1f4c465db8
共有 2 个文件被更改,包括 224 次插入182 次删除
  1. 223 181
      src/views/parkAssets/component/uploadCost.vue
  2. 1 1
      src/views/singleLogin/ssoLogin.vue

+ 223 - 181
src/views/parkAssets/component/uploadCost.vue

@@ -455,194 +455,236 @@ export default {
             }
         },
         downloadGroupTemplate() {
-            const outData = []
-            const title = []
-            title.push('楼盘/小区名称')
-            title.push('性质')
-            title.push('预销售许可证编号')
-            title.push('开发公司')
-            title.push('总建筑面积(㎡)')
-            title.push('总用地面积(㎡)')
-            title.push('立项批文')
-            title.push('工程规划许可证')
-            title.push('施工许可证')
-            title.push('土地证号')
-            title.push('用地许可证号')
-            title.push('容积率')
-            title.push('绿化率')
-            title.push('标准单价')
-            title.push('超标单价')
-            title.push('楼盘面积测绘状态')
-            title.push('楼盘销售状态')
-            title.push('行政区划')
-            title.push('详细地址')
-            title.push('备注')
-
-            outData.push(title)
-            const outSize = []
-            title.forEach(item => {
-                if (item.length > 4) {
-                    outSize.push({
-                        wch: 30
-                    })
-                } else {
-                    outSize.push({
-                        wch: 15
-                    })
-                }
-            })
-            let fileName = '模板'
-            if (this.importTitle.includes('批量导入')) {
-                fileName = '楼盘导入模版'
-            }
-            // if (this.importTitle.includes('批量更新')) {
-            //     fileName = '更新模板'
+            // const outData = []
+            // const title = []
+            // title.push('楼盘/小区名称')
+            // title.push('性质')
+            // title.push('预销售许可证编号')
+            // title.push('开发公司')
+            // title.push('总建筑面积(㎡)')
+            // title.push('总用地面积(㎡)')
+            // title.push('立项批文')
+            // title.push('工程规划许可证')
+            // title.push('施工许可证')
+            // title.push('土地证号')
+            // title.push('用地许可证号')
+            // title.push('容积率')
+            // title.push('绿化率')
+            // title.push('标准单价')
+            // title.push('超标单价')
+            // title.push('楼盘面积测绘状态')
+            // title.push('楼盘销售状态')
+            // title.push('行政区划')
+            // title.push('详细地址')
+            // title.push('备注')
+            //
+            // outData.push(title)
+            // const outSize = []
+            // title.forEach(item => {
+            //     if (item.length > 4) {
+            //         outSize.push({
+            //             wch: 30
+            //         })
+            //     } else {
+            //         outSize.push({
+            //             wch: 15
+            //         })
+            //     }
+            // })
+            // let fileName = '模板'
+            // if (this.importTitle.includes('批量导入')) {
+            //     fileName = '楼盘导入模版'
             // }
-            const ws = XLSX.utils.aoa_to_sheet(outData)
-            ws['!cols'] = outSize
-            ws['!rows'] = []
-            const wb = XLSX.utils.book_new()
-            XLSX.utils.book_append_sheet(wb, ws, fileName)
-            const tmpDown = new Blob([
-                this.s2ab(
-                    XLSXStyle.write(wb, {
-                        bookType: 'xlsx',
-                        bookSST: true,
-                        type: 'binary',
-                        cellStyles: true
-                    })
-                )
-            ])
-            const elink = document.createElement('a')
-            elink.download = decodeURIComponent(fileName + '.xlsx')
-            elink.style.display = 'none'
-            elink.href = URL.createObjectURL(tmpDown)
-            document.body.appendChild(elink)
-            elink.click()
-            URL.revokeObjectURL(elink.href) // 释放URL 对象
-            document.body.removeChild(elink)
+            // // if (this.importTitle.includes('批量更新')) {
+            // //     fileName = '更新模板'
+            // // }
+            // const ws = XLSX.utils.aoa_to_sheet(outData)
+            // ws['!cols'] = outSize
+            // ws['!rows'] = []
+            // const wb = XLSX.utils.book_new()
+            // XLSX.utils.book_append_sheet(wb, ws, fileName)
+            // const tmpDown = new Blob([
+            //     this.s2ab(
+            //         XLSXStyle.write(wb, {
+            //             bookType: 'xlsx',
+            //             bookSST: true,
+            //             type: 'binary',
+            //             cellStyles: true
+            //         })
+            //     )
+            // ])
+            // const elink = document.createElement('a')
+            // elink.download = decodeURIComponent(fileName + '.xlsx')
+            // elink.style.display = 'none'
+            // elink.href = URL.createObjectURL(tmpDown)
+            // document.body.appendChild(elink)
+            // elink.click()
+            // URL.revokeObjectURL(elink.href) // 释放URL 对象
+            // document.body.removeChild(elink)
+            axios({
+                headers: {
+                    'MVVM-Key': String(new Date().getTime()),
+                    xx: 'anything'
+                },
+                method: 'post',
+                url: constant.BASE_URI + '/ParkInfoController/downLoadTemplate',
+                responseType: 'blob',
+                data: this.tableData
+            }).then(res => {
+                this.downloadExcel(res.data, '楼盘导入模版.xlsx')
+            }).catch((err) => {
+                console.log(err)
+            })
         },
         downloadFQTemplate() {
-            const outData = []
-            const title = []
-            title.push('楼盘/小区名称')
-            title.push('分期名称')
-            title.push('房屋买卖单价(元/㎡)')
-            title.push('物业费单价(元/㎡)')
-            title.push('住宅专项维修资金(元/㎡)')
-            title.push('认购金(元)')
-            title.push('共持比例')
-            title.push('支付方式')
-            outData.push(title)
-            const outSize = []
-            title.forEach(item => {
-                if (item.length > 4) {
-                    outSize.push({
-                        wch: 30
-                    })
-                } else {
-                    outSize.push({
-                        wch: 15
-                    })
-                }
-            })
-            let fileName = '模板'
-            if (this.importTitle.includes('批量导入')) {
-                fileName = '楼盘分期导入'
-            }
-            // if (this.importTitle === '批量更新') {
-            //     fileName = '更新模板'
+            // const outData = []
+            // const title = []
+            // title.push('楼盘/小区名称')
+            // title.push('分期名称')
+            // title.push('房屋买卖单价(元/㎡)')
+            // title.push('物业费单价(元/㎡)')
+            // title.push('住宅专项维修资金(元/㎡)')
+            // title.push('认购金(元)')
+            // title.push('共持比例')
+            // title.push('支付方式')
+            // outData.push(title)
+            // const outSize = []
+            // title.forEach(item => {
+            //     if (item.length > 4) {
+            //         outSize.push({
+            //             wch: 30
+            //         })
+            //     } else {
+            //         outSize.push({
+            //             wch: 15
+            //         })
+            //     }
+            // })
+            // let fileName = '模板'
+            // if (this.importTitle.includes('批量导入')) {
+            //     fileName = '楼盘分期导入'
             // }
-            const ws = XLSX.utils.aoa_to_sheet(outData)
-            ws['!cols'] = outSize
-            ws['!rows'] = []
-            const wb = XLSX.utils.book_new()
-            XLSX.utils.book_append_sheet(wb, ws, fileName)
-            const tmpDown = new Blob([
-                this.s2ab(
-                    XLSXStyle.write(wb, {
-                        bookType: 'xlsx',
-                        bookSST: true,
-                        type: 'binary',
-                        cellStyles: true
-                    })
-                )
-            ])
-            const elink = document.createElement('a')
-            elink.download = decodeURIComponent(fileName + '.xlsx')
-            elink.style.display = 'none'
-            elink.href = URL.createObjectURL(tmpDown)
-            document.body.appendChild(elink)
-            elink.click()
-            URL.revokeObjectURL(elink.href) // 释放URL 对象
-            document.body.removeChild(elink)
+            // // if (this.importTitle === '批量更新') {
+            // //     fileName = '更新模板'
+            // // }
+            // const ws = XLSX.utils.aoa_to_sheet(outData)
+            // ws['!cols'] = outSize
+            // ws['!rows'] = []
+            // const wb = XLSX.utils.book_new()
+            // XLSX.utils.book_append_sheet(wb, ws, fileName)
+            // const tmpDown = new Blob([
+            //     this.s2ab(
+            //         XLSXStyle.write(wb, {
+            //             bookType: 'xlsx',
+            //             bookSST: true,
+            //             type: 'binary',
+            //             cellStyles: true
+            //         })
+            //     )
+            // ])
+            // const elink = document.createElement('a')
+            // elink.download = decodeURIComponent(fileName + '.xlsx')
+            // elink.style.display = 'none'
+            // elink.href = URL.createObjectURL(tmpDown)
+            // document.body.appendChild(elink)
+            // elink.click()
+            // URL.revokeObjectURL(elink.href) // 释放URL 对象
+            // document.body.removeChild(elink)
+            axios({
+                headers: {
+                    'MVVM-Key': String(new Date().getTime()),
+                    xx: 'anything'
+                },
+                method: 'post',
+                url: constant.BASE_URI + '/ParkFloorDiscController/downLoadTemplate',
+                responseType: 'blob',
+                data: this.tableData
+            }).then(res => {
+                this.downloadExcel(res.data, '楼盘分期导入模版.xlsx')
+            }).catch((err) => {
+                console.log(err)
+            })
         },
         downloadBuildTemplate() {
-            const outData = []
-            const title = []
-            title.push('楼盘/小区名称')
-            title.push('分期名称')
-            title.push('单元/楼栋号')
-            title.push('施工号')
-            title.push('总面积(㎡)')
-            title.push('住宅面积(㎡)')
-            title.push('非住宅面积(㎡)')
-            title.push('占地面积(㎡)')
-            title.push('地下面积(㎡)')
-            title.push('房号')
-            title.push('套数')
-            title.push('总层数')
-            title.push('地上层数')
-            title.push('地下层数')
-            title.push('结构')
-            title.push('行政区划')
-            title.push('地号')
-            title.push('备注')
-            title.push('标准价格参考层及差价系数备注说明')
-
-            outData.push(title)
-            const outSize = []
-            title.forEach(item => {
-                if (item.length > 4) {
-                    outSize.push({
-                        wch: 30
-                    })
-                } else {
-                    outSize.push({
-                        wch: 15
-                    })
-                }
-            })
-            let fileName = '模板'
-            if (this.importTitle.includes('批量导入')) {
-                fileName = '楼栋管理模板'
-            }
-            // if (this.importTitle === '批量更新') {
-            //     fileName = '更新模板'
+            // const outData = []
+            // const title = []
+            // title.push('楼盘/小区名称')
+            // title.push('分期名称')
+            // title.push('单元/楼栋号')
+            // title.push('施工号')
+            // title.push('总面积(㎡)')
+            // title.push('住宅面积(㎡)')
+            // title.push('非住宅面积(㎡)')
+            // title.push('占地面积(㎡)')
+            // title.push('地下面积(㎡)')
+            // title.push('房号')
+            // title.push('套数')
+            // title.push('总层数')
+            // title.push('地上层数')
+            // title.push('地下层数')
+            // title.push('结构')
+            // title.push('行政区划')
+            // title.push('地号')
+            // title.push('备注')
+            // title.push('标准价格参考层及差价系数备注说明')
+            //
+            // outData.push(title)
+            // const outSize = []
+            // title.forEach(item => {
+            //     if (item.length > 4) {
+            //         outSize.push({
+            //             wch: 30
+            //         })
+            //     } else {
+            //         outSize.push({
+            //             wch: 15
+            //         })
+            //     }
+            // })
+            // let fileName = '模板'
+            // if (this.importTitle.includes('批量导入')) {
+            //     fileName = '楼栋管理模板'
             // }
-            const ws = XLSX.utils.aoa_to_sheet(outData)
-            ws['!cols'] = outSize
-            ws['!rows'] = []
-            const wb = XLSX.utils.book_new()
-            XLSX.utils.book_append_sheet(wb, ws, fileName)
-            const tmpDown = new Blob([
-                this.s2ab(
-                    XLSXStyle.write(wb, {
-                        bookType: 'xlsx',
-                        bookSST: true,
-                        type: 'binary',
-                        cellStyles: true
-                    })
-                )
-            ])
-            const elink = document.createElement('a')
-            elink.download = decodeURIComponent(fileName + '.xlsx')
-            elink.style.display = 'none'
-            elink.href = URL.createObjectURL(tmpDown)
-            document.body.appendChild(elink)
-            elink.click()
-            URL.revokeObjectURL(elink.href) // 释放URL 对象
-            document.body.removeChild(elink)
+            // // if (this.importTitle === '批量更新') {
+            // //     fileName = '更新模板'
+            // // }
+            // const ws = XLSX.utils.aoa_to_sheet(outData)
+            // ws['!cols'] = outSize
+            // ws['!rows'] = []
+            // const wb = XLSX.utils.book_new()
+            // XLSX.utils.book_append_sheet(wb, ws, fileName)
+            // const tmpDown = new Blob([
+            //     this.s2ab(
+            //         XLSXStyle.write(wb, {
+            //             bookType: 'xlsx',
+            //             bookSST: true,
+            //             type: 'binary',
+            //             cellStyles: true
+            //         })
+            //     )
+            // ])
+            // const elink = document.createElement('a')
+            // elink.download = decodeURIComponent(fileName + '.xlsx')
+            // elink.style.display = 'none'
+            // elink.href = URL.createObjectURL(tmpDown)
+            // document.body.appendChild(elink)
+            // elink.click()
+            // URL.revokeObjectURL(elink.href) // 释放URL 对象
+            // document.body.removeChild(elink)
+            axios({
+                headers: {
+                    'MVVM-Key': String(new Date().getTime()),
+                    xx: 'anything'
+                },
+                method: 'post',
+                url: constant.BASE_URI + '/MnpBuildingController/downLoadTemplate',
+                responseType: 'blob',
+                data: this.tableData
+            }).then(res => {
+                this.downloadExcel(res.data, '楼盘楼栋导入模版.xlsx')
+            }).catch((err) => {
+                console.log(err)
+            })
         },
         downloadRoomTemplate() {
             const outData = []

+ 1 - 1
src/views/singleLogin/ssoLogin.vue

@@ -17,7 +17,7 @@ export default {
     watch: {},
     created() {
         alert(this.$route.query)
-        console.log(this.$route)
+        console.log('this.$route', this.$route)
         // 第三方平台登录
         // this.getLoginByToken()
     },