Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web
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
中汽测评-信息安全测评系统
web
Commits
6bdbc1da
Commit
6bdbc1da
authored
Mar 19, 2024
by
盖献康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: bug(70422)
parent
f8ced358
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
68 deletions
+26
-68
index.vue
src/views/task/edit/index.vue
+6
-59
index.vue
src/views/task/new/index.vue
+6
-1
index.vue
src/views/task/task-detail/index.vue
+14
-8
No files found.
src/views/task/edit/index.vue
View file @
6bdbc1da
...
@@ -571,7 +571,12 @@ export default {
...
@@ -571,7 +571,12 @@ export default {
}
}
console
.
log
(
'model.inspectionItemList'
,
newValue
)
console
.
log
(
'model.inspectionItemList'
,
newValue
)
this
.
rules
.
inspectionItemList
[
0
].
required
=
true
this
.
rules
.
inspectionItemList
[
0
].
required
=
true
if
(
newValue
.
length
===
1
&&
newValue
.
includes
(
'trfis'
))
{
if
(
(
newValue
.
length
===
1
&&
newValue
.
includes
(
'trfis'
))
||
(
newValue
.
length
===
2
&&
newValue
.
includes
(
'trfis'
)
&&
newValue
.
includes
(
'sraif'
))
)
{
this
.
rules
.
testScenarioList
[
0
].
required
=
true
this
.
rules
.
testScenarioList
[
0
].
required
=
true
this
.
testScenarioShow
=
true
this
.
testScenarioShow
=
true
}
else
{
}
else
{
...
@@ -604,7 +609,6 @@ export default {
...
@@ -604,7 +609,6 @@ export default {
this
.
$store
.
dispatch
(
'testScenario/setTestScenarioList'
)
this
.
$store
.
dispatch
(
'testScenario/setTestScenarioList'
)
// 对字典:inspection_item, 做处理
// 对字典:inspection_item, 做处理
this
.
getUserByRole
()
this
.
getUserByRole
()
// this.initWebSocket()
// 查询样品信息(整车、零件)
// 查询样品信息(整车、零件)
this
.
getSampleInformation
()
this
.
getSampleInformation
()
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
...
@@ -616,9 +620,6 @@ export default {
...
@@ -616,9 +620,6 @@ export default {
computed
:
{
computed
:
{
...
mapGetters
([
'standard'
,
'standardList'
,
'testScenarioList'
])
...
mapGetters
([
'standard'
,
'standardList'
,
'testScenarioList'
])
},
},
// destroyed() {
// this.websock.close() // 离开路由之后断开websocket连接
// },
methods
:
{
methods
:
{
getTaskDetail
(
taskId
)
{
getTaskDetail
(
taskId
)
{
getTaskById
({
id
:
taskId
}).
then
(
response
=>
{
getTaskById
({
id
:
taskId
}).
then
(
response
=>
{
...
@@ -705,7 +706,6 @@ export default {
...
@@ -705,7 +706,6 @@ export default {
this
.
rules
.
inspectionItemList
[
0
].
required
=
false
this
.
rules
.
inspectionItemList
[
0
].
required
=
false
this
.
rules
.
testScenarioList
[
0
].
required
=
false
this
.
rules
.
testScenarioList
[
0
].
required
=
false
}
else
{
}
else
{
// this.$route.meta.title = '发起新任务'
this
.
getTemporaryStorage
()
this
.
getTemporaryStorage
()
}
}
})
})
...
@@ -806,36 +806,6 @@ export default {
...
@@ -806,36 +806,6 @@ export default {
}
}
)
)
},
},
initWebSocket
()
{
// 初始化weosocket
const
wsuri
=
'ws://49.232.167.247:22032/websocket/1'
this
.
websock
=
new
WebSocket
(
wsuri
)
this
.
websock
.
onmessage
=
this
.
websocketonmessage
// this.websock.onopen = this.websocketonopen
this
.
websock
.
onerror
=
this
.
websocketonerror
this
.
websock
.
onclose
=
this
.
websocketclose
},
// websocketonopen() {
// // 连接建立之后执行send方法发送数据
// const actions = { test: '12345' }
// this.websocketsend(JSON.stringify(actions))
// },
websocketonerror
()
{
// 连接建立失败重连
this
.
initWebSocket
()
},
websocketonmessage
(
e
)
{
// 数据接收
console
.
log
(
'后端返回数据'
,
e
)
},
// websocketsend(Data) {
// // 数据发送
// this.websock.send(Data)
// },
websocketclose
(
e
)
{
// 关闭
console
.
log
(
'断开连接'
,
e
)
},
/** 组长角色置顶逻辑 */
/** 组长角色置顶逻辑 */
leaderTop
()
{
leaderTop
()
{
if
(
this
.
tableData
.
length
!==
0
)
{
if
(
this
.
tableData
.
length
!==
0
)
{
...
@@ -987,22 +957,6 @@ export default {
...
@@ -987,22 +957,6 @@ export default {
*/
*/
handleSavePeople
(
row
)
{
handleSavePeople
(
row
)
{
console
.
log
(
'保存小组有'
,
row
)
console
.
log
(
'保存小组有'
,
row
)
// const obj = this.userList.find(item => item.userId === this.userId)
// const currentData = this.tableData.find(
// item => item.userId === row.userId
// )
// currentData.userId = this.userId
// currentData.nickName = obj.nickName
// currentData.dept = obj.dept
// // 已被选择的人做禁用
// this.userList.find(item => item.userId === this.userId).disabled = true
// this.userId = ''
// this.leaderTop()
// if (this.tableData.length === 1) {
// currentData.isLeader = 1
// } else {
// currentData.isLeader = 0
// }
console
.
log
(
'现在的对象'
,
this
.
tableData
)
console
.
log
(
'现在的对象'
,
this
.
tableData
)
},
},
/**
/**
...
@@ -1195,13 +1149,6 @@ export default {
...
@@ -1195,13 +1149,6 @@ export default {
})
})
}
}
})
})
// 假装跳转详情页
// this.$router.push({
// path: '/task/task-detail',
// query: {
// taskId: '1763404524439060481'
// }
// })
},
},
// 判断一个对象里的数据是否为空
// 判断一个对象里的数据是否为空
areAllPropertiesEmpty
(
obj
)
{
areAllPropertiesEmpty
(
obj
)
{
...
...
src/views/task/new/index.vue
View file @
6bdbc1da
...
@@ -566,7 +566,12 @@ export default {
...
@@ -566,7 +566,12 @@ export default {
}
}
console
.
log
(
'model.inspectionItemList'
,
newValue
)
console
.
log
(
'model.inspectionItemList'
,
newValue
)
this
.
rules
.
inspectionItemList
[
0
].
required
=
true
this
.
rules
.
inspectionItemList
[
0
].
required
=
true
if
(
newValue
.
length
===
1
&&
newValue
.
includes
(
'trfis'
))
{
if
(
(
newValue
.
length
===
1
&&
newValue
.
includes
(
'trfis'
))
||
(
newValue
.
length
===
2
&&
newValue
.
includes
(
'trfis'
)
&&
newValue
.
includes
(
'sraif'
))
)
{
this
.
rules
.
testScenarioList
[
0
].
required
=
true
this
.
rules
.
testScenarioList
[
0
].
required
=
true
this
.
testScenarioShow
=
true
this
.
testScenarioShow
=
true
}
else
{
}
else
{
...
...
src/views/task/task-detail/index.vue
View file @
6bdbc1da
...
@@ -487,10 +487,17 @@ export default {
...
@@ -487,10 +487,17 @@ export default {
}
else
{
}
else
{
this
.
$refs
.
form
.
validateField
(
'inspectionItemList'
)
this
.
$refs
.
form
.
validateField
(
'inspectionItemList'
)
}
}
console
.
log
(
'model.inspectionItemList'
,
newValue
)
console
.
log
(
'aaaa'
,
newValue
)
if
(
newValue
.
includes
(
2
))
{
if
(
(
newValue
.
length
===
1
&&
newValue
.
includes
(
'trfis'
))
||
(
newValue
.
length
===
2
&&
newValue
.
includes
(
'trfis'
)
&&
newValue
.
includes
(
'sraif'
))
)
{
this
.
rules
.
testScenarioList
[
0
].
required
=
true
this
.
rules
.
testScenarioList
[
0
].
required
=
true
this
.
testScenarioShow
=
true
}
else
{
}
else
{
this
.
testScenarioShow
=
false
this
.
rules
.
testScenarioList
[
0
].
required
=
false
this
.
rules
.
testScenarioList
[
0
].
required
=
false
}
}
}
}
...
@@ -570,18 +577,17 @@ export default {
...
@@ -570,18 +577,17 @@ export default {
item
.
flag
=
1
item
.
flag
=
1
})
})
}
}
const
taskList
=
this
.
taskDetail
.
taskList
.
split
(
','
)
if
(
if
(
this
.
taskDetail
.
taskList
.
split
(
','
).
length
===
1
&&
(
taskList
.
length
===
1
&&
taskList
.
includes
(
'trfis'
))
||
this
.
taskDetail
.
taskList
.
split
(
','
).
includes
(
'trfis'
)
(
taskList
.
length
===
2
&&
taskList
.
includes
(
'trfis'
)
&&
taskList
.
includes
(
'sraif'
))
)
{
)
{
this
.
testScenarioShow
=
true
this
.
testScenarioShow
=
true
}
else
{
}
else
{
this
.
testScenarioShow
=
false
this
.
testScenarioShow
=
false
}
}
console
.
log
(
'哈哈哈'
,
this
.
testScenarioShow
)
console
.
log
(
'零件样品信息'
,
this
.
partInfoArr
)
console
.
log
(
'model'
,
this
.
model
)
})
})
},
},
getInspectionItemDict
()
{
getInspectionItemDict
()
{
...
...
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