Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
Overview
Overview
Details
Activity
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
hooloo
web
soss
Commits
f3069ff7
Commit
f3069ff7
authored
Aug 05, 2022
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改页面
parent
83e237f5
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
81 additions
and
21 deletions
+81
-21
src/api/machine/machineDetails.js
+9
-0
src/api/system/shop.js
+15
-0
src/components/ImageUpload/index.vue
+4
-1
src/views/machine/machineDetails/machineDetails.vue
+7
-3
src/views/machine/machineDetails/machineDetailsLog.vue
+19
-6
src/views/shop/shop/index.vue
+27
-11
No files found.
src/api/machine/machineDetails.js
View file @
f3069ff7
...
@@ -76,3 +76,12 @@ export function addProperty(data) {
...
@@ -76,3 +76,12 @@ export function addProperty(data) {
});
});
}
}
// 新增出厂日志
export
function
addMachineLog
(
data
)
{
return
request
({
url
:
"/v1/add/machine/log"
,
method
:
"post"
,
data
:
data
,
});
}
src/api/system/shop.js
View file @
f3069ff7
...
@@ -152,3 +152,18 @@ export function getShopAreaTree() {
...
@@ -152,3 +152,18 @@ export function getShopAreaTree() {
method
:
"get"
,
method
:
"get"
,
});
});
}
}
export
function
testFinish
(
shopId
){
return
request
({
url
:
"/system/shop/test/finish/"
+
shopId
,
method
:
"get"
,
});
}
export
function
testStart
(
shopId
){
return
request
({
url
:
"/system/shop/test/start/"
+
shopId
,
method
:
"get"
,
});
}
src/components/ImageUpload/index.vue
View file @
f3069ff7
...
@@ -80,7 +80,10 @@ export default {
...
@@ -80,7 +80,10 @@ export default {
handler
(
val
)
{
handler
(
val
)
{
if
(
val
)
{
if
(
val
)
{
// 首先将值转为数组
// 首先将值转为数组
const
list
=
Array
.
isArray
(
JSON
.
parse
(
val
))
?
JSON
.
parse
(
val
)
:
this
.
value
.
split
(
","
);
if
(
val
.
indexOf
(
"["
)
!=-
1
){
val
=
JSON
.
parse
(
val
);
}
const
list
=
Array
.
isArray
(
val
)
?
val
:
this
.
value
.
split
(
","
);
// 然后将数组转为对象数组
// 然后将数组转为对象数组
this
.
fileList
=
list
.
map
((
item
)
=>
{
this
.
fileList
=
list
.
map
((
item
)
=>
{
if
(
typeof
item
===
"string"
)
{
if
(
typeof
item
===
"string"
)
{
...
...
src/views/machine/machineDetails/machineDetails.vue
View file @
f3069ff7
...
@@ -89,6 +89,7 @@ export default {
...
@@ -89,6 +89,7 @@ export default {
queryParams
:
{
queryParams
:
{
page
:
1
,
page
:
1
,
limit
:
10
,
limit
:
10
,
model_id
:
null
},
},
modelList
:[]
modelList
:[]
};
};
...
@@ -119,18 +120,21 @@ export default {
...
@@ -119,18 +120,21 @@ export default {
},
},
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleQuery
()
{
handleQuery
()
{
if
(
this
.
queryParams
.
model_id
==
""
){
this
.
queryParams
.
model_id
=
null
;
}
this
.
queryParams
.
page
=
1
;
this
.
queryParams
.
page
=
1
;
this
.
getList
();
this
.
getList
();
},
},
/** 重置按钮操作 */
/** 重置按钮操作 */
resetQuery
()
{
resetQuery
()
{
this
.
queryParams
.
name
=
null
;
this
.
queryParams
.
model_id
=
null
;
this
.
queryParams
.
state
=
null
;
this
.
queryParams
.
code
=
""
;
this
.
getList
();
this
.
getList
();
},
},
//日志
//日志
handleLogDialog
(
row
){
handleLogDialog
(
row
){
this
.
$refs
.
machineDetailsLog
.
handleLogDialog
(
row
.
id
);
this
.
$refs
.
machineDetailsLog
.
handleLogDialog
(
row
);
},
},
//组件
//组件
handleComponentDialog
(
row
){
handleComponentDialog
(
row
){
...
...
src/views/machine/machineDetails/machineDetailsLog.vue
View file @
f3069ff7
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
</div>
</div>
</el-dialog>
</el-dialog>
<el-dialog
title=
"主动上报日志"
:visible
.
sync=
"logContentDiaLog"
width=
"500px"
append-to-body
>
<el-dialog
title=
"主动上报日志"
:visible
.
sync=
"logContentDiaLog"
width=
"500px"
append-to-body
>
<el-input
type=
"textarea"
:rows=
"10"
placeholder=
"请输入上报日志内容"
v-model=
"
textarea1
"
/>
<el-input
type=
"textarea"
:rows=
"10"
placeholder=
"请输入上报日志内容"
v-model=
"
message
"
/>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitLogContent"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"submitLogContent"
>
确定
</el-button>
<el-button
@
click=
"contentDialogCancel"
>
取消
</el-button>
<el-button
@
click=
"contentDialogCancel"
>
取消
</el-button>
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getMachineLog
,
getMachineComLog
}
from
"@/api/machine/machineDetails"
;
import
{
getMachineLog
,
getMachineComLog
,
addMachineLog
}
from
"@/api/machine/machineDetails"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -39,7 +39,8 @@ export default {
...
@@ -39,7 +39,8 @@ export default {
machineId
:
null
,
machineId
:
null
,
contentTag
:
true
,
contentTag
:
true
,
logContentDiaLog
:
false
,
logContentDiaLog
:
false
,
textarea1
:
''
,
message
:
''
,
machineCode
:
''
};
};
},
},
created
()
{
created
()
{
...
@@ -58,9 +59,10 @@ export default {
...
@@ -58,9 +59,10 @@ export default {
},
},
methods
:
{
methods
:
{
//弹出机器页面
//弹出机器页面
handleLogDialog
(
val
){
handleLogDialog
(
row
){
this
.
activeName
=
"first"
;
this
.
activeName
=
"first"
;
this
.
machineId
=
val
;
this
.
machineId
=
row
.
id
;
this
.
machineCode
=
row
.
code
;
this
.
logDiaLog
=
true
;
this
.
logDiaLog
=
true
;
this
.
getMachineLog
();
this
.
getMachineLog
();
},
},
...
@@ -72,7 +74,18 @@ export default {
...
@@ -72,7 +74,18 @@ export default {
},
},
//提交主动上报日志
//提交主动上报日志
submitLogContent
(){
submitLogContent
(){
let
obj
=
{
"machine_id"
:
this
.
machineId
,
"machine_code"
:
this
.
machineCode
,
"message"
:
this
.
message
}
addMachineLog
(
obj
).
then
((
response
)
=>
{
if
(
response
.
code
==
0
){
this
.
$modal
.
msgSuccess
(
"主动上报内容成功!"
);
this
.
logContentDiaLog
=
false
;
this
.
getMachineLog
();
}
})
},
},
contentDialogCancel
(){
contentDialogCancel
(){
this
.
logContentDiaLog
=
false
;
this
.
logContentDiaLog
=
false
;
...
...
src/views/shop/shop/index.vue
View file @
f3069ff7
...
@@ -70,6 +70,7 @@
...
@@ -70,6 +70,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"状态"
align=
"center"
prop=
"state"
>
<el-table-column
label=
"状态"
align=
"center"
prop=
"state"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.state == 0"
>
测试中
</span>
<span
v-if=
"scope.row.state == 1"
>
正常营业
</span>
<span
v-if=
"scope.row.state == 1"
>
正常营业
</span>
<span
v-if=
"scope.row.state == 2"
>
暂停营业
</span>
<span
v-if=
"scope.row.state == 2"
>
暂停营业
</span>
<span
v-if=
"scope.row.state == 3"
>
已删除
</span>
<span
v-if=
"scope.row.state == 3"
>
已删除
</span>
...
@@ -77,16 +78,20 @@
...
@@ -77,16 +78,20 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
width=
"300"
>
<el-table-column
label=
"操作"
align=
"center"
width=
"300"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
v-show=
"scope.row.state !=
'3'
"
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
<el-button
v-show=
"scope.row.state !=
3
"
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:shop:remove']"
>
删除
</el-button>
v-hasPermi=
"['system:shop:remove']"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn([
'1'
], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn([
1
], scope.row.state)"
@
click=
"setShopState(scope.row, 2, 'setState')"
v-hasPermi=
"['system:shop:suspended']"
>
@
click=
"setShopState(scope.row, 2, 'setState')"
v-hasPermi=
"['system:shop:suspended']"
>
暂停营业
</el-button>
暂停营业
</el-button>
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn([
'2'
], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn([
2
], scope.row.state)"
@
click=
"setShopState(scope.row, 1, 'setState')"
v-hasPermi=
"['system:shop:start']"
>
开始营业
</el-button>
@
click=
"setShopState(scope.row, 1, 'setState')"
v-hasPermi=
"['system:shop:start']"
>
开始营业
</el-button>
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn([
'3'
], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn([
3
], scope.row.state)"
@
click=
"setShopState(scope.row, 1, 'setState')"
v-hasPermi=
"['system:shop:restart']"
>
恢复营业
</el-button>
@
click=
"setShopState(scope.row, 1, 'setState')"
v-hasPermi=
"['system:shop:restart']"
>
恢复营业
</el-button>
<el-button
v-show=
"scope.row.isDefault=='0'"
size=
"mini"
type=
"text"
@
click=
"setShopState(scope.row)"
v-hasPermi=
"['system:shop:default']"
>
设为默认
</el-button>
<el-button
v-show=
"scope.row.isDefault==0"
size=
"mini"
type=
"text"
@
click=
"setShopState(scope.row)"
v-hasPermi=
"['system:shop:default']"
>
设为默认
</el-button>
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn([0], scope.row.state)"
@
click=
"testFinish(scope.row)"
v-hasPermi=
"['system:shop:testFinish']"
>
测试完成
</el-button>
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn([2], scope.row.state)"
@
click=
"testStart(scope.row)"
v-hasPermi=
"['system:shop:testStart']"
>
开始测试
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -97,12 +102,7 @@
...
@@ -97,12 +102,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
import
{
listShop
,
delShop
,
updateShop
,
getShopCity
,
testFinish
,
testStart
}
from
"@/api/system/shop"
;
listShop
,
delShop
,
updateShop
,
getShopCity
}
from
"@/api/system/shop"
;
import
SetShop
from
'./setShop'
;
import
SetShop
from
'./setShop'
;
import
piovince
from
'@/utils/piovince'
import
piovince
from
'@/utils/piovince'
export
default
{
export
default
{
...
@@ -268,6 +268,22 @@ export default {
...
@@ -268,6 +268,22 @@ export default {
})
})
},
//测试完成
testFinish
(
row
){
testFinish
(
row
.
id
).
then
(
res
=>
{
if
(
res
.
code
=
"200"
){
this
.
getList
();
}
})
},
//测试开始
testStart
(
row
){
testStart
(
row
.
id
).
then
(
res
=>
{
if
(
res
.
code
=
"200"
){
this
.
getList
();
}
})
}
}
},
},
};
};
...
...
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