调整发布地图导入流程

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)" :disabled="isTableBtnDisabled(button, scope.$index, scope.row)"
:loading="scope.row['loading'+idx]" :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) }} {{ getTableBtnName(button.name, scope.$index, scope.row) }}
</el-button> </el-button>
</template> </template>

View File

@ -5,7 +5,6 @@
<!-- 地图错误判断 --> <!-- 地图错误判断 -->
<div v-if="!dataError&&hasOneButton" class="display_top_draft" :style="{top: offset+'px'}"> <div v-if="!dataError&&hasOneButton" class="display_top_draft" :style="{top: offset+'px'}">
<div class="btn_hover" @click="menuClick">菜单</div> <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-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> <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> <el-button v-if="faultMode && !dataError" size="small" type="danger" @click="setFault">{{ $t('joinTraining.faultSetting') }}</el-button>
</template> </template>
</el-button-group> </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> <el-button v-if="isAdmin && !dataError && !isScreen" size="small" :type="faultMode ? '' : 'primary' " @click="changeOperateMode()">{{ faultMode?' 切换到普通模式':'切换到故障模式' }}</el-button>
<!-- isCenter && !dataError && !isAdmin 此判断用于以后(目前 暂时不用) --> <!-- isCenter && !dataError && !isAdmin 此判断用于以后(目前 暂时不用) -->
<el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">{{ directiveMode? '切换到普通模式':'切换到指令模式' }}</el-button> <el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">{{ directiveMode? '切换到普通模式':'切换到指令模式' }}</el-button>

View File

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