更新
This commit is contained in:
@ -0,0 +1,93 @@
|
||||
<template>
|
||||
<el-dialog title="深度研判" v-model="visible" v-if="visible" width="70%" @close="close">
|
||||
<el-form :model="formData" :rules="rules" ref="formRef" label-width="120px" label-position="top">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="研判议题" prop="ypyt" class="mt10">
|
||||
<el-input v-model="formData.ypyt" placeholder="请输入研判议题" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="研判时间" prop="wcsj" class="mt10">
|
||||
<el-date-picker v-model="formData.wcsj" type="datetime" placeholder="请选择研判时间" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报告类型" prop="bglx" class="mt10">
|
||||
<el-radio-group v-model="formData.bglx">
|
||||
<el-radio v-for="value in D_BZ_YPLX" :key="value.value" :label="value.value" :value="value.value" >{{value.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="参与研判部门" prop="deptIds" class="mt10">
|
||||
<MOSTY.Department clearable v-model="formData.ypbmdm" multiple style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="研判要求" prop="ypyq" class="mt10">
|
||||
<el-input v-model="formData.ypyq" placeholder="请填写研判要求" type="textarea" rows="4" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item class="mt10" center>
|
||||
<div style="margin: 0 auto;">
|
||||
<el-button type="primary" :loading="loading" @click="submitForm">提交</el-button>
|
||||
<el-button @click="close">取消</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import * as MOSTY from "@/components/MyComponents/index";
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { qcckPost } from '@/api/qcckApi'
|
||||
import { ref,getCurrentInstance } from 'vue'
|
||||
const emit = defineEmits(['change']);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_BZ_YPLX,D_BZ_YPFS } = proxy.$dict('D_BZ_YPLX','D_BZ_YPFS')
|
||||
const visible = ref(true)
|
||||
const loading = ref(false)
|
||||
const formRef = ref()
|
||||
const formData = ref({})
|
||||
|
||||
const rules = ref({
|
||||
ypyt: [{ required: true, message: '请输入研判议题', trigger: 'blur' }],
|
||||
wcsj: [{ required: true, message: '请选择研判时间', trigger: 'change' }],
|
||||
bglx: [{ required: true, message: '请选择报告类型', trigger: 'change' }],
|
||||
ypfs: [{ required: true, message: '请选择研判方式', trigger: 'change' }],
|
||||
deptIds: [{ required: true, message: '请选择参与研判部门', trigger: 'change' }],
|
||||
ypyq: [{ required: true, message: '请输入研判内容', trigger: 'blur' }],
|
||||
})
|
||||
const init = (row) => {
|
||||
visible.value = true;
|
||||
formData.value = Object.assign({}, formData.value, row || {})
|
||||
}
|
||||
const close = () => {
|
||||
visible.value = false;
|
||||
formRef.value.resetFields();
|
||||
}
|
||||
const submitForm = () => {
|
||||
formRef.value.validate((valid) => {
|
||||
if (!valid) return;
|
||||
let data = { ...formData.value, yplx:'01' }
|
||||
loading.value = true;
|
||||
qcckPost(data,'/mosty-gsxt/lzJcjPjdb/sdyp').then(res => {
|
||||
loading.value = false;
|
||||
ElMessage.success('研判成功');
|
||||
emit('change');
|
||||
close();
|
||||
}).catch(() => {
|
||||
loading.value = false;
|
||||
ElMessage.error('研判失败');
|
||||
})
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
init,
|
||||
})
|
||||
</script>
|
||||
@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<el-dialog title="研判" v-model="visible" v-if="visible" width="50%" @close="close">
|
||||
<el-form :model="formData" :rules="rules" ref="formRef" label-width="120px" label-position="top">
|
||||
<el-divider content-position="left">警情基本信息</el-divider>
|
||||
<el-descriptions class="margin-top" :column="3" border >
|
||||
<el-descriptions-item>
|
||||
<template #label><div class="cell-item">接警单编号</div></template>
|
||||
{{ formData.jjdbh }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template #label><div class="cell-item">报警电话</div></template>
|
||||
{{ formData.bjdh }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template #label><div class="cell-item"> 报警时间 </div></template>
|
||||
{{ formData.bjsj }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template #label><div class="cell-item"> 接警员姓名 </div></template>
|
||||
{{ formData.jjyxm }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template #label> <div class="cell-item"> 警情地址 </div> </template>
|
||||
{{ formData.jqdz }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-divider content-position="left">报警内容</el-divider>
|
||||
<el-input v-model="formData.bjnr" placeholder="请输入报警内容" type="textarea" rows="4" readonly />
|
||||
|
||||
|
||||
<el-form-item label="研判内容" prop="ypnr" class="mt20">
|
||||
<el-input v-model="formData.ypnr" placeholder="请输入研判结果" type="textarea" rows="4" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="" class="mt20" center>
|
||||
<div style="margin: 0 auto;">
|
||||
<el-button type="primary" :loading="loading" @click="submitForm">提交</el-button>
|
||||
<el-button @click="close">取消</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { qcckPost } from '@/api/qcckApi'
|
||||
import { ref } from 'vue'
|
||||
const emit = defineEmits(['change']);
|
||||
const visible = ref(false)
|
||||
const loading = ref(false)
|
||||
const formRef = ref()
|
||||
const formData = ref({})
|
||||
const rules = ref({
|
||||
ypnr: [{ required: true, message: '请输入研判内容', trigger: 'blur' }],
|
||||
})
|
||||
const init = (row) => {
|
||||
visible.value = true;
|
||||
formData.value = row
|
||||
}
|
||||
const close = () => {
|
||||
visible.value = false;
|
||||
formRef.value.resetFields();
|
||||
}
|
||||
const submitForm = () => {
|
||||
formRef.value.validate((valid) => {
|
||||
if (!valid) return;
|
||||
let data = { ...formData.value, yplx:'01' }
|
||||
loading.value = true;
|
||||
qcckPost(data,'/mosty-gsxt/lzJcjPjdb/ptyp').then(res => {
|
||||
loading.value = false;
|
||||
ElMessage.success('研判成功');
|
||||
emit('change');
|
||||
close();
|
||||
}).catch(() => {
|
||||
loading.value = false;
|
||||
ElMessage.error('研判失败');
|
||||
})
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
init,
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user