This commit is contained in:
李远 2026-03-17 13:13:11 +08:00
parent a73ec399f7
commit 161f1996d4
1 changed files with 14 additions and 17 deletions

View File

@ -175,7 +175,8 @@ const activeTab = ref('email')
const marketPointTree = ref<any>([])
const marketPointTableColumnsOptions = computed(() => {
return dialogType.value !== 'view' ? marketPointTableColumns : viewMarketPointTableColumns;
});//
});
//
const selectedRow = ref<any>(null)
/**
* @description 数据处理方法
@ -199,7 +200,9 @@ const mapMarketTree = (data: any) => {
floatProfitLoss: "后续添加",//
closeProfitLoss: item.wallet_capital.closing_profit,//
riskMargin: item.wallet_capital.risk,//
serviceFee: item.wallet_capital.service//
serviceFee: item.wallet_capital.service,//
//使
roleId: item.role_id,
}))
}
@ -371,13 +374,8 @@ const handleAddMarket = async () => {
//
const handleEditMarket = async () => {
if (!selectedRow.value) {
ElMessage.warning('请先选择要编辑的做市商!');
return;
}
const row = selectedRow.value;
console.log('row', row);
console.log('rowrowrowrowrow', row.role_id);
// ID
const getParentIdFromPath = (path: string, level: number) => {
@ -438,7 +436,7 @@ const handleEditMarket = async () => {
//
const handleViewPointDiff = async (row: any) => {
try {
const data = await getPointDiffConfigListApi({ user_id: row.id });
const data = await getPointDiffConfigListApi({ user_id: row.role_id });
marketPointTree.value = data.map((item: any) => ({
...item,
varietyName: item.name,
@ -472,6 +470,7 @@ const handleRowClick = (row: any) => {
//
const handlePaginationChange = async (page: { currentPage: number, pageSize: number }) => {
currentPage.value = page.currentPage
pageSize.value = page.pageSize
await getMarketList()
}
@ -479,14 +478,7 @@ const handlePaginationChange = async (page: { currentPage: number, pageSize: num
/**
* @description dialog方法
*/
//
/**
* @description 提交之前构造数据
*/
// { "1":"42", "2":"38" }
// : { "1":"42", "2":"38" }
const formatPointDiffToObject = () => {
if (!marketPointTree.value || !marketPointTree.value.length) return {};
@ -502,6 +494,7 @@ const formatPointDiffToObject = () => {
return pointDiffObj; //
};
//
const handleSubmit = async () => {
// console.log('', marketPointTree.value);
await marketFormRef.value?.validate()
@ -535,6 +528,10 @@ const handleSubmit = async () => {
}
// 4.
await editMarketApi(params)
// 5.
await getMarketList()
dialogVisible.value = false
marketForm.value = { ...initMarketForm }
}
}