From 5bbcdadbb201985f7bafcc60bd679d9e6f0e4229 Mon Sep 17 00:00:00 2001 From: guoshipeng <3194674006@qq.com> Date: Mon, 12 Dec 2022 13:24:57 +0800 Subject: [PATCH] 1.浑南区走航车报告下载;2.菜单分配可以选择某个子菜单,但必须选择实时风场页面;3.空气质量报告模板更新; --- src/views/dailyreport/index.vue | 591 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 575 insertions(+), 16 deletions(-) diff --git a/src/views/dailyreport/index.vue b/src/views/dailyreport/index.vue index a8d1a51..aba7a46 100644 --- a/src/views/dailyreport/index.vue +++ b/src/views/dailyreport/index.vue @@ -28,7 +28,15 @@ end-placeholder="������������" :picker-options="pickerOptions1"> </el-date-picker> - <el-select v-model="carInput" clearable placeholder="������������������" style="width: 180px;display: inline-block"> + <el-select v-if="equipChoose1==='car'" v-model="carInput" clearable placeholder="������������������" style="width: 180px;display: inline-block"> + <el-option + v-for="(item,index) in carMac" + :key="index" + :label="item.name" + :value="item.mac"> + </el-option> + </el-select> + <el-select v-else v-model="planSelect" clearable placeholder="������������������" style="width: 180px;display: inline-block"> <el-option v-for="(item,index) in carMac" :key="index" @@ -38,6 +46,7 @@ </el-select> <el-button type="primary" @click="selectExport" style="margin-right: 10px;">������</el-button> <el-button type="primary" @click="upImgBtn" style="margin-left: 0">������</el-button> +<!-- <el-button type="primary" @click="exportDom">������demo</el-button>--> </div> <div class="dailyDown" style="overflow-y: auto"> <el-card class="boxCard"> @@ -61,7 +70,8 @@ </el-table-column> <el-table-column label="������"> <template slot-scope="scope"> - <el-button type="text" size="medium" @click="expReport(scope.row)">������</el-button> + <el-button v-if="equipChoose1==='car'" type="text" size="medium" @click="expReport(scope.row)">������</el-button> + <el-button v-else type="text" size="medium" @click="exUAVReport(scope.row)">������</el-button> </template> </el-table-column> </el-table> @@ -105,7 +115,7 @@ <el-input v-if="equipChoose2==='car'" v-model="areaInput3" placeholder="���������������������" clearable style="width: 180px;display: inline-block"></el-input> <el-input v-else v-model="planInput2" placeholder="���������������������" clearable style="width: 180px;display: inline-block"></el-input> <el-button v-if="equipChoose2!=='car'" type="primary" @click="innerVisible = true">������������</el-button> - <div class="dateTimeBox"> + <div class="dateTimeBox" v-if="equipChoose2==='car'"> <div> <el-date-picker v-model="value2" @@ -141,6 +151,13 @@ @change="value4Change"> </el-date-picker> </div> + </div> + <div v-else> + <el-date-picker + v-model="planUpTime" + type="date" + placeholder="������������"> + </el-date-picker> </div> </div> <div v-if="equipChoose2==='car'" class="uploadDiv" style="width:90%;overflow: auto;display: flex;flex-wrap: wrap;justify-content: space-between"> @@ -271,13 +288,125 @@ <div slot="tip" class="el-upload__tip">���������������������</div> </el-upload> </div> + <div v-else class="uploadDiv" style="width:90%;overflow: auto;display: flex;flex-wrap: wrap;justify-content: space-between"> + <el-upload + class="upload-demo" + action="" + ref="uploadPlan1" + :on-change="handleChangePlan1" + :on-remove="handleRemovePlan1" + :file-list="fileListPlan1" + multiple + :auto-upload="false"> + <el-button slot="trigger" type="primary" size="small">������������</el-button> + <div slot="tip" class="el-upload__tip">������������������������������������</div> + </el-upload> + <el-upload + class="upload-demo" + action="" + ref="uploadPlan2" + :on-change="handleChangePlan2" + :on-remove="handleRemovePlan2" + :file-list="fileListPlan2" + multiple + :auto-upload="false"> + <el-button slot="trigger" type="primary" size="small">������������</el-button> + <div slot="tip" class="el-upload__tip">���������������������������������</div> + </el-upload> + <el-upload + class="upload-demo" + action="" + ref="uploadPlan3" + :on-change="handleChangePlan3" + :on-remove="handleRemovePlan3" + :file-list="fileListPlan3" + multiple + :auto-upload="false"> + <el-button slot="trigger" type="primary" size="small">������������</el-button> + <div slot="tip" class="el-upload__tip">������������������������������������������������</div> + </el-upload> + <el-upload + class="upload-demo" + action="" + ref="uploadPlan4" + :on-change="handleChangePlan4" + :on-remove="handleRemovePlan4" + :file-list="fileListPlan4" + multiple + :auto-upload="false"> + <el-button slot="trigger" type="primary" size="small">������������</el-button> + <div slot="tip" class="el-upload__tip">���������O3���������������������������</div> + </el-upload> + <el-upload + class="upload-demo" + action="" + ref="uploadPlan5" + :on-change="handleChangePlan5" + :on-remove="handleRemovePlan5" + :file-list="fileListPlan5" + multiple + :auto-upload="false"> + <el-button slot="trigger" type="primary" size="small">������������</el-button> + <div slot="tip" class="el-upload__tip">���������O3������������������������</div> + </el-upload> + <el-upload + class="upload-demo" + action="" + ref="uploadPlan6" + :on-change="handleChangePlan6" + :on-remove="handleRemovePlan6" + :file-list="fileListPlan6" + multiple + :auto-upload="false"> + <el-button slot="trigger" type="primary" size="small">������������</el-button> + <div slot="tip" class="el-upload__tip">���������PM10���������������������������</div> + </el-upload> + <el-upload + class="upload-demo" + action="" + ref="uploadPlan7" + :on-change="handleChangePlan7" + :on-remove="handleRemovePlan7" + :file-list="fileListPlan7" + multiple + :auto-upload="false"> + <el-button slot="trigger" type="primary" size="small">������������</el-button> + <div slot="tip" class="el-upload__tip">���������PM10������������������������</div> + </el-upload> + <el-upload + class="upload-demo" + action="" + ref="uploadPlan8" + :on-change="handleChangePlan8" + :on-remove="handleRemovePlan8" + :file-list="fileListPlan8" + multiple + :auto-upload="false"> + <el-button slot="trigger" type="primary" size="small">������������</el-button> + <div slot="tip" class="el-upload__tip">���������SO2���������������������������</div> + </el-upload> + <el-upload + class="upload-demo" + action="" + ref="uploadPlan9" + :on-change="handleChangePlan9" + :on-remove="handleRemovePlan9" + :file-list="fileListPlan9" + multiple + :auto-upload="false"> + <el-button slot="trigger" type="primary" size="small">������������</el-button> + <div slot="tip" class="el-upload__tip">���������SO2������������������������</div> + </el-upload> + </div> <div slot="footer" class="dialog-footer"> <el-button @click="openBox = false">��� ���</el-button> <el-button type="primary" @click="submitImgs" :disabled ="isDisplay">��� ���</el-button> </div> <el-dialog class="innerDialog" - width="60%" + width="70%" + height="90%" + margin-top="7vh" title="������ Dialog" :visible.sync="innerVisible" append-to-body> @@ -289,6 +418,7 @@ <script> import { exportDocx } from '@/utils/exportImageFile' +import { exportUAVImage } from '@/utils/exportUAVImage' import requestObj from '@/utils/request' import Map from '@/components/PlanMap/Map' export default { @@ -300,16 +430,25 @@ cityOptions: [{ value: 'gx', label: '���������' + }, { + value: 'hn', + label: '���������' }], cityOptions2: [{ value: 'gx', label: '���������' + }, { + value: 'hn', + label: '���������' }], equipChoose1: 'car', equipChoose2: 'car', equipOptions1: [{ value: 'car', label: '���������' + }, { + value: 'plan', + label: '���������' }], equipOptions2: [{ value: 'car', @@ -326,6 +465,7 @@ value2: [new Date(), new Date()], // ������������1 value3: [], // ������������2 value4: [], // ������������3 + planUpTime: new Date(), // ��������������������� pickerOptions1: { shortcuts: [{ text: '������������', @@ -480,7 +620,28 @@ planInput: '', // ��������������������������� planInput2: '', // ��������������������������� innerVisible: false, // ������������������������ - radioSeven: 'PM2.5' + radioSeven: 'PM2.5', + fileListPlan1: [], + fileListPlan2: [], + fileListPlan3: [], + fileListPlan4: [], + fileListPlan5: [], + fileListPlan6: [], + fileListPlan7: [], + fileListPlan8: [], + fileListPlan9: [], + fileBase64Plan1: [], + fileBase64Plan2: [], + fileBase64Plan3: [], + fileBase64Plan4: [], + fileBase64Plan5: [], + fileBase64Plan6: [], + fileBase64Plan7: [], + fileBase64Plan8: [], + fileBase64Plan9: [], + UAVReport: { + fileLists: [], + }, // ��������������� } }, watch: { @@ -503,23 +664,87 @@ if (n === null) { this.value4 = [] } - } + }, + equipChoose1(n, o) { + if (n !== o) { + this.tableData = [] + } + }, + cityChoose(n, o) { + if (n !== o) { + this.tableData = [] + } + }, + deep: true, + immediate: true }, created() { + // ��������������� this.$request({ url: 'cruiser/selectCruisers', method: 'get' }).then(res => { this.carMac = res.data + this.planMac = res.data // ������������������������������������ }).catch(err => { console.log(err) }) + // ��������������� + // this.$request({ + // url: 'uav/getUavDaily', + // method: 'get' + // }).then(res => { + // this.planMac = res.data + // }).catch(err => { + // console.log(err) + // }) }, methods: { + // ������������ + exportDom() { + // const url1 = `http://47.99.64.149:8081//static/img/7f633687-8321-4f89-bffc-9a52f94cfb77.jpg` + // const url2 = `http://47.99.64.149:8081//static/img/7f633687-8321-4f89-bffc-9a52f94cfb77.jpg` + // const url3 = `http://47.99.64.149:8081//static/img/7f633687-8321-4f89-bffc-9a52f94cfb77.jpg` + // const url4 = `http://47.99.64.149:8081//static/img/7f633687-8321-4f89-bffc-9a52f94cfb77.jpg` + // this.UAVReport.fileLists[1] = [url1, url2] + // this.UAVReport.fileLists[3] = [url3, url4, url3] + const baseUrl = `${requestObj.baseUrl}/static/img/` + var images = [['7f633687-8321-4f89-bffc-9a52f94cfb77.jpg', '7f633687-8321-4f89-bffc-9a52f94cfb77.jpg'], [], [], ['7f633687-8321-4f89-bffc-9a52f94cfb77.jpg', '7f633687-8321-4f89-bffc-9a52f94cfb77.jpg', '7f633687-8321-4f89-bffc-9a52f94cfb77.jpg'], [], [], [], []] + var info = 0 + var num = 0 + for (let i = 0; i < images.length; i++) { + if (!this.UAVReport.fileLists[i]) this.UAVReport.fileLists[i] = [] + if (images[i].length) { + num++ + info += images[i].length + if (i === 0) this.UAVReport.num1 = images[i].length + else if (i === 1) this.UAVReport.num2 = images[i].length + else if (i === 2) this.UAVReport.num3 = images[i].length + else if (i === 3) this.UAVReport.num4 = images[i].length + else if (i === 4) this.UAVReport.num5 = images[i].length + else if (i === 5) this.UAVReport.num6 = images[i].length + else if (i === 6) this.UAVReport.num7 = images[i].length + for (let j = 0; j < images[i].length; j++) { + this.UAVReport.fileLists[i].push(baseUrl + images[i][j]) + } + } + } + this.UAVReport.index = info + this.UAVReport.num = num + console.log(this.UAVReport, 'this.UAVReport') + exportUAVImage('/UAVReport.docx', this.UAVReport, `���������������������.docx`) + }, // ��������������������� selectExport() { this.selectTime = this.newTime(this.value1) if (this.cityChoose && this.equipChoose1 && this.selectTime[1]) { + // ���������������or��������� + var mac = '' + if (this.equipChoose1 === 'car') { + mac = this.carInput + } else { + mac = this.planSelect + } this.$request({ url: '/cruiser/selectDaily', method: 'get', @@ -528,7 +753,7 @@ type: this.equipChoose1, startTime: this.selectTime[0], endTime: this.selectTime[1], - mac: this.carInput + mac: mac } }).then(res => { this.carInput2 = this.carInput @@ -540,7 +765,11 @@ } info.map(v => { var time = v.time.split('-').join('') - v.name = `���������������������������${time}` + if (this.cityChoose === 'gx') { + v.name = `���������������������������${time}` + } else { + v.name = `���������������������������${time}` + } }) info.sort((a, b) => { return b.time.split('-').join('') - a.time.split('-').join('') }) this.tableData = info @@ -553,7 +782,7 @@ }, // ������������ submitImgs() { - if(this.equipChoose2 === 'car') { + if (this.equipChoose2 === 'car') { // ��������������������� this.tableData = [] this.isDisplay = true this.numList = [this.fileLists[0].length, this.fileLists[1].length, this.fileLists[2].length, this.fileLists[3].length, this.fileLists[4].length, this.fileLists[5].length, this.fileLists[6].length, this.fileLists[7].length, this.fileLists[8].length] @@ -563,7 +792,7 @@ num++ } }) - if (this.cityOptions2 && this.value2.length === 2 && this.equipChoose2 && this.carInput2 && this.areaInput3 && this.isDisplay && (num === 0 || num === this.fileLists.length)) { + if (this.cityChoose2 && this.value2.length === 2 && this.equipChoose2 && this.carInput2 && this.areaInput3 && this.isDisplay && (num === 0 || num === this.fileLists.length)) { this.upTime = this.newTime(this.value2, 'submit') const formData = new FormData() formData.append(`code`, this.cityChoose2) @@ -601,8 +830,14 @@ var s = new Date(res.data.time) // ��������������������������������� this.value1 = [s, s] this.carInput = this.carInput2 + this.equipChoose1 = this.equipChoose2 + this.cityChoose = this.cityChoose2 var reportInfo = res.data - reportInfo.name = '���������������������������' + reportInfo.time.split('-').join('') + if (this.cityChoose2 === 'gx') { + reportInfo.name = '���������������������������' + reportInfo.time.split('-').join('') + } else { + reportInfo.name = '���������������������������' + reportInfo.time.split('-').join('') + } this.tableData = [reportInfo] } else if (res.code === -47) { this.$message(res.message) @@ -617,6 +852,74 @@ this.isDisplay = false this.$message('���������������') } + } else { // ��������������������� + this.UAVUpImage() + } + }, + // ��������������������� + async UAVUpImage() { + var upObj = {} + console.log('uav������') + this.tableData = [] + this.isDisplay = true + if (this.cityChoose2 && this.equipChoose2 && this.planSelect2 && this.planInput2 && this.isDisplay) { + this.upTime = this.OneDayNew(this.planUpTime) + // ���������������base64 + await this.UAVAllImageToBase64() + upObj.fileList1 = this.fileBase64Plan1 + upObj.fileList2 = this.fileBase64Plan2 + upObj.fileList3 = this.fileBase64Plan3 + upObj.fileList4 = this.fileBase64Plan4 + upObj.fileList5 = this.fileBase64Plan5 + upObj.fileList6 = this.fileBase64Plan6 + upObj.fileList7 = this.fileBase64Plan7 + upObj.fileList8 = this.fileBase64Plan8 + upObj.fileList9 = this.fileBase64Plan9 + upObj.code = this.cityChoose2 + upObj.type = this.equipChoose2 + upObj.mac = this.planSelect2 + upObj.area = this.planInput2 + upObj.time = this.upTime + var objJson = JSON.stringify(upObj) + console.log(objJson, 'objJson') + // ������������ + this.openBox = false + this.$request({ + url: 'uav/getUavDaily', + data: { objJson: objJson }, + method: 'post' + }).then(res => { + this.isDisplay = false + if (res.code === 0) { + this.$message({ + message: '���������������', + type: 'success' + }) + // console.log(res) + // var s = new Date(res.data.time) // ��������������������������������� + // this.value1 = [s, s] + this.planSelect = this.planSelect2 + this.equipChoose1 = this.equipChoose2 + this.cityChoose = this.cityChoose2 + var reportInfo = res.data + if (this.cityChoose === 'gx') { + reportInfo.name = '���������������������������' + reportInfo.time.split('-').join('') + } else { + reportInfo.name = '���������������������������' + reportInfo.time.split('-').join('') + } + this.tableData = [reportInfo] + } else if (res.code === -47) { + this.$message(res.message) + } else { + this.$message.error('���������������') + } + }).catch(err => { + console.log(err) + this.isDisplay = false + }) + } else { + this.isDisplay = false + this.$message('���������������') } }, // ������������������������ @@ -628,7 +931,7 @@ data }) }, - // ������������ + // ��������������������� expReport(obj) { this.$request({ url: '/cruiser/loadDaily', @@ -661,7 +964,78 @@ this.sailingReport.time1 = time[1] this.sailingReport.time2 = time[2] } + if (this.cityChoose === 'gx') { + this.sailingReport.city = '���������' + } else { + this.sailingReport.city = '���������' + } exportDocx('/sailingReport.docx', this.sailingReport, `${obj.name}.docx`) + }).catch(err => { + console.log(err) + }) + }, + // ��������������������� + exUAVReport(obj) { + this.$request({ + url: '', + method: 'get', + params: { + id: obj.id + } + }).then(res => { + const baseUrl = `${requestObj.baseUrl}/static/img/` + var images = [['7f633687-8321-4f89-bffc-9a52f94cfb77.jpg', '7f633687-8321-4f89-bffc-9a52f94cfb77.jpg'], [], [], ['7f633687-8321-4f89-bffc-9a52f94cfb77.jpg', '7f633687-8321-4f89-bffc-9a52f94cfb77.jpg', '7f633687-8321-4f89-bffc-9a52f94cfb77.jpg'], [], [], [], [], [], [], [], [], [], [], [], [], []] + var info = 0 + var num = 0 + for (let i = 0; i < images.length; i++) { + if (!this.UAVReport.fileLists[i]) this.UAVReport.fileLists[i] = [] + if (images[i].length) { + num++ + info += images[i].length + if (i === 0) this.UAVReport.num1 = images[i].length + else if (i === 1) this.UAVReport.num2 = images[i].length + else if (i === 2) this.UAVReport.num3 = images[i].length + else if (i === 3) this.UAVReport.num4 = images[i].length + else if (i === 4) this.UAVReport.num5 = images[i].length + else if (i === 5) this.UAVReport.num6 = images[i].length + else if (i === 6) this.UAVReport.num7 = images[i].length + else if (i === 7) this.UAVReport.num8 = images[i].length + else if (i === 8) this.UAVReport.num9 = images[i].length + else if (i === 9) this.UAVReport.num10 = images[i].length + else if (i === 10) this.UAVReport.num11 = images[i].length + else if (i === 11) this.UAVReport.num12 = images[i].length + else if (i === 12) this.UAVReport.num13 = images[i].length + else if (i === 13) this.UAVReport.num14 = images[i].length + else if (i === 14) this.UAVReport.num15 = images[i].length + else if (i === 15) this.UAVReport.num16 = images[i].length + else if (i === 16) this.UAVReport.num17 = images[i].length + for (let j = 0; j < images[i].length; j++) { + this.UAVReport.fileLists[i].push(baseUrl + images[i][j]) + } + } + } + this.UAVReport.index = info + this.UAVReport.num = num + var data2 = obj.date.split('-') + this.UAVReport.date2 = data2[0] + '���' + data2[1] + '���' + data2[2] + '���' + var time = [] + for (let i = 0; i < res.data.code.time.length; i++) { + time.push(res.data.code.time[i]) + } + this.UAVReport.time0 = time[0] + if (time.length === 2) { + this.UAVReport.time1 = time[1] + } + if (time.length === 3) { + this.UAVReport.time1 = time[1] + this.UAVReport.time2 = time[2] + } + if (this.cityChoose === 'gx') { + this.UAVReport.city = '���������' + } else { + this.UAVReport.city = '���������' + } + exportUAVImage('/UAVReport.docx', this.UAVReport, `${obj.name}.docx`) }).catch(err => { console.log(err) }) @@ -812,8 +1186,95 @@ return arr } }, + // ������������������������������������ + OneDayNew(time) { + var date = new Date(time) + var y = date.getFullYear() + var m = date.getMonth() + 1 + m = m < 10 ? '0' + m : m + var d = date.getDate() + d = d < 10 ? '0' + d : d + return y + '-' + m + '-' + d + }, + // ������������������������base64 + async UAVAllImageToBase64() { + if (this.fileListPlan1.length > 0) { + for (let i = 0; i < this.fileListPlan1.length; i++) { + var p = this.getBase64(this.fileListPlan1[i].raw) + await p.then(res => { + this.fileBase64Plan1[i] = res + }) + } + // this.fileListPlan1 = fileListPlan1 + } + if (this.fileListPlan2.length > 0) { + for (let i = 0; i < this.fileListPlan2.length; i++) { + var p = this.getBase64(this.fileListPlan2[i].raw) + await p.then(res => { + this.fileBase64Plan2[i] = res + }) + } + } + if (this.fileListPlan3.length > 0) { + for (let i = 0; i < this.fileListPlan3.length; i++) { + var p = this.getBase64(this.fileListPlan3[i].raw) + await p.then(res => { + this.fileBase64Plan3[i] = res + }) + } + } + if (this.fileListPlan4.length > 0) { + for (let i = 0; i < this.fileListPlan4.length; i++) { + var p = this.getBase64(this.fileListPlan4[i].raw) + await p.then(res => { + this.fileBase64Plan4[i] = res + }) + } + } + if (this.fileListPlan5.length > 0) { + for (let i = 0; i < this.fileListPlan5.length; i++) { + var p = this.getBase64(this.fileListPlan5[i].raw) + await p.then(res => { + this.fileBase64Plan5[i] = res + }) + } + } + if (this.fileListPlan6.length > 0) { + for (let i = 0; i < this.fileListPlan6.length; i++) { + var p = this.getBase64(this.fileListPlan6[i].raw) + await p.then(res => { + this.fileBase64Plan6[i] = res + }) + } + } + if (this.fileListPlan7.length > 0) { + for (let i = 0; i < this.fileListPlan7.length; i++) { + var p = this.getBase64(this.fileListPlan7[i].raw) + await p.then(res => { + this.fileBase64Plan7[i] = res + }) + } + } + if (this.fileListPlan8.length > 0) { + for (let i = 0; i < this.fileListPlan8.length; i++) { + var p = this.getBase64(this.fileListPlan8[i].raw) + await p.then(res => { + this.fileBase64Plan8[i] = res + }) + } + } + if (this.fileListPlan9.length > 0) { + for (let i = 0; i < this.fileListPlan9.length; i++) { + var p = this.getBase64(this.fileListPlan9[i].raw) + await p.then(res => { + this.fileBase64Plan9[i] = res + }) + } + } + }, // ���������base64������ getBase64(file) { + // console.log(file) return new Promise(function(resolve, reject) { var reader = new FileReader() let imgResult = '' @@ -829,18 +1290,116 @@ } }) }, + // ��������������������� + handleChangePlan1(file, fileList) { + // console.log(file, fileList) + if (file.raw.type !== 'image/jpeg' && file.raw.type !== 'image/png') { + this.$refs.uploadPlan1.handleRemove(file) + this.$message.warning(`���������������������������`) + return + } + this.fileListPlan1 = fileList + }, + handleRemovePlan1(file, fileList) { + this.fileListPlan1 = fileList + }, + handleChangePlan2(file, fileList) { + if (file.raw.type !== 'image/jpeg' && file.raw.type !== 'image/png') { + this.$refs.uploadPlan1.handleRemove(file) + this.$message.warning(`���������������������������`) + return + } + this.fileListPlan2 = fileList + }, + handleRemovePlan2(file, fileList) { + this.fileListPlan2 = fileList + }, + handleChangePlan3(file, fileList) { + if (file.raw.type !== 'image/jpeg' && file.raw.type !== 'image/png') { + this.$refs.uploadPlan1.handleRemove(file) + this.$message.warning(`���������������������������`) + return + } + this.fileListPlan3 = fileList + }, + handleRemovePlan3(file, fileList) { + this.fileListPlan3 = fileList + }, + handleChangePlan4(file, fileList) { + if (file.raw.type !== 'image/jpeg' && file.raw.type !== 'image/png') { + this.$refs.uploadPlan1.handleRemove(file) + this.$message.warning(`���������������������������`) + return + } + this.fileListPlan4 = fileList + }, + handleRemovePlan4(file, fileList) { + this.fileListPlan4 = fileList + }, + handleChangePlan5(file, fileList) { + if (file.raw.type !== 'image/jpeg' && file.raw.type !== 'image/png') { + this.$refs.uploadPlan1.handleRemove(file) + this.$message.warning(`���������������������������`) + return + } + this.fileListPlan5 = fileList + }, + handleRemovePlan5(file, fileList) { + this.fileListPlan5 = fileList + }, + handleChangePlan6(file, fileList) { + if (file.raw.type !== 'image/jpeg' && file.raw.type !== 'image/png') { + this.$refs.uploadPlan1.handleRemove(file) + this.$message.warning(`���������������������������`) + return + } + this.fileListPlan6 = fileList + }, + handleRemovePlan6(file, fileList) { + this.fileListPlan6 = fileList + }, + handleChangePlan7(file, fileList) { + if (file.raw.type !== 'image/jpeg' && file.raw.type !== 'image/png') { + this.$refs.uploadPlan1.handleRemove(file) + this.$message.warning(`���������������������������`) + return + } + this.fileListPlan7 = fileList + }, + handleRemovePlan7(file, fileList) { + this.fileListPlan7 = fileList + }, + handleChangePlan8(file, fileList) { + if (file.raw.type !== 'image/jpeg' && file.raw.type !== 'image/png') { + this.$refs.uploadPlan1.handleRemove(file) + this.$message.warning(`���������������������������`) + return + } + this.fileListPlan8 = fileList + }, + handleRemovePlan8(file, fileList) { + this.fileListPlan8 = fileList + }, + handleChangePlan9(file, fileList) { + if (file.raw.type !== 'image/jpeg' && file.raw.type !== 'image/png') { + this.$refs.uploadPlan1.handleRemove(file) + this.$message.warning(`���������������������������`) + return + } + this.fileListPlan9 = fileList + }, + handleRemovePlan9(file, fileList) { + this.fileListPlan9 = fileList + }, // ������������ handleExceed(files, fileList) { this.$message.warning(`������������������ 1 ��������������������������� ${files.length} ������������������������ ${files.length + fileList.length} ���������`) }, - // ���������������upload + // ������������������������upload handleChange1(file, fileList) { // console.log(file, fileList) this.fileList1 = fileList this.fileLists[0] = fileList - // this.getBase64(file.raw).then(res => { - // console.log(res) - // }) }, handleRemove1(file, fileList) { this.fileList1 = fileList -- Gitblit v1.8.0