Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
c54ce2e7
提交
c54ce2e7
authored
5月 24, 2024
作者:
lhh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
4c4b2222
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
55 行增加
和
17 行删除
+55
-17
Index.vue
src/modules/group/views/Index.vue
+13
-3
LabelRuleDialog.vue
src/modules/label/components/LabelRuleDialog.vue
+1
-1
Index.vue
src/modules/label/views/Index.vue
+6
-2
Index.vue
src/modules/material/all/views/Index.vue
+10
-2
Index.vue
src/modules/metadata/event/views/Index.vue
+14
-3
Index.vue
src/modules/metadata/user/views/Index.vue
+7
-2
user.ts
src/stores/user.ts
+3
-3
permission.ts
src/utils/permission.ts
+1
-1
没有找到文件。
src/modules/group/views/Index.vue
浏览文件 @
c54ce2e7
...
@@ -7,6 +7,9 @@ import { getNameByValue, groupTypeList, updateStatusRuleList } from '@/utils/dic
...
@@ -7,6 +7,9 @@ import { getNameByValue, groupTypeList, updateStatusRuleList } from '@/utils/dic
import
{
getGroupList
,
deleteGroup
}
from
'../api'
import
{
getGroupList
,
deleteGroup
}
from
'../api'
import
{
useMapStore
}
from
'@/stores/map'
import
{
useMapStore
}
from
'@/stores/map'
import
SelectUser
from
'@/components/SelectUser.vue'
import
SelectUser
from
'@/components/SelectUser.vue'
import
{
useUserStore
}
from
'@/stores/user'
const
userStore
=
useUserStore
()
const
FormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/FormDialog.vue'
))
const
FormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/FormDialog.vue'
))
const
ViewDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/ViewDialog.vue'
))
const
ViewDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/ViewDialog.vue'
))
...
@@ -121,7 +124,7 @@ function handleView(row: Group) {
...
@@ -121,7 +124,7 @@ function handleView(row: Group) {
<template
#
header-buttons
>
<template
#
header-buttons
>
<el-space>
<el-space>
<el-dropdown
v-permission=
"['experiment_group_create_dynamic_group', 'experiment_group_create_static_group']"
>
<el-dropdown
v-permission=
"['experiment_group_create_dynamic_group', 'experiment_group_create_static_group']"
>
<el-button
type=
"primary"
:icon=
"Plus"
>
新建
</el-button>
<el-button
type=
"primary"
:icon=
"Plus"
v-if=
"!userStore.status.group_status"
>
新建
</el-button>
<template
#
dropdown
>
<template
#
dropdown
>
<el-dropdown-menu>
<el-dropdown-menu>
<el-dropdown-item
@
click=
"handleAdd('2')"
>
新建动态群组
</el-dropdown-item>
<el-dropdown-item
@
click=
"handleAdd('2')"
>
新建动态群组
</el-dropdown-item>
...
@@ -154,13 +157,20 @@ function handleView(row: Group) {
...
@@ -154,13 +157,20 @@ function handleView(row: Group) {
v-permission=
"['experiment_group_create_dynamic_group', 'experiment_group_update_static_group']"
v-permission=
"['experiment_group_create_dynamic_group', 'experiment_group_update_static_group']"
>
编辑
</el-button
>
编辑
</el-button
>
>
<el-button
type=
"primary"
plain
@
click=
"handleRemove([row])"
v-permission=
"'experiment_group_delete'"
>
删除
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleRemove([row])"
v-permission=
"'experiment_group_delete'"
>
删除
</el-button
>
</
template
>
</
template
>
</AppList>
</AppList>
</AppCard>
</AppCard>
<!-- 新建/修改群组 -->
<!-- 新建/修改群组 -->
<FormDialog
v-model=
"formVisible"
:data=
"currentRow"
@
update=
"handleRefresh"
v-if=
"formVisible && currentRow"
></FormDialog>
<FormDialog
v-model=
"formVisible"
:data=
"currentRow"
@
update=
"handleRefresh"
v-if=
"formVisible && currentRow"
></FormDialog>
<!-- 查看 -->
<!-- 查看 -->
<ViewDialog
v-model=
"viewVisible"
:data=
"(currentRow as Group)"
v-if=
"viewVisible && currentRow"
></ViewDialog>
<ViewDialog
v-model=
"viewVisible"
:data=
"(currentRow as Group)"
v-if=
"viewVisible && currentRow"
></ViewDialog>
</template>
</template>
src/modules/label/components/LabelRuleDialog.vue
浏览文件 @
c54ce2e7
...
@@ -25,7 +25,7 @@ const emit = defineEmits<{
...
@@ -25,7 +25,7 @@ const emit = defineEmits<{
const
userStore
=
useUserStore
()
const
userStore
=
useUserStore
()
const
disabled
=
computed
(()
=>
userStore
.
status
)
const
disabled
=
computed
(()
=>
userStore
.
status
.
tag_status
)
const
statusList
=
useMapStore
().
getMapValuesByKey
(
'system_status'
)
const
statusList
=
useMapStore
().
getMapValuesByKey
(
'system_status'
)
...
...
src/modules/label/views/Index.vue
浏览文件 @
c54ce2e7
...
@@ -9,6 +9,9 @@ import { useMapStore } from '@/stores/map'
...
@@ -9,6 +9,9 @@ import { useMapStore } from '@/stores/map'
import
{
getNameByValue
,
updateStatusRuleList
,
labelList
}
from
'@/utils/dictionary'
import
{
getNameByValue
,
updateStatusRuleList
,
labelList
}
from
'@/utils/dictionary'
import
{
useLabelType
}
from
'../composables/useLabelType'
import
{
useLabelType
}
from
'../composables/useLabelType'
import
SelectUser
from
'@/components/SelectUser.vue'
import
SelectUser
from
'@/components/SelectUser.vue'
import
{
useUserStore
}
from
'@/stores/user'
const
userStore
=
useUserStore
()
const
LabelFormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/LabelFormDialog.vue'
))
const
LabelFormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/LabelFormDialog.vue'
))
const
LabelViewDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/LabelViewDialog.vue'
))
const
LabelViewDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/LabelViewDialog.vue'
))
...
@@ -141,14 +144,15 @@ function handleSelect(id: string) {
...
@@ -141,14 +144,15 @@ function handleSelect(id: string) {
})
})
}
}
</
script
>
</
script
>
<!-- import { useUserStore } from '@/stores/user'
const userStore = useUserStore() -->
<
template
>
<
template
>
<AppCard>
<AppCard>
<div
class=
"label-wrap"
>
<div
class=
"label-wrap"
>
<div
class=
"label-left"
><LabelType
:active-id=
"listParams.type_id"
@
select=
"handleSelect"
></LabelType></div>
<div
class=
"label-left"
><LabelType
:active-id=
"listParams.type_id"
@
select=
"handleSelect"
></LabelType></div>
<AppList
v-bind=
"listOptions"
ref=
"appList"
class=
"label-right"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
class=
"label-right"
>
<template
#
header-buttons
>
<template
#
header-buttons
>
<el-button
type=
"primary"
:icon=
"Plus"
@
click=
"handleAdd"
v-permission=
"'experiment_tag_create'"
>
新建
</el-button>
<el-button
type=
"primary"
:icon=
"Plus"
@
click=
"handleAdd"
v-permission=
"'experiment_tag_create'"
v-if=
"!userStore.status.tag_status"
>
新建
</el-button>
</
template
>
</
template
>
<
template
#
filter-user
>
<
template
#
filter-user
>
<SelectUser
v-model=
"listParams.updated_operator"
placeholder=
"更新人"
@
change=
"handleRefresh"
></SelectUser>
<SelectUser
v-model=
"listParams.updated_operator"
placeholder=
"更新人"
@
change=
"handleRefresh"
></SelectUser>
...
...
src/modules/material/all/views/Index.vue
浏览文件 @
c54ce2e7
...
@@ -6,6 +6,9 @@ import AppList from '@/components/base/AppList.vue'
...
@@ -6,6 +6,9 @@ import AppList from '@/components/base/AppList.vue'
import
{
getMaterialList
,
updateMaterial
,
deleteMaterial
}
from
'../api'
import
{
getMaterialList
,
updateMaterial
,
deleteMaterial
}
from
'../api'
import
{
getNameByValue
,
materialMethodList
,
materialUsageList
,
materialUsersList
}
from
'@/utils/dictionary'
import
{
getNameByValue
,
materialMethodList
,
materialUsageList
,
materialUsersList
}
from
'@/utils/dictionary'
import
{
useMapStore
}
from
'@/stores/map'
import
{
useMapStore
}
from
'@/stores/map'
import
{
useUserStore
}
from
'@/stores/user'
const
userStore
=
useUserStore
()
const
ViewDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/ViewDialog.vue'
))
const
ViewDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/ViewDialog.vue'
))
...
@@ -149,14 +152,19 @@ async function handleChangeStatus(row: MaterialProp) {
...
@@ -149,14 +152,19 @@ async function handleChangeStatus(row: MaterialProp) {
<AppCard>
<AppCard>
<AppList
border
v-bind=
"listOptions"
ref=
"appList"
>
<AppList
border
v-bind=
"listOptions"
ref=
"appList"
>
<template
#
header-buttons
>
<template
#
header-buttons
>
<el-space>
<el-space
v-if=
"!userStore.status.material_status"
>
<router-link
:to=
"
{ path: '/material/create', query: $route.query }">
<router-link
:to=
"
{ path: '/material/create', query: $route.query }">
<el-button
type=
"primary"
:icon=
"Plus"
>
营销内容创作
</el-button>
<el-button
type=
"primary"
:icon=
"Plus"
>
营销内容创作
</el-button>
</router-link>
</router-link>
</el-space>
</el-space>
</
template
>
</
template
>
<
template
#
table-status=
"{ row }"
>
<
template
#
table-status=
"{ row }"
>
<el-switch
v-model=
"row.status"
active-value=
"1"
inactive-value=
"0"
:before-change=
"() => handleChangeStatus(row)"
></el-switch>
<el-switch
v-model=
"row.status"
active-value=
"1"
inactive-value=
"0"
:before-change=
"() => handleChangeStatus(row)"
></el-switch>
</
template
>
</
template
>
<
template
#
table-x=
"{ row }"
>
<
template
#
table-x=
"{ row }"
>
<el-button
type=
"primary"
plain
@
click=
"handleView(row)"
>
查看
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleView(row)"
>
查看
</el-button>
...
...
src/modules/metadata/event/views/Index.vue
浏览文件 @
c54ce2e7
...
@@ -4,6 +4,9 @@ import { Plus } from '@element-plus/icons-vue'
...
@@ -4,6 +4,9 @@ import { Plus } from '@element-plus/icons-vue'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
AppList
from
'@/components/base/AppList.vue'
import
AppList
from
'@/components/base/AppList.vue'
import
{
getMetaEvent
,
getConnectionsList
,
deleteMetaEvent
}
from
'../api'
import
{
getMetaEvent
,
getConnectionsList
,
deleteMetaEvent
}
from
'../api'
import
{
useUserStore
}
from
'@/stores/user'
const
userStore
=
useUserStore
()
const
FormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/FormDialog.vue'
))
const
FormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/FormDialog.vue'
))
const
ViewDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/ViewDialog.vue'
))
const
ViewDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/ViewDialog.vue'
))
...
@@ -55,7 +58,9 @@ const listOptions = computed(() => {
...
@@ -55,7 +58,9 @@ const listOptions = computed(() => {
label
:
'状态'
,
label
:
'状态'
,
prop
:
'status_name'
,
prop
:
'status_name'
,
computed
:
(
row
:
any
)
=>
{
computed
:
(
row
:
any
)
=>
{
return
row
.
row
.
status
===
'0'
?
`<span style="color: rgb(170, 2, 49)">
${
row
.
row
.
status_name
}
</span>`
:
`<span style="color: #00ac27">
${
row
.
row
.
status_name
}
</span>`
return
row
.
row
.
status
===
'0'
?
`<span style="color: rgb(170, 2, 49)">
${
row
.
row
.
status_name
}
</span>`
:
`<span style="color: #00ac27">
${
row
.
row
.
status_name
}
</span>`
}
}
},
},
{
label
:
'更新人'
,
prop
:
'updated_operator_name'
},
{
label
:
'更新人'
,
prop
:
'updated_operator_name'
},
...
@@ -114,7 +119,7 @@ const handleField = function (row: EventProp) {
...
@@ -114,7 +119,7 @@ const handleField = function (row: EventProp) {
<AppCard>
<AppCard>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<template
#
header-buttons
>
<template
#
header-buttons
>
<el-space>
<el-space
v-if=
"!userStore.status.tag_status"
>
<el-button
type=
"primary"
:icon=
"Plus"
@
click=
"handleAdd"
>
新建
</el-button>
<el-button
type=
"primary"
:icon=
"Plus"
@
click=
"handleAdd"
>
新建
</el-button>
</el-space>
</el-space>
</
template
>
</
template
>
...
@@ -127,7 +132,13 @@ const handleField = function (row: EventProp) {
...
@@ -127,7 +132,13 @@ const handleField = function (row: EventProp) {
</AppList>
</AppList>
</AppCard>
</AppCard>
<!-- 新建/修改 -->
<!-- 新建/修改 -->
<FormDialog
v-model=
"formVisible"
:data=
"currentRow"
@
update=
"handleRefresh"
:option=
"experimentConnectionOptions || []"
v-if=
"formVisible"
/>
<FormDialog
v-model=
"formVisible"
:data=
"currentRow"
@
update=
"handleRefresh"
:option=
"experimentConnectionOptions || []"
v-if=
"formVisible"
/>
<!-- 查看 -->
<!-- 查看 -->
<ViewDialog
v-model=
"viewVisible"
:data=
"currentRow"
v-if=
"viewVisible && currentRow"
/>
<ViewDialog
v-model=
"viewVisible"
:data=
"currentRow"
v-if=
"viewVisible && currentRow"
/>
<FieldDialog
v-model=
"fieldVisible"
:data=
"currentRow"
v-if=
"fieldVisible && currentRow"
></FieldDialog>
<FieldDialog
v-model=
"fieldVisible"
:data=
"currentRow"
v-if=
"fieldVisible && currentRow"
></FieldDialog>
...
...
src/modules/metadata/user/views/Index.vue
浏览文件 @
c54ce2e7
...
@@ -5,6 +5,9 @@ import { ElMessageBox, ElMessage } from 'element-plus'
...
@@ -5,6 +5,9 @@ import { ElMessageBox, ElMessage } from 'element-plus'
import
AppList
from
'@/components/base/AppList.vue'
import
AppList
from
'@/components/base/AppList.vue'
import
{
getMemberMeta
,
deleteMemberMeta
}
from
'../api'
import
{
getMemberMeta
,
deleteMemberMeta
}
from
'../api'
import
{
useMapStore
}
from
'@/stores/map'
import
{
useMapStore
}
from
'@/stores/map'
import
{
useUserStore
}
from
'@/stores/user'
const
userStore
=
useUserStore
()
const
store
=
useMapStore
()
const
store
=
useMapStore
()
...
@@ -48,7 +51,9 @@ const listOptions = computed(() => {
...
@@ -48,7 +51,9 @@ const listOptions = computed(() => {
label
:
'状态'
,
label
:
'状态'
,
prop
:
'status_name'
,
prop
:
'status_name'
,
computed
:
(
row
:
any
)
=>
{
computed
:
(
row
:
any
)
=>
{
return
row
.
row
.
status
===
'0'
?
`<span style="color: rgb(170, 2, 49)">
${
row
.
row
.
status_name
}
</span>`
:
`<span style="color: #00ac27">
${
row
.
row
.
status_name
}
</span>`
return
row
.
row
.
status
===
'0'
?
`<span style="color: rgb(170, 2, 49)">
${
row
.
row
.
status_name
}
</span>`
:
`<span style="color: #00ac27">
${
row
.
row
.
status_name
}
</span>`
}
}
},
},
{
label
:
'更新人'
,
prop
:
'updated_operator_name'
},
{
label
:
'更新人'
,
prop
:
'updated_operator_name'
},
...
@@ -100,7 +105,7 @@ function handleRemove(row: UserProp) {
...
@@ -100,7 +105,7 @@ function handleRemove(row: UserProp) {
<AppCard>
<AppCard>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<template
#
header-buttons
>
<template
#
header-buttons
>
<el-space>
<el-space
v-if=
"!userStore.status.status"
>
<el-button
type=
"primary"
:icon=
"Plus"
@
click=
"handleAdd"
>
新建
</el-button>
<el-button
type=
"primary"
:icon=
"Plus"
@
click=
"handleAdd"
>
新建
</el-button>
</el-space>
</el-space>
</
template
>
</
template
>
...
...
src/stores/user.ts
浏览文件 @
c54ce2e7
...
@@ -15,7 +15,7 @@ interface State {
...
@@ -15,7 +15,7 @@ interface State {
organization
:
OrganizationType
|
null
organization
:
OrganizationType
|
null
roles
:
RoleType
[]
roles
:
RoleType
[]
permissions
:
PermissionType
[]
permissions
:
PermissionType
[]
status
:
boolean
status
:
any
}
}
export
const
useUserStore
=
defineStore
({
export
const
useUserStore
=
defineStore
({
...
@@ -27,7 +27,7 @@ export const useUserStore = defineStore({
...
@@ -27,7 +27,7 @@ export const useUserStore = defineStore({
project
:
null
,
project
:
null
,
roles
:
[],
roles
:
[],
permissions
:
[],
permissions
:
[],
status
:
false
status
:
{}
}),
}),
getters
:
{
getters
:
{
isLogin
:
state
=>
!!
state
.
user
isLogin
:
state
=>
!!
state
.
user
...
@@ -45,7 +45,7 @@ export const useUserStore = defineStore({
...
@@ -45,7 +45,7 @@ export const useUserStore = defineStore({
this
.
permissions
=
permissions
this
.
permissions
=
permissions
await
useMapStore
().
getMapList
()
await
useMapStore
().
getMapList
()
await
checkDataStatus
().
then
(
res
=>
{
await
checkDataStatus
().
then
(
res
=>
{
this
.
status
=
res
.
data
.
status
this
.
status
=
res
.
data
})
})
},
},
async
logout
()
{
async
logout
()
{
...
...
src/utils/permission.ts
浏览文件 @
c54ce2e7
...
@@ -5,7 +5,7 @@ import type { DirectiveBinding } from 'vue'
...
@@ -5,7 +5,7 @@ import type { DirectiveBinding } from 'vue'
export
function
checkPermission
(
value
:
string
|
string
[]):
boolean
{
export
function
checkPermission
(
value
:
string
|
string
[]):
boolean
{
const
userStore
=
useUserStore
()
const
userStore
=
useUserStore
()
// true 是学员且使用公共数据(学员不能自己创建数据) false 学员可以自己创建数据
// true 是学员且使用公共数据(学员不能自己创建数据) false 学员可以自己创建数据
if
(
!
userStore
.
status
)
return
true
//
if (!userStore.status) return true
const
permissions
=
userStore
.
permissions
const
permissions
=
userStore
.
permissions
if
(
Array
.
isArray
(
value
))
{
if
(
Array
.
isArray
(
value
))
{
return
permissions
.
some
(
item
=>
value
.
includes
(
item
.
tag
))
return
permissions
.
some
(
item
=>
value
.
includes
(
item
.
tag
))
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论