Commit db32413d authored by 高滢's avatar 高滢

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

parents 67c854a0 abfb21e9
......@@ -4,11 +4,11 @@ VUE_APP_TITLE = 周期性检测平台
# 开发环境配置
ENV = 'development'
# 中汽研安全检测平台管理系统/开发环境
VUE_APP_BASE_API = '/dev-api'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 中汽研安全检测平台管理系统/生产环境
VUE_APP_BASE_API = '/api'
# 图片服务器地址
VUE_APP_IMAGE_API = http://49.232.167.247:22037
VUE_APP_IMAGE_API = '/vehicle-quality-review-oss'
......@@ -5,7 +5,7 @@ VUE_APP_TITLE = 周期性检测平台
ENV = 'production'
# 中汽研安全检测平台管理系统/生产环境
VUE_APP_BASE_API = '/prod-api/'
VUE_APP_BASE_API = 'http://10.12.48.79:22032'
# 图片服务器地址
VUE_APP_IMAGE_API = '/vehicle-quality-review-oss'
VUE_APP_IMAGE_API = http://10.12.48.79:22038
......@@ -3,7 +3,9 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<% if (process.env.NODE_ENV === 'production') { %>
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<% } %>
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
......
......@@ -146,6 +146,15 @@ export function updateTask(data) {
})
}
// 任务暂存编辑
export function editTemporaryStorage(data) {
return request({
url: '/task/editTemporaryStorage',
method: 'post',
data
})
}
/// 任务删除
export function removeTask(data) {
return request({
......@@ -173,7 +182,6 @@ export function temporaryTask(data) {
})
}
export function getTemporaryStorage(data) {
return request({
url: '/task/getTemporaryStorage',
......@@ -189,4 +197,3 @@ export function getBySubtaskId(data) {
data
})
}
......@@ -512,7 +512,7 @@
flex-flow: column;
align-items: center;
justify-content: center;
.img-text{
.img-text {
font-size: 14px;
font-family: Microsoft YaHei, Microsoft YaHei-400;
font-weight: 400;
......@@ -600,7 +600,7 @@
// }
.option-cell {
flex:1;
flex: 1;
height: 5rem;
display: flex;
flex-flow: row;
......@@ -612,7 +612,7 @@
}
}
.card-buttons {
flex:1;
flex: 1;
height: 80px;
margin-top: 20px;
display: flex;
......
......@@ -30,13 +30,7 @@
size="18"
fill="#1a6fd7"
/>
<icon-park
v-else
type="add"
theme="outline"
size="18"
fill="#1a6fd7"
/>
<icon-park v-else type="add" theme="outline" size="18" fill="#1a6fd7" />
<slot name="title"></slot>
</div>
</div>
......
......@@ -15,7 +15,13 @@
>
<i class="el-icon-loading" v-if="loading"></i>
<slot name="icon " v-if="icon && !loading">
<icon-park :type="icon" theme="outline" class="el-icon" size="16" :fill="color" />
<icon-park
:type="icon"
theme="outline"
class="el-icon"
size="16"
:fill="color"
/>
</slot>
<span v-if="$slots.default"><slot></slot></span>
</button>
......@@ -40,21 +46,21 @@ export default {
disabled: Boolean,
line: Boolean
},
data(){
data() {
return {
color: "#1a6fd7"
color: '#1a6fd7'
}
},
mounted(){
switch(this.type){
case "default":
this.color = "#1a6fd7"
mounted() {
switch (this.type) {
case 'default':
this.color = '#1a6fd7'
break
case "primary":
this.color = "#ffffff"
case 'primary':
this.color = '#ffffff'
break
case "no-line":
this.color = "#1a6fd7"
case 'no-line':
this.color = '#1a6fd7'
break
}
},
......@@ -150,8 +156,8 @@ export default {
}
.footer-button--primary {
color: #fff;
background-color: #1A6FD7;
border-color: #1A6FD7;
background-color: #1a6fd7;
border-color: #1a6fd7;
}
.footer-button--primary:focus,
.footer-button--primary:hover {
......
......@@ -14,7 +14,13 @@
>
<i class="el-icon-loading" v-if="loading"></i>
<slot name="icon" v-if="icon && !loading">
<icon-park :type="icon" theme="outline" class="el-icon" size="16" :fill="color" />
<icon-park
:type="icon"
theme="outline"
class="el-icon"
size="16"
:fill="color"
/>
</slot>
<span v-if="$slots.default"><slot></slot></span>
</button>
......@@ -39,21 +45,21 @@ export default {
disabled: Boolean,
line: Boolean
},
data(){
data() {
return {
color: "#1a6fd7"
color: '#1a6fd7'
}
},
mounted(){
switch(this.type){
case "default":
this.color = "#1a6fd7"
mounted() {
switch (this.type) {
case 'default':
this.color = '#1a6fd7'
break
case "primary":
this.color = "#ffffff"
case 'primary':
this.color = '#ffffff'
break
case "no-line":
this.color = "#1a6fd7"
case 'no-line':
this.color = '#1a6fd7'
break
}
},
......@@ -149,8 +155,8 @@ export default {
}
.header-button--primary {
color: #fff;
background-color: #1A6FD7;
border-color: #1A6FD7;
background-color: #1a6fd7;
border-color: #1a6fd7;
}
.header-button--primary:focus,
.header-button--primary:hover {
......
<template>
<el-tooltip effect="dark" :content="title" placement="bottom-start">
<div class="page-btn" @click="handleClick" @mouseover="handleMouseOver('#1a6fd7')"
@mouseleave="handleMouseOver('#1a6fd7')">
<div
class="page-btn"
@click="handleClick"
@mouseover="handleMouseOver('#1a6fd7')"
@mouseleave="handleMouseOver('#1a6fd7')"
>
<icon-park :type="icon" theme="outline" size="16" :fill="color" />
</div>
</el-tooltip>
......@@ -18,9 +22,8 @@ export default {
},
data() {
return {
color: '#1a6fd7',
color: '#1a6fd7'
}
},
methods: {
handleMouseOver(evt) {
......@@ -43,8 +46,6 @@ export default {
justify-content: center;
align-items: center;
&:hover {
background-color: #e3eefc;
}
......@@ -56,8 +57,6 @@ export default {
// --color-1: #1a6fd7;
// --color-2: #ffffff;
// &:active {
// color: #1764c1;
// --color-1: #1764c1;
......
......@@ -7,7 +7,11 @@
<span class="header">{{ $route.meta.title }}</span>
<div class="header-right">
<slot name="header-right">
<header-button icon="arrow-left" type="no-line" @click="$router.back()">
<header-button
icon="arrow-left"
type="no-line"
@click="$router.back()"
>
返回
</header-button>
</slot>
......@@ -65,8 +69,8 @@ export default {
align-items: center;
justify-content: space-between;
}
.header-right{
::v-deep .header-button{
.header-right {
::v-deep .header-button {
margin-left: 24px;
}
}
......
......@@ -23,7 +23,7 @@ empty
:content="item.name"
placement="bottom-start"
>
<div class="standard-item">{{ item.name }}</div>
<div class="standard-item">{{ item.standardNo }}</div>
</el-tooltip>
</li>
</template>
......
......@@ -71,7 +71,7 @@ export default {
</script>
<style lang="scss" scoped>
.menu-title{
.menu-title {
display: flex;
flex-flow: column;
align-items: center;
......
......@@ -36,6 +36,7 @@ export default {
pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize
}
this.handleQuery()
},
handleQuery() {
this.queryParams.pageNum = 1
......
......@@ -14,7 +14,9 @@ const actions = {
getCompanyFiles({ commit }, data) {
getCompanyFile(data).then(res => {
// 筛选数组返回其中某一个元素成为新数组
const resData = res.rows.map(item => { return { "value": item.fileName, "id": item.id } })
const resData = res.rows.map(item => {
return { value: item.fileName, id: item.id }
})
commit('SET_FILES', resData)
})
}
......
......@@ -3,7 +3,6 @@
<page-standard>
<el-table
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:scroll-x="'1500px'"
:default-sort="{ prop: 'createTime', order: 'descending' }"
......@@ -16,6 +15,7 @@
</el-table-column>
<el-table-column
label="标准分类"
sortable
min-width="200"
prop="standardType"
align="left"
......@@ -75,7 +75,7 @@
prop="releaseDate"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.releaseDate) }}</span>
<span>{{ parseTime(scope.row.releaseDate, '{y}-{m}-{d} {h}') }}</span>
</template>
</el-table-column>
<el-table-column
......@@ -86,7 +86,9 @@
prop="implementationDate"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.implementationDate) }}</span>
<span>{{
parseTime(scope.row.implementationDate, '{y}-{m}-{d} {h}')
}}</span>
</template>
</el-table-column>
</el-table>
......
......@@ -43,7 +43,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button
type="default"
......@@ -64,7 +64,6 @@
</div>
<el-table
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:scroll-x="'1500px'"
:default-sort="{ prop: 'createTime', order: 'descending' }"
......@@ -75,18 +74,29 @@
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column prop="chapter" label="标准章节" align="center">
<el-table-column
prop="chapter"
label="标准章节"
sortable
width="140"
align="left"
>
</el-table-column>
<el-table-column prop="text" label="标准要求" align="center">
<el-table-column prop="text" label="标准要求" align="left">
</el-table-column>
<el-table-column
v-if="refreshTable && queryParams.type === 'test'"
prop="testMethod"
label="标准测试方法"
align="center"
align="left"
>
</el-table-column>
<el-table-column label="操作" align="left" class-name="fixed-width">
<el-table-column
label="操作"
align="left"
width="240"
class-name="fixed-width"
>
<template slot-scope="scope">
<div class="button-bar">
<page-button
......@@ -148,7 +158,7 @@ export default {
value: 'car'
},
{
label: '文档审查',
label: '车型试验',
value: 'test'
}
],
......
......@@ -55,7 +55,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">
重置</el-button
......@@ -68,13 +68,7 @@
<!-- @queryTable="getList"-->
<!-- ></right-toolbar>-->
<!-- </el-row>-->
<el-table
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:scroll-x="'1500px'"
:data="tableData"
>
<el-table v-loading="loading" border :scroll-x="'1500px'" :data="tableData">
<el-table-column type="index" width="55" label="序号" align="center">
<template slot-scope="scope">
<span>{{ scope.$index + 1 }}</span>
......
......@@ -50,7 +50,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......
......@@ -64,7 +64,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......
......@@ -59,7 +59,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......
......@@ -29,7 +29,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......
......@@ -83,7 +83,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button
type="default"
......
......@@ -33,7 +33,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button
type="default"
......@@ -53,7 +53,6 @@
</el-form>
<el-table
v-loading="tableLoading"
style="width: 100%; min-height: 88px"
border
:scroll-x="'1500px'"
:default-sort="{ prop: 'createTime', order: 'descending' }"
......
......@@ -33,7 +33,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button
type="default"
......@@ -46,7 +46,6 @@
</el-form>
<el-table
v-loading="tableLoading"
style="width: 100%; min-height: 88px"
border
:scroll-x="'1500px'"
:default-sort="{ prop: 'createTime', order: 'descending' }"
......
......@@ -63,7 +63,6 @@
</el-form>
<el-table
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:default-sort="{ prop: 'createTime', order: 'descending' }"
:data="tableData"
......
......@@ -88,7 +88,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button
type="default"
......@@ -108,7 +108,6 @@
<el-table
v-if="refreshTable"
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:default-sort="{ prop: 'createTime', order: 'descending' }"
:data="tableData"
......
......@@ -68,7 +68,6 @@
</el-form>
<el-table
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:scroll-x="'1500px'"
:default-sort="{ prop: 'createTime', order: 'descending' }"
......
......@@ -48,7 +48,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......@@ -79,7 +79,6 @@
<el-table
v-if="refreshTable"
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:scroll-x="'1500px'"
:default-sort="{ prop: 'createTime', order: 'descending' }"
......
......@@ -35,7 +35,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......@@ -52,7 +52,6 @@
<el-table
v-if="refreshTable"
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:default-sort="{ prop: 'createTime', order: 'descending' }"
:data="tableData"
......
......@@ -36,7 +36,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button
type="default"
......@@ -49,7 +49,6 @@
</el-form>
<el-table
v-loading="loading"
style="width: 100%; min-height: 88px"
border
tooltip-effect="dark"
@selection-change="handleSelectionChange"
......
......@@ -36,7 +36,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button
type="default"
......@@ -49,7 +49,6 @@
</el-form>
<el-table
v-loading="loading"
style="width: 100%; min-height: 88px"
border
tooltip-effect="dark"
@selection-change="handleSelectionChange"
......
......@@ -105,7 +105,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button
type="default"
......@@ -194,7 +194,6 @@
<el-table
v-if="refreshTable && Number(queryParams.type) === 3"
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:scroll-x="'1500px'"
:default-sort="{ prop: 'createTime', order: 'descending' }"
......
......@@ -38,7 +38,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button
type="default"
......@@ -60,7 +60,6 @@
<el-table
v-if="refreshTable"
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:default-sort="{ prop: 'createTime', order: 'descending' }"
:scroll-x="'1500px'"
......
......@@ -36,7 +36,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button
type="default"
......@@ -49,7 +49,6 @@
</el-form>
<el-table
v-loading="loading"
style="width: 100%; min-height: 88px"
border
tooltip-effect="dark"
@selection-change="handleSelectionChange"
......
......@@ -2,7 +2,6 @@
<page-standard>
<el-table
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:span-method="objectSpanMethod"
:scroll-x="'1500px'"
......@@ -16,6 +15,7 @@
</el-table-column>
<el-table-column
label="标准分类"
sortable
min-width="200"
prop="standardType"
align="left"
......@@ -75,7 +75,7 @@
prop="releaseDate"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.releaseDate) }}</span>
<span>{{ parseTime(scope.row.releaseDate, '{y}-{m}-{d} {h}') }}</span>
</template>
</el-table-column>
<el-table-column
......@@ -86,7 +86,9 @@
prop="implementationDate"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.implementationDate) }}</span>
<span>{{
parseTime(scope.row.implementationDate, '{y}-{m}-{d} {h}')
}}</span>
</template>
</el-table-column>
<el-table-column
......
......@@ -38,7 +38,7 @@
reviewSceneIndex
"
>
<span>{{ a.text }}</span>
<span>{{ reviewSceneIndex + 1 + '、' + a.text }}</span>
<br />
</div>
</template>
......
......@@ -42,7 +42,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button
type="default"
......@@ -63,7 +63,6 @@
</div>
<el-table
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:scroll-x="'1500px'"
:default-sort="{ prop: 'createTime', order: 'descending' }"
......@@ -74,7 +73,13 @@
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column prop="chapter" label="标准章节" align="center">
<el-table-column
prop="chapter"
label="标准章节"
sortable
width="140"
align="center"
>
</el-table-column>
<el-table-column prop="text" label="标准要求" align="center">
</el-table-column>
......@@ -85,7 +90,12 @@
align="center"
>
</el-table-column>
<el-table-column label="操作" align="left" class-name="fixed-width">
<el-table-column
label="操作"
align="left"
width="240"
class-name="fixed-width"
>
<template slot-scope="scope">
<div class="button-bar">
<page-button
......@@ -147,7 +157,7 @@ export default {
value: 'car'
},
{
label: '文档审查',
label: '车型试验',
value: 'test'
}
],
......
......@@ -20,12 +20,7 @@
<!-- </el-form-item>-->
<!-- </el-form>-->
</div>
<el-table
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:data="tableData"
>
<el-table v-loading="loading" border :data="tableData">
<el-table-column type="index" width="55" label="序号" align="center">
<template slot-scope="scope">
<span>{{ scope.$index + 1 }}</span>
......
......@@ -38,7 +38,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button
type="default"
......@@ -60,7 +60,6 @@
<el-table
v-if="refreshTable"
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:default-sort="{ prop: 'createTime', order: 'descending' }"
:scroll-x="'1500px'"
......
......@@ -54,7 +54,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">
重置</el-button
......@@ -67,20 +67,24 @@
<!-- @queryTable="getList"-->
<!-- ></right-toolbar>-->
<!-- </el-row>-->
<el-table
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:scroll-x="'1500px'"
:data="tableData"
>
<el-table v-loading="loading" border :scroll-x="'1500px'" :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="center" prop="testScenario" />
<el-table-column label="测试类型" align="center" prop="testType" />
<el-table-column
label="测试场景"
sortable
align="center"
prop="testScenario"
/>
<el-table-column
label="测试类型"
sortable
align="center"
prop="testType"
/>
<el-table-column label="用例编号" align="center" prop="usecaseNo" />
<el-table-column label="用例名称" align="center" prop="name" />
<el-table-column label="工具" align="center" prop="tools" />
......@@ -89,6 +93,7 @@
<el-table-column label="更新人员" align="center" prop="updateBy" />
<el-table-column
label="更新时间"
sortable
align="center"
prop="updateTime"
width="180"
......
......@@ -57,7 +57,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......
......@@ -35,7 +35,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......
......@@ -46,7 +46,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......
......@@ -58,7 +58,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......
......@@ -35,7 +35,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......
......@@ -44,7 +44,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button
type="default"
......
......@@ -44,7 +44,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......
......@@ -31,7 +31,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......
......@@ -57,7 +57,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......
......@@ -30,7 +30,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......
......@@ -87,7 +87,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
......
......@@ -102,7 +102,6 @@
<el-table
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:default-sort="{ prop: 'createTime', order: 'descending' }"
:data="tableData"
......
......@@ -302,6 +302,7 @@ import { selectSamplePage } from '@/api/system/sample'
import { getUserByRole } from '@/api/system/user'
import {
createTask,
editTemporaryStorage,
getTaskById,
getTemporaryStorage,
temporaryTask,
......@@ -550,7 +551,9 @@ export default {
label: '车企五'
}
],
taskId: undefined
taskId: undefined,
// 暂存数据
taskTemporaryStorage: null
}
},
watch: {
......@@ -630,7 +633,6 @@ export default {
item.check = true
}
})
debugger
console.log('检验项目', this.inspectionItemList)
// 把detail转到model里(任务信息)
for (const key in this.taskDetail) {
......@@ -656,17 +658,21 @@ export default {
console.log('小组table', this.tableData)
console.log('this.userList', this.userList)
// 整车样品信息
if (this.taskDetail.completeVehicleSample !== null) {
this.carInfoArr = this.taskDetail.completeVehicleSample
this.carInfoArr.forEach(item => {
item.sampleId = item.id
item.flag = 0
})
}
// 零件样品信息
if (this.taskDetail.partVehicleSample !== null) {
this.partInfoArr = this.taskDetail.partVehicleSample
this.partInfoArr.forEach(item => {
item.sampleId = item.id
item.flag = 1
})
}
console.log('零件样品信息', this.partInfoArr)
console.log('model', this.model)
})
......@@ -691,7 +697,7 @@ export default {
this.rules.testScenarioList[0].required = false
} else {
// this.$route.meta.title = '发起新任务'
this.getTemporaryStorage()
// this.getTemporaryStorage()
}
})
},
......@@ -699,6 +705,57 @@ export default {
getTemporaryStorage() {
getTemporaryStorage().then(response => {
console.log('暂存数据', response)
if (response.data !== null) {
this.taskTemporaryStorage = response.data
// 任务信息-(检验依据、检验项目)
this.model.standardId = this.taskTemporaryStorage.standardId
this.taskTemporaryStorage.taskList =
this.taskTemporaryStorage.taskList.split(',')
this.model.inspectionItemList = this.taskTemporaryStorage.taskList
this.inspectionItemList.forEach(item => {
if (this.taskTemporaryStorage.taskList.includes(item.value)) {
item.check = true
}
})
console.log('检验项目', this.inspectionItemList)
// 把detail转到model里(任务信息)
for (const key in this.taskTemporaryStorage) {
// eslint-disable-next-line no-prototype-builtins
if (this.model.hasOwnProperty(key)) {
this.model[key] = this.taskTemporaryStorage[key]
}
}
// 小组信息
this.tableData = this.taskTemporaryStorage.auditors
console.log('ddd', this.tableData)
this.tableData.forEach(item => {
item.nickName = item.name
item.dept = { deptName: item.deptName }
item.disabled = true
// 为下拉框做准备
this.userList.forEach(user => {
if (user.userId.toString() === item.userId.toString()) {
user.disabled = true
}
})
})
// 整车样品信息
if (this.taskTemporaryStorage.completeVehicleSample !== null) {
this.carInfoArr = this.taskTemporaryStorage.completeVehicleSample
this.carInfoArr.forEach(item => {
item.sampleId = item.id
item.flag = 0
})
}
// 零件样品信息
if (this.taskTemporaryStorage.partVehicleSample !== null) {
this.partInfoArr = this.taskTemporaryStorage.partVehicleSample
this.partInfoArr.forEach(item => {
item.sampleId = item.id
item.flag = 1
})
}
}
})
},
getUserByRole() {
......@@ -991,6 +1048,13 @@ export default {
})
} else {
this.taskCreateRequest.id = this.taskId
// 去除样品信息多余属性
this.taskCreateRequest.sample.forEach(item => {
delete item.id
})
this.taskCreateRequest.partSample.forEach(item => {
delete item.id
})
updateTask(this.taskCreateRequest).then(response => {
if (response.code === 200) {
this.$modal.msgSuccess('修改成功')
......@@ -1041,6 +1105,18 @@ export default {
this.taskCreateRequest.sample = this.currentVehicleSampleInformation
this.taskCreateRequest.partSample = this.currentPartSampleInformation
console.log('暂存', this.taskCreateRequest)
if (this.taskTemporaryStorage !== null) {
// 暂存有数据再次暂存走编辑
this.taskCreateRequest.id = this.taskTemporaryStorage.id
editTemporaryStorage(this.taskCreateRequest).then(response => {
if (response.code === 200) {
this.$modal.msgSuccess('暂存成功')
this.$router.push({
path: '/task/on'
})
}
})
} else {
temporaryTask(this.taskCreateRequest).then(response => {
if (response.code === 200) {
this.$modal.msgSuccess('暂存成功')
......@@ -1049,6 +1125,7 @@ export default {
})
}
})
}
})
// 假装跳转详情页
// this.$router.push({
......
......@@ -39,20 +39,14 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">
重置
</el-button>
</el-form-item>
</el-form>
<el-table
v-if="refreshTable"
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:data="tableData"
>
<el-table v-if="refreshTable" v-loading="loading" border :data="tableData">
<el-table-column label="开始时间" align="left" prop="createTime">
<template slot-scope="{ row }">
<span>{{ parseTime(row.createTime) }}</span>
......
......@@ -39,20 +39,14 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">
重置
</el-button>
</el-form-item>
</el-form>
<el-table
v-if="refreshTable"
v-loading="loading"
style="width: 100%; min-height: 88px"
border
:data="tableData"
>
<el-table v-if="refreshTable" v-loading="loading" border :data="tableData">
<el-table-column label="开始时间" align="left" prop="createTime">
<template slot-scope="{ row }">
<span>{{ parseTime(row.createTime) }}</span>
......
......@@ -30,7 +30,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button
type="default"
......
......@@ -41,7 +41,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>查询</el-button
>
<el-button
type="default"
......
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