|
@@ -1,15 +1,19 @@
|
|
|
<template>
|
|
|
<div class="report-map">
|
|
|
<div class="search-area">
|
|
|
- <a-select v-model:value="searchForm.sysOrgCode" style="width:280px;margin-right:15px"
|
|
|
- placeholder="请选择部门...">
|
|
|
- <a-select-option v-for="item in sysOrgCodeList" :key="item.value">{{ item.label }}</a-select-option>
|
|
|
- </a-select>
|
|
|
+ <a-tree-select v-model:value="searchForm.sysOrgCode" show-search style="width:280px;margin-right:15px"
|
|
|
+ :dropdown-style="{ maxHeight: '200px', overflow: 'auto' }" placeholder="请选择部门..." allow-clear
|
|
|
+ tree-default-expand-all :tree-data="sysOrgCodeList" tree-node-filter-prop="title">
|
|
|
+ <template #title="{ value: val, title }">
|
|
|
+ {{ title }}
|
|
|
+ </template>
|
|
|
+ </a-tree-select>
|
|
|
<a-button type="primary" preIcon="ant-design:search-outlined" style="margin-right:15px"
|
|
|
@click="getSearch">查询</a-button>
|
|
|
<a-button preIcon="ant-design:sync-outlined" @click="onReset">重置</a-button>
|
|
|
</div>
|
|
|
- <a-button preIcon="ant-design:plus-outlined" type="primary" @click="handleAdd" style="margin-bottom: 10px">新增</a-button>
|
|
|
+ <a-button preIcon="ant-design:plus-outlined" type="primary" @click="handleAdd"
|
|
|
+ style="margin-bottom: 10px">新增</a-button>
|
|
|
<a-table size="small" :dataSource="dataSource" :columns="columnsMap" :scroll="{ y: 620 }"
|
|
|
:pagination="pagination" @change="pageChange">
|
|
|
<template #action="{ record }">
|
|
@@ -28,15 +32,15 @@
|
|
|
<script setup lang="ts">
|
|
|
//ts语法
|
|
|
import { ref, reactive, toRaw, watch, onMounted } from 'vue';
|
|
|
-import { listMap, queryDepartTreeSync, reportDel } from '../reportManager.api'
|
|
|
-import { columnsMap, searchForm } from '../reportManager.data'
|
|
|
+import { listMap, queryDepartTreeSync, reportDel, queryTreeList } from '../reportManager.api'
|
|
|
+import { columnsMap } from '../reportManager.data'
|
|
|
import reportModal from './report-modal.vue'
|
|
|
|
|
|
let dataSource = ref<any[]>([])
|
|
|
let searchForm = reactive({
|
|
|
sysOrgCode: '',
|
|
|
})
|
|
|
-let sysOrgCodeList = reactive<any[]>([])
|
|
|
+let sysOrgCodeList = ref<any[]>([])
|
|
|
//分页参数配置
|
|
|
let pagination = reactive({
|
|
|
current: 1, // 当前页码
|
|
@@ -50,6 +54,7 @@ let visibleMap = ref(false)
|
|
|
let titleMap = ref('')
|
|
|
let isToggle = ref('')
|
|
|
let formState = reactive({
|
|
|
+ id:'',
|
|
|
sysOrgCode: '',
|
|
|
formula: '',
|
|
|
groupCol: '',
|
|
@@ -97,6 +102,7 @@ function handleEdit(record) {
|
|
|
isToggle.value = 'edit'
|
|
|
|
|
|
formState = {
|
|
|
+ id:record.id,
|
|
|
sysOrgCode: record.sysOrgCode,
|
|
|
formula: record.formula,
|
|
|
groupCol: record.groupCol,
|
|
@@ -127,14 +133,9 @@ function pageChange(val) {
|
|
|
}
|
|
|
//获取所属部门编号列表数据
|
|
|
async function queryDepartTreeSyncList() {
|
|
|
- let res = await queryDepartTreeSync()
|
|
|
+ let res = await queryTreeList()
|
|
|
console.log(res, '部门编号列表--------')
|
|
|
- sysOrgCodeList.length = 0
|
|
|
- if (res.length != 0) {
|
|
|
- res.forEach(el => {
|
|
|
- sysOrgCodeList.push({ label: el.title, value: el.orgCode })
|
|
|
- })
|
|
|
- }
|
|
|
+ sysOrgCodeList = res || []
|
|
|
}
|
|
|
|
|
|
//获取数据列表
|
|
@@ -186,7 +187,7 @@ onMounted(() => {
|
|
|
|
|
|
:deep(.zxm-select-selector) {
|
|
|
width: 100%;
|
|
|
- color: #fff;
|
|
|
+ // color: #fff;
|
|
|
border: 1px solid #3ad8ff77 !important;
|
|
|
background-color: #ffffff00 !important;
|
|
|
}
|