diff --git a/src/components/Descriptions/src/Descriptions.vue b/src/components/Descriptions/src/Descriptions.vue index 18f54ea9f..56540d68b 100644 --- a/src/components/Descriptions/src/Descriptions.vue +++ b/src/components/Descriptions/src/Descriptions.vue @@ -15,6 +15,9 @@ const mobile = computed(() => appStore.getMobile) const attrs = useAttrs() const slots = useSlots() +const height = ref('200px') +const isShow = ref(false) + const props = defineProps({ title: propTypes.string.def(''), @@ -68,6 +71,15 @@ const toggleClick = () => { show.value = !unref(show) } } +const showAll = () =>{ + if(isShow.value){ + height.value ='200px' + }else{ + height.value ='auto' + } + isShow.value = !isShow.value + +} diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 84873ef74..ec5c5f57b 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -110,6 +110,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' defineOptions({ name: 'Detail' }) + const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 @@ -118,6 +119,7 @@ const routeName = ref() routeName.value = route.name routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'Detail' + const props = defineProps({ // 标签参数 tabs: { @@ -290,12 +292,18 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: getFileList() getChangeRecordList() // 判断详情新增按钮是否显示 - HeadButttondata.value = [ - defaultButtons.defaultAddBtn({ - hide: isShowMainButton(row, ['1']) - }), // 新增 - defaultButtons.defaultFilterBtn(null) // 筛选 - ] + if(routeName.value.indexOf('Job') > -1){ + HeadButttondata.value = [ + defaultButtons.defaultFilterBtn(null) // 筛选 + ] + }else{ + HeadButttondata.value = [ + defaultButtons.defaultAddBtn({ + hide: isShowMainButton(row, ['1']) + }), // 新增 + defaultButtons.defaultFilterBtn(null) // 筛选 + ] + } // 动态显示操作列按钮 buttondata.value = [ defaultButtons.mainListEditBtn({ @@ -437,28 +445,44 @@ const handleDelete = async (id: number) => { } // 筛选提交 const searchFormClick = (searchData) => { - tableObjectRef.value.params = { + const { tableObject, tableMethods } = useTable({ + getListApi: props.apiPage // 分页接口 + }) + tableObject.params = { isSearch: true, filters: searchData.filters ? searchData.filters : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }] } - getList() // 刷新当前列表 + detailAllSchemasRef.value = props.detailAllSchemas + tableObjectRef.value = tableObject + tableMethodsRef.value = tableMethods + tableObjectRef.value.tableList = [] + const { getList } = tableMethods + getList() + // tableObjectRef.value.params = { + // isSearch: true, + // filters: searchData.filters + // ? searchData.filters + // : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }] + // } + // getList() // 刷新当前列表 } //监视属性 watch( - () => props.apiPage, + () =>props.apiPage, () => { const { tableObject, tableMethods } = useTable({ getListApi: props.apiPage // 分页接口 }) + tableObject.params.masterId = masterParmas.value.masterId detailAllSchemasRef.value = props.detailAllSchemas tableObjectRef.value = tableObject tableMethodsRef.value = tableMethods const { getList } = tableMethods getList() - } + }, )