lcw
This commit is contained in:
@ -1,93 +1,116 @@
|
||||
<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>
|
||||
<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="bmdm" class="mt10">
|
||||
<MOSTY.Department clearable v-model="formData.bmdm" multiple style="width: 100%;"
|
||||
@getDepValue="getdep($event)" />
|
||||
</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,
|
||||
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(false)
|
||||
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 = {
|
||||
sjly: '03',
|
||||
sjlyid: row.jjdbh,
|
||||
}
|
||||
}
|
||||
const close = () => {
|
||||
visible.value = false;
|
||||
formRef.value.resetFields();
|
||||
}
|
||||
const deptIds = ref([])
|
||||
const getdep = (e) => {
|
||||
if (Array.isArray(e)) {
|
||||
deptIds.value = e
|
||||
} else {
|
||||
deptIds.value = [e]
|
||||
}
|
||||
}
|
||||
const submitForm = () => {
|
||||
formRef.value.validate((valid) => {
|
||||
if (!valid) return;
|
||||
loading.value = true;
|
||||
const promes = {
|
||||
...formData.value,
|
||||
cyypList: deptIds.value.map((item) => {
|
||||
return {
|
||||
ypbmmc: item.orgName,
|
||||
ypbmdm: item.orgCode
|
||||
}
|
||||
}
|
||||
),
|
||||
}
|
||||
qcckPost(promes, '/mosty-gsxt/lzJcjPjdb/sdyp').then(res => {
|
||||
loading.value = false;
|
||||
ElMessage.success('研判成功');
|
||||
emit('change');
|
||||
close();
|
||||
}).catch(() => {
|
||||
loading.value = false;
|
||||
ElMessage.error('研判失败');
|
||||
})
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
init,
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -25,16 +25,17 @@
|
||||
<template #jqlbdm="{ row }">
|
||||
<DictTag :tag="false" :value="row.jqlbdm" :options="JQLB" />
|
||||
</template>
|
||||
<template #ypzt="{ row }">
|
||||
{{ row.ypzt === '01' ? '已研判' : '未研判' }}
|
||||
</template>
|
||||
<!-- <template #jqdjdm="{ row }">
|
||||
<DictTag :tag="false" :value="row.jqdjdm" :options="D_BZ_JQDJ" />
|
||||
</template> -->
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link type="warning" @click="addEdit('edit', row)">研判</el-link>
|
||||
<el-link type="danger" @click="addEdit('edit', row)">深度研判</el-link>
|
||||
<el-link type="primary" @click="addEdit('edit', row)">详情</el-link>
|
||||
<el-link type="primary" @click="handleYP('研判', row)">研判</el-link>
|
||||
<el-link type="primary" @click="handleYP('深度研判', row)">深度研判</el-link>
|
||||
<el-link type="warning" @click="handleYP('研判', row)">研判</el-link>
|
||||
<el-link type="danger" @click="handleYP('深度研判', row)">深度研判</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
||||
@ -48,7 +49,7 @@
|
||||
|
||||
<!-- 研判弹窗 -->
|
||||
<YpDialog ref="ypDialog" @change="getList" />
|
||||
<!-- <DeepYpDialog ref="deepYpDialog" @change="getList" /> -->
|
||||
<DeepYpDialog ref="deepYpDialog" @change="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -122,7 +123,7 @@ const pageData = reactive({
|
||||
{ label: "警情类型", prop: "jqlbdm",showSolt:true },
|
||||
{ label: "警情地址", prop: "jqdz" },
|
||||
{ label: "补充接警内容", prop: "bcjjnr", showOverflowTooltip: true },
|
||||
|
||||
{ label: "研判状态", prop: "ypzt",showSolt:true },
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user