|
@@ -11,13 +11,24 @@
|
|
|
<i-ep-search />
|
|
<i-ep-search />
|
|
|
搜索
|
|
搜索
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="refreshTableInfo">
|
|
|
|
|
+ <i-ep-refresh />
|
|
|
|
|
+ </el-button>
|
|
|
<el-button @click="openDialog()" color="#11a983">
|
|
<el-button @click="openDialog()" color="#11a983">
|
|
|
<i-ep-plus />
|
|
<i-ep-plus />
|
|
|
增加标签
|
|
增加标签
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button type="primary" @click="refreshTableInfo">
|
|
|
|
|
- <i-ep-refresh />
|
|
|
|
|
- </el-button>
|
|
|
|
|
|
|
+ <el-dropdown style="margin-left: 10px" split-button type="primary" @command="handleChangeType">
|
|
|
|
|
+ 调整标签组
|
|
|
|
|
+ <template #dropdown>
|
|
|
|
|
+ <el-dropdown-menu>
|
|
|
|
|
+ <el-dropdown-item v-for="type in tagTypes" :command="type.id"
|
|
|
|
|
+ >{{ type.name }}
|
|
|
|
|
+ </el-dropdown-item>
|
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dropdown>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
<div class="table-con">
|
|
<div class="table-con">
|
|
|
<el-table
|
|
<el-table
|
|
@@ -26,7 +37,9 @@
|
|
|
:data="tableData"
|
|
:data="tableData"
|
|
|
highlight-current-row
|
|
highlight-current-row
|
|
|
border
|
|
border
|
|
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
>
|
|
>
|
|
|
|
|
+ <el-table-column type="selection" width="55" />
|
|
|
<el-table-column label="操作" width="150">
|
|
<el-table-column label="操作" width="150">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<el-button link @click="handleDelete(row.id)" type="warning"
|
|
<el-button link @click="handleDelete(row.id)" type="warning"
|
|
@@ -64,10 +77,12 @@
|
|
|
import ChildDialog from "./compt/childDialog.vue";
|
|
import ChildDialog from "./compt/childDialog.vue";
|
|
|
import { useTable } from "@/hooks/useTable";
|
|
import { useTable } from "@/hooks/useTable";
|
|
|
import {
|
|
import {
|
|
|
|
|
+ changeTagType,
|
|
|
deleteDesignTag,
|
|
deleteDesignTag,
|
|
|
deleteDesignTagType,
|
|
deleteDesignTagType,
|
|
|
queryDesignTags,
|
|
queryDesignTags,
|
|
|
queryDesignTagType,
|
|
queryDesignTagType,
|
|
|
|
|
+ selectDesignTagType,
|
|
|
} from "@/api/design";
|
|
} from "@/api/design";
|
|
|
import { useRoute } from "vue-router";
|
|
import { useRoute } from "vue-router";
|
|
|
import { useTagsViewStore } from "@/store/modules/tagsView";
|
|
import { useTagsViewStore } from "@/store/modules/tagsView";
|
|
@@ -78,6 +93,8 @@ const currentRoute = useRoute();
|
|
|
let tabTitle = "";
|
|
let tabTitle = "";
|
|
|
let tempRoute = null;
|
|
let tempRoute = null;
|
|
|
const tagsViewStore = useTagsViewStore();
|
|
const tagsViewStore = useTagsViewStore();
|
|
|
|
|
+let selectedTags = [];
|
|
|
|
|
+const tagTypes = ref([{ id: 0, name: "未分组" }]);
|
|
|
|
|
|
|
|
// 设置标签名称
|
|
// 设置标签名称
|
|
|
function setTagsViewTitle() {
|
|
function setTagsViewTitle() {
|
|
@@ -128,6 +145,35 @@ function dialogChange() {
|
|
|
getTableData();
|
|
getTableData();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function handleSelectionChange(val) {
|
|
|
|
|
+ selectedTags = val;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function handleChangeType(command: string | number | object) {
|
|
|
|
|
+ if (selectedTags.length <= 0) {
|
|
|
|
|
+ ElMessage.error("未选择标签");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ selectedTags.forEach((x) => {
|
|
|
|
|
+ x.idType = command;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ changeTagType(JSON.stringify(selectedTags)).then((response) => {
|
|
|
|
|
+ if (response.httpCode == 200) {
|
|
|
|
|
+ ElMessage.success("操作成功");
|
|
|
|
|
+ getTableData();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function getAllTagTypes() {
|
|
|
|
|
+ selectDesignTagType({}).then((response) => {
|
|
|
|
|
+ if (response.httpCode == 200) {
|
|
|
|
|
+ tagTypes.value = tagTypes.value.concat(response.data);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
const { query } = currentRoute;
|
|
const { query } = currentRoute;
|
|
|
if (query.idType) queryForm.idType = query.idType;
|
|
if (query.idType) queryForm.idType = query.idType;
|
|
@@ -135,6 +181,8 @@ onMounted(() => {
|
|
|
|
|
|
|
|
tempRoute = Object.assign({}, currentRoute);
|
|
tempRoute = Object.assign({}, currentRoute);
|
|
|
if (tabTitle != "") setTagsViewTitle();
|
|
if (tabTitle != "") setTagsViewTitle();
|
|
|
|
|
+
|
|
|
|
|
+ getAllTagTypes();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const queryForm = reactive({
|
|
const queryForm = reactive({
|