|
@@ -14,13 +14,13 @@
|
|
<DictItemModal @register="registerModal" @success="reload" :dictId="dictId" />
|
|
<DictItemModal @register="registerModal" @success="reload" :dictId="dictId" />
|
|
</template>
|
|
</template>
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
- import { onMounted, ref, unref } from 'vue';
|
|
|
|
|
|
+ import { onMounted, ref } from 'vue';
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
import { useModal } from '/@/components/Modal';
|
|
import { useModal } from '/@/components/Modal';
|
|
import { useDesign } from '/@/hooks/web/useDesign';
|
|
import { useDesign } from '/@/hooks/web/useDesign';
|
|
import DictItemModal from './DictItemModal.vue';
|
|
import DictItemModal from './DictItemModal.vue';
|
|
import { dictItemColumns, dictItemSearchFormSchema } from '../dict.data';
|
|
import { dictItemColumns, dictItemSearchFormSchema } from '../dict.data';
|
|
- import { itemList, deleteItem } from '../dict.api';
|
|
|
|
|
|
+ import { itemList, deleteItem, list } from '../dict.api';
|
|
import { ColEx } from '/@/components/Form/src/types';
|
|
import { ColEx } from '/@/components/Form/src/types';
|
|
|
|
|
|
const { prefixCls } = useDesign('row-invalid');
|
|
const { prefixCls } = useDesign('row-invalid');
|
|
@@ -120,9 +120,12 @@
|
|
}
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
- dictId.value = '1826791852479107073';
|
|
|
|
- setProps({ searchInfo: { dictId: unref(dictId) } });
|
|
|
|
- reload();
|
|
|
|
|
|
+ list({ dictCode: 'districtTeam' }).then((r) => {
|
|
|
|
+ if (!r.records.length) return;
|
|
|
|
+ dictId.value = r.records[0].id;
|
|
|
|
+ setProps({ searchInfo: { dictId: dictId.value } });
|
|
|
|
+ reload();
|
|
|
|
+ });
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
<style scoped lang="less">
|
|
<style scoped lang="less">
|