|
@@ -111,15 +111,20 @@
|
|
<AlertOutlined class="icon-font icon-font-size-20" />
|
|
<AlertOutlined class="icon-font icon-font-size-20" />
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
- @click="switchGroupDialog"
|
|
|
|
- class="tw-overflow-ellipsis tw-overflow-hidden tw-whitespace-nowrap"
|
|
|
|
|
|
+ @click="openSwitchGroupModal"
|
|
|
|
+ class="tw-flex tw-place-content-center tw-cursor-pointer"
|
|
style="max-width: 8%"
|
|
style="max-width: 8%"
|
|
:title="group?.title"
|
|
:title="group?.title"
|
|
>
|
|
>
|
|
- {{ group?.title }}
|
|
|
|
|
|
+ <div
|
|
|
|
+ class="tw-overflow-ellipsis tw-overflow-hidden tw-whitespace-nowrap tw-mr-1"
|
|
|
|
+ >
|
|
|
|
+ {{ group?.title }}
|
|
|
|
+ </div>
|
|
<DownOutlined
|
|
<DownOutlined
|
|
- v-if="!store.setting.forceMode"
|
|
|
|
- style="font-size: 12px; display: inline-flex"
|
|
|
|
|
|
+ v-if="store.groups.length > 1"
|
|
|
|
+ style="font-size: 12px; display: inline-block"
|
|
|
|
+ class="tw-self-center"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
@@ -139,6 +144,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<MarkChangeProfile ref="changeProfileRef" />
|
|
<MarkChangeProfile ref="changeProfileRef" />
|
|
|
|
+ <MarkSwitchGroupDialog ref="switchGroupRef" />
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
@@ -158,6 +164,7 @@ import {
|
|
} from "@ant-design/icons-vue";
|
|
} from "@ant-design/icons-vue";
|
|
import { ModeEnum } from "@/types";
|
|
import { ModeEnum } from "@/types";
|
|
import MarkChangeProfile from "./MarkChangeProfile.vue";
|
|
import MarkChangeProfile from "./MarkChangeProfile.vue";
|
|
|
|
+import MarkSwitchGroupDialog from "./MarkSwitchGroupDialog.vue";
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: "MarkHeader",
|
|
name: "MarkHeader",
|
|
@@ -172,6 +179,7 @@ export default defineComponent({
|
|
AlertOutlined,
|
|
AlertOutlined,
|
|
QuestionCircleOutlined,
|
|
QuestionCircleOutlined,
|
|
MarkChangeProfile,
|
|
MarkChangeProfile,
|
|
|
|
+ MarkSwitchGroupDialog,
|
|
},
|
|
},
|
|
setup() {
|
|
setup() {
|
|
const modeName = computed(() =>
|
|
const modeName = computed(() =>
|
|
@@ -231,11 +239,6 @@ export default defineComponent({
|
|
return store.setting.uiSetting["answer.paper.scale"] < 1;
|
|
return store.setting.uiSetting["answer.paper.scale"] < 1;
|
|
});
|
|
});
|
|
|
|
|
|
- async function switchGroupDialog() {
|
|
|
|
- const groups = await getGroups();
|
|
|
|
- console.log(groups);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
async function updateHistoryTask({
|
|
async function updateHistoryTask({
|
|
pageNumber = 1,
|
|
pageNumber = 1,
|
|
pageSize = 10,
|
|
pageSize = 10,
|
|
@@ -268,11 +271,17 @@ export default defineComponent({
|
|
const changeProfileRef = ref(null);
|
|
const changeProfileRef = ref(null);
|
|
|
|
|
|
const openProfileModal = () => {
|
|
const openProfileModal = () => {
|
|
- console.log(changeProfileRef.value);
|
|
|
|
// @ts-ignore
|
|
// @ts-ignore
|
|
changeProfileRef.value?.showModal();
|
|
changeProfileRef.value?.showModal();
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ const switchGroupRef = ref(null);
|
|
|
|
+
|
|
|
|
+ const openSwitchGroupModal = () => {
|
|
|
|
+ // @ts-ignore
|
|
|
|
+ switchGroupRef.value?.showModal();
|
|
|
|
+ };
|
|
|
|
+
|
|
return {
|
|
return {
|
|
store,
|
|
store,
|
|
modeName,
|
|
modeName,
|
|
@@ -287,10 +296,11 @@ export default defineComponent({
|
|
lessThanOneScale,
|
|
lessThanOneScale,
|
|
updateHistoryTask,
|
|
updateHistoryTask,
|
|
toggleHistory,
|
|
toggleHistory,
|
|
- switchGroupDialog,
|
|
|
|
logout,
|
|
logout,
|
|
changeProfileRef,
|
|
changeProfileRef,
|
|
openProfileModal,
|
|
openProfileModal,
|
|
|
|
+ switchGroupRef,
|
|
|
|
+ openSwitchGroupModal,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
});
|
|
});
|