소스 검색

领导批示弹窗

Hwf 5 일 전
부모
커밋
795d1b187d

+ 3 - 0
src/types/components.d.ts

@@ -25,11 +25,14 @@ declare module 'vue' {
     ElIcon: typeof import('element-plus/es')['ElIcon']
     ElImage: typeof import('element-plus/es')['ElImage']
     ElInput: typeof import('element-plus/es')['ElInput']
+    ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
     ElOption: typeof import('element-plus/es')['ElOption']
     ElPagination: typeof import('element-plus/es')['ElPagination']
     ElRow: typeof import('element-plus/es')['ElRow']
     ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
     ElSelect: typeof import('element-plus/es')['ElSelect']
+    ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
+    ElSkeletonItem: typeof import('element-plus/es')['ElSkeletonItem']
     ElSlider: typeof import('element-plus/es')['ElSlider']
     ElText: typeof import('element-plus/es')['ElText']
     ElTimeline: typeof import('element-plus/es')['ElTimeline']

+ 48 - 0
src/views/emergencyCommandMap/RightSection/LeaderInstruction.vue

@@ -0,0 +1,48 @@
+<template>
+  <Dialog draggable custom-show type="sm" title="领导批示" height="550px" @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>
+    </el-form>
+  </Dialog>
+</template>
+
+<script lang="ts" setup>
+import { showSuccessMsg } from '@/utils/notification';
+
+const props = defineProps({
+  modelValue: {
+    type: Boolean
+  },
+  id: {
+    type: String
+  }
+});
+const emits = defineEmits(['update:modelValue', 'close', 'confirm']);
+const formRef = ref();
+
+const form = ref({
+  content: ''
+});
+const rules = {
+  content: [{ required: true, message: '领导批示不能为空', trigger: 'blur' }]
+};
+// 弹窗关闭后
+const handleClose = () => {
+  emits('update:modelValue', false);
+};
+
+//
+const handleSubmit = () => {
+  formRef.value?.validate((valid) => {
+    if (valid) {
+      showSuccessMsg('批示成功');
+      emits('update:modelValue', false);
+      emits('confirm');
+    }
+  });
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 11 - 0
src/views/emergencyCommandMap/RightSection/RenWuGenZong.vue

@@ -41,6 +41,8 @@
 
   <!--弹窗-->
   <RenWuGenZongInfo v-if="eventManageState.showListDialog" v-model="eventManageState.showListDialog" :event-id="eventId" />
+
+  <LeaderInstruction v-if="leaderInstructionState.show" v-model="leaderInstructionState.show" :id="leaderInstructionState.id" />
 </template>
 
 <script lang="ts" setup>
@@ -49,6 +51,7 @@ import { selectTask } from '@/api/emergencyCommandMap/JointDuty';
 import { parseTime } from '@/utils/ruoyi';
 import RenWuGengXin from '@/views/emergencyCommandMap/RightSection/RenWuGengXin.vue';
 import RenWuGenZongInfo from '@/views/emergencyCommandMap/RightSection/RenWuGenZongInfo.vue';
+import LeaderInstruction from '@/views/emergencyCommandMap/RightSection/LeaderInstruction.vue';
 
 const newSectionState = reactive({
   showListDialog: false
@@ -80,6 +83,10 @@ const showMoreEventManageList = () => {
 
 let timer;
 let isMounted = ref(false);
+const leaderInstructionState = ref({
+  show: false,
+  id: ''
+});
 // 请求数据
 const fetchData = (unNeedTimeout?: boolean) => {
   selectTask({ event_code: props.eventId })
@@ -109,6 +116,10 @@ const handleUpdateSuccess = (updatedData) => {
 const handleLeaderInstruction = (item) => {
   // 处理领导批示逻辑
   console.log('领导批示:', item);
+  leaderInstructionState.value = {
+    show: true,
+    id: item.id
+  };
 };
 
 const toggleExpand = (item) => {

+ 4 - 1
src/views/globalMap/index.vue

@@ -249,7 +249,10 @@ const clickMenu = (item, dataList) => {
       let checked = item.checked ? '1' : '2';
       // 打点信息
       addMarkers(item);
-      if (['易涝隐患点', '省政务无人机', '铁塔运行监测', '通讯保障', '救援队伍', '重点车辆', '河道监测', '水库监测'].includes(item.name) || item.isVideo) {
+      if (
+        ['易涝隐患点', '省政务无人机', '铁塔运行监测', '通讯保障', '救援队伍', '重点车辆', '河道监测', '水库监测'].includes(item.name) ||
+        item.isVideo
+      ) {
         rightMenuRef.value.updateMenu(checked, item);
       } else {
         let index = findChecked(dataList, item.name);