|
|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<script setup> |
|
|
|
|
|
|
|
|
|
import useCatchStore from "@/stores/modules/catch"; |
|
|
|
|
// 禁闭管理 |
|
|
|
|
import {timeFormat, calculateAge,extractInfoFromID} from "@/utils/util"; |
|
|
|
|
import { |
|
|
|
|
@ -13,6 +13,13 @@ import {
|
|
|
|
|
} from "@/api/work/confinement"; |
|
|
|
|
import feedback from "@/utils/feedback"; |
|
|
|
|
import {BASE_PATH} from "@/api/request"; |
|
|
|
|
import {getDictLable} from "@/utils/util"; |
|
|
|
|
//字典 |
|
|
|
|
const catchStore = useCatchStore(); |
|
|
|
|
const dict = catchStore.getDicts(["confinement"]); |
|
|
|
|
|
|
|
|
|
//编辑窗口弹窗 |
|
|
|
|
let editLoading =ref(false) |
|
|
|
|
//禁闭管理表单检索条件 |
|
|
|
|
let query = ref({ |
|
|
|
|
current: 1, |
|
|
|
|
@ -152,10 +159,15 @@ let NursingOrgList = ref([])
|
|
|
|
|
const handleExport = () => { |
|
|
|
|
window.open(`${BASE_PATH}/confinement/export?` + new URLSearchParams(query.value).toString()) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const ChangeMatter =()=>{ |
|
|
|
|
return formData.value.matter === '其他'; |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 新增禁闭弹窗 |
|
|
|
|
* */ |
|
|
|
|
const ShowAddForm = () => { |
|
|
|
|
getPoliceListFun() |
|
|
|
|
formData.value = {} |
|
|
|
|
isEdit.value = false; |
|
|
|
|
editShow.value = true |
|
|
|
|
@ -221,13 +233,16 @@ const handleUpDate = (row) => {
|
|
|
|
|
* 编辑提交事件 |
|
|
|
|
* */ |
|
|
|
|
const handleSumbit = async () => { |
|
|
|
|
|
|
|
|
|
await formRef.value.validate(); |
|
|
|
|
editLoading.value=true |
|
|
|
|
//判断是新增还是修改 |
|
|
|
|
if (isEdit.value) { |
|
|
|
|
const res = await upDateConfinement(formData.value); |
|
|
|
|
} else { |
|
|
|
|
const res = await InsertConfinement(formData.value); |
|
|
|
|
} |
|
|
|
|
editLoading.value=false |
|
|
|
|
feedback.msgSuccess("操作成功"); |
|
|
|
|
editShow.value = false |
|
|
|
|
getList() |
|
|
|
|
@ -329,8 +344,17 @@ onMounted(() => {
|
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="事由"> |
|
|
|
|
<el-input placeholder="请输入事由" |
|
|
|
|
v-model="query.matter"/> |
|
|
|
|
<el-select |
|
|
|
|
v-model="query.matter" |
|
|
|
|
clearable> |
|
|
|
|
<el-option |
|
|
|
|
v-for="(item,key) in dict.confinement" |
|
|
|
|
:key="key" |
|
|
|
|
:value="item.dictValue" |
|
|
|
|
:label="item.dictLabel" |
|
|
|
|
></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
@ -466,7 +490,7 @@ onMounted(() => {
|
|
|
|
|
</main> |
|
|
|
|
<!-- 编辑表单--> |
|
|
|
|
<el-dialog v-model="editShow" :title="isEdit?'编辑禁闭信息':'新增禁闭信息'" width="900px"> |
|
|
|
|
<el-form label-width="148" :model="formData" ref="formRef" :rules="rules"> |
|
|
|
|
<el-form v-loading="editLoading" label-width="148" :model="formData" ref="formRef" :rules="rules"> |
|
|
|
|
<div style="margin-bottom: 80px"> |
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
@ -476,6 +500,7 @@ onMounted(() => {
|
|
|
|
|
v-model="formData.policeId" |
|
|
|
|
filterable |
|
|
|
|
remote |
|
|
|
|
clearable |
|
|
|
|
default-first-option |
|
|
|
|
@change="CopyUserDetail" |
|
|
|
|
:remote-method="getPoliceListFun" |
|
|
|
|
@ -626,10 +651,26 @@ onMounted(() => {
|
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-form-item label="事由" prop="matter"> |
|
|
|
|
<el-input type="textarea" :rows="3" v-model="formData.matter"></el-input> |
|
|
|
|
<el-select v-model="formData.matter" > |
|
|
|
|
<el-option |
|
|
|
|
v-for="(item,key) in dict.confinement" |
|
|
|
|
:key="key" |
|
|
|
|
:value="item.dictValue" |
|
|
|
|
:label="item.dictLabel" |
|
|
|
|
></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<!-- <el-input type="textarea" :rows="3" v-model="formData.matter"></el-input>--> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row v-if="ChangeMatter()" > |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-form-item label="备注" > |
|
|
|
|
<el-input type="textarea" :rows="3" v-model="formData.remark"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="开始日期" prop="startTime"> |
|
|
|
|
@ -792,7 +833,18 @@ onMounted(() => {
|
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-form-item label="事由" prop="matter"> |
|
|
|
|
{{formData.matter}} |
|
|
|
|
{{ getDictLable( |
|
|
|
|
dict.confinement, |
|
|
|
|
formData.matter |
|
|
|
|
) }} |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<el-row v-if="ChangeMatter()" > |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-form-item label="备注" > |
|
|
|
|
{{formData.remark}} |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
|