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

fix: 70609 70681

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