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

checkStatistical.vue 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  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="checkList" border style="width: 100%">
  18. <el-table-column prop="date" label="检验检查项">
  19. <template slot-scope="scope">{{ scope.row.project_name }}</template>
  20. </el-table-column>
  21. <el-table-column prop="name" label="检查频次(天)">
  22. <template slot-scope="scope">{{ scope.row.inspection_frequency }}</template>
  23. </el-table-column>
  24. <el-table-column prop="address" label="排序">
  25. <template slot-scope="scope">{{ scope.row.sort }}</template>
  26. </el-table-column>
  27. <el-table-column label="操作" width="180">
  28. <template slot-scope="scope">
  29. <el-button size="mini" type="primary" @click="handleEdit(scope.row.id)">编辑</el-button>
  30. <el-button size="mini" type="danger" @click="handleDelete(scope.row.id,scope.$index)">删除</el-button>
  31. </template>
  32. </el-table-column>
  33. </el-table>
  34. <el-pagination
  35. @size-change="handleSizeChange"
  36. @current-change="handleCurrentChange"
  37. :page-sizes="[10, 20, 30, 100]"
  38. :page-size="10"
  39. background
  40. style="margin-top:20px;float: right"
  41. layout="total, sizes, prev, pager, next, jumper"
  42. :total="total">
  43. </el-pagination>
  44. </div>
  45. <el-dialog title="新增" :visible.sync="newDialog">
  46. <el-form :model="form" ref="form" :rules="rules">
  47. <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
  48. <el-select v-model="form.inspectionMajor" placeholder="请选择检查大项">
  49. <el-option
  50. v-for="it in InspectionMajor"
  51. :key="it.project_id"
  52. :value="it.project_id"
  53. :label="it.project_name"
  54. >
  55. </el-option>
  56. </el-select>
  57. </el-form-item>
  58. <el-form-item label="检查频次(天)" :label-width="formLabelWidth" required prop="frequency">
  59. <el-input style="width:200px" v-model="form.frequency"></el-input>
  60. </el-form-item>
  61. <el-form-item label="排序" :label-width="formLabelWidth">
  62. <el-input style="width:200px" v-model="form.sort"></el-input>
  63. </el-form-item>
  64. </el-form>
  65. <div slot="footer" class="dialog-footer">
  66. <el-button @click="newDialog = false">取 消</el-button>
  67. <el-button type="primary" @click="SaveCheckConfiguration('form')">保 存</el-button>
  68. </div>
  69. </el-dialog>
  70. <el-dialog title="编辑" :visible.sync="editDialog">
  71. <el-form :model="editform" ref="editform" :rules="rules">
  72. <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
  73. <el-select v-model="editform.inspectionMajor" placeholder="请选择检查大项">
  74. <el-option
  75. v-for="it in InspectionMajor"
  76. :key="it.project_id"
  77. :value="it.project_id"
  78. :label="it.project_name"
  79. >
  80. </el-option>
  81. </el-select>
  82. </el-form-item>
  83. <el-form-item label="检查频次(天)" :label-width="formLabelWidth" required prop="frequency">
  84. <el-input style="width:200px" v-model="editform.frequency"></el-input>
  85. </el-form-item>
  86. <el-form-item label="排序" :label-width="formLabelWidth" >
  87. <el-input style="width:200px" v-model="editform.sort"></el-input>
  88. </el-form-item>
  89. </el-form>
  90. <div slot="footer" class="dialog-footer">
  91. <el-button @click="editDialog = false">取 消</el-button>
  92. <el-button type="primary" @click="UpdateCheck('editform')">保 存</el-button>
  93. </div>
  94. </el-dialog>
  95. </div>
  96. </div>
  97. </template>
  98. <script>
  99. import { GetOICData } from "@/api/qcd";
  100. import PieChart from "../qcd/components/BarChart";
  101. import { uParseTime } from "@/utils/tools";
  102. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  103. import {getAllInspectionData,SaveCheckConfiguration,getAllCheckList,getCheckDetail,UpdateCheck,DeleteCheck} from "@/api/common/common"
  104. export default {
  105. name: "dialysisTotal",
  106. data() {
  107. return {
  108. crumbs: [
  109. { path: false, name: "科室质控" },
  110. { path: false, name: "统计配置" },
  111. { path: false, name: "检验检查统计配置" }
  112. ],
  113. tabActiveName: "query",
  114. newDialog: false,
  115. editDialog: false,
  116. formLabelWidth: "120px",
  117. form: {
  118. inspectionMajor:"",
  119. frequency:"",
  120. sort:"",
  121. },
  122. editform:{
  123. id:0,
  124. inspectionMajor:"",
  125. frequency:"",
  126. sort:"",
  127. },
  128. InspectionMajor:[],
  129. rules: {
  130. inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
  131. frequency: [{ required: true, message: "检查频次不能为空" }],
  132. },
  133. limit:10,
  134. page:1,
  135. total:0,
  136. checkList:[],
  137. };
  138. },
  139. created() {
  140. //获取大项
  141. this.getAllInspectionData(),
  142. this.getAllCheckList()
  143. },
  144. methods: {
  145. handleTabClick(tab, event) {
  146. if (this.tabActiveName == "control") {
  147. this.$router.push({ path: "/qcd/patientanalysis/statisticalConfig" });
  148. }
  149. },
  150. handleEdit(id) {
  151. this.editDialog = true;
  152. getCheckDetail(id).then(response=>{
  153. if(response.data.state == 1){
  154. var checkdetail = response.data.data.checkdetail
  155. console.log("checkdetail",checkdetail)
  156. this.editform.id = checkdetail.id
  157. this.editform.inspectionMajor = checkdetail.inspection_major
  158. this.editform.frequency = checkdetail.inspection_frequency
  159. if(checkdetail.sort == 0){
  160. this.editform.sort = ""
  161. return
  162. }
  163. this.editform.sort = checkdetail.sort
  164. }
  165. })
  166. },
  167. getAllInspectionData(){
  168. getAllInspectionData().then(response=>{
  169. if(response.data.state == 1){
  170. var inspection = response.data.data.inspection
  171. //console.log("列表",inspection)
  172. this.InspectionMajor = inspection
  173. }
  174. })
  175. },
  176. //新增
  177. SaveCheckConfiguration(formName){
  178. this.$refs[formName].validate(valid=>{
  179. if(valid){
  180. SaveCheckConfiguration(this.form).then(response=>{
  181. if(response.data.state === 1){
  182. var configuration = response.data.data.configuration
  183. this.$message.success("保存成功")
  184. this.newDialog = false
  185. this.form.inspectionMajor = ""
  186. this.form.frequency = ""
  187. this.form.sort = ""
  188. }else{
  189. this.$message.error("检验检查项已存在,不能重复添加")
  190. }
  191. })
  192. }
  193. })
  194. },
  195. handleSizeChange(limit) {
  196. this.limit = limit;
  197. this.getAllCheckList()
  198. },
  199. handleCurrentChange(page) {
  200. this.page = page;
  201. this.getAllCheckList()
  202. },
  203. getAllCheckList(){
  204. getAllCheckList(this.page,this.limit).then(response=>{
  205. if(response.data.state == 1){
  206. var checklist = response.data.data.checklist
  207. for(let i=0;i<checklist.length;i++){
  208. if(checklist[i].sort == 0){
  209. checklist[i].sort = ""
  210. }
  211. }
  212. console.log("列表",checklist)
  213. this.checkList = checklist
  214. this.total = response.data.data.total
  215. console.log("total",this.total)
  216. }
  217. })
  218. },
  219. UpdateCheck(formName){
  220. if(this.editform.sort == ""){
  221. this.editform.sort = 0
  222. }
  223. if(this.editform.sort !=""){
  224. var sort = this.editform.sort
  225. var sorts = parseInt(sort)
  226. this.editform.sort = sorts
  227. }
  228. this.$refs[formName].validate(valid=>{
  229. if(valid){
  230. UpdateCheck(this.editform.id,this.editform).then(response=>{
  231. if(response.data.state == 1){
  232. var configuration = response.data.data.configuration
  233. this.editDialog = false
  234. this.getAllCheckList()
  235. this.$message.success("保存成功")
  236. }else{
  237. this.$message.error("检验检查项已存在")
  238. }
  239. })
  240. }
  241. })
  242. },
  243. handleDelete(id,index){
  244. this.$confirm(
  245. "确认要删除所选记录吗? <br>删除后,该信息将无法恢复",
  246. "删除提示",
  247. {
  248. dangerouslyUseHTMLString: true,
  249. confirmButtonText: "确定",
  250. cancelButtonText: "取消",
  251. type: "warning"
  252. }
  253. ).then(() => {
  254. DeleteCheck(id,index).then(response => {
  255. if (response.data.state === 1) {
  256. var msg = response.data.data.msg
  257. console.log("msg",msg)
  258. this.checkList.splice(index,1)
  259. }
  260. });
  261. });
  262. }
  263. },
  264. components: {
  265. PieChart,
  266. BreadCrumb
  267. }
  268. };
  269. </script>
  270. <style lang="scss">
  271. #oictable ::-webkit-scrollbar {
  272. height: 15px;
  273. }
  274. .configTable {
  275. .el-table td,
  276. .el-table th {
  277. text-align: center;
  278. }
  279. }
  280. </style>
  281. <style rel="stylesheet/scss" lang="scss" scoped>
  282. .newadd {
  283. margin-bottom: 10px;
  284. }
  285. // .app-container {
  286. // // margin: 20px;
  287. // font-size: 15px;
  288. // .filter-container {
  289. // padding-bottom: 5px;
  290. // }
  291. // .cqd-dataTitle {
  292. // color: #303133;
  293. // font-size: 14px;
  294. // border-bottom: 2px #e4e7ed solid;
  295. // height: 36px;
  296. // line-height: 36px;
  297. // margin: 0 0 25px 0;
  298. // position: relative;
  299. // }
  300. // .cqd-dataTitle::before {
  301. // position: absolute;
  302. // left: 0;
  303. // bottom: -2px;
  304. // content: "";
  305. // width: 42px;
  306. // height: 2px;
  307. // background: #409eff;
  308. // }
  309. // .search-component {
  310. // width: 500px;
  311. // .searchBox {
  312. // width: 300px;
  313. // height: 36px;
  314. // line-height: 36px;
  315. // padding-left: 15px;
  316. // border: 1px #dcdfe6 solid;
  317. // border-right: none;
  318. // outline: none;
  319. // float: left;
  320. // border-radius: 6px 0 0 6px;
  321. // font-size: 14px;
  322. // color: #333;
  323. // background: #fff;
  324. // box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
  325. // }
  326. // .searchBtn {
  327. // background-color: #409eff;
  328. // color: #fff;
  329. // font-size: 15px;
  330. // text-align: center;
  331. // height: 36px;
  332. // line-height: 36px;
  333. // float: left;
  334. // outline: none;
  335. // width: 70px;
  336. // border: none;
  337. // border-radius: 0 6px 6px 0;
  338. // font-family: "Microsoft Yahei";
  339. // cursor: pointer;
  340. // }
  341. // }
  342. // .amount {
  343. // font-weight: normal;
  344. // padding: 10px 0 0 0;
  345. // color: #606266;
  346. // font-size: 14px;
  347. // span {
  348. // color: #ef2525;
  349. // font-family: "Arial";
  350. // padding: 0 2px;
  351. // }
  352. // }
  353. // }
  354. //
  355. </style>