zhangli 1 year ago
parent
commit
52d40fb2df
  1. 8
      src/components/ImportForm/src/ImportForm.vue
  2. 4
      src/components/UploadFile/src/UploadFile.vue
  3. 1
      src/types/components.d.ts
  4. 10
      src/utils/disposition/tableColumns.ts

8
src/components/ImportForm/src/ImportForm.vue

@ -71,8 +71,6 @@ const message = useMessage() // 消息弹窗
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const formLoading = ref(false) // const formLoading = ref(false) //
const uploadRef = ref() const uploadRef = ref()
const importUrl =
import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/system/user/import'
const uploadHeaders = ref() // Header const uploadHeaders = ref() // Header
const fileList = ref([]) // const fileList = ref([]) //
const file = ref('') const file = ref('')
@ -120,6 +118,10 @@ const file = ref('')
required: false, required: false,
default: true default: true
}, },
url:{
type: String,
required: false,
}
}) })
const importTemplateData= ref(props.importTemplateData) const importTemplateData= ref(props.importTemplateData)
const accept= ref(props.accept) const accept= ref(props.accept)
@ -129,6 +131,8 @@ const appendIsDisable = ref(props.appendIsDisable)//追加是否禁用,默认值
const coverIsDisable = ref(props.coverIsDisable)//, const coverIsDisable = ref(props.coverIsDisable)//,
const updatePart = ref(props.updatePart)// const updatePart = ref(props.updatePart)//
const importUrl =
import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + props.url
/** 打开弹窗 */ /** 打开弹窗 */
const open = () => { const open = () => {
dialogVisible.value = true dialogVisible.value = true

4
src/components/UploadFile/src/UploadFile.vue

@ -22,10 +22,10 @@
> >
<el-button type="primary"><Icon icon="ep:upload-filled" />{{ title }}</el-button> <el-button type="primary"><Icon icon="ep:upload-filled" />{{ title }}</el-button>
<template v-if="isShowTip" #tip> <template v-if="isShowTip" #tip>
<div style="font-size: 8px;margin-top: 10px;"> <div style="font-size: 8px;margin-top: 10px;line-height: initial;">
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
</div> </div>
<div style="font-size: 8px"> <div style="font-size: 8px;line-height: initial;">
格式为 <b style="color: #f56c6c">{{ fileType.join('/') }}</b> 的文件 格式为 <b style="color: #f56c6c">{{ fileType.join('/') }}</b> 的文件
</div> </div>
</template> </template>

1
src/types/components.d.ts

@ -37,7 +37,6 @@ export type ColProps = {
export type ComponentOptions = { export type ComponentOptions = {
label?: string label?: string
type?: string
value?: FormValueType value?: FormValueType
disabled?: boolean disabled?: boolean
key?: string | number key?: string | number

10
src/utils/disposition/tableColumns.ts

@ -297,10 +297,9 @@ export const ItemBasic = useCrudSchemas(reactive<CrudSchema[]>([
width: 120 width: 120
} , } ,
form: { form: {
component: 'TimePicker', component: 'DatePicker',
componentProps: { componentProps: {
type: 'datetimerange', type: 'datetimerange',
// disabled:true,
} }
} }
}, },
@ -317,9 +316,10 @@ export const ItemBasic = useCrudSchemas(reactive<CrudSchema[]>([
width: 120 width: 120
} , } ,
form: { form: {
component: 'TimePicker', component: 'DatePicker',
// valueFormat: 'YYYY-MM-DD HH:mm:ss', componentProps: {
// format: 'YYYY-MM-DD HH:mm:ss', type: 'datetimerange',
}
} }
}, },
{ {

Loading…
Cancel
Save