You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

258 lines
7.4 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="box" :style="CustomerOrgRightStyle">
  3. <el-card class="cards">
  4. <el-row>
  5. <el-form ref="form" :model="form" label-width="120px">
  6. <el-col :span="4">
  7. <el-form-item label="单位">
  8. <el-select
  9. v-model="form.unit"
  10. placeholder="请选择"
  11. @focus="unitchang"
  12. >
  13. <el-option
  14. v-for="item in customerorgdatas"
  15. :key="item.id"
  16. :label="item.displayName"
  17. :value="item.id"
  18. >
  19. </el-option>
  20. </el-select>
  21. </el-form-item>
  22. </el-col>
  23. <el-col :span="4">
  24. <el-form-item label="诊断" style="margin-left:-50px">
  25. <el-select v-model="form.diagnosis" placeholder="请选择">
  26. <el-option
  27. v-for="item in diagnosisdata"
  28. :key="item.id"
  29. :label="item.displayName"
  30. :value="item.id"
  31. >
  32. </el-option>
  33. </el-select>
  34. </el-form-item>
  35. </el-col>
  36. <el-col :span="4">
  37. <el-form-item label="疾病来源" style="margin-left:-50px">
  38. <el-select v-model="form.diagnosis" placeholder="请选择">
  39. <el-option
  40. v-for="item in diagnosisdata"
  41. :key="item.id"
  42. :label="item.displayName"
  43. :value="item.id"
  44. >
  45. </el-option>
  46. </el-select>
  47. </el-form-item>
  48. </el-col>
  49. <el-col :span="3">
  50. <el-button type="primary" style="margin-left: 10px">查询</el-button>
  51. </el-col>
  52. </el-form>
  53. </el-row>
  54. <!-- tab区域 -->
  55. <h3 class="tabtitle">疾病人数统计</h3>
  56. <el-table :data="tableData" style="width: 100%">
  57. <el-table-column prop="disease" label="疾病" width="180">
  58. </el-table-column>
  59. <el-table-column prop="numberofpeople" label="人数" width="180">
  60. </el-table-column>
  61. <el-table-column prop="shareintotal" label="占总检人数百分比">
  62. </el-table-column>
  63. </el-table>
  64. <!-- -->
  65. <!-- 单位显示隐藏 -->
  66. <div class="showbox">
  67. <el-popover
  68. placement="bottom"
  69. width="600"
  70. trigger="manual"
  71. content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
  72. v-model="visible"
  73. >
  74. <div>
  75. <span>单位查找</span>
  76. <el-select
  77. v-model="form.unit"
  78. placeholder="请选择"
  79. style="margin-left: 10px"
  80. >
  81. <el-option
  82. v-for="item in customerorgdata"
  83. :key="item.id"
  84. :label="item.displayName"
  85. :value="item.id"
  86. >
  87. </el-option>
  88. </el-select>
  89. </div>
  90. <!-- 标题 -->
  91. <div class="biaoti">
  92. 双击单位下的体检次数或部门可增加查询条件双击列表中的行可删除查询条件
  93. </div>
  94. <div class="boxflex">
  95. <div class="leftbox">
  96. <el-tree :data="customerorgdata" :props="defaultProps"></el-tree>
  97. </div>
  98. <div class="rigtbox">
  99. <el-table :data="tableData" style="width: 100%">
  100. <el-table-column prop="numberofpeople" label="单位">
  101. </el-table-column>
  102. <el-table-column prop="numberofpeople" label="次数">
  103. </el-table-column>
  104. <el-table-column prop="shareintotal" label="日期">
  105. </el-table-column>
  106. </el-table>
  107. <div style="margin-top: 10px">登记日期方式</div>
  108. <el-radio-group v-model="radio">
  109. <el-radio :label="3">登记日期</el-radio>
  110. <el-radio :label="6">体检日期</el-radio>
  111. <el-radio :label="9">总检日期</el-radio>
  112. </el-radio-group>
  113. <div style="margin-top: 10px">单位选择方式</div>
  114. <el-radio-group v-model="radio">
  115. <el-radio :label="3">选择单位</el-radio>
  116. <el-radio :label="6">不选单位</el-radio>
  117. </el-radio-group>
  118. <!-- -->
  119. <div>
  120. <el-button style="margin-left: 100%" @click="close"
  121. >关闭</el-button
  122. >
  123. </div>
  124. </div>
  125. </div>
  126. </el-popover>
  127. </div>
  128. <!-- -->
  129. </el-card>
  130. </div>
  131. </template>
  132. <script>
  133. import { getapi, postapi } from "@/api/api";
  134. import { mapState } from "vuex";
  135. export default {
  136. data() {
  137. return {
  138. radio: "",
  139. defaultProps: {
  140. label: "displayName",
  141. children: "treeChildren",
  142. },
  143. visible: false,
  144. form: {
  145. unit: "",
  146. diagnosis: "",
  147. },
  148. CustomerOrgTreeStyle: "",
  149. CustomerOrgRightStyle: "",
  150. customerorgdatas: [],
  151. tableData: [
  152. {
  153. disease: "是,否",
  154. numberofpeople: "20",
  155. shareintotal: "30",
  156. },
  157. ],
  158. customerorgdata: [],
  159. diagnosisdata: [],
  160. };
  161. },
  162. computed: {
  163. ...mapState(["window", "dict", "patientRegister", "customerOrg"]),
  164. },
  165. created() {
  166. // this.resize();
  167. },
  168. mounted() {
  169. this.obtainingunits();
  170. this.getdiagnosis();
  171. },
  172. methods: {
  173. resize() {
  174. //console.log(this.window.pageHeight,this.window.pageWidth)
  175. let headerHeight = Number(150);
  176. this.CustomerOrgTreeStyle =
  177. "overflow: scroll;border: 1px solid;width:200px; height:" +
  178. (this.window.pageHeight - headerHeight) +
  179. "px;";
  180. this.CustomerOrgRightStyle =
  181. "margin-left: 10px;width:" +
  182. (this.window.pageWidth - 200 - 60) +
  183. "px; height:" +
  184. (this.window.pageHeight - headerHeight) +
  185. "px;";
  186. if (this.window.pageHeight < 600) {
  187. this.CustomerOrgTreeStyle =
  188. "overflow: scroll;border: 1px solid;width:200px; height:" +
  189. (600 - headerHeight) +
  190. "px;";
  191. }
  192. },
  193. close() {
  194. this.visible = false;
  195. },
  196. // /api/app/customer-org/by-code-all
  197. unitchang() {
  198. console.log("1");
  199. this.visible = true;
  200. console.log(this.visible);
  201. getapi("/api/app/customer-org/by-code-all").then((res) => {
  202. this.customerorgdata = res.data;
  203. });
  204. },
  205. //获取单位
  206. obtainingunits() {
  207. getapi("/api/app/customer-org/by-code-all").then((res) => {
  208. this.customerorgdata = res.data;
  209. });
  210. },
  211. //获取诊断
  212. getdiagnosis() {
  213. postapi("/api/app/diagnosis/getlistinfilter").then((res) => {
  214. this.diagnosisdata = res.data.items;
  215. console.log(res);
  216. });
  217. },
  218. },
  219. };
  220. </script>
  221. <style scoped>
  222. .rigtbox {
  223. margin-left: 10px;
  224. }
  225. .leftbox {
  226. width: 30%;
  227. border: 1px solid #ccc;
  228. }
  229. .boxflex {
  230. display: flex;
  231. }
  232. .biaoti {
  233. margin-top: 10px;
  234. }
  235. /* .el-select-dropdown__empty::v-deep {
  236. display: none;
  237. } */
  238. .el-popover .el-popper .el-popover--plain {
  239. width: 600px;
  240. }
  241. .showbox {
  242. width: 600px;
  243. height: 300px;
  244. /* border: 1px solid #ccc; */
  245. position: absolute;
  246. left: 8.5%;
  247. top: 140px;
  248. }
  249. .cards {
  250. height: 800px;
  251. }
  252. .tabtitle {
  253. text-align: center;
  254. margin-top: 20px;
  255. }
  256. </style>