You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

194 lines
5.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<div>
<xy-dialog ref="dialog" :width='50' :is-show.sync="isShow" type="form" title="访视审核"
:form="form" :rules="rules" @submit="submit">
<template v-slot:checkstatus>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>审核状态
</div>
<div class="xy-table-item-content">
<el-select v-model="form.checkstatus" filterable style="width: 300px;" placeholder="请选择审核状态">
<el-option v-for="item in checkstatusList" :key="item.value" :label="item.value" :value="item.value">
</el-option>
</el-select>
</div>
</div>
</template>
</xy-dialog>
</div>
</template>
<script>
import {
save,
index,
show
} from "@/api/system/baseForm.js"
import {
Message
} from 'element-ui'
export default {
data() {
return {
isShow: false,
id: '',
person_id: '',
tableName: 'viewrecords',
form: {
checkstatus:''
},
rules: {},
checkstatusList:[{
label:'待审核',
value:'待审核'
},{
label:'通过',
value:'通过'
},{
label:'不通过',
value:'不通过'
}]
}
},
created() {
},
watch: {
isShow(newVal) {
if (newVal) {
this.getViewDetail()
// if (this.type === 'editor') {
// this.getViewDetail()
// } else {
// this.getRecordDetail()
// }
} else {
this.id = ''
this.person_id = ''
this.$refs['dialog'].reset()
}
}
},
methods: {
async getRecordDetail() {
const res = await show({
id: this.person_id,
table_name: 'records'
})
this.form = {
viewtext: '',
viewtime: "",
viewscene: "",
viewstatus: '',
infotext: '',
street:res?.street,
name: res?.name,
nation: res?.nation,
sex: res?.sex,
marry: res?.marry,
birthday: res?.birthday,
idcard: res?.idcard,
mobile: res?.mobile,
telephone: res?.telephone,
education: res?.education,
household: res?.household,
address: res?.address,
reside: res?.reside,
disabilitytext: '',
number: res?.number,
disabilitytype: res?.disabilitytype,
disabilitylevel: res?.disabilitylevel,
disabilitydetail: res?.disabilitydetail,
start_time: res?.start_time,
validity: res?.validity,
end_time: res?.end_time,
end_change: res?.end_change,
guardiantext: '',
guardian: res?.guardian,
relationship: res?.relationship,
guardian_mobile: res?.guardian_mobile,
guardian_telephone: res?.guardian_telephone,
remark: res?.remark,
}
},
async getViewDetail() {
const res = await show({
id: this.id,
table_name: 'viewrecords'
})
this.form = {
viewtext: res?.viewtext,
viewtime: res?.viewtime,
viewscene: res?.viewscene,
viewstatus: res?.viewstatus,
person_id: res?.person_id,
checkstatus: res?.checkstatus,
infotext: res?.infotext,
street:res?.street,
name: res?.name,
nation: res?.nation,
sex: res?.sex,
marry: res?.marry,
birthday: res?.birthday,
idcard: res?.idcard,
mobile: res?.mobile,
telephone: res?.telephone,
education: res?.education,
household: res?.household,
address: res?.address,
reside: res?.reside,
disabilitytext: '',
number: res?.number,
disabilitytype: res?.disabilitytype,
disabilitylevel: res?.disabilitylevel,
disabilitydetail: res?.disabilitydetail,
start_time: res?.start_time,
validity: res?.validity,
end_time: res?.end_time,
end_change: res?.end_change,
guardiantext: '',
guardian: res?.guardian,
relationship: res?.relationship,
guardian_mobile: res?.guardian_mobile,
guardian_telephone: res?.guardian_telephone,
remark: res?.remark,
}
},
submit(val) {
if(this.form.checkstatus=='通过'){
save({
id: this.person_id,
table_name: 'records',
...this.form
}).then(res => {
Message({
type: 'success',
message: '更新成功'
})
this.isShow = false
this.$emit('refresh')
})
}
save({
id: this.id,
table_name: this.tableName,
...this.form
}).then(res => {
Message({
type: 'success',
message: '审核成功'
})
this.isShow = false
this.$emit('refresh')
})
}
},
}
</script>
<style>
</style>