|
@@ -2,14 +2,16 @@
|
|
|
<div style="display: flex">
|
|
<div style="display: flex">
|
|
|
<div style="display: flex; margin-right: 7px">
|
|
<div style="display: flex; margin-right: 7px">
|
|
|
<div
|
|
<div
|
|
|
- v-if="props.subItem.parentId !== undefined"
|
|
|
|
|
|
|
+ v-if="(props.subItem as ComAddDatas).parentId !== undefined"
|
|
|
@click="changeConig"
|
|
@click="changeConig"
|
|
|
class="wordStyle"
|
|
class="wordStyle"
|
|
|
style="margin-right: 10px"
|
|
style="margin-right: 10px"
|
|
|
>页面设置</div
|
|
>页面设置</div
|
|
|
>
|
|
>
|
|
|
<div v-else style="margin-right: 10px; width: 56px"></div>
|
|
<div v-else style="margin-right: 10px; width: 56px"></div>
|
|
|
- <div @click="changeAdd" class="wordStyle" style="margin-right: 7px">添加下一级</div></div
|
|
|
|
|
|
|
+ <div @click="changeAdd" :class="{ wordStyle: !isWorkshop, 'style-hidden': isWorkshop }"
|
|
|
|
|
+ >添加下一级</div
|
|
|
|
|
+ ></div
|
|
|
>
|
|
>
|
|
|
<div style="width: 1px; height: 14px; color: #e9e9e9; margin-right: 14px">|</div>
|
|
<div style="width: 1px; height: 14px; color: #e9e9e9; margin-right: 14px">|</div>
|
|
|
<img src="../../../assets/icons/edit.png" @click="changeEdit" class="action-img" alt="" />
|
|
<img src="../../../assets/icons/edit.png" @click="changeEdit" class="action-img" alt="" />
|
|
@@ -20,17 +22,11 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
- interface User {
|
|
|
|
|
- name?: string;
|
|
|
|
|
- tag?: string;
|
|
|
|
|
- code?: string;
|
|
|
|
|
- hasChildren?: boolean;
|
|
|
|
|
- children?: User[];
|
|
|
|
|
- parentId?: number;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ import { computed } from 'vue';
|
|
|
|
|
+ import { ComAddDatas, WorkshopAddDatas, WorkspaceAddDatas } from '@/api/scene/sceneOperate.ts';
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
const props = defineProps<{
|
|
|
- subItem: User;
|
|
|
|
|
|
|
+ subItem: ComAddDatas | WorkshopAddDatas | WorkspaceAddDatas;
|
|
|
handleConig: (row) => unknown;
|
|
handleConig: (row) => unknown;
|
|
|
handleAdd: (row) => unknown;
|
|
handleAdd: (row) => unknown;
|
|
|
handleEdit: (row) => unknown;
|
|
handleEdit: (row) => unknown;
|
|
@@ -39,6 +35,10 @@
|
|
|
handleDown: (row) => unknown;
|
|
handleDown: (row) => unknown;
|
|
|
}>();
|
|
}>();
|
|
|
|
|
|
|
|
|
|
+ const isWorkshop = computed(() => {
|
|
|
|
|
+ return (props.subItem as any).workshopId ? true : false;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
const changeConig = () => {
|
|
const changeConig = () => {
|
|
|
props.handleConig(props.subItem);
|
|
props.handleConig(props.subItem);
|
|
|
};
|
|
};
|
|
@@ -71,7 +71,17 @@
|
|
|
color: #1890ff;
|
|
color: #1890ff;
|
|
|
line-height: 22px;
|
|
line-height: 22px;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
|
|
+ margin-right: 7px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .style-hidden {
|
|
|
|
|
+ height: 22px;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ color: grey;
|
|
|
|
|
+ line-height: 22px;
|
|
|
|
|
+ margin-right: 7px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.otp-btn {
|
|
.otp-btn {
|
|
|
width: 52px;
|
|
width: 52px;
|
|
|
height: 26px;
|
|
height: 26px;
|