陈薪名 1 year ago
parent
commit
7330c6d455
  1. 26
      src/components/ImportForm/src/ImportForm.vue
  2. 14
      src/components/rowDrop/index.vue

26
src/components/ImportForm/src/ImportForm.vue

@ -8,9 +8,9 @@
<Icon icon="ep:upload-filled" color="#c0c4cc" size="60" /> <Icon icon="ep:upload-filled" color="#c0c4cc" size="60" />
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div> <div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<template #tip> <template #tip>
<div class="el-upload__tip ml--80px mr--80px"> <div class="el-upload__tip ml--126px mr--80px">
<div class="flex"> <div class="flex">
<div class="label h-32px mr-26px color-#acaeb3 font-size-14px" style="line-height:32px">导入模式</div> <div class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right" style="line-height:32px">导入模式</div>
<div class=""> <div class="">
<div class="radio"> <div class="radio">
<el-radio-group v-model="mode"> <el-radio-group v-model="mode">
@ -28,18 +28,25 @@
</div> </div>
</div> </div>
<div class="flex mt-16px"> <div class="flex mt-16px">
<div class="label h-32px mr-26px color-#acaeb3 font-size-14px" style="line-height:32px">部分保存</div> <div class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right" style="line-height:32px">部分保存</div>
<div class=""> <div class="">
<div class="switch"> <div class="switch">
<el-switch v-model="updatePart" /> <el-switch v-model="updatePart" />
</div> </div>
<div class="tips color-#acaeb3 font-size-14px"> <div class="tips color-#acaeb3 font-size-14px">
<div class="mt-2">部分保存如存在错误数据正确数据正常导入</div> <div class="mt-2">部分保存如存在错误数据正确数据正常导入</div>
<div class="mt-2">全部保存全部数据正确才能导入</div> <div class="mt-2">全部保存全部数据正确才能导入</div>
</div> </div>
</div> </div>
</div> </div>
<div class="flex mt-16px" v-if="isShowOut">
<div class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right" style="line-height:32px">是否外部资源</div>
<div class="">
<div class="switch">
<el-switch v-model="outFile" />
</div>
</div>
</div>
</div> </div>
</template> </template>
</el-upload> </el-upload>
@ -54,7 +61,6 @@
<el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button> <el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
</div> </div>
</template> </template>
</Dialog> </Dialog>
</template> </template>
@ -114,12 +120,18 @@ const file = ref('')
updatePart: { updatePart: {
type: Boolean, type: Boolean,
required: false, required: false,
default: true default: false
}, },
url:{ url:{
type: String, type: String,
required: false, required: false,
} },
//
isShowOut: {
type: Boolean,
required: false,
default: false
},
}) })
const importTemplateData= ref(props.importTemplateData) const importTemplateData= ref(props.importTemplateData)
const accept= ref(props.accept) const accept= ref(props.accept)

14
src/components/rowDrop/index.vue

@ -155,8 +155,20 @@ const initSelectSta = () => {
}) })
_showTableColumns.push(_myTableColumns[_myTableColumns.length-1]) _showTableColumns.push(_myTableColumns[_myTableColumns.length-1])
if(checkedDataList.value.length>0){
if(allData.value?.length != checkedDataList.value.length){
isIndeterminate.value = true
}else{
isIndeterminate.value = false
checkAll.value = true
}
}else{
isIndeterminate.value = false
checkAll.value = false
}
updataTableColumns(_showTableColumns) updataTableColumns(_showTableColumns)
console.log(allData.value)
} else { // } else { //
checkedDataList.value = [] checkedDataList.value = []
allData.value = [] allData.value = []

Loading…
Cancel
Save