Commit 4c2704fb authored by miaojiale's avatar miaojiale

增加审核按钮,审核权限

parent 2c544c6e
...@@ -795,6 +795,7 @@ export default { ...@@ -795,6 +795,7 @@ export default {
}, },
...mapGetters({ ...mapGetters({
fontSize: "table/fontSize", fontSize: "table/fontSize",
roles: "user/roles",
}), }),
}, },
methods: { methods: {
...@@ -864,6 +865,9 @@ export default { ...@@ -864,6 +865,9 @@ export default {
remoteMethod(val) { remoteMethod(val) {
this.$emit("remoteMethod", val) this.$emit("remoteMethod", val)
}, },
clearSort() {
this.$refs.selftab.clearSort()
},
}, },
} }
</script> </script>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<span v-if="!isEmpty">当前审核</span> <span v-if="!isEmpty">当前审核</span>
<span v-if="!isEmpty" class="f-b" <span v-if="!isEmpty" class="f-b"
>{{ curUnion }}<span v-if="!editStatus" >{{ curUnion }}<span v-if="!editStatus"
>【剩余{{ auditNum }}</span ><span v-if="!inPatientId">【剩余{{ auditNum }}</span></span
></span ></span
> >
</div> </div>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
v-if="patientId && !isEmpty && !editStatus" v-if="patientId && !isEmpty && !editStatus"
>修改</el-button >修改</el-button
> >
<el-button class="btn" @click="$router.go(-1)">返回</el-button> <el-button class="btn" @click="backEvents">返回</el-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -164,6 +164,8 @@ ...@@ -164,6 +164,8 @@
? curBtn == 1 ? curBtn == 1
? "好的" ? "好的"
: "提交" : "提交"
: inPatientId
? "确认并返回"
: "确认并进入下一例审核" : "确认并进入下一例审核"
}}</el-button> }}</el-button>
</div> </div>
...@@ -232,6 +234,8 @@ ...@@ -232,6 +234,8 @@
? curBtn == 1 ? curBtn == 1
? "好的" ? "好的"
: "提交" : "提交"
: inPatientId
? "确认并返回"
: "确认并进入下一例审核" : "确认并进入下一例审核"
}}</el-button> }}</el-button>
</div> </div>
...@@ -300,6 +304,11 @@ export default { ...@@ -300,6 +304,11 @@ export default {
confirmStatus: false, confirmStatus: false,
} }
}, },
props: {
formId: String,
inPatientId: String,
inUnionName: String,
},
computed: { computed: {
showClose() { showClose() {
return this.curBtn == 1 ? false : true return this.curBtn == 1 ? false : true
...@@ -310,7 +319,11 @@ export default { ...@@ -310,7 +319,11 @@ export default {
mounted() { mounted() {
let unionId = this.$route.query.unionId let unionId = this.$route.query.unionId
let patientId = this.$route.query.patientId let patientId = this.$route.query.patientId
if (unionId && !patientId) { if (this.inPatientId) {
// 组件使用
this.patientId = this.inPatientId
this.curUnion = this.inUnionName
} else if (unionId && !patientId) {
this.editStatus = false this.editStatus = false
this.getUser(unionId) this.getUser(unionId)
} else if (patientId) { } else if (patientId) {
...@@ -324,6 +337,13 @@ export default { ...@@ -324,6 +337,13 @@ export default {
// this.$refs.publicDialog.dialogVisible = true // this.$refs.publicDialog.dialogVisible = true
}, },
methods: { methods: {
backEvents() {
if (this.inPatientId) {
this.$emit("changeIsAudit")
} else {
this.$router.go(-1)
}
},
refresh() { refresh() {
this.$refs["screen"].getPatientDetail() this.$refs["screen"].getPatientDetail()
}, },
...@@ -462,7 +482,7 @@ export default { ...@@ -462,7 +482,7 @@ export default {
} }
} }
}, },
// 不合格提交 // 提交
onSubmit() { onSubmit() {
this.loading = true this.loading = true
// 切换文本 // 切换文本
...@@ -530,7 +550,10 @@ export default { ...@@ -530,7 +550,10 @@ export default {
nextExample() { nextExample() {
// ! // !
this.$store.commit("user/setGetMessageFlag", true) this.$store.commit("user/setGetMessageFlag", true)
if (this.editStatus) { if (this.inPatientId) {
this.onCancel()
this.$emit("submitAudit")
} else if (this.editStatus) {
this.loading = false this.loading = false
this.onCancel() this.onCancel()
} else { } else {
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
:page-size="pageSize" :page-size="pageSize"
@pageSizeChange="handleSizeChange" @pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange" @currentPageChange="handleCurrentChange"
:sortChange="handleSort"
:showSummary="auditStatus === '0'" :showSummary="auditStatus === '0'"
:getSummaries="getSummaries" :getSummaries="getSummaries"
/> />
...@@ -101,6 +102,7 @@ export default { ...@@ -101,6 +102,7 @@ export default {
label: "待审核(例)备份", label: "待审核(例)备份",
minWidth: 120, minWidth: 120,
value: "unCheckNums", value: "unCheckNums",
// sortable: "custom",
}, },
{ {
label: "最新上报时间", label: "最新上报时间",
...@@ -213,6 +215,13 @@ export default { ...@@ -213,6 +215,13 @@ export default {
this.handleClick() this.handleClick()
}, },
methods: { methods: {
handleSort(val) {
console.log(val)
const { prop, order } = val
this.pageIndex = 1
this.handleSearch({ unCheckNums: order })
// order "descending" prop "unCheckNums"
},
getSummaries() { getSummaries() {
return [ return [
"总计", "总计",
...@@ -229,6 +238,7 @@ export default { ...@@ -229,6 +238,7 @@ export default {
} }
this.pageIndex = 1 this.pageIndex = 1
this.handleSearch() this.handleSearch()
this.$refs.table.clearSort()
}, },
auditHandle(data, i) { auditHandle(data, i) {
if (this.type == "1") { if (this.type == "1") {
...@@ -271,12 +281,16 @@ export default { ...@@ -271,12 +281,16 @@ export default {
} }
} }
}, },
async handleSearch() { async handleSearch(obj) {
this.listLoading = true this.listLoading = true
let params = { let params = {
pageSize: this.pageSize, pageSize: this.pageSize,
pageNum: this.pageIndex, pageNum: this.pageIndex,
...obj,
} }
// if (this.type==0) {
// }
let res let res
switch (this.auditStatus) { switch (this.auditStatus) {
case "0": case "0":
......
<template> <template>
<div class="container"> <div class="container">
<div v-show="!isDetail"> <div v-show="!isDetail && !isAudit">
<direct-search <direct-search
ref="form" ref="form"
:label-position="'right'" :label-position="'right'"
...@@ -39,6 +39,14 @@ ...@@ -39,6 +39,14 @@
@addMethods="addMethods" @addMethods="addMethods"
></ConfigForms> ></ConfigForms>
</div> </div>
<audit
v-if="isAudit"
:form-id="curAuditDetail.formId"
:in-patient-id="curAuditDetail.patientId"
:inUnionName="curAuditDetail.unionName"
@changeIsAudit="changeIsAudit"
@submitAudit="submitAudit"
></audit>
</div> </div>
</template> </template>
...@@ -46,13 +54,26 @@ ...@@ -46,13 +54,26 @@
import paginationMixin from "@/components/TabComponents/mixin" import paginationMixin from "@/components/TabComponents/mixin"
import { getPatientPage, deletePatient } from "@/api/patient.js" import { getPatientPage, deletePatient } from "@/api/patient.js"
import ConfigForms from "./components/ConfigForms.vue" import ConfigForms from "./components/ConfigForms.vue"
import audit from "@/views/audit-detail/index.vue"
import { mapGetters } from "vuex" import { mapGetters } from "vuex"
export default { export default {
name: "ScreeningIndex", name: "ScreeningIndex",
components: { ConfigForms }, components: { ConfigForms, audit },
mixins: [paginationMixin], mixins: [paginationMixin],
computed: {
...mapGetters({
selectedIndex: "table/selectedIndex",
refreshFlag: "table/refreshFlag",
roles: "user/roles",
}),
initCheckStatus() {
return this.$route.query.checkStatus
},
},
data() { data() {
return { return {
isAudit: false, //控制审核详情
curAuditDetail: {},
isDetail: false, //! 控制详情显隐 isDetail: false, //! 控制详情显隐
listLoading: false, listLoading: false,
disabled: false, disabled: false,
...@@ -117,7 +138,191 @@ export default { ...@@ -117,7 +138,191 @@ export default {
value: "查询", value: "查询",
}, },
], ],
columns: [ columns: [],
searchForm: {},
initForm: {},
}
},
methods: {
// 处理部分逻辑
addMethods(v) {
console.log(v)
if (v.activeName == "index0") {
let data = {
birthday: v.form.birthday,
sex: v.form.sex,
survey_time: v.form.survey_time,
}
sessionStorage.setItem("index1Data", JSON.stringify(data))
}
},
backInfoce() {
this.$router.push({ query: {} })
this.isDetail = false
},
handleView(row) {
this.handleAdd(row, null, true, false)
},
handleAdd(
{ patientId, name, checkStatus, checkNote },
index,
disabled = false,
tabDisabled = true
) {
sessionStorage.removeItem("index1Data")
sessionStorage.removeItem("survey_time")
sessionStorage.removeItem("birthday")
this.$store.commit("table/setAge", "")
this.disabled = disabled
this.tabDisabled = tabDisabled
this.patientId = patientId || null
this.name = name
this.isDetail = true
const status =
checkStatus === 2 ? "驳回修改" : checkStatus === 4 ? "不合格" : ""
this.note = status ? status + "" + checkNote : ""
},
changeIsAudit() {
this.isAudit = false
this.curAuditDetail = {}
},
handleAudit(row) {
console.log(row)
this.curAuditDetail = row
this.isAudit = true
},
submitAudit() {
this.isAudit = false
if (this.tableData.length == 1 && this.pageIndex != 1) {
this.pageIndex--
}
this.handleSearch(this.searchForm)
},
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 : ""
this.handleSearch({ sortField, sort })
},
// 查询
handleFormSearch(form) {
this.searchForm = form
this.pageIndex = 1
this.handleSearch(form)
},
handleSearch(form) {
if (this.$route.query.checkStatus) {
this.$router.push({
query: {},
})
}
this.listLoading = true
const params = Object.assign(this.cacheForm, form)
const data = {}
for (let key in params) {
if (params[key] !== "" && params[key] !== null) {
if (key.includes("Date") && params[key]) {
data["start" + key] = params[key][0]
data["end" + key] = params[key][1]
} else {
data[key] = params[key]
}
}
}
data.current = this.pageIndex
data.size = this.pageSize
data.isDraft = 0
getPatientPage(data).then((res) => {
this.listLoading = false
if (res.code === 1) {
const d = res.data
this.tableData = d.records || []
this.total = Number(d.total)
}
})
},
},
watch: {
selectedIndex(v) {
this.handleFormSearch(this.searchForm)
},
refreshFlag(v) {
if (v) {
this.$store.commit("table/setRefreshFlag", 0)
this.isDetail = false
this.$nextTick(() => {
this.handleView({
patientId: this.patientId,
name: "",
})
})
}
},
initCheckStatus(v) {
if (v) {
this.initForm = {
checkStatus: this.$route.query.checkStatus + "",
}
this.cacheForm = {}
// console.log(this.searchForm)
this.handleSearch(this.initForm)
}
console.log("status" + v)
},
},
created() {
if (this.$route.query.checkStatus) {
this.initForm = {
checkStatus: this.$route.query.checkStatus + "",
}
this.handleSearch(this.initForm)
} else {
this.handleFormSearch()
}
// if (this.$route.path == "/screening/index") {
// this.tabDisabled = false
// }
console.log(this.$route.query.patientId)
if (this.$route.query.patientId) {
let patientId = this.$route.query.patientId
this.patientId = patientId
// this.$nextTick(() => {
this.handleView({
patientId: patientId,
name: "",
})
// })
console.log("有数据啊")
}
},
mounted() {
let roleList = this.roles.map((e) => e.roleCode)
// console.log(this.$route.query.checkStatus)
this.columns = [
{ {
label: "医联体", label: "医联体",
minWidth: 120, minWidth: 120,
...@@ -272,194 +477,44 @@ export default { ...@@ -272,194 +477,44 @@ export default {
}, },
}, },
{ {
func: this.deletePatient, func: this.handleAudit,
isHidden() {
return !(
roleList.includes("admin") || roleList.includes("auditer")
)
},
formatter(row) { formatter(row) {
if (row.checkStatus == 1) {
return { return {
label: "删除", label: "审核",
type: "text", type: "text",
} }
}, } else {
return {
label: "",
type: "none",
style: { style: {
color: "#FA6400", display: "none",
},
},
],
},
],
searchForm: {},
initForm: {},
}
},
methods: {
// 处理部分逻辑
addMethods(v) {
console.log(v)
if (v.activeName == "index0") {
let data = {
birthday: v.form.birthday,
sex: v.form.sex,
survey_time: v.form.survey_time,
}
sessionStorage.setItem("index1Data", JSON.stringify(data))
}
},
backInfoce() {
this.$router.push({ query: {} })
this.isDetail = false
},
handleView(row) {
this.handleAdd(row, null, true, false)
},
handleAdd(
{ patientId, name, checkStatus, checkNote },
index,
disabled = false,
tabDisabled = true
) {
sessionStorage.removeItem("index1Data")
sessionStorage.removeItem("survey_time")
sessionStorage.removeItem("birthday")
this.$store.commit("table/setAge", "")
this.disabled = disabled
this.tabDisabled = tabDisabled
this.patientId = patientId || null
this.name = name
this.isDetail = true
const status =
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 : ""
this.handleSearch({ sortField, sort })
}, },
// 查询 {
handleFormSearch(form) { func: this.deletePatient,
this.searchForm = form formatter(row) {
this.pageIndex = 1 return {
this.handleSearch(form) label: "删除",
}, type: "text",
handleSearch(form) {
if (this.$route.query.checkStatus) {
this.$router.push({
query: {},
})
}
this.listLoading = true
const params = Object.assign(this.cacheForm, form)
const data = {}
for (let key in params) {
if (params[key] !== "" && params[key] !== null) {
if (key.includes("Date") && params[key]) {
data["start" + key] = params[key][0]
data["end" + key] = params[key][1]
} else {
data[key] = params[key]
}
}
}
data.current = this.pageIndex
data.size = this.pageSize
data.isDraft = 0
getPatientPage(data).then((res) => {
this.listLoading = false
if (res.code === 1) {
const d = res.data
this.tableData = d.records || []
this.total = Number(d.total)
}
})
},
},
computed: {
...mapGetters({
selectedIndex: "table/selectedIndex",
refreshFlag: "table/refreshFlag",
}),
initCheckStatus() {
return this.$route.query.checkStatus
},
},
watch: {
selectedIndex(v) {
this.handleFormSearch(this.searchForm)
},
refreshFlag(v) {
if (v) {
this.$store.commit("table/setRefreshFlag", 0)
this.isDetail = false
this.$nextTick(() => {
this.handleView({
patientId: this.patientId,
name: "",
})
})
} }
}, },
initCheckStatus(v) { style: {
if (v) { color: "#FA6400",
this.initForm = {
checkStatus: this.$route.query.checkStatus + "",
}
this.cacheForm = {}
// console.log(this.searchForm)
this.handleSearch(this.initForm)
}
console.log("status" + v)
}, },
}, },
created() { ],
if (this.$route.query.checkStatus) {
this.initForm = {
checkStatus: this.$route.query.checkStatus + "",
}
this.handleSearch(this.initForm)
} else {
this.handleFormSearch()
}
// if (this.$route.path == "/screening/index") {
// this.tabDisabled = false
// }
console.log(this.$route.query.patientId)
if (this.$route.query.patientId) {
let patientId = this.$route.query.patientId
this.patientId = patientId
// this.$nextTick(() => {
this.handleView({
patientId: patientId,
name: "",
})
// })
console.log("有数据啊")
}
}, },
mounted() { ]
// console.log(this.$route.query.checkStatus)
}, },
} }
</script> </script>
......
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