|
@@ -26,7 +26,7 @@
|
|
|
<i class="icon4" />
|
|
|
导入图层
|
|
|
</div>
|
|
|
- <div class="btn1" style="margin-left: 10px" @click="handleShowGroup">
|
|
|
+ <div class="btn1" style="margin-left: 10px" @click="handleShowGroup('')">
|
|
|
<i class="icon5" />
|
|
|
添加分组
|
|
|
</div>
|
|
@@ -48,9 +48,9 @@
|
|
|
<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" style="display: flex; align-items: center; justify-content: center">
|
|
|
- <div v-if="item.group_name !== '默认分组'" class="btn-text" style="margin-right: 20px" @click="handleDeleteGroup">删除</div>
|
|
|
+ <div v-if="item.group_name !== '默认分组'" class="btn-text" style="margin-right: 20px" @click="handleDeleteGroup(item.group_id)">删除</div>
|
|
|
<div v-if="item.group_name !== '默认分组'" class="btn-text" style="margin-right: 20px" @click="handleShowGroup(item.group_id)">编辑</div>
|
|
|
- <div class="btn-text">{{ item.visible !== '0' ? '隐藏' : '显示' }}</div>
|
|
|
+ <div class="btn-text" @click="handleVisible(item)">{{ item.visible !== '0' ? '隐藏' : '显示' }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-for="(item2, index2) in item.bz_list" :key="index2" class="tr">
|
|
@@ -59,7 +59,7 @@
|
|
|
<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 class="btn-text" @click="handleVisible2(item2)">{{ item2.visible === '1' ? '隐藏' : '显示' }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -72,7 +72,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup name="LayerDetail">
|
|
|
-import { addWsUser, getBzList } from '@/api/globalMap/onlinePlotting';
|
|
|
+import { addWsUser, delGroup, getBzList, updateGroupVisible } from '@/api/globalMap/onlinePlotting';
|
|
|
import ImportLayer from './ImportLayer.vue';
|
|
|
import CollaborativeUser from './CollaborativeUser.vue';
|
|
|
import EditGroup from './EditGroup.vue';
|
|
@@ -80,7 +80,7 @@ const props = defineProps({
|
|
|
modelValue: Boolean,
|
|
|
patternId: String
|
|
|
});
|
|
|
-const emits = defineEmits(['update:modelValue', 'handleSendData']);
|
|
|
+const emits = defineEmits(['update:modelValue', 'handleSendData', 'change']);
|
|
|
let type = ref('');
|
|
|
let typeOptions = ref([
|
|
|
{ label: '全部', value: '' },
|
|
@@ -106,8 +106,11 @@ const handleShowGroup = (id) => {
|
|
|
const handleClose1 = () => {
|
|
|
emits('update:modelValue', false);
|
|
|
};
|
|
|
-const handleDeleteGroup = () => {
|
|
|
- showGroup.value = false;
|
|
|
+const handleDeleteGroup = (groupId) => {
|
|
|
+ delGroup(groupId).then(() => {
|
|
|
+ getList();
|
|
|
+ showGroup.value = false;
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
let showCooperate = ref(false);
|
|
@@ -143,6 +146,11 @@ const getList = () => {
|
|
|
});
|
|
|
};
|
|
|
const handleVisible = (item) => {
|
|
|
+ updateGroupVisible(item.group_id, item.visible === '1' ? '0' : '1').then(() => {
|
|
|
+ getList();
|
|
|
+ });
|
|
|
+};
|
|
|
+const handleVisible2 = (item) => {
|
|
|
item.visible = item.visible === '1' ? '0' : '1';
|
|
|
emits('handleSendData', { type: 'update', content: item });
|
|
|
};
|