Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5bbe6f4a
authored
Jun 25, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix 功能联调bug修复
1 parent
f6b47079
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
90 additions
and
35 deletions
package.json
src/views/tagCustomerManagement/tagManagement/components/DimensionFormDialog.vue
src/views/tagCustomerManagement/tagManagement/components/EnumFormDialog.vue
src/views/tagCustomerManagement/tagManagement/enumMaintain/index.vue
src/views/tagCustomerManagement/tagManagement/index.vue
package.json
View file @
5bbe6f4
...
...
@@ -4,9 +4,9 @@
"private"
:
true
,
"scripts"
:
{
"备注"
:
"去掉nomock配置命令"
,
"serve"
:
"vue-cli-service serve"
,
"start"
:
"
set NODE_OPTIONS=--openssl-legacy-provider &&
npm run serve"
,
"dev"
:
"
set NODE_OPTIONS=--openssl-legacy-provider &&
npm run serve"
,
"serve"
:
"
set NODE_OPTIONS=--max-old-space-size=4096&&
vue-cli-service serve"
,
"start"
:
"npm run serve"
,
"dev"
:
"npm run serve"
,
"build"
:
"vue-cli-service build --no-module"
,
"build:nomock"
:
"vue-cli-service build --mode nomock"
,
"lint"
:
"vue-cli-service lint --fix"
,
...
...
src/views/tagCustomerManagement/tagManagement/components/DimensionFormDialog.vue
View file @
5bbe6f4
<
template
>
<glsk-form-dialog
v-if=
"visible"
:selectVisible=
"visible"
:dialogConfig=
"dialogConfig"
label-width=
"120px"
dialog-width=
"520px"
defaultWidth=
"320px"
:formRules=
"formRules"
:editData=
"editData"
:editFormData=
"editFormData"
:baseData=
"baseData"
@
handleClose=
"$emit('update:visible', false)"
@
handleConfirm=
"handleConfirm"
/>
<glsk-form-dialog
v-if=
"visible"
default-width=
"320px"
dialog-width=
"520px"
label-width=
"120px"
:base-data=
"baseData"
:dialog-config=
"dialogConfig"
:edit-data=
"editData"
:edit-form-data=
"editFormData"
:form-rules=
"formRules"
:select-visible=
"visible"
@
handleClose=
"$emit('update:visible', false)"
@
handleConfirm=
"handleConfirm"
/>
</
template
>
<
script
>
import
{
createTagDimension
,
updateTagDimension
,
queryTagDimensionDetail
,
updateTagDimension
,
}
from
"@api/tagManagement"
;
export
default
{
...
...
@@ -41,10 +39,6 @@ export default {
type
:
Array
,
default
:
()
=>
[],
},
defaultCategoryId
:
{
type
:
[
Number
,
String
],
default
:
""
,
},
},
data
()
{
return
{
...
...
@@ -92,7 +86,7 @@ export default {
placeholder
:
"请选择所属标签类别"
,
filterable
:
true
,
optionsName
:
"categoryOptions"
,
optionId
:
"
value
"
,
optionId
:
"
id
"
,
optionLabel
:
"fullPath"
,
optionList
:
[],
disabled
:
this
.
categoryReadonly
,
...
...
@@ -119,13 +113,27 @@ export default {
},
categoryOptions
:
{
handler
(
val
)
{
this
.
baseData
.
categoryOptions
=
val
||
[];
this
.
baseData
.
categoryOptions
=
(
val
||
[]).
map
(
item
=>
({
...
item
,
id
:
item
.
id
!=
null
?
item
.
id
:
item
.
value
,
fullPath
:
item
.
fullPath
||
item
.
categoryName
||
""
,
}));
},
immediate
:
true
,
deep
:
true
,
},
},
methods
:
{
resolveCategoryId
(
categoryId
)
{
if
(
categoryId
==
null
||
categoryId
===
""
)
{
return
""
;
}
const
options
=
this
.
baseData
.
categoryOptions
||
[];
const
matched
=
options
.
find
(
item
=>
String
(
item
.
id
)
===
String
(
categoryId
),
);
return
matched
?
matched
.
id
:
categoryId
;
},
async
initForm
()
{
if
(
this
.
isEdit
)
{
try
{
...
...
@@ -135,7 +143,7 @@ export default {
this
.
editData
=
{
id
:
detail
.
id
,
dimensionName
:
detail
.
dimensionName
||
""
,
categoryId
:
detail
.
categoryId
,
categoryId
:
this
.
resolveCategoryId
(
detail
.
categoryId
)
,
};
}
catch
(
err
)
{
this
.
$message
.
error
(
err
.
message
||
"获取维度详情失败"
);
...
...
@@ -143,14 +151,14 @@ export default {
this
.
editData
=
{
id
:
row
.
id
,
dimensionName
:
row
.
dimensionName
||
""
,
categoryId
:
row
.
categoryId
,
categoryId
:
this
.
resolveCategoryId
(
row
.
categoryId
)
,
};
}
}
else
{
this
.
editData
=
{
id
:
""
,
dimensionName
:
""
,
categoryId
:
this
.
defaultCategoryId
||
""
,
categoryId
:
""
,
};
}
},
...
...
src/views/tagCustomerManagement/tagManagement/components/EnumFormDialog.vue
View file @
5bbe6f4
...
...
@@ -84,6 +84,7 @@ export default {
{
label
:
"标签枚举值名称"
,
name
:
"enumName"
,
labelRequired
:
true
,
type
:
"input"
,
placeholder
:
"请输入"
,
maxlength
:
20
,
...
...
@@ -95,6 +96,7 @@ export default {
{
label
:
"命中客户分"
,
name
:
"score"
,
labelRequired
:
true
,
type
:
"input"
,
placeholder
:
"请输入0~100的整数"
,
maxlength
:
3
,
...
...
src/views/tagCustomerManagement/tagManagement/enumMaintain/index.vue
View file @
5bbe6f4
...
...
@@ -32,6 +32,13 @@
</el-button>
</
template
>
</d2-table>
<div
class=
"footer-actions"
>
<el-button
size=
"medium"
type=
"primary"
@
click=
"handleBack"
>
返回
</el-button>
</div>
</div>
<EnumFormDialog
:dimension-data=
"dimensionDetail"
...
...
@@ -186,6 +193,9 @@ export default {
handleEnumFormSuccess
()
{
this
.
refreshTable
();
},
handleBack
()
{
this
.
$router
.
push
({
name
:
"tagManagement"
});
},
},
};
</
script
>
...
...
@@ -211,5 +221,11 @@ export default {
.d2-container-content
{
padding
:
16px
20px
;
}
.footer-actions
{
margin-top
:
8px
;
padding
:
16px
0
8px
;
text-align
:
center
;
}
}
</
style
>
src/views/tagCustomerManagement/tagManagement/index.vue
View file @
5bbe6f4
...
...
@@ -69,7 +69,6 @@
:visible
.
sync=
"categoryDialogVisible"
@
success=
"handleCategorySuccess"
/>
<DimensionFormDialog
:category-options=
"dimensionCategoryOptions"
:default-category-id=
"selectedCategoryId"
:dimension-data=
"currentDimension"
:mode=
"dimensionDialogMode"
:visible
.
sync=
"dimensionDialogVisible"
...
...
@@ -213,6 +212,31 @@ export default {
this
.
$refs
.
dimensionTable
.
refreshTable
();
}
},
findCategoryInTree
(
list
,
id
)
{
for
(
const
item
of
list
||
[])
{
if
(
String
(
item
.
id
)
===
String
(
id
))
{
return
item
;
}
if
(
item
.
children
&&
item
.
children
.
length
)
{
const
found
=
this
.
findCategoryInTree
(
item
.
children
,
id
);
if
(
found
)
{
return
found
;
}
}
}
return
null
;
},
syncSelectedCategory
()
{
if
(
this
.
selectedCategoryId
===
""
||
this
.
selectedCategoryId
==
null
)
{
this
.
selectedCategory
=
null
;
return
;
}
const
found
=
this
.
findCategoryInTree
(
this
.
categoryTree
,
this
.
selectedCategoryId
,
);
this
.
selectedCategory
=
found
;
},
handleAddCategory
()
{
this
.
categoryDialogMode
=
"add"
;
this
.
currentCategory
=
{};
...
...
@@ -260,15 +284,20 @@ export default {
},
});
},
handleCategorySuccess
()
{
this
.
loadCategoryTree
();
this
.
loadCategoryLeafOptions
();
this
.
loadDimensionCategoryOptions
();
async
handleCategorySuccess
()
{
await
this
.
loadCategoryTree
();
this
.
syncSelectedCategory
();
await
Promise
.
all
([
this
.
loadCategoryLeafOptions
(),
this
.
loadDimensionCategoryOptions
(),
]);
this
.
refreshTable
();
},
handleDimensionSuccess
()
{
async
handleDimensionSuccess
()
{
await
this
.
loadCategoryTree
();
this
.
syncSelectedCategory
();
await
this
.
loadDimensionCategoryOptions
();
this
.
refreshTable
();
this
.
loadCategoryTree
();
this
.
loadDimensionCategoryOptions
();
},
},
};
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment