Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
bigDataSystem
Commits
cb0d63df
Commit
cb0d63df
authored
Dec 06, 2024
by
LiXuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
dad997a7
8887da59
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
236 additions
and
221 deletions
+236
-221
AddUserModal.vue
...aSharingAndExchange/catalogingManagement/AddUserModal.vue
+77
-71
index.vue
...ews/dataSharingAndExchange/catalogingManagement/index.vue
+63
-56
applyForPushNotificationsModal.vue
.../dataSet/commonDataSet/applyForPushNotificationsModal.vue
+57
-56
index.vue
...s/mallResourceDevelopment/dataSet/commonDataSet/index.vue
+14
-5
mock.ts
...ews/mallResourceDevelopment/dataSet/commonDataSet/mock.ts
+25
-33
No files found.
src/views/dataSharingAndExchange/catalogingManagement/AddUserModal.vue
View file @
cb0d63df
<
template
>
<
template
>
<BasicModal
width=
"50%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicModal
width=
"50%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicTable
@
register=
"registerTable"
></BasicTable>
<BasicTable
@
register=
"registerTable"
></BasicTable>
</BasicModal>
</BasicModal>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
reactive
,
unref
,
onDeactivated
,
onMounted
,
ref
}
from
'vue'
;
import
{
reactive
,
unref
,
onDeactivated
,
onMounted
,
ref
}
from
'vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
addUserData
,
columns
,
searchFormSchema
,
TreeData
}
from
'./institutionData'
;
import
{
addUserData
,
columns
,
searchFormSchema
,
TreeData
}
from
'./institutionData'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
downloadByData
}
from
'@/utils/file/download'
;
import
{
downloadByData
}
from
'@/utils/file/download'
;
import
{
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
import
{
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
useUserStore
}
from
"@/store/modules/user"
;
import
{
useUserStore
}
from
'@/store/modules/user'
;
import
{
userData
}
from
"@/views/dataSharingAndExchange/catalogingManagement/institutionData"
;
import
{
userData
}
from
'@/views/dataSharingAndExchange/catalogingManagement/institutionData'
;
defineOptions
({
name
:
'AccountManagement'
});
defineOptions
({
name
:
'AccountManagement'
});
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
filterStore
=
useFilterStore
();
const
filterStore
=
useFilterStore
();
const
route
=
useRoute
();
const
route
=
useRoute
();
const
go
=
useGo
();
const
go
=
useGo
();
const
[
registerMoveUser
,
{
openModal
:
openMoveUserModal
}]
=
useModal
();
const
[
registerMoveUser
,
{
openModal
:
openMoveUserModal
}]
=
useModal
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
searchInfo
=
reactive
<
Recordable
>
({});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
tableData
=
ref
([])
const
tableData
=
ref
([]);
const
isAdd
=
ref
(
true
)
const
isAdd
=
ref
(
true
);
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
},
]
=
useTable
({
title
:
'添加编目'
,
title
:
'添加编目'
,
api
:
async
(
params
)
=>
{
api
:
async
(
params
)
=>
{
const
response
=
{
const
response
=
{
pageNu
:
"1"
,
pageNu
:
'1'
,
pageSize
:
"10"
,
pageSize
:
'10'
,
pages
:
"1"
,
pages
:
'1'
,
total
:
tableData
.
value
.
length
,
total
:
tableData
.
value
.
length
,
code
:
''
,
code
:
''
,
message
:
''
,
message
:
''
,
data
:
[],
data
:
[],
};
};
var
data
=
[]
var
data
=
[];
data
=
tableData
.
value
data
=
tableData
.
value
;
if
(
params
.
name
!=
undefined
&&
params
.
name
!=
''
&&
params
.
name
!=
null
)
{
if
(
params
.
name
!=
undefined
&&
params
.
name
!=
''
&&
params
.
name
!=
null
)
{
//过滤出名字包含params.name的数据
//过滤出名字包含params.name的数据
data
=
data
.
filter
((
item
)
=>
item
.
name
.
includes
(
params
.
name
));
data
=
data
.
filter
((
item
)
=>
item
.
name
.
includes
(
params
.
name
));
}
}
if
(
params
.
username
!=
undefined
&&
params
.
username
!=
''
&&
params
.
username
!=
null
)
{
if
(
params
.
username
!=
undefined
&&
params
.
username
!=
''
&&
params
.
username
!=
null
)
{
data
=
data
.
filter
((
item
)
=>
item
.
username
.
includes
(
params
.
username
));
data
=
data
.
filter
((
item
)
=>
item
.
username
.
includes
(
params
.
username
));
}
}
return
{
...
response
,
data
:
data
};
return
{
...
response
,
data
:
data
};
...
@@ -65,7 +74,7 @@ const [registerTable, { reload, updateTableDataRecord, getSearchInfo,getForm,get
...
@@ -65,7 +74,7 @@ const [registerTable, { reload, updateTableDataRecord, getSearchInfo,getForm,get
handleSearchInfoFn
(
info
)
{
handleSearchInfoFn
(
info
)
{
return
info
;
return
info
;
},
},
});
});
//初始化弹框
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
...
@@ -73,23 +82,20 @@ const [registerTable, { reload, updateTableDataRecord, getSearchInfo,getForm,get
...
@@ -73,23 +82,20 @@ const [registerTable, { reload, updateTableDataRecord, getSearchInfo,getForm,get
isAdd
.
value
=
!!
data
?.
isAdd
;
isAdd
.
value
=
!!
data
?.
isAdd
;
});
});
/** 新增成功*/
/** 新增成功*/
function
handleSubmit
()
{
function
handleSubmit
()
{
const
rowSelection
=
getRowSelection
().
selectedRowKeys
;
const
rowSelection
=
getRowSelection
().
selectedRowKeys
;
if
(
rowSelection
.
length
>
0
)
{
if
(
rowSelection
.
length
>
0
)
{
//已选中
//已选中
//根据选中的查询用户 然后进行添加
//根据选中的查询用户 然后进行添加
let
data
=
[]
let
data
=
[];
data
=
tableData
.
value
.
filter
((
item
)
=>
rowSelection
.
includes
(
item
.
businessId
));
data
=
tableData
.
value
.
filter
((
item
)
=>
rowSelection
.
includes
(
item
.
businessId
));
emit
(
'success'
,
{
isAdd
:
unref
(
isAdd
),
values
:
{
...
data
},
length
:
rowSelection
.
length
});
emit
(
'success'
,
{
isAdd
:
unref
(
isAdd
),
values
:
{
...
data
},
length
:
rowSelection
.
length
});
closeModal
();
closeModal
();
}
}
}
}
onMounted
(()
=>
{
tableData
.
value
=
addUserData
onMounted
(()
=>
{
});
tableData
.
value
=
addUserData
;
});
</
script
>
</
script
>
src/views/dataSharingAndExchange/catalogingManagement/index.vue
View file @
cb0d63df
...
@@ -45,9 +45,9 @@
...
@@ -45,9 +45,9 @@
</PageWrapper>
</PageWrapper>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
reactive
,
unref
,
onDeactivated
,
onMounted
,
ref
}
from
'vue'
;
import
{
reactive
,
unref
,
onDeactivated
,
onMounted
,
ref
}
from
'vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
getAccountList
,
deleteUser
,
exportUserList
}
from
'@/api/system/user/user'
;
import
{
getAccountList
,
deleteUser
,
exportUserList
}
from
'@/api/system/user/user'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
DeptTree
from
'./DeptTree.vue'
;
import
DeptTree
from
'./DeptTree.vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
...
@@ -58,14 +58,14 @@
...
@@ -58,14 +58,14 @@
import
{
columns
,
searchFormSchema
}
from
'./institution.data'
;
import
{
columns
,
searchFormSchema
}
from
'./institution.data'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
downloadByData
}
from
'@/utils/file/download'
;
import
{
downloadByData
}
from
'@/utils/file/download'
;
import
{
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
import
{
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
useUserStore
}
from
"@/store/modules/user"
;
import
{
useUserStore
}
from
'@/store/modules/user'
;
import
{
getMenuListByPage
}
from
"@/api/system/menu/menu"
;
import
{
getMenuListByPage
}
from
'@/api/system/menu/menu'
;
import
{
userData
}
from
"@/views/dataSharingAndExchange/catalogingManagement/institutionData"
;
import
{
userData
}
from
'@/views/dataSharingAndExchange/catalogingManagement/institutionData'
;
import
AddUserModal
from
'./AddUserModal.vue'
;
import
AddUserModal
from
'./AddUserModal.vue'
;
import
user
from
"../../../../mock/sys/user"
;
import
user
from
'../../../../mock/sys/user'
;
import
{
forEach
}
from
"lodash-es"
;
import
{
forEach
}
from
'lodash-es'
;
defineOptions
({
name
:
'AccountManagement'
});
defineOptions
({
name
:
'AccountManagement'
});
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
{
createMessage
,
createConfirm
}
=
useMessage
();
...
@@ -73,36 +73,39 @@
...
@@ -73,36 +73,39 @@
const
route
=
useRoute
();
const
route
=
useRoute
();
const
go
=
useGo
();
const
go
=
useGo
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerAddUserModal
,
{
openModal
:
addUserModal
}]
=
useModal
();
const
[
registerAddUserModal
,
{
openModal
:
addUserModal
}]
=
useModal
();
const
[
registerMoveUser
,
{
openModal
:
openMoveUserModal
}]
=
useModal
();
const
[
registerMoveUser
,
{
openModal
:
openMoveUserModal
}]
=
useModal
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
searchInfo
=
reactive
<
Recordable
>
({});
const
tableData
=
ref
([])
const
tableData
=
ref
([]);
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
},
]
=
useTable
({
title
:
'编目管理列表'
,
title
:
'编目管理列表'
,
api
:
async
(
params
)
=>
{
api
:
async
(
params
)
=>
{
console
.
log
(
params
)
console
.
log
(
params
)
;
const
response
=
{
const
response
=
{
pageNu
:
"1"
,
pageNu
:
'1'
,
pageSize
:
"10"
,
pageSize
:
'10'
,
pages
:
"1"
,
pages
:
'1'
,
total
:
tableData
.
value
.
length
,
total
:
tableData
.
value
.
length
,
code
:
''
,
code
:
''
,
message
:
''
,
message
:
''
,
data
:
[],
data
:
[],
};
};
//过滤data中的数据,取出等于params.deptId的数据
//过滤data中的数据,取出等于params.deptId的数据
var
data
=
[]
var
data
=
[]
;
//按照部门筛选 如果有进行过滤相应部门的 没有就赋值全部
//按照部门筛选 如果有进行过滤相应部门的 没有就赋值全部
if
(
params
.
institutionId
!=
undefined
&&
params
.
institutionId
!=
''
){
if
(
params
.
institutionId
!=
undefined
&&
params
.
institutionId
!=
''
)
{
data
=
tableData
.
value
.
filter
((
item
)
=>
item
.
institutionId
===
params
.
institutionId
);
data
=
tableData
.
value
.
filter
((
item
)
=>
item
.
institutionId
===
params
.
institutionId
);
}
else
{
}
else
{
data
=
tableData
.
value
data
=
tableData
.
value
;
}
}
if
(
params
.
name
!=
undefined
&&
params
.
name
!=
''
&&
params
.
name
!=
null
){
if
(
params
.
name
!=
undefined
&&
params
.
name
!=
''
&&
params
.
name
!=
null
)
{
//过滤出名字包含params.name的数据
//过滤出名字包含params.name的数据
data
=
data
.
filter
((
item
)
=>
item
.
name
.
includes
(
params
.
name
));
data
=
data
.
filter
((
item
)
=>
item
.
name
.
includes
(
params
.
name
));
}
}
if
(
params
.
username
!=
undefined
&&
params
.
username
!=
''
&&
params
.
username
!=
null
){
if
(
params
.
username
!=
undefined
&&
params
.
username
!=
''
&&
params
.
username
!=
null
)
{
data
=
data
.
filter
((
item
)
=>
item
.
username
.
includes
(
params
.
username
));
data
=
data
.
filter
((
item
)
=>
item
.
username
.
includes
(
params
.
username
));
}
}
return
{
...
response
,
data
:
data
};
return
{
...
response
,
data
:
data
};
...
@@ -115,7 +118,7 @@
...
@@ -115,7 +118,7 @@
schemas
:
searchFormSchema
,
schemas
:
searchFormSchema
,
autoSubmitOnEnter
:
true
,
autoSubmitOnEnter
:
true
,
resetFunc
:
()
=>
{
resetFunc
:
()
=>
{
searchInfo
.
institutionId
=
''
searchInfo
.
institutionId
=
''
;
},
},
},
},
useSearchForm
:
true
,
useSearchForm
:
true
,
...
@@ -137,14 +140,14 @@
...
@@ -137,14 +140,14 @@
isAdd
:
true
,
isAdd
:
true
,
});
});
}
}
function
updateData
()
{
function
updateData
()
{
console
.
log
()
console
.
log
();
}
}
/**批量移动*/
/**批量移动*/
function
handleMoveBatch
()
{
function
handleMoveBatch
()
{
const
rowSelection
=
getRowSelection
().
selectedRowKeys
;
const
rowSelection
=
getRowSelection
().
selectedRowKeys
;
openMoveUserModal
(
true
,
{
openMoveUserModal
(
true
,
{
idList
:
rowSelection
,
idList
:
rowSelection
,
isMove
:
true
,
isMove
:
true
,
});
});
}
}
...
@@ -164,7 +167,7 @@
...
@@ -164,7 +167,7 @@
isAdd
:
true
,
isAdd
:
true
,
});
});
}
}
/** 编辑按钮*/
/** 编辑按钮*/
function
handleEdit
(
record
:
Recordable
)
{
function
handleEdit
(
record
:
Recordable
)
{
openModal
(
true
,
{
openModal
(
true
,
{
record
,
record
,
...
@@ -180,8 +183,11 @@
...
@@ -180,8 +183,11 @@
content
:
'确认批量删除选中数据吗?'
,
content
:
'确认批量删除选中数据吗?'
,
onOk
()
{
onOk
()
{
const
rowSelection
=
getRowSelection
().
selectedRowKeys
;
const
rowSelection
=
getRowSelection
().
selectedRowKeys
;
for
(
let
i
=
0
;
i
<
rowSelection
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
rowSelection
.
length
;
i
++
)
{
tableData
.
value
.
splice
(
tableData
.
value
.
findIndex
(
item
=>
item
.
businessId
===
rowSelection
[
i
]),
1
);
tableData
.
value
.
splice
(
tableData
.
value
.
findIndex
((
item
)
=>
item
.
businessId
===
rowSelection
[
i
]),
1
,
);
}
}
createMessage
.
success
(
'删除成功!'
);
createMessage
.
success
(
'删除成功!'
);
reload
();
reload
();
...
@@ -191,14 +197,17 @@
...
@@ -191,14 +197,17 @@
/** 删除按钮*/
/** 删除按钮*/
function
handleDelete
(
record
:
Recordable
)
{
function
handleDelete
(
record
:
Recordable
)
{
tableData
.
value
.
splice
(
tableData
.
value
.
findIndex
(
item
=>
item
.
businessId
===
record
.
businessId
),
1
);
tableData
.
value
.
splice
(
tableData
.
value
.
findIndex
((
item
)
=>
item
.
businessId
===
record
.
businessId
),
1
,
);
createMessage
.
success
(
'删除成功!'
);
createMessage
.
success
(
'删除成功!'
);
reload
();
reload
();
}
}
/** 导出按钮*/
/** 导出按钮*/
async
function
handleExport
()
{
async
function
handleExport
()
{
const
params
=
Object
.
assign
({},
getSearchInfo
(),
getForm
().
getFieldsValue
());
const
params
=
Object
.
assign
({},
getSearchInfo
(),
getForm
().
getFieldsValue
());
const
data
=
await
exportUserList
(
params
);
const
data
=
await
exportUserList
(
params
);
downloadByData
(
data
,
'用户列表'
+
'.xlsx'
);
downloadByData
(
data
,
'用户列表'
+
'.xlsx'
);
}
}
...
@@ -216,7 +225,7 @@
...
@@ -216,7 +225,7 @@
const
result
=
updateTableDataRecord
(
values
.
businessId
,
values
);
const
result
=
updateTableDataRecord
(
values
.
businessId
,
values
);
reload
();
reload
();
}
else
{
}
else
{
tableData
.
value
.
push
(
values
)
tableData
.
value
.
push
(
values
)
;
reload
();
reload
();
}
}
}
}
...
@@ -224,12 +233,12 @@
...
@@ -224,12 +233,12 @@
/** 移动*/
/** 移动*/
function
handleMoveSuccess
({
isMove
,
values
})
{
function
handleMoveSuccess
({
isMove
,
values
})
{
const
rowSelection
=
getRowSelection
().
selectedRowKeys
;
const
rowSelection
=
getRowSelection
().
selectedRowKeys
;
if
(
rowSelection
.
length
>
0
){
if
(
rowSelection
.
length
>
0
)
{
//批量移动
//批量移动
for
(
let
i
=
0
;
i
<
rowSelection
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
rowSelection
.
length
;
i
++
)
{
const
result
=
updateTableDataRecord
(
values
[
i
].
institutionId
,
values
[
i
]);
const
result
=
updateTableDataRecord
(
values
[
i
].
institutionId
,
values
[
i
]);
}
}
}
else
{
}
else
{
//单个移动
//单个移动
const
result
=
updateTableDataRecord
(
values
.
businessId
,
values
);
const
result
=
updateTableDataRecord
(
values
.
businessId
,
values
);
}
}
...
@@ -237,11 +246,11 @@
...
@@ -237,11 +246,11 @@
}
}
/** 添加用户*/
/** 添加用户*/
function
handleAddSuccess
({
isAdd
,
values
,
length
})
{
function
handleAddSuccess
({
isAdd
,
values
,
length
})
{
if
(
length
>
0
){
if
(
length
>
0
)
{
//批量添加
//批量添加
for
(
let
i
=
0
;
i
<
length
;
i
++
){
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
tableData
.
value
.
push
(
values
[
i
])
tableData
.
value
.
push
(
values
[
i
])
;
}
}
}
}
reload
();
reload
();
...
@@ -258,31 +267,29 @@
...
@@ -258,31 +267,29 @@
}
}
onMounted
(()
=>
{
onMounted
(()
=>
{
tableData
.
value
=
userData
tableData
.
value
=
userData
;
const
path
=
route
.
path
const
path
=
route
.
path
;
if
(
filterStore
.
getSearchParams
[
path
])
{
if
(
filterStore
.
getSearchParams
[
path
])
{
if
(
JSON
.
parse
(
filterStore
.
getSearchParams
[
path
]
!==
{}))
{
if
(
JSON
.
parse
(
filterStore
.
getSearchParams
[
path
]
!==
{}))
{
const
params
=
JSON
.
parse
(
filterStore
.
getSearchParams
[
path
])
const
params
=
JSON
.
parse
(
filterStore
.
getSearchParams
[
path
])
;
getForm
().
setFieldsValue
({
getForm
().
setFieldsValue
({
page
:
params
.
page
,
page
:
params
.
page
,
pageSize
:
params
.
pageSize
,
pageSize
:
params
.
pageSize
,
username
:
params
.
username
,
username
:
params
.
username
,
flag
:
params
.
flag
,
flag
:
params
.
flag
,
})
})
;
searchInfo
.
institutionId
=
params
.
institutionId
searchInfo
.
institutionId
=
params
.
institutionId
;
}
}
}
}
});
});
onBeforeRouteLeave
((
to
,
from
,
next
)
=>
{
onBeforeRouteLeave
((
to
,
from
,
next
)
=>
{
const
params
=
Object
.
assign
({},
getSearchInfo
(),
getForm
().
getFieldsValue
());
const
params
=
Object
.
assign
({},
getSearchInfo
(),
getForm
().
getFieldsValue
());
filterStore
.
setSearchParams
(
filterStore
.
setSearchParams
({
{
path
:
from
.
path
,
path
:
from
.
path
,
param
:
{
param
:
{
...
params
...
params
,
}
},
}
});
)
next
();
// 允许导航
next
();
// 允许导航
});
});
</
script
>
</
script
>
src/views/mallResourceDevelopment/dataSet/commonDataSet/applyForPushNotificationsModal.vue
View file @
cb0d63df
<
template
>
<
template
>
<div
style=
"background: white; padding: 20px"
>
<BasicModal
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
style=
"padding: 20px"
>
:canFullscreen=
"false"
<PageWrapper
width=
"50%"
dense
v-bind=
"$attrs"
contentFullHeight
@
register=
"registerModal"
fixedHeight
:showCancelBtn=
"false"
contentClass=
"flex flex-col"
:showOkBtn=
"false"
class=
"toolbar"
:title=
"title"
style=
"width: 910px"
>
>
<template
#
closeIcon
>
<span></span>
</
template
>
<
template
#
title
>
<div
class=
"toolbar"
>
<div
class=
"toolbar"
>
<div
style=
"display: flex; align-items: center; justify-content: space-between; width: 100%;"
>
<div
<h1
style=
"margin-top: 15px"
>
{{
title
}}
</h1>
style=
"display: flex; align-items: center; justify-content: space-between; width: 100%"
<div
style=
"display: flex; gap: 15px;"
>
<a-button
type=
"primary"
@
click=
"goBack"
>
取消
</a-button>
<a-button
type=
"primary"
>
申请检测
</a-button>
<a-button
type=
"primary"
@
click=
"submitForm"
>
>
提交申请
<h3
style=
"margin-top: 15px"
>
{{
title
}}
</h3>
</a-button>
<div
style=
"display: flex; gap: 15px"
>
<a-button
type=
"primary"
@
click=
"closeModal"
>
取消
</a-button>
<a-button
type=
"primary"
>
申请检测
</a-button>
<a-button
type=
"primary"
@
click=
"submitForm"
>
提交申请
</a-button>
</div>
</div>
</div>
</div>
</div>
</div>
<hr
style=
"border: 1px solid #dee3f0; width: 100%; margin: 20px auto"
/
>
</
template
>
<p
style=
"margin: 35px; color: #1b8bf8; font-weight: bold"
>
申请信息
</p>
<p
style=
"color: #1b8bf8; font-weight: bold"
>
申请信息
</p>
<BasicForm
size=
"middle"
:bordered=
"false"
:column=
"2"
@
register=
"registerGuideModeForm"
/>
<BasicForm
<p
style=
"margin: 35px; color: #1b8bf8; font-weight: bold"
>
推送配置
</p>
class=
"bf1"
size=
"middle"
:bordered=
"false"
:column=
"2"
@
register=
"registerGuideModeForm"
/>
<p
style=
"color: #1b8bf8; font-weight: bold"
>
推送配置
</p>
<BasicForm
<BasicForm
class=
"bf2"
size=
"middle"
size=
"middle"
:bordered=
"false"
:bordered=
"false"
:column=
"2"
:column=
"2"
@
register=
"pushConfigurationModeForm"
@
register=
"pushConfigurationModeForm"
/>
/>
</PageWrapper>
</BasicModal>
</PageWrapper>
</div>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
PageWrapper
}
from
'@/components/Page
'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal
'
;
import
{
personSchema
,
pushConfiguration
}
from
'./mock'
;
import
{
personSchema
,
pushConfiguration
}
from
'./mock'
;
import
{
ref
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
useMessage
}
from
"@/hooks/web/useMessage"
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
setModalProps
({
confirmLoading
:
false
});
});
const
title
=
ref
(
'申请推送<wyx_contact>等1个资源'
);
const
title
=
ref
(
'申请推送<wyx_contact>等1个资源'
);
const
[
registerGuideModeForm
,
{
validate
,
getFieldsValue
:
getFieldsValueValiate
,
}]
=
useForm
({
const
[
registerGuideModeForm
,
{
validate
,
getFieldsValue
:
getFieldsValueValiate
}]
=
useForm
({
labelWidth
:
100
,
labelWidth
:
100
,
labelAlign
:
'right'
,
schemas
:
personSchema
,
schemas
:
personSchema
,
showActionButtonGroup
:
false
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
actionColOptions
:
{
...
@@ -59,9 +68,12 @@
...
@@ -59,9 +68,12 @@
},
},
});
});
const
[
const
[
pushConfigurationModeForm
,{
validate
:
validatePushConfig
,
getFieldsValue
:
getFieldsValueValiateL
,}]
=
useForm
({
pushConfigurationModeForm
,
{
validate
:
validatePushConfig
,
getFieldsValue
:
getFieldsValueValiateL
},
]
=
useForm
({
labelWidth
:
100
,
labelWidth
:
100
,
labelAlign
:
'right'
,
schemas
:
pushConfiguration
,
schemas
:
pushConfiguration
,
showActionButtonGroup
:
false
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
actionColOptions
:
{
...
@@ -69,29 +81,18 @@
...
@@ -69,29 +81,18 @@
},
},
});
});
// 提交表单的方法
// 提交表单的方法
const
submitForm
=
()
=>
{
const
submitForm
=
()
=>
{
validate
()
validate
()
;
validatePushConfig
()
validatePushConfig
()
.
then
(()
=>
{
.
then
(()
=>
{
console
.
log
(
getFieldsValueValiate
(),
getFieldsValueValiateL
());
console
.
log
(
getFieldsValueValiate
(),
getFieldsValueValiateL
());
createMessage
.
success
(
`表单已提交`
);
createMessage
.
success
(
`表单已提交`
);
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
createMessage
.
error
(
`请输入必填项`
);
createMessage
.
error
(
`请输入必填项`
);
});
});
};
};
const
goBack
=
()
=>
{
window
.
history
.
back
();
};
</
script
>
</
script
>
<
style
scoped
></
style
>
<
style
lang=
"less"
scoped
></
style
>
src/views/mallResourceDevelopment/dataSet/commonDataSet/index.vue
View file @
cb0d63df
...
@@ -146,6 +146,7 @@
...
@@ -146,6 +146,7 @@
show-quick-jumper
show-quick-jumper
/>
/>
</PageWrapper>
</PageWrapper>
<ApplyForPushNotificationsModal
@
register=
"registerApplyForPushNotificationsModal"
/>
</div>
</div>
</template>
</template>
...
@@ -173,6 +174,8 @@
...
@@ -173,6 +174,8 @@
import
GroupTree
from
'./GroupTree.vue'
;
import
GroupTree
from
'./GroupTree.vue'
;
import
{
Columns
}
from
'@/views/mallResourceDevelopment/dataSet/commonDataSet/commonDataSet.data'
;
import
{
Columns
}
from
'@/views/mallResourceDevelopment/dataSet/commonDataSet/commonDataSet.data'
;
import
{
router
}
from
'@/router'
;
import
{
router
}
from
'@/router'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
ApplyForPushNotificationsModal
from
'@/views/mallResourceDevelopment/dataSet/commonDataSet/applyForPushNotificationsModal.vue'
;
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
route
=
useRouter
();
const
route
=
useRouter
();
...
@@ -200,6 +203,11 @@
...
@@ -200,6 +203,11 @@
},
},
]);
]);
const
[
registerApplyForPushNotificationsModal
,
{
openModal
:
openApplyForPushNotificationsModal
},
]
=
useModal
();
const
[
registerTable
,
{
reload
,
getRowSelection
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
getRowSelection
}]
=
useTable
({
api
:
async
()
=>
{
api
:
async
()
=>
{
let
filteredList
=
cardList
.
filter
((
item
)
=>
{
let
filteredList
=
cardList
.
filter
((
item
)
=>
{
...
@@ -215,7 +223,7 @@
...
@@ -215,7 +223,7 @@
workSpaceName
.
value
===
''
||
workSpaceName
.
value
===
''
||
workSpaceName
.
value
===
'公共数据集'
||
workSpaceName
.
value
===
'公共数据集'
||
item
.
parentWorkSpaceName
===
workSpaceName
.
value
;
item
.
parentWorkSpaceName
===
workSpaceName
.
value
;
return
titleMatch
&&
shareMatch
&&
workspaceMatch
;
return
titleMatch
.
value
&&
shareMatch
&&
workspaceMatch
;
});
});
if
(
sortOrder
.
value
===
'latest'
)
{
if
(
sortOrder
.
value
===
'latest'
)
{
filteredList
.
sort
(
filteredList
.
sort
(
...
@@ -327,10 +335,11 @@
...
@@ -327,10 +335,11 @@
/**批量推送推送*/
/**批量推送推送*/
function
pushNotifications
()
{
function
pushNotifications
()
{
router
.
push
({
openApplyForPushNotificationsModal
(
true
);
path
:
'/mallResourceDevelopment/dataSet/commonDataSet/applyForPushNotificationsModal'
,
// router.push({
query
:
{},
// path: '/mallResourceDevelopment/dataSet/commonDataSet/applyForPushNotificationsModal',
});
// query: {},
// });
}
}
function
onSearch
()
{
function
onSearch
()
{
...
...
src/views/mallResourceDevelopment/dataSet/commonDataSet/mock.ts
View file @
cb0d63df
import
{
FormSchema
}
from
"@/components/Form"
;
import
{
FormSchema
}
from
'@/components/Form'
;
export
const
tableList
:
any
[]
=
[
export
const
tableList
:
any
[]
=
[
{
{
...
@@ -400,7 +400,6 @@ export const cardList = [
...
@@ -400,7 +400,6 @@ export const cardList = [
},
},
];
];
export
const
columnInformationList
:
any
[]
=
[
export
const
columnInformationList
:
any
[]
=
[
{
{
businessId
:
1
,
businessId
:
1
,
...
@@ -492,56 +491,50 @@ export const columnInformationList: any[] = [
...
@@ -492,56 +491,50 @@ export const columnInformationList: any[] = [
},
},
];
];
export
const
treeDataList
=
[
export
const
treeDataList
=
[
{
{
name
:
'资源信息'
,
name
:
'资源信息'
,
selectedDeptId
:
21
,
selectedDeptId
:
21
,
children
:
[
children
:
[],
],
},
},
{
{
name
:
'列信息'
,
name
:
'列信息'
,
selectedDeptId
:
22
,
selectedDeptId
:
22
,
children
:
[
children
:
[],
],
},
},
{
{
name
:
'采样数据'
,
name
:
'采样数据'
,
selectedDeptId
:
23
,
selectedDeptId
:
23
,
children
:
[
children
:
[],
],
},
},
];
];
/** 推送*/
/** 推送*/
export
const
personSchema
:
FormSchema
[]
=
[
export
const
personSchema
:
FormSchema
[]
=
[
{
{
field
:
'titleApplication'
,
field
:
'titleApplication'
,
component
:
'Input'
,
component
:
'Input'
,
colProps
:
{
lg
:
1
1
,
md
:
11
},
colProps
:
{
lg
:
1
2
,
md
:
12
},
label
:
'申请标题'
,
label
:
'申请标题'
,
componentProps
:
{
placeholder
:
'请输入标题'
,
},
required
:
true
,
required
:
true
,
},
},
{
{
field
:
'reasonForApplication'
,
field
:
'reasonForApplication'
,
component
:
'Input'
,
component
:
'Input'
,
colProps
:
{
lg
:
1
1
,
md
:
11
},
colProps
:
{
lg
:
1
2
,
md
:
12
},
label
:
'申请理由'
,
label
:
'申请理由'
,
componentProps
:
{
placeholder
:
'请输入申请理由'
,
},
},
},
];
];
/** 推送*/
/** 推送*/
export
const
pushConfiguration
:
FormSchema
[]
=
[
export
const
pushConfiguration
:
FormSchema
[]
=
[
{
{
field
:
'whetherToAutomaticallyCreateATable'
,
field
:
'whetherToAutomaticallyCreateATable'
,
component
:
'Switch'
,
component
:
'Switch'
,
colProps
:
{
lg
:
22
,
md
:
22
},
colProps
:
{
lg
:
22
,
md
:
22
},
...
@@ -555,17 +548,17 @@ export const pushConfiguration: FormSchema[] = [
...
@@ -555,17 +548,17 @@ export const pushConfiguration: FormSchema[] = [
componentProps
:
{
componentProps
:
{
options
:
[
options
:
[
{
{
label
:
'18inceptor(商场工作区)'
,
label
:
'18in
ter
ceptor(商场工作区)'
,
value
:
'1'
value
:
'1'
,
},
},
{
{
label
:
'19inceptor(商场工作区)'
,
label
:
'19in
ter
ceptor(商场工作区)'
,
value
:
'2'
value
:
'2'
,
},
},
],
],
placeholder
:
'
18inceptor(商场工作区)
'
,
placeholder
:
'
请选择目标数据源
'
,
},
},
colProps
:
{
span
:
1
1
},
colProps
:
{
span
:
1
2
},
},
},
{
{
field
:
'database'
,
field
:
'database'
,
...
@@ -577,9 +570,9 @@ export const pushConfiguration: FormSchema[] = [
...
@@ -577,9 +570,9 @@ export const pushConfiguration: FormSchema[] = [
{
label
:
'dataset_push'
,
value
:
'1'
},
{
label
:
'dataset_push'
,
value
:
'1'
},
{
label
:
'dataset'
,
value
:
'2'
},
{
label
:
'dataset'
,
value
:
'2'
},
],
],
placeholder
:
'
dataset_push
'
,
placeholder
:
'
请选择数据库
'
,
},
},
colProps
:
{
span
:
1
1
},
colProps
:
{
span
:
1
2
},
},
},
{
{
field
:
'pushCycle'
,
field
:
'pushCycle'
,
...
@@ -598,9 +591,9 @@ export const pushConfiguration: FormSchema[] = [
...
@@ -598,9 +591,9 @@ export const pushConfiguration: FormSchema[] = [
{
label
:
'十二周期'
,
value
:
'8'
},
{
label
:
'十二周期'
,
value
:
'8'
},
{
label
:
'二十四周期'
,
value
:
'9'
},
{
label
:
'二十四周期'
,
value
:
'9'
},
],
],
placeholder
:
'周期'
,
placeholder
:
'
请选择
周期'
,
},
},
colProps
:
{
span
:
1
1
},
colProps
:
{
span
:
1
2
},
},
},
{
{
field
:
'HDFSDataSource'
,
field
:
'HDFSDataSource'
,
...
@@ -612,9 +605,9 @@ export const pushConfiguration: FormSchema[] = [
...
@@ -612,9 +605,9 @@ export const pushConfiguration: FormSchema[] = [
{
label
:
'hdfs'
,
value
:
'1'
},
{
label
:
'hdfs'
,
value
:
'1'
},
{
label
:
'hdfsE'
,
value
:
'2'
},
{
label
:
'hdfsE'
,
value
:
'2'
},
],
],
placeholder
:
'
hdfs
'
,
placeholder
:
'
请选择HDFS数据源
'
,
},
},
colProps
:
{
span
:
1
1
},
colProps
:
{
span
:
1
2
},
},
},
{
{
...
@@ -634,9 +627,8 @@ export const pushConfiguration: FormSchema[] = [
...
@@ -634,9 +627,8 @@ export const pushConfiguration: FormSchema[] = [
label
:
'目标端'
,
label
:
'目标端'
,
value
:
'2'
,
value
:
'2'
,
},
},
],
],
placeholder
:
'请选择使用资源'
,
},
},
},
},
];
];
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment