|
@@ -2,10 +2,8 @@
|
|
<!-- 文化传承 - 可移动文物 -->
|
|
<!-- 文化传承 - 可移动文物 -->
|
|
<CommonListPage
|
|
<CommonListPage
|
|
:title="'可移动文物'"
|
|
:title="'可移动文物'"
|
|
- :prevPage="{ title: '保护传承' }"
|
|
|
|
:dropDownNames="dropdownNames"
|
|
:dropDownNames="dropdownNames"
|
|
:pageSize="8"
|
|
:pageSize="8"
|
|
- :rowType="2"
|
|
|
|
:load="loadData"
|
|
:load="loadData"
|
|
:loadDetail="loadDetail"
|
|
:loadDetail="loadDetail"
|
|
:tagsData="tagsData"
|
|
:tagsData="tagsData"
|
|
@@ -15,17 +13,15 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
-import CommonContent, { GetContentListParams } from '@/api/CommonContent';
|
|
|
|
-import MoveableContent from '@/api/inheritor/MoveableContent';
|
|
|
|
-import type { DropDownNames } from '@/components/content/CommonListPage.vue';
|
|
|
|
|
|
+import { GetContentListParams } from '@/api/CommonContent';
|
|
import { onMounted, ref } from 'vue';
|
|
import { onMounted, ref } from 'vue';
|
|
|
|
+import MoveableContent from '@/api/inheritor/MoveableContent';
|
|
|
|
+import type { DropDownNames } from '@/components/content/CommonListBlock.vue';
|
|
|
|
|
|
async function loadDetail(id: number, item: any) {
|
|
async function loadDetail(id: number, item: any) {
|
|
const res = await MoveableContent.getContentDetail(id);
|
|
const res = await MoveableContent.getContentDetail(id);
|
|
res.addItems = [
|
|
res.addItems = [
|
|
- { name: '地理位置', text: item.code, span: 12 },
|
|
|
|
- { name: '建筑时间', text: item.ichTypeText, span: 12 },
|
|
|
|
- { name: '保护级别', text: item.levelText, span: 12 },
|
|
|
|
|
|
+ { name: '保护级别', text: item.crTypeText || '未定级', span: 12 },
|
|
];
|
|
];
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|
|
@@ -49,14 +45,9 @@ async function loadData(
|
|
total: res.total,
|
|
total: res.total,
|
|
data: res.list.map((item, index) => {
|
|
data: res.list.map((item, index) => {
|
|
return {
|
|
return {
|
|
- id: item.id,
|
|
|
|
- title: item.title ?? '!!title!!',
|
|
|
|
- desc: item.desc,
|
|
|
|
- image: item.image,
|
|
|
|
|
|
+ ...item,
|
|
addItems: [
|
|
addItems: [
|
|
- { name: '地理位置', text: item.code, span: 12 },
|
|
|
|
- { name: '建筑时间', text: item.ichTypeText, span: 12 },
|
|
|
|
- { name: '保护级别', text: item.declarationRegion, span: 12 },
|
|
|
|
|
|
+ { name: '保护级别', text: item.crTypeText || '未定级', span: 12 },
|
|
],
|
|
],
|
|
};
|
|
};
|
|
}),
|
|
}),
|
|
@@ -71,7 +62,7 @@ const tagsData = ref([
|
|
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
- tagsData.value = tagsData.value.concat((await CommonContent.getCategoryList(3)).map((item) => ({
|
|
|
|
|
|
+ tagsData.value = tagsData.value.concat((await MoveableContent.getCategoryList(310)).map((item) => ({
|
|
id: item.id,
|
|
id: item.id,
|
|
name: item.title,
|
|
name: item.title,
|
|
})));
|
|
})));
|
|
@@ -79,20 +70,22 @@ onMounted(async () => {
|
|
options: [{
|
|
options: [{
|
|
id: 0,
|
|
id: 0,
|
|
name: '全部'
|
|
name: '全部'
|
|
- }].concat((await CommonContent.getCategoryList(2)).map((item) => ({
|
|
|
|
|
|
+ }].concat((await MoveableContent.getCategoryList(2)).map((item) => ({
|
|
id: item.id,
|
|
id: item.id,
|
|
name: item.title,
|
|
name: item.title,
|
|
}))),
|
|
}))),
|
|
|
|
+ label: '文物级别',
|
|
defaultSelectedValue: 0,
|
|
defaultSelectedValue: 0,
|
|
});
|
|
});
|
|
dropdownNames.value.push({
|
|
dropdownNames.value.push({
|
|
options: [{
|
|
options: [{
|
|
id: 0,
|
|
id: 0,
|
|
name: '全部'
|
|
name: '全部'
|
|
- }].concat((await CommonContent.getCategoryList(1)).map((item) => ({
|
|
|
|
|
|
+ }].concat((await MoveableContent.getCategoryList(1)).map((item) => ({
|
|
id: item.id,
|
|
id: item.id,
|
|
name: item.title,
|
|
name: item.title,
|
|
}))),
|
|
}))),
|
|
|
|
+ label: '区域',
|
|
defaultSelectedValue: 0,
|
|
defaultSelectedValue: 0,
|
|
});
|
|
});
|
|
})
|
|
})
|