Commit 03b21795 authored by jiaxu.yan's avatar jiaxu.yan

Merge branch 'develop' into developer/yanjiaxu

# Conflicts:
#	src/views/setting/standard/index.vue
parents 94fc1a8f 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; //超出的文本隐藏
......
......@@ -6,6 +6,18 @@
:wrapper-closable="false"
@close="closeMaterial"
>
<div
style="
color: rgb(26, 111, 215);
position: absolute;
top: 22px;
left: 90px;
cursor: pointer;
"
@click="refresh"
>
<i class="el-icon-refresh"></i>刷新
</div>
<div
v-for="(item, index) in materialList"
:key="index"
......@@ -15,7 +27,7 @@
<div class="tips"></div>
<div>
<span style="color: #1a6fd7">
{{ item.createTime }}
{{ isTodayOrYesterday(item.createTime) }}
</span>
</div>
</div>
......@@ -67,6 +79,30 @@ export default {
this.getMaterialList()
},
methods: {
refresh() {
this.selectList = []
this.getMaterialList()
},
// 根据日期判断是今天还是昨天啊
isTodayOrYesterday(dateString) {
const inputDate = new Date(dateString)
const today = new Date()
const yesterday = new Date(today)
yesterday.setDate(today.getDate() - 1)
const inputDateStr = inputDate.toDateString()
const todayStr = today.toDateString()
const yesterdayStr = yesterday.toDateString()
if (inputDateStr === todayStr) {
return '今天'
} else if (inputDateStr === yesterdayStr) {
return '昨天'
} else {
return dateString
}
},
selectImage(a, b, path, id) {
if (this.selectList.length >= this.limit) {
this.$message({
......
......@@ -445,10 +445,9 @@ export default {
data.forEach(item => {
item.path = item.path.replace('http://49.232.167.247:22038', '')
})
}
if (this.materialFlag === 'trademark') {
this.editParamsForm.trademark = data[0].path
} else {
} else if (this.materialFlag === 'sample') {
var arr = []
if (this.editParamsForm.samplePhotos) {
arr = this.editParamsForm.samplePhotos.split(',')
......@@ -458,6 +457,7 @@ export default {
})
this.editParamsForm.samplePhotos = arr.join(',')
}
}
this.materialShow = false
},
selectTrademarkMaterial() {
......@@ -509,7 +509,6 @@ export default {
console.log(this.editParamsForm)
this.$refs['editForm'].validate(valid => {
if (valid) {
this.addLoading = true
if (
this.editParamsForm.id === null ||
this.editParamsForm.id === ''
......
<template>
<page-standard>
<div>
<div>任务编号</div>
<div>(任务状态:)</div>
<div class="header">
<div class="header-title">任务编号</div>
<div class="header-state">(任务状态:)</div>
</div>
<div class="detailsCard">
<el-row :gutter="41">
<el-col :span="8"> 检验依据: </el-col>
<el-col :span="8"> 检验项目: </el-col>
<el-col :span="8"> 保密等级 </el-col>
<el-row :gutter="41" style="margin-bottom: 24px">
<el-col :span="8" class="card-title">
检验依据:<sapn class="card-contnet">GBxxx</sapn>
</el-col>
<el-col :span="8" class="card-title"> 检验项目: </el-col>
<el-col :span="8" class="card-title"> 保密等级: </el-col>
</el-row>
<el-row :gutter="41">
<el-col :span="8"> 产品名称: </el-col>
<el-col :span="8"> 小组成员: </el-col>
<el-col :span="8"> 委托单位: </el-col>
<el-row :gutter="41" style="margin-bottom: 24px">
<el-col :span="8" class="card-title"> 产品名称: </el-col>
<el-col :span="8" class="card-title"> 小组成员: </el-col>
<el-col :span="8" class="card-title"> 委托单位: </el-col>
</el-row>
<el-row :gutter="41">
<el-col :span="8"> 车辆型号: </el-col>
<el-row :gutter="41" style="margin-bottom: 24px">
<el-col :span="8" class="card-title"> 车辆型号: </el-col>
</el-row>
</div>
<div>
<el-tabs v-model="activeName" @tab-click="tabClick">
<el-tab-pane label="数据统计" name="dataStatistics"></el-tab-pane>
<el-tab-pane label="样品信息" name="sampleInformation"></el-tab-pane>
<el-tab-pane label="数据统计" name="dataStatistics">
<div class="tip-navigation">
<div class="tip"></div>
<div class="tip-title">体系审查</div>
</div>
<el-row :gutter="40">
<el-col :span="12">
<div style="border: 1px solid #ebebeb; padding: 24px 0 24px 24px">
<el-row class="prograss-title"> 用例维度 </el-row>
<el-row :gutter="20">
<el-col :span="4">
<el-progress
type="circle"
:percentage="30"
color="#13BE24"
:width="120"
:stroke-width="16"
:format="format"
></el-progress>
</el-col>
<el-col :span="4">
<div class="prograss-laout" style="text-align: end">
<span class="line-prograss-title">审查细则(条)</span>
<span class="line-prograss-title"
>审查细则通过(个)</span
>
<span class="line-prograss-title"
>审查细则未通过(个)</span
>
<span class="line-prograss-title">审查中(个)</span>
</div>
</el-col>
<el-col :span="14">
<div class="prograss-laout">
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="70"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="100"
status="success"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="80"
status="warning"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="50"
status="exception"
color="#f98921"
text-color="#fff"
></el-progress>
</div>
</el-col>
</el-row>
</div>
</el-col>
<el-col :span="12">
<div style="border: 1px solid #ebebeb; padding: 24px 0 24px 24px">
<el-row class="prograss-title"> 合规维度 </el-row>
<el-row :gutter="20">
<el-col :span="4">
<el-progress
type="circle"
:percentage="30"
color="#13BE24"
:width="120"
:stroke-width="16"
:format="format"
></el-progress>
</el-col>
<el-col :span="4">
<div class="prograss-laout" style="text-align: end">
<span class="line-prograss-title">标准条款(个)</span>
<span class="line-prograss-title"
>标准条款通过(个)</span
>
<span class="line-prograss-title"
>标准条款未通过(个)</span
>
<span class="line-prograss-title">审查中(个)</span>
</div>
</el-col>
<el-col :span="14">
<div class="prograss-laout">
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="70"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="100"
status="success"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="80"
status="warning"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="50"
status="exception"
color="#f98921"
text-color="#fff"
></el-progress>
</div>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
<div class="tip-navigation">
<div class="tip"></div>
<div class="tip-title">车型审查</div>
</div>
<el-row :gutter="40">
<el-col :span="12">
<div style="border: 1px solid #ebebeb; padding: 24px 0 24px 24px">
<el-row style="text-align: center"> 用例维度 </el-row>
<el-row :gutter="20">
<el-col :span="4">
<el-progress
type="circle"
:percentage="30"
color="#13BE24"
:width="120"
:stroke-width="16"
:format="format"
></el-progress>
</el-col>
<el-col :span="4">
<div class="prograss-laout" style="text-align: end">
<span class="line-prograss-title"
>测试用例合计(个)</span
>
<span class="line-prograss-title">测试通过(个)</span>
<span class="line-prograss-title">测试未通过(个)</span>
<span class="line-prograss-title">执行未完成(个)</span>
</div>
</el-col>
<el-col :span="14">
<div class="prograss-laout">
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="70"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="100"
status="success"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="80"
status="warning"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="50"
status="exception"
color="#f98921"
text-color="#fff"
></el-progress>
</div>
</el-col>
</el-row>
</div>
</el-col>
<el-col :span="12">
<div style="border: 1px solid #ebebeb; padding: 24px 0 24px 24px">
<el-row style="text-align: center"> 合规维度 </el-row>
<el-row :gutter="20">
<el-col :span="4">
<el-progress
type="circle"
:percentage="30"
color="#13BE24"
:width="120"
:stroke-width="16"
:format="format"
></el-progress>
</el-col>
<el-col :span="4">
<div class="prograss-laout" style="text-align: end">
<span class="line-prograss-title">标准条款(个)</span>
<span class="line-prograss-title"
>审查细则通过(个)</span
>
<span class="line-prograss-title"
>审查细则未通过(个)</span
>
<span class="line-prograss-title">审查中(个)</span>
</div>
</el-col>
<el-col :span="14">
<div class="prograss-laout">
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="70"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="100"
status="success"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="80"
status="warning"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="50"
status="exception"
color="#f98921"
text-color="#fff"
></el-progress>
</div>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
<div class="tip-navigation">
<div class="tip"></div>
<div class="tip-title">体系审查</div>
</div>
<el-row :gutter="40">
<el-col :span="12">
<div style="border: 1px solid #ebebeb; padding: 24px 0 24px 24px">
<el-row style="text-align: center"> 用例维度 </el-row>
<el-row :gutter="20">
<el-col :span="4">
<el-progress
type="circle"
:percentage="30"
color="#13BE24"
:width="120"
:stroke-width="16"
:format="format"
></el-progress>
</el-col>
<el-col :span="4">
<div class="prograss-laout" style="text-align: end">
<span class="line-prograss-title">审查细则(条)</span>
<span class="line-prograss-title"
>审查细则通过(个)</span
>
<span class="line-prograss-title"
>审查细则未通过(个)</span
>
<span class="line-prograss-title">审查中(个)</span>
</div>
</el-col>
<el-col :span="14">
<div class="prograss-laout">
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="70"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="100"
status="success"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="80"
status="warning"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="50"
status="exception"
color="#f98921"
text-color="#fff"
></el-progress>
</div>
</el-col>
</el-row>
</div>
</el-col>
<el-col :span="12">
<div style="border: 1px solid #ebebeb; padding: 24px 0 24px 24px">
<el-row style="text-align: center"> 用例维度 </el-row>
<el-row :gutter="20">
<el-col :span="4">
<el-progress
type="circle"
:percentage="30"
color="#13BE24"
:width="120"
:stroke-width="16"
:format="format"
></el-progress>
</el-col>
<el-col :span="4">
<div class="prograss-laout" style="text-align: end">
<span class="line-prograss-title">审查细则(条)</span>
<span class="line-prograss-title"
>审查细则通过(个)</span
>
<span class="line-prograss-title"
>审查细则未通过(个)</span
>
<span class="line-prograss-title">审查中(个)</span>
</div>
</el-col>
<el-col :span="14">
<div class="prograss-laout">
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="70"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="100"
status="success"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="80"
status="warning"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="50"
status="exception"
color="#f98921"
text-color="#fff"
></el-progress>
</div>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="样品信息" name="sampleInformation">
<div class="tip-navigation">
<div class="tip"></div>
<div class="tip-title">整车样品信息</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</page-standard>
......@@ -33,6 +424,12 @@ export default {
return {
activeName: 'dataStatistics'
}
},
methods: {
tabClick() {},
format(percentage) {
return (percentage = `审查通过率\n\n ${percentage}%`)
}
}
}
</script>
......@@ -42,5 +439,71 @@ export default {
border: 1px solid #ebebeb;
border-radius: 4px;
width: 100%;
padding: 25px 25px 0 25px;
margin-bottom: 40px;
.card-title {
font-size: 14px;
font-weight: 700;
color: #606266;
}
.card-contnet {
font-size: 14px;
font-weight: 400;
color: #606266;
}
}
.header {
text-align: center;
margin-bottom: 40px;
.header-title {
font-size: 20px;
font-weight: 700;
color: #303133;
margin-bottom: 16px;
}
.header-state {
font-size: 16px;
font-weight: 400;
color: #13be24;
}
}
.tip-navigation {
display: flex;
align-items: center;
margin: 30px 0;
.tip {
width: 4px;
height: 26px;
background: #1a6fd7;
margin-right: 14px;
}
.tip-title {
font-size: 16px;
font-weight: 700;
color: #1a6fd7;
}
}
.prograss-laout {
height: 120px;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: stretch;
}
.line-prograss-title {
font-size: 14px;
font-weight: 400;
color: #606266;
}
.prograss-title {
text-align: center;
font-size: 14px;
font-weight: 700;
color: #606266;
margin-bottom: 20px;
}
::v-deep .el-progress__text {
white-space: pre;
}
</style>
......@@ -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>
......@@ -100,12 +107,13 @@
v-show="total > 0"
:total="total"
:background="false"
: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>
......@@ -124,16 +132,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: []
}
},
......@@ -145,6 +154,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({
......@@ -155,36 +172,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 = {}
},
......@@ -200,9 +188,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
v-loading="loading"
class="el-table"
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,50 @@
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">
<div :key="'reviewSceneIndex-3' + reviewSceneIndex">
<span>{{ a.text }}</span>
<br />
</div>
</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>
</td>
</tr>
</template>
</template>
</tbody>
</table>
</el-drawer>
</template>
<script>
import { listInspection } from '../../../../api/setting/standardTerms'
import { getRows, getRows2 } from '../../../../utils/reviewDetailsTable'
export default {
props: {
......@@ -64,26 +68,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>
......@@ -119,15 +119,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],
......@@ -162,10 +171,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
......@@ -186,14 +202,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) {
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)
}
}
......
......@@ -215,8 +215,8 @@ export default {
}
} else {
cell.style.backgroundColor = '#F3F8FD'
for (var i = 1; i < selrange.length; i++) {
selrange[i].style.backgroundColor = '#F3F8FD'
for (var v = 1; v < selrange.length; v++) {
selrange[v].style.backgroundColor = '#F3F8FD'
}
}
}
......
......@@ -129,7 +129,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