Przeglądaj źródła

feat: 修复问题处理通知路由,删除注释代码

qindao 1 rok temu
rodzic
commit
43742111a0

+ 1 - 1
src/api/message/question-notifications.ts

@@ -1,5 +1,5 @@
 import { http } from '@/utils/http/axios';
 import { http } from '@/utils/http/axios';
-import { issueDetilasType } from '@/views/message/systemNotifications/type.ts';
+import { issueDetilasType } from '@/views/message/systemNotifications/type';
 
 
 // 修改推送文案
 // 修改推送文案
 export function modifyContent(content: string, id: number) {
 export function modifyContent(content: string, id: number) {

+ 2 - 2
src/router/full-routes.ts

@@ -371,8 +371,8 @@ const fullRoutes: AppRouteRecordRaw[] = [
       {
       {
         // 问题处理通知
         // 问题处理通知
         path: 'question-notification',
         path: 'question-notification',
-        name: 'QuestionNotification',
-        component: '/message/questionNotifications/questionNotifications',
+        name: 'MessageQuestionNotification',
+        component: '/message/question-notifications/QuestionNotifications',
         meta: {
         meta: {
           icon: '',
           icon: '',
           title: '问题处理通知',
           title: '问题处理通知',

+ 9 - 20
src/views/message/questionNotifications/questionNotifications.vue

@@ -36,8 +36,7 @@
       :destroy-on-close="true"
       :destroy-on-close="true"
       class="workShopDialog"
       class="workShopDialog"
     >
     >
-      <!-- <WorkShopTree @cancel="handleCancle" @submit="handleSubmit" :selectedUser="selectedUser" /> -->
-      <WorkShopTree @cancel="handleCancle" :selectedUser="selectedUser" :re-fresh-camera="setCameraChosen" />
+      <WorkShopTree @cancel="handleCancle" :selectedUser="selectedUser" :refresh-camera="setCameraChosen" />
     </el-dialog>
     </el-dialog>
     <el-dialog
     <el-dialog
       v-model="showDialog"
       v-model="showDialog"
@@ -68,13 +67,7 @@
 </template>
 </template>
 <script lang="ts" setup>
 <script lang="ts" setup>
   import { ref, onMounted, computed } from 'vue';
   import { ref, onMounted, computed } from 'vue';
-  import {
-    queryIssueProcessMessage,
-    modifyContent,
-    modifyWorkshopList,
-    queryWorkshopNamebyIds,
-    getPushRange,
-  } from '@/api/message/question-notifications';
+  import { modifyContent, modifyWorkshopList, getPushRange } from '@/api/message/question-notifications';
 
 
   import WorkShopTree from './components/WorkShopTree.vue';
   import WorkShopTree from './components/WorkShopTree.vue';
   import ManageContent from './components/ManageContent.vue';
   import ManageContent from './components/ManageContent.vue';
@@ -106,18 +99,14 @@
   };
   };
 
 
   const submitDialog = () => {
   const submitDialog = () => {
-    modifyContent(content.value, editId.value)
-      .then(() => {
-        ElMessage({
-          message: '修改成功',
-          type: 'success',
-          plain: true,
-        });
-        closeDialog();
-      })
-      .catch((error) => {
-        console.error(error);
+    modifyContent(content.value, editId.value).then(() => {
+      ElMessage({
+        message: '修改成功',
+        type: 'success',
+        plain: true,
       });
       });
+      closeDialog();
+    });
   };
   };
 
 
   const closeDialog = () => {
   const closeDialog = () => {

src/views/message/questionNotifications/components/ManageContent.vue → src/views/message/question-notifications/components/ManageContent.vue


+ 9 - 70
src/views/message/questionNotifications/components/WorkShopTree.vue

@@ -25,28 +25,15 @@
     </div>
     </div>
     <div class="right" style="margin-left: 16px">
     <div class="right" style="margin-left: 16px">
       <div class="head" style="margin-bottom: 22px">
       <div class="head" style="margin-bottom: 22px">
-        <span
-          style="font-weight: 400; font-size: 16px; color: rgba(0, 0, 0, 0.88); line-height: 22px"
+        <span style="font-weight: 400; font-size: 16px; color: rgba(0, 0, 0, 0.88); line-height: 22px"
           >已选择({{ selected }}</span
           >已选择({{ selected }}</span
         >
         >
-        <span
-          style="
-            margin-left: 4px;
-            font-size: 10px;
-            font-weight: 400;
-            color: rgba(0, 0, 0, 0.45);
-            line-height: 22px;
-          "
+        <span style="margin-left: 4px; font-size: 10px; font-weight: 400; color: rgba(0, 0, 0, 0.45); line-height: 22px"
           >/&nbsp;{{ total }}</span
           >/&nbsp;{{ total }}</span
         >
         >
       </div>
       </div>
       <div class="selected">
       <div class="selected">
-        <el-tag
-          v-for="(person, index) in selectedPeople"
-          :key="index"
-          closable
-          @close="handleTagClose(person.code)"
-        >
+        <el-tag v-for="(person, index) in selectedPeople" :key="index" closable @close="handleTagClose(person.code)">
           {{ person.name }}
           {{ person.name }}
         </el-tag>
         </el-tag>
       </div>
       </div>
@@ -59,27 +46,17 @@
 </template>
 </template>
 
 
 <script lang="ts" setup>
 <script lang="ts" setup>
-  import { onMounted, ref, watch, computed } from 'vue';
+  import { onMounted, ref } from 'vue';
   import { Search } from '@element-plus/icons-vue';
   import { Search } from '@element-plus/icons-vue';
   import { ElTree } from 'element-plus';
   import { ElTree } from 'element-plus';
   import { ElMessage } from 'element-plus';
   import { ElMessage } from 'element-plus';
-  import { countLeafNodes } from '@/views/message/persongroup/utils/index';
-  import { getList, getPushRange, updatePushRange } from '@/api/message/question-notifications';
-  import useComTree from '@/views/system-config/scene-manage/store/use-com-tree';
-  import { storeToRefs } from 'pinia';
-  import { cloneDeep } from 'lodash-es';
-  import { TreeKey } from 'element-plus/es/components/tree/src/tree.type';
+  import { getPushRange, updatePushRange } from '@/api/message/question-notifications';
   import { treeSelected } from '../type';
   import { treeSelected } from '../type';
-  import {
-    CameraTree,
-    CameraTreeNodeType,
-    CameraQueryForm,
-    getCameraTree,
-  } from '@/api/camera/camera-preview';
+  import { CameraTree, getCameraTree } from '@/api/camera/camera-preview';
 
 
   const props = defineProps<{
   const props = defineProps<{
     selectedUser: treeSelected[];
     selectedUser: treeSelected[];
-    reFreshCamera: (arr: treeSelected[]) => unknown;
+    refreshCamera: (arr: treeSelected[]) => unknown;
   }>();
   }>();
 
 
   //相机树信息
   //相机树信息
@@ -106,47 +83,9 @@
     });
     });
   };
   };
 
 
-  const comTree = useComTree();
-  const { comTreeData } = storeToRefs(comTree);
-  const loading = ref(true);
   const queryStr = ref<string>('');
   const queryStr = ref<string>('');
   const defaultProps = { label: 'name' };
   const defaultProps = { label: 'name' };
-  const nodeData = computed(() => {
-    const newList: any[] = [];
-    if (comTreeData.value && comTreeData.value.length) {
-      for (let i = 0; i < comTreeData.value.length; i++) {
-        const data = comTreeData.value[i];
-        if (data.children && data.children.length) {
-          const treeItem = {
-            id: data.id,
-            code: data.id,
-            name: data.name,
-            children: data
-              .labelList!.map((item) => {
-                return {
-                  id: item.id,
-                  code: item.code,
-                  name: item.name,
-                  children: data
-                    .children!.filter((children) => children.sceneLabelId === item.id)
-                    .map((children) => {
-                      return {
-                        id: children.id,
-                        code: children.code,
-                        name: children.name,
-                        isShop: true,
-                      };
-                    }),
-                };
-              })
-              .filter((label) => label.children.length),
-          };
-          newList.push(treeItem);
-        }
-      }
-    }
-    return newList;
-  });
+
   const filterNode = (query, nodeData, node) => {
   const filterNode = (query, nodeData, node) => {
     if (!query) return true;
     if (!query) return true;
     nodeData.filter = nodeData.name!.includes(query);
     nodeData.filter = nodeData.name!.includes(query);
@@ -180,7 +119,7 @@
           type: 'success',
           type: 'success',
           plain: true,
           plain: true,
         });
         });
-        props.reFreshCamera(selectedPeople.value);
+        props.refreshCamera(selectedPeople.value);
       })
       })
       .catch((error) => {
       .catch((error) => {
         console.error(error);
         console.error(error);

+ 9 - 37
src/views/message/questionNotifications/components/contentPanel.vue

@@ -84,9 +84,7 @@
         :min="0"
         :min="0"
         size="small"
         size="small"
         style="width: 70px"
         style="width: 70px"
-        controls-position="right" />小时未{{ props.title }}再次推送给{{
-        props.title
-      }}员并抄送给<el-select
+        controls-position="right" />小时未{{ props.title }}再次推送给{{ props.title }}员并抄送给<el-select
         :disabled="!editDetails.openEdit || !editDetails.atLongTimeExpiry"
         :disabled="!editDetails.openEdit || !editDetails.atLongTimeExpiry"
         v-model="editDetails.copyTo"
         v-model="editDetails.copyTo"
         value-key="id"
         value-key="id"
@@ -99,12 +97,7 @@
         collapse-tags
         collapse-tags
         collapse-tags-tooltip
         collapse-tags-tooltip
       >
       >
-        <el-option
-          v-for="item in editDetails.copyTo"
-          :key="item.id"
-          :label="item.realname"
-          :value="item"
-        /> </el-select
+        <el-option v-for="item in editDetails.copyTo" :key="item.id" :label="item.realname" :value="item" /> </el-select
     ></div>
     ></div>
     <div class="subtitle">推送文案 </div>
     <div class="subtitle">推送文案 </div>
     <el-tooltip
     <el-tooltip
@@ -114,11 +107,7 @@
       :content="editDetails.textToPush"
       :content="editDetails.textToPush"
       placement="bottom"
       placement="bottom"
     >
     >
-      <el-input
-        disabled
-        style="width: 364px; margin-left: 30px; margin-top: 4px"
-        :placeholder="textToshow"
-      />
+      <el-input disabled style="width: 364px; margin-left: 30px; margin-top: 4px" :placeholder="textToshow" />
     </el-tooltip>
     </el-tooltip>
   </div>
   </div>
   <el-dialog
   <el-dialog
@@ -132,11 +121,7 @@
     class="workShopDialog"
     class="workShopDialog"
   >
   >
     <!-- <SelectTree @cancel="handleCancle" @submit="handleSubmit" :selectedUser="selectedUser" /> -->
     <!-- <SelectTree @cancel="handleCancle" @submit="handleSubmit" :selectedUser="selectedUser" /> -->
-    <PersonFilterSelection
-      @cancel="handleCancle"
-      @submit="handleSubmit"
-      :init-selected="selectedUser"
-    />
+    <PersonFilterSelection @cancel="handleCancle" @submit="handleSubmit" :init-selected="selectedUser" />
   </el-dialog>
   </el-dialog>
 </template>
 </template>
 <script lang="ts" setup>
 <script lang="ts" setup>
@@ -195,7 +180,6 @@
   };
   };
 
 
   const handleSubmit = (selectedData: SelectedFilterPersonInfo[]) => {
   const handleSubmit = (selectedData: SelectedFilterPersonInfo[]) => {
-    // selectedUser.value = selectedData;
     editDetails.value.copyTo = selectedData;
     editDetails.value.copyTo = selectedData;
     dialogVisible.value = false;
     dialogVisible.value = false;
   };
   };
@@ -206,26 +190,18 @@
     () => props.savedData, //监听状态值,,当拉取的数据发生变化时,对editDetails进行赋初值
     () => props.savedData, //监听状态值,,当拉取的数据发生变化时,对editDetails进行赋初值
     (newValue) => {
     (newValue) => {
       //问题审核阶段,后端拉取保存数据
       //问题审核阶段,后端拉取保存数据
-      // console.log('props.savedData=', newValue);
       let subData = newValue.find((item) => item.issuePhase === props.issueType);
       let subData = newValue.find((item) => item.issuePhase === props.issueType);
-      let atonceData = subData?.issueProcessMessageList.find(
-        (item) => item.pushType === PushTypeStatus.atonce,
-      );
+      let atonceData = subData?.issueProcessMessageList.find((item) => item.pushType === PushTypeStatus.atonce);
       editDetails.value.atProcessing = atonceData?.isEnabled === 1 ? true : false;
       editDetails.value.atProcessing = atonceData?.isEnabled === 1 ? true : false;
       //完成阶段不需要执行下面的内容
       //完成阶段不需要执行下面的内容
       if (props.issueType != QuestionStatus.finishe) {
       if (props.issueType != QuestionStatus.finishe) {
-        let expireData = subData?.issueProcessMessageList.find(
-          (item) => item.pushType === PushTypeStatus.expire,
-        );
-        console.log('expireData=', expireData);
+        let expireData = subData?.issueProcessMessageList.find((item) => item.pushType === PushTypeStatus.expire);
+
         editDetails.value.atExpiry = expireData?.isEnabled === 1 ? true : false;
         editDetails.value.atExpiry = expireData?.isEnabled === 1 ? true : false;
         if (expireData && expireData!.overtime) {
         if (expireData && expireData!.overtime) {
           editDetails.value.expiryTime = expireData!.overtime;
           editDetails.value.expiryTime = expireData!.overtime;
         }
         }
-        // editDetails.value.expiryTime = expireData!.overtime;
-        let longTimeData = subData?.issueProcessMessageList.find(
-          (item) => item.pushType === PushTypeStatus.longtime,
-        );
+        let longTimeData = subData?.issueProcessMessageList.find((item) => item.pushType === PushTypeStatus.longtime);
         editDetails.value.atLongTimeExpiry = longTimeData?.isEnabled === 1 ? true : false;
         editDetails.value.atLongTimeExpiry = longTimeData?.isEnabled === 1 ? true : false;
         if (longTimeData && longTimeData!.overtime) {
         if (longTimeData && longTimeData!.overtime) {
           editDetails.value.longTimeValue = longTimeData!.overtime;
           editDetails.value.longTimeValue = longTimeData!.overtime;
@@ -235,14 +211,13 @@
         }
         }
       }
       }
     },
     },
-    { deep: true, immediate: true }, //deep,深度监听。immediate,在程序开始运行时即马上监听
+    { deep: true, immediate: true },
   );
   );
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
   .content_panel {
   .content_panel {
     width: 530px;
     width: 530px;
     height: 326px;
     height: 326px;
-    // background-color: pink;
     border-radius: 8px;
     border-radius: 8px;
     border: 1px solid #e4e7ed;
     border: 1px solid #e4e7ed;
     .panel_top {
     .panel_top {
@@ -254,7 +229,6 @@
       border-radius: 8px;
       border-radius: 8px;
       padding: 13px 16px 0px 16px;
       padding: 13px 16px 0px 16px;
       .top_content {
       .top_content {
-        // width: 100%;
         height: 24px;
         height: 24px;
         display: flex;
         display: flex;
         flex-direction: row;
         flex-direction: row;
@@ -305,8 +279,6 @@
     .subtitle_explain_disable {
     .subtitle_explain_disable {
       height: 21px;
       height: 21px;
       margin-left: 30px;
       margin-left: 30px;
-      // margin-top: 4px;
-      // margin-top: 3px;
       font-weight: 400;
       font-weight: 400;
       font-size: 10px;
       font-size: 10px;
       color: #a8abb2;
       color: #a8abb2;

src/views/message/questionNotifications/components/problemHandleTable.vue → src/views/message/question-notifications/components/problemHandleTable.vue


src/views/message/questionNotifications/type.ts → src/views/message/question-notifications/type.ts