Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e7f828fd
authored
Feb 28, 2022
by
张杰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
4147a356
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
144 additions
and
6 deletions
src/components/auth-button/index.vue
src/components/auth-button/link.vue
src/main.js
src/views/work/edit.vue
src/views/work/image.vue
src/views/work/order.vue
src/components/auth-button/index.vue
0 → 100644
View file @
e7f828f
<
template
>
<el-button
:type=
"type"
v-if=
"hasPermission()"
:size=
"size"
>
<slot
/>
</el-button>
<!--
<el-link
:type=
"type"
v-if=
"link && hasPermission()"
>
<slot
/>
</el-link>
-->
</
template
>
<
script
>
export
default
{
name
:
"AuthButton"
,
props
:
{
uid
:
{
type
:
[
String
,
Number
],
default
:
""
,
},
type
:
{
type
:
[
String
,
Number
],
default
:
"default"
,
},
link
:
{
type
:
Boolean
,
default
:
false
,
},
size
:{
type
:
String
,
default
:
''
}
},
data
()
{
return
{};
},
mounted
()
{
},
methods
:
{
// 判断是否有权限
hasPermission
()
{
let
id
=
this
.
uid
;
let
list
=
this
.
$root
.
parentCommon
.
getAuthData
();
console
.
log
(
list
[
0
])
let
idx
=
list
.
findIndex
((
k
)
=>
k
.
id
==
id
);
if
(
idx
<
0
)
{
return
false
;
}
else
{
return
true
;
}
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
\ No newline at end of file
src/components/auth-button/link.vue
0 → 100644
View file @
e7f828f
<
template
>
<el-link
class=
"el_link"
:underline=
"false"
:type=
"type"
v-if=
"hasPermission()"
>
<slot
/>
</el-link>
</
template
>
<
script
>
export
default
{
name
:
"AuthLink"
,
props
:
{
uid
:
{
type
:
[
String
,
Number
],
default
:
""
,
},
type
:
{
type
:
[
String
,
Number
],
default
:
"default"
,
},
link
:
{
type
:
Boolean
,
default
:
false
,
},
},
data
()
{
return
{};
},
mounted
()
{
},
methods
:
{
// 判断是否有权限
hasPermission
()
{
let
id
=
this
.
uid
;
let
list
=
this
.
$root
.
parentCommon
.
getAuthData
();
console
.
log
(
list
)
let
idx
=
list
.
findIndex
((
k
)
=>
k
.
id
==
id
);
console
.
log
(
idx
)
if
(
idx
<
0
)
{
return
false
;
}
else
{
return
true
;
}
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.el_link
:hover
{
text-decoration
:
none
;
}
</
style
>
\ No newline at end of file
src/main.js
View file @
e7f828f
...
...
@@ -22,7 +22,7 @@ Vue.config.productionTip = false;
let
router
=
null
;
let
instance
=
null
;
function
render
({
data
=
{}
,
container
}
=
{})
{
function
render
({
data
=
{},
container
}
=
{})
{
router
=
new
VueRouter
({
base
:
window
.
__POWERED_BY_QIANKUN__
?
'/system'
:
'/'
,
routes
,
...
...
@@ -32,10 +32,11 @@ function render({ data = {} , container } = {}) {
instance
=
new
Vue
({
router
,
store
,
data
(){
data
()
{
return
{
parentRouter
:
data
.
router
,
parentVuex
:
data
.
store
parentVuex
:
data
.
store
,
parentCommon
:
data
.
common
}
},
render
:
h
=>
h
(
App
),
...
...
src/views/work/edit.vue
View file @
e7f828f
...
...
@@ -79,7 +79,7 @@
<template
v-for=
"(item,index) in editForm.snList"
>
<div
class=
"form_flex form_device_flex"
:key=
"index"
>
<el-form-item
label=
"设备SN号:"
:prop=
"'snList.' + index + '.sn'"
:rules=
"deviceRules"
>
<el-input
v-model=
"item.sn"
maxlength=
"20"
placeholder=
"请输入设备号"
:disabled=
"editForm.orderStatus == 5"
></el-input>
<el-input
v-model=
"item.sn"
maxlength=
"20"
placeholder=
"请输入设备号"
:disabled=
"editForm.orderStatus == 5
|| editForm.orderStatus == 2
"
></el-input>
</el-form-item>
<el-form-item
label=
"设备型号:"
:prop=
"'snList.' + index + '.deviceClassifyName'"
:rules=
"[
{ required: true, message: '未识别到正确设备型号', trigger:['blur','change']}]">
<el-input
v-model=
"item.deviceClassifyName"
disabled
></el-input>
...
...
@@ -153,7 +153,7 @@
<!-- 车辆信息 end -->
<!-- 安装照片 开始 -->
<div
class=
"line_title glsx_hairline"
>
安装照片
</div>
<div
ref=
"imageUpload"
class=
"line_title glsx_hairline"
>
安装照片
</div>
<image-upload
v-model=
"editForm.workOrderDocs"
:status=
"type"
></image-upload>
<!-- 安装照片 end -->
...
...
@@ -223,6 +223,10 @@ export default {
type
:
[
String
,
Number
],
default
:
1
,
},
status
:
{
type
:
[
String
,
Number
],
default
:
""
,
},
},
data
()
{
// 校验
...
...
@@ -394,6 +398,13 @@ export default {
},
immediate
:
true
,
},
status
:
{
handler
:
function
(
n
,
o
)
{
if
(
n
==
2
)
{
this
.
isDisabled
=
true
;
}
},
},
},
created
()
{
let
o
=
this
.
$store
.
state
;
...
...
@@ -725,6 +736,12 @@ export default {
initRules
()
{
let
_id
=
"orderInfo"
;
switch
(
this
.
type
)
{
case
5
:
// 编辑照片
this
.
formRules
=
{};
this
.
isDisabled
=
true
;
_id
=
"imageUpload"
;
break
;
case
4
:
// 审核工单
this
.
formRules
=
this
.
activeRules
;
...
...
@@ -841,6 +858,12 @@ export default {
row
.
showMap
=
false
;
this
.
$set
(
this
.
editForm
.
snList
,
index
,
row
);
},
// 单独保存照片
saveImageInfo
(){
}
},
};
</
script
>
...
...
src/views/work/image.vue
View file @
e7f828f
...
...
@@ -150,7 +150,7 @@ export default {
if
(
this
.
readStatus
==
1
)
{
return
false
;
}
if
(
this
.
imgList
&&
this
.
imgList
.
length
>
this
.
limit
)
{
if
(
this
.
imgList
&&
this
.
imgList
.
length
>
=
this
.
limit
)
{
return
false
;
}
return
true
;
...
...
src/views/work/order.vue
View file @
e7f828f
...
...
@@ -91,6 +91,8 @@
<el-link
class=
"el_link"
type=
"primary"
v-if=
"row.status == 0 ||row.status == 1"
@
click=
"lookDetail(row,2)"
>
编辑
</el-link>
<el-link
class=
"el_link"
type=
"primary"
v-if=
"row.status == 0 ||row.status == 1"
@
click=
"lookDetail(row,3)"
>
激活
</el-link>
<el-link
class=
"el_link"
type=
"primary"
v-if=
"row.status == 5"
@
click=
"lookDetail(row,4)"
>
审核
</el-link>
<!--
<el-link
class=
"el_link"
type=
"primary"
v-if=
"row.status == 2"
@
click=
"lookDetail(row,5)"
>
照片编辑
</el-link>
-->
<auth-link
class=
"el_link"
type=
"primary"
v-if=
"row.status == 2"
uid=
"29010101"
@
click
.
native=
"lookDetail(row,5)"
>
照片编辑
</auth-link>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -154,6 +156,7 @@
<el-button
type=
"primary"
size=
"small"
:loading=
"aloading"
v-if=
"orderType == 3"
@
click=
"activeDevice()"
>
激活
</el-button>
<el-button
type=
"primary"
size=
"small"
:loading=
"aloading"
v-if=
"orderType == 2"
@
click=
"saveInfo()"
>
提交
</el-button>
<el-button
type=
"primary"
size=
"small"
:loading=
"aloading"
v-if=
"orderType == 4"
@
click=
"auditWorkOrderInfo()"
>
审核
</el-button>
<el-button
type=
"primary"
size=
"small"
:loading=
"aloading"
v-if=
"orderType == 5"
@
click=
"saveImageInfo()"
>
保存
</el-button>
<el-button
type=
"default"
size=
"small"
@
click=
"closeDetailDialog()"
>
关闭
</el-button>
</div>
</glsx-dialog>
...
...
@@ -176,11 +179,13 @@ import store from "@/store";
import
GlsxOrganization
from
"@/components/glsx-organization"
;
import
EditOrder
from
"./edit.vue"
;
import
moment
from
"moment"
;
import
AuthLink
from
"@/components/auth-button/link"
;
export
default
{
components
:
{
GlsxDialog
,
GlsxOrganization
,
EditOrder
,
AuthLink
,
},
data
()
{
return
{
...
...
@@ -220,6 +225,7 @@ export default {
2
:
"编辑工单"
,
3
:
"激活工单"
,
4
:
"审核工单"
,
5
:
"照片编辑"
,
},
statusList
:
[],
tdWidth
:
140
,
...
...
@@ -517,6 +523,13 @@ export default {
this
.
aloading
=
true
;
this
.
$refs
.
editOrderCom
.
auditWorkOrderInfo
();
},
// 保存工单
saveImageInfo
(){
this
.
aloading
=
true
;
this
.
$refs
.
editOrderCom
.
saveImageInfo
();
}
},
};
</
script
>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment