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
5532557c
Commit
5532557c
authored
Jun 27, 2022
by
ylpmty
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.jdshangmen.com/jiedao-app/jiedao-app-operator
into dev
parents
ea1c8e56
e3b41f3c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
15 deletions
+96
-15
index.vue
src/components/FileUpload/index.vue
+3
-2
ruoyi.js
src/utils/ruoyi.js
+6
-1
index.vue
src/views/ecw/productBrank/Empower/index.vue
+87
-12
No files found.
src/components/FileUpload/index.vue
View file @
5532557c
...
...
@@ -73,7 +73,7 @@ export default {
number
:
0
,
uploadList
:
[],
baseUrl
:
process
.
env
.
VUE_APP_BASE_API
,
uploadFileUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"
/
common/upload
"
,
// 上传的图片
服务器地址
uploadFileUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"
/
app-api/file/upload
"
,
// 上传的文件
服务器地址
headers
:
{
Authorization
:
"
Bearer
"
+
getToken
(),
},
...
...
@@ -152,7 +152,8 @@ export default {
},
// 上传成功回调
handleUploadSuccess
(
res
)
{
this
.
uploadList
.
push
({
name
:
res
.
fileName
,
url
:
res
.
fileName
});
// todo 接口返回值没有文件名
this
.
uploadList
.
push
({
name
:
res
.
data
,
url
:
res
.
data
});
if
(
this
.
uploadList
.
length
===
this
.
number
)
{
this
.
fileList
=
this
.
fileList
.
concat
(
this
.
uploadList
);
this
.
uploadList
=
[];
...
...
src/utils/ruoyi.js
View file @
5532557c
...
...
@@ -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 @
5532557c
...
...
@@ -10,7 +10,7 @@
<el-tab-pane
label=
"未授权客户"
name=
"first"
>
<el-form
:inline=
"true"
class=
"demo-form-inline"
>
<el-form-item
label=
"关键字"
>
<el-input
v-model=
"
customerKey"
placeholder=
"审批人
"
></el-input>
<el-input
v-model=
"
list1QueryParams.customerKey"
placeholder=
"请填入关键字
"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"filterCustomer"
>
查询
</el-button>
...
...
@@ -36,6 +36,9 @@
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total1 > 0"
:total=
"total1"
:page.sync=
"list1QueryParams.pageNo"
:limit.sync=
"list1QueryParams.pageSize"
@
pagination=
"getList1"
style=
"height: 40px"
/>
</el-tab-pane>
<el-tab-pane
label=
"已授权客户"
name=
"second"
>
<el-table
...
...
@@ -49,18 +52,48 @@
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>
<pagination
v-show=
"total2 > 0"
:total=
"total2"
:page.sync=
"list2QueryParams.pageNo"
:limit.sync=
"list2QueryParams.pageSize"
@
pagination=
"getList2"
style=
"height: 40px"
/>
</el-tab-pane>
</el-tabs>
</el-dialog>
<!-- 添加弹窗 -->
<el-dialog
title=
"添加"
:visible.sync=
"addDialog.dialogVisible"
...
...
@@ -81,7 +114,9 @@
<el-form-item
label=
"收费模式"
>
<dict-selector
v-model=
"addDialog.form.feeScale"
:type=
"DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL"
></dict-selector>
</el-form-item>
<el-form-item
label=
"授权证明"
></el-form-item>
<el-form-item
label=
"授权证明"
>
<file-upload
v-model=
"addDialog.form.fileUrl"
></file-upload>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"addDialog.dialogVisible = false"
>
取 消
</el-button>
...
...
@@ -99,12 +134,15 @@ 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
"
,
components
:
{
DictSelector
DictSelector
,
FileUpload
},
props
:
{
id
:
{
...
...
@@ -120,11 +158,23 @@ export default {
data
()
{
return
{
DICT_TYPE
,
getDictDataLabel
,
parseTime
,
dialogVisible
:
false
,
activeName
:
'
first
'
,
customerKey
:
''
,
total1
:
0
,
total2
:
0
,
list1
:
[],
list2
:
[],
list1QueryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
customerKey
:
undefined
},
list2QueryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
},
addDialog
:
{
dialogVisible
:
false
,
...
...
@@ -153,30 +203,52 @@ export default {
this
.
addDialog
.
dialogVisible
=
false
this
.
getList1
()
this
.
getList2
()
this
.
resetForm
(
"
form
"
);
})
},
handleDatePick
(
e
){
console
.
log
(
e
)
},
handleClose
()
{},
filterCustomer
()
{},
filterCustomer
()
{
this
.
list1QueryParams
.
pageNo
=
1
this
.
getList1
()
},
handleAdd
(
row
)
{
this
.
addDialog
.
form
.
customerId
=
row
.
customerId
this
.
addDialog
.
form
.
customerName
=
row
.
customerName
this
.
addDialog
.
dialogVisible
=
true
},
handleDelete
(
id
)
{
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
({
productBrandId
:
this
.
id
}).
then
(
r
=>
{
getProductBrandEmpowerPageUnauth
({
...
this
.
list1QueryParams
,
productBrandId
:
this
.
id
}).
then
(
r
=>
{
this
.
list1
=
r
.
data
.
list
this
.
total1
=
r
.
data
.
total
})
},
getList2
()
{
getProductBrandEmpowerPageAuth
({
productBrandId
:
this
.
id
}).
then
(
r
=>
{
getProductBrandEmpowerPageAuth
({
...
this
.
list2QueryParams
,
productBrandId
:
this
.
id
}).
then
(
r
=>
{
this
.
list2
=
r
.
data
.
list
})
}
...
...
@@ -184,6 +256,9 @@ export default {
watch
:
{
visible
(
v
){
if
(
v
){
this
.
list1QueryParams
.
pageNo
=
1
this
.
list2QueryParams
.
pageNo
=
1
this
.
list1QueryParams
.
customerKey
=
''
this
.
getList1
()
this
.
getList2
()
}
...
...
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