Commit 2872f9ba authored by LiXuyang's avatar LiXuyang

Merge remote-tracking branch 'origin/master'

parents 2516c0c6 9937e0c5
......@@ -529,7 +529,8 @@
tabularPresentationColumns,
compareColumns,
tabularPresentationSearchFormSchema,
compareSearchFormSchema, noConfigurationColumns,
compareSearchFormSchema,
noConfigurationColumns,
} from './offlineLoading.data';
import Icon from '@/components/Icon/Icon.vue';
import { useMessage } from '@/hooks/web/useMessage';
......@@ -1065,10 +1066,10 @@
componentProps: ({ formModel, formActionType }) => ({
onChange: () => {
isAutomaticTableConstructionFlag.value = formModel.isAutomaticTableConstruction === '是';
if(isAutomaticTableConstructionFlag.value){
if (isAutomaticTableConstructionFlag.value) {
setColumns(configurationColumns);
reload();
}else {
} else {
setColumns(noConfigurationColumns);
reload();
}
......
<template>
<div class="m-4 mr-0 overflow-hidden bg-white">
<BasicTree
ref="treeRef"
toolbar
search
treeWrapperClassName="h-[calc(100%-35px)] overflow-auto"
:clickRowToExpand="false"
:defaultExpandAll="true"
:treeData="treeData"
:fieldNames="{ key: 'selectedDeptId', title: 'name', }"
@select="handleSelect"
/>
</div>
</template>
<script lang="ts" setup>
import { nextTick, onMounted, ref, unref } from 'vue';
import { BasicTree, TreeActionType, TreeItem } from '@/components/Tree';
import { Nullable } from '@vben/types';
import { tableList, treeDataList } from './mock';
defineOptions({ name: 'DeptTree' });
const emit = defineEmits(['select']);
const treeData = ref<TreeItem[]>([]);
const treeRef = ref<Nullable<TreeActionType>>(null);
// 合并数据的函数
function mergeTreeDataWithTableList(treeDataList, tableList) {
return treeDataList.map((treeNode) => {
// 找到对应的tableList项,合并name属性
const tableItem = tableList.find((item) => item.selectedDeptId === treeNode.selectedDeptId);
if (tableItem) {
treeNode.name = tableItem.name; // 将tableList中的name添加到treeNode
}
// 如果有子节点,递归处理
if (treeNode.children && treeNode.children.length > 0) {
treeNode.children = mergeTreeDataWithTableList(treeNode.children, tableList);
}
return treeNode;
});
}
async function fetch() {
// 合并树形数据和表格数据
treeData.value = mergeTreeDataWithTableList(treeDataList, tableList);
await nextTick(() => {
getTree(treeRef).expandAll(true);
});
}
function getTree(treeRef) {
const tree = unref(treeRef);
if (!tree) {
throw new Error('tree is null!');
}
return tree;
}
function handleSelect(selectedDeptId) {
emit('select', selectedDeptId[0]);
console.log('selectedDeptId:', selectedDeptId);
}
onMounted(() => {
fetch();
});
</script>
......@@ -9,18 +9,28 @@
:title="title"
>
<template #closeIcon>
<span></span>
<span @click="submitForm"></span>
</template>
<template #title>
<div class="toolbar">
<div
style="display: flex; align-items: center; justify-content: space-between; width: 100%"
>
<h3 style="margin-top: 15px">{{ title }}</h3>
<div style="display: flex; gap: 3px; align-items: center">
<Icon
icon="ep:arrow-left-bold"
:size="20"
style="margin-right: 5px; cursor: pointer"
:color="'#a3a7b1'"
@click="closeModal"
/>
<Icon icon="fa:table" :size="20" style="margin-right: 5px" :color="'#2fb1c2'" />
<span>{{ title }}</span>
</div>
<div style="display: flex; gap: 15px">
<a-button type="primary" @click="closeModal">取消</a-button>
<a-button type="primary">申请检测</a-button>
<a-button type="primary" @click="testForm">申请检测</a-button>
<a-button type="primary" @click="submitForm"> 提交申请 </a-button>
<a-button type="primary" @click="closeModal">取消</a-button>
</div>
</div>
</div>
......@@ -51,14 +61,21 @@
import { ref } from 'vue';
import { BasicForm, useForm } from '@/components/Form';
import { useMessage } from '@/hooks/web/useMessage';
import Icon from '@/components/Icon/Icon.vue';
const { createMessage } = useMessage();
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
if (data.length >= 1) {
title.value = '申请批量推送<' + data[0].title + '>等' + data.length + '资源';
} else {
title.value = '申请推送<' + data.title + '>资源';
}
setModalProps({ confirmLoading: false });
});
const title = ref('申请推送<wyx_contact>等1个资源');
const [registerGuideModeForm, { validate, getFieldsValue: getFieldsValueValiate }] = useForm({
const title = ref('申请推送等1个资源');
const [registerGuideModeForm, { validate, getFieldsValue: getFieldsValueValiate, submit }] =
useForm({
labelWidth: 100,
labelAlign: 'right',
schemas: personSchema,
......@@ -70,7 +87,7 @@
const [
pushConfigurationModeForm,
{ validate: validatePushConfig, getFieldsValue: getFieldsValueValiateL },
{ validate: validatePushConfig, getFieldsValue: getFieldsValueValiateL, submit: submit2 },
] = useForm({
labelWidth: 100,
labelAlign: 'right',
......@@ -82,17 +99,33 @@
});
// 提交表单的方法
const submitForm = () => {
validate();
validatePushConfig()
.then(() => {
console.log(getFieldsValueValiate(), getFieldsValueValiateL());
createMessage.success(`表单已提交`);
})
.catch(() => {
createMessage.error(`请输入必填项`);
});
};
async function submitForm() {
try {
// 并行执行两个验证函数
await Promise.all([validate(), validatePushConfig()]);
await submit();
await submit2();
createMessage.success('检测通过');
} catch (error) {
// 显示错误消息并记录错误详情(仅限开发环境)
const errorMessage = error?.message || '请输入必填项';
createMessage.error(errorMessage);
}
}
// 检测表单的方法
async function testForm() {
try {
// 并行执行两个验证函数
await Promise.all([validate(), validatePushConfig()]);
// 如果所有验证都通过,则显示成功消息
createMessage.success('检测通过');
} catch (error) {
// 显示错误消息并记录错误详情(仅限开发环境)
const errorMessage = error?.message || '请输入必填项';
createMessage.error(errorMessage);
}
}
</script>
<style lang="less" scoped></style>
<template>
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex" >
<DeptTree class="w-1/4 xl:w-1/5" @select="handleSelect" />
<editAuditRulesModal
style="background: #cc0000;"
class="w-3/4 xl:w-4/5"
v-if="isSpecificDeptSelected"
/>
<BasicTable
@register="registerTable"
class="w-3/4 xl:w-4/5"
:searchInfo="searchInfo"
v-else
>
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" placeholder="输入关键字搜索" allowClear />
<a-button type="primary" @click="pushNotifications">推送</a-button>
<a-button type="primary">下载</a-button>
</template>
</BasicTable>
</PageWrapper>
</template>
<script lang="ts" setup>
import { reactive, computed } from 'vue';
import {BasicTable, useTable} from '@/components/Table';
import { PageWrapper } from '@/components/Page';
import DeptTree from './DeptTree.vue';
import { ref } from 'vue';
import {columnInformationList} from './mock';
import { columns } from './commonDataSet.data';
import EditAuditRulesModal from "./editAuditRulesModal.vue";
import {router} from "@/router";
defineOptions({ name: 'AccountManagement' });
const isSpecificDeptSelected = computed(() => {
return [23, 24, 25].includes(selectedDeptId.value);
});
// 选中的部门ID
const selectedDeptId = ref<string | null>(null);
const searchInfo = reactive<Recordable>({});
const [
registerTable,
{ },
] = useTable({
api: async (params) => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: columnInformationList.length,
code: '',
message: '',
data: columnInformationList,
};
return { ...response };
},
rowKey: 'businessId',
columns,
formConfig: {
labelWidth: 10,
autoSubmitOnEnter: true,
},
rowSelection: false,
useSearchForm: false,
showIndexColumn: false,
showTableSetting: false,
bordered: true,
handleSearchInfoFn(info) {
console.log('handleSearchInfoFn', info);
return info;
},
});
/**推送*/
function pushNotifications() {
router.push({
path: '/mallResourceDevelopment/dataSet/commonDataSet/applyForPushNotificationsModal',
query: {},
});
}
// 处理选择节点事件
const handleSelect = (deptId) => {
selectedDeptId.value = deptId;
console.log('选择节点selectedDeptId:', deptId);
}
</script>
<template>
<Tabs v-model:activeKey="key">
<TabPane key="1" tab="源端配置">
<editAuditRulesModal style="background: #cc0000" class="w-3/4 xl:w-4/5"
/></TabPane>
<TabPane key="2" tab="源端配置"
><BasicTable @register="registerTable" class="w-3/4 xl:w-4/5" :searchInfo="searchInfo">
<template #toolbar>
<a-input
style="width: 200px; margin-right: auto"
placeholder="输入关键字搜索"
allowClear
/>
<a-button type="primary" @click="pushNotifications">推送</a-button>
<a-button type="primary">下载</a-button>
</template>
</BasicTable>
</TabPane>
</Tabs>
</template>
<script lang="ts" setup>
import { Tabs, TabPane, Alert, Modal } from 'ant-design-vue';
import { reactive, computed, ref } from 'vue';
import { BasicTable, useTable } from '@/components/Table';
import { PageWrapper } from '@/components/Page';
import { columnInformationList } from './mock';
import { columns } from './commonDataSet.data';
import EditAuditRulesModal from './editAuditRulesModal.vue';
import { router } from '@/router';
defineOptions({ name: 'AccountManagement' });
const key = ref('1');
const searchInfo = reactive<Recordable>({});
const [registerTable, {}] = useTable({
api: async (params) => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: columnInformationList.length,
code: '',
message: '',
data: columnInformationList,
};
return { ...response };
},
rowKey: 'businessId',
columns,
formConfig: {
labelWidth: 10,
autoSubmitOnEnter: true,
},
rowSelection: false,
useSearchForm: false,
showIndexColumn: false,
showTableSetting: false,
bordered: true,
handleSearchInfoFn(info) {
console.log('handleSearchInfoFn', info);
return info;
},
});
/**推送*/
function pushNotifications() {
router.push({
path: '/mallResourceDevelopment/dataSet/commonDataSet/applyForPushNotificationsModal',
query: {},
});
}
</script>
......@@ -10,8 +10,8 @@
<template #headerCell="{ column, title }">
<span>{{ title }}</span
><br />
<Tag color="orange" v-if="column.key != 'origin_city'" >{{ '敏感' }}</Tag>
<span style="font-size: 12px" >{{ column.type }}</span>
<Tag color="orange" v-if="column.key != 'origin_city'">{{ '敏感' }}</Tag>
<span style="font-size: 12px">{{ column.type }}</span>
</template>
<template #toolbar>
......@@ -32,10 +32,8 @@
import { BasicTable, useTable } from '@/components/Table';
import { Switch, Tag } from 'ant-design-vue';
import {
samplingInfoData,
} from './commonDataSet.data';
import {router} from "@/router";
import { samplingInfoData } from './commonDataSet.data';
import { router } from '@/router';
const infoDataColumns: { dataIndex: string; width: number; title: string }[] = [
{
......@@ -119,10 +117,9 @@
data: [],
};
//过滤data中的数据,取出等于params.deptId的数据
let data = samplingInfoData.filter((item) => item.parentId !== 0); // 根据需求过滤数据
data = data.map((item) =>{
data = data.map((item) => {
const transformedItem = { ...item };
// 遍历每个字段,将除了 origin_city 外的字段替换成 '*'
......@@ -140,7 +137,6 @@
pagination: false,
showIndexColumn: false,
scroll: { y: 400 },
});
</script>
......
<template>
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex" >
<DeptTree class="w-1/4 xl:w-1/5" @select="handleSelect" />
<editAuditRulesModal
style="background: #cc0000;"
class="w-3/4 xl:w-4/5"
v-if="isSpecificDeptSelected"
/>
<BasicTable
@register="registerTable"
class="w-3/4 xl:w-4/5"
:searchInfo="searchInfo"
v-else
>
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" placeholder="输入关键字搜索" allowClear />
<a-button type="primary">新建文件夹</a-button>
<a-button type="primary">新建文件</a-button>
</template>
</BasicTable>
</PageWrapper>
</template>
<script lang="ts" setup>
import { reactive, computed } from 'vue';
import {BasicTable, useTable} from '@/components/Table';
import { PageWrapper } from '@/components/Page';
import DeptTree from './DeptTree.vue';
import { ref } from 'vue';
import {columnInformationList} from './mock';
import { columns } from './commonDataSet.data';
import EditAuditRulesModal from "@/views/scriptDevelopment/sqlAudit/editAuditRulesModal.vue";
defineOptions({ name: 'AccountManagement' });
const isSpecificDeptSelected = computed(() => {
return [23, 24, 25].includes(selectedDeptId.value);
});
// 选中的部门ID
const selectedDeptId = ref<string | null>(null);
const searchInfo = reactive<Recordable>({});
const [
registerTable,
{ },
] = useTable({
api: async (params) => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: columnInformationList.length,
code: '',
message: '',
data: columnInformationList,
};
return { ...response };
},
rowKey: 'businessId',
columns,
formConfig: {
labelWidth: 10,
autoSubmitOnEnter: true,
},
rowSelection: false,
useSearchForm: false,
showIndexColumn: false,
showTableSetting: false,
bordered: true,
handleSearchInfoFn(info) {
console.log('handleSearchInfoFn', info);
return info;
},
});
// 处理选择节点事件
const handleSelect = (deptId) => {
selectedDeptId.value = deptId;
console.log('选择节点selectedDeptId:', deptId);
}
</script>
......@@ -26,7 +26,7 @@
<a-button :disabled="isDisabled" type="primary" @click="handleBulkDownload"
>批量下载</a-button
>
<a-button :disabled="isDisabled" type="primary" @click="pushNotifications"
<a-button :disabled="isDisabled" type="primary" @click="pushNotifications(selectedCard)"
>批量推送</a-button
>
</div>
......@@ -119,7 +119,7 @@
<Divider type="vertical" />
<a-button
style="padding: 0; border: none; box-shadow: none"
@click="pushNotifications"
@click="pushNotifications(item)"
>
<Icon icon="icon-park-outline:hand-up" />{{ item.edit }}</a-button
>
......@@ -298,44 +298,17 @@
}
function information(item) {
const title = item.title;
if (title === '党建工作总结') {
router.push({
path: '/mallResourceDevelopment/dataSet/commonDataSet/columnInformation',
query: {},
});
}
if (title === '党史知识竞赛') {
router.push({
path: '/mallResourceDevelopment/dataSet/commonDataSet/partyHistoryKnowledgeCompetition',
query: {},
});
}
if (title === '主题教育活动') {
router.push({
path: '/mallResourceDevelopment/dataSet/commonDataSet/themeEducationActivities',
query: {},
});
}
if (title === '党员发展计划') {
router.push({
path: '/mallResourceDevelopment/dataSet/commonDataSet/partyMemberDevelopmentPlan',
query: {},
});
}
if (title === '基本信息') {
router.push({
path: '/mallResourceDevelopment/dataSet/commonDataSet/essentialInformation',
query: {},
});
}
}
function handleBulkDownload() {}
/**批量推送推送*/
function pushNotifications() {
openApplyForPushNotificationsModal(true);
function pushNotifications(record) {
openApplyForPushNotificationsModal(true, record);
// router.push({
// path: '/mallResourceDevelopment/dataSet/commonDataSet/applyForPushNotificationsModal',
// query: {},
......
......@@ -582,14 +582,11 @@ export const pushConfiguration: FormSchema[] = [
componentProps: {
options: [
{ label: '无周期', value: '1' },
{ label: '一周期', value: '2' },
{ label: '两周期', value: '3' },
{ label: '三周期', value: '4' },
{ label: '四周期', value: '5' },
{ label: '五周期', value: '6' },
{ label: '六周期', value: '7' },
{ label: '十二周期', value: '8' },
{ label: '二十四周期', value: '9' },
{ label: '每天', value: '2' },
{ label: '每周', value: '3' },
{ label: '每月', value: '4' },
{ label: '每季度', value: '5' },
{ label: '每年', value: '6' },
],
placeholder: '请选择周期',
},
......@@ -617,6 +614,7 @@ export const pushConfiguration: FormSchema[] = [
colProps: {
span: 16,
},
defaultValue: '1',
componentProps: {
options: [
{
......
<template>
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex" >
<DeptTree class="w-1/4 xl:w-1/5" @select="handleSelect" />
<editAuditRulesModal
style="background: #cc0000;"
class="w-3/4 xl:w-4/5"
v-if="isSpecificDeptSelected"
/>
<BasicTable
@register="registerTable"
class="w-3/4 xl:w-4/5"
:searchInfo="searchInfo"
v-else
>
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" placeholder="输入关键字搜索" allowClear />
<a-button type="primary">新建文件夹</a-button>
<a-button type="primary">新建文件</a-button>
</template>
</BasicTable>
</PageWrapper>
</template>
<script lang="ts" setup>
import { reactive, computed } from 'vue';
import {BasicTable, useTable} from '@/components/Table';
import { PageWrapper } from '@/components/Page';
import DeptTree from './DeptTree.vue';
import { ref } from 'vue';
import {columnInformationList} from './mock';
import { columns } from './commonDataSet.data';
import EditAuditRulesModal from "@/views/scriptDevelopment/sqlAudit/editAuditRulesModal.vue";
defineOptions({ name: 'AccountManagement' });
const isSpecificDeptSelected = computed(() => {
return [23, 24, 25].includes(selectedDeptId.value);
});
// 选中的部门ID
const selectedDeptId = ref<string | null>(null);
const searchInfo = reactive<Recordable>({});
const [
registerTable,
{ },
] = useTable({
api: async (params) => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: columnInformationList.length,
code: '',
message: '',
data: columnInformationList,
};
return { ...response };
},
rowKey: 'businessId',
columns,
formConfig: {
labelWidth: 10,
autoSubmitOnEnter: true,
},
rowSelection: false,
useSearchForm: false,
showIndexColumn: false,
showTableSetting: false,
bordered: true,
handleSearchInfoFn(info) {
console.log('handleSearchInfoFn', info);
return info;
},
});
// 处理选择节点事件
const handleSelect = (deptId) => {
selectedDeptId.value = deptId;
console.log('选择节点selectedDeptId:', deptId);
}
</script>
<template>
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex" >
<DeptTree class="w-1/4 xl:w-1/5" @select="handleSelect" />
<editAuditRulesModal
style="background: #cc0000;"
class="w-3/4 xl:w-4/5"
v-if="isSpecificDeptSelected"
/>
<BasicTable
@register="registerTable"
class="w-3/4 xl:w-4/5"
:searchInfo="searchInfo"
v-else
>
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" placeholder="输入关键字搜索" allowClear />
<a-button type="primary">新建文件夹</a-button>
<a-button type="primary">新建文件</a-button>
</template>
</BasicTable>
</PageWrapper>
</template>
<script lang="ts" setup>
import { reactive, computed } from 'vue';
import {BasicTable, useTable} from '@/components/Table';
import { PageWrapper } from '@/components/Page';
import DeptTree from './DeptTree.vue';
import { ref } from 'vue';
import {columnInformationList} from './mock';
import { columns } from './commonDataSet.data';
import EditAuditRulesModal from "@/views/scriptDevelopment/sqlAudit/editAuditRulesModal.vue";
defineOptions({ name: 'AccountManagement' });
const isSpecificDeptSelected = computed(() => {
return [23, 24, 25].includes(selectedDeptId.value);
});
// 选中的部门ID
const selectedDeptId = ref<string | null>(null);
const searchInfo = reactive<Recordable>({});
const [
registerTable,
{ },
] = useTable({
api: async (params) => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: columnInformationList.length,
code: '',
message: '',
data: columnInformationList,
};
return { ...response };
},
rowKey: 'businessId',
columns,
formConfig: {
labelWidth: 10,
autoSubmitOnEnter: true,
},
rowSelection: false,
useSearchForm: false,
showIndexColumn: false,
showTableSetting: false,
bordered: true,
handleSearchInfoFn(info) {
console.log('handleSearchInfoFn', info);
return info;
},
});
// 处理选择节点事件
const handleSelect = (deptId) => {
selectedDeptId.value = deptId;
console.log('选择节点selectedDeptId:', deptId);
}
</script>
<template>
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex" >
<DeptTree class="w-1/4 xl:w-1/5" @select="handleSelect" />
<editAuditRulesModal
style="background: #cc0000;"
class="w-3/4 xl:w-4/5"
v-if="isSpecificDeptSelected"
/>
<BasicTable
@register="registerTable"
class="w-3/4 xl:w-4/5"
:searchInfo="searchInfo"
v-else
>
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" placeholder="输入关键字搜索" allowClear />
<a-button type="primary">新建文件夹</a-button>
<a-button type="primary">新建文件</a-button>
</template>
</BasicTable>
</PageWrapper>
</template>
<script lang="ts" setup>
import { reactive, computed } from 'vue';
import {BasicTable, useTable} from '@/components/Table';
import { PageWrapper } from '@/components/Page';
import DeptTree from './DeptTree.vue';
import { ref } from 'vue';
import {columnInformationList} from './mock';
import { columns } from './commonDataSet.data';
import EditAuditRulesModal from "@/views/scriptDevelopment/sqlAudit/editAuditRulesModal.vue";
defineOptions({ name: 'AccountManagement' });
const isSpecificDeptSelected = computed(() => {
return [23, 24, 25].includes(selectedDeptId.value);
});
// 选中的部门ID
const selectedDeptId = ref<string | null>(null);
const searchInfo = reactive<Recordable>({});
const [
registerTable,
{ },
] = useTable({
api: async (params) => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: columnInformationList.length,
code: '',
message: '',
data: columnInformationList,
};
return { ...response };
},
rowKey: 'businessId',
columns,
formConfig: {
labelWidth: 10,
autoSubmitOnEnter: true,
},
rowSelection: false,
useSearchForm: false,
showIndexColumn: false,
showTableSetting: false,
bordered: true,
handleSearchInfoFn(info) {
console.log('handleSearchInfoFn', info);
return info;
},
});
// 处理选择节点事件
const handleSelect = (deptId) => {
selectedDeptId.value = deptId;
console.log('选择节点selectedDeptId:', deptId);
}
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment