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