| | |
| | | <el-popover> |
| | | <p>导入点位只做更新操作</p> |
| | | <div class="bottom_"> |
| | | <el-select @change="getUnitContractTime" v-model="importUnitId" size="small" placeholder="运维单位"> |
| | | <el-select @change="getUnitContractTime" v-model="importUnitId" size="small" placeholder="更换运维单位"> |
| | | <el-option v-for="unit in unitList" :key="unit.id" :label="unit.value" :value="unit.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | |
| | | v-model="ywTimes" |
| | | type="daterange" |
| | | range-separator="至" |
| | | start-placeholder="运维开始时间" |
| | | end-placeholder="运维结束时间"> |
| | | start-placeholder="更换运维时间" |
| | | end-placeholder="更换运维时间"> |
| | | </el-date-picker> |
| | | </div> |
| | | <div class="bottom_"> |
| | | <el-checkbox v-model="provinceTag">重点点位</el-checkbox> |
| | | <el-checkbox v-model="importantTag">省厅</el-checkbox> |
| | | <el-checkbox v-model="importantCommandImageTag">重点指挥图像</el-checkbox> |
| | | </div> |
| | | <div class="bottom_"> |
| | | <el-upload |
| | |
| | | </el-upload> |
| | | </div> |
| | | <div> |
| | | <el-button class="bottom_" type="primary" size="small" v-model="upload" :disabled="! importUnitId || ! importFile || ! this.ywTimes || this.ywTimes.length < 2" @click="handleImport" |
| | | <el-button class="bottom_" type="primary" size="small" v-loading="upload" @click="handleImport" |
| | | v-hasPermi="['point:import']">导入</el-button> |
| | | </div> |
| | | <el-button type="primary" size="mini" plain icon="el-icon-top" slot="reference">导入点位</el-button> |
| | |
| | | }, |
| | | // 点位导入 |
| | | handleImport() { |
| | | if (! this.ywTimes || this.ywTimes.length < 2) { |
| | | this.$message.error("请选择运维时间") |
| | | return |
| | | } |
| | | this.upload =true; |
| | | let formData = new FormData() |
| | | formData.append("file", this.importFile) |
| | | formData.append("startTime", this.ywTimes[0]) |
| | | formData.append("endTime", this.ywTimes[1]) |
| | | formData.append("provinceTag", this.provinceTag) |
| | | formData.append("importantTag", this.importantTag) |
| | | formData.append("importantCommandImageTag", this.importantCommandImageTag) |
| | | importData(formData, this.importUnitId).then(res => { |
| | | formData.append("startTime", this.ywTimes[0] ? this.ywTimes[0] : '') |
| | | formData.append("endTime", this.ywTimes[1] ? this.ywTimes[1] : '') |
| | | formData.append("unitId", this.importUnitId ? this.importUnitId : -1) |
| | | importData(formData).then(res => { |
| | | this.$message.success("导入成功") |
| | | this.upload = false |
| | | this.getList() |