Commit e17b52c3 authored by miaojiale's avatar miaojiale

修改问题

parent 7b43b04d
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
<!-- 单选框 --> <!-- 单选框 -->
<el-radio-group <el-radio-group
v-if="item.type === 'radio' && !item.disabled" v-if="item.type === 'radio'"
v-model="form[item.prop]" v-model="form[item.prop]"
:disabled="item.disabled" :disabled="item.disabled"
@change="handleChange" @change="handleChange"
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
> >
</el-radio-group> </el-radio-group>
<!-- 单选框只读 --> <!-- 单选框只读 -->
<div <!-- <div
v-for="(opt, optIndex) in item.dicData" v-for="(opt, optIndex) in item.dicData"
v-else-if="item.type === 'radio' && item.disabled" v-else-if="item.type === 'radio' && item.disabled"
:key="optIndex" :key="optIndex"
...@@ -203,14 +203,12 @@ ...@@ -203,14 +203,12 @@
<el-radio <el-radio
v-show="opt.value == form[item.prop]" v-show="opt.value == form[item.prop]"
v-model="form[item.prop]" v-model="form[item.prop]"
:class=" :class="item.class ? item.class : item.disabled ? '' : ''"
item.class ? item.class : item.disabled ? 'read-radio' : ''
"
:label="opt.value" :label="opt.value"
@change="item.func ? item.func($event) : {}" @change="item.func ? item.func($event) : {}"
>{{ opt.label }}</el-radio >{{ opt.label }}</el-radio
> >
</div> </div> -->
<!-- 多选框 --> <!-- 多选框 -->
<template v-if="item.type === 'checkbox'"> <template v-if="item.type === 'checkbox'">
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
:data="tableData" :data="tableData"
border border
:show-summary="showSummary" :show-summary="showSummary"
v-loading="listLoading"
class="mt-20" class="mt-20"
> >
<el-table-column <el-table-column
...@@ -106,6 +107,7 @@ export default { ...@@ -106,6 +107,7 @@ export default {
], ],
year: [], year: [],
showSummary: false, showSummary: false,
listLoading: false,
} }
}, },
computed: { computed: {
...@@ -136,16 +138,18 @@ export default { ...@@ -136,16 +138,18 @@ export default {
getNow() { getNow() {
const nowDate = new Date() const nowDate = new Date()
this.yearBtn = nowDate.getFullYear() this.yearBtn = nowDate.getFullYear()
for (let i = 2023; i <= this.yearBtn; i++) { for (let i = 2018; i <= this.yearBtn; i++) {
this.yearList.push(i) this.yearList.push(i)
} }
}, },
async getQuality() { async getQuality() {
this.listLoading = true
let res let res
// console.log(this.curRole) // console.log(this.curRole)
switch (this.curRole) { switch (this.curRole) {
case "admin": case "admin":
res = await adminQuality({ year: this.yearBtn }) res = await adminQuality({ year: this.yearBtn })
this.listLoading = false
let { overall } = res.data let { overall } = res.data
this.allData = res.data this.allData = res.data
this.totalData = overall this.totalData = overall
...@@ -155,12 +159,14 @@ export default { ...@@ -155,12 +159,14 @@ export default {
case "auditer": case "auditer":
res = await checkerQuality({ year: this.yearBtn }) res = await checkerQuality({ year: this.yearBtn })
this.listLoading = false
this.allData = res.data this.allData = res.data
this.totalData = res.data.overall this.totalData = res.data.overall
this.showSummary = false this.showSummary = false
this.handleClick() this.handleClick()
break break
default: default:
this.listLoading = false
break break
} }
}, },
......
...@@ -26,6 +26,7 @@ export default { ...@@ -26,6 +26,7 @@ export default {
if (v.activeName == "index0") { if (v.activeName == "index0") {
let data = { let data = {
birthday: v.form.birthday, birthday: v.form.birthday,
sex: v.form.sex,
} }
sessionStorage.setItem("index1Data", JSON.stringify(data)) sessionStorage.setItem("index1Data", JSON.stringify(data))
} }
......
...@@ -242,7 +242,7 @@ export default { ...@@ -242,7 +242,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
let index1Data = sessionStorage.getItem("index1Data") let index1Data = sessionStorage.getItem("index1Data")
if (index1Data) { if (index1Data) {
let { birthday } = JSON.parse(index1Data) let { birthday, sex } = JSON.parse(index1Data)
let date = new Date(String(birthday).replace(/-/g, "/")) let date = new Date(String(birthday).replace(/-/g, "/"))
let d = new Date() let d = new Date()
let age = let age =
...@@ -256,6 +256,7 @@ export default { ...@@ -256,6 +256,7 @@ export default {
this.formInitial = { this.formInitial = {
birthday, birthday,
age, age,
sex,
} }
} }
}) })
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<script> <script>
import paginationMixin from "@/components/TabComponents/mixin" 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 ConfigForms from "./components/ConfigForms.vue"
import { mapGetters } from "vuex" import { mapGetters } from "vuex"
export default { export default {
...@@ -270,6 +270,18 @@ 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 { ...@@ -302,7 +314,28 @@ export default {
checkStatus === 2 ? "驳回修改" : checkStatus === 4 ? "不合格" : "" checkStatus === 2 ? "驳回修改" : checkStatus === 4 ? "不合格" : ""
this.note = status ? status + "" + checkNote : "" 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 }) { sortChange({ prop, order }) {
const sort = order ? (order === "ascending" ? "asc" : "desc") : "" const sort = order ? (order === "ascending" ? "asc" : "desc") : ""
const sortField = order ? prop : "" 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