|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <Dialog title="预案名称" custom-show hide-footer @close="handleClose1">
|
|
|
+ <Dialog title="预案名称" custom-show hide-footer type="lg" @close="handleClose1">
|
|
|
<div class="btn-box1">
|
|
|
<div class="btn1" @click="handleShowCooperate">
|
|
|
<i class="icon1" />
|
|
@@ -34,7 +34,7 @@
|
|
|
</div>
|
|
|
<div class="common-table">
|
|
|
<div class="table-header">
|
|
|
- <div class="td" style="width: 40px"></div>
|
|
|
+<!-- <div class="td" style="width: 40px"></div>-->
|
|
|
<div class="td">标注名称</div>
|
|
|
<div class="td">用户</div>
|
|
|
<div class="td">单位</div>
|
|
@@ -47,9 +47,9 @@
|
|
|
<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="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="handleShowGroup(item.group_id)">编辑</div>
|
|
|
<div class="btn-text">{{ item.visible !== '0' ? '隐藏' : '显示' }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -65,25 +65,16 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</Dialog>
|
|
|
- <Dialog v-model="showGroup" :title="groupForm.groupId ? '编辑分组' : '添加分组'" type="xs" hide-footer>
|
|
|
- <div class="form-item">
|
|
|
- <div class="text1">分组名称</div>
|
|
|
- <el-input v-model="groupForm.name" class="custom-input" placeholder="请输入" />
|
|
|
- </div>
|
|
|
- <div class="form-action">
|
|
|
- <div class="common-btn-primary" @click="handleAddGroup">保存</div>
|
|
|
- <div v-if="groupForm.groupId" class="common-btn-primary" @click="handleDeleteGroup">删除</div>
|
|
|
- <div class="common-btn" @click="handleClose2">取消</div>
|
|
|
- </div>
|
|
|
- </Dialog>
|
|
|
+ <EditGroup v-if="showGroup" v-model="showGroup" :patternId="patternId" :groupId="groupId" @change="getList" />
|
|
|
<Contact v-if="showCooperate" v-model="showCooperate" @close="handleClose3" @confirm="handleConfirm" />
|
|
|
<CollaborativeUser v-if="showUser" v-model="showUser" />
|
|
|
<ImportLayer v-if="showImportLayer" v-model="showImportLayer" />
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup name="LayerDetail">
|
|
|
-import { addGroup, addWsUser, getBzList } from '@/api/globalMap/onlinePlotting';
|
|
|
+import { addWsUser, getBzList } from '@/api/globalMap/onlinePlotting';
|
|
|
import ImportLayer from './ImportLayer.vue';
|
|
|
+import EditGroup from './EditGroup.vue';
|
|
|
import CollaborativeUser from './CollaborativeUser.vue';
|
|
|
const props = defineProps({
|
|
|
modelValue: Boolean,
|
|
@@ -104,31 +95,19 @@ let queryParams = reactive({
|
|
|
let dataList = ref([]);
|
|
|
|
|
|
let showGroup = ref(false);
|
|
|
-let groupForm = ref({
|
|
|
- groupId: '',
|
|
|
- name: ''
|
|
|
-});
|
|
|
-const handleShowGroup = () => {
|
|
|
+let groupId = ref('');
|
|
|
+const handleShowGroup = (id) => {
|
|
|
+ if (!!id) {
|
|
|
+ groupId.value = id;
|
|
|
+ }
|
|
|
showGroup.value = true;
|
|
|
};
|
|
|
-const handleAddGroup = () => {
|
|
|
- const obj = {
|
|
|
- group_name: groupForm.value.name,
|
|
|
- pattern_id: props.patternId
|
|
|
- };
|
|
|
- addGroup(obj).then((res) => {
|
|
|
- emits('update:modelValue', false);
|
|
|
- });
|
|
|
-};
|
|
|
const handleClose1 = () => {
|
|
|
emits('update:modelValue', false);
|
|
|
};
|
|
|
const handleDeleteGroup = () => {
|
|
|
showGroup.value = false;
|
|
|
};
|
|
|
-const handleClose2 = () => {
|
|
|
- showGroup.value = false;
|
|
|
-};
|
|
|
let showCooperate = ref(false);
|
|
|
const handleShowCooperate = () => {
|
|
|
showCooperate.value = true;
|
|
@@ -155,14 +134,17 @@ let showImportLayer = ref(false);
|
|
|
const handleShowImportLayer = () => {
|
|
|
showImportLayer.value = true;
|
|
|
};
|
|
|
+const getList = () => {
|
|
|
+ getBzList(queryParams).then((res) => {
|
|
|
+ dataList.value = res.data;
|
|
|
+ });
|
|
|
+};
|
|
|
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;
|
|
|
- });
|
|
|
+ getList();
|
|
|
});
|
|
|
</script>
|
|
|
|
|
@@ -234,22 +216,6 @@ onMounted(() => {
|
|
|
background-size: 100% 100%;
|
|
|
}
|
|
|
}
|
|
|
-.form-item {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- .text1 {
|
|
|
- flex-shrink: 0;
|
|
|
- margin-right: 10px;
|
|
|
- }
|
|
|
- .custom-input {
|
|
|
- flex: 1;
|
|
|
- }
|
|
|
-}
|
|
|
-.form-action {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
-}
|
|
|
.btn-text {
|
|
|
color: #5983df;
|
|
|
cursor: pointer;
|