Commit e17b52c3 authored by miaojiale's avatar miaojiale

修改问题

parent 7b43b04d
......@@ -182,7 +182,7 @@
<!-- 单选框 -->
<el-radio-group
v-if="item.type === 'radio' && !item.disabled"
v-if="item.type === 'radio'"
v-model="form[item.prop]"
:disabled="item.disabled"
@change="handleChange"
......@@ -195,7 +195,7 @@
>
</el-radio-group>
<!-- 单选框只读 -->
<div
<!-- <div
v-for="(opt, optIndex) in item.dicData"
v-else-if="item.type === 'radio' && item.disabled"
:key="optIndex"
......@@ -203,14 +203,12 @@
<el-radio
v-show="opt.value == form[item.prop]"
v-model="form[item.prop]"
:class="
item.class ? item.class : item.disabled ? 'read-radio' : ''
"
:class="item.class ? item.class : item.disabled ? '' : ''"
:label="opt.value"
@change="item.func ? item.func($event) : {}"
>{{ opt.label }}</el-radio
>
</div>
</div> -->
<!-- 多选框 -->
<template v-if="item.type === 'checkbox'">
......
......@@ -40,6 +40,7 @@
:data="tableData"
border
:show-summary="showSummary"
v-loading="listLoading"
class="mt-20"
>
<el-table-column
......@@ -106,6 +107,7 @@ export default {
],
year: [],
showSummary: false,
listLoading: false,
}
},
computed: {
......@@ -136,16 +138,18 @@ export default {
getNow() {
const nowDate = new Date()
this.yearBtn = nowDate.getFullYear()
for (let i = 2023; i <= this.yearBtn; i++) {
for (let i = 2018; i <= this.yearBtn; i++) {
this.yearList.push(i)
}
},
async getQuality() {
this.listLoading = true
let res
// console.log(this.curRole)
switch (this.curRole) {
case "admin":
res = await adminQuality({ year: this.yearBtn })
this.listLoading = false
let { overall } = res.data
this.allData = res.data
this.totalData = overall
......@@ -155,12 +159,14 @@ export default {
case "auditer":
res = await checkerQuality({ year: this.yearBtn })
this.listLoading = false
this.allData = res.data
this.totalData = res.data.overall
this.showSummary = false
this.handleClick()
break
default:
this.listLoading = false
break
}
},
......
......@@ -26,6 +26,7 @@ export default {
if (v.activeName == "index0") {
let data = {
birthday: v.form.birthday,
sex: v.form.sex,
}
sessionStorage.setItem("index1Data", JSON.stringify(data))
}
......
......@@ -242,7 +242,7 @@ export default {
this.$nextTick(() => {
let index1Data = sessionStorage.getItem("index1Data")
if (index1Data) {
let { birthday } = JSON.parse(index1Data)
let { birthday, sex } = JSON.parse(index1Data)
let date = new Date(String(birthday).replace(/-/g, "/"))
let d = new Date()
let age =
......@@ -256,6 +256,7 @@ export default {
this.formInitial = {
birthday,
age,
sex,
}
}
})
......
......@@ -43,7 +43,7 @@
<script>
import paginationMixin from "@/components/TabComponents/mixin"
import { getPatientPage } from "@/api/patient.js"
import { getPatientPage, deletePatient } from "@/api/patient.js"
import ConfigForms from "./components/ConfigForms.vue"
import { mapGetters } from "vuex"
export default {
......@@ -270,6 +270,18 @@ export default {
}
},
},
{
func: this.deletePatient,
formatter(row) {
return {
label: "删除",
type: "text",
}
},
style: {
color: "#FA6400",
},
},
],
},
],
......@@ -302,7 +314,28 @@ export default {
checkStatus === 2 ? "驳回修改" : checkStatus === 4 ? "不合格" : ""
this.note = status ? status + "" + checkNote : ""
},
deletePatient(row) {
this.$confirm(`是否删除【${row.name}】?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deletePatient(row.patientId).then((res) => {
if (res.code === 1) {
this.$message({
type: "success",
message: "删除成功!",
})
if (this.tableData.length == 1 && this.pageIndex != 1) {
this.pageIndex--
}
this.handleSearch()
}
})
})
.catch(() => {})
},
sortChange({ prop, order }) {
const sort = order ? (order === "ascending" ? "asc" : "desc") : ""
const sortField = order ? prop : ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment