From 4f969102916872db85296709d700ff387fe3a0c2 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期三, 21 十二月 2022 19:59:52 +0800 Subject: [PATCH] 专题图,数据上传 --- src/views/exportMap/index.vue | 34 +++++++++++++++++++++++++--------- 1 files changed, 25 insertions(+), 9 deletions(-) diff --git a/src/views/exportMap/index.vue b/src/views/exportMap/index.vue index d70b28b..b46bca5 100644 --- a/src/views/exportMap/index.vue +++ b/src/views/exportMap/index.vue @@ -17,7 +17,7 @@ ><i class="el-icon-s-operation"></i ></el-link> </el-form-item> - <el-form-item label="姣斾緥灏�"> + <el-form-item> <el-select v-model="value" placeholder="璇烽�夋嫨"> <el-option v-for="item in options" @@ -267,8 +267,16 @@ tableData: [], exportable: [], multipleSelection: [], - options: [{ label: '1:20涓�', value: '1:20涓�' }], - value: '1:20涓�', + options: [ + { label: 'A0', value: 'A0' }, + { label: 'A1', value: 'A1' }, + { label: 'A2', value: 'A2' }, + { label: 'A3', value: 'A3' }, + { label: 'A4', value: 'A4' }, + { label: 'A5', value: 'A5' }, + { label: 'A6', value: 'A6' }, + ], + value: 'A4', data: [ { id: 1, @@ -395,17 +403,26 @@ this.count = data.count; }, - + getYMD() { + let myDate = new Date(); + let myYear = myDate.getFullYear(); //鑾峰彇瀹屾暣鐨勫勾浠�(4浣�,1970-????) + let myMonth = myDate.getMonth() + 1; //鑾峰彇褰撳墠鏈堜唤(0-11,0浠h〃1鏈�) + let myToday = myDate.getDate(); //鑾峰彇褰撳墠鏃�(1-31) + myMonth = myMonth > 9 ? myMonth : '0' + myMonth; + myToday = myToday > 9 ? myToday : '0' + myToday; + let nowDate = 'V' + myYear + myMonth + myToday; + return nowDate; + }, setExportMapLayer(res) { var token = '?token=' + getToken(); var data = { token: token.replace('?token=', ''), title: this.form.name, - pageSize: 'A4', + pageSize: this.value, province: '灞变笢鐪�', - scale: this.value, + scale: '1:20涓�', resolution: '20绫�', - date: '2022.11.14', + date: this.getYMD(), layers: res.toString(), rotation: 0, xmin: this.layerExtent.xmin, @@ -511,10 +528,9 @@ } if (this.isActive) { val_data.push('鐭㈤噺鍥�'); - val_data.push('鐭㈤噺娉ㄨ'); } else { - val_data.push('褰卞儚'); val_data.push('褰卞儚娉ㄨ'); + val_data.push('褰卞儚鍥�'); } this.setExportMapLayer(val_data); this.showMapApply = false; -- Gitblit v1.9.3