Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-operator-master
Commits
e3b41f3c
Commit
e3b41f3c
authored
Jun 27, 2022
by
黄卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
品牌添加授权,已授权列表
parent
88391394
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
6 deletions
+56
-6
ruoyi.js
src/utils/ruoyi.js
+6
-1
index.vue
src/views/ecw/productBrank/Empower/index.vue
+50
-5
No files found.
src/utils/ruoyi.js
View file @
e3b41f3c
...
...
@@ -5,7 +5,12 @@
const
baseURL
=
process
.
env
.
VUE_APP_BASE_API
// 日期格式化
/**
* 日期格式化
* @param time {String|Number|Date} 时间
* @param pattern {String} '{y}-{m}-{d} {h}:{i}:{s}'
* @returns {string|null}
*/
export
function
parseTime
(
time
,
pattern
)
{
if
(
arguments
.
length
===
0
||
!
time
)
{
return
null
...
...
src/views/ecw/productBrank/Empower/index.vue
View file @
e3b41f3c
...
...
@@ -52,11 +52,37 @@
prop=
"phone"
label=
"客户号码"
>
</el-table-column>
<el-table-column
prop=
"fileUrl"
label=
"授权证明"
>
<
template
v-slot=
"{row}"
>
<div
v-if=
"!!row.fileUrl && row.fileUrl.length > 0"
>
<span
v-for=
"(item, index) in row.fileUrl.split(',')"
>
<a
:href=
"item"
target=
"_blank"
>
附件
{{
index
+
1
}}
</a>
,
</span>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"startTime"
width=
"200px"
:formatter=
"(row) => parseTime(row.startTime, '{y}-{m}-{d}') + ' - ' + parseTime(row.endTime, '{y}-{m}-{d}')"
label=
"授权时间"
>
</el-table-column>
<el-table-column
prop=
"feeScale"
:formatter=
"(row) => getDictDataLabel(DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL, row.feeScale)"
label=
"收费标准"
>
</el-table-column>
<el-table-column
prop=
"createUsername"
label=
"添加人"
>
</el-table-column>
<el-table-column
width=
"100px"
label=
"操作"
>
<
template
v-slot=
"{row}"
>
<el-button
type=
"
primary
"
size=
"mini"
@
click=
"handleDelete(row.id)"
>
删除
</el-button>
<el-button
type=
"
danger
"
size=
"mini"
@
click=
"handleDelete(row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -108,8 +134,9 @@ import {
getProductBrandEmpowerPageUnauth
}
from
"
@/api/ecw/productBrandEmpower
"
import
DictSelector
from
"
@/components/DictSelector
"
import
{
DICT_TYPE
}
from
"
@/utils/dict
"
import
{
DICT_TYPE
,
getDictDataLabel
}
from
'
@/utils/dict
'
import
FileUpload
from
'
@/components/FileUpload
'
import
{
parseTime
}
from
'
@/utils/ruoyi
'
export
default
{
name
:
"
Empower
"
,
...
...
@@ -131,6 +158,8 @@ export default {
data
()
{
return
{
DICT_TYPE
,
getDictDataLabel
,
parseTime
,
dialogVisible
:
false
,
activeName
:
'
first
'
,
total1
:
0
,
...
...
@@ -192,9 +221,25 @@ export default {
this
.
addDialog
.
dialogVisible
=
true
},
handleDelete
(
id
)
{
deleteProductBrandEmpower
(
id
).
then
(
r
=>
{
this
.
getList2
()
})
this
.
$confirm
(
'
确认删除该用户的授权?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(()
=>
{
deleteProductBrandEmpower
(
id
).
then
(
r
=>
{
this
.
getList1
()
this
.
getList2
()
this
.
$message
({
type
:
'
success
'
,
message
:
'
撤销授权成功!
'
});
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'
info
'
,
message
:
'
已取消删除
'
});
});
},
getList1
(){
getProductBrandEmpowerPageUnauth
({...
this
.
list1QueryParams
,
productBrandId
:
this
.
id
}).
then
(
r
=>
{
...
...
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