2025-03-26

This commit is contained in:
2025-03-26 11:00:21 +08:00
parent 927d7381b8
commit b45f4950d3
468 changed files with 54473 additions and 124 deletions

View File

@@ -0,0 +1,4 @@
import { FORM_DATA, RULE_FORM } from "./search";
import { COLUMNS } from "./table";
export { FORM_DATA, RULE_FORM, COLUMNS };

View File

@@ -0,0 +1,57 @@
interface FormItem {
prop: string;
label?: string;
placeholder?: string;
type: string;
isCopy?: boolean;
optionProps?: any;
startPlaceholder?: string;
endPlaceholder?: string;
options?: any;
isArray?: boolean;
startDate?: string; //开始时间(传入后台需要的参数)
endDate?: string; //结束时间(传入后台需要的参数)
startProp?: string;
endProp?: string;
isInteger?: boolean;
}
export const FORM_DATA: FormItem[] = [
{
prop: "corp_name",
placeholder: "请输入",
type: "input",
isArray: true,
label: "公司名称: "
},
{
prop: "size_type",
placeholder: "请选择",
type: "select",
options: [
{
value: 1,
label: "待审核"
},
{
value: 2,
label: "已审核"
}
],
label: "企业规模: "
},
{
prop: "Time",
type: "daterange",
options: [],
startPlaceholder: "开始日期",
endPlaceholder: "结束日期",
startDate: "created_at",
//endDate: "createEndDate",
label: "提交时间: "
}
];
export const RULE_FORM = {
page: 1,
size: 50
};

View File

@@ -0,0 +1,49 @@
//import { RenderScope } from "@/components/ProTable/interface";
export const COLUMNS = [
{
align: "center",
fixed: true,
label: "提交时间",
prop: "created_at"
},
{
align: "center",
label: "IP定位",
prop: "ip"
},
{
align: "left",
label: "公司名称",
prop: "corp_name"
},
{
align: "left",
label: "邮箱",
prop: "email"
},
{
align: "left",
label: "手机号码",
prop: "phone"
},
{
align: "left",
label: "业务类型",
prop: "business_type_name"
},
{
align: "left",
label: "企业规模",
prop: "enterprise_size_name"
},
{
align: "left",
label: "公司地址",
prop: "address"
},
{
align: "left",
label: "留言内容",
prop: "message"
}
];

View File

@@ -0,0 +1,63 @@
<!-- 联系我们列表 -->
<template>
<div class="table-box">
<div style="padding-bottom: 16px">
<el-button type="primary" @click="handleExport"> 导出 </el-button>
</div>
<ProTable
ref="proTableRef"
:formData="dataStore.formData"
:columns="dataStore.columns"
:request-api="getAgentListApi"
:init-param="dataStore.initParam"
>
</ProTable>
</div>
</template>
<script setup lang="ts" name="feedbackContactIndex">
import ProTable from "@/components/ProTable/index.vue";
import { useExport } from "@/hooks/useExport";
//列表接口
import { getAgentListApi, getAgentListExportApi, getAgentTypesListApi } from "@/api/modules/agent";
//深拷贝方法
import { cloneDeep } from "lodash-es";
//表格和搜索條件
import { RULE_FORM, FORM_DATA, COLUMNS } from "./constant/index";
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
const proTableRef = ref<any>(null);
// 数据源
const dataStore = reactive<any>({
columns: COLUMNS, //列表配置项
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
ruleForm: cloneDeep(RULE_FORM), // 搜索參數
formData: FORM_DATA //搜索配置项
});
const handleExport = () => {
getMenusLisExport();
};
//导出
const getMenusLisExport = async () => {
const result = await getAgentListExportApi(dataStore.ruleForm);
await useExport(result);
};
const getAgentTypesList = async () => {
const result = await getAgentTypesListApi();
if (result?.code === 0) {
let arr: any = [];
result?.data.forEach((item: any) => {
arr.push({
value: item.value,
label: item.name
});
});
dataStore.formData[1].options = arr;
console.log(result?.data);
}
};
getAgentTypesList();
</script>
<style scoped></style>

View File

@@ -0,0 +1,4 @@
import { FORM_DATA, RULE_FORM } from "./search";
import { COLUMNS } from "./table";
export { FORM_DATA, RULE_FORM, COLUMNS };

View File

@@ -0,0 +1,34 @@
interface FormItem {
prop: string;
label?: string;
placeholder?: string;
type: string;
isCopy?: boolean;
optionProps?: any;
startPlaceholder?: string;
endPlaceholder?: string;
options?: any;
isArray?: boolean;
startDate?: string; //开始时间(传入后台需要的参数)
endDate?: string; //结束时间(传入后台需要的参数)
startProp?: string;
endProp?: string;
isInteger?: boolean;
}
export const FORM_DATA: FormItem[] = [
{
prop: "Time",
type: "daterange",
options: [],
startPlaceholder: "开始日期",
endPlaceholder: "结束日期",
startDate: "created_at",
// endDate: "createEndDate",
label: "提交时间: "
}
];
export const RULE_FORM = {
page: 1,
size: 50
};

View File

@@ -0,0 +1,29 @@
//import { RenderScope } from "@/components/ProTable/interface";
export const COLUMNS = [
{
align: "center",
fixed: true,
label: "提交时间",
prop: "created_at"
},
{
align: "center",
label: "IP定位",
prop: "ip"
},
{
align: "left",
label: "姓名",
prop: "name"
},
{
align: "left",
label: "邮箱",
prop: "email"
},
{
align: "left",
label: "留言内容",
prop: "content"
}
];

View File

@@ -0,0 +1,48 @@
<!-- 联系我们列表 -->
<template>
<div class="table-box">
<div style="padding-bottom: 16px">
<el-button type="primary" @click="handleExport"> 导出 </el-button>
</div>
<ProTable
ref="proTableRef"
:formData="dataStore.formData"
:columns="dataStore.columns"
:request-api="getLeaveMsgListApi"
:init-param="dataStore.initParam"
>
</ProTable>
</div>
</template>
<script setup lang="ts" name="feedbackContactIndex">
import ProTable from "@/components/ProTable/index.vue";
import { useExport } from "@/hooks/useExport";
//列表接口
import { getLeaveMsgListExportApi, getLeaveMsgListApi } from "@/api/modules/contact";
//深拷贝方法
import { cloneDeep } from "lodash-es";
//表格和搜索條件
import { RULE_FORM, FORM_DATA, COLUMNS } from "./constant/index";
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
const proTableRef = ref<any>(null);
// 数据源
const dataStore = reactive<any>({
columns: COLUMNS, //列表配置项
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
ruleForm: cloneDeep(RULE_FORM), // 搜索參數
formData: FORM_DATA //搜索配置项
});
const handleExport = () => {
getMenusLisExport();
};
//导出
const getMenusLisExport = async () => {
const result = await getLeaveMsgListExportApi(dataStore.ruleForm);
await useExport(result);
};
</script>
<style scoped></style>

View File

@@ -0,0 +1,4 @@
import { FORM_DATA, RULE_FORM } from "./search";
import { COLUMNS } from "./table";
export { FORM_DATA, RULE_FORM, COLUMNS };

View File

@@ -0,0 +1,49 @@
interface FormItem {
prop: string;
label?: string;
placeholder?: string;
type: string;
isCopy?: boolean;
optionProps?: any;
startPlaceholder?: string;
endPlaceholder?: string;
options?: any;
isArray?: boolean;
startDate?: string; //开始时间(传入后台需要的参数)
endDate?: string; //结束时间(传入后台需要的参数)
startProp?: string;
endProp?: string;
isInteger?: boolean;
}
export const FORM_DATA: FormItem[] = [
{
prop: "corp_name",
placeholder: "请输入",
type: "input",
isArray: true,
label: "公司名称: "
},
{
prop: "country_name",
placeholder: "请选择",
type: "selectRemote",
options: [],
label: "所在国家: "
},
{
prop: "Time",
type: "daterange",
options: [],
startPlaceholder: "开始日期",
endPlaceholder: "结束日期",
startDate: "created_at",
// endDate: "createEndDate",
label: "提交时间: "
}
];
export const RULE_FORM = {
page: 1,
size: 50,
orgCode: 0
};

View File

@@ -0,0 +1,47 @@
import { RenderScope } from "@/components/ProTable/interface";
export const COLUMNS = [
{
align: "center",
fixed: true,
label: "姓名",
prop: "first_name",
render: (scope: RenderScope<any>): VNode | string | any => {
return scope.row.first_name + scope.row.last_name;
}
},
{
align: "center",
label: "公司名称",
prop: "corp_name"
},
{
align: "left",
label: "邮箱",
prop: "email"
},
{
align: "left",
label: "手机号码",
prop: "phone"
},
{
align: "left",
label: "所在国家",
prop: "country_name"
},
{
align: "left",
label: "行业",
prop: "industry"
},
{
align: "left",
label: "留言内容",
prop: "message"
},
{
align: "left",
label: "提交时间",
prop: "created_at"
}
];

View File

@@ -0,0 +1,68 @@
<!-- 批量采购询盘列表 -->
<template>
<div class="table-box">
<ProTable
ref="proTableRef"
:formData="dataStore.formData"
:columns="dataStore.columns"
:request-api="getProductListApi"
:init-param="dataStore.initParam"
>
</ProTable>
</div>
</template>
<script setup lang="ts" name="feedbackProductIndex">
import ProTable from "@/components/ProTable/index.vue";
//列表接口
import { getProductListApi } from "@/api/modules/product";
// import { getCountryListApi } from "@/api/modules/global";
// import { useUserStore } from "@/stores/modules/user";
// const userStore: any = useUserStore();
//深拷贝方法
import { cloneDeep } from "lodash-es";
//表格和搜索條件
import { RULE_FORM, FORM_DATA, COLUMNS } from "./constant/index";
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
const proTableRef = ref<any>(null);
// 数据源
const dataStore = reactive<any>({
columns: COLUMNS, //列表配置项
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
ruleForm: cloneDeep(RULE_FORM), // 搜索參數
formData: FORM_DATA //搜索配置项
// ZH: [],
// EN: []
});
// const getCountryList = async () => {
// const result = await getCountryListApi();
// if (result?.code === 0) {
// dataStore.ZH = [];
// dataStore.EN = [];
// result?.data.forEach((item: any) => {
// dataStore.ZH.push({
// label: item.name,
// value: item.id
// });
// dataStore.EN.push({
// label: item.name,
// value: item.id
// });
// });
// dataStore.formData[1].options = userStore.languageType === 1 ? dataStore.ZH : dataStore.EN;
// }
// };
// getCountryList();
// watch(
// () => userStore.languageType,
// (newVal: any) => {
// dataStore.formData[1].options = newVal === 1 ? dataStore.ZH : dataStore.EN;
// },
// { deep: true, immediate: true }
// );
</script>
<style scoped></style>

View File

@@ -0,0 +1,4 @@
import { FORM_DATA, RULE_FORM } from "./search";
import { COLUMNS } from "./table";
export { FORM_DATA, RULE_FORM, COLUMNS };

View File

@@ -0,0 +1,49 @@
interface FormItem {
prop: string;
label?: string;
placeholder?: string;
type: string;
isCopy?: boolean;
optionProps?: any;
startPlaceholder?: string;
endPlaceholder?: string;
options?: any;
isArray?: boolean;
startDate?: string; //开始时间(传入后台需要的参数)
endDate?: string; //结束时间(传入后台需要的参数)
startProp?: string;
endProp?: string;
isInteger?: boolean;
}
export const FORM_DATA: FormItem[] = [
{
prop: "corp_name",
placeholder: "请输入",
type: "input",
isArray: true,
label: "公司名称: "
},
{
prop: "interested",
placeholder: "请选择",
type: "select",
options: [],
label: "想采购的产品: "
},
{
prop: "Time",
type: "daterange",
options: [],
startPlaceholder: "开始日期",
endPlaceholder: "结束日期",
startDate: "created_at",
// endDate: "createEndDate",
label: "提交时间: "
}
];
export const RULE_FORM = {
page: 1,
size: 50,
orgCode: 0
};

View File

@@ -0,0 +1,47 @@
import { RenderScope } from "@/components/ProTable/interface";
export const COLUMNS = [
{
align: "center",
fixed: true,
label: "提交时间",
prop: "created_at"
},
{
align: "center",
label: "IP定位",
prop: "ip"
},
{
align: "left",
label: "公司名称",
prop: "corp_name"
},
{
align: "left",
label: "姓名",
prop: "first_name",
render: (scope: RenderScope<any>): VNode | string | any => {
return scope.row.first_name + scope.row.last_name;
}
},
{
align: "left",
label: "邮箱",
prop: "email"
},
{
align: "left",
label: "手机号码",
prop: "phone"
},
{
align: "left",
label: "想采购的产品",
prop: "interested"
},
{
align: "left",
label: "询问内容",
prop: "message"
}
];

View File

@@ -0,0 +1,64 @@
<!-- 联系我们列表 -->
<template>
<div class="table-box">
<div style="padding-bottom: 16px">
<el-button type="primary" @click="handleExport"> 导出 </el-button>
</div>
<ProTable
ref="proTableRef"
:formData="dataStore.formData"
:columns="dataStore.columns"
:request-api="getBPListApi"
:init-param="dataStore.initParam"
>
</ProTable>
</div>
</template>
<script setup lang="ts" name="feedbackContactIndex">
import ProTable from "@/components/ProTable/index.vue";
import { useExport } from "@/hooks/useExport";
//列表接口
import { getBPListExportApi, getBPListApi, getBPInterestedListApi } from "@/api/modules/purchase";
//深拷贝方法
import { cloneDeep } from "lodash-es";
//表格和搜索條件
import { RULE_FORM, FORM_DATA, COLUMNS } from "./constant/index";
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
const proTableRef = ref<any>(null);
// 数据源
const dataStore = reactive<any>({
columns: COLUMNS, //列表配置项
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
ruleForm: cloneDeep(RULE_FORM), // 搜索參數
formData: FORM_DATA //搜索配置项
});
const handleExport = () => {
getBPListExport();
};
//导出
const getBPListExport = async () => {
const result = await getBPListExportApi(dataStore.ruleForm);
await useExport(result);
};
//
const getBPInterestedList = async () => {
const result = await getBPInterestedListApi();
if (result?.code === 0) {
let arr: any = [];
result?.data.forEach((item: any) => {
arr.push({
label: item,
value: item
});
});
dataStore.formData[1].options = arr;
console.log(result?.data, "=======data========");
}
};
getBPInterestedList();
</script>
<style scoped></style>