This commit is contained in:
lcw
2025-12-05 21:36:34 +08:00
parent 64ab9fc44c
commit b39387c4ed
97 changed files with 3342 additions and 298 deletions

View File

@ -10,7 +10,6 @@
</template>
<script setup>
import * as ocr from "@paddlejs-models/ocr";
import Watermark from "@/components/Watermark.vue";
import { ref, reactive, nextTick, provide, onMounted, getCurrentInstance, onBeforeUnmount } from "vue";
import { useStore } from "vuex";
@ -19,14 +18,15 @@ import { getItem, setItem } from "@/utils/storage";
import { generateNewStyle, writeNewStyle } from "@/utils/theme";
import { timeValidate } from "@/utils/tools";
import Fzq from '@/components/fzq/index.vue'
import router from "./router";
import * as ocr from "@paddlejs-models/ocr";
const { proxy } = getCurrentInstance();
const store = useStore();
generateNewStyle(store.getters.mainColor).then((newStyle) => {
writeNewStyle(newStyle);
});
// 只在首次加载时调用一次避免多次创建style元素
if (!document.getElementById('dynamic-theme-style')) {
generateNewStyle(store.getters.mainColor).then((newStyle) => {
writeNewStyle(newStyle);
});
}
const isRouterAlive = ref(true);
const reload = () => {
isRouterAlive.value = false;
@ -60,11 +60,18 @@ const initPage = async () => {
}
}
const content = ref([])
const frashJs = () => {
const sfzh = getItem("idEntityCard")
const userName = getItem("USERNAME")
// 获取初始水印内容
const getWatermarkContent = () => {
const sfzh = getItem("idEntityCard") || ''
const userName = getItem("USERNAME") || ''
const time = timeValidate()
content.value = [userName, sfzh, time, "林芝哨岗系统", "禁止泄露公民个人信息和警务工作秘密"]
return [userName, sfzh, time, "林芝哨岗系统", "禁止泄露公民个人信息和警务工作秘密"]
}
// 初始化水印内容
content.value = getWatermarkContent()
// 只在需要时调用,避免频繁更新导致重新渲染
const frashJs = () => {
content.value = getWatermarkContent()
}
// 监听标签页切换