调整发布地图导入流程

This commit is contained in:
zyy 2020-08-21 16:38:22 +08:00
parent d026ce783f
commit e86c0b9c45
5 changed files with 18 additions and 16 deletions

View File

@ -144,7 +144,7 @@
:disabled="isTableBtnDisabled(button, scope.$index, scope.row)"
:loading="scope.row['loading'+idx]"
>
<input :id="button.id" type="file" class="file_box" accept=".json, application/json" @change="button.handleClick(scope.$index, scope.row, idx)">
<input :class="button.class" type="file" class="file_box" accept=".json, application/json" @change="button.handleClick(scope.$index, scope.row, idx)">
{{ getTableBtnName(button.name, scope.$index, scope.row) }}
</el-button>
</template>

View File

@ -19,7 +19,7 @@
:device-code="deviceCode"
:countdown-time="countdownTime"
@passflow="passflow"
@faultdevice = "faultdevice"
@faultdevice="faultdevice"
@getUserRole="getUserRole"
@hidepanel="hidepanel"
@devicemodel="devicemodel"
@ -487,16 +487,16 @@ export default {
window.open(routeData.href, '_blank', 'noopener noreferrer');
},
faultdevice() {
const routeData = this.$router.resolve({
path:'/jlmap3d/maintainer',
query:{
mapid:this.mapId,
group:this.group,
project: this.project,
noPreLogout: true
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
const routeData = this.$router.resolve({
path:'/jlmap3d/maintainer',
query:{
mapid:this.mapId,
group:this.group,
project: this.project,
noPreLogout: true
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
},
showdriving() {
this.panelShow = true;

View File

@ -5,7 +5,6 @@
<!-- 地图错误判断 -->
<div v-if="!dataError&&hasOneButton" class="display_top_draft" :style="{top: offset+'px'}">
<div class="btn_hover" @click="menuClick">菜单</div>
<!-- transform: translateX(-${btnWidth}px) -->
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
<!-- 设备视图 -->
<el-button v-if="isShow3dmodel && isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ $t('display.demon.deviceView') }}</el-button>

View File

@ -15,7 +15,6 @@
<el-button v-if="faultMode && !dataError" size="small" type="danger" @click="setFault">{{ $t('joinTraining.faultSetting') }}</el-button>
</template>
</el-button-group>
<!-- <el-button v-if="isAdmin && !dataError && !isScreen" size="small" :type="faultMode ? 'danger' : ''" @click="changeOperateMode()">故障模式</el-button> -->
<el-button v-if="isAdmin && !dataError && !isScreen" size="small" :type="faultMode ? '' : 'primary' " @click="changeOperateMode()">{{ faultMode?' 切换到普通模式':'切换到故障模式' }}</el-button>
<!-- isCenter && !dataError && !isAdmin 此判断用于以后(目前 暂时不用) -->
<el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">{{ directiveMode? '切换到普通模式':'切换到指令模式' }}</el-button>

View File

@ -135,7 +135,7 @@ export default {
name: '导入',
handleClick: this.handleImportMap,
type: 'file',
id: 'queryPagesFilesInput'
class: 'queryPagesFilesInput'
},
{
name: '导出',
@ -375,7 +375,11 @@ export default {
handleImportMap(index, row, idx) {
setTimeout(() => {
this.$set(row, 'loading' + idx, true);
const obj = document.getElementById('queryPagesFilesInput');
const objInput = document.getElementsByClassName('queryPagesFilesInput');
let obj = {files: null};
if (objInput.length) {
obj = objInput[index];
}
if (!obj.files) return;
const f = obj.files[0];
const reader = new FileReader();