|
@@ -1,14 +1,21 @@
|
|
|
<template>
|
|
|
- <Dialog draggable custom-show type="sm" title="领导批示" height="550px" @close="handleClose" @confirm="handleSubmit">
|
|
|
+ <Dialog draggable custom-show type="sm" title="领导批示" height="780px" @close="handleClose" @confirm="handleSubmit">
|
|
|
<el-form ref="formRef" :model="form" :rules="rules">
|
|
|
- <el-form-item label="领导审批" label-width="200px" prop="content">
|
|
|
- <el-input v-model="form.content" class="custom-input2" clearable placeholder="请输入领导审批意见" />
|
|
|
+ <el-form-item label="领导单位:" label-width="240px" prop="leader_unit">
|
|
|
+ <el-input v-model="form.leader_unit" class="custom-input2" clearable placeholder="请输入领导单位" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="领导姓名:" label-width="240px" prop="leader_name">
|
|
|
+ <el-input v-model="form.leader_name" class="custom-input2" clearable placeholder="请输入领导姓名" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="领导批示:" label-width="240px" prop="content">
|
|
|
+ <el-input v-model="form.content" class="custom-input2" clearable placeholder="请输入领导批示" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</Dialog>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
+import { addLeaderInstruction } from '@/api/emergencyCommandMap/JointDuty';
|
|
|
import { showSuccessMsg } from '@/utils/notification';
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -17,15 +24,34 @@ const props = defineProps({
|
|
|
},
|
|
|
id: {
|
|
|
type: String
|
|
|
+ },
|
|
|
+ task_id: {
|
|
|
+ type: String
|
|
|
}
|
|
|
});
|
|
|
const emits = defineEmits(['update:modelValue', 'close', 'confirm']);
|
|
|
+// watch(
|
|
|
+// () => props.task_id,
|
|
|
+// (new_task_id) => {
|
|
|
+// form.value.task_id = new_task_id;
|
|
|
+// console.log('new_task_id', new_task_id);
|
|
|
+// },
|
|
|
+// { immediate: true }
|
|
|
+// );
|
|
|
+
|
|
|
const formRef = ref();
|
|
|
|
|
|
const form = ref({
|
|
|
- content: ''
|
|
|
+ task_id: "",
|
|
|
+ content: "",
|
|
|
+ processing_status: "",
|
|
|
+ feeback_type: "1",
|
|
|
+ leader_unit: "",
|
|
|
+ leader_name: ""
|
|
|
});
|
|
|
const rules = {
|
|
|
+ leader_unit: [{ required: true, message: '领导单位不能为空', trigger: 'blur' }],
|
|
|
+ leader_name: [{ required: true, message: '领导姓名不能为空', trigger: 'blur' }],
|
|
|
content: [{ required: true, message: '领导批示不能为空', trigger: 'blur' }]
|
|
|
};
|
|
|
// 弹窗关闭后
|
|
@@ -37,9 +63,19 @@ const handleClose = () => {
|
|
|
const handleSubmit = () => {
|
|
|
formRef.value?.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- showSuccessMsg('批示成功');
|
|
|
- emits('update:modelValue', false);
|
|
|
- emits('confirm');
|
|
|
+ console.log(form.value);
|
|
|
+ addLeaderInstruction(form.value).then((response)=>{
|
|
|
+ if (response.code === 200) {
|
|
|
+ showSuccessMsg('批示成功');
|
|
|
+ emits('update:modelValue', false);
|
|
|
+ emits('confirm');
|
|
|
+ } else {
|
|
|
+ console.error('批示失败:', response.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // showSuccessMsg('批示成功');
|
|
|
+ // emits('update:modelValue', false);
|
|
|
+ // emits('confirm');
|
|
|
}
|
|
|
});
|
|
|
};
|