diff --git a/src/api/index.js b/src/api/index.js index 1dff39a..638a04f 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,5 +1,7 @@ import axios from 'axios'; -let { proxyUrl } = require('@/config/setting'); +let { + proxyUrl +} = require('@/config/setting'); let proxyUrl1 = proxyUrl + '/workstation'; //查询民族列表 export const getNation = () => axios.post(`${proxyUrl1}/sys/nation/list`); @@ -26,32 +28,47 @@ export const create = (params) => // 查病历数据 export const queryAidRecord = (firstAidId, codeList) => axios.post(`${proxyUrl1}/firstAid/queryAidRecord`, { - param: { firstAidId, codeList }, + param: { + firstAidId, + codeList + }, }); // 更新急救code信息 export const saveAidRecord = (param) => - axios.post(`${proxyUrl1}/firstAid/saveAidRecord`, { param }); + axios.post(`${proxyUrl1}/firstAid/saveAidRecord`, { + param + }); // 更新急救基本信息 export const updateAidBase = (param) => - axios.post(`${proxyUrl1}/firstAid/update`, { param }); + axios.post(`${proxyUrl1}/firstAid/update`, { + param + }); //溶栓记录 export const queryLog = (param) => - axios.post(`${proxyUrl1}/firstAid/queryLog`, { param }); + axios.post(`${proxyUrl1}/firstAid/queryLog`, { + param + }); //医嘱查询 export const adviceQuery = (param) => - axios.post(`${proxyUrl1}/advice/query`, { param }); + axios.post(`${proxyUrl1}/advice/query`, { + param + }); //下发医嘱 export const adviceAdd = (params) => - axios.post(`${proxyUrl1}/advice/add`, { ...params }); + axios.post(`${proxyUrl1}/advice/add`, { + ...params + }); //推送结果 export const messageQuery = (firstAidId) => - axios.post(`${proxyUrl1}/message/query`, { firstAidId }); + axios.post(`${proxyUrl1}/message/query`, { + firstAidId + }); export function uploadIdcard(data) { return axios({ @@ -68,27 +85,37 @@ export const idcardInfo = `${proxyUrl1}/sys/ocr/idcardInfo`; // 创建急救身份证扫描 export const idcardInfoBase64 = (picBase64) => - axios.post(`${proxyUrl1}/sys/ocr/idcardInfoBase64`, { picBase64 }); + axios.post(`${proxyUrl1}/sys/ocr/idcardInfoBase64`, { + picBase64 + }); //知情同意新增 export const saveInformedConsent = (params) => - axios.post(`${proxyUrl1}/informed/saveInformedConsent`, { ...params }); + axios.post(`${proxyUrl1}/informed/saveInformedConsent`, { + ...params + }); // 查询是否有进行中的急救 export const queryFree = (params) => - axios.post(`${proxyUrl1}/firstAid/queryFree`, { ...params }); + axios.post(`${proxyUrl1}/firstAid/queryFree`, { + ...params + }); export const endFirstAid = (params) => axios.post(`${proxyUrl1}/firstAid/endFirstAid `, {}); //知情同意查询 export const queryConsentResult = (params) => axios.post(`${proxyUrl1}/informed/queryConsentResult`, { - param: { ...params }, + param: { + ...params + }, }); //查看知情同意时添加谈话时间 export const thTime = (params) => - axios.post(`${proxyUrl1}/firstAid/thTime`, { ...params }); + axios.post(`${proxyUrl1}/firstAid/thTime`, { + ...params + }); // 上传文件 export function uploadfile(data) { @@ -115,7 +142,11 @@ export function uploadBase64(data) { } // 查询平车状态 export const queryByPadNo = (params) => - axios.post(`${proxyUrl1}/car/queryByPadNo`, { param: { ...params } }); + axios.post(`${proxyUrl1}/car/queryByPadNo`, { + param: { + ...params + } + }); // 血样报告 export const queryFirstAidInspectData = (params) => axios.post(`${proxyUrl1}/firstAid/queryFirstAidInspectData`, { @@ -123,20 +154,34 @@ export const queryFirstAidInspectData = (params) => }); // 查询下一个节点 export const getNextNode = (params) => - axios.post(`${proxyUrl1}/firstAid/next`, { param: { ...params } }); + axios.post(`${proxyUrl1}/firstAid/next`, { + param: { + ...params + } + }); //导出急救记录 export const exportFirstAid = (params) => - axios.post(`${proxyUrl1}/firstAid/export`, { param: { ...params } }); + axios.post(`${proxyUrl1}/firstAid/export`, { + param: { + ...params + } + }); // 溶栓介入视频 export const queryVideo = (param) => - axios.post(`${proxyUrl1}/video/query`, { param: { ...param } }); + axios.post(`${proxyUrl1}/video/query`, { + param: { + ...param + } + }); // 溶栓介入视频 export const queryBook = (param) => axios.post(`${proxyUrl1}/informed/queryConsentTemplate`, { - param: { ...param }, + param: { + ...param + }, }); // 溶栓介入视频 @@ -147,80 +192,125 @@ export const queryWeight = (firstAidId) => // 修改急救信息 export const updateFirstAid = (params) => - axios.post(`${proxyUrl1}/firstAid/update`, { param: { ...params } }); + axios.post(`${proxyUrl1}/firstAid/update`, { + param: { + ...params + } + }); // ------------平车相关操作------------ // 授权 export const remoteAuth = (params) => - axios.post(`${proxyUrl1}/mqtt/remoteAuth`, { ...params }); + axios.post(`${proxyUrl1}/mqtt/remoteAuth`, { + ...params + }); // 电池容量 export const remoteKljCapacity = (params) => - axios.post(`${proxyUrl1}/mqtt/remoteKljCapacity`, { ...params }); + axios.post(`${proxyUrl1}/mqtt/remoteKljCapacity`, { + ...params + }); // 设备重启 export const remoteReboot = (params) => axios.post( `${proxyUrl1}/mqtt/remoteReboot - `, - { ...params } + `, { + ...params + } ); // 发送远程rfid消息 export const remoteRfid = (params) => axios.post( `${proxyUrl1}/mqtt/remoteRfid - `, - { ...params } + `, { + ...params + } ); // 发送远程设备心跳(校时)消息 export const remoteTime = (params) => axios.post( `${proxyUrl1}/mqtt/remoteTime - `, - { ...params } + `, { + ...params + } ); // 称重校准 export const remoteWeightCalibration = (params) => axios.post( `${proxyUrl1}/mqtt/remoteWeightCalibration - `, - { ...params } + `, { + ...params + } ); - + // 病例统计 export const getCtInfoPath = (params) => - axios.post(`${proxyUrl1}/firstAid/getCtInfoPath`, { ...params }); - - + axios.post(`${proxyUrl1}/firstAid/getCtInfoPath`, { + ...params + }); + + // 我的 export const loginInfo = (params) => - axios.post(`${proxyUrl1}/home/loginInfo`, { ...params } ); - + axios.post(`${proxyUrl1}/home/loginInfo`, { + ...params + }); + // RPT统计 export const queryRptResult = (params) => - axios.post(`${proxyUrl1}/home/queryRptResult`, { ...params }); + axios.post(`${proxyUrl1}/home/queryRptResult`, { + ...params + }); // DPT统计 / 血管内治疗率 export const queryDptResult = (params) => - axios.post(`${proxyUrl1}/home/queryDptResult`, { ...params }); + axios.post(`${proxyUrl1}/home/queryDptResult`, { + ...params + }); // 血管内治疗数据对比 export const selectXgzl = (params) => - axios.post(`${proxyUrl1}/home/selectXgzl`, { ...params }); + axios.post(`${proxyUrl1}/home/selectXgzl`, { + ...params + }); // SICH发生率 export const querySichResult = (params) => - axios.post(`${proxyUrl1}/home/querySichResult`, { ...params }); + axios.post(`${proxyUrl1}/home/querySichResult`, { + ...params + }); // SICHDNT分布 export const queryDntResult = (params) => - axios.post(`${proxyUrl1}/home/queryDntResult`, { ...params }); + axios.post(`${proxyUrl1}/home/queryDntResult`, { + ...params + }); // 静脉溶栓数据对比 / 静脉溶栓率 export const queryJmrs = (params) => - axios.post(`${proxyUrl1}/home/queryJmrs`, { ...params }); + axios.post(`${proxyUrl1}/home/queryJmrs`, { + ...params + }); // 病例统计数据分析 export const queryByDatePatient = (params) => - axios.post(`${proxyUrl1}/home/queryByDatePatient`, { ...params }); + axios.post(`${proxyUrl1}/home/queryByDatePatient`, { + ...params + }); // 病例统计 export const queryPatient = (params) => - axios.post(`${proxyUrl1}/home/queryPatient`, { ...params }); -// 介入手术记录/总报告 + axios.post(`${proxyUrl1}/home/queryPatient`, { + ...params + }); +// 介入手术记录/总报告/DNT时间表 export const operationLog = (params) => - axios.post(`${proxyUrl1}/interfere/operationLog`, { ...params }); - - + axios.post(`${proxyUrl1}/interfere/operationLog`, { + ...params + }); +// 创建急救 +export const createFirstAid = (params) => + axios.post(`${proxyUrl1}/firstAid/createFirstAid`, { + ...params + }); +export const createPatient = (params) => + axios.post(`${proxyUrl1}/firstAid/createPatient`, { + ...params + }); +export const eduitPatient = (params) => + axios.post(`${proxyUrl1}/firstAid/eduitPatient`, { + ...params + }); \ No newline at end of file diff --git a/src/api/login.js b/src/api/login.js index dd94432..633c5de 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -1,5 +1,14 @@ import axios from 'axios'; -let { proxyUrl } = require('@/config/setting'); +let { + proxyUrl +} = require('@/config/setting'); +let proxyUrl1 = proxyUrl + '/workstation'; // 登录 export const Login = (params) => axios.post(`${proxyUrl}/auth/pad/login`, params); + +export const Loginnew = (params) => + axios.post(`${proxyUrl}/auth/login`, params); +// 登录 +export const queryUser = (params) => + axios.post(`${proxyUrl1}/sys/queryUsername`, params); \ No newline at end of file diff --git a/src/assets/images/login-bg.png b/src/assets/images/login-bg.png new file mode 100644 index 0000000..b7afd45 Binary files /dev/null and b/src/assets/images/login-bg.png differ diff --git a/src/assets/images/logo.jpg b/src/assets/images/logo.jpg new file mode 100644 index 0000000..1f56988 Binary files /dev/null and b/src/assets/images/logo.jpg differ diff --git a/src/assets/less/common.less b/src/assets/less/common.less index 94c2d9c..f55903d 100644 --- a/src/assets/less/common.less +++ b/src/assets/less/common.less @@ -756,7 +756,7 @@ .informed-item { flex: 1; display: flex; - justify-content: space-between; + // justify-content: space-between; align-items: center; margin-bottom: 15px; margin-right: 10px; @@ -781,8 +781,8 @@ } .item-img { - // width: 120px; - flex: 1; + min-width: 120px; + // flex: 1; height: 40px; display: flex; align-items: center; diff --git a/src/config/setting.js b/src/config/setting.js index e16ff7e..950c4d7 100644 --- a/src/config/setting.js +++ b/src/config/setting.js @@ -28,7 +28,7 @@ const INDEX_SETTINGS = { development: { //开发环境 apiUrl: 'http://116.204.114.73:10050/carbasics2024-yf-gateway/', // apiUrl: 'http://192.168.0.6:9002', - proxyUrl: '', + proxyUrl: '/basic-api', publicPath: '', imgUrl: 'http://116.204.114.73:20007', }, diff --git a/src/layouts/BasicLayout.less b/src/layouts/BasicLayout.less index b594dc3..3e6e296 100644 --- a/src/layouts/BasicLayout.less +++ b/src/layouts/BasicLayout.less @@ -121,10 +121,8 @@ .ant-layout-content{ position: relative; - // box-shadow: -2px 0px 8px rgba(238, 238, 238, 0.6); /* 左边阴影 */ - .global-layout-content{ - height: calc(100vh - 6vw); + height: calc(100vh - 5vw); overflow-y: auto; padding: 10px; } diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index e823208..b17a390 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -86,7 +86,7 @@
@@ -188,9 +188,13 @@ }, onClose() { this.visible = false; + console.log('ddd') document.getElementById('globalLayoutContent').style.overflowY = 'auto'; this.current = this.current_ }, + logout(){ + this.$router.replace('/login') + } } } diff --git a/src/router/index.js b/src/router/index.js index d5b9dd5..c645c8a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -58,6 +58,11 @@ const routes = [{ // } ] }, + { + name: 'Login', + path: '/login', + component: () => import('@/views/login/index') + } // { // path: '/404', // component: () => import('@/views/exception/404') diff --git a/src/store/modules/patient/mutations.js b/src/store/modules/patient/mutations.js index 674da96..d52ae92 100644 --- a/src/store/modules/patient/mutations.js +++ b/src/store/modules/patient/mutations.js @@ -8,25 +8,25 @@ const mutations = { // 团注, 剂量, 每次进来复制为空 if (data.recordValDict) { if (!data.recordValDict['JMRS-TZJL']) { - data.recordValDict['JMRS-TZJL'] = [ - { - questionCode: 'JMRS-TZJL', - answer: [], - }, - ]; + data.recordValDict['JMRS-TZJL'] = [{ + questionCode: 'JMRS-TZJL', + answer: [], + }, ]; } if (!data.recordValDict['JMRS-JDJL']) { - data.recordValDict['JMRS-JDJL'] = [ - { - questionCode: 'JMRS-JDJL', - answer: [], - }, - ]; + data.recordValDict['JMRS-JDJL'] = [{ + questionCode: 'JMRS-JDJL', + answer: [], + }, ]; } } sessionStorage.setItem('patientData', JSON.stringify(data)); state.patientData = data; }, + setPatientDataCur(state, data) { + sessionStorage.setItem('patientDataCur', JSON.stringify(data)); + state.patientDataCur = data; + }, setTimerData(state, data) { state.timerData = data; }, @@ -47,4 +47,4 @@ const mutations = { }, }; -export default mutations; +export default mutations; \ No newline at end of file diff --git a/src/store/modules/patient/state.js b/src/store/modules/patient/state.js index a66b39a..2bd135c 100644 --- a/src/store/modules/patient/state.js +++ b/src/store/modules/patient/state.js @@ -1,5 +1,6 @@ const state = { patientData: {}, // 当前患者信息 + patientDataCur: {}, // 当前患者信息 timerData: {}, // 计时数据 nextNodeData: {}, overviewType: '', @@ -7,4 +8,4 @@ const state = { book: [], }; -export default state; +export default state; \ No newline at end of file diff --git a/src/store/modules/storm/actions.js b/src/store/modules/storm/actions.js index 8e0dd2d..9e79352 100644 --- a/src/store/modules/storm/actions.js +++ b/src/store/modules/storm/actions.js @@ -1,29 +1,44 @@ -import { Login } from '@/api/login.js'; +import { + Loginnew +} from '@/api/login.js'; const actions = { - toLogin({ commit, state }, { no }) { + toLogin({ + commit, + state + }, { + no + }) { return new Promise(async (resolve, reject) => { - try { - let padNo = state.APP_DEVICE_NO; - if (!padNo) return; - const res = await Login({ - param: { - padNo, - }, - }); - const { code, data, msg } = res; - if (code === 200) { - commit('setToken', data.access_token); - resolve(data); - } else { - reject(error); - message.error(msg); + try { + console.log('state', state.APP_DEVICE_NO) + console.log('no', no) + let padNo = state.APP_DEVICE_NO; + // if (!padNo) return; + const res = await Loginnew({ + ...no, + // param: { + // // padNo: '3333', + // ...no + // }, + }); + const { + code, + data, + msg + } = res; + if (code === 200) { + commit('setToken', data.access_token); + resolve(data); + } else { + reject(error); + message.error(msg); + } + } catch (error) { + throw new Error(error); } - } catch (error) { - throw new Error(error); - } - }) + }) .then((res) => [null, res]) .catch((error) => [error, null]); }, }; -export default actions; +export default actions; \ No newline at end of file diff --git a/src/views/Patient/components/patient-detail.vue b/src/views/Patient/components/patient-detail.vue index 51d105e..f4c0033 100644 --- a/src/views/Patient/components/patient-detail.vue +++ b/src/views/Patient/components/patient-detail.vue @@ -1,45 +1,11 @@