统计类型配置添加修改
This commit is contained in:
@@ -1,45 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog class="cn-operate-dialog statistical-type-binding" v-model="dialogVisible" title="绑定指标"
|
||||||
class="cn-operate-dialog statistical-type-binding"
|
style="width: 1040px">
|
||||||
v-model="dialogVisible"
|
|
||||||
title="绑定指标"
|
|
||||||
style="width: 1040px"
|
|
||||||
>
|
|
||||||
<el-scrollbar style="padding-right: 0">
|
<el-scrollbar style="padding-right: 0">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-left">
|
<div class="box-left">
|
||||||
<el-input
|
<el-input v-model="searchKey" size="small" placeholder="请输入搜索内容" :suffix-icon="Search"
|
||||||
v-model="searchKey"
|
@input="filterTree" style="margin-bottom: 10px"></el-input>
|
||||||
size="small"
|
<el-cascader-panel v-model="fromDataValue" :props="{
|
||||||
placeholder="请输入搜索内容"
|
|
||||||
:suffix-icon="Search"
|
|
||||||
@input="filterTree"
|
|
||||||
style="margin-bottom: 10px"
|
|
||||||
></el-input>
|
|
||||||
<el-cascader-panel
|
|
||||||
v-model="fromDataValue"
|
|
||||||
:props="{
|
|
||||||
multiple: true
|
multiple: true
|
||||||
}"
|
}" :options="fromData"></el-cascader-panel>
|
||||||
:options="fromData"
|
|
||||||
></el-cascader-panel>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="box-center">
|
<div class="box-center">
|
||||||
<el-button type="primary" icon="el-icon-Plus" @click="newGroup">新建分组</el-button>
|
<el-button type="primary" icon="el-icon-Plus" @click="newGroup">新建分组</el-button>
|
||||||
<el-popover
|
<el-popover v-model="popoverVisible" placement="right" width="400" trigger="click"
|
||||||
v-model="popoverVisible"
|
popper-style="width:auto">
|
||||||
placement="right"
|
|
||||||
width="400"
|
|
||||||
trigger="click"
|
|
||||||
popper-style="width:auto"
|
|
||||||
>
|
|
||||||
<div class="statistical-type-binding-button-group">
|
<div class="statistical-type-binding-button-group">
|
||||||
<el-button
|
<el-button type="primary" style="margin-left: 0" v-for="item in toData"
|
||||||
type="primary"
|
@click="leftCheckChange(item)">
|
||||||
style="margin-left: 0"
|
|
||||||
v-for="item in toData"
|
|
||||||
@click="leftCheckChange(item)"
|
|
||||||
>
|
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -50,45 +27,35 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
<el-button
|
<el-button style="margin-left: 0" icon="el-icon-ArrowLeft" class="mt20" type="primary"
|
||||||
style="margin-left: 0"
|
@click="rightCheckChange">
|
||||||
icon="el-icon-ArrowLeft"
|
|
||||||
class="mt20"
|
|
||||||
type="primary"
|
|
||||||
@click="rightCheckChange"
|
|
||||||
>
|
|
||||||
向左
|
向左
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-right">
|
<div class="box-right">
|
||||||
<el-input
|
<el-input v-model="searchKey1" size="small" placeholder="请输入搜索内容" :suffix-icon="Search"
|
||||||
v-model="searchKey1"
|
@input="filterTree1" style="margin-bottom: 10px"></el-input>
|
||||||
size="small"
|
<el-cascader-panel v-model="toDataValue" :props="{
|
||||||
placeholder="请输入搜索内容"
|
|
||||||
:suffix-icon="Search"
|
|
||||||
@input="filterTree1"
|
|
||||||
style="margin-bottom: 10px"
|
|
||||||
></el-input>
|
|
||||||
<el-cascader-panel
|
|
||||||
v-model="toDataValue"
|
|
||||||
:props="{
|
|
||||||
multiple: true,
|
multiple: true,
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
expandTrigger: 'click'
|
expandTrigger: 'click'
|
||||||
}"
|
}" :options="toData">
|
||||||
:options="toData"
|
|
||||||
>
|
|
||||||
<template #default="{ node, data }">
|
<template #default="{ node, data }">
|
||||||
<div style="display: flex; align-items: center">
|
<div style="display: flex; align-items: center">
|
||||||
<div class="hide-txt">{{ data.label }}</div>
|
<div class="hide-txt">{{ data.label }}</div>
|
||||||
<template v-if="node.level === 1">
|
<template v-if="node.level === 1">
|
||||||
<div class="ml5">({{ data.children.length }})</div>
|
<div class="ml5">({{ data.children.length }})</div>
|
||||||
<div style="flex: 1"></div>
|
<div style="flex: 1"></div>
|
||||||
|
<Icon name="el-icon-EditPen" class="ml10" style="cursor: pointer"
|
||||||
|
@click="editGroup(data)"></Icon>
|
||||||
|
|
||||||
<el-popconfirm title="确定删除该分组吗?" @confirm="dicDeleteGroup(data)">
|
<el-popconfirm title="确定删除该分组吗?" @confirm="dicDeleteGroup(data)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<Icon name="el-icon-Delete" class="ml10" style="cursor: pointer"></Icon>
|
<Icon name="el-icon-Delete" class="ml10" style="cursor: pointer"></Icon>
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -110,6 +77,7 @@
|
|||||||
import { ref, inject } from 'vue'
|
import { ref, inject } from 'vue'
|
||||||
import { CascaderValue, ElMessage } from 'element-plus'
|
import { CascaderValue, ElMessage } from 'element-plus'
|
||||||
import { addStatistical, queryStatistical } from '@/api/system-boot/csstatisticalset'
|
import { addStatistical, queryStatistical } from '@/api/system-boot/csstatisticalset'
|
||||||
|
import { getDictTreeById } from '@/api/system-boot/dictTree'
|
||||||
import PopupAdd from './add.vue'
|
import PopupAdd from './add.vue'
|
||||||
import { dicDelete } from '@/api/system-boot/dic'
|
import { dicDelete } from '@/api/system-boot/dic'
|
||||||
import List from '@/views/pms/comptroller/list.vue'
|
import List from '@/views/pms/comptroller/list.vue'
|
||||||
@@ -368,6 +336,8 @@ const dicDeleteGroup = (data: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const newGroup = () => {
|
const newGroup = () => {
|
||||||
|
console.log("🚀 ~ newGroup ~ toData.value.length:", toData.value[toData.value.length - 1].sort + 1)
|
||||||
|
|
||||||
addRef.value.open('新增菜单', {
|
addRef.value.open('新增菜单', {
|
||||||
sort: toData.value.length ? toData.value[toData.value.length - 1].sort + 1 : 1,
|
sort: toData.value.length ? toData.value[toData.value.length - 1].sort + 1 : 1,
|
||||||
code: '',
|
code: '',
|
||||||
@@ -377,6 +347,19 @@ const newGroup = () => {
|
|||||||
name: ''
|
name: ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const editGroup = (data: any) => {
|
||||||
|
getDictTreeById(data.id).then(res => {
|
||||||
|
addRef.value.open('修改菜单', {
|
||||||
|
sort: res.data.sort || 100,
|
||||||
|
code: res.data.code || '',
|
||||||
|
pid: res.data.pid || '',
|
||||||
|
id: res.data.id || '',
|
||||||
|
remark: res.data.remark || '',
|
||||||
|
name: res.data.name || ''
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
const open = (id: string) => {
|
const open = (id: string) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
|
|||||||
Reference in New Issue
Block a user