forked from github/dataease
fix(数据集): 更新excel 数据不需要校验数据集名称
This commit is contained in:
parent
044471c3ac
commit
a843a01b77
@ -1,20 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="dataset-excel" v-loading="loading">
|
<div v-loading="loading" class="dataset-excel">
|
||||||
<p v-show="!showLeft" @click="showLeft = true" class="arrow-right">
|
<p v-show="!showLeft" class="arrow-right" @click="showLeft = true">
|
||||||
<i class="el-icon-d-arrow-right"></i>
|
<i class="el-icon-d-arrow-right" />
|
||||||
</p>
|
</p>
|
||||||
<div v-show="showLeft" class="table-list">
|
<div v-show="showLeft" class="table-list">
|
||||||
<p class="select-ds">
|
<p class="select-ds">
|
||||||
<span
|
<span>{{ $t('deDataset.select_data_table ') }}
|
||||||
>{{ $t('deDataset.select_data_table ') }}
|
|
||||||
<el-tooltip class="item" effect="dark" placement="right">
|
<el-tooltip class="item" effect="dark" placement="right">
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
{{ $t('dataset.excel_info_1') }}<br />
|
{{ $t('dataset.excel_info_1') }}<br>
|
||||||
{{ $t('dataset.excel_info_2') }}<br />
|
{{ $t('dataset.excel_info_2') }}<br>
|
||||||
{{ $t('dataset.excel_info_3') }}
|
{{ $t('dataset.excel_info_3') }}
|
||||||
</div>
|
</div>
|
||||||
<i class="el-icon-warning-outline" /> </el-tooltip
|
<i class="el-icon-warning-outline" /> </el-tooltip></span>
|
||||||
></span>
|
|
||||||
<i class="el-icon-d-arrow-left" @click="showLeft = false" />
|
<i class="el-icon-d-arrow-left" @click="showLeft = false" />
|
||||||
</p>
|
</p>
|
||||||
<el-upload
|
<el-upload
|
||||||
@ -36,7 +34,7 @@
|
|||||||
:loading="uploading"
|
:loading="uploading"
|
||||||
secondary
|
secondary
|
||||||
:disabled="uploading"
|
:disabled="uploading"
|
||||||
>{{ $t('deDataset.upload_data') }}
|
>{{ $t('deDataset.upload_data') }}
|
||||||
</deBtn>
|
</deBtn>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<div class="table-checkbox-list">
|
<div class="table-checkbox-list">
|
||||||
@ -53,9 +51,9 @@
|
|||||||
@node-click="handleNodeClick"
|
@node-click="handleNodeClick"
|
||||||
@check-change="handleCheckChange"
|
@check-change="handleCheckChange"
|
||||||
>
|
>
|
||||||
<span class="custom-tree-node" slot-scope="{ data }">
|
<span slot-scope="{ data }" class="custom-tree-node">
|
||||||
{{ data.excelLable }}
|
{{ data.excelLable }}
|
||||||
<span class="error-name-exsit" v-if="data.nameExsit">
|
<span v-if="data.nameExsit && !param.tableId" class="error-name-exsit">
|
||||||
<svg-icon icon-class="exclamationmark" class="ds-icon-scene" />
|
<svg-icon icon-class="exclamationmark" class="ds-icon-scene" />
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
@ -76,11 +74,11 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="sheetObj.datasetName"
|
v-model="sheetObj.datasetName"
|
||||||
:placeholder="$t('commons.name')"
|
:placeholder="$t('commons.name')"
|
||||||
@change="changeDatasetName"
|
|
||||||
size="small"
|
size="small"
|
||||||
|
@change="changeDatasetName"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
v-if="sheetObj.nameExsit"
|
v-if="sheetObj.nameExsit && !param.tableId"
|
||||||
style="left: 107px; top: 52px"
|
style="left: 107px; top: 52px"
|
||||||
class="el-form-item__error"
|
class="el-form-item__error"
|
||||||
>
|
>
|
||||||
@ -120,20 +118,24 @@
|
|||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="field.fieldType === 'TEXT'"
|
v-if="field.fieldType === 'TEXT'"
|
||||||
icon-class="field_text"
|
icon-class="field_text"
|
||||||
class="field-icon-text" />
|
class="field-icon-text"
|
||||||
|
/>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="field.fieldType === 'DATETIME'"
|
v-if="field.fieldType === 'DATETIME'"
|
||||||
icon-class="field_time"
|
icon-class="field_time"
|
||||||
class="field-icon-time" />
|
class="field-icon-time"
|
||||||
|
/>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="
|
v-if="
|
||||||
field.fieldType === 'LONG' ||
|
field.fieldType === 'LONG' ||
|
||||||
field.fieldType === 'DOUBLE'
|
field.fieldType === 'DOUBLE'
|
||||||
"
|
"
|
||||||
icon-class="field_value"
|
icon-class="field_value"
|
||||||
class="field-icon-value" />
|
class="field-icon-value"
|
||||||
<i class="el-icon-arrow-down el-icon--right"
|
/>
|
||||||
/></span>
|
<i
|
||||||
|
class="el-icon-arrow-down el-icon--right"
|
||||||
|
/></span>
|
||||||
<el-dropdown-menu
|
<el-dropdown-menu
|
||||||
slot="dropdown"
|
slot="dropdown"
|
||||||
style="width: 178px"
|
style="width: 178px"
|
||||||
@ -143,34 +145,32 @@
|
|||||||
v-for="item in fieldOptions"
|
v-for="item in fieldOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:command="item.value"
|
:command="item.value"
|
||||||
><span>
|
><span>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="item.value === 'TEXT'"
|
v-if="item.value === 'TEXT'"
|
||||||
icon-class="field_text"
|
icon-class="field_text"
|
||||||
class="field-icon-text"
|
class="field-icon-text"
|
||||||
/>
|
/>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="item.value === 'DATETIME'"
|
v-if="item.value === 'DATETIME'"
|
||||||
icon-class="field_time"
|
icon-class="field_time"
|
||||||
class="field-icon-time"
|
class="field-icon-time"
|
||||||
/>
|
/>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="
|
v-if="
|
||||||
item.value === 'LONG' || item.value === 'DOUBLE'
|
item.value === 'LONG' || item.value === 'DOUBLE'
|
||||||
"
|
"
|
||||||
icon-class="field_value"
|
icon-class="field_value"
|
||||||
class="field-icon-value"
|
class="field-icon-value"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
style="
|
style="
|
||||||
color: #8492a6;
|
color: #8492a6;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
"
|
"
|
||||||
>{{ item.label }}</span
|
>{{ item.label }}</span></el-dropdown-item>
|
||||||
></el-dropdown-item
|
|
||||||
>
|
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span style="font-size: 14px; margin-left: 10px">
|
<span style="font-size: 14px; margin-left: 10px">
|
||||||
@ -198,7 +198,7 @@ const token = getToken()
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddExcel',
|
name: 'AddExcel',
|
||||||
mixins: [ msgCfm, cancelMix],
|
mixins: [msgCfm, cancelMix],
|
||||||
props: {
|
props: {
|
||||||
param: {
|
param: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -342,7 +342,7 @@ export default {
|
|||||||
},
|
},
|
||||||
calHeight() {
|
calHeight() {
|
||||||
const that = this
|
const that = this
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
const currentHeight = document.documentElement.clientHeight
|
const currentHeight = document.documentElement.clientHeight
|
||||||
that.height = currentHeight - 56 - 30 - 26 - 25 - 35 - 10 - 37 - 20 - 10
|
that.height = currentHeight - 56 - 30 - 26 - 25 - 35 - 10 - 37 - 20 - 10
|
||||||
}, 10)
|
}, 10)
|
||||||
@ -406,7 +406,7 @@ export default {
|
|||||||
var effectExtField = false
|
var effectExtField = false
|
||||||
var changeFiled = false
|
var changeFiled = false
|
||||||
var selectNode = this.$refs.tree.getCheckedNodes()
|
var selectNode = this.$refs.tree.getCheckedNodes()
|
||||||
if (selectNode.some((ele) => ele.nameExsit)) {
|
if (!this.param.tableId && selectNode.some((ele) => ele.nameExsit)) {
|
||||||
this.openMessageSuccess('deDataset.cannot_be_duplicate', 'error')
|
this.openMessageSuccess('deDataset.cannot_be_duplicate', 'error')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user