Commit a62a2100 authored by 高滢's avatar 高滢

Merge remote-tracking branch 'origin/develop' into develop

parents 9fca925f 8aa30361
import request from '@/utils/request'
// 体系审查、车型审查检验内容列表
export function listInspection(data) {
return request({
url: '/review/standard/getInspectionContent',
......@@ -7,3 +8,12 @@ export function listInspection(data) {
data: data
})
}
// 文档审查检验内容列表
export function listDocumentReview(data) {
return request({
url: '/review/standard/test/getInspectionContent',
method: 'post',
data: data
})
}
......@@ -117,13 +117,13 @@ export default {
list-style-type: none;
margin-top: 5px;
padding: 0;
width:100%;
li {
margin: 10px 0;
cursor: pointer;
font-size: 14px;
color: rgb(102, 102, 102);
width: 90%;
width: 100%;
.standard-item {
width: 100%;
overflow: hidden; //超出的文本隐藏
......
......@@ -8,9 +8,9 @@
:before-close="handleClose"
>
<el-form ref="form" :model="model" :rules="rules">
<el-form-item label="标准分类" prop="status">
<el-form-item label="标准分类" prop="standardType">
<el-select
v-model="model.status"
v-model="model.standardType"
style="width: 100%"
placeholder="请选择"
clearable
......@@ -23,39 +23,49 @@
/>
</el-select>
</el-form-item>
<el-form-item label="标准号" prop="status">
<el-input v-model="model.status" placeholder="请输入" clearable />
<el-form-item label="标准号" prop="standardNo">
<el-input
v-model="model.standardNo"
disabled
placeholder="请输入"
clearable
/>
</el-form-item>
<el-form-item label="标准名称" prop="status">
<el-input v-model="model.status" placeholder="请输入" clearable />
<el-form-item label="标准名称" prop="name">
<el-input
v-model="model.name"
disabled
placeholder="请输入"
clearable
/>
</el-form-item>
<el-form-item label="标准状态" prop="status">
<el-form-item label="标准状态" prop="standardStatus">
<el-select
v-model="model.status"
v-model="model.standardStatus"
style="width: 100%"
placeholder="请选择"
clearable
>
<el-option
v-for="dict in dict.type.sys_detailed_classification"
v-for="dict in dict.type.sys_standard_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="发布日期" prop="status">
<el-form-item label="发布日期" prop="releaseDate">
<el-date-picker
v-model="model.status"
v-model="model.releaseDate"
style="width: 100%"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="实施日期" prop="status">
<el-form-item label="实施日期" prop="implementationDate">
<el-date-picker
v-model="model.status"
v-model="model.implementationDate"
style="width: 100%"
type="date"
placeholder="选择日期"
......@@ -77,43 +87,101 @@ export default {
default() {
return {
dialogVisible: false,
source: {}
dialogEditId: null
}
}
}
},
dicts: ['sys_detailed_classification'],
dicts: ['sys_detailed_classification', 'sys_standard_status'],
data() {
return {
model: {},
model: this.$modelDataSource({
url: '/standard/getInfo',
dataKey: 'model',
attributes: {
standardType: '',
standardNo: '',
name: '',
standardStatus: '',
releaseDate: '',
implementationDate: ''
}
}),
rules: {
status: [
standardType: [
{ required: true, message: '菜单名称不能为空', trigger: 'blur' }
],
orderNum: [
standardNo: [
{ required: true, message: '菜单顺序不能为空', trigger: 'blur' }
],
path: [{ required: true, message: '路由地址不能为空', trigger: 'blur' }]
name: [
{ required: true, message: '路由地址不能为空', trigger: 'blur' }
],
standardStatus: [
{ required: true, message: '路由地址不能为空', trigger: 'blur' }
],
releaseDate: [
{ required: true, message: '路由地址不能为空', trigger: 'blur' }
],
implementationDate: [
{ required: true, message: '路由地址不能为空', trigger: 'blur' }
]
}
}
},
computed: {
modelTitle() {
return this.dialogManger.source.id ? '编辑标准' : '新增标准'
return this.dialogManger.dialogEditId ? '编辑标准' : '新增标准'
}
},
watch: {
'dialogManger.dialogEditId'(newValue) {
this.model.fetch(
newValue,
{},
() => {
this.dialogManger.dialogVisible = true
},
() => {
this.$emit('refresh')
}
)
}
},
methods: {
handleClose() {
this.$emit('close')
this.model.reset()
this.dialogManger.dialogEditId = null
this.dialogManger.dialogVisible = false
// this.$emit('close')
},
handleConfirm() {
// console.log('dialogManger', this.dialogManger)
// this.$refs['form'].validate(valid => {
// if (valid) {
// console.log(valid)
// console.log('体系审查')
// }
// })
this.$refs['form'].validate(valid => {
if (valid) {
console.log(valid)
console.log('体系审查')
console.log('表单验证通过')
this.model.save(
() => {
this.$message.success('保存成功')
this.$emit('refresh')
this.handleClose()
},
errors => {
this.handleClose()
}
)
} else {
console.log('表单验证失败')
}
})
}
}
}
</script>
<style scoped></style>
......@@ -17,52 +17,59 @@
<el-table-column
label="标准分类"
min-width="200"
prop="category"
prop="standardType"
align="left"
>
<!-- <template slot-scope="scope">-->
<!-- <div v-for="dict in classFicationList" :key="dict.dictValue">-->
<!-- <div-->
<!-- v-if="dict.dictValue == scope.row.standardType"-->
<!-- style="display: flex"-->
<!-- >-->
<!-- {{ dict.dictLabel }}-->
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
</el-table-column>
<el-table-column
prop="section"
prop="standardNo"
label="标准号"
min-width="200"
align="left"
>
</el-table-column>
<el-table-column
prop="request"
prop="name"
label="标准名称"
min-width="200"
align="left"
>
<template slot-scope="scope">
<span class="font-color" @click="viewTemplate">{{
scope.row.request
}}</span>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- prop="resultYes"-->
<!-- label="标准文件"-->
<!-- min-width="200"-->
<!-- align="left"-->
<!-- >-->
<!-- </el-table-column>-->
/>
<el-table-column
prop="resultNO"
prop="standardStatus"
label="标准状态"
min-width="200"
align="left"
>
<template slot-scope="scope">
<div v-for="dict in standardFicationList" :key="dict.dictValue">
<div
v-if="dict.dictValue == scope.row.standardStatus"
style="display: flex"
>
{{ dict.dictLabel }}
</div>
</div>
</template>
</el-table-column>
<el-table-column
label="发布日期"
min-width="200"
align="left"
sortable
prop="createTime"
prop="releaseDate"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
<span>{{ parseTime(scope.row.releaseDate) }}</span>
</template>
</el-table-column>
<el-table-column
......@@ -70,10 +77,10 @@
min-width="200"
align="left"
sortable
prop="createTime"
prop="implementationDate"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
<span>{{ parseTime(scope.row.implementationDate) }}</span>
</template>
</el-table-column>
<el-table-column
......@@ -90,7 +97,7 @@
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(1, scope.row)"
@click="handleUpdate(scope.row)"
>修改</el-button
>
</template>
......@@ -99,12 +106,13 @@
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.size"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="loadData"
>
</pagination>
<tixi-dialog
ref="TixiDialog"
:dialog-manger="TixiDialogManger"
@close="TixiDialogManger.dialogVisible = false"
></tixi-dialog>
......@@ -123,16 +131,17 @@ export default {
dicts: ['sys_detailed_classification'],
data() {
return {
listUrl: '/standard-list',
listUrl: '/standard/findStandardList',
showSearch: true,
list: [],
tableData: [],
queryParams: { type: '1' },
TixiDialogManger: {
dialogVisible: false,
refreshList: false,
source: {}
}
dialogEditId: null
},
classFicationList: [],
standardFicationList: []
}
},
......@@ -144,6 +153,14 @@ export default {
}
}
},
mounted() {
this.getDicts('sys_detailed_classification').then(response => {
this.classFicationList = response.data
})
this.getDicts('sys_standard_status').then(response => {
this.standardFicationList = response.data
})
},
methods: {
viewTemplate() {
// this.$router.push({
......@@ -154,36 +171,7 @@ export default {
)
},
objectSpanMethod() {},
loadData() {
this.loading = true
console.log(this.queryParams)
request({
url: this.listUrl,
method: 'get',
params: this.queryParams
})
.then(res => {
if (res.code === 200) {
console.log(res.rows)
this.list = res.rows
if (this.queryParams.type === '2') {
this.tableData = geSpanList(res.rows, ['way', 'object', 'scene'])
} else {
this.tableData = res.rows
}
this.total = res.total
}
this.loading = false
})
.catch(error => {
if (error.msg) {
this.$message.error(error.msg)
}
this.loading = false
})
},
handleAdd(type) {
handleAdd() {
this.TixiDialogManger.dialogVisible = true
this.TixiDialogManger.source = {}
},
......@@ -199,9 +187,10 @@ export default {
})
.catch(() => {})
},
handleUpdate(type, row) {
handleUpdate(row) {
console.log('row', row)
this.TixiDialogManger.dialogVisible = true
this.TixiDialogManger.source = row
this.TixiDialogManger.dialogEditId = row.id
}
}
}
......
<template>
<el-drawer
title="检验内容"
:visible.sync="dialogManger.dialogVisible"
direction="rtl"
size="40%"
:before-close="handleClose"
>
<el-table
class="el-table"
v-loading="loading"
style="min-height: 88px; margin: 20px"
border
:scroll-x="'1500px'"
:default-sort="{ prop: 'createTime', order: 'descending' }"
:data="tableData"
>
<el-table-column type="index" width="55" label="序号" align="center">
<template slot-scope="scope">
<span>{{ scope.$index + 1 }}</span>
</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
label="用例名称"
align="left"
sortable
prop="useCaseName"
>
</el-table-column>
</el-table>
</el-drawer>
</template>
<script>
import { listDocumentReview } from '../../../../api/setting/standardTerms'
import { getRows, getRows2 } from '../../../../utils/reviewDetailsTable'
export default {
props: {
dialogManger: {
type: Object,
default: () => {
return {
dialogVisible: false,
refreshList: false,
source: {},
dialogEditId: undefined
}
}
}
},
data() {
return {
loading: true,
tableData: []
}
},
methods: {
getRows,
getRows2,
/** 获取文档审查检验内容 */
init() {
this.loading = true
listDocumentReview({ id: this.dialogManger.dialogEditId }).then(res => {
this.tableData = res.data
this.loading = false
})
},
/** 关闭抽屉 */
handleClose() {
this.dialogManger.dialogVisible = false
}
}
}
</script>
<style scoped>
.el-table {
width: auto;
}
</style>
......@@ -3,46 +3,48 @@
title="检验内容"
:visible.sync="dialogManger.dialogVisible"
direction="rtl"
size="50%"
size="40%"
:before-close="handleClose"
>
<el-table
v-loading="loading"
border
:default-sort="{ prop: 'createTime', order: 'descending' }"
:data="tableData"
>
<el-table-column type="index" width="55" label="序号" align="center">
<template slot-scope="scope">
<span>{{ scope.$index + 1 }}</span>
<table class="table" style="margin: 20px">
<thead>
<tr>
<th>标准章节</th>
<th>标准要求</th>
<th>关联场景</th>
</tr>
</thead>
<tbody>
<!-- 循环遍历 keyPointList -->
<template v-for="(i, PointIndex) in tableData.keyPointList">
<tr :key="'PointIndex-2' + PointIndex">
<td align="center" :rowspan="getRows(i)">
{{ i.text }}
</td>
</tr>
<!-- 循环遍历 reviewDetailsList -->
<template v-for="(v, reviewDetailIndex) in i.reviewDetailsList">
<tr :key="'reviewDetailIndex-3' + PointIndex + reviewDetailIndex">
<td align="center">
{{ v.text }}
</td>
<td align="center">
<template v-for="(a, reviewSceneIndex) in v.reviewSceneList">
<span>{{ a.text }}</span>
<br />
</template>
</td>
</tr>
</template>
</template>
</el-table-column>
<el-table-column
prop="text"
label="审查要点"
min-width="200"
align="center"
>
</el-table-column>
<el-table-column
prop="as"
label="审查细则"
min-width="200"
align="center"
>
</el-table-column>
<el-table-column
prop="test"
label="关联场景"
min-width="200"
align="center"
>
</el-table-column>
</el-table>
</tbody>
</table>
</el-drawer>
</template>
<script>
import { listInspection } from '../../../../api/setting/standardTerms'
import { getRows, getRows2 } from '../../../../utils/reviewDetailsTable'
export default {
props: {
......@@ -64,26 +66,27 @@ export default {
tableData: []
}
},
// computed: {
// modelTitle: function () {
// return '检验内容'
// }
// },
methods: {
getRows,
getRows2,
/** 获取体系审查、车型审查检验内容 */
init() {
this.loading = true
listInspection({ id: this.dialogManger.dialogEditId }).then(res => {
this.tableData = res.data.keyPointList
this.tableData = res.data
this.loading = false
console.log('res', res)
})
// alert()
},
/** 关闭抽屉 */
handleClose() {
this.dialogManger.dialogVisible = false
}
// handleClose() {
// this.dialogManger.dialogVisible = false
// }
}
}
</script>
<style scoped></style>
<style scoped>
.table {
width: auto;
}
</style>
......@@ -98,7 +98,7 @@
plain
size="mini"
type="text"
@click="handleUpdate(3, scope.row)"
@click="handleUpdate(scope.row)"
>检验内容</el-button
>
</template>
......@@ -118,15 +118,24 @@
@close="vehicleModelDialogManger.dialogVisible = false"
>
</vehiclemodel-dialog>
<document-review-dialog
ref="documentReviewDialog"
:dialog-manger="documentReviewDialogManger"
@close="documentReviewDialogManger.dialogVisible = false"
>
</document-review-dialog>
</page-standard-option>
</template>
<script>
import page from '@/mixins/page'
import { mapGetters } from 'vuex'
import vehicleModelDialog from './components/vehicleModelDialog'
import documentReviewDialog from './components/documentReviewDialog'
import request from '../../../utils/request'
export default {
components: {
'vehiclemodel-dialog': vehicleModelDialog
'vehiclemodel-dialog': vehicleModelDialog,
'document-review-dialog': documentReviewDialog
},
dicts: ['sys_scene_type'],
mixins: [page],
......@@ -161,10 +170,17 @@ export default {
source: {},
dialogEditId: ''
},
documentReviewDialogManger: {
dialogVisible: false,
refreshList: false,
source: {},
dialogEditId: ''
},
refreshList: false
}
},
watch: {
// 公共组件左侧标准全局变量选中
'$store.getters.standard': {
handler(newVal, oldVal) {
this.queryParams.standardId = newVal
......@@ -185,14 +201,47 @@ export default {
}
},
methods: {
loadData() {
if (this.queryParams.standardId !== '') {
this.loading = true
request({
url: this.listUrl,
method: 'post',
data: this.queryParams
})
.then(res => {
if (res.code === 200) {
console.log(res.rows)
// res.rows[0].carReviewStatus = 'FINISH'
res.rows[0].reviewStatus = 'SIGNED'
// res.rows[0].carReviewStatus = 'FINISH'
this.tableData = res.rows
this.total = res.total
}
this.loading = false
})
.catch(error => {
if (error.msg) {
this.$message.error(error.msg)
}
this.loading = false
})
}
},
reset() {
this.queryParams.chapter = ''
this.queryParams.text = ''
},
handleUpdate(id, row) {
this.vehicleModelDialogManger.dialogVisible = true
this.vehicleModelDialogManger.dialogEditId = row.id
this.$refs.vehicleModelDialog.init()
handleUpdate(row) {
if (this.queryParams.type === 'test') {
this.documentReviewDialogManger.dialogVisible = true
this.documentReviewDialogManger.dialogEditId = row.id
this.$refs.documentReviewDialog.init()
} else {
this.vehicleModelDialogManger.dialogVisible = true
this.vehicleModelDialogManger.dialogEditId = row.id
this.$refs.vehicleModelDialog.init()
}
// console.log('dialogEditId', this.vehicleModelDialogManger.dialogEditId)
}
}
......
......@@ -128,7 +128,7 @@ export default {
dicts: ['sys_detailed_classification'],
data() {
return {
classFicationList: undefined,
classFicationList: [],
listUrl: '/system/type/getList',
showSearch: true,
tableData: [],
......
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