From ad69e5adb24dc68929d57b67613a2bcf13ce0a05 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Thu, 5 Sep 2024 18:12:26 +0800 Subject: [PATCH] pacs --- public/sysConfig.json | 3 +- src/api/hadoopApi.js | 77 +++++ src/components/doctorCheck/CheckItemList.vue | 5 +- src/components/doctorCheck/CheckPicture.vue | 4 +- src/components/doctorCheck/PacsTemplate.vue | 278 +++++++++++++------ 5 files changed, 272 insertions(+), 95 deletions(-) create mode 100644 src/api/hadoopApi.js diff --git a/public/sysConfig.json b/public/sysConfig.json index 5cf6547..adc08ae 100644 --- a/public/sysConfig.json +++ b/public/sysConfig.json @@ -1,4 +1,5 @@ { "apiurl": "http://140.143.162.39:9529", - "softName": "神豚体检管理系统" + "softName": "神豚体检管理系统", + "pacsApi":"http://140.143.162.39:9530" } \ No newline at end of file diff --git a/src/api/hadoopApi.js b/src/api/hadoopApi.js new file mode 100644 index 0000000..e84561e --- /dev/null +++ b/src/api/hadoopApi.js @@ -0,0 +1,77 @@ +import request from "@/api/request"; +import store from "../store/index"; + +const sysConfig = getSysConfig() + +function getSysConfig() { + console.log('store', store.state.sysConfig) + if (store.state.sysConfig && store.state.sysConfig.apiurl) { + window.sessionStorage.setItem('sysConfig', JSON.stringify(store.state.sysConfig)) + return store.state.sysConfig + } else { + return JSON.parse(window.sessionStorage.getItem('sysConfig')) + } +} + +export async function hadoopGet(node, url, params = {}, config) { + return new Promise((resolve, reject) => { + request + .get(`${sysConfig[node] || sysConfig.apiurl}${url}`, { + params: params, + ...config, + }) + .then((res) => { + resolve(res); + }) + .catch((err) => { + reject(err.data); + }) + .finally(() => { }); + }); +} + +//axios封装post +export async function hadoopPost(node, url, paramsdata = {}, config) { + return new Promise((resolve, reject) => { + request + .post(`${sysConfig[node] || sysConfig.apiurl}${url}`, paramsdata, config) + .then((res) => { + resolve(res); + }) + .catch((err) => { + reject(err.data); + }) + .finally(() => { }); + }); +} +//axios封装deleteapi +export async function hadoopdDel(node, url, params = {}, config) { + return new Promise((resolve, reject) => { + request + .delete(`${sysConfig[node] || sysConfig.apiurl}${url}`, { + params: params, + ...config, + }) + .then((res) => { + resolve(res); + }) + .catch((err) => { + reject(err.data); + }) + .finally(() => { }); + }); +} +//axios封装Put方法 +export async function hadoopPut(node, url, params = {}, config) { + return new Promise((resolve, reject) => { + request + .put(`${sysConfig[node] || sysConfig.apiurl}${url}`, params, config) + .then((res) => { + resolve(res); + }) + .catch((err) => { + reject(err.data); + }) + .finally(() => { }); + }); +} \ No newline at end of file diff --git a/src/components/doctorCheck/CheckItemList.vue b/src/components/doctorCheck/CheckItemList.vue index 2ce6bb1..966960c 100644 --- a/src/components/doctorCheck/CheckItemList.vue +++ b/src/components/doctorCheck/CheckItemList.vue @@ -84,7 +84,7 @@ - + @@ -411,6 +411,7 @@ export default { // pacs结果模板 btnPacsResult(row, index){ + console.log('row, index',row, index) this.dialogWin.PacsTemplate = true }, @@ -537,7 +538,7 @@ export default { return ( restaurant["value"] .toLowerCase() - .indexOf(queryString.toLowerCase()) === 0 + .indexOf(queryString.toLowerCase()) > -1 ); }; }, diff --git a/src/components/doctorCheck/CheckPicture.vue b/src/components/doctorCheck/CheckPicture.vue index 594bc43..e584688 100644 --- a/src/components/doctorCheck/CheckPicture.vue +++ b/src/components/doctorCheck/CheckPicture.vue @@ -229,7 +229,7 @@ export default { this.$peisAPI.imageAcquisition(JSON.stringify(toOutShell)) .then(async (res) => { let lres = JSON.parse(res) - // console.log('this.$peisAPI.imageAcquisition',lres) + console.log('this.$peisAPI.imageAcquisition',lres) if (lres.code > -1) { for (let i = 0; i < lres.data.length; i++) { let item = lres.data[i]; @@ -267,6 +267,8 @@ export default { } } this.getCheckPictures(this.dataTransOpts.tableS.register_check.id) + }else{ + console.log('this.$peisAPI.imageAcquisition',lres.message) } }).catch(err => { this.$message.error(err) diff --git a/src/components/doctorCheck/PacsTemplate.vue b/src/components/doctorCheck/PacsTemplate.vue index 60b0653..fdeea4a 100644 --- a/src/components/doctorCheck/PacsTemplate.vue +++ b/src/components/doctorCheck/PacsTemplate.vue @@ -1,12 +1,13 @@