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