Commit 5f12c47a authored by jiaxu.yan's avatar jiaxu.yan

fix: 70692 70609

parent d4f9934a
......@@ -132,19 +132,20 @@ Vue.use(VueApollo);
// 全局导入Echarts
import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts
import { Message } from 'element-ui'
// 请求graphql使用的apollo API
const apolloClient = new ApolloClient({
// 服务端Url
uri: process.env.VUE_APP_CLIENT_API + "/query", //
onError(error) {
Message({ message: '车联网接口异常', type: 'error' })
// 处理错误
},
});
//创建apollo实例对象
const apolloProvider = new VueApollo({
defaultClient: apolloClient, //默认查询
})
new Vue({
el: '#app',
router,
......
......@@ -221,7 +221,10 @@
</collapse>
</div>
<!--确定车型试验范围-->
<div class="form-review-questionnaire">
<div
v-if="model.testScenarioList && model.testScenarioList.length > 0"
class="form-review-questionnaire"
>
<div class="title-display">
<span class="title-i"></span>
<span class="title-content">确定车型试验范围</span>
......@@ -230,10 +233,7 @@
<div class="img-label" style="margin-top: 20px">选择测试场景</div>
</div>
<!-- 测试场景 -->
<div
v-if="model.testScenarioList.length > 0"
class="test-scenario-container"
>
<div class="test-scenario-container">
<div
v-for="(item, index) in model.testScenarioList"
:key="index"
......@@ -379,7 +379,10 @@ export default {
? process.env.VUE_APP_IMAGE_API + imgs[1]
: ''
}
if (this.model.testScenarioList.length > 0) {
if (
this.model.testScenarioList &&
this.model.testScenarioList.length > 0
) {
this.model.testScenarioList = this.model.testScenarioList.map(
({ id, testScenario, ...rest }) => ({
label: testScenario,
......
......@@ -23,7 +23,7 @@ export default {
},
mounted() {
const id = this.$route.query.id
this.url = `http://10.12.48.80:1234/car/complianceTestingCenter/projectOverView/project_items;${id}`
this.url = `http://10.12.48.80:1234/car/complianceTestingCenter/projectOverView/${id}`
},
methods: {}
}
......
......@@ -192,7 +192,8 @@
handleCarTypeTestTaskContent(
item.testStatus,
item.modelTestTaskId,
item.id
item.id,
item.testSchemeId
)
"
>
......@@ -476,22 +477,25 @@ export default {
name: item.taskName,
caseIdList: res.data
})
console.log(resp)
params.testSchemeId = resp.data.id
params.testSchemeId = resp.data.projectMutation.project.id
this.startTaskModel(params)
}
}
const res = await reviewTaskStart(params)
if (res.code === 200) {
this.loadData()
} else {
if (res.msg) {
this.$message.error(res.msg)
}
this.startTaskModel(params)
}
})
.catch(() => {})
},
async startTaskModel(params) {
const res = await reviewTaskStart(params)
if (res.code === 200) {
this.loadData()
} else {
if (res.msg) {
this.$message.error(res.msg)
}
}
},
goDetail(id) {
this.$router.push({
path: '/task/task-detail?id=' + id
......@@ -563,26 +567,23 @@ export default {
/**
* 对接车联网新建测试项目
*/
newFileTest(task) {
this.$apollo
.mutate({
// fetchPolicy: 'no-cache',
mutation: FastTestProject,
variables: {
name: task.name,
lawId: 'law_items;106',
principalUserId: 'user_items;2',
systemId: 'system;1',
caseIdList: task.caseIdList,
fileList: ['file_management_items;2']
}
})
.then(res => {
console.log(res)
})
async newFileTest(task) {
const res = await this.$apollo.mutate({
// fetchPolicy: 'no-cache',
mutation: FastTestProject,
variables: {
name: task.name,
lawId: 'law_items;106',
principalUserId: 'user_items;2',
systemId: 'system;1',
caseIdList: task.caseIdList,
fileList: ['file_management_items;2']
}
})
return res
},
// 车型测试
handleCarTypeTestTaskContent(status, id, taskId) {
handleCarTypeTestTaskContent(status, id, taskId, testSchemeId) {
switch (status) {
// 查看试验方案
case 'NEW':
......@@ -593,7 +594,7 @@ export default {
// 执行试验方案
case 'PENDING':
this.$router.push({
path: `/processing/carTest/execution-test-plan?id=${id}&taskId=${taskId}`
path: `/processing/carTest/execution-test-plan?id=${testSchemeId}`
})
break
// 确认测试结果
......
......@@ -23,7 +23,7 @@ export default {
},
mounted() {
const id = this.$route.query.id
this.url = `http://10.12.48.78:8090/car/caseManage/case/casePublishDetail/case_items;${id}`
this.url = `http://10.12.48.78:8090/car/caseManage/case/casePublishDetail/${id}`
},
methods: {}
}
......
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