Commit d4f9934a authored by jiaxu.yan's avatar jiaxu.yan

fix: 70609 70681

parent 791db1d2
......@@ -207,5 +207,14 @@ export function pdfDownload(data) {
data
})
}
/**
*获取车型实验任务下的测试用例
*/
export function geTaskCase(data) {
return request({
url: '/system/testCase/getCaseIdList',
method: 'post',
data
})
}
......@@ -10,7 +10,7 @@ empty
placeholder="输入标准关键词"
@keyup.enter.native="search()"
>
<i class="el-icon-search el-input__icon" slot="suffix"> </i>
<i class="el-icon-search el-input__icon" @click="search()" slot="suffix"> </i>
</el-input>
<ul class="select-list">
<template v-for="item in standardList">
......
......@@ -175,7 +175,7 @@
@click="
goNext(
'/processing/carReview/source-record?id=' +
item.carReviewTaskId
item.modelTestTaskId
)
"
>车型试验原始记录</el-button
......
......@@ -277,7 +277,11 @@
>
保存当前条目
</footer-button>
<footer-button type="primary" icon="check" @click="submitFrom()"
<footer-button
v-if="model.carReviewTask.leaderId == userId"
type="primary"
icon="check"
@click="submitFrom()"
>提交表单</footer-button
>
</div>
......@@ -406,7 +410,7 @@ export default {
})
return num
},
...mapGetters(['name', 'companyFiles'])
...mapGetters(['name', 'companyFiles', 'userId'])
},
watch: {
'form.fileName': function (newValue) {
......
......@@ -64,6 +64,7 @@
:scroll-x="'1500px'"
:default-sort="{ prop: 'createTime', order: 'descending' }"
:data="tableData"
@sort-change="sort_change"
>
<el-table-column type="index" width="55" label="序号" align="center">
<template slot-scope="scope">
......@@ -242,12 +243,22 @@ export default {
this.queryParams.taskId = this.$route.query.id
},
methods: {
sort_change(column, prop, order) {
this.queryParams.pageNum = 1 // 排序后返回第一页
if (column.order) {
this.queryParams.isAsc = column.order === 'ascending' ? 'asc' : 'desc'
this.queryParams.orderByColumn = column.prop
this.loadData()
}
},
resetQuery() {
// this.refs.queryForm.restForm() this.resetForm("queryForm");
this.queryParams = {
pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize,
taskId: this.$route.query.id
taskId: this.$route.query.id,
isAsc: this.queryParams.isAsc,
orderByColumn: this.queryParams.orderByColumn
}
this.handleQuery()
},
......
......@@ -167,14 +167,14 @@
>车型审查原始记录</el-button
>
<el-button
v-if="item.carReviewTaskId"
v-if="item.modelTestTaskId"
type="primary"
plain
size="mini"
@click="
goNext(
'/processing/carReview/source-record?id=' +
item.carReviewTaskId
item.modelTestTaskId
)
"
>车型试验原始记录</el-button
......
......@@ -287,7 +287,11 @@
>
保存当前条目
</footer-button>
<footer-button type="primary" icon="check" @click="submitFrom()"
<footer-button
v-if="model.systemReviewTask.leaderId == userId"
type="primary"
icon="check"
@click="submitFrom()"
>提交表单</footer-button
>
</div>
......@@ -425,7 +429,7 @@ export default {
})
return num
},
...mapGetters(['name', 'companyFiles'])
...mapGetters(['name', 'companyFiles', 'userId'])
},
watch: {
'form.fileName': function (newValue) {
......
......@@ -182,7 +182,7 @@
</el-link>
</div>
<div
v-if="item.carTestStatus && item.carTestStatus !== 'NONE'"
v-if="item.testStatus && item.testStatus !== 'NONE'"
class="cell-item"
>
<el-link
......@@ -190,8 +190,8 @@
:underline="false"
@click="
handleCarTypeTestTaskContent(
item.carTestStatus,
item.carTestTaskId,
item.testStatus,
item.modelTestTaskId,
item.id
)
"
......@@ -199,7 +199,7 @@
{{
getDictData(
dict.type.test_cartype_task_btn,
item.carTestStatus
item.testStatus
)
}}
</el-link>
......@@ -273,14 +273,14 @@
</div>
</div>
<div
v-if="item.carTestStatus && item.carTestStatus !== 'NONE'"
v-if="item.testStatus && item.testStatus !== 'NONE'"
class="cell-item"
>
<div
:class="[
'cell-status',
item.carTestStatus !== 'FINISH'
? item.carTestStatus == 'NEW'
item.testStatus !== 'FINISH'
? item.testStatus == 'NEW'
? ''
: 'yellow'
: 'green'
......@@ -291,13 +291,12 @@
{{
getDictData(
dict.type.test_cartype_type,
item.carTestStatus
item.testStatus
)
}}</span
>
<span v-if="item.carTestStatus !== 'NEW'"
>{{
item.carTestStatus !== 'FINISH' ? '(共耗时' : '(已耗时'
<span v-if="item.testStatus !== 'NEW'"
>{{ item.testStatus !== 'FINISH' ? '(共耗时' : '(已耗时'
}}{{ getHourDiff(item.taskBeginTime) }})</span
>
</div>
......@@ -329,7 +328,7 @@
></el-progress>
</div>
<div
v-if="item.carTestStatus && item.carTestStatus !== 'NONE'"
v-if="item.testStatus && item.testStatus !== 'NONE'"
class="cell-item"
>
<el-progress
......@@ -392,8 +391,8 @@ import page from '@/mixins/page'
import taskDialog from './components/dialog'
import { getHourDiff } from '@/utils/diff'
import { mapGetters } from 'vuex'
import { reviewTaskStart } from '@/api/task/task'
import request from '@/utils/request'
import { geTaskCase, reviewTaskStart } from '@/api/task/task'
import { FastTestProject } from '@/api/graphql/client.graphql'
export default {
dicts: [
'inspection_item',
......@@ -463,9 +462,26 @@ export default {
closeOnClickModal: false
})
.then(async () => {
const res = await reviewTaskStart({
// if(item)
console.log(item)
const params = {
id: item.id
})
}
if (item.nextSubTask === 'trfis') {
const res = await geTaskCase({
modelTestId: item.modelTestTaskId
})
if (res.code === 200) {
const resp = await this.newFileTest({
name: item.taskName,
caseIdList: res.data
})
console.log(resp)
params.testSchemeId = resp.data.id
}
}
const res = await reviewTaskStart(params)
if (res.code === 200) {
this.loadData()
} else {
......@@ -544,6 +560,27 @@ 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)
})
},
// 车型测试
handleCarTypeTestTaskContent(status, id, taskId) {
switch (status) {
......
......@@ -7,46 +7,25 @@
frameborder="0"
style="width: 100%; height: 100%"
></iframe>
<el-button @click="newFileTest">新建任务</el-button>
</div>
</page-standard>
</template>
<script>
import { FastTestProject } from '@/api/graphql/client.graphql'
export default {
name: 'Index',
data() {
return {
id: this.$route.query,
url: ''
// http://10.12.48.80:1234/car/caseManage/case/casePublishDetail/case_items;375
// http://10.12.48.78:8090/car/caseManage/case/casePublishDetail/case_items;375
}
},
mounted() {
const id = this.$route.query.id
this.url = `http://10.12.48.80:1234/car/caseManage/case/casePublishDetail/case_items;${id}`
this.url = `http://10.12.48.78:8090/car/caseManage/case/casePublishDetail/case_items;${id}`
},
methods: {
newFileTest() {
this.$apollo
.mutate({
// fetchPolicy: 'no-cache',
mutation: FastTestProject,
variables: {
name: 'test122',
lawId: 'law_items;106',
principalUserId: 'user_items;2',
systemId: 'system;1',
caseIdList: ['case_items;391'],
fileList: ['file_management_items;2']
}
})
.then(res => {
console.log(res)
})
}
}
methods: {}
}
</script>
......
......@@ -408,6 +408,8 @@ export default {
const configIds = row.configId || this.ids
this.$modal
.confirm('是否确认删除参数编号为"' + configIds + '"的数据项?', {
type: 'warning',
title: '删除',
closeOnClickModal: false
})
.then(function () {
......
......@@ -418,6 +418,8 @@ export default {
handleDelete(row) {
this.$modal
.confirm('是否确认删除名称为"' + row.deptName + '"的数据项?', {
type: 'warning',
title: '删除',
closeOnClickModal: false
})
.then(function () {
......
......@@ -473,6 +473,8 @@ export default {
const dictCodes = row.dictCode || this.ids
this.$modal
.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?', {
type: 'warning',
title: '删除',
closeOnClickModal: false
})
.then(function () {
......
......@@ -403,6 +403,8 @@ export default {
const dictIds = row.dictId || this.ids
this.$modal
.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?', {
type: 'warning',
title: '删除',
closeOnClickModal: false
})
.then(function () {
......
......@@ -379,6 +379,8 @@ export default {
const noticeIds = row.noticeId || this.ids
this.$modal
.confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?', {
type: 'warning',
title: '删除',
closeOnClickModal: false
})
.then(() => {
......
......@@ -360,6 +360,8 @@ export default {
const postIds = row.postId || this.ids
this.$modal
.confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?', {
type: 'warning',
title: '删除',
closeOnClickModal: false
})
.then(function () {
......
......@@ -531,6 +531,7 @@ export default {
.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?', {
closeOnClickModal: false
})
.then(function () {
return changeRoleStatus(row.roleId, row.status)
})
......@@ -726,6 +727,8 @@ export default {
const roleIds = row.roleId || this.ids
this.$modal
.confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?', {
type: 'warning',
title: '删除',
closeOnClickModal: false
})
.then(function () {
......
......@@ -817,6 +817,8 @@ export default {
const userIds = row.userId || this.ids
this.$modal
.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?', {
type: 'warning',
title: '删除',
closeOnClickModal: false
})
.then(function () {
......
......@@ -181,13 +181,19 @@
</el-link>
</div>
<div
v-if="item.carTestStatus && item.carTestStatus !== 'NONE'"
v-if="item.testStatus && item.testStatus !== 'NONE'"
class="cell-item"
>
<el-link
type="primary"
:underline="false"
@click="handleCarTypeTestTaskContent('NEW', item.id)"
@click="
handleCarTypeTestTaskContent(
'NEW',
item.modelTestTaskId,
item.id
)
"
>
{{ getDictData(dict.type.test_cartype_task_btn, 'NEW') }}
</el-link>
......@@ -261,14 +267,14 @@
</div>
</div>
<div
v-if="item.carTestStatus && item.carTestStatus !== 'NONE'"
v-if="item.testStatus && item.testStatus !== 'NONE'"
class="cell-item"
>
<div
:class="[
'cell-status',
item.carTestStatus !== 'FINISH'
? item.carTestStatus == 'NEW'
item.testStatus !== 'FINISH'
? item.testStatus == 'NEW'
? ''
: 'yellow'
: 'green'
......@@ -279,13 +285,12 @@
{{
getDictData(
dict.type.test_cartype_type,
item.carTestStatus
item.testStatus
)
}}</span
>
<span v-if="item.carTestStatus !== 'NEW'"
>{{
item.carTestStatus !== 'FINISH' ? '(共耗时' : '(已耗时'
<span v-if="item.testStatus !== 'NEW'"
>{{ item.testStatus !== 'FINISH' ? '(共耗时' : '(已耗时'
}}{{ getHourDiff(item.taskBeginTime) }})</span
>
</div>
......@@ -317,7 +322,7 @@
></el-progress>
</div>
<div
v-if="item.carTestStatus && item.carTestStatus !== 'NONE'"
v-if="item.testStatus && item.testStatus !== 'NONE'"
class="cell-item"
>
<el-progress
......@@ -431,14 +436,14 @@
>车型审查原始记录</el-button
>
<el-button
v-if="item.carReviewTaskId"
v-if="item.modelTestTaskId"
type="primary"
plain
size="mini"
@click="
goNext(
'/processing/carReview/source-record?id=' +
item.carReviewTaskId
item.modelTestTaskId
)
"
>车型试验原始记录</el-button
......@@ -719,26 +724,30 @@ export default {
}
},
// 车型测试
handleCarTypeTestTaskContent(status, id) {
handleCarTypeTestTaskContent(status, id, taskId) {
switch (status) {
// 查看试验方案
case 'NEW':
this.$router.push({
path: '/processing/review-form?type=3&id=' + id
path: `/processing/carTest/review-form?id=${id}`
})
break
// 执行试验方案
case 'PENDING':
this.$router.push({
path: '/processing/vehicle-type'
path: `/processing/carTest/execution-test-plan?id=${id}&taskId=${taskId}`
})
break
// 确认测试结果
case 'SIGNED':
this.$router.push({
path: '/processing/vehicle-type'
ath: `/processing/carTest/confirmation-test??id=${id}`
})
break
case 'FINISH':
this.$router.push({
path: '/processing/carTest/source-record?id=' + id
})
}
}
}
......
......@@ -42,7 +42,7 @@ module.exports = {
}
},
[process.env.VUE_APP_CLIENT_API]: {
target: `http://10.12.48.80:1234`,
target: `http://10.12.48.78:8090`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_CLIENT_API]: ''
......
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