Commit 6bdbc1da authored by 盖献康's avatar 盖献康

feat: bug(70422)

parent f8ced358
...@@ -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) {
......
...@@ -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 {
......
...@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment