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

fix: 70905

parent 9791c76e
...@@ -7,3 +7,11 @@ export function testDetail(data) { ...@@ -7,3 +7,11 @@ export function testDetail(data) {
data data
}) })
} }
export function testConfirm(data) {
return request({
url: '/car/test/task/confirm',
method: 'post',
data
})
}
\ No newline at end of file
<!-- 查看标准库 -->
<template> <template>
<page-standard> <page-standard>
<el-table <el-table
v-loading="loading" v-loading="loading"
border border
:span-method="objectSpanMethod"
:scroll-x="'1500px'" :scroll-x="'1500px'"
:default-sort="{ prop: 'createTime', order: 'descending' }" :default-sort="{ prop: 'releaseDate', 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">
...@@ -100,17 +101,35 @@ ...@@ -100,17 +101,35 @@
</template> </template>
<script> <script>
import page from '@/mixins/page' import page from '@/mixins/page'
import request from '@/utils/request'
import { geSpanList } from '@/utils/table'
export default { export default {
mixins: [page], mixins: [page],
dicts: ['sys_detailed_classification'], dicts: ['sys_detailed_classification'],
data() { data() {
return { return {
listUrl: '/standard/findStandardList', listUrl: '/standard/findStandardList',
showSearch: true,
list: [],
tableData: [], tableData: [],
TixiDialogManger: {
dialogVisible: false,
refreshList: false,
dialogEditId: null
},
classFicationList: [], classFicationList: [],
standardFicationList: [] standardFicationList: []
} }
}, },
watch: {
'TixiDialogManger.refreshList'(val) {
if (val) {
this.loadData()
this.TixiDialogManger.refreshList = false
}
}
},
mounted() { mounted() {
this.getDicts('sys_detailed_classification').then(response => { this.getDicts('sys_detailed_classification').then(response => {
this.classFicationList = response.data this.classFicationList = response.data
...@@ -119,10 +138,65 @@ export default { ...@@ -119,10 +138,65 @@ export default {
this.standardFicationList = response.data this.standardFicationList = response.data
}) })
}, },
created() {
this.queryParams.isAsc = 'desc'
this.queryParams.orderByColumn = 'releaseDate'
},
methods: { methods: {
resetQuery() {
this.queryParams = {
pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize,
isAsc: this.queryParams.isAsc,
orderByColumn: this.queryParams.orderByColumn
}
this.loadData()
},
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()
}
},
downPdf(row) { downPdf(row) {
console.log('row', row) console.log('row', row)
window.open(process.env.VUE_APP_IMAGE_API + row.file) window.open(process.env.VUE_APP_IMAGE_API + row.file)
},
viewTemplate() {
// this.$router.push({
// path: '/processing/reviewReport'
// })
window.open(
'http://storage.xuetangx.com/public_assets/xuetangx/PDF/PlayerAPI_v1.0.6.pdf'
)
},
objectSpanMethod() {},
handleAdd() {
this.TixiDialogManger.dialogVisible = true
this.TixiDialogManger.source = {}
},
handleDelete(row) {
this.$modal
.confirm('是否确定删除该条数据?', {
type: 'warning',
title: '删除',
closeOnClickModal: false
})
.then(() => {
// return delNotice(noticeIds)
})
.then(() => {
this.loadData()
this.$modal.msgSuccess('删除成功')
})
.catch(() => {})
},
handleUpdate(row) {
console.log('row', row)
this.TixiDialogManger.dialogVisible = true
this.TixiDialogManger.dialogEditId = row.id
} }
} }
} }
......
...@@ -3,55 +3,84 @@ ...@@ -3,55 +3,84 @@
title="检验内容" title="检验内容"
:visible.sync="dialogManger.dialogVisible" :visible.sync="dialogManger.dialogVisible"
direction="rtl" direction="rtl"
size="40%" size="80%"
:before-close="handleClose" :before-close="handleClose"
> >
<template slot="title"> <template slot="title">
<div class="custom_title">{{ '检验内容' }}</div> <div class="custom_title">{{ '检验内容' }}</div>
</template> </template>
<el-table <div style="padding: 20px">
v-loading="loading" <el-button type="primary" style="margin-bottom: 20px" @click="relevancy">
class="el-table" 关联测试内容
style="min-height: 88px; margin: 20px" </el-button>
border
:scroll-x="'1500px'" <el-table
:default-sort="{ prop: 'createTime', order: 'descending' }" v-loading="loading"
:data="tableData" class="el-table"
> border
<el-table-column type="index" width="55" label="序号" align="center"> :scroll-x="'1500px'"
<template slot-scope="scope"> :default-sort="{ prop: 'createTime', order: 'descending' }"
<span>{{ scope.$index + 1 }}</span> :data="tableData"
</template>
</el-table-column>
<el-table-column
label="测试场景"
align="left"
sortable
prop="testScenario"
>
</el-table-column>
<el-table-column label="测试方法" align="left" sortable prop="testType">
</el-table-column>
<el-table-column
label="用例编号"
align="left"
sortable
prop="useCaseNumber"
> >
</el-table-column> <el-table-column type="index" width="55" label="序号" align="center">
<el-table-column <template slot-scope="scope">
label="用例名称" <span>{{ scope.$index + 1 }}</span>
align="left" </template>
sortable </el-table-column>
prop="useCaseName" <el-table-column
label="测试场景"
align="left"
sortable
prop="testScenario"
>
</el-table-column>
<el-table-column label="测试方法" align="left" sortable prop="testType">
</el-table-column>
<el-table-column
label="用例编号"
align="left"
sortable
prop="useCaseNumber"
>
</el-table-column>
<el-table-column
label="用例名称"
align="left"
sortable
prop="useCaseName"
>
</el-table-column>
</el-table>
</div>
<el-dialog
title="选择测试用例"
:visible.sync="open"
append-to-body
width="fit-content"
>
<el-transfer
v-model="value"
:titles="['待选列表', '已选列表']"
filterable
:filter-method="filterMethod"
filter-placeholder="请输入关键词"
:data="data"
> >
</el-table-column> </el-transfer>
</el-table> <div slot="footer">
<el-button @click="cancle">取消</el-button>
<el-button type="primary" @click="handleConfirm">确定</el-button>
</div>
</el-dialog>
</el-drawer> </el-drawer>
</template> </template>
<script> <script>
import { listDocumentReview } from '../../../../api/setting/standardTerms' import {
getStandardUsecase,
listDocumentReview,
saveStandardUsecase
} from '../../../../api/setting/standardTerms'
import { getRows, getRows2 } from '../../../../utils/reviewDetailsTable' import { getRows, getRows2 } from '../../../../utils/reviewDetailsTable'
export default { export default {
...@@ -70,19 +99,69 @@ export default { ...@@ -70,19 +99,69 @@ export default {
}, },
data() { data() {
return { return {
loading: true, data: [
{
label: '北京',
key: 1,
disabled: false
},
{
label: '天津',
key: 2,
disabled: false
},
{
label: '河北',
key: 3,
disabled: false
}
],
value: [2],
filterMethod(query, item) {
return item.label.indexOf(query) > -1
},
open: false,
loading: false,
tableData: [] tableData: []
} }
}, },
methods: { methods: {
getRows, getRows,
getRows2, getRows2,
cancle() {
this.open = false
},
handleConfirm() {
const data = {
standardId: this.dialogManger.dialogEditId,
usecaseIdList: this.value
}
saveStandardUsecase(data).then(res => {
if (res.code === 200) {
this.value = []
console.log('清空value', this.value)
this.init()
this.open = false
}
})
},
relevancy() {
getStandardUsecase({ standardId: this.dialogManger.dialogEditId }).then(
res => {
if (res.code === 200) {
this.open = true
this.data = res.data.optionalUseCasesList
this.value = res.data.selectedUseCaseList
}
}
)
},
/** 获取文档审查检验内容 */ /** 获取文档审查检验内容 */
init() { init() {
this.loading = true // this.loading = true
listDocumentReview({ id: this.dialogManger.dialogEditId }).then(res => { listDocumentReview({ id: this.dialogManger.dialogEditId }).then(res => {
this.tableData = res.data this.tableData = res.data
this.loading = false // this.loading = false
}) })
}, },
/** 关闭抽屉 */ /** 关闭抽屉 */
...@@ -94,15 +173,12 @@ export default { ...@@ -94,15 +173,12 @@ export default {
</script> </script>
<style scoped> <style scoped>
.el-table {
width: auto;
}
/deep/ .el-drawer__header {
margin-bottom: 0px !important;
}
.custom_title { .custom_title {
color: #303133 !important; color: #303133 !important;
font-size: 18px; font-size: 18px;
font-weight: 400; font-weight: 400;
} }
/deep/ .el-drawer__header {
margin-bottom: 0px !important;
}
</style> </style>
...@@ -245,6 +245,7 @@ export default { ...@@ -245,6 +245,7 @@ export default {
reset() { reset() {
this.queryParams.chapter = '' this.queryParams.chapter = ''
this.queryParams.text = '' this.queryParams.text = ''
this.queryParams.testMethod = ''
this.loadData() this.loadData()
}, },
handleUpdate(row) { handleUpdate(row) {
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<script> <script>
import SchemeView from './components/SchemeView.vue' import SchemeView from './components/SchemeView.vue'
import routerMixins from '@/mixins/router' import routerMixins from '@/mixins/router'
import { testConfirm } from '@/api/task/test'
export default { export default {
name: 'Scheme', name: 'Scheme',
components: { components: {
...@@ -54,6 +55,11 @@ export default { ...@@ -54,6 +55,11 @@ export default {
this.url = `https://10.12.48.78:8090/car/complianceTestingCenter/projectOverView/${id}` this.url = `https://10.12.48.78:8090/car/complianceTestingCenter/projectOverView/${id}`
}, },
methods: { methods: {
goBack() {
testConfirm({ taskId: this.$route.query.taskid }).then(res => {
this.$router.back()
})
},
handlePreview() { handlePreview() {
this.dialogManger.dialogVisible = true this.dialogManger.dialogVisible = true
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
:scroll-x="'1500px'" :scroll-x="'1500px'"
:default-sort="{ prop: 'releaseDate', order: 'descending' }" :default-sort="{ prop: 'releaseDate', 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">
......
...@@ -244,6 +244,7 @@ export default { ...@@ -244,6 +244,7 @@ export default {
reset() { reset() {
this.queryParams.chapter = '' this.queryParams.chapter = ''
this.queryParams.text = '' this.queryParams.text = ''
this.queryParams.testMethod = ''
this.loadData() this.loadData()
}, },
handleUpdate(row) { handleUpdate(row) {
......
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