소스 검색

查看分组

Hwf 7 달 전
부모
커밋
aa8feb9120
3개의 변경된 파일53개의 추가작업 그리고 43개의 파일을 삭제
  1. 0 30
      src/types/components.d.ts
  2. 29 9
      src/views/globalMap/RightMenu/OnlinePlotting/LayerDetail.vue
  3. 24 4
      src/views/globalMap/RightMenu/OnlinePlotting/index.vue

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

@@ -22,23 +22,14 @@ declare module 'vue' {
     DistributionMap: typeof import('./../components/Map/YztMap/DistributionMap.vue')['default']
     DrawMap: typeof import('./../components/Map/YztMap/DrawMap.vue')['default']
     Editor: typeof import('./../components/Editor/index.vue')['default']
-    ElAnchor: typeof import('element-plus/es')['ElAnchor']
-    ElAnchorLink: typeof import('element-plus/es')['ElAnchorLink']
     ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
     ElBadge: typeof import('element-plus/es')['ElBadge']
     ElButton: typeof import('element-plus/es')['ElButton']
-    ElCard: typeof import('element-plus/es')['ElCard']
     ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
-    ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
     ElCol: typeof import('element-plus/es')['ElCol']
-    ElCollapse: typeof import('element-plus/es')['ElCollapse']
-    ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
     ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
-    ElContainer: typeof import('element-plus/es')['ElContainer']
     ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
-    ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
-    ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
     ElDialog: typeof import('element-plus/es')['ElDialog']
     ElDivider: typeof import('element-plus/es')['ElDivider']
     ElDrawer: typeof import('element-plus/es')['ElDrawer']
@@ -48,44 +39,26 @@ declare module 'vue' {
     ElEmpty: typeof import('element-plus/es')['ElEmpty']
     ElForm: typeof import('element-plus/es')['ElForm']
     ElFormItem: typeof import('element-plus/es')['ElFormItem']
-    ElHeader: typeof import('element-plus/es')['ElHeader']
     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']
-    ElLink: typeof import('element-plus/es')['ElLink']
-    ElMain: typeof import('element-plus/es')['ElMain']
     ElMenu: typeof import('element-plus/es')['ElMenu']
     ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
     ElOption: typeof import('element-plus/es')['ElOption']
     ElPagination: typeof import('element-plus/es')['ElPagination']
     ElPopover: typeof import('element-plus/es')['ElPopover']
-    ElRadio: typeof import('element-plus/es')['ElRadio']
-    ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
-    ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
     ElRow: typeof import('element-plus/es')['ElRow']
     ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
-    ElSegmented: typeof import('element-plus/es')['ElSegmented']
     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']
-    ElSpace: typeof import('element-plus/es')['ElSpace']
-    ElStep: typeof import('element-plus/es')['ElStep']
-    ElSteps: typeof import('element-plus/es')['ElSteps']
     ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
     ElSwitch: typeof import('element-plus/es')['ElSwitch']
-    ElTable: typeof import('element-plus/es')['ElTable']
-    ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
-    ElTabPane: typeof import('element-plus/es')['ElTabPane']
-    ElTabs: typeof import('element-plus/es')['ElTabs']
     ElTag: typeof import('element-plus/es')['ElTag']
     ElText: typeof import('element-plus/es')['ElText']
     ElTimeline: typeof import('element-plus/es')['ElTimeline']
     ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
     ElTooltip: typeof import('element-plus/es')['ElTooltip']
     ElTree: typeof import('element-plus/es')['ElTree']
-    ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
     ElUpload: typeof import('element-plus/es')['ElUpload']
     ExcelEditor: typeof import('./../components/ExcelEditor/index.vue')['default']
     FileUpload: typeof import('./../components/FileUpload/index.vue')['default']
@@ -97,9 +70,6 @@ declare module 'vue' {
     HikvisionPlayer: typeof import('./../components/HKVideo/hikvision-player.vue')['default']
     HKVideo: typeof import('./../components/HKVideo/index.vue')['default']
     IconSelect: typeof import('./../components/IconSelect/index.vue')['default']
-    IEpCaretBottom: typeof import('~icons/ep/caret-bottom')['default']
-    IEpCaretTop: typeof import('~icons/ep/caret-top')['default']
-    IEpUploadFilled: typeof import('~icons/ep/upload-filled')['default']
     IFrame: typeof import('./../components/iFrame/index.vue')['default']
     ImagePreview: typeof import('./../components/ImagePreview/index.vue')['default']
     ImageUpload: typeof import('./../components/ImageUpload/index.vue')['default']

+ 29 - 9
src/views/globalMap/RightMenu/OnlinePlotting/LayerDetail.vue

@@ -41,13 +41,26 @@
         <div class="td">时间</div>
         <div class="td">操作</div>
       </div>
-      <div v-for="(item, index) in dataList" :key="index" class="tr">
-        <div class="td" :title="item.name">{{ item.name }}</div>
-        <div class="td" :title="item.nickName">{{ item.nick_name }}</div>
-        <div class="td" :title="item.dept_name">{{ item.dept_name }}</div>
-        <div class="td" :title="item.create_time">{{ item.create_time }}</div>
-        <div class="td">
-          <div class="btn-text">{{ item.visible === 'false' ? '显示' : '隐藏' }}</div>
+      <div v-for="(item, index) in dataList" :key="index">
+        <div class="tr">
+          <div class="td" :title="item.group_name">{{ item.group_name }}</div>
+          <div class="td" :title="item.nickName">{{ item.nick_name }}</div>
+          <div class="td" :title="item.dept_name">{{ item.dept_name }}</div>
+          <div class="td" :title="item.create_time">{{ item.create_time }}</div>
+          <div class="td">
+            <div v-if="item.group_name !== '默认分组'" class="btn-text">删除</div>
+            <div v-if="item.group_name !== '默认分组'" class="btn-text">编辑</div>
+            <div class="btn-text">{{ item.visible !== '0' ? '隐藏' : '显示' }}</div>
+          </div>
+        </div>
+        <div v-for="(item2, index2) in item.bz_list" :key="index2" class="tr">
+          <div class="td" :title="item.name">{{ item2.name }}</div>
+          <div class="td" :title="item.nickName">{{ item2.nick_name }}</div>
+          <div class="td" :title="item.dept_name">{{ item2.dept_name }}</div>
+          <div class="td" :title="item.create_time">{{ item2.create_time }}</div>
+          <div class="td">
+            <div class="btn-text" @click="handleVisible(item2)">{{ item2.visible === '1' ? '隐藏' : '显示' }}</div>
+          </div>
         </div>
       </div>
     </div>
@@ -76,7 +89,7 @@ const props = defineProps({
   modelValue: Boolean,
   patternId: String
 });
-const emits = defineEmits(['update:modelValue']);
+const emits = defineEmits(['update:modelValue', 'handleSendData']);
 let type = ref('');
 let typeOptions = ref([
   { label: '全部', value: '' },
@@ -142,7 +155,10 @@ let showImportLayer = ref(false);
 const handleShowImportLayer = () => {
   showImportLayer.value = true;
 };
-
+const handleVisible = (item) => {
+  item.visible = item.visible === '1' ? '0' : '1';
+  emits('handleSendData', { type: 'update', content: item });
+};
 onMounted(() => {
   getBzList(queryParams).then((res) => {
     dataList.value = res.data;
@@ -234,4 +250,8 @@ onMounted(() => {
   align-items: center;
   justify-content: center;
 }
+.btn-text {
+  color: #5983df;
+  cursor: pointer;
+}
 </style>

+ 24 - 4
src/views/globalMap/RightMenu/OnlinePlotting/index.vue

@@ -489,9 +489,10 @@ const addText = (textEditState) => {
   webSock.send(
     JSON.stringify({
       operation: 'add', // 必填
+      id: data.id,
       name: data.title, // 必填
       content: JSON.stringify(data), // 必填
-      visible: false
+      visible: '1'
     })
   );
   close();
@@ -586,9 +587,10 @@ const initDrawMethod = (options) => {
       webSock.send(
         JSON.stringify({
           operation: 'add', // 必填
+          id: data.id,
           name: data.title, // 必填
           content: JSON.stringify(data), // 必填
-          visible: false
+          visible: '1'
         })
       );
     }
@@ -833,8 +835,8 @@ const handleSendForm = () => {
   if (!form.value.pattern_name) {
     return proxy?.$modal.msgWarning('请填写预案名称');
   }
-  webSock = createWebSocket('eZokH5XO6VC6xIXEHirTF', getWebSocketData);
-  patternId.value = 'eZokH5XO6VC6xIXEHirTF';
+  webSock = createWebSocket('ZEaBf-NZ4Fi29kSYGdNeJ', getWebSocketData);
+  patternId.value = 'ZEaBf-NZ4Fi29kSYGdNeJ';
   // createCollaboration(form.value).then(() => {
   //   patternId.value = form.value.pattern_id;
   //   createWebSocket(form.value.pattern_id, getWebSocketData);
@@ -886,6 +888,20 @@ let showLayer = ref(false);
 let handleShowLayer = () => {
   showLayer.value = true;
 };
+const handleSendData = (data) => {
+  const { type, content } = data;
+  if (type === 'update') {
+    webSock.send(
+      JSON.stringify({
+        operation: 'update',
+        id: content.id,
+        name: content.name,
+        content: content.content,
+        visible: content.visible
+      })
+    );
+  }
+};
 onMounted(() => {
   getList();
 });
@@ -1316,4 +1332,8 @@ onMounted(() => {
   display: flex;
   align-items: center;
 }
+.btn-text {
+  color: #5983df;
+  cursor: pointer;
+}
 </style>