Commit 29cbd7ee authored by mengzixuan's avatar mengzixuan

Merge branch 'develop' of http://gitlab.91isoft.com:90/car-test/web into mengzixuan

parents e2795b5c 4289fec7
import request from '@/utils/request'
export function selectQuantityStatistics(data){
return request({
url: '/home/statistics/quantityStatistics',
method: 'post',
data: data
})
}
export function selectStandardCategoryStatistics(){
return request({
url: '/home/statistics/standardCategory',
method: 'post'
})
}
export function selectConfidentialityLevelStatistics(){
return request({
url: '/home/statistics/confidentialityLevel',
method: 'post'
})
}
export function selectAverageInspectionRate(){
return request({
url: '/home/statistics/averageInspectionRate',
method: 'post'
})
}
export function selectTaskParticipationStatistics(){
return request({
url: '/home/statistics/taskParticipation',
method: 'post'
})
}
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
width: calc(100% - 100px); width: 60vw;
} }
.standard-title { .standard-title {
width: calc(70% - 40px); width: calc(70% - 40px);
...@@ -108,7 +108,8 @@ ...@@ -108,7 +108,8 @@
.standard-result { .standard-result {
color: #303133; color: #303133;
font-weight: bold; font-weight: bold;
width: 120px; width: 100px;
white-space: nowrap;
} }
} }
.i-icon { .i-icon {
......
...@@ -124,8 +124,7 @@ export default { ...@@ -124,8 +124,7 @@ export default {
.el-collapse-item__header { .el-collapse-item__header {
background-color: #f2f2f2 !important; background-color: #f2f2f2 !important;
height: 40px; height: 40px;
list-style: 40px; padding-left:13px;
padding: 0 13px;
} }
.el-collapse-item__content { .el-collapse-item__content {
padding: 0 !important; padding: 0 !important;
......
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
}, },
data() { data() {
return { return {
uploadUrl: process.env.VUE_APP_BASE_API + '/common/upload', // 上传的图片服务器地址 uploadUrl: process.env.VUE_APP_BASE_API + '/common/uploadMinio', // 上传的图片服务器地址
headers: { headers: {
Authorization: 'Bearer ' + getToken() Authorization: 'Bearer ' + getToken()
}, },
...@@ -109,6 +109,9 @@ export default { ...@@ -109,6 +109,9 @@ export default {
this.currentValue = val === null ? '' : val this.currentValue = val === null ? '' : val
if (this.Quill) { if (this.Quill) {
this.Quill.pasteHTML(this.currentValue) this.Quill.pasteHTML(this.currentValue)
this.$nextTick(() => {
this.Quill.setSelection(this.currentValue.length, 0)
})
} }
} }
}, },
...@@ -117,6 +120,9 @@ export default { ...@@ -117,6 +120,9 @@ export default {
}, },
mounted() { mounted() {
this.init() this.init()
this.$nextTick(() => {
this.Quill.setSelection(this.currentValue.length, 0)
})
}, },
beforeDestroy() { beforeDestroy() {
this.Quill = null this.Quill = null
...@@ -185,7 +191,8 @@ export default { ...@@ -185,7 +191,8 @@ export default {
quill.insertEmbed( quill.insertEmbed(
length, length,
'image', 'image',
process.env.VUE_APP_BASE_API + res.fileName // process.env.VUE_APP_BASE_API + res.fileName
process.env.VUE_APP_IMAGE_API + res.url
) )
// 调整光标到最后 // 调整光标到最后
quill.setSelection(length + 1) quill.setSelection(length + 1)
......
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
number: 0, number: 0,
uploadList: [], uploadList: [],
baseUrl: process.env.VUE_APP_BASE_API, baseUrl: process.env.VUE_APP_BASE_API,
uploadFileUrl: process.env.VUE_APP_BASE_API + '/common/upload', // 上传文件服务器地址 uploadFileUrl: process.env.VUE_APP_BASE_API + '/common/uploadMinio', // 上传文件服务器地址
headers: { headers: {
Authorization: 'Bearer ' + getToken() Authorization: 'Bearer ' + getToken()
}, },
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
}" }"
> >
<logo v-if="showLogo" :collapse="isCollapse" /> <logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper"> <el-scrollbar :class="settings.sideTheme" style="padding-bottom: 30px;" wrap-class="scrollbar-wrapper">
<el-menu <el-menu
:default-active="activeMenu" :default-active="activeMenu"
:collapse="isCollapse" :collapse="isCollapse"
......
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
}, },
data: [ data: [
{ {
value: 54 value: this.value
} }
] ]
}, },
......
...@@ -5,17 +5,51 @@ ...@@ -5,17 +5,51 @@
></div> ></div>
</template> </template>
<script> <script>
import { getDicts } from '../../api/system/dict/data'
import { selectConfidentialityLevelStatistics } from '../../api/system/home'
export default { export default {
name: 'ConfidentialityTasks', name: 'ConfidentialityTasks',
data() { data() {
return { return {
confidentialityLevel: [],
dictType: [],
chart: null chart: null
} }
}, },
watch: {
confidentialityLevel: {
deep: true,
handler() {
this.init()
}
}
},
mounted() { mounted() {
this.init() this.init()
}, },
created() {
this.getConfidentialityLevelStatistics()
},
methods: { methods: {
async getConfidentialityLevelStatistics() {
await getDicts('confidentiality_level').then(res => {
this.dictType = res.data
})
await selectConfidentialityLevelStatistics().then(res => {
this.confidentialityLevel = res.data
this.dictReturn(this.confidentialityLevel, this.dictType)
})
},
dictReturn(a, b) {
a.forEach((aItem, index) => {
b.forEach(bItem => {
if (aItem.name === bItem.dictValue) {
a[index].name = bItem.dictLabel
}
})
})
},
init() { init() {
// 2.初始化 // 2.初始化
this.chart = this.$echarts.init(this.$refs.chart) this.chart = this.$echarts.init(this.$refs.chart)
...@@ -74,12 +108,7 @@ export default { ...@@ -74,12 +108,7 @@ export default {
labelLine: { labelLine: {
show: false show: false
}, },
data: [ data: this.confidentialityLevel
{ value: 1048, name: 'A' },
{ value: 735, name: 'B' },
{ value: 580, name: 'C' },
{ value: 484, name: 'D' }
]
} }
] ]
} }
......
...@@ -5,17 +5,51 @@ ...@@ -5,17 +5,51 @@
></div> ></div>
</template> </template>
<script> <script>
import { selectStandardCategoryStatistics } from '../../api/system/home'
import { getDicts } from '../../api/system/dict/data'
export default { export default {
name: 'StandardClassification', name: 'StandardClassification',
data() { data() {
return { return {
standardCategory: [],
dictType: [],
chart: null chart: null
} }
}, },
watch: {
standardCategory: {
deep: true,
handler(newValue) {
this.init()
}
}
},
mounted() { mounted() {
this.init() this.init()
}, },
created() {
this.getStandardCategoryForm()
},
methods: { methods: {
async getStandardCategoryForm() {
await getDicts('sys_detailed_classification').then(res => {
this.dictType = res.data
})
await selectStandardCategoryStatistics().then(res => {
this.standardCategory = res.data
this.dictReturn(this.standardCategory, this.dictType)
})
},
dictReturn(a, b) {
a.forEach((aItem, index) => {
b.forEach(bItem => {
if (aItem.name === bItem.dictValue) {
a[index].name = bItem.dictLabel
}
})
})
},
init() { init() {
// 2.初始化 // 2.初始化
this.chart = this.$echarts.init(this.$refs.chart) this.chart = this.$echarts.init(this.$refs.chart)
...@@ -59,11 +93,7 @@ export default { ...@@ -59,11 +93,7 @@ export default {
length: 25, // 挨着图例的直线的长度 length: 25, // 挨着图例的直线的长度
length2: 10 // 挨着文字的直线的长度 length2: 10 // 挨着文字的直线的长度
}, },
data: [ data: this.standardCategory
{ value: 40, name: '网络安全' },
{ value: 38, name: '软件升级' },
{ value: 32, name: '数据安全' }
]
}, },
{ {
name: 'Nightingale Chart', name: 'Nightingale Chart',
...@@ -84,11 +114,7 @@ export default { ...@@ -84,11 +114,7 @@ export default {
labelLine: { labelLine: {
show: false show: false
}, },
data: [ data: this.standardCategory
{ value: 40, name: '网络安全' },
{ value: 38, name: '软件升级' },
{ value: 32, name: '数据安全' }
]
} }
] ]
} }
......
This diff is collapsed.
...@@ -285,6 +285,8 @@ export default { ...@@ -285,6 +285,8 @@ export default {
const infoIds = row.infoId || this.ids const infoIds = row.infoId || this.ids
this.$modal this.$modal
.confirm('是否确认删除访问编号为"' + infoIds + '"的数据项?', { .confirm('是否确认删除访问编号为"' + infoIds + '"的数据项?', {
type: 'warning',
title: '确认',
closeOnClickModal: false closeOnClickModal: false
}) })
.then(function () { .then(function () {
...@@ -300,6 +302,8 @@ export default { ...@@ -300,6 +302,8 @@ export default {
handleClean() { handleClean() {
this.$modal this.$modal
.confirm('是否确认清空所有登录日志数据项?', { .confirm('是否确认清空所有登录日志数据项?', {
type: 'warning',
title: '确认',
closeOnClickModal: false closeOnClickModal: false
}) })
.then(function () { .then(function () {
...@@ -316,6 +320,8 @@ export default { ...@@ -316,6 +320,8 @@ export default {
const username = this.selectName const username = this.selectName
this.$modal this.$modal
.confirm('是否确认解锁用户"' + username + '"数据项?', { .confirm('是否确认解锁用户"' + username + '"数据项?', {
type: 'warning',
title: '确认',
closeOnClickModal: false closeOnClickModal: false
}) })
.then(function () { .then(function () {
......
...@@ -168,13 +168,13 @@ ...@@ -168,13 +168,13 @@
>车型审查原始记录</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/carTest/source-record?id=' +
item.modelTestTaskId item.modelTestTaskId
) )
" "
......
...@@ -196,7 +196,14 @@ export default { ...@@ -196,7 +196,14 @@ export default {
loading: false loading: false
} }
}, },
async created() { async mounted() {
if (this.$route.query.id) {
this.taskId = this.$route.query.id
}
await this.getTask()
this.openAll()
},
async activated() {
if (this.$route.query.id) { if (this.$route.query.id) {
this.taskId = this.$route.query.id this.taskId = this.$route.query.id
} }
......
...@@ -215,7 +215,8 @@ ...@@ -215,7 +215,8 @@
<div v-if="reviewDetail.result"> <div v-if="reviewDetail.result">
<div v-if="reviewDetail.result.fileList"> <div v-if="reviewDetail.result.fileList">
<template v-for="i in reviewDetail.result.fileList"> <template v-for="i in reviewDetail.result.fileList">
{{ i.fileName }}{{ i.catalogue }} {{ i.fileName ? `《${i.fileName}》` : '__' }}
{{ i.catalogue }}
</template> </template>
</div> </div>
<div v-if="reviewDetail.result.comment"> <div v-if="reviewDetail.result.comment">
...@@ -360,6 +361,13 @@ export default { ...@@ -360,6 +361,13 @@ export default {
await this.getTask() await this.getTask()
this.openAll() this.openAll()
}, },
async activated() {
if (this.$route.query.id) {
this.taskId = this.$route.query.id
}
await this.getTask()
this.openAll()
},
methods: { methods: {
openAll() { openAll() {
this.activeNames = this.model.carReviewTask.standard.map(i => { this.activeNames = this.model.carReviewTask.standard.map(i => {
......
...@@ -369,6 +369,13 @@ export default { ...@@ -369,6 +369,13 @@ export default {
await this.getTask() await this.getTask()
this.openAll() this.openAll()
}, },
async activated() {
if (this.$route.query.id) {
this.taskId = this.$route.query.id
}
await this.getTask()
this.openAll()
},
methods: { methods: {
/** /**
* 获取任务详情 * 获取任务详情
......
...@@ -102,7 +102,8 @@ ...@@ -102,7 +102,8 @@
<div v-if="reviewDetail.result"> <div v-if="reviewDetail.result">
<div v-if="reviewDetail.result.fileList"> <div v-if="reviewDetail.result.fileList">
<template v-for="i in reviewDetail.result.fileList"> <template v-for="i in reviewDetail.result.fileList">
{{ i.fileName }}{{ i.catalogue }} {{ i.fileName ? `《${i.fileName}》` : '__' }}
{{ i.catalogue }}
</template> </template>
</div> </div>
<div v-if="reviewDetail.result.comment"> <div v-if="reviewDetail.result.comment">
......
...@@ -127,13 +127,15 @@ ...@@ -127,13 +127,15 @@
:rules="rules" :rules="rules"
> >
<el-form-item class="right-content-item" label="标准章节"> <el-form-item class="right-content-item" label="标准章节">
<span>{{ taskModel.chapter }}</span> <div style="display: flex">{{ taskModel.chapter }}</div>
</el-form-item> </el-form-item>
<el-form-item class="right-content-item" label="标准要求"> <el-form-item class="right-content-item" label="标准要求">
<span>{{ taskModel.standardText }}</span> <div style="display: flex">{{ taskModel.standardText }}</div>
</el-form-item> </el-form-item>
<el-form-item class="right-content-item" label="审查要点"> <el-form-item class="right-content-item" label="审查要点">
<span>{{ taskModel.reviewKeypointText }}</span> <div style="display: flex">
{{ taskModel.reviewKeypointText }}
</div>
</el-form-item> </el-form-item>
<el-form-item class="right-content-item" label="审查细则"> <el-form-item class="right-content-item" label="审查细则">
<div class="scene-content"> <div class="scene-content">
...@@ -325,7 +327,10 @@ ...@@ -325,7 +327,10 @@
</el-form> </el-form>
</div> </div>
</div> </div>
<div v-else class="empty-message">-暂无未完成条目-</div> <div v-else class="empty-message">
<iconpark-icon name="wutiaomu" size="120px"></iconpark-icon>
<span> 无未完成条目 </span>
</div>
</div> </div>
<div class="bottom-btn"> <div class="bottom-btn">
<footer-button <footer-button
...@@ -461,6 +466,14 @@ export default { ...@@ -461,6 +466,14 @@ export default {
await this.getTask() await this.getTask()
this.handleCircle(0) this.handleCircle(0)
}, },
async activated() {
this.taskId = this.$route.query.id
this.$store.dispatch('processing/getCompanyFiles', {
taskId: this.$route.query.taskId
})
await this.getTask()
this.handleCircle(0)
},
methods: { methods: {
/** /**
* 企业文件保存回调 * 企业文件保存回调
...@@ -749,6 +762,20 @@ export default { ...@@ -749,6 +762,20 @@ export default {
*确认车型审查 *确认车型审查
*/ */
submitFrom() { submitFrom() {
if (this.$refs.form) {
this.$refs.form.validate(valid => {
if (valid) {
this.submitFromData()
}
})
} else {
this.submitFromData()
}
},
/**
*确认车型审查
*/
submitFromData() {
this.$modal this.$modal
.confirm('是否确认提交表单,提交后不可修改', { .confirm('是否确认提交表单,提交后不可修改', {
type: 'warning', type: 'warning',
......
...@@ -281,6 +281,10 @@ export default { ...@@ -281,6 +281,10 @@ export default {
this.getTest() this.getTest()
await this.getTestDetail() await this.getTestDetail()
}, },
activated() {
this.getTest()
this.getTestDetail()
},
methods: { methods: {
getRows3, getRows3,
testmMthod() { testmMthod() {
......
<template>
<el-drawer
title="实验方案"
:visible.sync="dialogManger.dialogVisible"
direction="rtl"
size="80%"
:before-close="handleClose"
:wrapper-closable="false"
>
<template slot="title">
<div class="custom_title">实验方案</div>
</template>
<div class="main-content-style">
<!--card统计值-->
<div class="message-list">
<div class="message-box" style="background-color: #2eba3c">
<div class="message-detail">
<div class="detail-title">审查细则(条)</div>
<div class="detail-num mt10">
<!-- {{ model.systemReviewTask.details }} -->
</div>
</div>
<svg-icon
class="message-icon"
width="64px"
height="64px"
icon-class="tag_shechaxize"
></svg-icon>
</div>
<div class="message-box" style="background-color: #477bba">
<div class="message-detail">
<div class="detail-title">审查细则符合率(%)</div>
<div class="detail-num mt10">
<!-- {{ model.systemReviewTask.detailsPass }}% -->
</div>
</div>
<svg-icon
class="message-icon"
width="64px"
height="64px"
icon-class="tag_fuhelv"
></svg-icon>
</div>
<div class="message-box" style="background-color: #eca740">
<div class="message-detail">
<div class="detail-title">标准条款(条)</div>
<div class="detail-num mt10">
<!-- {{ model.systemReviewTask.standards }} -->
</div>
</div>
<svg-icon
class="message-icon"
width="64px"
height="64px"
icon-class="tag_biaozhuntiaokuan"
></svg-icon>
</div>
<div class="message-box" style="background-color: #47baba">
<div class="message-detail">
<div class="detail-title">标准条款通过率(%)</div>
<div class="detail-num mt10">
<!-- {{ model.systemReviewTask.standardsPass }}% -->
</div>
</div>
<svg-icon
class="message-icon"
width="64px"
height="64px"
icon-class="tag_biaozhuntiaokuan"
></svg-icon>
</div>
<div class="message-box" style="background-color: #6c47ba">
<div class="message-detail">
<div class="detail-title">参与审查人数(人)</div>
<div class="detail-num mt10">
<!-- {{ model.systemReviewTask.person }} -->
</div>
</div>
<svg-icon
class="message-icon"
icon-class="tag_shenehrenshu"
width="64px"
height="64px"
></svg-icon>
</div>
</div>
<!--审查表单概要-->
<div class="form-review-questionnaire">
<div class="title-display">
<span class="title-i"></span>
<span class="title-content">审查表单概要</span>
<div class="control-btns">
<div class="control-btn" @click="openAll()">
<icon-park
type="down-c"
theme="outline"
size="16"
style="margin-right: 5px"
fill="#303133"
/>
全部展开
</div>
<div class="control-btn" @click="closeAll()">
<icon-park
type="up-c"
theme="outline"
size="16"
style="margin-right: 5px"
fill="#303133"
/>
全部收起
</div>
</div>
</div>
<!--审查表单概要-->
<collapse v-model="activeNames" class="mt10">
<collapse-item
v-for="(item, key) in model"
:key="key"
:name="item.chapter"
>
<span slot="title" style="width: 100%">
<div class="standard-box">
<div class="standard-left">
<div class="standard">标准要求:</div>
<div class="standard-title">
{{ item.chapter + item.text }}
</div>
</div>
<!-- <div class="standard-result">
审查结果:
<span v-if="item.passed == 1" class="green">符合</span>
<span v-else class="orange">不符合</span>
</div> -->
</div>
</span>
<table class="table">
<tr>
<th>测试场景</th>
<th>测试方法</th>
<th>用例编号</th>
<th>用例名称</th>
<th>对应输入</th>
<th class="investigate-result">测试结果</th>
</tr>
<template v-for="(v, k) in item.testCaseList">
<tr :key="k">
<td>
{{ v.testScenario }}
</td>
<td>
{{ v.testScenario }}
</td>
<td>
{{ v.usecaseNo }}
</td>
<td>
{{ v.testScenario }}
</td>
<td></td>
<td align="center" class="investigate-result">
<!-- <el-tag
v-if="reviewDetail.result.passed === 1"
size="medium"
type="success"
>通过</el-tag
> -->
<el-tag size="medium" type="warning">不通过</el-tag>
</td>
</tr>
</template>
</table>
</collapse-item>
</collapse>
</div>
</div>
<div class="dialog-button">
<el-button size="mini" @click="dialogManger.dialogVisible = false"
>关 闭</el-button
>
</div>
</el-drawer>
</template>
<script>
import { testDetail } from '@/api/task/test'
import collapse from '@/components/Collapse/collapse'
import collapseItem from '@/components/Collapse/collapse-item'
export default {
components: {
collapse: collapse,
'collapse-item': collapseItem
},
props: {
dialogManger: {
type: Object,
default: () => {
return {
dialogVisible: false,
source: {},
dialogEditId: undefined
}
}
}
},
data() {
return {
loading: true,
model: [],
activeNames: []
}
},
watch: {
async 'dialogManger.dialogVisible'(newValue) {
if (newValue) {
await this.getTestDetail(this.dialogManger.dialogEditId)
this.openAll()
}
}
},
methods: {
/** 关闭抽屉 */
handleClose() {
this.dialogManger.dialogVisible = false
},
/** 获取任务详情 */
async getTestDetail(id) {
this.loading = true
const res = await testDetail({ taskId: id })
this.model = res.data
this.loading = false
},
/** 全部展开 */
openAll() {
this.activeNames = this.model.map(i => {
return i.chapter
})
},
/** 全部收起 */
closeAll() {
this.activeNames = []
}
}
}
</script>
<style lang="scss" scoped>
.dialog-button {
position: fixed;
bottom: 0px;
background: #ffffff;
right: 0;
padding: 20px;
text-align: end;
}
.form-review-questionnaire {
padding: 0 38px;
}
.el-table {
width: auto;
}
::v-deep .el-drawer__header {
margin-bottom: 0px !important;
}
.custom_title {
color: #303133 !important;
font-size: 18px;
font-weight: 400;
}
</style>
<!-- 测试用例详情 --> <!-- 测试用例详情 -->
<template> <template>
<task-standard> <task-standard>
<div slot="header-right">
<header-button icon="preview-open" type="default" @click="handlePreview">
查看实验方案
</header-button>
<header-button
icon="arrow-left"
class="back-btn"
type="no-line"
@click="goBack"
>
返回
</header-button>
</div>
<div class="web-page"> <div class="web-page">
<iframe <iframe
:src="url" :src="url"
frameborder="0" frameborder="0"
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
></iframe> ></iframe>
<scheme-view :dialog-manger="dialogManger"></scheme-view>
</div> </div>
</task-standard> </task-standard>
</template> </template>
<script> <script>
import { NewFileTestProject } from '@/api/graphql/client.graphql' import SchemeView from './components/SchemeView.vue'
import routerMixins from '@/mixins/router'
export default { export default {
name: 'Index', name: 'Scheme',
components: {
SchemeView: SchemeView
},
mixins: [routerMixins],
data() { data() {
return { return {
id: this.$route.query, url: '',
url: '' dialogManger: {
dialogVisible: false,
dialogEditId: null
}
} }
}, },
mounted() { mounted() {
const id = this.$route.query.id const id = this.$route.query.id
this.dialogManger.dialogEditId = this.$route.query.taskid
this.url = `https://10.12.48.78:8090/car/complianceTestingCenter/projectOverView/${id}`
},
activated() {
const id = this.$route.query.id
this.dialogManger.dialogEditId = this.$route.query.taskid
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: {
handlePreview() {
this.dialogManger.dialogVisible = true
}
}
} }
</script> </script>
......
...@@ -173,6 +173,12 @@ export default { ...@@ -173,6 +173,12 @@ export default {
} }
}, },
mounted() { mounted() {
console.log('mounted')
this.getTestDetail()
this.getTest()
},
activated() {
console.log('activated')
this.getTestDetail() this.getTestDetail()
this.getTest() this.getTest()
}, },
......
This diff is collapsed.
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
sortable sortable
min-width="210" min-width="210"
prop="enterpriseName" prop="enterpriseName"
show-overflow-tooltip
align="left" align="left"
> >
</el-table-column> </el-table-column>
...@@ -82,6 +83,7 @@ ...@@ -82,6 +83,7 @@
prop="fileName" prop="fileName"
label="文件名称" label="文件名称"
min-width="220" min-width="220"
show-overflow-tooltip
align="left" align="left"
> >
</el-table-column> </el-table-column>
...@@ -89,6 +91,7 @@ ...@@ -89,6 +91,7 @@
prop="version" prop="version"
label="文件版本" label="文件版本"
min-width="100" min-width="100"
show-overflow-tooltip
align="left" align="left"
> >
</el-table-column> </el-table-column>
...@@ -121,6 +124,7 @@ ...@@ -121,6 +124,7 @@
prop="storage" prop="storage"
label="存储位置" label="存储位置"
min-width="210" min-width="210"
show-overflow-tooltip
align="left" align="left"
> >
</el-table-column> </el-table-column>
...@@ -128,6 +132,7 @@ ...@@ -128,6 +132,7 @@
prop="identifyNumber" prop="identifyNumber"
label="文件识别号" label="文件识别号"
min-width="170" min-width="170"
show-overflow-tooltip
align="left" align="left"
> >
</el-table-column> </el-table-column>
...@@ -139,11 +144,13 @@ ...@@ -139,11 +144,13 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-image <el-image
v-if="scope.row.photo"
style="width: 36px; height: 36px" style="width: 36px; height: 36px"
:src="baseUrl + scope.row.photo" :src="baseUrl + scope.row.photo"
:preview-src-list="[baseUrl + scope.row.photo]" :preview-src-list="[baseUrl + scope.row.photo]"
> >
</el-image> </el-image>
<div v-else>--</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
......
...@@ -146,11 +146,13 @@ ...@@ -146,11 +146,13 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-image <el-image
v-if="scope.row.photo"
style="width: 36px; height: 36px" style="width: 36px; height: 36px"
:src="baseUrl + scope.row.photo" :src="baseUrl + scope.row.photo"
:preview-src-list="[baseUrl + scope.row.photo]" :preview-src-list="[baseUrl + scope.row.photo]"
> >
</el-image> </el-image>
<div v-else>--</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -223,6 +225,13 @@ export default { ...@@ -223,6 +225,13 @@ export default {
refreshList: false, refreshList: false,
dialogEditId: 0 dialogEditId: 0
}, },
queryParams: {
pageNum: 1,
pageSize: 10,
taskId: this.$route.query.id,
isAsc: 'desc',
orderByColumn: 'createTime'
},
refreshList: false, refreshList: false,
baseUrl: process.env.VUE_APP_IMAGE_API, baseUrl: process.env.VUE_APP_IMAGE_API,
listUrl: '/review/enterprise/archive/findEnterpriseArchiveByTaskId', listUrl: '/review/enterprise/archive/findEnterpriseArchiveByTaskId',
......
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
size="mini" size="mini"
@click=" @click="
goNext( goNext(
'/processing/carReview/source-record?id=' + '/processing/carTest/source-record?id=' +
item.modelTestTaskId item.modelTestTaskId
) )
" "
......
...@@ -46,6 +46,15 @@ ...@@ -46,6 +46,15 @@
frameborder="0" frameborder="0"
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
></iframe> ></iframe>
<!-- <object
id="pdf-object"
:data="fileUrl"
type="application/pdf"
width="100%"
height="100%"
>
<param name="filename" value="检验报告.pdf" />
</object> -->
</div> </div>
</task-standard> </task-standard>
</template> </template>
......
...@@ -332,6 +332,13 @@ export default { ...@@ -332,6 +332,13 @@ export default {
await this.getTask() await this.getTask()
this.openAll() this.openAll()
}, },
async activated() {
if (this.$route.query.id) {
this.taskId = this.$route.query.id
}
await this.getTask()
this.openAll()
},
methods: { methods: {
async getTask() { async getTask() {
this.loading = true this.loading = true
......
...@@ -214,6 +214,13 @@ export default { ...@@ -214,6 +214,13 @@ export default {
await this.getTask() await this.getTask()
this.openAll() this.openAll()
}, },
async activated() {
if (this.$route.query.id) {
this.taskId = this.$route.query.id
}
await this.getTask()
this.openAll()
},
methods: { methods: {
/** /**
* 获取任务详情 * 获取任务详情
......
...@@ -220,7 +220,8 @@ ...@@ -220,7 +220,8 @@
<div v-if="reviewDetail.result"> <div v-if="reviewDetail.result">
<div v-if="reviewDetail.result.fileList"> <div v-if="reviewDetail.result.fileList">
<template v-for="i in reviewDetail.result.fileList"> <template v-for="i in reviewDetail.result.fileList">
{{ i.fileName }}{{ i.catalogue }} {{ i.fileName ? `《${i.fileName}》` : '__' }}
{{ i.catalogue }}
</template> </template>
</div> </div>
<div v-if="reviewDetail.result.comment"> <div v-if="reviewDetail.result.comment">
...@@ -373,6 +374,13 @@ export default { ...@@ -373,6 +374,13 @@ export default {
await this.getTask() await this.getTask()
this.openAll() this.openAll()
}, },
async activated() {
if (this.$route.query.id) {
this.taskId = this.$route.query.id
}
await this.getTask()
this.openAll()
},
methods: { methods: {
/** /**
* 获取子任务详情 * 获取子任务详情
......
...@@ -102,7 +102,8 @@ ...@@ -102,7 +102,8 @@
<div v-if="reviewDetail.result"> <div v-if="reviewDetail.result">
<div v-if="reviewDetail.result.fileList"> <div v-if="reviewDetail.result.fileList">
<template v-for="i in reviewDetail.result.fileList"> <template v-for="i in reviewDetail.result.fileList">
{{ i.fileName }}{{ i.catalogue }} {{ i.fileName ? `《${i.fileName}》` : '__' }}
{{ i.catalogue }}
</template> </template>
</div> </div>
<div v-if="reviewDetail.result.comment"> <div v-if="reviewDetail.result.comment">
......
...@@ -485,6 +485,14 @@ export default { ...@@ -485,6 +485,14 @@ export default {
await this.getTask() await this.getTask()
this.handleCircle(0) this.handleCircle(0)
}, },
async activated() {
this.taskId = this.$route.query.id
this.$store.dispatch('processing/getCompanyFiles', {
taskId: this.$route.query.taskId
})
await this.getTask()
this.handleCircle(0)
},
methods: { methods: {
/** /**
* 企业文件保存回调 * 企业文件保存回调
...@@ -783,6 +791,20 @@ export default { ...@@ -783,6 +791,20 @@ export default {
*确认体系审查 *确认体系审查
*/ */
submitFrom() { submitFrom() {
if (this.$refs.form) {
this.$refs.form.validate(valid => {
if (valid) {
this.submitFromData()
}
})
} else {
this.submitFromData()
}
},
/**
*确认体系审查
*/
submitFromData() {
this.$modal this.$modal
.confirm('是否确认提交表单,提交后不可修改', { .confirm('是否确认提交表单,提交后不可修改', {
type: 'warning', type: 'warning',
...@@ -793,10 +815,7 @@ export default { ...@@ -793,10 +815,7 @@ export default {
reviewTaskConfirm({ reviewTaskConfirm({
taskId: this.taskId taskId: this.taskId
}).then(res => { }).then(res => {
this.$modal.msgSuccess('确认提交成功') this.$router.go(-1)
this.$router.push({
path: '/processing/unprocessed-review'
})
}) })
}) })
.catch(() => {}) .catch(() => {})
......
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
> >
<span v-if="item.testStatus !== 'NEW'" <span v-if="item.testStatus !== 'NEW'"
>{{ item.testStatus !== 'FINISH' ? '(共耗时' : '(已耗时' >{{ item.testStatus !== 'FINISH' ? '(共耗时' : '(已耗时'
}}{{ getHourDiff(item.taskBeginTime) }})</span }}{{ getHourDiff(item.testBeginTime) }})</span
> >
</div> </div>
</div> </div>
...@@ -314,7 +314,7 @@ ...@@ -314,7 +314,7 @@
<el-progress <el-progress
class="cell-progress" class="cell-progress"
:stroke-width="12" :stroke-width="12"
:percentage="item.systemReview" :percentage="item.systemReview || 0"
></el-progress> ></el-progress>
</div> </div>
...@@ -325,7 +325,7 @@ ...@@ -325,7 +325,7 @@
<el-progress <el-progress
class="cell-progress" class="cell-progress"
:stroke-width="12" :stroke-width="12"
:percentage="item.carReview" :percentage="item.carReview || 0"
></el-progress> ></el-progress>
</div> </div>
<div <div
...@@ -335,7 +335,7 @@ ...@@ -335,7 +335,7 @@
<el-progress <el-progress
class="cell-progress" class="cell-progress"
:stroke-width="12" :stroke-width="12"
:percentage="item.carTest" :percentage="item.test || 0"
></el-progress> ></el-progress>
</div> </div>
</div> </div>
...@@ -594,7 +594,7 @@ export default { ...@@ -594,7 +594,7 @@ export default {
// 执行试验方案 // 执行试验方案
case 'PENDING': case 'PENDING':
this.$router.push({ this.$router.push({
path: `/processing/carTest/execution-test-plan?id=${testSchemeId}` path: `/processing/carTest/execution-test-plan?taskid=${id}&id=${testSchemeId}`
}) })
break break
// 确认测试结果 // 确认测试结果
......
...@@ -177,10 +177,11 @@ export default { ...@@ -177,10 +177,11 @@ export default {
} }
} }
.submit-button { .submit-button {
text-align: end;
position: fixed; position: fixed;
bottom: 0px; bottom: 0px;
background: #ffffff; background: #ffffff;
width: 100%; width: 30%;
padding: 20px; padding: 20px;
} }
</style> </style>
...@@ -328,6 +328,7 @@ ...@@ -328,6 +328,7 @@
> >
</el-input> </el-input>
</el-form-item> </el-form-item>
<div style="height: 60px"></div>
<div class="dialog-button"> <div class="dialog-button">
<el-button <el-button
v-loading="addLoading" v-loading="addLoading"
...@@ -705,9 +706,12 @@ export default { ...@@ -705,9 +706,12 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dialog-button { .dialog-button {
display: flex; position: fixed;
justify-content: flex-end; bottom: 0px;
margin-right: 20px; background: #ffffff;
width: 39%;
padding: 20px;
text-align: end;
} }
.custom-link { .custom-link {
......
...@@ -616,13 +616,16 @@ ...@@ -616,13 +616,16 @@
class="sampleCard" class="sampleCard"
> >
<div class="sampleHeader"> <div class="sampleHeader">
<div class="avater"> <div v-if="item.trademark" class="avater">
<image-preview <image-preview
width="62px" width="62px"
height="62px" height="62px"
:src="item.trademark" :src="item.trademark"
></image-preview> ></image-preview>
</div> </div>
<div v-else class="avater">
<iconpark-icon name="yangpinxinxi" size="62"></iconpark-icon>
</div>
<div class="title"> <div class="title">
<div class="top">{{ item.sampleNumber }}</div> <div class="top">{{ item.sampleNumber }}</div>
<div class="bottom">{{ item.sampleName }}</div> <div class="bottom">{{ item.sampleName }}</div>
...@@ -735,13 +738,16 @@ ...@@ -735,13 +738,16 @@
class="sampleCard" class="sampleCard"
> >
<div class="sampleHeader"> <div class="sampleHeader">
<div class="avater"> <div v-if="item.trademark" class="avater">
<image-preview <image-preview
width="62px" width="62px"
height="62px" height="62px"
:src="item.trademark" :src="item.trademark"
></image-preview> ></image-preview>
</div> </div>
<div v-else class="avater">
<iconpark-icon name="yangpinxinxi" size="62"></iconpark-icon>
</div>
<div class="title"> <div class="title">
<div class="top">{{ item.sampleNumber }}</div> <div class="top">{{ item.sampleNumber }}</div>
<div class="bottom">{{ item.sampleName }}</div> <div class="bottom">{{ item.sampleName }}</div>
......
...@@ -67,18 +67,7 @@ ...@@ -67,18 +67,7 @@
>新增</el-button >新增</el-button
> >
</el-col> </el-col>
<el-col :span="1.5"> <!-- common/upload -->
<el-button
v-hasPermi="['system:notice:edit']"
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
>修改</el-button
>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
v-hasPermi="['system:notice:remove']" v-hasPermi="['system:notice:remove']"
......
...@@ -296,6 +296,16 @@ ...@@ -296,6 +296,16 @@
@change="handleModChange" @change="handleModChange"
/> />
</el-form> </el-form>
<!-- 文件上传 -->
<div class="tip-navigation">
<div class="tip"></div>
<div class="tip-title">文件信息</div>
</div>
<DocumentInfo
class="global-left-margin"
:pass-data="passDocumentInfoArr"
@change="handleDocumentInfoChange"
/>
<!--返回按钮--> <!--返回按钮-->
<div class="bottom-btn"> <div class="bottom-btn">
<footer-button <footer-button
...@@ -328,6 +338,7 @@ import { ...@@ -328,6 +338,7 @@ import {
} from '@/api/task/task' } from '@/api/task/task'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { getDicts } from '@/api/system/dict/data' import { getDicts } from '@/api/system/dict/data'
import DocumentInfo from '@/views/task/new/components/DocumentInfo.vue'
export default { export default {
dicts: [ dicts: [
...@@ -337,11 +348,14 @@ export default { ...@@ -337,11 +348,14 @@ export default {
'inspection_item' 'inspection_item'
], ],
components: { components: {
DocumentInfo,
CarInfo, CarInfo,
PartInfo PartInfo
}, },
data() { data() {
return { return {
passDocumentInfoArr: [], // 接详情、传入子组件
documentInfoArr: [], // 调用新增接口,使用(拿取的子组件数据)
// 最终提交 // 最终提交
taskCreateRequest: { taskCreateRequest: {
standardId: '', // 检验依据 standardId: '', // 检验依据
...@@ -609,6 +623,9 @@ export default { ...@@ -609,6 +623,9 @@ export default {
...mapGetters(['standard', 'standardList', 'testScenarioList']) ...mapGetters(['standard', 'standardList', 'testScenarioList'])
}, },
methods: { methods: {
handleDocumentInfoChange(value) {
this.documentInfoArr = value
},
getTaskDetail(taskId) { getTaskDetail(taskId) {
getTaskById({ id: taskId }).then(response => { getTaskById({ id: taskId }).then(response => {
console.log('response', response) console.log('response', response)
...@@ -677,12 +694,8 @@ export default { ...@@ -677,12 +694,8 @@ export default {
item.flag = 1 item.flag = 1
}) })
} }
console.log( // 文件
'零件样品信息', this.passDocumentInfoArr = this.taskDetail.fileList
this.taskDetail.partVehicleSample,
this.partInfoArr
)
console.log('model', this.model)
}) })
}, },
selectAll() { selectAll() {
...@@ -770,6 +783,8 @@ export default { ...@@ -770,6 +783,8 @@ export default {
item.flag = 1 item.flag = 1
}) })
} }
// 文件信息
this.passDocumentInfoArr = this.taskTemporaryStorage.fileList
} }
}) })
}, },
...@@ -1058,6 +1073,8 @@ export default { ...@@ -1058,6 +1073,8 @@ export default {
this.taskCreateRequest.partSample.forEach(item => { this.taskCreateRequest.partSample.forEach(item => {
delete item.id delete item.id
}) })
// 文件
this.taskCreateRequest.fileList = this.documentInfoArr
console.log('发布...', this.taskCreateRequest) console.log('发布...', this.taskCreateRequest)
if (this.taskId === undefined) { if (this.taskId === undefined) {
createTask(this.taskCreateRequest).then(response => { createTask(this.taskCreateRequest).then(response => {
......
<template>
<div class="upload-file">
<!-- 上传按钮 -->
<el-upload
v-if="!isDetail"
multiple
ref="fileUpload"
:action="uploadFileUrl"
:before-upload="handleBeforeUpload"
:file-list="fileList"
:limit="limit"
:on-error="handleUploadError"
:on-exceed="handleExceed"
:on-success="handleUploadSuccess"
:show-file-list="false"
:headers="headers"
class="upload-file-uploader"
>
<!-- 上传按钮 -->
<el-button size="mini" type="primary">选取文件</el-button>
</el-upload>
<!-- 表格 -->
<el-table style="width: 100%" border :data="tableData">
<el-table-column label="文件名称" align="left" prop="name">
<template slot-scope="{ row }">
<span>{{ row.name }}</span>
</template>
</el-table-column>
<!-- <el-table-column v-if="isDetail" label="文件" align="left" prop="url">-->
<!-- <template slot-scope="{ row }">-->
<!-- <el-image-->
<!-- style="width: 36px; height: 36px"-->
<!-- :src="showUrl + row.url"-->
<!-- :preview-src-list="[showUrl + row.url]"-->
<!-- >-->
<!-- </el-image>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
v-if="!isDetail"
label="排序"
align="center"
prop="orderIndex"
width="200"
>
<template slot-scope="scope">
<div class="sortable-handle-table">
<icon-park type="sort-three" size="14" fill="#F9A221" />
</div>
</template>
</el-table-column>
<el-table-column
v-if="!isDetail"
width="240"
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<div class="actions-container">
<page-button
icon="delete"
title="删除"
class="button-item"
@click="handleDeleteFile(scope.row)"
></page-button>
</div>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import Sortable from 'sortablejs'
import { getToken } from '@/utils/auth'
export default {
name: 'DocumentInfo',
props: {
// 值
value: [String, Object, Array],
// 数量限制
limit: {
type: Number,
default: 5
},
// 大小限制(MB)
fileSize: {
type: Number,
default: 5
},
// 文件类型, 例如['png', 'jpg', 'jpeg']
fileType: {
type: Array,
default: () => ['doc', 'xls', 'ppt', 'txt', 'pdf', 'jpg', 'png', 'jpeg']
},
passData: {
type: Array,
default: () => []
},
isDetail: {
type: Boolean,
default: false
}
},
data() {
return {
number: 0,
uploadList: [],
showUrl: 'http://49.232.167.247:22038',
baseUrl: process.env.VUE_APP_BASE_API,
uploadFileUrl: process.env.VUE_APP_BASE_API + '/common/uploadMinio', // 上传文件服务器地址
headers: {
Authorization: 'Bearer ' + getToken()
},
fileList: [],
tableData: [],
currentFile: {} // 当前上传文件
}
},
watch: {
value: {
handler(val) {
if (val) {
let temp = 1
// 首先将值转为数组
const list = Array.isArray(val) ? val : this.value.split(',')
// 然后将数组转为对象数组
this.fileList = list.map(item => {
if (typeof item === 'string') {
item = { name: item, url: item }
}
item.uid = item.uid || new Date().getTime() + temp++
return item
})
} else {
this.fileList = []
return []
}
},
deep: true,
immediate: true
},
tableData: {
handler(newValue, oldValue) {
console.log('new', newValue)
this.emitChange()
},
deep: true
},
passData: {
handler(newValue, oldValue) {
this.tableData = JSON.parse(JSON.stringify(newValue))
},
deep: true
}
},
created() {
// this.tableData = this.passTableData
this.$nextTick(() => {
this.rowDrop()
})
},
methods: {
handleDeleteFile(row) {
this.$confirm('是否确认删除此文件', '删除', {
confirmButtonText: '确定',
concelButtonText: '取消',
type: 'warning',
customClass: 'box-logout',
cancelButtonClass: 'resetBtn',
closeOnClickModal: false,
confirmButtonClass: 'queryBtn'
}).then(() => {
const index = this.tableData.findIndex(item => item === row)
if (index > -1) {
this.tableData.splice(index, 1)
}
})
},
emitChange() {
this.$emit('change', this.tableData)
},
// 上传前校检格式和大小
handleBeforeUpload(file) {
// 校检文件类型
if (this.fileType) {
const fileName = file.name.split('.')
const fileExt = fileName[fileName.length - 1]
const isTypeOk = this.fileType.indexOf(fileExt) >= 0
if (!isTypeOk) {
this.$modal.msgError(
`文件格式不正确, 请上传${this.fileType.join('/')}格式文件!`
)
return false
}
}
// 校检文件大小
if (this.fileSize) {
const isLt = file.size / 1024 / 1024 < this.fileSize
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`)
return false
}
}
this.$modal.loading('正在上传文件,请稍候...')
this.number++
return true
},
// 文件个数超出
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`)
},
// 上传失败
handleUploadError(err) {
console.log('err', err)
this.$modal.msgError('上传文件失败,请重试')
this.$modal.closeLoading()
},
// 上传成功回调
handleUploadSuccess(res, file) {
if (res.code === 200) {
console.log('res成功', res)
this.tableData.push({
name: res.originalFilename,
url: res.url,
edit: 1
})
this.uploadList.push({ name: res.fileName, url: res.fileName })
this.uploadedSuccessfully()
} else {
this.number--
this.$modal.closeLoading()
this.$modal.msgError(res.msg)
this.$refs.fileUpload.handleRemove(file)
this.uploadedSuccessfully()
}
},
// 删除文件
handleDelete(index) {
this.fileList.splice(index, 1)
this.$emit('input', this.listToString(this.fileList))
},
// 上传结束处理
uploadedSuccessfully() {
if (this.number > 0 && this.uploadList.length === this.number) {
this.fileList = this.fileList.concat(this.uploadList)
this.uploadList = []
this.number = 0
this.$emit('input', this.listToString(this.fileList))
this.$modal.closeLoading()
}
},
// 获取文件名称
getFileName(name) {
// 如果是url那么取最后的名字 如果不是直接返回
if (name.lastIndexOf('/') > -1) {
return name.slice(name.lastIndexOf('/') + 1)
} else {
return name
}
},
// 对象转成指定字符串分隔
listToString(list, separator) {
let strs = ''
separator = separator || ','
for (const i in list) {
strs += list[i].url + separator
}
return strs !== '' ? strs.substr(0, strs.length - 1) : ''
},
/** 行-拖拽 */
rowDrop() {
const tbody = document.querySelector(
'.upload-file .el-table__body-wrapper tbody'
)
const _this = this
Sortable.create(tbody, {
handle: '.sortable-handle-table',
onEnd(evt) {
_this.tableData.splice(
evt.newIndex,
0,
_this.tableData.splice(evt.oldIndex, 1)[0]
)
const newArray = _this.tableData.slice(0)
_this.tableData = []
_this.$nextTick(() => {
_this.tableData = newArray
})
}
})
}
}
}
</script>
<style scoped lang="scss">
.upload-file-uploader {
margin-bottom: 5px;
}
.upload-file-list .el-upload-list__item {
border: 1px solid #e4e7ed;
line-height: 2;
margin-bottom: 10px;
position: relative;
}
.upload-file-list .ele-upload-list__item-content {
display: flex;
justify-content: space-between;
align-items: center;
color: inherit;
}
.ele-upload-list__item-content-action .el-link {
margin-right: 10px;
}
.actions-container {
display: flex;
justify-content: center;
}
.sortable-handle-table {
cursor: move;
}
</style>
...@@ -295,6 +295,16 @@ ...@@ -295,6 +295,16 @@
@change="handleModChange" @change="handleModChange"
/> />
</el-form> </el-form>
<!-- 文件上传 -->
<div class="tip-navigation">
<div class="tip"></div>
<div class="tip-title">文件信息</div>
</div>
<DocumentInfo
class="global-left-margin"
:pass-data="passDocumentInfoArr"
@change="handleDocumentChange"
/>
<!--返回按钮--> <!--返回按钮-->
<div class="bottom-btn"> <div class="bottom-btn">
<footer-button <footer-button
...@@ -313,7 +323,6 @@ ...@@ -313,7 +323,6 @@
</template> </template>
<script> <script>
import Sortable from 'sortablejs' import Sortable from 'sortablejs'
import { manufacturerData } from '../../../api/task/new'
import CarInfo from './components/CarInfo' import CarInfo from './components/CarInfo'
import PartInfo from './components/PartInfo' import PartInfo from './components/PartInfo'
import { selectSamplePage } from '@/api/system/sample' import { selectSamplePage } from '@/api/system/sample'
...@@ -328,6 +337,8 @@ import { ...@@ -328,6 +337,8 @@ import {
} from '@/api/task/task' } from '@/api/task/task'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { getDicts } from '@/api/system/dict/data' import { getDicts } from '@/api/system/dict/data'
import DocumentInfo from '@/views/task/new/components/DocumentInfo.vue'
export default { export default {
dicts: [ dicts: [
'sys_task_status', 'sys_task_status',
...@@ -336,11 +347,15 @@ export default { ...@@ -336,11 +347,15 @@ export default {
'inspection_item' 'inspection_item'
], ],
components: { components: {
DocumentInfo,
CarInfo, CarInfo,
PartInfo PartInfo
}, },
data() { data() {
return { return {
passDocumentInfoArr: [],
// 文件信息
documentInfoArr: [],
// 最终提交 // 最终提交
taskCreateRequest: { taskCreateRequest: {
standardId: '', // 检验依据 standardId: '', // 检验依据
...@@ -377,7 +392,9 @@ export default { ...@@ -377,7 +392,9 @@ export default {
sampleId: '', // 样品id sampleId: '', // 样品id
flag: 1 flag: 1
} }
] ],
// 文件
fileList: []
}, },
// 当前填写的整车样品信息 // 当前填写的整车样品信息
currentVehicleSampleInformation: [], currentVehicleSampleInformation: [],
...@@ -781,6 +798,7 @@ export default { ...@@ -781,6 +798,7 @@ export default {
item.flag = 1 item.flag = 1
}) })
} }
this.passDocumentInfoArr = this.taskTemporaryStorage.fileList
} }
}) })
}, },
...@@ -801,6 +819,9 @@ export default { ...@@ -801,6 +819,9 @@ export default {
this.currentPartSampleInformation = cards this.currentPartSampleInformation = cards
console.log('PartInfo组件传值', cards) console.log('PartInfo组件传值', cards)
}, },
handleDocumentChange(data) {
this.documentInfoArr = data
},
getSampleInformation() { getSampleInformation() {
// 查询整车样品信息 // 查询整车样品信息
selectSamplePage({ pageNum: 1, pageSize: 999, flag: 0 }).then( selectSamplePage({ pageNum: 1, pageSize: 999, flag: 0 }).then(
...@@ -1115,6 +1136,8 @@ export default { ...@@ -1115,6 +1136,8 @@ export default {
this.taskCreateRequest.partSample.forEach(item => { this.taskCreateRequest.partSample.forEach(item => {
delete item.id delete item.id
}) })
// 文件
this.taskCreateRequest.fileList = this.documentInfoArr
console.log('发布...', this.taskCreateRequest) console.log('发布...', this.taskCreateRequest)
if (this.taskId === undefined) { if (this.taskId === undefined) {
createTask(this.taskCreateRequest).then(response => { createTask(this.taskCreateRequest).then(response => {
...@@ -1156,7 +1179,8 @@ export default { ...@@ -1156,7 +1179,8 @@ export default {
this.areAllPropertiesEmpty(this.model) && this.areAllPropertiesEmpty(this.model) &&
this.tableData.length === 0 && this.tableData.length === 0 &&
this.currentVehicleSampleInformation.length === 0 && this.currentVehicleSampleInformation.length === 0 &&
this.currentPartSampleInformation.length === 0 this.currentPartSampleInformation.length === 0 &&
this.passDocumentInfoArr.length === 0
) { ) {
this.$modal.msgError('请填写部分内容再进行暂存') this.$modal.msgError('请填写部分内容再进行暂存')
return return
...@@ -1182,6 +1206,7 @@ export default { ...@@ -1182,6 +1206,7 @@ export default {
this.taskCreateRequest.partSample.forEach(item => { this.taskCreateRequest.partSample.forEach(item => {
delete item.id delete item.id
}) })
this.taskCreateRequest.fileList = this.documentInfoArr
console.log('暂存', this.taskCreateRequest) console.log('暂存', this.taskCreateRequest)
if (this.taskTemporaryStorage !== null) { if (this.taskTemporaryStorage !== null) {
// 暂存有数据再次暂存走编辑 // 暂存有数据再次暂存走编辑
......
...@@ -291,7 +291,7 @@ ...@@ -291,7 +291,7 @@
> >
<span v-if="item.testStatus !== 'NEW'" <span v-if="item.testStatus !== 'NEW'"
>{{ item.testStatus !== 'FINISH' ? '(共耗时' : '(已耗时' >{{ item.testStatus !== 'FINISH' ? '(共耗时' : '(已耗时'
}}{{ getHourDiff(item.taskBeginTime) }})</span }}{{ getHourDiff(item.testBeginTime) }})</span
> >
</div> </div>
</div> </div>
...@@ -307,7 +307,7 @@ ...@@ -307,7 +307,7 @@
<el-progress <el-progress
class="cell-progress" class="cell-progress"
:stroke-width="12" :stroke-width="12"
:percentage="item.systemReview" :percentage="item.systemReview || 0"
></el-progress> ></el-progress>
</div> </div>
...@@ -318,7 +318,7 @@ ...@@ -318,7 +318,7 @@
<el-progress <el-progress
class="cell-progress" class="cell-progress"
:stroke-width="12" :stroke-width="12"
:percentage="item.carReview" :percentage="item.carReview || 0"
></el-progress> ></el-progress>
</div> </div>
<div <div
...@@ -328,7 +328,7 @@ ...@@ -328,7 +328,7 @@
<el-progress <el-progress
class="cell-progress" class="cell-progress"
:stroke-width="12" :stroke-width="12"
:percentage="item.carTest" :percentage="item.test || 0"
></el-progress> ></el-progress>
</div> </div>
</div> </div>
...@@ -442,7 +442,7 @@ ...@@ -442,7 +442,7 @@
size="mini" size="mini"
@click=" @click="
goNext( goNext(
'/processing/carReview/source-record?id=' + '/processing/carTest/source-record?id=' +
item.modelTestTaskId item.modelTestTaskId
) )
" "
......
...@@ -249,6 +249,16 @@ ...@@ -249,6 +249,16 @@
:part-sample-information="partSampleInformationList" :part-sample-information="partSampleInformationList"
@change="handleModChange" @change="handleModChange"
/> />
<!-- 文件上传 -->
<div class="tip-navigation">
<div class="tip"></div>
<div class="tip-title">文件信息</div>
</div>
<DocumentInfo
class="global-left-margin"
:pass-data="passDocumentInfoArr"
:is-detail="true"
/>
</el-form> </el-form>
</page-standard> </page-standard>
</template> </template>
...@@ -262,6 +272,7 @@ import { getUserByRole } from '@/api/system/user' ...@@ -262,6 +272,7 @@ import { getUserByRole } from '@/api/system/user'
import { createTask, getTaskById } from '@/api/task/task' import { createTask, getTaskById } from '@/api/task/task'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { getDicts } from '@/api/system/dict/data' import { getDicts } from '@/api/system/dict/data'
import DocumentInfo from '@/views/task/new/components/DocumentInfo.vue'
export default { export default {
dicts: [ dicts: [
'sys_task_status', 'sys_task_status',
...@@ -270,6 +281,7 @@ export default { ...@@ -270,6 +281,7 @@ export default {
'inspection_item' 'inspection_item'
], ],
components: { components: {
DocumentInfo,
CarInfo, CarInfo,
PartInfo PartInfo
}, },
...@@ -312,6 +324,8 @@ export default { ...@@ -312,6 +324,8 @@ export default {
} }
] ]
}, },
// 文件信息
passDocumentInfoArr: [],
// 当前填写的整车样品信息 // 当前填写的整车样品信息
currentVehicleSampleInformation: [], currentVehicleSampleInformation: [],
// 当前填写的零部件样品信息 // 当前填写的零部件样品信息
...@@ -584,6 +598,8 @@ export default { ...@@ -584,6 +598,8 @@ export default {
item.flag = 1 item.flag = 1
}) })
} }
// 文件信息
this.passDocumentInfoArr = this.taskDetail.fileList
const taskList = this.taskDetail.taskList.split(',') const taskList = this.taskDetail.taskList.split(',')
if ( if (
(taskList.length === 1 && taskList.includes('trfis')) || (taskList.length === 1 && taskList.includes('trfis')) ||
......
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