diff --git a/package.json b/package.json index c506467..802b5b4 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ }, "dependencies": { "@element-plus/icons-vue": "2.3.2", + "@fingerprintjs/fingerprintjs": "^5.1.0", "@vueup/vue-quill": "1.2.0", "@vueuse/core": "14.1.0", "axios": "1.13.2", @@ -32,6 +33,7 @@ "mitt": "^3.0.1", "nprogress": "0.2.0", "pinia": "3.0.4", + "pinia-plugin-persistedstate": "^4.7.1", "pinyin-pro": "^3.28.0", "sortablejs": "^1.15.7", "splitpanes": "4.0.4", diff --git a/src/api/login.ts b/src/api/login.ts index a2e4149..b2244f8 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -32,6 +32,18 @@ export function register(data: SysRegister): Promise { }) } +export function getLocalconfig(data: object) { + return request({ + url: '/getLocalconfig', + headers: { + isToken: false + }, + method: 'get', + params: data, + timeout: 20000 + }) +} + // 获取用户详细信息 export function getInfo(): Promise { return request({ diff --git a/src/assets/images/logo_new.png b/src/assets/images/logo_new.png new file mode 100644 index 0000000..74849a2 Binary files /dev/null and b/src/assets/images/logo_new.png differ diff --git a/src/store/index.ts b/src/store/index.ts index 944c3c6..db1107e 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,3 +1,5 @@ +import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' const store = createPinia() +store.use(piniaPluginPersistedstate) // 注册持久化插件 export default store diff --git a/src/store/modules/commonStore.ts b/src/store/modules/commonStore.ts new file mode 100644 index 0000000..76708b6 --- /dev/null +++ b/src/store/modules/commonStore.ts @@ -0,0 +1,37 @@ +//公共状态管理 +import { defineStore } from 'pinia' +// 定义配置对象接口 +interface DefaultConfig { + defaultinstr?: string //默认仪器 + lisgroupid?: string //默认分组id + [key: string]: any // 允许其他属性 +} +export const useCommonStore = defineStore('commonStore', { + state: () => ({ + lxsrs: [] as string[], // 存储项目模板名称 + fingerprint: '',// 存储指纹信息 + defaultConfig: {} as DefaultConfig, // 存储默认配置 + }), + actions: { + setLxsrList(list: any[]) { + this.lxsrs = list + }, + + setFingerprint(fingerprint: string) { + this.fingerprint = fingerprint + }, + + setDefaultConfig(config: DefaultConfig) { + this.defaultConfig = config + }, + }, + // 持久化配置 + persist: { + // 指定要持久化的状态字段 + pick: ['fingerprint', 'defaultConfig'], + // 可选配置:自定义存储键名(默认是store的id) + // key: 'common_store', + // 可选配置:指定存储位置(默认是localStorage 也可以用sessionStorage) + storage: localStorage, + } +}) \ No newline at end of file diff --git a/src/utils/useFingerprint.ts b/src/utils/useFingerprint.ts new file mode 100644 index 0000000..437770c --- /dev/null +++ b/src/utils/useFingerprint.ts @@ -0,0 +1,45 @@ + +import FingerprintJS from '@fingerprintjs/fingerprintjs'; + +export function useFingerprint() { + const fingerprint = ref(''); + const loading = ref(true); + const error = ref(null); + // 初始化FingerprintJS并获取指纹 + const getFingerprint = async () => { + try { + loading.value = true; + // 初始化代理 + const fp = await FingerprintJS.load({ + // 可选配置 + monitoring: false, + // 扩展结果数据 + //@ts-ignore + extendedResult: true + }); + + // 获取指纹信息 + const result = await fp.get(); + + // 指纹标识符 + fingerprint.value = result.visitorId; + + // 可以获取更多详细信息 + console.log('指纹详细信息:', result); + return result; + } catch (err) { + error.value = err; + console.error('获取指纹失败:', err); + return null; + } finally { + loading.value = false; + } + }; + + return { + fingerprint, + loading, + error, + getFingerprint + }; +} \ No newline at end of file diff --git a/src/views/liswork/Issueorder/components/info.vue b/src/views/liswork/Issueorder/components/info.vue index 9d0b966..ee364b1 100644 --- a/src/views/liswork/Issueorder/components/info.vue +++ b/src/views/liswork/Issueorder/components/info.vue @@ -109,7 +109,6 @@ const lastJgbz = ref(); watch(() => props.labPat, (newVal) => { lastValue.value = JSON.stringify(newVal); lastJgbz.value = newVal.zt; - console.log('newVal==>', newVal); }) diff --git a/src/views/liswork/Issueorder/components/multiConditionSearch.vue b/src/views/liswork/Issueorder/components/multiConditionSearch.vue deleted file mode 100644 index 46f108b..0000000 --- a/src/views/liswork/Issueorder/components/multiConditionSearch.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/views/liswork/Issueorder/index.vue b/src/views/liswork/Issueorder/index.vue index 58e7703..8ac701d 100644 --- a/src/views/liswork/Issueorder/index.vue +++ b/src/views/liswork/Issueorder/index.vue @@ -55,7 +55,31 @@
- + + + + + + + + + +
+ + 近3天 + 近7天 + 此日 + + + + + + +
+
+
{ }) } -const onSearch = (params) => { - queryPatList(params).then(res => { +const handleQuery = () => { + searchForm.value.begdate = dayjs(searchForm.value.begdate).format('YYYY-MM-DD') + ' 00:00:00' + searchForm.value.enddate = dayjs(searchForm.value.begdate).format('YYYY-MM-DD') + ' 23:59:59' + queryPatList(searchForm.value).then(res => { labPatList.value = res.data if (!res.data.length) { labpat.value = { @@ -189,10 +214,6 @@ const xmColumns = ref([ { field: 'yblx', title: '样本', align: 'center', resizable: true }, ]) -const setbilRef = useTemplateRef('setbilRef') -const BillingHandle = () => { - setbilRef.value.open() -} const processedTableData = ref([]) @@ -283,6 +304,7 @@ const formatDictzt = (value) => { } onMounted(() => { + searchForm.value.begdate = dayjs().format('YYYY-MM-DD') getXmList() getDictData('PT', 'SX', 'AU', 'BT', 'DP', 'SRD', 'ZJLX') }) @@ -312,7 +334,7 @@ onMounted(() => { .table-box { margin-top: 2px; - height: calc(100% - 30px); + height: calc(100% - 65px); } .el-form-item { @@ -352,4 +374,14 @@ onMounted(() => { color: #000; font-weight: 700; } + +.radio_box { + display: flex; + align-items: center; + margin: .125rem 0; + + .el-radio { + margin-right: .3125rem; + } +} \ No newline at end of file diff --git a/src/views/login.vue b/src/views/login.vue index f0275e2..e51c75b 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -1,219 +1,327 @@ - + +.login-logo img { + height: 40px; + width: auto; +} + +.login-split { + width: 1px; + height: 30px; + background-color: #ccc; + margin: 0 15px; +} + +.login-title h1 { + margin: 0; + font-size: 24px; + color: #1989fa; + font-weight: 500; +} + +/* Tab容器样式(修复冲突) */ +.login-tabs { + width: 100%; + height: 350px; + overflow: hidden; + border-radius: 8px; + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + border: 1px solid rgba(255, 255, 255, 0.1); + padding: 1px 10px 10px; + background: transparent; + + :deep(.el-tabs__header) { + background: transparent; + margin: 0; + } + + :deep(.el-tabs__nav-prev), + :deep(.el-tabs__nav-next) { + display: none !important; // 隐藏Tab左右箭头 + } + + :deep(.el-tabs__nav-wrap) { + overflow: visible !important; + } +} + +.custom-select { + margin-top: 20px; + /* 可根据需求调整数值 */ +} + +/* Tab占位样式 */ +.tab-placeholder { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 40px 0; + color: #666; + height: calc(100% - 40px); // 适配Tab容器高度 + + .placeholder-icon { + font-size: 48px; + margin-bottom: 20px; + color: #ccc; + } + + .wechat-login-btn { + margin-top: 20px; + width: 200px; + } +} + +/* 隐藏必填项星号 */ +:deep(.el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap .el-form-item__asterisk) { + display: none !important; +} + \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 01a0484..3d7a804 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -48,7 +48,7 @@ export default defineConfig(({ mode, command }) => { proxy: { // https://cn.vitejs.dev/config/#server-proxy '/dev-api': { - target: 'http://47.97.125.165:8905', + target: 'http://47.97.125.165:8904', changeOrigin: true, rewrite: (p) => p.replace(/^\/dev-api/, '') },