|
@@ -1,106 +1,502 @@
|
|
|
<script setup>
|
|
|
-import { ref } from 'vue'
|
|
|
-import { SearchIcon,Icon } from 'tdesign-icons-vue-next';
|
|
|
+import { reactive, ref, watch } from 'vue'
|
|
|
+import { SearchIcon, Icon } from 'tdesign-icons-vue-next';
|
|
|
+import { apiETAChart } from '@/api/etaChart'
|
|
|
+import {apiSystemCommon} from '@/api/system'
|
|
|
+import { ElTree } from 'element-plus'
|
|
|
+import 'element-plus/es/components/tree/style/css'
|
|
|
+import {useClassify} from '../hooks/useClassify'
|
|
|
|
|
|
-const companyOpts = [{ label: '弘则研究', value: 1 }]
|
|
|
-const companyVal = ref('')
|
|
|
+const emits = defineEmits(['change','filter'])
|
|
|
|
|
|
-const userOpts = [{ label: '弘则研究', value: 1 }]
|
|
|
-const userVal = ref('')
|
|
|
+const userProps={
|
|
|
+ label:'RealName',
|
|
|
+ value:'AdminId',
|
|
|
+ children:'ChildrenList'
|
|
|
+}
|
|
|
+const userOpts = ref([])
|
|
|
+const {userVal}=useClassify()
|
|
|
+async function getCompanyUserData(){
|
|
|
+ const res=await apiSystemCommon.companyUserList()
|
|
|
+ if(res.Ret===200){
|
|
|
+ userOpts.value=res.Data.List||[]
|
|
|
+ }
|
|
|
+}
|
|
|
+getCompanyUserData()
|
|
|
|
|
|
+const searchSelectKeys={
|
|
|
+ value:'ChartInfoId',
|
|
|
+ label:'ChartName'
|
|
|
+}
|
|
|
const searchVal = ref('')
|
|
|
+const searchOpts=ref([])
|
|
|
+const searchLoading=ref(false)
|
|
|
+let searchPage=1
|
|
|
+const searchPageSize=20
|
|
|
+let finished=false
|
|
|
+function handleSearchChart(){
|
|
|
+ finished=false
|
|
|
+ searchPage=1
|
|
|
+ searchOpts.value=[]
|
|
|
+ handleGetSearchChartList()
|
|
|
+}
|
|
|
+async function handleGetSearchChartList(){
|
|
|
+ searchLoading.value=true
|
|
|
+ const res=await apiETAChart.chartSearch({
|
|
|
+ PageSize:searchPageSize,
|
|
|
+ CurrentIndex:searchPage,
|
|
|
+ SysUserIds:'',
|
|
|
+ Keyword:searchVal.value
|
|
|
+ })
|
|
|
+ searchLoading.value=false
|
|
|
+ if(res.Ret===200){
|
|
|
+ const arr=res.Data.List||[]
|
|
|
+ searchOpts.value=[...searchOpts.value,...arr]
|
|
|
+ finished=res.Data.Paging.IsEnd
|
|
|
+ }
|
|
|
+}
|
|
|
+async function handleLoadMoreChart(){
|
|
|
+ if(finished||searchLoading.value) return
|
|
|
+ handleGetSearchChartList()
|
|
|
+}
|
|
|
+function handleSelectChart(value,context){
|
|
|
+ if(value){
|
|
|
+ emits('change',context.option)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function handleUserChange(){
|
|
|
+ emits('filter')
|
|
|
+ getClassify()
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
|
|
|
-const classifyList = ref([{
|
|
|
- label: '第一段',
|
|
|
- children: [
|
|
|
- {
|
|
|
- label: '第二段',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '第二段',
|
|
|
- },
|
|
|
- ],
|
|
|
-},
|
|
|
-{
|
|
|
- label: '第一段',
|
|
|
- children: [
|
|
|
- {
|
|
|
- label: '第二段',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '第二段',
|
|
|
- },
|
|
|
- ],
|
|
|
-},
|
|
|
-{
|
|
|
- label: '第一段',
|
|
|
- children: [
|
|
|
- {
|
|
|
- label: '第二段',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '第二段',
|
|
|
- },
|
|
|
- ],
|
|
|
-},
|
|
|
-{
|
|
|
- label: '第一段',
|
|
|
- children: [
|
|
|
- {
|
|
|
- label: '第二段',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '第二段',
|
|
|
- },
|
|
|
- ],
|
|
|
-},])
|
|
|
+//分类列表
|
|
|
+const classifyTreeKeys = {
|
|
|
+ label: 'ChartClassifyName',
|
|
|
+ children: 'Children',
|
|
|
+ isLeaf: 'isLeaf'
|
|
|
+}
|
|
|
+const {classifyActived}=useClassify()//当前选中的分类
|
|
|
+const classifyList = ref([])
|
|
|
+async function getClassify() {
|
|
|
+ const res = await apiETAChart.classifyList({
|
|
|
+ ParentId: -1,
|
|
|
+ SysUserIds:userVal.value?.join(',')
|
|
|
+ })
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ const arr = res.Data.AllNodes || []
|
|
|
+ classifyList.value = arr.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ Children: null
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+getClassify()
|
|
|
+// 懒加载分类
|
|
|
+async function classifyLoad(node, resolve) {
|
|
|
+ if (node.level === 0) {
|
|
|
+ resolve(classifyList.value)
|
|
|
+ } else {
|
|
|
+ let nodes = []
|
|
|
+ const res = await apiETAChart.classifyList({
|
|
|
+ ParentId: node.data.ChartClassifyId,
|
|
|
+ SysUserIds:userVal.value?.join(',')
|
|
|
+ })
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ const arr = res.Data.AllNodes || []
|
|
|
+ nodes = arr.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ isLeaf: item.ChartInfoId !== 0 ? true : false,
|
|
|
+ ChartClassifyId: item.ChartInfoId ? item.UniqueCode : item.ChartClassifyId,//如果是指标则将分类id设置为图表id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ resolve(nodes);
|
|
|
+ }
|
|
|
+}
|
|
|
+function handleClassifyActiveChange(data, node) {
|
|
|
+ classifyActived.value = data.ChartClassifyId
|
|
|
+ if(data.ChartInfoId){//选择的是图表
|
|
|
+ emits('change',data)
|
|
|
+ }else{
|
|
|
+ emits('filter')
|
|
|
+ }
|
|
|
+}
|
|
|
+// 控制分类操作按钮显示
|
|
|
+function showClassifyOpt(node, data) {
|
|
|
+ return (classifyActived.value === data.ChartClassifyId) && data.ChartClassifyId !== 0 && data.ChartInfoId === 0
|
|
|
+}
|
|
|
+
|
|
|
+// 分类编辑
|
|
|
+const formEl = ref(null)
|
|
|
+const FORM_RULES = { name: [{ required: true, message: '名称不能为空' }] };
|
|
|
+const showEditClassify = ref(false)
|
|
|
+const classifyEditState = reactive({
|
|
|
+ id: 0,
|
|
|
+ name: '',
|
|
|
+ parent: [],
|
|
|
+ parentId: 0
|
|
|
+})
|
|
|
+watch(
|
|
|
+ () => showEditClassify.value,
|
|
|
+ (n) => {
|
|
|
+ if (!n) {
|
|
|
+ classifyEditState.id = 0
|
|
|
+ classifyEditState.name = ''
|
|
|
+ classifyEditState.parent = []
|
|
|
+ classifyEditState.parentId = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+)
|
|
|
+async function handleConfirmClassify() {
|
|
|
+ const valid = await formEl.value.validate()
|
|
|
+ if (!valid) return
|
|
|
+ const res = classifyEditState.id ? await apiETAChart.classifyEdit({
|
|
|
+ ChartClassifyName: classifyEditState.name,
|
|
|
+ ChartClassifyId: classifyEditState.id
|
|
|
+ }) : await apiETAChart.classifyAdd({
|
|
|
+ ChartClassifyName: classifyEditState.name,
|
|
|
+ ParentId: classifyEditState.parentId
|
|
|
+ })
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ MessagePlugin.success('操作成功')
|
|
|
+ showEditClassify.value = false
|
|
|
+ getClassify()
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+// 递归获取父节点
|
|
|
+function getAllParent(data, arr) {
|
|
|
+ if (data.level === 0) return
|
|
|
+ arr.push({ ChartClassifyName: data.data.ChartClassifyName, ChartClassifyId: data.data.ChartClassifyId })
|
|
|
+ getAllParent(data.parent, arr)
|
|
|
+ return arr
|
|
|
+}
|
|
|
+function handleClassifyOpt(node, data, type) {
|
|
|
+ if (type === 'edit') {
|
|
|
+ classifyEditState.id = data.ChartClassifyId
|
|
|
+ classifyEditState.name = data.ChartClassifyName
|
|
|
+ let parr = getAllParent(node, [])
|
|
|
+ parr.shift()
|
|
|
+ classifyEditState.parent = parr.reverse()
|
|
|
+ classifyEditState.parentId = node.parent.id || 0
|
|
|
+ showEditClassify.value = true
|
|
|
+ }
|
|
|
+ if (type === 'add') {
|
|
|
+ let parr = getAllParent(node, [])
|
|
|
+ parr.shift()
|
|
|
+ classifyEditState.parent = parr.reverse()
|
|
|
+ classifyEditState.parentId = data.ChartClassifyId
|
|
|
+ showEditClassify.value = true
|
|
|
+ }
|
|
|
+
|
|
|
+ if (type === 'del') {
|
|
|
+ apiETAChart.classifyDelete({
|
|
|
+ ChartClassifyId: data.ChartClassifyId
|
|
|
+ }).then(res => {
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ MessagePlugin.success('操作成功')
|
|
|
+ getClassify()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
|
|
|
+function allowDrag({ data }) {
|
|
|
+ if (data.ChartClassifyId === 0) return false //未分类不允许拖动
|
|
|
+ return true
|
|
|
+}
|
|
|
+function allowDrop(draggingNode, dropNode, type) {
|
|
|
+ let canDrop = false
|
|
|
+ // 如果拖动的是指标
|
|
|
+ if (draggingNode.data.ChartInfoId) {
|
|
|
+ if (!(dropNode.level === 1 && type !== 'inner')) {
|
|
|
+ canDrop = true
|
|
|
+ }
|
|
|
+ } else {//拖动的是目录
|
|
|
+ // console.log(dropNode.level,draggingNode.level);
|
|
|
+ //目录层级不能改变
|
|
|
+ if ((dropNode.level + 1 == draggingNode.level && type === 'inner' && !dropNode.data.ChartInfoId) || (dropNode.level === draggingNode.level && type !== 'inner')) {
|
|
|
+ canDrop = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return canDrop
|
|
|
+}
|
|
|
+function handleDropOver(b, a, i, e) {
|
|
|
+ // 被拖拽节点对应的 Node、结束拖拽时最后进入的节点、被拖拽节点的放置位置
|
|
|
+ console.log(b, a, i);
|
|
|
+ const isEDB = b.data.ChartInfoId ? true : false
|
|
|
+ let list = a.parent.childNodes;
|
|
|
+ let targetIndex = 0, PrevClassifyId = 0, NextClassifyId = 0, ParentClassifyId = 0;
|
|
|
+ let ClassifyId = 0, ChartInfoId = 0, PrevChartInfoId = 0, NextChartInfoId = 0;
|
|
|
+
|
|
|
+ ClassifyId = isEDB ? 0 : b.data.ChartClassifyId
|
|
|
+ ChartInfoId = isEDB ? b.data.ChartInfoId : 0
|
|
|
+
|
|
|
+
|
|
|
+ if (i !== 'inner') {
|
|
|
+ ParentClassifyId = a.parent.data.ChartClassifyId || 0
|
|
|
+ list.forEach((item, index) => {
|
|
|
+ if (isEDB) {
|
|
|
+ if (item.data.ChartInfoId === b.data.ChartInfoId) {
|
|
|
+ targetIndex = index
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (item.data.ChartClassifyId === b.data.ChartClassifyId) {
|
|
|
+ targetIndex = index
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ console.log(targetIndex);
|
|
|
+
|
|
|
+
|
|
|
+ if (targetIndex === 0) {
|
|
|
+ const data = list[targetIndex + 1].data
|
|
|
+ NextClassifyId = data.ChartInfoId ? 0 : data.ChartClassifyId
|
|
|
+ NextChartInfoId = data.ChartInfoId ? data.ChartInfoId : 0
|
|
|
+ } else if (targetIndex === list.length - 1) {
|
|
|
+ const data = list[targetIndex - 1].data
|
|
|
+ PrevClassifyId = data.ChartInfoId ? 0 : data.ChartClassifyId
|
|
|
+ PrevChartInfoId = data.ChartInfoId ? data.ChartInfoId : 0
|
|
|
+ } else {
|
|
|
+ const pData = list[targetIndex - 1].data
|
|
|
+ PrevClassifyId = pData.ChartInfoId ? 0 : pData.ChartClassifyId
|
|
|
+
|
|
|
+ PrevChartInfoId = pData.ChartInfoId ? pData.ChartInfoId : 0
|
|
|
+
|
|
|
+ const nData = list[targetIndex + 1].data
|
|
|
+ NextClassifyId = nData.ChartInfoId ? 0 : nData.ChartClassifyId
|
|
|
+ NextChartInfoId = nData.ChartInfoId ? nData.ChartInfoId : 0
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ ParentClassifyId = a.data.ChartClassifyId || 0
|
|
|
+ }
|
|
|
+
|
|
|
+ const params = {
|
|
|
+ ClassifyId,
|
|
|
+ ParentClassifyId,
|
|
|
+ ChartInfoId,
|
|
|
+ PrevClassifyId,
|
|
|
+ NextClassifyId,
|
|
|
+ PrevChartInfoId,
|
|
|
+ NextChartInfoId
|
|
|
+ }
|
|
|
+ console.log(params);
|
|
|
+ apiETAChart.classifySort(params).then(res => {
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ MessagePlugin.success('移动成功!')
|
|
|
+ getClassify()
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<div class="bg-white classify-wrap">
|
|
|
<div class="select-wrap">
|
|
|
- <t-select placeholder="机构" v-model="companyVal">
|
|
|
- <t-option
|
|
|
- v-for="opt in companyOpts"
|
|
|
- :key="opt.value"
|
|
|
- :label="opt.label"
|
|
|
- :value="opt.value"
|
|
|
- ></t-option>
|
|
|
- </t-select>
|
|
|
- <t-select placeholder="创建人" v-model="userVal">
|
|
|
- <t-option
|
|
|
- v-for="opt in userOpts"
|
|
|
- :key="opt.value"
|
|
|
- :label="opt.label"
|
|
|
- :value="opt.value"
|
|
|
- ></t-option>
|
|
|
- </t-select>
|
|
|
+ <t-cascader
|
|
|
+ v-model="userVal"
|
|
|
+ :options="userOpts"
|
|
|
+ :keys="userProps"
|
|
|
+ multiple
|
|
|
+ :minCollapsedNum="1"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ :showAllLevels='false'
|
|
|
+ placeholder="创建人"
|
|
|
+ @change="handleUserChange"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <t-input v-model="searchVal" clearable placeholder="请输入图表名称">
|
|
|
+ <t-select
|
|
|
+ v-model="searchVal"
|
|
|
+ placeholder="请输入图表名称"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ :keys="searchSelectKeys"
|
|
|
+ :options="searchOpts"
|
|
|
+ :loading="searchLoading"
|
|
|
+ @search="handleSearchChart"
|
|
|
+ @change="handleSelectChart"
|
|
|
+ :popup-props="{ 'on-scroll-to-bottom': handleLoadMoreChart }"
|
|
|
+ >
|
|
|
<template #prefixIcon>
|
|
|
<search-icon />
|
|
|
</template>
|
|
|
- </t-input>
|
|
|
+ </t-select>
|
|
|
<div class="classify-list-box">
|
|
|
- <t-tree :data="classifyList" activable transition>
|
|
|
+ <el-tree
|
|
|
+ :data="classifyList"
|
|
|
+ :props="classifyTreeKeys"
|
|
|
+ :current-node-key="classifyActived"
|
|
|
+ draggable
|
|
|
+ check-on-click-node
|
|
|
+ node-key="ChartClassifyId"
|
|
|
+ check-strictly
|
|
|
+ highlight-current
|
|
|
+ empty-text="暂无目录"
|
|
|
+ lazy
|
|
|
+ icon="span"
|
|
|
+ @current-change="handleClassifyActiveChange"
|
|
|
+ :load="classifyLoad"
|
|
|
+ :allow-drop="allowDrop"
|
|
|
+ :allow-drag="allowDrag"
|
|
|
+ @node-drop="handleDropOver"
|
|
|
+ >
|
|
|
+ <template #default="{ node, data }">
|
|
|
+ <div class="classify-item-box">
|
|
|
+ <div class="label">{{ node.label }}</div>
|
|
|
+ <div class="opt-box" v-show="showClassifyOpt(node, data)">
|
|
|
+ <span>
|
|
|
+ <t-icon name="drag-move" />
|
|
|
+ </span>
|
|
|
+ <span @click.stop="handleClassifyOpt(node, data, 'add')">
|
|
|
+ <t-icon name="add" />
|
|
|
+ </span>
|
|
|
+ <span @click.stop="handleClassifyOpt(node, data, 'edit')">
|
|
|
+ <t-icon name="edit-2" />
|
|
|
+ </span>
|
|
|
+ <span @click.stop="handleClassifyOpt(node, data, 'del')">
|
|
|
+ <t-icon name="close" />
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-tree>
|
|
|
+
|
|
|
+ <!-- <t-tree
|
|
|
+ v-model:actived="classifyActived"
|
|
|
+ :data="classifyList"
|
|
|
+ activable
|
|
|
+ transition
|
|
|
+ draggable
|
|
|
+ :load="classifyLoad"
|
|
|
+ value-mode="all"
|
|
|
+ :keys="classifyTreeKeys"
|
|
|
+ check-strictly
|
|
|
+ :onDragOver="canDrag"
|
|
|
+ @drop="handleClassifyDrop"
|
|
|
+ >
|
|
|
<template #icon="{ node }">
|
|
|
- <svg-icon style="font-size:16px" v-if="node.getChildren() && node.expanded" name="tree_opend" />
|
|
|
- <svg-icon style="font-size:16px" v-if="node.getChildren() && !node.expanded" name="tree_close" />
|
|
|
+ <t-icon
|
|
|
+ name="add-rectangle"
|
|
|
+ v-if="node.getChildren() && !node.expanded"
|
|
|
+ />
|
|
|
+ <t-icon
|
|
|
+ name="minus-rectangle"
|
|
|
+ v-if="node.getChildren() && node.expanded"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template #label="{ node }">
|
|
|
+ <div class="classify-item-box">
|
|
|
+ <div class="label">{{ node.label }}</div>
|
|
|
+ <div class="opt-box" v-show="showClassifyOpt(node)">
|
|
|
+ <span>
|
|
|
+ <t-icon name="drag-move" />
|
|
|
+ </span>
|
|
|
+ <span @click.stop="handleClassifyOpt(node,'add')" v-if="node.data.Level<6">
|
|
|
+ <t-icon name="add" />
|
|
|
+ </span>
|
|
|
+ <span @click.stop="handleClassifyOpt(node,'edit')">
|
|
|
+ <t-icon name="edit-2" />
|
|
|
+ </span>
|
|
|
+ <span @click.stop="handleClassifyOpt(node,'del')">
|
|
|
+ <t-icon name="close" />
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
- </t-tree>
|
|
|
+ </t-tree> -->
|
|
|
+ </div>
|
|
|
+ <div class="classify-add-box" @click="showEditClassify = true">
|
|
|
+ <t-icon name="add-rectangle" />
|
|
|
+ <span>添加图表分类</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- 编辑分类 -->
|
|
|
+ <t-dialog
|
|
|
+ v-model:visible="showEditClassify"
|
|
|
+ header="新增分类"
|
|
|
+ draggable
|
|
|
+ :confirm-on-enter="true"
|
|
|
+ :on-confirm="handleConfirmClassify"
|
|
|
+ >
|
|
|
+ <t-form
|
|
|
+ ref="formEl"
|
|
|
+ :rules="FORM_RULES"
|
|
|
+ :data="classifyEditState"
|
|
|
+ class="edit-classify-wrap"
|
|
|
+ >
|
|
|
+ <t-form-item
|
|
|
+ label="上级分类"
|
|
|
+ name="parent"
|
|
|
+ v-if="classifyEditState.parent.length"
|
|
|
+ >
|
|
|
+ <div class="parent-box">
|
|
|
+ <span
|
|
|
+ v-for="item in classifyEditState.parent"
|
|
|
+ :key="item.ChartClassifyId"
|
|
|
+ >{{ item.ChartClassifyName }}</span
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </t-form-item>
|
|
|
+ <t-form-item label="分类名称" name="name">
|
|
|
+ <t-input
|
|
|
+ v-model="classifyEditState.name"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ ></t-input>
|
|
|
+ </t-form-item>
|
|
|
+ </t-form>
|
|
|
+ </t-dialog>
|
|
|
</template>
|
|
|
|
|
|
+<style lang="scss">
|
|
|
+.classify-wrap {
|
|
|
+ .classify-list-box {
|
|
|
+ .el-tree-node__content{
|
|
|
+ overflow: hidden;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .el-tree-node__expand-icon {
|
|
|
+ position: relative;
|
|
|
+ flex-shrink: 0;
|
|
|
+ span {
|
|
|
+ position: absolute;
|
|
|
+ left: 5%;
|
|
|
+ top: 5%;
|
|
|
+ display: inline-block;
|
|
|
+ width: 90%;
|
|
|
+ height: 90%;
|
|
|
+ background-image: url("@/assets/imgs/tree_closed.png");
|
|
|
+ background-size: cover;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-tree-node__expand-icon.expanded {
|
|
|
+ transform: none;
|
|
|
+ span {
|
|
|
+ background-image: url("@/assets/imgs/tree_opend.png");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|
|
|
<style lang="scss" scoped>
|
|
|
.classify-wrap {
|
|
|
width: 300px;
|
|
|
flex-shrink: 0;
|
|
|
padding: 20px;
|
|
|
-
|
|
|
+
|
|
|
.select-wrap {
|
|
|
display: flex;
|
|
|
gap: 0 10px;
|
|
@@ -108,8 +504,46 @@ const classifyList = ref([{
|
|
|
}
|
|
|
.classify-list-box {
|
|
|
padding-top: 10px;
|
|
|
- height: calc(100vh - 240px);
|
|
|
+ height: calc(100vh - 260px);
|
|
|
overflow-y: auto;
|
|
|
+ .classify-item-box {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 0 10px;
|
|
|
+ .label {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ .opt-box {
|
|
|
+ display: flex;
|
|
|
+ gap: 0 5px;
|
|
|
+ .t-icon {
|
|
|
+ color: $primary-color;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .classify-add-box {
|
|
|
+ cursor: pointer;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ gap: 0 5px;
|
|
|
+ color: $primary-color;
|
|
|
+ .t-icon {
|
|
|
+ color: $primary-color;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.edit-classify-wrap {
|
|
|
+ .parent-box {
|
|
|
+ span::after {
|
|
|
+ content: "/";
|
|
|
+ }
|
|
|
+ span:last-child::after {
|
|
|
+ content: "";
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|