Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

statisticalConfiguration.vue 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. </div>
  6. <div class="app-container">
  7. <el-tabs v-model="tabActiveName" @tab-click="handleTabClick" style="margin-bottom:10px">
  8. <el-tab-pane label="质控达标统计配置" name="control"></el-tab-pane>
  9. <el-tab-pane label="检验检查统计配置" name="query"></el-tab-pane>
  10. </el-tabs>
  11. <el-row :gutter="20">
  12. <el-col :span="2" :offset="22">
  13. <el-button type="primary" class="newadd" @click="newDialog = true">新增</el-button>
  14. </el-col>
  15. </el-row>
  16. <div class="configTable">
  17. <el-table :data="configuraData" border style="width: 100%">
  18. <el-table-column prop="date" label="检验检查大项" width="180">
  19. <template slot-scope="scope">{{ scope.row.project_name }}</template>
  20. </el-table-column>
  21. <el-table-column prop="name" label="检查小项" width="300">
  22. <template slot-scope="scope">{{ scope.row.item_name }}</template>
  23. </el-table-column>
  24. <el-table-column prop="address" label="范围">
  25. <template slot-scope="scope">{{ scope.row.min_range }} - {{scope.row.large_range}}</template>
  26. </el-table-column>
  27. <el-table-column prop="address" label="单位">
  28. <template slot-scope="scope">{{ scope.row.unit }}</template>
  29. </el-table-column>
  30. <el-table-column prop="address" label="排序">
  31. <template slot-scope="scope">{{ scope.row.sort }}</template>
  32. </el-table-column>
  33. <el-table-column label="操作" width="180">
  34. <template slot-scope="scope">
  35. <el-button size="mini" type="primary" @click="handleEdit(scope.row.id)">编辑</el-button>
  36. <el-button size="mini" type="danger" @click="handleDelete(scope.row.id,scope.$index)">删除</el-button>
  37. </template>
  38. </el-table-column>
  39. </el-table>
  40. <el-pagination
  41. @size-change="handleSizeChange"
  42. @current-change="handleCurrentChange"
  43. :page-sizes="[10, 20, 30, 100]"
  44. :page-size="10"
  45. background
  46. style="margin-top:20px;float: right"
  47. layout="total, sizes, prev, pager, next, jumper"
  48. :total="total">
  49. </el-pagination>
  50. </div>
  51. <el-dialog title="新增" :visible.sync="newDialog">
  52. <el-form :model="form" ref="form" :rules="rules">
  53. <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
  54. <el-select v-model="form.inspectionMajor" placeholder="请选择检查大项" @change="changeInspection">
  55. <el-option
  56. v-for="item in InspectionMajor"
  57. :key="item.project_id"
  58. :value="item.project_id"
  59. :label="item.project_name"
  60. >
  61. </el-option>
  62. </el-select>
  63. </el-form-item>
  64. <el-form-item label="检查小项" :label-width="formLabelWidth" required prop="inspectionMinor">
  65. <el-select v-model="form.inspectionMinor" placeholder="请选择检查小项" @change="changeInspectionMonior">
  66. <el-option
  67. v-for="it in InspectionMinor"
  68. :key="it.id"
  69. :value="it.id"
  70. :label="it.item_name"
  71. >
  72. </el-option>
  73. </el-select>
  74. </el-form-item>
  75. <!-- <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="large_range">
  76. <el-input style="width:200px" v-model="form.min_range"></el-input>&nbsp;
  77. -
  78. <el-input style="width:200px" v-model="form.large_range"></el-input>
  79. </el-form-item> -->
  80. <div style="display:flex;">
  81. <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="min_range">
  82. <el-input style="width:200px" v-model="form.min_range"></el-input>
  83. </el-form-item>
  84. <span style="margin-top:10px">-</span>
  85. <el-form-item class='newFormItem' :label-width="formLabelWidth" required prop="large_range">
  86. <el-input style="width:200px" v-model="form.large_range"></el-input>
  87. </el-form-item>
  88. </div>
  89. <el-form-item label="排序" :label-width="formLabelWidth">
  90. <el-input style="width:200px" v-model="form.sort"></el-input>
  91. </el-form-item>
  92. </el-form>
  93. <div slot="footer" class="dialog-footer">
  94. <el-button @click="newDialog = false">取 消</el-button>
  95. <el-button type="primary" @click="saveInspection('form')">保 存</el-button>
  96. </div>
  97. </el-dialog>
  98. <el-dialog title="编辑" :visible.sync="editDialog">
  99. <el-form :model="editform" ref="editform" :rules="rules">
  100. <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
  101. <el-select v-model="editform.inspectionMajor" placeholder="请选择检查大项" @change="changeInspectionTwo">
  102. <el-option
  103. v-for="patient in InspectionMajor"
  104. :key="patient.project_id"
  105. :value="patient.project_id"
  106. :label="patient.project_name"
  107. >
  108. </el-option>
  109. </el-select>
  110. </el-form-item>
  111. <el-form-item label="检查小项" :label-width="formLabelWidth" required prop="inspectionMinor">
  112. <el-select v-model="editform.inspectionMinor" placeholder="请选择检查小项" @change="changeInspectionMonior">
  113. <el-option
  114. v-for="item in InspectionMinorTwo"
  115. :key="item.id"
  116. :value="item.id"
  117. :label="item.item_name"
  118. >
  119. </el-option>
  120. </el-select>
  121. </el-form-item>
  122. <!-- <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="large_range">
  123. <el-input style="width:200px" v-model="editform.min_range"></el-input>&nbsp;
  124. -
  125. <el-input style="width:200px" v-model="editform.large_range"></el-input>
  126. </el-form-item> -->
  127. <div style="display:flex;">
  128. <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="min_range">
  129. <el-input style="width:200px" v-model="editform.min_range"></el-input>
  130. </el-form-item>
  131. <span style="margin-top:10px">-</span>
  132. <el-form-item class='newFormItem' :label-width="formLabelWidth" required prop="large_range">
  133. <el-input style="width:200px" v-model="editform.large_range"></el-input>
  134. </el-form-item>
  135. </div>
  136. <el-form-item label="排序" :label-width="formLabelWidth">
  137. <el-input style="width:200px" v-model="editform.sort"></el-input>
  138. </el-form-item>
  139. </el-form>
  140. <div slot="footer" class="dialog-footer">
  141. <el-button @click="editDialog = false">取 消</el-button>
  142. <el-button type="primary" @click="EditConfiguration('editform')">保 存</el-button>
  143. </div>
  144. </el-dialog>
  145. </div>
  146. </div>
  147. </template>
  148. <script>
  149. import { GetOICData } from "@/api/qcd";
  150. import PieChart from "../qcd/components/BarChart";
  151. import { uParseTime } from "@/utils/tools";
  152. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  153. import { getInspectionMajor,getInspectionMinor,getInspectionRange,saveConfiguration,getConfigurationList,getConfigurationDetail,getAllInspectionMinor,UpdateConfiguration,DeleteConfiguration,getLastSort }from "@/api/common/common";
  154. export default {
  155. name: "dialysisTotal",
  156. data() {
  157. return {
  158. crumbs: [
  159. { path: false, name: "质控管理" },
  160. { path: false, name: "统计配置" },
  161. { path: false, name: "质控达标统计配置" }
  162. ],
  163. tabActiveName: "control",
  164. InspectionMajor:[],
  165. InspectionMinor:[],
  166. InspectionMinorTwo:[],
  167. configuraData: [],
  168. newDialog: false,
  169. editDialog: false,
  170. formLabelWidth: "120px",
  171. form: {
  172. inspectionMajor: "",
  173. inspectionMinor: "",
  174. min_range: "",
  175. large_range: "",
  176. sort:"",
  177. },
  178. editform:{
  179. id:0,
  180. inspectionMajor: "",
  181. inspectionMinor: "",
  182. min_range: "",
  183. large_range: "",
  184. sort:"",
  185. },
  186. rules: {
  187. inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
  188. inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
  189. large_range:[{required:true,message:"质控范围不能为空"}],
  190. min_range:[{required:true,message:"质控范围不能为空"}]
  191. },
  192. page:1,
  193. limit:10,
  194. total:0,
  195. };
  196. },
  197. methods: {
  198. handleTabClick(tab, event) {
  199. if (this.tabActiveName == "query") {
  200. this.$router.push({ path: "/qcd/patientanalysis/checkStatistical" });
  201. }
  202. },
  203. //编辑
  204. handleEdit(id) {
  205. this.editDialog = true;
  206. getConfigurationDetail(id).then(response=>{
  207. if(response.data.state == 1){
  208. var configurationdetail = response.data.data.configurationdetail
  209. console.log("详情",configurationdetail)
  210. this.editform.id = configurationdetail.id
  211. this.editform.inspectionMajor = configurationdetail.inspection_major
  212. this.editform.inspectionMinor = configurationdetail.inspection_minor
  213. this.editform.large_range = configurationdetail.large_range
  214. this.editform.min_range = configurationdetail.min_range
  215. if(configurationdetail.sort == 0){
  216. this.editform.sort = ""
  217. return
  218. }
  219. this.editform.sort = configurationdetail.sort
  220. }
  221. })
  222. },
  223. //获取大项数据来源
  224. getInspectionMajor(){
  225. getInspectionMajor().then(response=>{
  226. if(response.data.state == 1){
  227. var inspection = response.data.data.inspection
  228. console.log("大项",inspection)
  229. this.InspectionMajor = inspection
  230. }
  231. })
  232. },
  233. //获取小项
  234. changeInspection(id){
  235. getInspectionMinor(id).then(response=>{
  236. if(response.data.state == 1){
  237. var inspection = response.data.data.inspection
  238. console.log("小项",inspection)
  239. this.InspectionMinor = inspection
  240. }
  241. })
  242. },
  243. changeInspectionTwo(id){
  244. this.InspectionMinorTwo = []
  245. this.editform.inspectionMinor = ""
  246. getInspectionMinor(id).then(response=>{
  247. if(response.data.state == 1){
  248. var inspection = response.data.data.inspection
  249. // console.log("小项",inspection)
  250. this.InspectionMinorTwo = inspection
  251. }
  252. })
  253. },
  254. // 获取质控范围
  255. changeInspectionMonior(id){
  256. getInspectionRange(id).then(response=>{
  257. if(response.data.state == 1){
  258. var inspectionRange = response.data.data.inspectionRange
  259. console.log("inspectionRange",inspectionRange)
  260. this.form.min_range = inspectionRange.range_min
  261. this.form.large_range = inspectionRange.range_max
  262. }
  263. })
  264. },
  265. saveInspection(formName){
  266. this.$refs[formName].validate(valid=>{
  267. if(valid){
  268. saveConfiguration(this.form).then(response=>{
  269. if(response.data.state == 1){
  270. var standard = response.data.data.standard
  271. this.$message.success("保存成功")
  272. this.newDialog = false
  273. this.form.inspectionMajor = ""
  274. this.form.inspectionMinor = ""
  275. this.form.large_range = ""
  276. this.form.min_range = ""
  277. this.form.sort = ""
  278. this.getConfigurationList()
  279. this.getLastSort()
  280. }else{
  281. this.$message.error("检查小项已存在")
  282. }
  283. })
  284. }
  285. })
  286. },
  287. handleSizeChange(limit) {
  288. this.limit = limit;
  289. this.getConfigurationList();
  290. },
  291. handleCurrentChange(page) {
  292. this.page = page;
  293. this.getConfigurationList();
  294. },
  295. getConfigurationList(){
  296. getConfigurationList(this.limit,this.page).then(response=>{
  297. if(response.data.state === 1){
  298. var configurationlist = response.data.data.configurationlist
  299. for(let i=0;i<configurationlist.length;i++){
  300. if(configurationlist[i].sort === 0){
  301. configurationlist[i].sort = ""
  302. }
  303. }
  304. console.log("列表",configurationlist)
  305. this.configuraData = configurationlist
  306. var total = response.data.data.total
  307. // console.log("total",total)
  308. this.total = total
  309. }
  310. })
  311. },
  312. //获取小项
  313. getAllInspectionMinor(){
  314. getAllInspectionMinor().then(response=>{
  315. if(response.data.state == 1){
  316. var minor = response.data.data.minor
  317. this.InspectionMinorTwo = minor
  318. //console.log("minor",minor)
  319. }
  320. })
  321. },
  322. EditConfiguration(formName){
  323. if(this.editform.sort == ""){
  324. this.editform.sort = 0
  325. }
  326. if(this.editform.sort!=""){
  327. var sorts = this.editform.sort
  328. var sort = parseInt(sorts)
  329. this.editform.sort = sort
  330. }
  331. this.$refs[formName].validate(valid=>{
  332. if(valid){
  333. UpdateConfiguration(this.editform.id,this.editform).then(response=>{
  334. if(response.data.state == 1){
  335. var standard = response.data.data.standard
  336. // console.log("standard",standard)
  337. this.$message.success("保存成功")
  338. this.editDialog = false
  339. this.getConfigurationList()
  340. this.getAllInspectionMinor()
  341. }else{
  342. this.$message.error("检查小项已存在")
  343. }
  344. })
  345. }
  346. })
  347. },
  348. handleDelete(id,index) {
  349. this.$confirm(
  350. "确认要删除所选记录吗? <br>删除后,该信息将无法恢复",
  351. "删除提示",
  352. {
  353. dangerouslyUseHTMLString: true,
  354. confirmButtonText: "确定",
  355. cancelButtonText: "取消",
  356. type: "warning"
  357. }
  358. ).then(() => {
  359. DeleteConfiguration(id,index).then(response => {
  360. if (response.data.state === 1) {
  361. var msg = response.data.data.msg
  362. // console.log("msg",msg)
  363. this.configuraData.splice(index,1)
  364. }
  365. });
  366. });
  367. },
  368. getLastSort(){
  369. getLastSort().then(response=>{
  370. if(response.data.state === 1){
  371. var standard = response.data.data.standard
  372. // console.log("standard",standard)
  373. this.form.sort = standard.sort + 1+''
  374. }
  375. })
  376. },
  377. },
  378. components: {
  379. PieChart,
  380. BreadCrumb
  381. },
  382. created() {
  383. //获取检查大项数据来源
  384. this.getInspectionMajor()
  385. //获取表格里面的数据
  386. this.getConfigurationList()
  387. //获取所有小项的数据
  388. this.getAllInspectionMinor()
  389. //获取排序值
  390. this.getLastSort()
  391. },
  392. };
  393. </script>
  394. <style lang="scss">
  395. #oictable ::-webkit-scrollbar {
  396. height: 15px;
  397. }
  398. .configTable {
  399. .el-table td,
  400. .el-table th {
  401. text-align: center;
  402. }
  403. }
  404. .newFormItem{
  405. .el-form-item__content{
  406. margin-left:0 !important;
  407. }
  408. }
  409. </style>
  410. <style rel="stylesheet/scss" lang="scss" scoped>
  411. .newadd {
  412. margin-bottom: 10px;
  413. }
  414. // .app-container {
  415. // // margin: 20px;
  416. // font-size: 15px;
  417. // .filter-container {
  418. // padding-bottom: 5px;
  419. // }
  420. // .cqd-dataTitle {
  421. // color: #303133;
  422. // font-size: 14px;
  423. // border-bottom: 2px #e4e7ed solid;
  424. // height: 36px;
  425. // line-height: 36px;
  426. // margin: 0 0 25px 0;
  427. // position: relative;
  428. // }
  429. // .cqd-dataTitle::before {
  430. // position: absolute;
  431. // left: 0;
  432. // bottom: -2px;
  433. // content: "";
  434. // width: 42px;
  435. // height: 2px;
  436. // background: #409eff;
  437. // }
  438. // .search-component {
  439. // width: 500px;
  440. // .searchBox {
  441. // width: 300px;
  442. // height: 36px;
  443. // line-height: 36px;
  444. // padding-left: 15px;
  445. // border: 1px #dcdfe6 solid;
  446. // border-right: none;
  447. // outline: none;
  448. // float: left;
  449. // border-radius: 6px 0 0 6px;
  450. // font-size: 14px;
  451. // color: #333;
  452. // background: #fff;
  453. // box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
  454. // }
  455. // .searchBtn {
  456. // background-color: #409eff;
  457. // color: #fff;
  458. // font-size: 15px;
  459. // text-align: center;
  460. // height: 36px;
  461. // line-height: 36px;
  462. // float: left;
  463. // outline: none;
  464. // width: 70px;
  465. // border: none;
  466. // border-radius: 0 6px 6px 0;
  467. // font-family: "Microsoft Yahei";
  468. // cursor: pointer;
  469. // }
  470. // }
  471. // .amount {
  472. // font-weight: normal;
  473. // padding: 10px 0 0 0;
  474. // color: #606266;
  475. // font-size: 14px;
  476. // span {
  477. // color: #ef2525;
  478. // font-family: "Arial";
  479. // padding: 0 2px;
  480. // }
  481. // }
  482. // }
  483. //
  484. </style>