Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
d90f80d8
提交
d90f80d8
authored
1月 08, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(bi/store): 旺店通店铺_修复完成
同上
上级
ad7b8a83
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
57 行增加
和
52 行删除
+57
-52
element-ui.scss
src/assets/styles/element-ui.scss
+3
-0
index.scss
src/assets/styles/index.scss
+2
-1
index.js
src/utils/index.js
+13
-3
index.vue
src/views/bi/prd_tag/index.vue
+2
-7
index.vue
src/views/bi/store/index.vue
+37
-41
没有找到文件。
src/assets/styles/element-ui.scss
浏览文件 @
d90f80d8
...
@@ -60,11 +60,14 @@
...
@@ -60,11 +60,14 @@
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
height
:
50vh
;
height
:
50vh
;
padding
:
20px
;
.el-dialog__header
{
.el-dialog__header
{
padding-top
:
10px
;
height
:
40px
;
height
:
40px
;
}
}
.el-dialog__body
{
.el-dialog__body
{
margin-top
:
20px
;
height
:
calc
(
50vh
-
40px
-
32px
);
height
:
calc
(
50vh
-
40px
-
32px
);
}
}
}
}
...
...
src/assets/styles/index.scss
浏览文件 @
d90f80d8
...
@@ -129,7 +129,8 @@ aside {
...
@@ -129,7 +129,8 @@ aside {
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
padding
:
20px
;
padding
:
20px
;
>
div
{
>
div
{
width
:
100%
;
width
:
100%
;
padding
:
20px
;
padding
:
20px
;
}
}
...
...
src/utils/index.js
浏览文件 @
d90f80d8
...
@@ -233,7 +233,7 @@ export function getTime(type) {
...
@@ -233,7 +233,7 @@ export function getTime(type) {
export
function
debounce
(
func
,
wait
,
immediate
)
{
export
function
debounce
(
func
,
wait
,
immediate
)
{
let
timeout
,
args
,
context
,
timestamp
,
result
let
timeout
,
args
,
context
,
timestamp
,
result
const
later
=
function
()
{
const
later
=
function
()
{
// 据上一次触发时间间隔
// 据上一次触发时间间隔
const
last
=
+
new
Date
()
-
timestamp
const
last
=
+
new
Date
()
-
timestamp
...
@@ -250,7 +250,7 @@ export function debounce(func, wait, immediate) {
...
@@ -250,7 +250,7 @@ export function debounce(func, wait, immediate) {
}
}
}
}
return
function
(...
args
)
{
return
function
(...
args
)
{
context
=
this
context
=
this
timestamp
=
+
new
Date
()
timestamp
=
+
new
Date
()
const
callNow
=
immediate
&&
!
timeout
const
callNow
=
immediate
&&
!
timeout
...
@@ -405,14 +405,24 @@ export function isNumberStr(str) {
...
@@ -405,14 +405,24 @@ export function isNumberStr(str) {
// 清除对象里属性的非响应式的值
// 清除对象里属性的非响应式的值
/**
* 深度重置对象的属性值
* @param {Object} obj - 需要重置的对象
* @param {Array} props - 需要重置的属性数组
*/
export
function
resetObjValue
(
obj
,
props
)
{
export
function
resetObjValue
(
obj
,
props
)
{
for
(
let
prop
in
obj
)
{
for
(
let
prop
in
obj
)
{
if
(
obj
.
hasOwnProperty
(
prop
))
{
if
(
obj
.
hasOwnProperty
(
prop
))
{
// 判断属性值是否为数组或对象
if
(
Array
.
isArray
(
obj
[
prop
]))
{
if
(
Array
.
isArray
(
obj
[
prop
]))
{
obj
[
prop
]
=
[];
obj
[
prop
]
=
[];
obj
[
prop
].
forEach
((
item
,
index
)
=>
{
if
(
typeof
item
===
'object'
&&
item
!==
null
)
{
resetObjValue
(
obj
[
prop
],
Object
.
keys
(
item
));
}
});
}
else
if
(
typeof
obj
[
prop
]
===
'object'
&&
obj
[
prop
]
!==
null
)
{
}
else
if
(
typeof
obj
[
prop
]
===
'object'
&&
obj
[
prop
]
!==
null
)
{
obj
[
prop
]
=
{};
obj
[
prop
]
=
{};
resetObjValue
(
obj
[
prop
],
Object
.
keys
(
obj
[
prop
]));
}
else
{
}
else
{
obj
[
prop
]
=
undefined
;
// 基础类型重置为 undefined
obj
[
prop
]
=
undefined
;
// 基础类型重置为 undefined
}
}
...
...
src/views/bi/prd_tag/index.vue
浏览文件 @
d90f80d8
...
@@ -68,12 +68,11 @@
...
@@ -68,12 +68,11 @@
popper-class=
"my_popper"
></el-cascader>
popper-class=
"my_popper"
></el-cascader>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
<
template
#
footer
>
class=
"dialog-footer"
>
<el-button
type=
"primary"
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</
div
>
</
template
>
</el-dialog>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -341,10 +340,6 @@ getSeriesGoodsTagList()
...
@@ -341,10 +340,6 @@ getSeriesGoodsTagList()
}
}
}
}
}
}
.dialog-footer
{
align-self
:
flex-end
;
}
}
}
}
}
...
...
src/views/bi/store/index.vue
浏览文件 @
d90f80d8
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<div
class=
"content"
>
<!-- 搜索表单 -->
<!-- 搜索表单 -->
<el-form
:model=
"queryParams"
<el-form
:model=
"queryParams"
ref=
"formRef"
inline
size=
"small"
:inline=
"true"
v-show=
"showSearch"
v-show=
"showSearch"
label-width=
"68px"
>
label-width=
"68px"
>
<el-form-item
label=
"店铺名字"
<el-form-item
label=
"店铺名字"
...
@@ -44,8 +43,7 @@
...
@@ -44,8 +43,7 @@
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
<el-button
type=
"primary"
plain
plain
icon=
"el-icon-plus"
icon=
"Plus"
size=
"mini"
@
click=
"handleAdd"
@
click=
"handleAdd"
v-hasPermi=
"['gen:store:add']"
>
新增
</el-button>
v-hasPermi=
"['gen:store:add']"
>
新增
</el-button>
</el-col>
</el-col>
...
@@ -94,9 +92,9 @@
...
@@ -94,9 +92,9 @@
class-name=
"small-padding fixed-width"
class-name=
"small-padding fixed-width"
v-if=
"columns[5].visible"
>
v-if=
"columns[5].visible"
>
<
template
v-slot=
"scope"
>
<
template
v-slot=
"scope"
>
<el-button
size=
"mini"
<el-button
text
type=
"text
"
type=
"primary
"
icon=
"el-icon-e
dit"
icon=
"E
dit"
@
click=
"handleUpdate(scope.row)"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['gen:store:edit']"
>
修改
</el-button>
v-hasPermi=
"['gen:store:edit']"
>
修改
</el-button>
</
template
>
</
template
>
...
@@ -107,16 +105,14 @@
...
@@ -107,16 +105,14 @@
v-model:page=
"queryParams.pageNum"
v-model:page=
"queryParams.pageNum"
v-model:limit=
"queryParams.pageSize"
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
@
pagination=
"getList"
/>
</div>
<!-- 添加或修改对话框 -->
<!-- 添加或修改对话框 -->
<el-dialog
:title=
"title"
<el-dialog
:title=
"title"
v-model:visible=
"open"
v-model=
"open"
>
append-to-body
>
<el-form
ref=
"formRef"
<el-form
ref=
"form"
:model=
"form"
:model=
"form"
:rules=
"rules"
:rules=
"rules"
label-width=
"80px"
label-width=
"80px"
>
v-a
>
<el-form-item
label=
"店铺编码"
<el-form-item
label=
"店铺编码"
prop=
"storeCode"
>
prop=
"storeCode"
>
<el-input
v-model=
"form.storeCode"
<el-input
v-model=
"form.storeCode"
...
@@ -130,9 +126,8 @@
...
@@ -130,9 +126,8 @@
<el-form-item
label=
"渠道"
<el-form-item
label=
"渠道"
prop=
"channelId"
>
prop=
"channelId"
>
<el-radio-group
v-model=
"form.channelId"
>
<el-radio-group
v-model=
"form.channelId"
>
<el-radio
v-for=
"dict in dict.type.sale_channel"
<el-radio
v-for=
"dict in sale_channel"
:key=
"dict.value"
:value=
"dict.value"
>
:label=
"dict.value"
>
{{ dict.label }}
{{ dict.label }}
</el-radio>
</el-radio>
</el-radio-group>
</el-radio-group>
...
@@ -140,31 +135,29 @@
...
@@ -140,31 +135,29 @@
<el-form-item
label=
"所属平台"
<el-form-item
label=
"所属平台"
prop=
"platformId"
>
prop=
"platformId"
>
<el-radio-group
v-model=
"form.platformId"
>
<el-radio-group
v-model=
"form.platformId"
>
<el-radio
v-for=
"dict in dict.type.sale_platform"
<el-radio
v-for=
"dict in sale_platform"
:key=
"dict.value"
:value=
"dict.value"
>
:label=
"dict.value"
>
{{ dict.label }}
{{ dict.label }}
</el-radio>
</el-radio>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
<
template
#
footer
>
class=
"dialog-footer"
>
<el-button
type=
"primary"
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</
div
>
</
template
>
</el-dialog>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
setup
>
<
script
setup
>
import
{
listStore
,
addStore
,
updateStore
}
from
"@/api"
;
import
{
listStore
,
addStore
,
updateStore
}
from
"@/api"
;
import
{
debounce
}
from
'@/utils'
import
{
debounce
,
resetObjValue
}
from
'@/utils'
const
{
proxy
}
=
getCurrentInstance
();
const
{
proxy
}
=
getCurrentInstance
();
const
{
sale_channel
,
sale_platform
,
sys_normal_disable
}
=
proxy
.
useDict
(
[
'sale_channel'
,
'sale_platform'
,
'sys_normal_disable'
]
);
// 渠道,平台,状态字典
const
{
sale_channel
,
sale_platform
,
sys_normal_disable
}
=
proxy
.
useDict
(
'sale_channel'
,
'sale_platform'
,
'sys_normal_disable'
);
// 渠道,平台,状态字典
const
loading
=
ref
(
true
)
// 遮罩层
const
loading
=
ref
(
true
)
// 遮罩层
const
formRef
=
ref
(
null
)
const
formRef
=
ref
(
null
)
...
@@ -225,14 +218,10 @@ const cancel = () => {
...
@@ -225,14 +218,10 @@ const cancel = () => {
}
}
// 表单重置
// 表单重置
const
reset
=
()
=>
{
const
reset
=
()
=>
{
form
.
value
=
{
resetObjValue
(
form
)
storeId
:
null
,
form
.
channelId
=
'1'
storeCode
:
null
,
form
.
platformId
=
'1'
storeName
:
null
,
formRef
.
value
.
resetFields
();
channelId
:
'1'
,
// 默认渠道:"电商"
platformId
:
'1'
// 默认平台:"天猫"
};
resetForm
(
"form"
);
}
}
/** 搜索按钮操作 */
/** 搜索按钮操作 */
const
handleQuery
=
debounce
(
function
()
{
const
handleQuery
=
debounce
(
function
()
{
...
@@ -241,14 +230,14 @@ const handleQuery = debounce(function () {
...
@@ -241,14 +230,14 @@ const handleQuery = debounce(function () {
})
})
/** 新增按钮操作 */
/** 新增按钮操作 */
const
handleAdd
=
()
=>
{
const
handleAdd
=
()
=>
{
form
.
value
.
storeId
&&
reset
();
form
.
storeId
&&
reset
();
open
.
value
=
true
;
open
.
value
=
true
;
title
.
value
=
"添加-电商店铺"
;
title
.
value
=
"添加-电商店铺"
;
}
}
/** 修改按钮操作 */
/** 修改按钮操作 */
const
handleUpdate
=
(
row
)
=>
{
const
handleUpdate
=
(
row
)
=>
{
reset
();
reset
();
form
.
value
=
{
...
row
};
form
=
{
...
row
};
open
.
value
=
true
open
.
value
=
true
title
.
value
=
"修改-电商店铺"
title
.
value
=
"修改-电商店铺"
}
}
...
@@ -256,8 +245,8 @@ const handleUpdate = (row) => {
...
@@ -256,8 +245,8 @@ const handleUpdate = (row) => {
const
submitForm
=
()
=>
{
const
submitForm
=
()
=>
{
formRef
.
value
.
validate
(
valid
=>
{
formRef
.
value
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
form
.
value
.
storeId
!=
null
)
{
if
(
form
.
storeId
!=
null
)
{
updateStore
(
form
.
value
).
then
(
response
=>
{
updateStore
(
form
).
then
(
response
=>
{
proxy
.
$modal
.
msgSuccess
(
"修改成功"
);
proxy
.
$modal
.
msgSuccess
(
"修改成功"
);
open
.
value
=
false
;
open
.
value
=
false
;
getList
();
getList
();
...
@@ -265,9 +254,9 @@ const submitForm = () => {
...
@@ -265,9 +254,9 @@ const submitForm = () => {
});
});
}
else
{
}
else
{
// 携带平台和渠道中文字符
// 携带平台和渠道中文字符
form
.
value
.
channel
=
sale_channel
.
find
(
item
=>
item
.
value
===
this
.
form
.
channelId
).
label
form
.
channel
=
sale_channel
.
value
.
find
(
item
=>
item
.
value
===
form
.
channelId
).
label
form
.
value
.
platform
=
sale_platform
.
find
(
item
=>
item
.
value
===
this
.
form
.
platformId
).
label
form
.
platform
=
sale_platform
.
value
.
find
(
item
=>
item
.
value
===
form
.
platformId
).
label
addStore
(
form
.
value
).
then
(
response
=>
{
addStore
(
form
).
then
(
response
=>
{
proxy
.
$modal
.
msgSuccess
(
"新增成功"
);
proxy
.
$modal
.
msgSuccess
(
"新增成功"
);
open
.
value
=
false
;
open
.
value
=
false
;
getList
();
getList
();
...
@@ -299,9 +288,15 @@ getList()
...
@@ -299,9 +288,15 @@ getList()
</
script
>
</
script
>
<
style
scoped
<
style
scoped
lang=
"scss"
>
lang=
"scss"
>
.content
{
background-color
:
var
(
--
el-bg-color-overlay
);
width
:
100%
;
.el-radio-group
{
.el-radio-group
{
.el-radio
{
.el-radio
{
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论