陈少旭 před 9 měsíci
rodič
revize
c86fd149fc

+ 0 - 265
src/xt_pages/Dialysisanalysis/otherIndicators/otherall.vue Zobrazit soubor

@@ -1,265 +0,0 @@
1
-<template>
2
-    <div>
3
-        <!-- <div class="content_top">
4
-            <div class="block">
5
-                <span>查询时间:</span>
6
-                <el-date-picker
7
-                v-model="time_month"
8
-                type="month"
9
-                placeholder="选择月">
10
-                </el-date-picker>
11
-            </div>
12
-            <div>
13
-                <el-date-picker
14
-                v-model="stat_time"
15
-                type="date"
16
-                placeholder="选择日期">
17
-                </el-date-picker>
18
-                <span>-</span>
19
-                <el-date-picker
20
-                v-model="end_time"
21
-                type="date"
22
-                placeholder="选择日期">
23
-                </el-date-picker>
24
-            </div>
25
-            <div style="width: 200px;">
26
-                <el-input v-model="input" placeholder="请输入内容"></el-input>
27
-            </div>
28
-            <el-button type="primary">查询</el-button>
29
-        </div> -->
30
-
31
-        <el-row :gutter="20">
32
-        <el-col :span="5">
33
-          <div class="block">
34
-            <span>查询时间:</span>
35
-            <el-date-picker
36
-            v-model="time_month"
37
-            type="month"
38
-            placeholder="选择月">
39
-            </el-date-picker>
40
-          </div>
41
-        </el-col>
42
-        <el-col :span="8">
43
-          <div>
44
-            <el-date-picker
45
-            v-model="stat_time"
46
-            type="date"
47
-            placeholder="选择日期">
48
-            </el-date-picker>
49
-            <span>-</span>
50
-            <el-date-picker
51
-            v-model="end_time"
52
-            type="date"
53
-            placeholder="选择日期">
54
-            </el-date-picker>
55
-          </div>
56
-        </el-col>
57
-        <el-col :span="3">
58
-          <div style="width: 200px;">
59
-            <el-input v-model="input" placeholder="请输入内容"></el-input>
60
-          </div>
61
-        </el-col>
62
-        <el-col :span="2">
63
-            <el-button type="primary">查询</el-button>
64
-        </el-col>
65
-        </el-row>
66
-
67
-        <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
68
-          <p class="chartTitle">统计图</p>
69
-        </div>
70
-        <div class="echart" id="mychart" :style={width:width,height:height}></div>
71
-        <div style="width: 80%;margin: auto;">
72
-            <el-table
73
-            :data="tableData"
74
-            :show-summary = true
75
-            border
76
-            :header-cell-style="{
77
-              backgroundColor: 'rgb(245, 247, 250)',
78
-              color: '#606266'
79
-            }"
80
-            style="width: 100%;">
81
-                <el-table-column
82
-                    prop="date"
83
-                    align="center"
84
-                    label="白蛋白"
85
-                    >
86
-                </el-table-column>
87
-                <el-table-column
88
-                    prop="name"
89
-                    label="人数"
90
-                    >
91
-                </el-table-column>
92
-<!--                <el-table-column-->
93
-<!--                    prop="address"-->
94
-<!--                    align="center"-->
95
-<!--                    label="操作">-->
96
-<!--                    <template slot-scope="scope">-->
97
-<!--                        <el-button @click="handleClick(scope.row)" style="font-size:16px;"-->
98
-<!--                                type="text" >查看详情-->
99
-<!--                        </el-button>-->
100
-<!--                    </template>-->
101
-<!--                </el-table-column>-->
102
-            </el-table>
103
-        </div>
104
-    </div>
105
-</template>
106
-<script>
107
-import * as echarts from "echarts";
108
-export default{
109
-    props: {
110
-
111
-    width: {
112
-      type: String,
113
-      default: "100%"
114
-    },
115
-    height: {
116
-      type: String,
117
-      default: "400px"
118
-    },
119
-
120
-  },
121
-    data() {
122
-        return {
123
-            time_month:'',
124
-            stat_time:'',
125
-            end_time:'',
126
-            input:'',
127
-            myChart: {},
128
-            pieData : [
129
-            {
130
-          value: 463,
131
-          name: "不达标值患者"
132
-        },
133
-        {
134
-          value: 395,
135
-          name: "未检查患者"
136
-        },
137
-        {
138
-          value: 157,
139
-          name: "达标值患者"
140
-        },
141
-        // {
142
-        //   value: 149,
143
-        //   name: "广东"
144
-        // },
145
-        // {
146
-        //   value: 147,
147
-        //   name: "湖南"
148
-        // }
149
-
150
-            ],
151
-            pieName: [],
152
-            // myChartStyle:{float: "right", width: "100%", height: "400px"},
153
-            tableData:[],
154
-        }
155
-    },
156
-    mounted() {
157
-    this.initDate(); //数据初始化
158
-    this.initEcharts();
159
-  },
160
-  methods: {
161
-    initDate() {
162
-      for (let i = 0; i < this.pieData.length; i++) {
163
-        this.pieName[i] = this.pieData[i].name;
164
-      }
165
-    },
166
-    initEcharts() {
167
-      // 饼图
168
-      const option = {
169
-        legend: {
170
-          // 图例
171
-          data: this.pieName,
172
-          left: "10%",
173
-          top: "30%",
174
-          orient: "vertical"
175
-        },
176
-        color:['#ff7f9f','#fff67f','#1e5feb'],
177
-        title: {
178
-          // 设置饼图标题,位置设为顶部居中
179
-        //   text: "国内院士前五省份图示",
180
-          top: "0%",
181
-          left: "center"
182
-        },
183
-        series: [
184
-          {
185
-            type: "pie",
186
-            label: {
187
-              normal : {
188
-                formatter: '{b}:{c}: ({d}%)',
189
-                textStyle : {
190
-                    fontWeight : 'normal',
191
-                    fontSize : 15,
192
-                    color : "black"
193
-                }
194
-              }
195
-              // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})"
196
-            },
197
-            radius: "65%", //饼图半径
198
-            data: this.pieData,
199
-            itemStyle : {
200
-              emphasis: {
201
-                  shadowBlur: 10,
202
-                  shadowOffsetX: 0,
203
-                  shadowColor: 'rgba(0, 0, 0, 0.5)'
204
-              }
205
-            }
206
-          }
207
-        ]
208
-      };
209
-    //   console.log(this.seriesData);
210
-      const optionFree = {
211
-        series: [
212
-          {
213
-            data: this.seriesData,
214
-            type: "line",
215
-            smooth: true
216
-          }
217
-        ]
218
-      };
219
-      this.myChart = echarts.init(document.getElementById("mychart"));
220
-      this.myChart.setOption(option);
221
-      //随着屏幕大小调节图表
222
-      window.addEventListener("resize", () => {
223
-        this.myChart.resize();
224
-      });
225
-    },
226
-    getSummaries(param) {
227
-        const { columns, data } = param;
228
-        const sums = [];
229
-        columns.forEach((column, index) => {
230
-          if (index === 0) {
231
-            sums[index] = '总价';
232
-            return;
233
-          }
234
-          const values = data.map(item => Number(item[column.property]));
235
-          if (!values.every(value => isNaN(value))) {
236
-            sums[index] = values.reduce((prev, curr) => {
237
-              const value = Number(curr);
238
-              if (!isNaN(value)) {
239
-                return prev + curr;
240
-              } else {
241
-                return prev;
242
-              }
243
-            }, 0);
244
-            sums[index] += ' 元';
245
-          } else {
246
-            sums[index] = 'N/A';
247
-          }
248
-        });
249
-
250
-        return sums;
251
-    },
252
-    handleClick(id){
253
-        console.log(id);
254
-    }
255
-  }
256
-
257
-}
258
-</script>
259
-<style lang="scss" scoped>
260
-.content_top{
261
-    display: flex;
262
-    justify-content: space-around;
263
-    color: #1e5feb;
264
-}
265
-</style>