|
@@ -2,8 +2,8 @@
|
|
* @Author: fxs bjnsfxs@163.com
|
|
* @Author: fxs bjnsfxs@163.com
|
|
* @Date: 2024-08-20 18:16:18
|
|
* @Date: 2024-08-20 18:16:18
|
|
* @LastEditors: fxs bjnsfxs@163.com
|
|
* @LastEditors: fxs bjnsfxs@163.com
|
|
- * @LastEditTime: 2024-11-14
|
|
|
|
- * @FilePath: \Game-Backstage-Management-System\src\components\Table.vue
|
|
|
|
|
|
+ * @LastEditTime: 2024-11-26
|
|
|
|
+ * @FilePath: \SqueezeTheBus c:\Users\NINGMEI\Desktop\Manage\Game-Backstage-Management-System\src\components\Table.vue
|
|
* @Description:
|
|
* @Description:
|
|
*
|
|
*
|
|
-->
|
|
-->
|
|
@@ -19,14 +19,32 @@ import { fuzzySearch, throttleFunc } from '@/utils/common'
|
|
import { computed, onMounted, reactive, ref, toRaw, watch } from 'vue'
|
|
import { computed, onMounted, reactive, ref, toRaw, watch } from 'vue'
|
|
import { useTable } from '@/hooks/useTable'
|
|
import { useTable } from '@/hooks/useTable'
|
|
import { useRequest } from '@/hooks/useRequest'
|
|
import { useRequest } from '@/hooks/useRequest'
|
|
|
|
+import { Filter } from '@element-plus/icons-vue'
|
|
|
|
+import { useCustomFilter } from '@/hooks/useCustomFilter.ts'
|
|
|
|
|
|
|
|
+import CustomFilter from './form/CustomFilter.vue'
|
|
import FilterPopover from './toolsBtn/FilterPopover.vue'
|
|
import FilterPopover from './toolsBtn/FilterPopover.vue'
|
|
-import RegreshBtn from './toolsBtn/RegreshBtn.vue'
|
|
|
|
|
|
+import RefreshBtn from './toolsBtn/RefreshBtn.vue'
|
|
import axiosInstance from '@/utils/axios/axiosInstance'
|
|
import axiosInstance from '@/utils/axios/axiosInstance'
|
|
import TableFieldText from './table/TableFieldText.vue'
|
|
import TableFieldText from './table/TableFieldText.vue'
|
|
|
|
|
|
|
|
+type CustomFilterRef = InstanceType<typeof CustomFilter>
|
|
|
|
+
|
|
|
|
+// 自定义筛选组件的ref
|
|
|
|
+const customFilterRef = ref<CustomFilterRef>()
|
|
|
|
+
|
|
const { analysisResCode } = useRequest()
|
|
const { analysisResCode } = useRequest()
|
|
|
|
|
|
|
|
+const {
|
|
|
|
+ customFilterDialog,
|
|
|
|
+ customFilterInfo,
|
|
|
|
+ customFilterList,
|
|
|
|
+ activeCustomFilterKey,
|
|
|
|
+ initCustomFilterInfo,
|
|
|
|
+ openCustomFilter,
|
|
|
|
+
|
|
|
|
+ confirmCustomFilter
|
|
|
|
+} = useCustomFilter(customFilterRef)
|
|
// 节流的延迟时间
|
|
// 节流的延迟时间
|
|
const throttleTime = 500
|
|
const throttleTime = 500
|
|
|
|
|
|
@@ -119,9 +137,15 @@ const selectFieldsList = computed(() => {
|
|
|
|
|
|
// 所有类型为date的表单控件信息
|
|
// 所有类型为date的表单控件信息
|
|
const dateFieldsList = computed(() => {
|
|
const dateFieldsList = computed(() => {
|
|
|
|
+ if (!props.queryInfo) return []
|
|
return props.queryInfo?.filter((item) => item.type === FilterType.DATE)
|
|
return props.queryInfo?.filter((item) => item.type === FilterType.DATE)
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+// 所有自定义筛选条件的表单控件信息
|
|
|
|
+const customFieldsList = computed(() => {
|
|
|
|
+ return props.queryInfo?.filter((item) => item.type === FilterType.CUSTOM)
|
|
|
|
+})
|
|
|
|
+
|
|
// 计算行号
|
|
// 计算行号
|
|
const computedRowIndex = (index: number) => {
|
|
const computedRowIndex = (index: number) => {
|
|
return (paginationConfig.currentPage - 1) * paginationConfig.limit + index + 1
|
|
return (paginationConfig.currentPage - 1) * paginationConfig.limit + index + 1
|
|
@@ -147,6 +171,7 @@ const handleSizeChange = (val: number) => {
|
|
* @description 加载表格数据
|
|
* @description 加载表格数据
|
|
*/
|
|
*/
|
|
const loadTableData = async (): Promise<boolean> => {
|
|
const loadTableData = async (): Promise<boolean> => {
|
|
|
|
+ console.trace()
|
|
return new Promise(async (resolve, reject) => {
|
|
return new Promise(async (resolve, reject) => {
|
|
loading.value = true
|
|
loading.value = true
|
|
if (props.dataList) {
|
|
if (props.dataList) {
|
|
@@ -166,6 +191,7 @@ const loadTableData = async (): Promise<boolean> => {
|
|
(paginationConfig.currentPage - 1) * paginationConfig.limit
|
|
(paginationConfig.currentPage - 1) * paginationConfig.limit
|
|
reqconfig.otherOptions.limit = paginationConfig.limit
|
|
reqconfig.otherOptions.limit = paginationConfig.limit
|
|
}
|
|
}
|
|
|
|
+ // console.log(reqconfig.otherOptions)
|
|
await getTableData(reqconfig.url, reqconfig.otherOptions, props.openPageQuery)
|
|
await getTableData(reqconfig.url, reqconfig.otherOptions, props.openPageQuery)
|
|
backupTableData.splice(0, backupTableData.length, ...tableData)
|
|
backupTableData.splice(0, backupTableData.length, ...tableData)
|
|
resolve(true)
|
|
resolve(true)
|
|
@@ -227,18 +253,36 @@ const getData = () => {
|
|
const throttleGetData = throttleFunc(getData, 1000)
|
|
const throttleGetData = throttleFunc(getData, 1000)
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @description: 清空表格数据
|
|
|
|
- * @return {*}
|
|
|
|
|
|
+ * 清空表格数据
|
|
*/
|
|
*/
|
|
const resetTableData = () => {
|
|
const resetTableData = () => {
|
|
tableData.splice(0, tableData.length)
|
|
tableData.splice(0, tableData.length)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * 删除没有用的自定义筛选字段,如果不删后端会查询不到(可以不用)
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+// const delUnusedCustomFilter = () => {
|
|
|
|
+// let customKeys = customFieldsList.value?.map((item) => {
|
|
|
|
+// return item.name
|
|
|
|
+// })
|
|
|
|
+// for (let [k, v] of Object.entries(queryFormData)) {
|
|
|
|
+// if (customKeys && customKeys.includes(k) && typeof v !== 'object') {
|
|
|
|
+// console.log(k)
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+/**
|
|
* @description: 按条件查询,如果开启了分页查询,那么会直接重新查询数据,否则,会根据现有数据进行查询
|
|
* @description: 按条件查询,如果开启了分页查询,那么会直接重新查询数据,否则,会根据现有数据进行查询
|
|
*/
|
|
*/
|
|
const queryTableData = () => {
|
|
const queryTableData = () => {
|
|
if (props.openRemoteinquiry && props.requestConfig) {
|
|
if (props.openRemoteinquiry && props.requestConfig) {
|
|
|
|
+ // delUnusedCustomFilter()
|
|
|
|
+ // console.log('--------')
|
|
|
|
+ // console.log(props.requestConfig.otherOptions, queryFormData)
|
|
|
|
+ // console.log('-----------')
|
|
reqconfig.otherOptions = { ...props.requestConfig.otherOptions, ...queryFormData }
|
|
reqconfig.otherOptions = { ...props.requestConfig.otherOptions, ...queryFormData }
|
|
getData()
|
|
getData()
|
|
} else {
|
|
} else {
|
|
@@ -268,6 +312,8 @@ const throttleQueryTableData = throttleFunc(queryTableData, throttleTime)
|
|
* @param needQuery 是否需要重新查询,默认为true,如果为false,则不重新查询
|
|
* @param needQuery 是否需要重新查询,默认为true,如果为false,则不重新查询
|
|
*/
|
|
*/
|
|
const resetQueryForm = (needQuery: boolean = true) => {
|
|
const resetQueryForm = (needQuery: boolean = true) => {
|
|
|
|
+ // 重置自定义筛选字段的值
|
|
|
|
+ initCustomFilterInfo(customFieldsList)
|
|
// 使用函数返回保存的备份信息,这样可以正确的给queryformdata赋值
|
|
// 使用函数返回保存的备份信息,这样可以正确的给queryformdata赋值
|
|
// JSON.stringify()第二个参数可以用来处理undefined的情况,第一个参数设置为_可以避免ts检查
|
|
// JSON.stringify()第二个参数可以用来处理undefined的情况,第一个参数设置为_可以避免ts检查
|
|
function resetFormData() {
|
|
function resetFormData() {
|
|
@@ -275,6 +321,7 @@ const resetQueryForm = (needQuery: boolean = true) => {
|
|
JSON.stringify(backupQueryFormData, (_, v) => (typeof v === 'undefined' ? '' : v))
|
|
JSON.stringify(backupQueryFormData, (_, v) => (typeof v === 'undefined' ? '' : v))
|
|
)
|
|
)
|
|
}
|
|
}
|
|
|
|
+
|
|
Object.assign(queryFormData, resetFormData())
|
|
Object.assign(queryFormData, resetFormData())
|
|
reqconfig.otherOptions = backupReqOtherOptions // 要把请求的参数也重置一次,不然切换平台等操作,会带着原来的查询参数请求
|
|
reqconfig.otherOptions = backupReqOtherOptions // 要把请求的参数也重置一次,不然切换平台等操作,会带着原来的查询参数请求
|
|
|
|
|
|
@@ -286,9 +333,8 @@ const throttleResetQueryForm = throttleFunc(resetQueryForm, throttleTime)
|
|
|
|
|
|
/**
|
|
/**
|
|
* @description: 在获取完数据后,插入均值行
|
|
* @description: 在获取完数据后,插入均值行
|
|
- * @param {*} start 插入的位置
|
|
|
|
- * @param {*} rowData 插入的数据
|
|
|
|
- * @return {*}
|
|
|
|
|
|
+ * @param start 插入的位置
|
|
|
|
+ * @param rowData 插入的数据
|
|
*/
|
|
*/
|
|
const insertRow = (start: number, rowData: any) => {
|
|
const insertRow = (start: number, rowData: any) => {
|
|
if (props.openPageQuery) {
|
|
if (props.openPageQuery) {
|
|
@@ -300,10 +346,9 @@ const insertRow = (start: number, rowData: any) => {
|
|
|
|
|
|
/**
|
|
/**
|
|
* @description: 根据计算出来的值去返回对应的颜色深度
|
|
* @description: 根据计算出来的值去返回对应的颜色深度
|
|
- * @return {*}
|
|
|
|
*/
|
|
*/
|
|
const getDecimalFromRange = (number: number) => {
|
|
const getDecimalFromRange = (number: number) => {
|
|
- if (number === null || number === undefined) return 0
|
|
|
|
|
|
+ if (!number) return 0
|
|
if (number < 25) return 0.25
|
|
if (number < 25) return 0.25
|
|
else if (number < 50) return 0.5
|
|
else if (number < 50) return 0.5
|
|
else if (number < 75) return 0.75
|
|
else if (number < 75) return 0.75
|
|
@@ -315,7 +360,6 @@ const getDecimalFromRange = (number: number) => {
|
|
* 其中使用row-style无效,scope会导致无法覆盖样式
|
|
* 其中使用row-style无效,scope会导致无法覆盖样式
|
|
* 同时由于我自定义了表格内容,哪里的样式会覆盖row的样式,所以只能单独对单元格设置
|
|
* 同时由于我自定义了表格内容,哪里的样式会覆盖row的样式,所以只能单独对单元格设置
|
|
* @param {*} info 每个单元格的信息
|
|
* @param {*} info 每个单元格的信息
|
|
- * @return {*}
|
|
|
|
*/
|
|
*/
|
|
const tableCellStyle = (info: any) => {
|
|
const tableCellStyle = (info: any) => {
|
|
if (info.row.date === '均值')
|
|
if (info.row.date === '均值')
|
|
@@ -330,9 +374,19 @@ const tableCellStyle = (info: any) => {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ *
|
|
|
|
+ *
|
|
|
|
+ *
|
|
|
|
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!严重BUG!!!!!!!!!!!!!!!!
|
|
|
|
+ *
|
|
|
|
+ *
|
|
|
|
+ *
|
|
|
|
+ *
|
|
|
|
+ *
|
|
|
|
+ *
|
|
* @description: 监听litmit,currentpage的变化,改变后去重新请求数据
|
|
* @description: 监听litmit,currentpage的变化,改变后去重新请求数据
|
|
* 如果是limit的变化,则需要把当前页置为1
|
|
* 如果是limit的变化,则需要把当前页置为1
|
|
- * @return {*}
|
|
|
|
|
|
+
|
|
*/
|
|
*/
|
|
watch(
|
|
watch(
|
|
() => [paginationConfig.limit, paginationConfig.currentPage],
|
|
() => [paginationConfig.limit, paginationConfig.currentPage],
|
|
@@ -342,7 +396,7 @@ watch(
|
|
if (newLimit != oldLimit) {
|
|
if (newLimit != oldLimit) {
|
|
// 需要给分页按钮加上:current-page.sync="current_page" 配置,不然不生效
|
|
// 需要给分页按钮加上:current-page.sync="current_page" 配置,不然不生效
|
|
// 当改变每页大小时把之前的缓存全部清除,重新开始
|
|
// 当改变每页大小时把之前的缓存全部清除,重新开始
|
|
- paginationConfig.currentPage = 1
|
|
|
|
|
|
+ paginationConfig.currentPage = 1 // 不应该在这儿改
|
|
}
|
|
}
|
|
|
|
|
|
// 开启分页查询的情况下,改变limit或者没有这页的缓存的情况下,重新请求
|
|
// 开启分页查询的情况下,改变limit或者没有这页的缓存的情况下,重新请求
|
|
@@ -410,10 +464,9 @@ const watchDateChange = watch(
|
|
|
|
|
|
/**
|
|
/**
|
|
* @description: 创建row-key优化表格性能
|
|
* @description: 创建row-key优化表格性能
|
|
- * @return {*}
|
|
|
|
*/
|
|
*/
|
|
const createRowKey = () => {
|
|
const createRowKey = () => {
|
|
- return `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`
|
|
|
|
|
|
+ return `${Date.now()}-${Math.random().toString(36).slice(2, 11)}`
|
|
}
|
|
}
|
|
|
|
|
|
// 没有pf取消掉
|
|
// 没有pf取消掉
|
|
@@ -431,7 +484,6 @@ if (!props.dataList) {
|
|
|
|
|
|
/**
|
|
/**
|
|
* @description: 拷贝一份配置文件
|
|
* @description: 拷贝一份配置文件
|
|
- * @return {*}
|
|
|
|
*/
|
|
*/
|
|
const initpageConfig = () => {
|
|
const initpageConfig = () => {
|
|
Object.assign(paginationConfig, props.paginationConfig)
|
|
Object.assign(paginationConfig, props.paginationConfig)
|
|
@@ -439,7 +491,6 @@ const initpageConfig = () => {
|
|
|
|
|
|
/**
|
|
/**
|
|
* @description: 初始化请求配置,用于把拷贝一份新的数据
|
|
* @description: 初始化请求配置,用于把拷贝一份新的数据
|
|
- * @return {*}
|
|
|
|
*/
|
|
*/
|
|
const initReqConfig = () => {
|
|
const initReqConfig = () => {
|
|
Object.assign(reqconfig, props.requestConfig)
|
|
Object.assign(reqconfig, props.requestConfig)
|
|
@@ -447,7 +498,6 @@ const initReqConfig = () => {
|
|
|
|
|
|
/**
|
|
/**
|
|
* @description: 初始化查询框的数据
|
|
* @description: 初始化查询框的数据
|
|
- * @return {*}
|
|
|
|
*/
|
|
*/
|
|
const initFormData = () => {
|
|
const initFormData = () => {
|
|
props.queryInfo?.map((item: any) => {
|
|
props.queryInfo?.map((item: any) => {
|
|
@@ -461,7 +511,6 @@ const initFormData = () => {
|
|
/**
|
|
/**
|
|
* @description: 表格排序
|
|
* @description: 表格排序
|
|
* @param {*} data 获取到的数据
|
|
* @param {*} data 获取到的数据
|
|
- * @return {*}
|
|
|
|
*/
|
|
*/
|
|
const tableSortChange = (data: { column: any; prop: string; order: any }) => {
|
|
const tableSortChange = (data: { column: any; prop: string; order: any }) => {
|
|
resetQueryForm(false)
|
|
resetQueryForm(false)
|
|
@@ -494,7 +543,6 @@ const deleteRow = (url: string, fieldsInfo: any) => {
|
|
|
|
|
|
/**
|
|
/**
|
|
* @description: 下载表格数据
|
|
* @description: 下载表格数据
|
|
- * @return {*}
|
|
|
|
*/
|
|
*/
|
|
const downLoadTable = () => {
|
|
const downLoadTable = () => {
|
|
emits('downLoad', JSON.parse(JSON.stringify(tableData)))
|
|
emits('downLoad', JSON.parse(JSON.stringify(tableData)))
|
|
@@ -502,12 +550,16 @@ const downLoadTable = () => {
|
|
|
|
|
|
/**
|
|
/**
|
|
* @description: 外部获取数据
|
|
* @description: 外部获取数据
|
|
- * @return {*}
|
|
|
|
*/
|
|
*/
|
|
const outGetTableData = () => {
|
|
const outGetTableData = () => {
|
|
return toRaw(tableData).flat()
|
|
return toRaw(tableData).flat()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * 格式化输入框的值,只允许输入数字
|
|
|
|
+ *
|
|
|
|
+ * @param key 输入框的key
|
|
|
|
+ */
|
|
const numberInput = (key: string) => {
|
|
const numberInput = (key: string) => {
|
|
let val = queryFormData[key]
|
|
let val = queryFormData[key]
|
|
val = parseInt(val)
|
|
val = parseInt(val)
|
|
@@ -531,6 +583,7 @@ onMounted(() => {
|
|
initpageConfig()
|
|
initpageConfig()
|
|
initReqConfig()
|
|
initReqConfig()
|
|
initFormData()
|
|
initFormData()
|
|
|
|
+ initCustomFilterInfo(customFieldsList)
|
|
backupReqOtherOptions = reqconfig.otherOptions // 备份一份请求参数
|
|
backupReqOtherOptions = reqconfig.otherOptions // 备份一份请求参数
|
|
// registerWatchProps()
|
|
// registerWatchProps()
|
|
if (props.loadingState !== undefined) {
|
|
if (props.loadingState !== undefined) {
|
|
@@ -609,10 +662,18 @@ onMounted(() => {
|
|
<el-date-picker
|
|
<el-date-picker
|
|
v-model="queryFormData[item.name]"
|
|
v-model="queryFormData[item.name]"
|
|
type="date"
|
|
type="date"
|
|
|
|
+ :value-format="item.otherOption.valueFormat"
|
|
:placeholder="item.placeholder"
|
|
:placeholder="item.placeholder"
|
|
clearable
|
|
clearable
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+
|
|
|
|
+ <!-- 所有自定义筛选条件 -->
|
|
|
|
+ <el-form-item :label="item.label" v-for="item in customFieldsList" class="filterItem">
|
|
|
|
+ <el-button plain size="default" :icon="Filter" @click="openCustomFilter(item)"
|
|
|
|
+ >筛选
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<!-- 分割线 -->
|
|
<!-- 分割线 -->
|
|
<!-- <el-divider class="queryPartition" content-position="center" direction="vertical" /> -->
|
|
<!-- <el-divider class="queryPartition" content-position="center" direction="vertical" /> -->
|
|
@@ -620,13 +681,38 @@ onMounted(() => {
|
|
<el-divider class="queryPartition" content-position="center" direction="vertical" />
|
|
<el-divider class="queryPartition" content-position="center" direction="vertical" />
|
|
<div class="queryBtnBox">
|
|
<div class="queryBtnBox">
|
|
<el-button class="queryBtn" color="#165dff" @click="throttleQueryTableData">
|
|
<el-button class="queryBtn" color="#165dff" @click="throttleQueryTableData">
|
|
- <el-icon><Search /></el-icon>查询
|
|
|
|
|
|
+ <el-icon>
|
|
|
|
+ <Search />
|
|
|
|
+ </el-icon>
|
|
|
|
+ 查询
|
|
</el-button>
|
|
</el-button>
|
|
<el-button class="refreshBtn" color="#f2f3f5" @click="throttleResetQueryForm()">
|
|
<el-button class="refreshBtn" color="#f2f3f5" @click="throttleResetQueryForm()">
|
|
- <el-icon><RefreshRight /></el-icon>重置
|
|
|
|
|
|
+ <el-icon>
|
|
|
|
+ <RefreshRight />
|
|
|
|
+ </el-icon>
|
|
|
|
+ 重置
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-dialog v-model="customFilterDialog" title="自定义筛选条件" width="800">
|
|
|
|
+ <CustomFilter
|
|
|
|
+ :filter-list="customFilterList[activeCustomFilterKey]"
|
|
|
|
+ :filter="customFilterInfo[activeCustomFilterKey]"
|
|
|
|
+ ref="customFilterRef"
|
|
|
|
+ ></CustomFilter>
|
|
|
|
+ <template #footer>
|
|
|
|
+ <div class="dialog-footer">
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="confirmCustomFilter(queryFormData)"
|
|
|
|
+ style="margin-right: 20px"
|
|
|
|
+ >
|
|
|
|
+ 确定
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button @click="customFilterDialog = false">取消</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 分割线 -->
|
|
<!-- 分割线 -->
|
|
@@ -635,7 +721,10 @@ onMounted(() => {
|
|
<div class="leftTools">
|
|
<div class="leftTools">
|
|
<div class="leftToolsGroup" v-if="needLeftTools" style="display: flex">
|
|
<div class="leftToolsGroup" v-if="needLeftTools" style="display: flex">
|
|
<el-button class="leftToolBtn" color="#165dff" @click="emits('addNewItem')">
|
|
<el-button class="leftToolBtn" color="#165dff" @click="emits('addNewItem')">
|
|
- <el-icon><Plus /></el-icon>新增
|
|
|
|
|
|
+ <el-icon>
|
|
|
|
+ <Plus />
|
|
|
|
+ </el-icon>
|
|
|
|
+ 新增
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
class="leftToolBtn"
|
|
class="leftToolBtn"
|
|
@@ -643,7 +732,10 @@ onMounted(() => {
|
|
@click="emits('upload', outGetTableData())"
|
|
@click="emits('upload', outGetTableData())"
|
|
v-if="needUpload"
|
|
v-if="needUpload"
|
|
>
|
|
>
|
|
- <el-icon><Upload /></el-icon>上传
|
|
|
|
|
|
+ <el-icon>
|
|
|
|
+ <Upload />
|
|
|
|
+ </el-icon>
|
|
|
|
+ 上传
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -655,10 +747,13 @@ onMounted(() => {
|
|
class="rightToolsItem"
|
|
class="rightToolsItem"
|
|
@click="downLoadTable"
|
|
@click="downLoadTable"
|
|
>
|
|
>
|
|
- <el-icon><Download /></el-icon>下载
|
|
|
|
|
|
+ <el-icon>
|
|
|
|
+ <Download />
|
|
|
|
+ </el-icon>
|
|
|
|
+ 下载
|
|
</el-button>
|
|
</el-button>
|
|
<!-- throttleFunc(queryTableData, 200) -->
|
|
<!-- throttleFunc(queryTableData, 200) -->
|
|
- <RegreshBtn @refresh-table="throttleGetData" :icon-size="toolsIconSize"></RegreshBtn>
|
|
|
|
|
|
+ <RefreshBtn @refresh-table="throttleGetData" :icon-size="toolsIconSize"></RefreshBtn>
|
|
|
|
|
|
<FilterPopover
|
|
<FilterPopover
|
|
:table-fields-info="tableFieldsInfo"
|
|
:table-fields-info="tableFieldsInfo"
|
|
@@ -735,6 +830,10 @@ onMounted(() => {
|
|
>
|
|
>
|
|
</el-switch>
|
|
</el-switch>
|
|
|
|
|
|
|
|
+ <span v-else-if="item.specialEffect?.type === FieldSpecialEffectType.CUSTOM">
|
|
|
|
+ {{ item.specialEffect.otherInfo.render(scope.row[item.name]) }}
|
|
|
|
+ </span>
|
|
|
|
+
|
|
<el-text v-else>
|
|
<el-text v-else>
|
|
<!-- 其他列按默认方式显示 -->
|
|
<!-- 其他列按默认方式显示 -->
|
|
|
|
|
|
@@ -781,6 +880,7 @@ onMounted(() => {
|
|
0 4px 8px 0 rgba(0, 0, 0, 0.02),
|
|
0 4px 8px 0 rgba(0, 0, 0, 0.02),
|
|
0 1px 3px 0 rgba(0, 0, 0, 0.02);
|
|
0 1px 3px 0 rgba(0, 0, 0, 0.02);
|
|
}
|
|
}
|
|
|
|
+
|
|
.filterBox,
|
|
.filterBox,
|
|
.tableBox {
|
|
.tableBox {
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -798,7 +898,7 @@ onMounted(() => {
|
|
width: 98%;
|
|
width: 98%;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
|
|
|
- margin: 0 auto;
|
|
|
|
|
|
+ margin: 10px auto;
|
|
}
|
|
}
|
|
|
|
|
|
.filterHeader {
|
|
.filterHeader {
|
|
@@ -854,10 +954,9 @@ onMounted(() => {
|
|
|
|
|
|
.tableTools {
|
|
.tableTools {
|
|
width: 98%;
|
|
width: 98%;
|
|
- margin: 0 auto;
|
|
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
- margin-top: 1%;
|
|
|
|
|
|
+ margin: 1% auto 0;
|
|
}
|
|
}
|
|
|
|
|
|
.leftTools,
|
|
.leftTools,
|