|
|
@@ -25,14 +25,18 @@
|
|
|
<button
|
|
|
type="button"
|
|
|
class="resource-type-btn"
|
|
|
- @click="resourceTypePanelOpen = !resourceTypePanelOpen"
|
|
|
+ :class="{ disabled: searchMode === 'fulltext' }"
|
|
|
+ @click="toggleResourceTypePanel"
|
|
|
>
|
|
|
<span>{{ currentResourceTypeLabel }}</span>
|
|
|
- <i></i>
|
|
|
+ <i v-if="searchMode === 'condition'"></i>
|
|
|
</button>
|
|
|
</div>
|
|
|
|
|
|
- <div v-if="resourceTypePanelOpen" class="resource-type-panel">
|
|
|
+ <div
|
|
|
+ v-if="searchMode === 'condition' && resourceTypePanelOpen"
|
|
|
+ class="resource-type-panel"
|
|
|
+ >
|
|
|
<button
|
|
|
v-for="item in resourceTypes"
|
|
|
:key="item.value"
|
|
|
@@ -113,7 +117,10 @@
|
|
|
重置
|
|
|
</button>
|
|
|
</div>
|
|
|
- <section v-if="dictSections.length && searchMode === 'condition' " class="filter-section">
|
|
|
+ <section
|
|
|
+ v-if="dictSections.length && searchMode === 'condition'"
|
|
|
+ class="filter-section"
|
|
|
+ >
|
|
|
<Swiper
|
|
|
class="section-swiper"
|
|
|
:slides-per-view="'auto'"
|
|
|
@@ -216,9 +223,7 @@
|
|
|
class="collect-btn"
|
|
|
@click.stop="toggleFavorite(item)"
|
|
|
>
|
|
|
- <img
|
|
|
- :src="item.isCollect ? starActiveIcon : starIcon"
|
|
|
- />
|
|
|
+ <img :src="item.isCollect ? starActiveIcon : starIcon" />
|
|
|
</button>
|
|
|
</div>
|
|
|
|
|
|
@@ -230,9 +235,7 @@
|
|
|
class="collect-btn"
|
|
|
@click.stop="toggleFavorite(item)"
|
|
|
>
|
|
|
- <img
|
|
|
- :src="item.isCollect ? starActiveIcon : starIcon"
|
|
|
- />
|
|
|
+ <img :src="item.isCollect ? starActiveIcon : starIcon" />
|
|
|
</button>
|
|
|
</div>
|
|
|
<p class="text-desc" v-html="getHighlightedText(item)"></p>
|
|
|
@@ -574,6 +577,10 @@ const normalizeRecord = (item, index) => ({
|
|
|
|
|
|
const selectedTagList = computed(() => Object.values(selectedTagMap.value));
|
|
|
const currentResourceTypeLabel = computed(() => {
|
|
|
+ if (searchMode.value === "fulltext") {
|
|
|
+ return "全文";
|
|
|
+ }
|
|
|
+
|
|
|
const current = resourceTypes.value.find(
|
|
|
(item) => String(item.value) === String(selectedResourceType.value),
|
|
|
);
|
|
|
@@ -714,9 +721,18 @@ const changeSearchMode = (mode) => {
|
|
|
}
|
|
|
|
|
|
searchMode.value = mode;
|
|
|
+ resourceTypePanelOpen.value = false;
|
|
|
refreshList();
|
|
|
};
|
|
|
|
|
|
+const toggleResourceTypePanel = () => {
|
|
|
+ if (searchMode.value === "fulltext") {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ resourceTypePanelOpen.value = !resourceTypePanelOpen.value;
|
|
|
+};
|
|
|
+
|
|
|
const toggleFavorite = async (item) => {
|
|
|
if (!item.formDefId || !item.formDataId) {
|
|
|
return;
|
|
|
@@ -936,9 +952,9 @@ const getPageList = async ({ append = false } = {}) => {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- const formData = res.data?.formData || {};
|
|
|
+ const formData = res.data?.formData || res.data || {};
|
|
|
const records = normalizeList(
|
|
|
- formData.records || formData.list || formData,
|
|
|
+ formData.records || formData.list || formData.rows || formData,
|
|
|
);
|
|
|
const normalizedRecords = records.map(normalizeRecord);
|
|
|
|
|
|
@@ -1082,7 +1098,7 @@ onBeforeUnmount(() => {
|
|
|
min-height: 100%;
|
|
|
width: 100%;
|
|
|
overflow-x: hidden;
|
|
|
-
|
|
|
+
|
|
|
background-size: 100% auto;
|
|
|
}
|
|
|
|
|
|
@@ -1146,8 +1162,8 @@ onBeforeUnmount(() => {
|
|
|
font-size: 28px;
|
|
|
flex-shrink: 0;
|
|
|
padding: 0 20px;
|
|
|
+
|
|
|
span {
|
|
|
- max-width: 82%;
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
|
white-space: nowrap;
|
|
|
@@ -1160,6 +1176,10 @@ onBeforeUnmount(() => {
|
|
|
border-bottom: 2px solid currentColor;
|
|
|
transform: rotate(45deg) translateY(-2px);
|
|
|
}
|
|
|
+
|
|
|
+ &.disabled {
|
|
|
+ cursor: default;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.resource-type-panel {
|
|
|
@@ -1357,8 +1377,8 @@ onBeforeUnmount(() => {
|
|
|
height: 54px;
|
|
|
padding: 0 18px;
|
|
|
border: 0;
|
|
|
- background: #E1C785;
|
|
|
- color: #842C1D;
|
|
|
+ background: #e1c785;
|
|
|
+ color: #842c1d;
|
|
|
border-radius: 6px;
|
|
|
display: inline-flex;
|
|
|
align-items: center;
|
|
|
@@ -1609,7 +1629,7 @@ onBeforeUnmount(() => {
|
|
|
&.confirm {
|
|
|
border-color: #9e452e;
|
|
|
background: #9e452e;
|
|
|
- color: #E1C785;
|
|
|
+ color: #e1c785;
|
|
|
}
|
|
|
}
|
|
|
|