Bläddra i källkod

三方责任人接口

yangyuxuan 8 månader sedan
förälder
incheckning
3dfe68c26c

+ 25 - 0
src/api/persons.ts

@@ -0,0 +1,25 @@
+import request from "@/utils/request";
+
+//获取责任人信息
+export function getPersonalData(data) {
+  return request({
+    url: "/api/ThreeProofingResponsible/person/list",
+    method: "get",
+    params: data
+  });
+}
+
+export function getPersonalType(data) {
+  return request({
+    url: "/system/dict/data/type/three_proofing",
+    method: "get",
+    params: data
+  });
+}
+
+export function getPersonalCard(id) {
+  return request({
+    url: "/api/ThreeProofingResponsible/person/info/" + id,
+    method: "get"
+  });
+}

+ 11 - 0
src/components/TimeLine/index.vue

@@ -0,0 +1,11 @@
+<script setup lang="ts">
+
+</script>
+
+<template>
+
+</template>
+
+<style scoped lang="scss">
+
+</style>

+ 74 - 27
src/views/event/detail.vue

@@ -95,19 +95,21 @@
                 <i class="icon7" />
                 <div class="event-data-item-title">伤亡情况:</div>
               </div>
-              <div v-show="eventInfo.casualties===''"
+              <div
+                v-show="eventInfo.casualties === ''"
                 class="event-data-item-value blue"
                 @click="handleUploadCasualties"
               >
                 去上报
               </div>
-              <div class="event-data-item-value" v-show="eventInfo.casualties==='1'">
-                死亡{{ eventInfo.deaths }}人,受伤{{ eventInfo.injuries }}人,失联{{ eventInfo.missing }}人
-                <span
-                  class=" blue"
-                  @click="handleUploadCasualties"
-                >续报
-                </span>
+              <div
+                v-show="eventInfo.casualties === '1'"
+                class="event-data-item-value"
+              >
+                死亡{{ eventInfo.deaths }}人,受伤{{
+                  eventInfo.injuries
+                }}人,失联{{ eventInfo.missing }}人
+                <span class="blue" @click="handleUploadCasualties">续报 </span>
               </div>
             </div>
             <div class="event-data-item">
@@ -147,19 +149,33 @@
           </div>
         </van-tab>
         <van-tab title="事件概要">
-          <div class="event_tab"><div class="emptyText">{{ eventInfo.event_description }}</div></div>
+          <div class="event_tab">
+            <div class="emptyText">{{ eventInfo.event_description }}</div>
+          </div>
         </van-tab>
         <van-tab title="事件跟踪">
           <div class="event_tab">
-            <van-steps direction="vertical" :active="0">
-              <van-step
+            <!--            <van-steps direction="vertical" :active="0">-->
+            <!--              <van-step-->
+            <!--                v-for="(item, index) in eventTrackState.items"-->
+            <!--                :key="item.id"-->
+            <!--              >-->
+            <!--                <div class="h3">{{ item.title }}</div>-->
+            <!--                <p>{{ item.description }}</p>-->
+            <!--              </van-step>-->
+            <!--            </van-steps>-->
+            <el-timeline style="max-width: 600px">
+              <el-timeline-item
                 v-for="(item, index) in eventTrackState.items"
                 :key="item.id"
+                :icon="activity.icon"
+                :color="activity.color"
+                :timestamp="activity.timestamp"
               >
                 <div class="h3">{{ item.title }}</div>
-                <p>{{ item.description }}</p>
-              </van-step>
-            </van-steps>
+                {{ item.description }}
+              </el-timeline-item>
+            </el-timeline>
           </div>
         </van-tab>
         <van-tab title="匹配预案">
@@ -234,7 +250,7 @@
       </van-tabs>
     </div>
 
-    <div class="footer" v-if="noControl ==''">
+    <div v-if="noControl == ''" class="footer">
       <div
         style="
           display: flex;
@@ -299,7 +315,38 @@ import StartEventDialog from "@/views/event/StartEventDialog.vue";
 import { download2 } from "@/utils/request";
 import { getPlanDoc, listPlan } from "@/api/duty/eventing";
 import AssociationPlan from "@/views/event/AssociationPlan.vue";
-
+import { ElTimeline, ElTimelineItem } from "element-plus";
+import { MoreFilled } from "@element-plus/icons-vue";
+
+const activities = [
+  {
+    content: "Custom icon",
+    timestamp: "2018-04-12 20:46",
+    size: "large",
+    type: "primary",
+    icon: MoreFilled
+  },
+  {
+    content: "Custom color",
+    timestamp: "2018-04-03 20:46",
+    color: "#0bbd87"
+  },
+  {
+    content: "Custom size",
+    timestamp: "2018-04-03 20:46",
+    size: "large"
+  },
+  {
+    content: "Custom hollow",
+    timestamp: "2018-04-03 20:46",
+    type: "primary",
+    hollow: true
+  },
+  {
+    content: "Default node",
+    timestamp: "2018-04-03 20:46"
+  }
+];
 const router = useRouter();
 const route = useRoute();
 const proxy = getCurrentInstance()?.proxy;
@@ -332,7 +379,7 @@ const data = reactive({
     plan_name: "",
     summary_file: [],
     plan_files: [],
-    create_time: '',
+    create_time: "",
     // 伤亡情况
     casualties: "0",
     deaths: "",
@@ -406,7 +453,7 @@ const uploadCasualtiesState = reactive({
     deaths: "",
     injuries: "",
     missing: "",
-    fileNames:[]
+    fileNames: []
   }
 });
 
@@ -435,7 +482,7 @@ const uploadReportState = reactive({
     deaths: "",
     injuries: "",
     missing: "",
-    fileNames:[]
+    fileNames: []
   }
 });
 
@@ -487,7 +534,7 @@ const handleDownload2 = (file: any) => {
   download2(baseUrl + "/file/download/" + file.url, file.file_name);
 };
 onMounted(() => {
-  noControl.value = route.query.nocontrol as string || "";
+  noControl.value = (route.query.nocontrol as string) || "";
   refreshData();
 });
 let map;
@@ -509,7 +556,7 @@ const refreshData = () => {
       dragEnable: true,
       scrollWheel: true,
       // 加载完成事件
-      onLoadCompleted: (AMap) => {
+      onLoadCompleted: AMap => {
         map = getMap();
         let marker = new AMap.Marker({
           position: lnglat,
@@ -517,14 +564,14 @@ const refreshData = () => {
             size: new AMap.Size(22, 28), //图标所处区域大小
             imageSize: new AMap.Size(22, 28), //图标大小
             image:
-                "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png"
+              "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png"
           }),
           anchor: "bottom-center",
           offset: new AMap.Pixel(0, 0)
         });
         marker.setMap(map);
       }
-    }
+    };
     const { getMap, initMap } = useAMap(options);
     initMap(options);
   });
@@ -683,13 +730,13 @@ const refreshData = () => {
     }
 
     .event-data-item-title {
-      color: #414F64;
+      color: #414f64;
       font-weight: bold;
       font-size: 14px;
     }
 
     .event-data-item-value {
-      color: #414F64;
+      color: #414f64;
       font-size: 14px;
     }
 
@@ -784,11 +831,11 @@ const refreshData = () => {
 :deep(.van-tabs__wrap) {
   border-bottom: 1px solid #f6f6f6;
   .van-tab {
-    color: #414F64;
+    color: #414f64;
     font-weight: bold;
   }
   .van-tab--active {
-    color: #2C81FF;
+    color: #2c81ff;
   }
 }
 .file-list {

+ 31 - 127
src/views/threePreventionResponsiblePerson/index.vue

@@ -57,7 +57,7 @@
         <div class="person-box" @click="showPersonalInformation(item)">
           <div class="circle">
             <img
-              :src="item.state === false ? offlineUser : onlineUser"
+              :src="item.state === false ? onlineUser : offlineUser"
               alt=""
             />
           </div>
@@ -65,13 +65,13 @@
             <div class="one">
               <div>{{ item.name }}</div>
               <div class="notOnline" :class="{ isOnline: item.state }">
-                {{ item.state === false ? "离线" : "在线" }}
+                {{ item.state === false ? "在线" : "离线" }}
               </div>
             </div>
             <div class="text-ellipsis">{{ item.position }}</div>
             <div style="margin-top: 5px">
-              <span v-for="i in item.type" :key="i" class="type-name">
-                {{ i }}
+              <span v-for="i in item.type_parent_list" :key="i" class="type-name">
+                {{ i.type_parent }}
               </span>
             </div>
           </div>
@@ -84,7 +84,6 @@
 </template>
 
 <script setup lang="ts">
-import profile from "@/assets/images/tempImage/用户.png";
 import offlineUser from "@/assets/images/threePreventionResponsiblePerson/offlineUsers.png";
 import onlineUser from "@/assets/images/threePreventionResponsiblePerson/onlineUsers.png";
 import { getDicts } from "@/api/system/dict/data";
@@ -92,6 +91,7 @@ import { getEventList } from "@/api/event";
 import searchImg from "@/assets/images/search.png";
 import closeImg from "@/assets/images/close.png";
 import OrganizationalStructure from "@/views/threePreventionResponsiblePerson/organizationalStructure.vue";
+import { getPersonalData, getPersonalType } from "@/api/persons";
 
 const router = useRouter();
 const keywords = ref("");
@@ -100,8 +100,9 @@ const fieldValue = ref("三防指挥部");
 const showPicker = ref(false);
 const onConfirm = ({ selectedValues, selectedOptions }) => {
   showPicker.value = false; //用于控制 van-picker 组件的显示状态,将其设置为 false 表示隐藏选择器。
-  requestParameters.value.type_content = selectedValues.toString(); //将用户选择的值(selectedValues)保存到 requestParameters 对象的 type_content 属性中
+  requestParameters.value.type_parent_id = selectedValues.toString(); //将用户选择的值(selectedValues)保存到 requestParameters 对象的 type_content 属性中
   fieldValue.value = selectedOptions[0].dictLabel; //将用户选择的第一个选项的 dictLabel 属性值保存到 fieldValue 中
+  requestParameters.value.page = 1;
   onLoad();
 };
 const loading = ref(false);
@@ -113,137 +114,42 @@ const customFieldName = {
 const requestParameters = ref({
   name: "",
   type: [],
-  type_content: "",
+  type_parent_id: "",
   page: 1,
-  page_size: 10,
-  keyword: keywords,
+  pageSize: 10,
+  Name: keywords,
   checkedId: ""
 });
 const persons = ref([]);
 const onLoad = () => {
-  getEventList(requestParameters.value)
-    .then(res => {
-      res.data = [
-        {
-          id: 1,
-          name: "张嘉佳",
-          unit: "茂名市委员会",
-          position: "茂名市市委常委 市人民政府副市长 党组副书记",
-          type: ["三防指挥部", "应急部门"],
-          profile_picture: profile,
-          state: true
-        },
-        {
-          id: 2,
-          name: "王长青",
-          unit: "茂名市委员会",
-          position: "茂名市委员会 茂名市委常委 茂名市委常委",
-          type: ["党委政府"],
-          profile_picture: profile,
-          state: false
-        },
-        {
-          id: 3,
-          name: "王长青",
-          unit: "茂名市委员会",
-          position: "茂名市委员会 茂名市委常委",
-          type: ["重点部门"],
-          profile_picture: profile,
-          state: true
-        },
-        {
-          id: 4,
-          name: "王长青",
-          unit: "茂名市委员会",
-          position: "茂名市委员会 茂名市委常委",
-          type: ["重点部门"],
-          profile_picture: profile,
-          state: false
-        },
-        {
-          id: 5,
-          name: "王长青",
-          unit: "茂名市委员会",
-          position: "茂名市委员会 茂名市委常委",
-          type: ["重点部门"],
-          profile_picture: profile,
-          state: true
-        },
-        {
-          id: 6,
-          name: "王长青",
-          unit: "茂名市委员会",
-          position: "茂名市委员会 茂名市委常委",
-          type: ["重点部门", "成员单位"],
-          profile_picture: profile,
-          state: true
-        },
-        {
-          id: 7,
-          name: "王长青",
-          unit: "茂名市委员会",
-          position: "茂名市委员会 茂名市委常委",
-          type: ["重点部门"],
-          profile_picture: profile,
-          state: true
-        },
-        {
-          id: 8,
-          name: "王长青",
-          unit: "茂名市委员会",
-          position: "茂名市委员会 茂名市委常委",
-          type: ["重点部门"],
-          profile_picture: profile,
-          state: true
-        },
-        {
-          id: 9,
-          name: "王长青",
-          unit: "茂名市委员会",
-          position: "茂名市委员会 茂名市委常委",
-          type: ["重点部门"],
-          profile_picture: profile,
-          state: true
-        },
-        {
-          id: 10,
-          name: "王长青",
-          unit: "茂名市委员会",
-          position: "茂名市委员会 茂名市委常委",
-          type: ["重点部门"],
-          profile_picture: profile,
-          state: true
-        }
-      ];
-      var item = res.data || [];
-      // 重置 persons 数组(如果是第一页)
-      if (requestParameters.value.page == 1) {
-        persons.value = [];
-      }
-      // 将新数据添加到 persons 数组中
-      item.forEach(temp => {
-        persons.value.push(temp);
-      });
-      // 检查是否加载了所有数据
-      if (persons.value.length >= res.total) {
-        finished.value = true;
-      } else {
-        finished.value = false;
-      }
-      requestParameters.value.page++;
-      loading.value = false;
-    })
-    .catch(error => {
-      // 处理错误(例如,显示错误消息或重置加载状态)
-      console.error("加载事件列表时出错:", error);
-      loading.value = false;
+  getPersonalData(requestParameters.value).then(res => {
+    var item = res.data || [];
+    // 重置 persons 数组(如果是第一页)
+    if (requestParameters.value.page == 1) {
+      persons.value = [];
+    }
+    // 将新数据添加到 persons 数组中
+    item.forEach(temp => {
+      persons.value.push(temp);
     });
+    // 检查是否加载了所有数据
+    if (persons.value.length >= res.total) {
+      finished.value = true;
+    } else {
+      finished.value = false;
+    }
+    requestParameters.value.page++;
+    loading.value = false;
+  });
 };
 onMounted(() => {
   getDicts("responsibility_type").then(res => {
     res.data.unshift({ dictLabel: "所有类型", dictValue: "" });
     responsibility_type.value = res.data;
   });
+  getPersonalType(requestParameters.value).then(res => {
+    responsibility_type = res.data || [];
+  });
 });
 const onSearch = keywords => {
   requestParameters.value.page = 1;
@@ -273,8 +179,6 @@ const handleSelect = (data) => {
   upOneLevel.value = data.value;
   requestParameters.value.checkedId = data.id;
 };
-
-
 </script>
 
 <style scoped lang="scss">

+ 26 - 16
src/views/threePreventionResponsiblePerson/personInformation.vue

@@ -12,7 +12,12 @@
         >
           <div class="information-box">
             <div class="circle2">
-              <img :src="personalInformation.state === false ? offlineUser : onlineUser" alt="" />
+              <img
+                :src="
+                  personalInformation.state === false ? onlineUser : offlineUser
+                "
+                alt=""
+              />
             </div>
             <div style="margin: 30px 15px">
               <div class="online-box">
@@ -23,7 +28,7 @@
                   class="isOnline"
                   :class="{ notOnline: personalInformation.state }"
                 >
-                  {{ personalInformation.state === false ? "离线" : "在线" }}
+                  {{ personalInformation.state === false ? "在线" : "离线" }}
                 </div>
               </div>
               <div style="margin-top: 15px">行政区划:茂名市</div>
@@ -32,7 +37,7 @@
         </div>
         <div class="unit-box">
           <div class="text">所属单位</div>
-          <div class="info-content">{{ personalInformation.unit }}</div>
+          <div class="info-content">{{ personalInformation.unit_name }}</div>
         </div>
         <div class="unit1-box">
           <div class="text">职务</div>
@@ -42,13 +47,13 @@
         </div>
         <div class="unit1-box">
           <div class="text">责任类别</div>
-          <div style="margin-top: 5px;margin-left: 20px">
+          <div style="margin-top: 5px; margin-left: 20px">
             <span
-              v-for="i in personalInformation.type"
+              v-for="i in personalInformation.type_list"
               :key="i"
               class="type-name"
             >
-              {{ i }}
+              {{ i.type_parent }}
             </span>
           </div>
         </div>
@@ -62,20 +67,25 @@ import { ref } from "vue";
 import profile from "@/assets/images/tempImage/用户.png";
 import offlineUser from "@/assets/images/threePreventionResponsiblePerson/offlineUsers.png";
 import onlineUser from "@/assets/images/threePreventionResponsiblePerson/onlineUsers.png";
+import { getPersonalCard } from "@/api/persons";
 
 const isShowInformation = ref(false);
-const personalInformation = ref({
-  id: 1,
-  name: "张嘉佳",
-  unit: "茂名市委员会",
-  position: "茂名市市委常委 市人民政府副市长 党组副书记",
-  type: ["三防指挥部", "应急部门"],
-  profile_picture: profile,
-  state: true
+const personalInformation = ref({});
+const requestParameters = ref({
+  id: "",
+  name: "",
+  type: [],
+  type_parent_id: "",
+  checkedId: ""
 });
 const route = useRoute();
-const userId = route.query.id;
-const personType = personalInformation.value.type.toString();
+const userId = ref(route.query.id);
+getPersonalCard(userId.value).then(res => {
+  personalInformation.value = res.data || [];
+});
+
+
+// const personType = personalInformation.value.type.toString();
 const showPersonalInformation = item => {
   isShowInformation.value = true;
   personalInformation.value = item;

+ 90 - 45
src/views/worker/inspectionWork/patorlTaskResultList.vue

@@ -1,52 +1,66 @@
 <template>
     <div class="container">
         <div style="padding-top: 16px;display:flex;flex-direction: row;justify-content: space-between;">
+          <div style="display: flex;background-color: #ffffff;width: 342px;height: 55px;top: 11px;
+            left: 0;
+            right: 0;
+            margin: auto;
+            padding-top: 12px;
+            padding-left: 11px;
+            ">
+            <div class="blue-rectangle" />
             <div class="van-doc-block__title">{{get_task_title(type)}}</div>
+          </div>
         </div>
-
-        <div
-          v-for="(item, index) in resultData"
-          :key="item.id"
-          class="event-list-item"
-        >
-          <div class="item-content">
-            <div class="item-data">
-              <div class="item-left">
-                <i class="icon4" />
-                <div class="item-data-label">{{ get_point_label(index)}}:</div>
+        <div>
+          <div
+              v-for="(item, index) in resultData"
+              :key="item.id"
+              class="event-list-item"
+          >
+            <div class="item-content">
+              <div class="item-data">
+                <div class="item-left">
+                  <div class="item-data-label">{{ get_point_label(index)}}:</div>
+                </div>
+                <div class="item-data-value3">{{ item.inspection_point_name }}</div>
               </div>
-              <div class="item-data-value">{{ item.inspection_point_name }}</div>
-            </div>
-            <div class="item-data">
-              <div class="item-left">
-                <i class="icon4" />
-                <div class="item-data-label">巡检结果:</div>
+              <div class="item-data">
+                <div class="item-left">
+                  <div class="item-data-label">巡检结果:</div>
+                </div>
+                <div class="item-data-value2" :class="{ 'item-data-value' : item.inspection_result  == 10 }">
+                  {{ (item.inspection_result == 10) ? '正常' : '异常' }}
+                </div>
               </div>
-              <div class="item-data-value">{{ (item.inspection_result == 10) ? '正常' : '异常' }}</div>
-            </div>
-            <div class="item-data">
-              <div class="item-left">
-                <i class="icon4" />
-                <div class="item-data-label">备注信息:</div>
+              <div class="item-data">
+                <div class="item-left">
+                  <div class="item-data-label">备注信息:</div>
+                </div>
+                <div class="item-data-value">{{ item.remark }}</div>
               </div>
-              <div class="item-data-value">{{ item.remark }}</div>
-            </div>
-            <div class="item-data">
-              <div class="item-left">
-                <i class="icon4" />
-                <div class="item-data-label">现场照片:</div>
-              </div>
-              <div class="item-data-image">
-                <img
-                    v-for="(file, index2) in item.fileList"
-                    :key="file.id"
-                    class="image"
-                    :src="get_img_url(file.url)"
-                  ></img>
+              <div class="item-data">
+                <div style="display: flex;flex-direction: column">
+                  <div class="item-left">
+                    <div class="item-data-label">现场照片:</div>
+                  </div>
+                  <div class="item-data-image">
+                    <img
+                        v-for="(file, index2) in item.fileList"
+                        :key="file.id"
+                        class="image"
+                        :src="get_img_url(file.url)"
+                    ></img>
+                  </div>
+                </div>
+
               </div>
             </div>
           </div>
+
+
         </div>
+
     </div>
 </template>
 
@@ -118,6 +132,7 @@ onMounted(() => {
   font-size: 4.6vmin;
   font-weight: 600;
   line-height: 6.0vmin;
+  margin-left: -15px;
 }
 
 .event-list-item {
@@ -125,8 +140,6 @@ onMounted(() => {
     margin: 16px 16px 0;
     background: #ffffff;
     border-radius: 4px;
-    border: 0.5px solid #eaedf7;
-    box-shadow: 0 0 4px 0 #4554661a;
     &:first-child {
       margin-top: 0px;
     }
@@ -172,18 +185,29 @@ onMounted(() => {
       .item-data-label {
         flex-shrink: 0;
         color: #414f64;
+        font-weight: bold;
+        margin-bottom: 10px;
       }
   
       .item-data-value {
-        color: #414f64;
+        color: #40C75F;
+      }
+      .item-data-value2 {
+        color: #FF2F3C;
+      }
+      .item-data-value3{
+        color: #414F64;
       }
       .item-data-image {
-        display:flex;
-        flex-direction: row; 
-
+        margin-left: -6px;
+        margin-top: -6px;
         .image {
-          height:var(--van-uploader-size);;
-          width:var(--van-uploader-size);;
+          //height:var(--van-uploader-size);;
+          //width:var(--van-uploader-size);;
+          width: 90px;
+          height: 67.9px;
+          margin: 9px;
+          display: inline-block;
         }
       }
     }
@@ -216,4 +240,25 @@ onMounted(() => {
     background-size: 100% 100%;
     margin-right: 7px;
   }
+.blue-rectangle {
+  width: 6px;
+  height: 20px;
+  background-image: linear-gradient(180deg, #00fce7 0%, #2c81ff 100%);
+  border-radius: 0 3px 0 0;
+}
+.image-block {
+  display:flex;
+  flex-direction: row;
+  width: 80px;
+  height: 60px;
+}
+.in-block {
+  //width: 100px;
+  //height: 80px;
+  margin: 10px;
+  //border: 1px solid #8470FF;
+  //display: inline-block;
+  height:var(--van-uploader-size);;
+  width:var(--van-uploader-size);;
+}
 </style>

+ 1 - 0
src/views/worker/inspectionWork/patrolTask.vue

@@ -255,6 +255,7 @@ const handleView = (item) => {
     .item-data-label {
       flex-shrink: 0;
       color: #414f64;
+      font-weight: bold;
     }
 
     .item-data-value {