lucky 4 years ago
parent
commit
c5c9e44bd2
  1. 162
      package-lock.json
  2. 34
      src/App.vue
  3. 2
      src/common/portrait.styl
  4. 36
      src/components/BiologicalSampleSearch/Search.vue
  5. 99
      src/components/CaseTable/CaseTable.vue
  6. 113
      src/components/Echarts/Categorymap.vue
  7. 84
      src/components/Echarts/Cisualmap.vue
  8. 64
      src/components/Echarts/Piemap.vue
  9. 39
      src/components/Echarts/Treemap.vue
  10. 19
      src/components/PatientInfo/PatientTable.vue
  11. 15
      src/components/PatientInfo/Search.vue
  12. 18
      src/config/api.js
  13. 9
      src/store/modules/home/mutations.js
  14. 1
      src/store/modules/home/state.js
  15. 1061
      src/views/CaseSearch/CaseSearch.vue
  16. 966
      src/views/PatientInfo/PatientInfo.vue

162
package-lock.json

@ -1808,6 +1808,16 @@
"integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
"dev": true "dev": true
}, },
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"cacache": { "cacache": {
"version": "13.0.1", "version": "13.0.1",
"resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1594427999421&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz", "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1594427999421&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz",
@ -1840,6 +1850,34 @@
"integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=",
"dev": true "dev": true
}, },
"chalk": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"css-loader": { "css-loader": {
"version": "3.6.0", "version": "3.6.0",
"resolved": "https://registry.npm.taobao.org/css-loader/download/css-loader-3.6.0.tgz?cache=0&sync_timestamp=1604507107408&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-loader%2Fdownload%2Fcss-loader-3.6.0.tgz", "resolved": "https://registry.npm.taobao.org/css-loader/download/css-loader-3.6.0.tgz?cache=0&sync_timestamp=1604507107408&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-loader%2Fdownload%2Fcss-loader-3.6.0.tgz",
@ -1893,6 +1931,13 @@
"universalify": "^0.1.0" "universalify": "^0.1.0"
} }
}, },
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"icss-utils": { "icss-utils": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npm.taobao.org/icss-utils/download/icss-utils-4.1.1.tgz?cache=0&sync_timestamp=1602527330977&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ficss-utils%2Fdownload%2Ficss-utils-4.1.1.tgz", "resolved": "https://registry.npm.taobao.org/icss-utils/download/icss-utils-4.1.1.tgz?cache=0&sync_timestamp=1602527330977&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ficss-utils%2Fdownload%2Ficss-utils-4.1.1.tgz",
@ -2007,6 +2052,16 @@
"minipass": "^3.1.1" "minipass": "^3.1.1"
} }
}, },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"terser-webpack-plugin": { "terser-webpack-plugin": {
"version": "2.3.8", "version": "2.3.8",
"resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz?cache=0&sync_timestamp=1603881757308&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.8.tgz", "resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz?cache=0&sync_timestamp=1603881757308&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.8.tgz",
@ -2023,6 +2078,32 @@
"terser": "^4.6.12", "terser": "^4.6.12",
"webpack-sources": "^1.4.3" "webpack-sources": "^1.4.3"
} }
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.1.2",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.1.2.tgz",
"integrity": "sha512-8QTxh+Fd+HB6fiL52iEVLKqE9N1JSlMXLR92Ijm6g8PZrwIxckgpqjPDWRP5TWxdiPaHR+alUWsnu1ShQOwt+Q==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
}
}
} }
} }
}, },
@ -12596,87 +12677,6 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.1.2",
"resolved": "https://registry.npm.taobao.org/vue-loader/download/vue-loader-16.1.2.tgz",
"integrity": "sha1-XAO2xQ0qX5g8fOuhXFDXjKKymPQ=",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1611327117754&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz",
"integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.0",
"resolved": "https://registry.npm.taobao.org/chalk/download/chalk-4.1.0.tgz?cache=0&sync_timestamp=1591686984650&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-4.1.0.tgz",
"integrity": "sha1-ThSHCmGNni7dl92DRf2dncMVZGo=",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz",
"integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
"integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz",
"integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz",
"integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1611394043517&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz",
"integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-quill-editor": { "vue-quill-editor": {
"version": "3.0.6", "version": "3.0.6",
"resolved": "https://registry.npm.taobao.org/vue-quill-editor/download/vue-quill-editor-3.0.6.tgz", "resolved": "https://registry.npm.taobao.org/vue-quill-editor/download/vue-quill-editor-3.0.6.tgz",

34
src/App.vue

@ -1,10 +1,3 @@
<!--
* @Author: wally
* @email: 18603454788@163.com
* @Date: 2021-02-19 17:44:32
* @LastEditors: wally
* @LastEditTime: 2021-02-20 09:15:41
-->
<template> <template>
<a-config-provider :locale="zh_CN"> <a-config-provider :locale="zh_CN">
<div class="d-flex flex-row flex-nowrap" id="app"> <div class="d-flex flex-row flex-nowrap" id="app">
@ -18,6 +11,7 @@
import { mapState, mapActions, mapMutations } from 'vuex'; import { mapState, mapActions, mapMutations } from 'vuex';
import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN'; import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN';
import BtnCon from 'components/BtnCom/BtnCon.vue'; import BtnCon from 'components/BtnCom/BtnCon.vue';
import { getHId } from 'config/api';
export default { export default {
name: 'App', name: 'App',
@ -38,9 +32,13 @@ export default {
}, },
created() { created() {
// const userId = '1218763410024566784'; const userId = '1218763410024566784';
// const params = { userId }; const params = { userId };
// this.getUserId(params); this.getUserId(params);
this.getHospitalId();
if (sessionStorage.getItem('patientId')) {
this.setPatientId(sessionStorage.getItem('patientId'));
}
const that = this; const that = this;
window.plugin = window.TallPlugin.init(); window.plugin = window.TallPlugin.init();
// created created便 // created created便
@ -54,7 +52,21 @@ export default {
methods: { methods: {
...mapActions('home', ['getUserId']), ...mapActions('home', ['getUserId']),
...mapMutations('home', ['setPtProps']), ...mapMutations('home', ['setPtProps', 'setHospitalId', 'setPatientId']),
async getHospitalId() {
try {
const res = await getHId(1);
const { code, msg, data } = res.data;
if (code === 200) {
this.setHospitalId(data.id);
} else {
this.$message.error('医院查询失败');
}
} catch (error) {
this.$message.error(error);
}
},
}, },
}; };
</script> </script>

2
src/common/portrait.styl

@ -183,6 +183,8 @@
.white--text{ .white--text{
color: #fff; color: #fff;
width: 200px;
margin: 0 auto
} }

36
src/components/BiologicalSampleSearch/Search.vue

@ -5,7 +5,7 @@
<a-form :form="form" @submit="handleSubmit" class="d-flex flex-nowrap align-center" layout="inline"> <a-form :form="form" @submit="handleSubmit" class="d-flex flex-nowrap align-center" layout="inline">
<a-form-item> <a-form-item>
<a-select placeholder="请选择医院" style="min-width: 150px" v-decorator="['hospital']"> <a-select placeholder="请选择医院" style="min-width: 150px" v-decorator="['hospital']">
<a-select-option :key="item.id" :value="item.id" v-for="item in hospitals">{{ item.title }}</a-select-option> <a-select-option :key="item.id" :value="item.id" v-for="item in hospitals">{{ item.name }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
@ -29,29 +29,13 @@
</template> </template>
<script> <script>
import { getHList } from 'config/api';
export default { export default {
name: 'Search', name: 'Search',
data() { data() {
return { return {
form: this.$form.createForm(this, { name: 'search' }), form: this.$form.createForm(this, { name: 'search' }),
hospitals: [ hospitals: [],
{
id: 1,
title: '山西中医大学附属医院',
},
{
id: 2,
title: '山西人民医院',
},
{
id: 3,
title: '大同第五人民医院',
},
{
id: 4,
title: '大同国药同煤总医院',
},
],
types: [ types: [
{ {
id: 0, id: 0,
@ -86,7 +70,19 @@ export default {
], ],
}; };
}, },
async created() {
try {
const res = await getHList();
const { code, msg, data } = res.data;
if (code === 200) {
this.hospitals = data;
} else {
this.$message.error('查询医院列表失败');
}
} catch (error) {
this.$message.error('查询医院列表失败');
}
},
methods: { methods: {
// //
handleSubmit(e) { handleSubmit(e) {

99
src/components/CaseTable/CaseTable.vue

@ -0,0 +1,99 @@
<template>
<div>
<!-- search -->
<div style="width: 100%" v-if="lists && lists.list && lists.list.length > 0">
<a-table
:columns="columns"
:data-source="lists.list"
:loading="loading"
:pagination="pagination"
:row-key="record => record.id"
@change="setData"
bordered
class="white pa-3"
>
<template slot="hospitalId" slot-scope="text, record">
<span>{{ record.hospitalId }}</span>
</template>
<template slot="inputStatus" slot-scope="text, record">
<span v-if="record.inputStatus === 0">新建</span>
<span v-else-if="record.inputStatus === 1">数据搜集中</span>
<span v-else-if="record.inputStatus === 2">数据搜集完成</span>
<span v-else-if="record.inputStatus === 3">数据搜集超时</span>
<span v-else-if="record.inputStatus === 4">废弃</span>
</template>
</a-table>
</div>
<a-empty v-else />
</div>
</template>
<script>
import { mapMutations, mapState } from 'vuex';
const columns = [
{
title: '住院号',
align: 'center',
dataIndex: 'hospitalization',
key: 'hospitalization',
},
{
title: '医院',
align: 'center',
dataIndex: 'hosName',
key: 'hosName',
scopedSlots: { customRender: 'hosName' },
},
{
title: '对照组',
align: 'center',
dataIndex: 'name',
key: 'name',
scopedSlots: { customRender: 'name' },
},
{
title: '录入状态',
align: 'center',
dataIndex: 'inputStatus',
key: 'inputStatus',
scopedSlots: { customRender: 'inputStatus' },
},
];
export default {
name: 'CaseTable',
props: { lists: { type: Object, default: null } },
data() {
return {
columns,
loading: false,
};
},
computed: {
pagination() {
const { pageNum, pageSize, total } = this.lists;
return {
current: pageNum,
pageSize,
total: +total,
};
},
},
methods: {
...mapMutations('home', ['setPatientId']),
//
chooseItem(id) {
this.setPatientId(id);
},
setData(pagination) {
const { current } = pagination;
this.$emit('setData', current);
},
},
};
</script>

113
src/components/Echarts/Categorymap.vue

@ -12,7 +12,7 @@
</div> </div>
</template> </template>
<script> <script>
import { countAnalysis } from 'config/api'; import { HospitalComplete } from 'config/api';
export default { export default {
name: 'Categorymap', name: 'Categorymap',
data() { data() {
@ -22,26 +22,32 @@ export default {
height: '', height: '',
timer: null, timer: null,
list: [], list: [],
xDataList: [],
aList: [], //
bList: [], //
cList: [], //
dList: [], //
eList: [], //
}; };
}, },
mounted() { mounted() {
this.drawLine(); this.drawLine();
this.timer = setInterval(() => { // this.timer = setInterval(() => {
this.drawLine(); // this.drawLine();
}, 10000); // }, 10000);
let wh = window.innerWidth; // let wh = window.innerWidth;
let hg = window.innerHeight; // let hg = window.innerHeight;
this.width = wh + 'px'; // this.width = wh + 'px';
this.height = hg + 'px'; // this.height = hg + 'px';
console.log(this.height); // console.log(this.height);
window.onresize = () => { // window.onresize = () => {
return (() => { // return (() => {
wh = window.innerWidth; // wh = window.innerWidth;
hg = window.innerHeight; // hg = window.innerHeight;
this.width = wh + 'px'; // this.width = wh + 'px';
this.height = hg + 'px'; // this.height = hg + 'px';
})(); // })();
}; // };
}, },
destroyed() { destroyed() {
clearInterval(this.timer); clearInterval(this.timer);
@ -50,17 +56,18 @@ export default {
async drawLine() { async drawLine() {
// domecharts // domecharts
let myChart = this.$echarts.init(document.getElementById('Categorymap')); let myChart = this.$echarts.init(document.getElementById('Categorymap'));
await this.getData();
// //
var option = { var option = {
legend: { legend: {
data: ['未完成', '已完成', '进行中', '废弃'], data: ['未完成', '已完成', '进行中', '废弃', '数据采集超时'],
top: 30, top: 30,
}, },
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
axisTick: { show: false }, axisTick: { show: false },
data: ['附属医院', '人民医院', '第五人民医院', '国药同煤总医院'], data: this.xDataList,
}, },
], ],
yAxis: [{ type: 'value' }], yAxis: [{ type: 'value' }],
@ -71,7 +78,7 @@ export default {
barGap: 0, barGap: 0,
// label: labelOption, // label: labelOption,
emphasis: { focus: 'series' }, emphasis: { focus: 'series' },
data: [320, 332, 301, 334], data: this.aList,
barWidth: 20, barWidth: 20,
itemStyle: { itemStyle: {
normal: { normal: {
@ -102,7 +109,7 @@ export default {
type: 'bar', type: 'bar',
// label: labelOption, // label: labelOption,
emphasis: { focus: 'series' }, emphasis: { focus: 'series' },
data: [220, 182, 191, 234], data: this.bList,
barWidth: 20, barWidth: 20,
itemStyle: { itemStyle: {
normal: { normal: {
@ -133,7 +140,7 @@ export default {
type: 'bar', type: 'bar',
// label: labelOption, // label: labelOption,
emphasis: { focus: 'series' }, emphasis: { focus: 'series' },
data: [150, 232, 201, 154], data: this.cList,
barWidth: 20, barWidth: 20,
itemStyle: { itemStyle: {
normal: { normal: {
@ -164,7 +171,38 @@ export default {
type: 'bar', type: 'bar',
// label: labelOption, // label: labelOption,
emphasis: { focus: 'series' }, emphasis: { focus: 'series' },
data: [98, 77, 101, 99], data: this.dList,
barWidth: 20,
itemStyle: {
normal: {
label: {
formatter: '{c}',
show: true,
position: 'top',
textStyle: {
fontSize: '12',
color: '#000',
},
},
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#f00' }, //
{ offset: 1, color: '#F00' }, //
]),
},
emphasis: {
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#F00' }, //
{ offset: 1, color: '#F00' }, //
]),
},
},
},
{
name: '数据采集超时',
type: 'bar',
// label: labelOption,
emphasis: { focus: 'series' },
data: this.eList,
barWidth: 20, barWidth: 20,
itemStyle: { itemStyle: {
normal: { normal: {
@ -196,28 +234,29 @@ export default {
}, },
async getData() { async getData() {
try { try {
const params = { const params = { param: {} };
param: { const res = await HospitalComplete(params);
conditionList: [],
conditionListDate: [],
hospitalId: '',
hospitalization: '',
inpatientId: '',
inputStatus: '',
testQuestionsId: '',
},
};
const res = await countAnalysis(params);
const { code, msg, data } = res.data; const { code, msg, data } = res.data;
if (code === 200) { if (code === 200) {
this.list = data; console.log(data);
for (let i = 0; i < data.length; i++) {
this.forList(data[i]);
}
} else { } else {
console.log(msg); this.$message.error('获取数据失败');
} }
} catch (error) { } catch (error) {
this.$message.error('获取数据失败'); this.$message.error('获取数据失败');
} }
}, },
forList(obj) {
this.xDataList.push(obj.hospitalName);
this.aList.push(obj.unfinished);
this.bList.push(obj.completed);
this.cList.push(obj.underway);
this.dList.push(obj.discarded);
this.eList.push(obj.overtime);
},
}, },
}; };
</script> </script>

84
src/components/Echarts/Cisualmap.vue

@ -16,46 +16,63 @@ export default {
height: '', height: '',
timer: null, timer: null,
list: [], list: [],
dateList1: [], //
dataList1: [], //
dateList2: [], //
dataList2: [], //
}; };
}, },
mounted() { mounted() {
this.drawLine(); this.drawLine();
this.timer = setInterval(() => { // this.timer = setInterval(() => {
this.drawLine(); // this.drawLine();
}, 10000); // }, 10000);
let wh = window.innerWidth; // let wh = window.innerWidth;
let hg = window.innerHeight; // let hg = window.innerHeight;
this.width = wh + 'px'; // this.width = wh + 'px';
this.height = hg + 'px'; // this.height = hg + 'px';
console.log(this.height); // console.log(this.height);
window.onresize = () => { // window.onresize = () => {
return (() => { // return (() => {
wh = window.innerWidth; // wh = window.innerWidth;
hg = window.innerHeight; // hg = window.innerHeight;
this.width = wh + 'px'; // this.width = wh + 'px';
this.height = hg + 'px'; // this.height = hg + 'px';
})(); // })();
}; // };
}, },
methods: { methods: {
async drawLine() { async drawLine() {
// domecharts // domecharts
let myChart1 = this.$echarts.init(document.getElementById('Cisualmap1')); let myChart1 = this.$echarts.init(document.getElementById('Cisualmap1'));
let myChart2 = this.$echarts.init(document.getElementById('Cisualmap2')); let myChart2 = this.$echarts.init(document.getElementById('Cisualmap2'));
await this.getData();
// //
var option1 = { var option1 = {
title: { title: {
left: 'center', left: 'center',
text: '新建病例', text: '新建病例',
}, },
dataZoom: [
{
type: 'slider',
xAxisIndex: 0,
filterMode: 'empty',
},
{
type: 'inside',
xAxisIndex: 0,
filterMode: 'empty',
},
],
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], data: this.dateList1,
}, },
yAxis: { type: 'value' }, yAxis: { type: 'value' },
series: [ series: [
{ {
data: [820, 932, 901, 934, 1290, 1330, 1320], data: this.dataList1,
type: 'line', type: 'line',
areaStyle: { color: 'rgba(229,244,254,1)' }, areaStyle: { color: 'rgba(229,244,254,1)' },
lineStyle: { color: 'rgb(45,151,213)' }, lineStyle: { color: 'rgb(45,151,213)' },
@ -69,14 +86,26 @@ export default {
left: 'center', left: 'center',
text: '已完成病例', text: '已完成病例',
}, },
dataZoom: [
{
type: 'slider',
xAxisIndex: 0,
filterMode: 'empty',
},
{
type: 'inside',
xAxisIndex: 0,
filterMode: 'empty',
},
],
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], data: this.dateList2,
}, },
yAxis: { type: 'value' }, yAxis: { type: 'value' },
series: [ series: [
{ {
data: [820, 932, 901, 934, 1290, 1330, 1320], data: this.dataList2,
type: 'line', type: 'line',
areaStyle: { color: 'rgba(229,244,254,1)' }, areaStyle: { color: 'rgba(229,244,254,1)' },
lineStyle: { color: 'rgb(45,151,213)' }, lineStyle: { color: 'rgb(45,151,213)' },
@ -101,7 +130,12 @@ export default {
const res = await countCase(params); const res = await countCase(params);
const { code, msg, data } = res.data; const { code, msg, data } = res.data;
if (code === 200) { if (code === 200) {
this.list = data; for (let i = 0; i < data.newNums.length; i++) {
this.forNewList(data.newNums[i]);
}
for (let i = 0; i < data.overNums.length; i++) {
this.forOverList(data.overNums[i]);
}
} else { } else {
console.log(msg); console.log(msg);
} }
@ -109,6 +143,14 @@ export default {
this.$message.error('获取数据失败'); this.$message.error('获取数据失败');
} }
}, },
forNewList(obj) {
this.dateList1.push(obj.shijian);
this.dataList1.push(obj.nums);
},
forOverList(obj) {
this.dateList2.push(obj.shijian);
this.dataList2.push(obj.nums);
},
}, },
}; };
</script> </script>

64
src/components/Echarts/Piemap.vue

@ -5,6 +5,7 @@
</div> </div>
</template> </template>
<script> <script>
import { selAllYBS } from 'config/api';
export default { export default {
name: 'Piemap', name: 'Piemap',
data() { data() {
@ -13,26 +14,27 @@ export default {
width: '', width: '',
height: '', height: '',
timer: null, timer: null,
dataList: [],
}; };
}, },
mounted() { mounted() {
this.drawLine(); this.drawLine();
this.timer = setInterval(() => { // this.timer = setInterval(() => {
this.drawLine(); // this.drawLine();
}, 10000); // }, 10000);
let wh = window.innerWidth; // let wh = window.innerWidth;
let hg = window.innerHeight; // let hg = window.innerHeight;
this.width = wh + 'px'; // this.width = wh + 'px';
this.height = hg + 'px'; // this.height = hg + 'px';
console.log(this.height); // console.log(this.height);
window.onresize = () => { // window.onresize = () => {
return (() => { // return (() => {
wh = window.innerWidth; // wh = window.innerWidth;
hg = window.innerHeight; // hg = window.innerHeight;
this.width = wh + 'px'; // this.width = wh + 'px';
this.height = hg + 'px'; // this.height = hg + 'px';
})(); // })();
}; // };
}, },
destroyed() { destroyed() {
clearInterval(this.timer); clearInterval(this.timer);
@ -42,6 +44,7 @@ export default {
// domecharts // domecharts
let myChart = this.$echarts.init(document.getElementById('Piemap')); let myChart = this.$echarts.init(document.getElementById('Piemap'));
// //
await this.getData();
var option = { var option = {
color: ['#FE9C58', '#7AEBFF', '#FFCC00', '#744CFF'], color: ['#FE9C58', '#7AEBFF', '#FFCC00', '#744CFF'],
legend: { top: 'bottom' }, legend: { top: 'bottom' },
@ -49,21 +52,36 @@ export default {
{ {
name: '面积模式', name: '面积模式',
type: 'pie', type: 'pie',
radius: [20, 120], radius: [20, 100],
center: ['50%', '50%'], center: ['50%', '50%'],
roseType: 'area', roseType: 'area',
itemStyle: { borderRadius: 8 }, itemStyle: { borderRadius: 8 },
data: [ data: this.dataList,
{ value: 40, name: '附属医院' },
{ value: 38, name: '人民医院' },
{ value: 32, name: '第五医院' },
{ value: 30, name: '国药同煤总医院' },
],
}, },
], ],
}; };
myChart.setOption(option); myChart.setOption(option);
}, },
async getData() {
try {
const res = await selAllYBS();
const { code, msg, data } = res.data;
if (code === 200) {
// console.log(data);
for (let i = 0; i < data.length; i++) {
var obj = {
value: data[i].nums,
name: data[i].name,
};
this.dataList.push(obj);
}
} else {
console.log(msg);
}
} catch (error) {
console.log(error);
}
},
}, },
}; };
</script> </script>

39
src/components/Echarts/Treemap.vue

@ -12,6 +12,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapState } from 'vuex';
import { complete } from 'config/api'; import { complete } from 'config/api';
export default { export default {
name: 'Treemap', name: 'Treemap',
@ -24,24 +25,25 @@ export default {
timer: null, timer: null,
}; };
}, },
computed: mapState('home', ['ptProps', 'hospitalId']),
mounted() { mounted() {
// this.drawLine();
// this.timer = setInterval(() => {
this.drawLine(); this.drawLine();
this.timer = setInterval(() => { // }, 10000);
this.drawLine(); // let wh = window.innerWidth;
}, 10000); // let hg = window.innerHeight;
let wh = window.innerWidth; // this.width = wh + 'px';
let hg = window.innerHeight; // this.height = hg + 'px';
this.width = wh + 'px'; // console.log(this.height);
this.height = hg + 'px'; // window.onresize = () => {
console.log(this.height); // return (() => {
window.onresize = () => { // wh = window.innerWidth;
return (() => { // hg = window.innerHeight;
wh = window.innerWidth; // this.width = wh + 'px';
hg = window.innerHeight; // this.height = hg + 'px';
this.width = wh + 'px'; // })();
this.height = hg + 'px'; // };
})();
};
}, },
destroyed() { destroyed() {
clearInterval(this.timer); clearInterval(this.timer);
@ -50,6 +52,7 @@ export default {
async drawLine() { async drawLine() {
// domecharts // domecharts
await this.getData(); await this.getData();
console.log(this.valueList);
let myChart = this.$echarts.init(document.getElementById('Treemap')); let myChart = this.$echarts.init(document.getElementById('Treemap'));
// //
var option = { var option = {
@ -87,8 +90,8 @@ export default {
async getData() { async getData() {
const params = { const params = {
param: { param: {
hospitalId: '', hospitalId: this.ptProps && this.ptProps.hospitalId ? this.ptProps.hospitalId : '',
userId: '', userId: this.ptProps && this.ptProps.userId ? this.ptProps.userId : '',
}, },
}; };
const res = await complete(params); const res = await complete(params);

19
src/components/PatientInfo/PatientTable.vue

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- search --> <!-- search -->
<div style="width:100%" v-if="lists && lists.list && lists.list.length > 0"> <div style="width: 100%" v-if="lists && lists.list && lists.list.length > 0">
<a-table <a-table
:columns="columns" :columns="columns"
:data-source="lists.list" :data-source="lists.list"
@ -18,11 +18,17 @@
<template slot="inputStatus" slot-scope="text, record"> <template slot="inputStatus" slot-scope="text, record">
<span> <span>
{{ record.inputStatus === 0 ? '新建' {{
: record.inputStatus === 1 ? '数据搜集中' record.inputStatus === 0
: record.inputStatus === 2 ? '数据搜集完成' ? '新建'
: record.inputStatus === 3 ? '数据搜集超时' : record.inputStatus === 1
: '废弃' }} ? '数据搜集中'
: record.inputStatus === 2
? '数据搜集完成'
: record.inputStatus === 3
? '数据搜集超时'
: '废弃'
}}
</span> </span>
</template> </template>
@ -104,6 +110,7 @@ export default {
// //
chooseItem(id) { chooseItem(id) {
this.setPatientId(id); this.setPatientId(id);
sessionStorage.setItem('patientId', id);
}, },
handleTableChange(pagination) { handleTableChange(pagination) {

15
src/components/PatientInfo/Search.vue

@ -2,22 +2,13 @@
<!-- search --> <!-- search -->
<div> <div>
<div class="d-flex flex-row flex-nowrap"> <div class="d-flex flex-row flex-nowrap">
<a-form <a-form :form="form" @submit="handleSubmit" class="d-flex flex-nowrap align-center" layout="inline">
:form="form"
@submit="handleSubmit"
class="d-flex flex-nowrap align-center"
layout="inline"
>
<a-form-item> <a-form-item>
<a-input placeholder="住院号" style="width: 14em" v-decorator="['inpatientNumber']" /> <a-input placeholder="住院号" style="width: 14em" v-decorator="['inpatientNumber']" />
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-select placeholder="请选择对照组" style="min-width: 150px" v-decorator="['groupValue']"> <a-select placeholder="请选择对照组" style="min-width: 450px" v-decorator="['groupValue']">
<a-select-option <a-select-option :key="item.id" :value="item.id" v-for="item in controlGroups">{{ item.name }}</a-select-option>
:key="item.id"
:value="item.id"
v-for="item in controlGroups"
>{{ item.name }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-button class="mr-4" html-type="submit" icon="search" type="primary">搜索</a-button> <a-button class="mr-4" html-type="submit" icon="search" type="primary">搜索</a-button>

18
src/config/api.js

@ -15,7 +15,16 @@ const inpatient = `${tcm}/inpatient`; // 对照组接口
const statistics = `${tcm}/statistics`; // 数据统计相关接口 const statistics = `${tcm}/statistics`; // 数据统计相关接口
const conferenceRecords = `${tcm}/conferenceRecords`; // 会议纪要相关接口 const conferenceRecords = `${tcm}/conferenceRecords`; // 会议纪要相关接口
const biologicalSamples = `${tcm}/biologicalSamples`; // 生物样本相关接口 const biologicalSamples = `${tcm}/biologicalSamples`; // 生物样本相关接口
const hospatil = `${tcm}/hospatil`; // 医院相关接口
const file = `${tcm}/file`; // 文件相关接口
// 上传文件
export const upload = `${file}/upload`;
// 通过任务Id查询项目Id
export const getHId = params => axios.get(`${hospatil}/byProjectId?projectId=${params}`);
// 查询医院列表
export const getHList = params => axios.get(`${hospatil}/selHospatil`);
// 保存患者病例信息 // 保存患者病例信息
export const saveCaseMes = params => axios.post(`${patient}/saveCaseMes`, params); export const saveCaseMes = params => axios.post(`${patient}/saveCaseMes`, params);
@ -32,7 +41,8 @@ export const selPatientMesList = params => axios.post(`${patient}/selPatientMesL
export const selSearchCriteriaList = params => axios.post(`${patient}/selSearchCriteriaList`, params); export const selSearchCriteriaList = params => axios.post(`${patient}/selSearchCriteriaList`, params);
// 试题相关接口:按code查看题目信息,code为空则查询全部 // 试题相关接口:按code查看题目信息,code为空则查询全部
export const queryAll = params => axios.post(`${tcm}/question/queryAll`, params); export const queryAll = params => axios.post(`${tcm}/question/query`, params);
// 查询所有对照组的信息 // 查询所有对照组的信息
export const getQuery = params => axios.post(`${inpatient}/query`, params); export const getQuery = params => axios.post(`${inpatient}/query`, params);
@ -42,9 +52,15 @@ export const complete = params => axios.post(`${statistics}/complete`, params);
// 查询病例分析 // 查询病例分析
export const countAnalysis = params => axios.post(`${statistics}/countAnalysis`, params); export const countAnalysis = params => axios.post(`${statistics}/countAnalysis`, params);
// 查询各医院病例完成情况
export const HospitalComplete = params => axios.post(`${statistics}/hospital/complete`, params);
// 查询每日病例统计 // 查询每日病例统计
export const countCase = params => axios.post(`${statistics}/countCase`, params); export const countCase = params => axios.post(`${statistics}/countCase`, params);
// 统计生物样本数量
export const selAllYBS = params => axios.get(`${biologicalSamples}/selAllYBS`);
// 添加会议记录 // 添加会议记录
export const saveConRec = params => axios.post(`${conferenceRecords}/save`, params); export const saveConRec = params => axios.post(`${conferenceRecords}/save`, params);

9
src/store/modules/home/mutations.js

@ -55,6 +55,15 @@ const mutations = {
setPtProps(state, data) { setPtProps(state, data) {
state.ptProps = data; state.ptProps = data;
}, },
/**
* 设置医院Id
* @param {object} state
* @param {string} data
*/
setHospitalId(state, data) {
state.hospitalId = data;
},
}; };
export default mutations; export default mutations;

1
src/store/modules/home/state.js

@ -5,6 +5,7 @@ const state = {
patientId: '', // 病患id patientId: '', // 病患id
previewInfo: { host: '', place: '', startTime: '', endTime: '', participants: '', meetingMinutes: '', discussionContent: '' }, // 预览信息 previewInfo: { host: '', place: '', startTime: '', endTime: '', participants: '', meetingMinutes: '', discussionContent: '' }, // 预览信息
ptProps: null, // 接受PT传过来的 pluginId,projectId,roleId,taskId,userId ptProps: null, // 接受PT传过来的 pluginId,projectId,roleId,taskId,userId
hospitalId: '',
}; };
export default state; export default state;

1061
src/views/CaseSearch/CaseSearch.vue

File diff suppressed because it is too large

966
src/views/PatientInfo/PatientInfo.vue

File diff suppressed because it is too large
Loading…
Cancel
Save